Skip to content

feat(metadata): mark reserved vocabulary by implementing port - #555

Merged
dmealing merged 4 commits into
mainfrom
fm/mo-workpc-replay-pr2
Nov 11, 2026
Merged

dmealing merged 4 commits into
mainfrom
fm/mo-workpc-replay-pr2

Conversation

@dmealing

@dmealing dmealing commented Nov 11, 2026 •

Copy link
Copy Markdown
Member

What Changed

  • Registers the reserved vocabulary that only some ports act on in the shared cross-port registry, marked with implementedIn and ports instead of carved out. This covers the generic view.* controls, view.textarea @rows, the view.image attrs, object.* @object and the language-specific attrs @dbSetName and @objectAdapter. Every port registers and loads this vocabulary strictly and ignores what it does not act on. Unregistered attrs on these types still fail.
  • Adds the registration in the Java, Kotlin (via the JVM registry) and Python ports, so fixtures/registry-conformance/expected-registry.json matches byte-for-byte across all five ports. Adds the view-kind1-controls, object-kind1-jvm-binding-attrs and error-kind1-view-unregistered-attr conformance fixtures.
  • meta types --format json now emits implementedIn and ports beside the existing provider and the retained tsOnly field. tsOnly is derived from implementedIn and is listed as deprecated, removed in 1.4. Regenerates the metamodel docs, site reference pages and agent-context fixtures.

Known limits

Gate

Validated in 1 no-mistakes run. Review found that the squashed commit had put back an older GeneratorGoldenTests.cs, undoing the CI-safe golden-file lookup from #554; the pipeline restored the file, which now matches main, and also fixed a garbled code comment and one out-of-date sentence in the registry README. In the test step the Java lane failed once while running beside Python and passed on two reruns. Before the run, every port's suite passed locally: TypeScript per package, C# 4564, Python 4905, the Java reactor including Kotlin, and scripts/ci-local.sh --quick.

Validation

Risk Assessment

✅ Low: All five ports register the same vocabulary and emit implementedIn/ports, the spec mirrors are byte-identical, tsOnly stays as a derived deprecated field, and the earlier GeneratorGoldenTests regression is gone; the remaining risk is that I did not run the per-port manifest byte-match.

Testing

Strict-load and guard scenarios driven live through the TS CLI in disposable projects: the three review fixtures and adversarial attr-scope cases behave as the intent requires. The TS CLI reports tsOnly as derived from implementedIn across all 593 vocabulary matches. Cross-port conformance lanes passed: Python, Kotlin, Java (on rerun), and C# (conformance and integration), plus the gates lane for generated-artifact drift. Java red once in a combined run and green on rerun; cause not determined. The TypeScript baseline scenario is untested in this phase and needs a live rerun. No UI surface, so no visual artifacts.

  • Live validation: ✅ go - 13 of 14 scenarios driven live against the product
Scenario Result Live Evidence
Strict load: view-kind1-controls fixture (view.textarea @rows, view.image attrs) loads in the TS CLI with exit 0 ✅ pass live bun bin/meta.ts verify in temp project holding fixtures/conformance/view-kind1-controls/input/meta.catalog.json, exit=0
Strict load: object-kind1-jvm-binding-attrs fixture (@object, @objectadapter on object.entity) loads with exit 0 ✅ pass live bun bin/meta.ts verify in temp project holding fixtures/conformance/object-kind1-jvm-binding-attrs/input, exit=0
Guard: error-kind1-view-unregistered-attr (@cropShape on view.image) fails with ERR_UNKNOWN_ATTR ✅ pass live CLI exit=1, ERR_UNKNOWN_ATTR: Unknown attribute '@cropShape' on view.image 'form'
Adversarial: @rows on view.checkbox (port-marked to view.textarea only) is rejected ✅ pass live CLI exit=1, ERR_UNKNOWN_ATTR: Unknown attribute '@rows' on view.checkbox
Adversarial: @object on field.string is rejected (java-only attr on object types only) ✅ pass live CLI exit=1, ERR_UNKNOWN_ATTR: Unknown attribute '@object' on field.string
Adversarial: @dbSetName on field.string rejected while @dbSetName on object.entity loads (exit 0) ✅ pass live entity-level exit=0; field-level exit=1 ERR_UNKNOWN_ATTR
meta types --format json: tsOnly equals (implementedIn == ["typescript"]) for every match; implementedIn and ports present alongside provider ✅ pass live bun bin/meta.ts types --format json: 593 matches, 0 tsOnly mismatches; view.* implementedIn ['typescript'] tsOnly true; @object implementedIn ['java'] tsOnly false; @dbSetName ports ['csharp']
Cross-port registry conformance (expected-registry.json byte-match, strict load of 3 fixtures): TypeScript ⏸️ untested no The prior payload recorded this as a baseline run and not a live result in this phase, so it cannot count as a pass here. Rerun scripts/ci-local.sh --only ts-fast --only ts-unit --strict-toolchains…
Cross-port registry conformance: Java (metadata, render, codegen-base, codegen-spring, maven-plugin) ✅ pass live scripts/ci-local.sh --only java-fast rerun exit 0 (evidence/ci-java-fast-rerun.log, conformance: java and kotlin ✓); direct mvn steps all exit 0 (EjectContractTest included)
Cross-port registry conformance: Python (446 passed, 15 skipped) ✅ pass live evidence/ci-java-python.log: conformance: python ✓, integration-tests (python) ✓
Cross-port registry conformance: C# (Conformance 2393, Render 364, Codegen 1433 (1 skipped), Cli 374 all passed; integration 451 passed) ✅ pass live evidence/ci-csharp.log, LOCAL CI PASSED
Generated artifacts regenerated, not hand-edited: doc-template drift, embedded-library drift, site payload, migration guides vs registry, agent-context gates ✅ pass live evidence/ci-gates.log, LOCAL CI PASSED
Metamodel corpus count is 454 ✅ pass live ls -d fixtures/conformance/*/ | wc -l = 454 matches docs/CONFORMANCE.md
Kotlin registry conformance ✅ pass live evidence/ci-java-fast-rerun.log: conformance: kotlin ✓ (1m01s)
  • Outcome: ⚠️ 2 infos across 1 run (26m55s)

Pipeline

Updates from git push no-mistakes

✅ **Intent** - passed

✅ No issues found.

✅ **Rebase** - passed

✅ No issues found.

✅ **Review** - 2 issues found, both resolved
  • 🔧 server/csharp/MetaObjects.Codegen.Tests/GeneratorGoldenTests.cs - the squashed commit had reverted the golden-directory lookup to [CallerFilePath], which fails on a CI build. Fixed: the file is restored to match main (found from the repo root).
  • 🔧 scripts/lib/requirement-vocabulary.ts - garbled comment reworded.
⚠️ **Test** - 2 infos
  • ℹ️ Java conformance lane (ci-local --only java-fast, run alongside python) went red once at 54s with no failure detail in the log. Direct rerun of every Java step, and a standalone --only java-fast rerun, both passed. Likely a concurrency or stale-build artifact from running two lanes at once; not reproduced.
  • ℹ️ docs/CONFORMANCE.md still has TODO lines, but they belong to identity.primary @sequenceStart (Honour identity.primary @sequenceStart in the TypeScript, Java, Kotlin and Python ports #544), not the implementedIn section the intent covers. The implementedIn section has no TODO.
  • Live validation: ✅ go - 13 of 14 scenarios driven live against the product
Scenario Result Live Evidence
Strict load: view-kind1-controls fixture (view.textarea @rows, view.image attrs) loads in the TS CLI with exit 0 ✅ pass live bun bin/meta.ts verify in temp project holding fixtures/conformance/view-kind1-controls/input/meta.catalog.json, exit=0
Strict load: object-kind1-jvm-binding-attrs fixture (@object, @objectadapter on object.entity) loads with exit 0 ✅ pass live bun bin/meta.ts verify in temp project holding fixtures/conformance/object-kind1-jvm-binding-attrs/input, exit=0
Guard: error-kind1-view-unregistered-attr (@cropShape on view.image) fails with ERR_UNKNOWN_ATTR ✅ pass live CLI exit=1, ERR_UNKNOWN_ATTR: Unknown attribute '@cropShape' on view.image 'form'
Adversarial: @rows on view.checkbox (port-marked to view.textarea only) is rejected ✅ pass live CLI exit=1, ERR_UNKNOWN_ATTR: Unknown attribute '@rows' on view.checkbox
Adversarial: @object on field.string is rejected (java-only attr on object types only) ✅ pass live CLI exit=1, ERR_UNKNOWN_ATTR: Unknown attribute '@object' on field.string
Adversarial: @dbSetName on field.string rejected while @dbSetName on object.entity loads (exit 0) ✅ pass live entity-level exit=0; field-level exit=1 ERR_UNKNOWN_ATTR
meta types --format json: tsOnly equals (implementedIn == ["typescript"]) for every match; implementedIn and ports present alongside provider ✅ pass live bun bin/meta.ts types --format json: 593 matches, 0 tsOnly mismatches; view.* implementedIn ['typescript'] tsOnly true; @object implementedIn ['java'] tsOnly false; @dbSetName ports ['csharp']
Cross-port registry conformance (expected-registry.json byte-match, strict load of 3 fixtures): TypeScript ⏸️ untested no The prior payload recorded this as a baseline run and not a live result in this phase, so it cannot count as a pass here. Rerun scripts/ci-local.sh --only ts-fast --only ts-unit --strict-toolchains…
Cross-port registry conformance: Java (metadata, render, codegen-base, codegen-spring, maven-plugin) ✅ pass live scripts/ci-local.sh --only java-fast rerun exit 0 (evidence/ci-java-fast-rerun.log, conformance: java and kotlin ✓); direct mvn steps all exit 0 (EjectContractTest included)
Cross-port registry conformance: Python (446 passed, 15 skipped) ✅ pass live evidence/ci-java-python.log: conformance: python ✓, integration-tests (python) ✓
Cross-port registry conformance: C# (Conformance 2393, Render 364, Codegen 1433 (1 skipped), Cli 374 all passed; integration 451 passed) ✅ pass live evidence/ci-csharp.log, LOCAL CI PASSED
Generated artifacts regenerated, not hand-edited: doc-template drift, embedded-library drift, site payload, migration guides vs registry, agent-context gates ✅ pass live evidence/ci-gates.log, LOCAL CI PASSED
Metamodel corpus count is 454 ✅ pass live ls -d fixtures/conformance/*/ | wc -l = 454 matches docs/CONFORMANCE.md
Kotlin registry conformance ✅ pass live evidence/ci-java-fast-rerun.log: conformance: kotlin ✓ (1m01s)
  • scripts/ci-local.sh --only ts-fast --only ts-unit --strict-toolchains
  • Baseline (given): scripts/ci-local.sh --only ts-fast --only ts-unit --strict-toolchains
  • bun server/typescript/packages/cli/bin/meta.ts verify on fixtures view-kind1-controls, object-kind1-jvm-binding-attrs, error-kind1-view-unregistered-attr (temp projects)
  • Adversarial attr-scope projects: @rows on view.checkbox, @rows on view.textarea, @object on field.string, @dbSetName on object.entity and field.string
  • bun server/typescript/packages/cli/bin/meta.ts types --format json and per-name queries (tsOnly/implementedIn/ports derivation check)
  • scripts/ci-local.sh --only java-fast --only python (java red once, see findings)
  • scripts/ci-local.sh --only java-fast rerun (green)
  • Direct mvn steps for java metadata, render, codegen-base, codegen-spring, maven-plugin EjectContractTest (green)
  • scripts/ci-local.sh --only gates (green)
  • scripts/ci-local.sh --only csharp (green)
✅ **Document** - passed

✅ No issues found.

✅ **Lint** - passed

✅ No issues found.

✅ **Push** - passed

✅ No issues found.

…arked implementedIn

The 13 generic view.* controls (with view.textarea @rows and the view.image
attrs) and object.* @object used to be carved out of the registry manifest as
presentation-only or native-binding vocabulary. They are now in the shared
contract in every port, marked rather than removed:

- implementedIn names the ports that act on an entry so far (["typescript"]
  for the view controls, ["java"] for @object). Every other port registers it,
  loads it strictly and ignores it; an unregistered attr on it still fails.
- ports names the ports a language-specific attr belongs to: @dbSetName
  ["csharp"] and @objectadapter ["java", "kotlin"].

All five ports register the metaobjects-ui-web provider and @object /
@objectadapter, emit implementedIn in their manifests, and byte-match
expected-registry.json. Java and Python gain the ui-web provider and the
spec-reader support for implementedIn; Java's extends-value mapping accepts
a double-valued attr. Three conformance fixtures gate the loading behaviour
(view-kind1-controls, object-kind1-jvm-binding-attrs,
error-kind1-view-unregistered-attr).

meta types marks these entries in its text output and carries implementedIn
and ports in --format json. The json tsOnly field is kept, derived from
implementedIn, and deprecated; it is removed in 1.4.

The metamodel docs, site reference pages and agent-context fixtures are
regenerated, and docs/CONFORMANCE.md and the fixture counts are updated.
…In, tsOnly, counts (454) and carve-out removal. One stale historical sentence in registry README fixed. No unresolved gaps.
@dmealing
dmealing merged commit b349337 into main Nov 11, 2026
9 checks passed
@dmealing
dmealing deleted the fm/mo-workpc-replay-pr2 branch November 11, 2026 19:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant