Skip to content

feat: advise on empty requirement ledger and add requirements to fit assessment - #716

Merged
dmealing merged 7 commits into
mainfrom
fm/mo-requirements-policy-ship
Dec 5, 2026
Merged

dmealing merged 7 commits into
mainfrom
fm/mo-requirements-policy-ship

Conversation

@dmealing

@dmealing dmealing commented Dec 5, 2026

Copy link
Copy Markdown
Member

What Changed

  • meta verify now emits a never-failing WARN_REQUIREMENT_LEDGER_EMPTY advisory in every port (TypeScript, C#, Java, Python, Rust) when a project has writable entities and declares no requirement.* nodes. Setting verify.requirements.missing: off in the project config silences it. Shared requirement-check-conformance fixtures cover the file, library-only, writable-entity, and off cases.
  • The fit-assessment skill now lists requirements as a plan line. Requirements never change the fit verdict, which lifts the 2026-07-12 deferral recorded in the maintainer notes (ADR-0057 updated to match).
  • Shipped agent-context skill references and manifests are regenerated for both changes, and the changelog, CONFORMANCE, CLI, requirements, and Python port docs are updated.
Validation

Risk Assessment

✅ Low: The change adds a warning-only advisory with an off switch, applied consistently across ports and pinned by shared corpus cases; the earlier Java dependency-counting defect is fixed in the current code, and what remains is stale documentation and a Rust flag-scoping note.

Testing

This turn re-ran the Rust publish dry run, which now passes after the stale-overlay failure. The Maven mojo Javadoc was checked by reading only; that is not a live scenario, so it is recorded as untested. Earlier rounds drove intent-1 scenarios live; their evidence paths are not restated here. Intent 2 (fit assessment plan line) was not driven live: no LLM spend approved. Overall result: inconclusive, with no known failure.

  • Live validation: ⚠️ inconclusive - 1 of 3 scenarios driven live against the product
Scenario Result Live Evidence
Rust publish dry run passes after stale-overlay re-run ✅ pass live rust-dry-run.log (exit=0)
Maven requirement-gate Javadoc scopes no-requirements sentence to the ledger ⏸️ untested no Only a static read of MetaDataVerifyMojo.java lines 392-416 was done. It is comment-only, so no live run was performed or claimed. Prior payload did not establish a live result.
Fit assessment plan line lists requirements without changing the verdict ⏸️ untested no Running the fit-assessment skill is metered LLM spend; Doug did not approve it. Operator decided to accept the diff as evidence, which is not a live result.
Evidence: Rust publish dry run log
    Updating crates.io index
warning: crate metaobjects@1.3.1 already exists on crates.io index
warning: crate metaobjects-codegen@1.3.1 already exists on crates.io index
warning: crate metaobjects-render@1.3.1 already exists on crates.io index
warning: crate metaobjects-cli@1.3.1 already exists on crates.io index
   Packaging metaobjects v1.3.1 ({run-worktree}/server/rust/metaobjects)
    Updating crates.io index
    Packaged 115 files, 1.5MiB (371.5KiB compressed)
   Packaging metaobjects-render v1.3.1 ({run-worktree}/server/rust/metaobjects-render)
    Updating crates.io index
    Packaged 29 files, 199.6KiB (54.1KiB compressed)
   Packaging metaobjects-codegen v1.3.1 ({run-worktree}/server/rust/metaobjects-codegen)
    Updating crates.io index
    Packaged 107 files, 3.1MiB (836.3KiB compressed)
   Packaging metaobjects-cli v1.3.1 ({run-worktree}/server/rust/metaobjects-cli)
    Updating crates.io index
    Packaged 146 files, 1.7MiB (395.9KiB compressed)
   Verifying metaobjects v1.3.1 ({run-worktree}/server/rust/metaobjects)
   Compiling metaobjects v1.3.1 ({run-worktree}/server/rust/target/publish-verify/package/metaobjects-1.3.1)
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 4.36s
   Verifying metaobjects-render v1.3.1 ({run-worktree}/server/rust/metaobjects-render)
   Compiling metaobjects-render v1.3.1 ({run-worktree}/server/rust/target/publish-verify/package/metaobjects-render-1.3.1)
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 4.84s
   Verifying metaobjects-codegen v1.3.1 ({run-worktree}/server/rust/metaobjects-codegen)
   Compiling metaobjects v1.3.1
   Compiling metaobjects-render v1.3.1
   Compiling metaobjects-codegen v1.3.1 ({run-worktree}/server/rust/target/publish-verify/package/metaobjects-codegen-1.3.1)
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 12.59s
   Verifying metaobjects-cli v1.3.1 ({run-worktree}/server/rust/metaobjects-cli)
   Compiling metaobjects-cli v1.3.1 ({run-worktree}/server/rust/target/publish-verify/package/metaobjects-cli-1.3.1)
   Compiling metaobjects-codegen v1.3.1
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 15.31s
   Uploading metaobjects v1.3.1 ({run-worktree}/server/rust/metaobjects)
warning: aborting upload due to dry run
   Uploading metaobjects-render v1.3.1 ({run-worktree}/server/rust/metaobjects-render)
warning: aborting upload due to dry run
   Uploading metaobjects-codegen v1.3.1 ({run-worktree}/server/rust/metaobjects-codegen)
warning: aborting upload due to dry run
   Uploading metaobjects-cli v1.3.1 ({run-worktree}/server/rust/metaobjects-cli)
warning: aborting upload due to dry run
  • Outcome: ⚠️ 2 warnings across 3 runs (1h55m16s)

Pipeline

Updates from git push no-mistakes

✅ **Intent** - passed

✅ No issues found.

✅ **Rebase** - passed

✅ No issues found.

📌 **Review** - 9 issues (1 warning, 8 infos) left as notes at the round cap
  • ⚠️ server/typescript/packages/cli/src/lib/requirement-payload.ts:97 - The verify.requirements.missing: off switch is not honored in the requirement payload that the docs-site model explorer embeds. requirementPayload() builds its own scan and does not pass requirementsMissing, so the setting falls back to "warn". Concrete path: .metaobjects/config.json has "libraries": ["iam"] and "verify": { "requirements": { "missing": "off" } }, and the project declares a writable entity. The summary is defined (the library ledger), so meta gen (gen.ts:368) and meta verify --codegen (verify.ts:2010) build the payload. That payload includes a WARN_REQUIREMENT_LEDGER_EMPTY gate row in the generated explorer even though the project turned the advisory off. The main verify path (verify.ts:855) is correct. Fix: add rulesSettings to the collection parameter type and pass requirementsMissing: collection.rulesSettings.requirementsMissing into scanRequirements. Both callers already pass a full Collection.
  • ℹ️ server/java/metadata/src/main/java/com/metaobjects/config/RulesSettings.java:89 - Moved the orphaned Javadoc /** The constant whose wire name is {@code s}, or {@code null}. */ back onto the private parse helper. The new RequirementsMissing enum was inserted between that comment and parse, which left two stacked doc comments on the enum.
  • ℹ️ spec/decisions/ADR-0057-requirement-checks-and-tests-in-every-port.md:199 - Corrected ADR-0057 Amendment 1, clause 2. It said "the summary stays null", but the ledger-empty-library-only case pins the advisory beside a non-null summary when a library ledger is loaded. The clause now reads: the advisory "adds nothing to the summary, which stays null unless a library's or a dependency's ledger is loaded".

🔧 Fix applied.
10 issues (2 warnings, 8 infos) still open:

  • ℹ️ server/java/metadata/src/main/java/com/metaobjects/config/RulesSettings.java:89 - Moved the orphaned Javadoc /** The constant whose wire name is {@code s}, or {@code null}. */ back onto the private parse helper. The new RequirementsMissing enum was inserted between that comment and parse, which left two stacked doc comments on the enum.
  • ℹ️ spec/decisions/ADR-0057-requirement-checks-and-tests-in-every-port.md:199 - Corrected ADR-0057 Amendment 1, clause 2. It said "the summary stays null", but the ledger-empty-library-only case pins the advisory beside a non-null summary when a library ledger is loaded. The clause now reads: the advisory "adds nothing to the summary, which stays null unless a library's or a dependency's ledger is loaded".
  • ⚠️ server/java/metadata/src/main/java/com/metaobjects/requirement/RequirementCheck.java:260 - Java and Kotlin count a metadata dependency's entities in writableProjectEntities. It loops over coverableEntities(root) (line 240), which has no import filter, and only skips shipped library packages. TypeScript (collection.inCoverage), Python (collection.in_scope), C# (ImportScope.InScope) and Rust (collection.in_scope) all leave dependency entities out. Concrete case: a Maven project depends on a shared model with a writable Account entity, declares no writable entity or requirement of its own, and runs metaobjects:verify. It gets WARN_REQUIREMENT_LEDGER_EMPTY counting 1 entity, while the other ports say nothing; with one own entity it reports 2 instead of 1. This contradicts ADR-0057 Amendment 1, docs/features/requirements.md and the changelog ("a dependency's entities do not count"). No ledger-empty-* corpus case loads a dependency, so conformance does not catch it. Fix in writableProjectEntities: if (!root.getDependencySet().inScope(ent.getName())) continue;, with a Java test that loads a dependency. The object-coverage loop at line 425 uses the same unfiltered list, but that predates this change.
  • ℹ️ docs/ports/python.md:628 - Some text still states the old promise that a model with no requirement sees no change, which is now false when the model has a writable entity. Sites: docs/ports/python.md:628 ("A model with no requirement sees no change"); server/csharp/MetaObjects.Cli/Program.cs:654 ("sees no line and no exit-code change"); spec/roadmap.md:252 ("gets no diagnostics and no generated output", in a dated 2026-08-12 entry, so annotate it only if that history is meant to stay current). These files are outside this change's file list, so they were not edited inline.
  • ℹ️ server/typescript/packages/cli/src/commands/verify.ts:526 - Corrected a comment that said a model with no requirement nodes is silent. It now says such a model gets at most the absent-ledger advisory.
  • ℹ️ server/csharp/MetaObjects.Cli/VerifyCommand.cs:300 - Corrected the RunRequirementGate doc comment, which said no line is printed for a model with no requirement. It now names the absent-ledger advisory.
  • ℹ️ server/java/maven-plugin/src/main/java/com/metaobjects/mojo/MetaDataVerifyMojo.java:396 - Corrected the runRequirementGate Javadoc, which said nothing is logged for a model with no requirement. It now names the absent-ledger advisory.
  • ℹ️ server/java/metadata/src/main/java/com/metaobjects/requirement/RequirementCheck.java:275 - Corrected the check Javadoc from "No requirements: no diagnostics" to "at most the absent-ledger advisory".
  • ℹ️ server/csharp/MetaObjects/Core/Requirement/RequirementCheck.cs:347 - Corrected the Check doc comment from "No requirements: no diagnostics" to "at most the absent-ledger advisory".
  • ⚠️ server/java/maven-plugin/src/main/java/com/metaobjects/mojo/MetaDataVerifyMojo.java:396 - The rewritten runRequirementGate Javadoc is still inaccurate. It says a model with no requirement.* node "logs at most the absent-ledger advisory". The method returns runRequirementLedger(loader) + runRulesGate(loader). A model with no requirements but with declared operations or lifecycles also logs the rules summary line and its diagnostics, and a bad project config logs an error from runRulesGate. Scope the sentence to the requirement half, for example: "For a model that declares no {@code requirement.*} node, the requirement ledger logs at most the absent-ledger advisory; the business-rules gate run here reports separately." Comment-only change.

🔧 Fix applied.
📌 Review round cap reached: 9 issues (1 warning, 8 infos) left unresolved as notes (no further fix round):

  • ℹ️ server/java/metadata/src/main/java/com/metaobjects/config/RulesSettings.java:89 - Moved the orphaned Javadoc /** The constant whose wire name is {@code s}, or {@code null}. */ back onto the private parse helper. The new RequirementsMissing enum was inserted between that comment and parse, which left two stacked doc comments on the enum.
  • ℹ️ spec/decisions/ADR-0057-requirement-checks-and-tests-in-every-port.md:199 - Corrected ADR-0057 Amendment 1, clause 2. It said "the summary stays null", but the ledger-empty-library-only case pins the advisory beside a non-null summary when a library ledger is loaded. The clause now reads: the advisory "adds nothing to the summary, which stays null unless a library's or a dependency's ledger is loaded".
  • ℹ️ server/typescript/packages/cli/src/commands/verify.ts:526 - Corrected a comment that said a model with no requirement nodes is silent. It now says such a model gets at most the absent-ledger advisory.
  • ℹ️ server/csharp/MetaObjects.Cli/VerifyCommand.cs:300 - Corrected the RunRequirementGate doc comment, which said no line is printed for a model with no requirement. It now names the absent-ledger advisory.
  • ℹ️ server/java/maven-plugin/src/main/java/com/metaobjects/mojo/MetaDataVerifyMojo.java:396 - Corrected the runRequirementGate Javadoc, which said nothing is logged for a model with no requirement. It now names the absent-ledger advisory.
  • ℹ️ server/java/metadata/src/main/java/com/metaobjects/requirement/RequirementCheck.java:275 - Corrected the check Javadoc from "No requirements: no diagnostics" to "at most the absent-ledger advisory".
  • ℹ️ server/csharp/MetaObjects/Core/Requirement/RequirementCheck.cs:347 - Corrected the Check doc comment from "No requirements: no diagnostics" to "at most the absent-ledger advisory".
  • ⚠️ README.md:278 - The front-page README still says "A project that declares no requirement.* nodes sees no change at all". That is now false: with one writable entity, every verify prints WARN_REQUIREMENT_LEDGER_EMPTY (ADR-0057 Amendment 1). The round 2 fix for review-4 corrected docs/ports/python.md, Program.cs and spec/roadmap.md but left these siblings: docs/features/extending-with-providers.md:149 (requirements row: "nothing — verify is silent", under the line 140 claim that an undeclared concern "diagnoses nothing"), and server/python/src/metaobjects/meta/core/requirement/requirements_provider.py:7 ("one that declares none sees nothing"). Reword each to say such a project gets at most the never-failing absent-ledger advisory, with its off switch. Text only.
  • ℹ️ server/rust/metaobjects-cli/src/lib.rs:778 - Rust prints the absent-ledger advisory only on a bare cargo meta verify: it sits inside if rules, so verify --codegen and verify --templates stay silent. The other ports run the requirement gate whichever gates are selected, while docs/features/requirements.md says "on every verify run, in every port". This follows Rust's existing rules-gate convention (a named flag runs that gate alone, as docs/features/cli.md states), so no change is needed unless the advisory should appear on gate-specific runs too.
⚠️ **Test** - 2 warnings
  • 🚨 configured test command failed with exit code 1
  • ⚠️ server/typescript - Full regression suite (bun test in server/typescript) did not finish within ~50 min; result unknown. Re-run in a longer or sharded lane before merge.
  • ⚠️ agent-context/skills/metaobjects-fit-assessment/SKILL.md - Fit-assessment requirement plan-line change (intent 2) not live-verifiable without LLM spend approval; needs Doug's approval for a skill run or a deterministic check.
  • ⚠️ live validation verdict: inconclusive (2 of 3 scenarios were driven live against the product); untested: Fit assessment covers requirements as a plan line only, never a verdict factor
  • Live validation: ⚠️ inconclusive - 2 of 3 scenarios driven live against the product
Scenario Result Live Evidence
TS meta verify advises a project with a writable entity and no requirement.* nodes (WARN_REQUIREMENT_LEDGER_EMPTY, never fails) ✅ pass live verify output in evidence verify-writable-no-requirements.log: advisory line present, exitCode 0
verify.requirements.missing: off silences the advisory ✅ pass live evidence verify-missing-off.log: no WARN_REQUIREMENT_LEDGER_EMPTY, exit 0
Fit assessment covers requirements as a plan line only, never a verdict factor ⏸️ untested no Skill is an LLM-run prompt; running it spends metered LLM money that needs Doug's approval with a dollar figure. Deterministic check not available in repo.
  • scripts/ci-local.sh --affected --strict-toolchains
  • Disposable project in scratch: one writable entity (source.rdb @table customers), no requirement nodes; bun server/typescript/packages/cli/bin/meta.ts verify -> WARN_REQUIREMENT_LEDGER_EMPTY '1 writable entity...', exitCode 0
  • Same project with .metaobjects/config.json verify.requirements.missing=off -> no advisory, exit 0
  • bun test scoped: test/requirement-check-conformance.test.ts, test/gen-requirement-advisories.test.ts, test/requirements-pack-left-out.test.ts, test/verify-bare-default-gates.test.ts -> 67 pass, 0 fail
  • Full regression: bun test in server/typescript -> did not complete in ~50 min; process group stopped; no result
  • Not run: Java/Kotlin/Python/C# ports (advisory in every port per intent; Java dependency-entity fix review-1 untested live); scripts/ci-local.sh --affected (failed on base too)
  • Not driven: fit-assessment skill (agent-context/skills/metaobjects-fit-assessment/SKILL.md P5-c wording) - LLM prompt, needs spend approval

🔧 Fix applied.
4 issues (1 error, 3 warnings) still open:

  • 🚨 configured test command failed with exit code 1
  • ⚠️ agent-context/skills/metaobjects-fit-assessment/SKILL.md - Fit-assessment plan-line change (intent 2) untested live: running the skill costs LLM spend not approved. Evidence is the diff only; verdict scoring untouched. Needs Doug's approval for a skill run or a deterministic check.
  • ⚠️ server/java/maven-plugin/src/main/java/com/metaobjects/mojo/MetaDataVerifyMojo.java:396 - Review-10 (MetaDataVerifyMojo.java runRequirementGate Javadoc) still inaccurate; comment-only fix awaiting decision.
  • ⚠️ live validation verdict: inconclusive (3 of 4 scenarios were driven live against the product); untested: Fit assessment covers requirements as a plan line only, not verdict
  • Live validation: ⚠️ inconclusive - 3 of 4 scenarios driven live against the product
Scenario Result Live Evidence
Writable-entity project with no requirement.* gets one WARN_REQUIREMENT_LEDGER_EMPTY from meta verify (TS CLI, synthetic fixture) ✅ pass live bun server/typescript/packages/cli/bin/meta.ts verify in disposable project; stderr shows WARN_REQUIREMENT_LEDGER_EMPTY '2 writable entities'; exit 0
verify.requirements.missing: off silences the advisory ✅ pass live same project with off in .metaobjects/config.json; no LEDGER line; exit 0
Adversarial: project with only a sourceless entity gets no advisory ✅ pass live Draft-only model; no LEDGER output; exit 0
Fit assessment covers requirements as a plan line only, not verdict ⏸️ untested no Running the skill is LLM spend that Doug has not approved; no deterministic live path for a prompt-text change.
  • scripts/ci-local.sh --affected --strict-toolchains
  • cd server/typescript && bun test packages/cli (2312 pass, 0 fail, 12 skip)
  • bun server/typescript/packages/cli/bin/meta.ts verify on disposable project with writable entity (fixtures/requirement-check-conformance/ledger-empty-writable-entities input): default emits WARN_REQUIREMENT_LEDGER_EMPTY (2 writable entities), exit 0
  • Same project with verify.requirements.missing=off: advisory absent, exit 0
  • Adversarial: model with only a sourceless entity (Draft): no advisory, exit 0

🔧 Fix applied.
2 warnings still open:

  • ⚠️ agent-context/skills/metaobjects-fit-assessment/SKILL.md - Intent 2 (fit assessment covers requirements as a plan line only) is not live-driven: running the skill costs LLM spend that was not approved. Evidence is the diff only. Needs Doug's approval for a skill run or a deterministic check.
  • ⚠️ live validation verdict: inconclusive (1 of 3 scenarios were driven live against the product); untested: Maven requirement-gate Javadoc scopes no-requirements sentence to the ledger, Fit assessment plan line lists requirements without changing the verdict
  • Live validation: ⚠️ inconclusive - 1 of 3 scenarios driven live against the product
Scenario Result Live Evidence
Rust publish dry run passes after stale-overlay re-run ✅ pass live rust-dry-run.log (exit=0)
Maven requirement-gate Javadoc scopes no-requirements sentence to the ledger ⏸️ untested no Only a static read of MetaDataVerifyMojo.java lines 392-416 was done. It is comment-only, so no live run was performed or claimed. Prior payload did not establish a live result.
Fit assessment plan line lists requirements without changing the verdict ⏸️ untested no Running the fit-assessment skill is metered LLM spend; Doug did not approve it. Operator decided to accept the diff as evidence, which is not a live result.
  • scripts/ci-local.sh --affected --strict-toolchains
  • scripts/rust-publish-dry-run.sh re-run in the worktree, exit 0 (log at evidence dir rust-dry-run.log)
  • Read server/java/maven-plugin/src/main/java/com/metaobjects/mojo/MetaDataVerifyMojo.java lines 392-416 and grep of requirement-gate comments (static reading only, not live)
  • No source or test files changed in this turn, so broad regression was not re-run; the configured scripts/ci-local.sh --affected --strict-toolchains run passed at this target commit per the baseline
✅ **Document** - passed

✅ No issues found.

✅ **Lint** - passed

✅ No issues found.

✅ **Push** - passed

✅ No issues found.

…ents; fit assessment plans a requirement per hand-written surface

- WARN_REQUIREMENT_LEDGER_EMPTY in every port's verify (TS, Python, Java/Kotlin, C#, and
  Rust's cargo meta verify): never fails a build; off with
  "verify": { "requirements": { "missing": "off" } } in .metaobjects/config.json.
  An empty ledger, a library's or a dependency's counts as none. Four ledger-empty-*
  cases in requirement-check-conformance; options.json takes the verify block.
- ADR-0057 Amendment 1 records the reversal of "no requirements sees no change at all".
- metaobjects-fit-assessment: P5-c plan line (requirement + test per stays-hand-written
  surface), requirement-plan JSON claim, never a verdict factor; the 2026-07-12 deferral
  is recorded as lifted.
- Docs, changelog fragments, regenerated shipped agent context and conformance fixtures.
@dmealing
dmealing merged commit 73a96c9 into main Dec 5, 2026
11 checks passed
@dmealing
dmealing deleted the fm/mo-requirements-policy-ship branch December 5, 2026 23:56
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