Repository navigation
feat(metadata): add business-rules operations and lifecycles - #610
Merged
Merged
Conversation
…(ADR-0063, ADR-0064) Operations, permission points and lifecycles become declarable beside the entities, in all five ports, checked when they load and by verify. Nothing is generated from them yet: a model with this vocabulary generates exactly the code the same model generates without it. Vocabulary (expected-registry.json, metamodelVersion stays 1.3): - api.operational, operation.command, operation.query, binding.rest, with the base subtypes not authorable (ADR-0054). - @inputRef, @outputRef, @many (query only), @objectref, @transitions, @Permission, @public, @errors on operations; @method, @path on bindings. - transition.action as a child of field.enum, with @from, @to, @condition, @Permission, @public; transition.timed reserved. Loader rules L1-L7, P1, O0-O5 and B1 raise ten new codes in every port, pinned by fixtures/conformance (error-rules-*, rules-*). Java's addChild now carries ERR_CHILD_NOT_ALLOWED on the refusal it already made, as the other ports do. verify runs a rules gate in every port, held to the new fixtures/rules-check-conformance corpus (13 cases): unreachable states, an initial state that is terminal, unreachable transitions and derived permission names. It reads rules.permissions.names, rules.lifecycle.create, rules.lifecycle.commands and verify.lifecycle.unreachable from config.json; every absent key behaves as before, and a mistake is refused. A requirement's implementedBy can name an operation or a transition, and the generated requirement test carries its unit. Docs: ADR-0063, ADR-0064, ADR-0045 Amendment 1, the compatibility policy, docs/features/business-rules.md, CONFORMANCE.md, the requirements ledger and the CHANGELOG [Unreleased] entry.
…oles (ADR-0063) The independent check of the business-rules vocabulary found it would publish as covered metamodel with holes a lifecycle could fall through. This change labels it experimental and fixes what the check ran into, in all five ports. Experimental: the compatibility policy, the CHANGELOG entry, docs/features/business-rules.md, ADR-0063, ADR-0064 and the registry descriptions say the shape may change in a MINOR, including removals and renames, until generated services run on it in an adopter estate. Lifecycles: - A transition belongs to the entity that declares its field and to the entities extending it, never to one whose field merely extends the lifecycle field (a status history table has no lifecycle). - An inheritor that redeclares a lifecycle field without extending it is refused with the new ERR_LIFECYCLE_REDECLARED (L10). - An empty @from (L8) and an array lifecycle field (L9) are refused. Names and operations: - Transition and operation names compare without case: reserved names in any case (L5, O0), two transitions of one entity (L6) and two operations of one API (O6). - An @errors code may not be one the route answers itself (O5). - Two declared bindings of one API may not share a method and path (B2). - An input derives a target only when it borrows each key field of exactly one entity exactly once; part of a composite key or one key borrowed twice derives nothing (O2). verify: - Claims are keyed by transition node, so a command whose target is an abstract base claims each child's inherited transition. - New WARN_TRANSITION_PERMISSION_SHADOWED for a transition @Permission or @public that no derived command reads. The shadowed permission is dropped from the purchase-request fixtures and the docs example. Ports: C# anchors the @errors pattern with \z; Java checks @method before the O1-O3 short-circuit and refuses "rules": null and "verify": null. rules.lifecycle.create is documented as having no effect yet. ADR-0063 records, per remaining case, why it loads: route collisions involving a derived path are the transport generator's to refuse, and a duplicated operation or API merges under the loader's general rule (pinned by a requirement-check case). Fixtures: 11 new fixtures/conformance cases (553), 2 new rules-check cases (15), 1 new requirement-check case (49).
… lifecycles (ADR-0063) The captain's rulings on the independent check's two held calls, in all five ports. Permission names (call 1): - A derived permission name includes its owner. A transition's derived command asks about <package>.<Entity>.<transition>, so Order.cancel and Invoice.cancel no longer share a grant. A declared operation keeps <package>.<operation>. - Operation names are unique per package across its APIs (O6, was per API). One operation declared identically in two APIs is the same operation and is not refused, so a versioned API can sit beside its successor (ADR-0064 §2). An identical declaration has the same name, subtype, referenced shapes, transitions, errors, permission, public and many; the bindings may differ. - A @Permission must be a dotted identifier path (new rule P2, ERR_BAD_ATTR_VALUE). A package prefix may use "::", so a derived name can be declared as it is. Sourceless lifecycles (call 2): - A lifecycle on an entity with no source loads and is inert, like everything else on a sourceless entity (#248). L2 now applies only once the entity has a source, declared or inherited, and none of them is writable. verify checks the lifecycle's states and skips its permission points. A library's core layer can declare its lifecycles. Fixtures: - error-rules-lifecycle-no-source becomes the positive rules-lifecycle-no-source. - New loader cases: error-rules-lifecycle-readonly-source, error-rules-operation-name-across-apis, error-rules-permission-shape, rules-operation-name-two-packages, rules-operation-versioned-apis (fixtures/conformance: 558). - New rules-check case: sourceless-lifecycle-inert (16). Four rules-check expectations now name the owner-qualified derived name. Java runs its rules pass before the primary-source pass, as the other ports do, so a lifecycle on a read-only-sourced entity reports L2 and then the source error in the same order everywhere. ADR text from the issues #570-576 design pass (#572): ADR-0064 §4 states that every write operation runs in one transaction with its hooks (load and lock the row, before hook, validate and stamp, write, after hook, write-event hook), that stores without interactive transactions refuse hooks, and that CRUD hooks run inside the operation's transaction; ADR-0063 §7 names the package's write-event hook. These settings and ERR_STORE_NO_INTERACTIVE_TX are designed, not implemented: nothing in 1.3.0 reads them.
…rules-core-vocab Union-resolves the config readers in all five ports: the ADR-0063 rules and verify.lifecycle settings sit beside main's api block. Main's init now writes verify.handEdits, so every port's verify reader accepts and validates it beside verify.lifecycle, and the TypeScript schema folds the two verify blocks into one.
Both sides added a conformance corpus (rules-check, foreign-key-index), so the stated total is 41; the site payload is regenerated from the merged tree.
… changelog) into fm/mo-rules-core-vocab Main took ADR-0063, ADR-0064 and ADR-0065, so the business-rules ADR is now ADR-0066 and the layering and service-seam ADR is ADR-0067; every reference this branch added is renumbered. Counts: 574 metamodel fixtures, 43 corpora, 157 expected requirement warnings. The requirement harness and the site payload are regenerated.
…rt (ADR-0066) The Rust preview port registers api.*, operation.*, binding.* and transition.* and runs the same loader rules as the other five ports, with the same messages. It stays byte-identical on registry-conformance and passes the whole metamodel corpus (574 of 574, ledger empty; minPassing raised from 526). - providers: the api and transition families, and api as a root child. - loader: @inputRef and @outputRef are reference-bearing, except on a transition. - validate/rules.rs: the rules pass (L1 to L10, P1, P2, O0 to O6, B1, B2), run after reporting as the reference does. - config: the rules block and verify.lifecycle.unreachable are read and validated strictly. - codegen: a rules_inert test holds the entity generator to byte-identical output with and without the vocabulary. Rust has no verify, so the rules gate does not run there; the docs say so. Also fixes a Python verify-rules test that compared gen output as well as verify output, which differs once an unchanged run skips (ADR-0064).
…n the same-operation check Two operations of one package that both carry a list or map where a name belongs are not the same operation in the TypeScript reference, which compares such values by identity. The Rust port compared them by value and so skipped the name-collision error (O6) for that already-broken model.
…r widening The declared-function check accepts Postgres's implicit numeric widening, so an integer argument onto a bigint parameter is no longer a finding. The live-Postgres test still asserted that it was, and has failed on main since that change. It now pins the widened call as clean and uses a text parameter for the unrelated-type case.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What Changed
api.operationalwithoperation.commandandoperation.query, an optionalbinding.rest, andtransition.actionas a child offield.enum. States, the initial and terminal states, and each transition's derived command need no extra vocabulary. The loader refuses malformed operations and lifecycles with eleven newERR_*codes, each pinned by afixtures/conformance/error-rules-*case. The shape may still change in a MINOR until generated services run on it.verifyin every port except the Rust preview (unreachable states, transitions that can never fire, unused permissions) and four settings in.metaobjects/config.json(rules.permissions.names,rules.lifecycle.commands,rules.lifecycle.create,verify.lifecycle.unreachable). Derived permission names include the owning package and entity, so two entities'canceltransitions never share a grant. A lifecycle on an entity with no source loads and is inert.Validation
Risk Assessment
✅ Low: The files I read (C# and Python
RulesCheck, the Java header, and the Rust loader and provider diffs) match the TS reference on checks, messages and the no-source-inert rule, and I found no behavioural defect; I did not read most listed fixture and test files for content.Testing
Drove the real
metaCLI against a disposable scratch project under {tmp-dir}, built from the rules-check and conformance fixtures, and removed it afterwards. Three scenarios, all live with pass results: advise-mode verify emits the three derived-name warnings with owner-qualified names (acme::purchasing.PurchaseRequest.submit, acme::purchasing.decide, acme::purchasing.requestSummary), matching the fixture's expected.json; require-mode verify turns them into errors and exits 1; loader refuses a lifecycle on a read-only source with ERR_TRANSITION_NOT_ON_ENTITY and exits 1. The sourceless-lifecycle-inert case was not driven here (scenario cap of three); it is covered by the baseline rules-check conformance run. Spec and generated-doc wording changes are documentation only and were checked by the baseline run, not live. Overall: pass, no findings.Evidence: Advise-mode verify output (3 derived-name warnings, owner-qualified)
Evidence: Require-mode verify output (same findings as errors, exit 1)
Evidence: Loader refusal of lifecycle on read-only source (ERR_TRANSITION_NOT_ON_ENTITY)
Pipeline
Validated in one no-mistakes run, with five review fix rounds inside it.
Updates from git push no-mistakes
✅ **Intent** - passed
✅ No issues found.
✅ **Rebase** - passed
✅ No issues found.
server/python/src/metaobjects/loader/validate_rules.py:44- Module docstring rule O5 omits the reserved-code check the code enforces. The code rejects reserved @errors codes via _RESERVED_CODES, and the spec, TS, C# and Java headers all list it. Add ", or is one the route answers itself" to O5.server/java/metadata/src/main/java/com/metaobjects/api/Lifecycles.java:286- JavaprojectionBaseEntitydedupes entity owners withowners.contains(ext.owner()), which callsMetaData.equals. That method compareschildren, type, subType and name structurally (MetaData.java:1977). The TypeScript, C# and Python references and Java's ownborrowedKeyEntitiescompare by identity. Trace: a projection whose fields extenda::Customer.xandb::Customer.y, where the two entities are structurally equal, collapses to one owner. The method then returns that entity instead of null, so a projection base that should be ambiguous derives a target. This is a wrong-value-without-error path, andequalsis also a deep recursive comparison on every call. Fix: use the existingcontainsIdentity(owners, ext.owner()). Same invariant: no othercontainson MetaData in this file;entityLineageandlifecycleTransitionsOfalready usecontainsIdentity.server/typescript/packages/sdk/src/config.ts:413-rules.lifecycle.create(initial|any) is registered, validated and carried in all ports' config readers. The config.ts doc comment says it "is validated and has no effect yet, since no service shell reads it". The stated intent (Q1, Q2, Q5, the layering ruling, the two 2026-11-13 rulings) lists no such setting. Nothing in this change reads it, andfixtures/rules-check-conformance/lifecycle-create-anyonly checks that it parses. It is a config key that promises behavior nobody enforces. Smallest honest remedy: remove the key fromRULES_LIFECYCLE_CREATEand therules.lifecycle.createreader in every port, and add it back when a shell reads it. The remedy changes the config contract and the fixtures, so it needs authorization. Sites: server/typescript/packages/sdk/src/config.ts:413, server/typescript/packages/metadata/src/rules-settings.ts, server/python/src/metaobjects/rules_settings.py (RULES_LIFECYCLE_CREATE), server/python/src/metaobjects/config/neutral_config.py (_RULES_BLOCKS), server/csharp/MetaObjects/Config/NeutralConfig.cs (ReadRulescreate), server/java/metadata/src/main/java/com/metaobjects/config/NeutralConfig.java, fixtures/rules-check-conformance/lifecycle-create-any.🔧 Fix applied.
2 issues (1 warning, 1 info) still open:
server/typescript/packages/sdk/src/config.ts:413-rules.lifecycle.create(initial|any) is registered, validated and carried in all ports' config readers. The config.ts doc comment says it "is validated and has no effect yet, since no service shell reads it". The stated intent (Q1, Q2, Q5, the layering ruling, the two 2026-11-13 rulings) lists no such setting. Nothing in this change reads it, andfixtures/rules-check-conformance/lifecycle-create-anyonly checks that it parses. It is a config key that promises behavior nobody enforces. Smallest honest remedy: remove the key fromRULES_LIFECYCLE_CREATEand therules.lifecycle.createreader in every port, and add it back when a shell reads it. The remedy changes the config contract and the fixtures, so it needs authorization. Sites: server/typescript/packages/sdk/src/config.ts:413, server/typescript/packages/metadata/src/rules-settings.ts, server/python/src/metaobjects/rules_settings.py (RULES_LIFECYCLE_CREATE), server/python/src/metaobjects/config/neutral_config.py (_RULES_BLOCKS), server/csharp/MetaObjects/Config/NeutralConfig.cs (ReadRulescreate), server/java/metadata/src/main/java/com/metaobjects/config/NeutralConfig.java, fixtures/rules-check-conformance/lifecycle-create-any.spec/metamodel/api.json:65- Thebinding.restdescription says "(settingapi.operationPathschooses the:verbstyle)". No port registers or reads that setting. The TS config schema (server/typescript/packages/sdk/src/config.ts,apiis a strictObject allowing onlypaginationandunknownFields) would reject it as an unknown key. The CHANGELOG lists the four new settings asrules.permissions.names,rules.lifecycle.commands,rules.lifecycle.createandverify.lifecycle.unreachable, andapi.operationPathsis not among them. An adopter who follows the generated reference docs gets a config error. Remove the parenthetical, or add the setting in every port's config reader. Same text, so also fix: server/csharp/MetaObjects/SpecMetamodel/api.json:65, server/python/src/metaobjects/spec_metamodel/api.json:65, server/typescript/packages/metadata/src/core/api/api-definition.embedded.ts:145, fixtures/registry-conformance/expected-registry.json:115, fixtures/metamodel-docs/expected/types/binding.md:27, fixtures/metamodel-docs/expected/INDEX.md:32, site-reference/types/binding.html and site-reference/index.html.🔧 Fix applied.
2 issues (1 warning, 1 info) still open:
server/typescript/packages/sdk/src/config.ts:413-rules.lifecycle.create(initial|any) is registered, validated and carried in all ports' config readers. The config.ts doc comment says it "is validated and has no effect yet, since no service shell reads it". The stated intent (Q1, Q2, Q5, the layering ruling, the two 2026-11-13 rulings) lists no such setting. Nothing in this change reads it, andfixtures/rules-check-conformance/lifecycle-create-anyonly checks that it parses. It is a config key that promises behavior nobody enforces. Smallest honest remedy: remove the key fromRULES_LIFECYCLE_CREATEand therules.lifecycle.createreader in every port, and add it back when a shell reads it. The remedy changes the config contract and the fixtures, so it needs authorization. Sites: server/typescript/packages/sdk/src/config.ts:413, server/typescript/packages/metadata/src/rules-settings.ts, server/python/src/metaobjects/rules_settings.py (RULES_LIFECYCLE_CREATE), server/python/src/metaobjects/config/neutral_config.py (_RULES_BLOCKS), server/csharp/MetaObjects/Config/NeutralConfig.cs (ReadRulescreate), server/java/metadata/src/main/java/com/metaobjects/config/NeutralConfig.java, fixtures/rules-check-conformance/lifecycle-create-any.fixtures/metamodel-docs/expected/types/operation.md- The@permissiondescription onoperation.basecontradicts itself. It says the permission is "never derived from the operation's name: a rename would silently move access", then says that when@permissionis absent "the shell uses the derived name<package>.<operation>". The 2026-11-13 ruling,docs/features/business-rules.mdand theWARN_PERMISSION_DERIVED_NAMEmessage all say it IS derived and thatverifyadvises or requires an explicit one. A reader of the generated reference gets two opposite statements. Reword the first sentence, for example "an explicit name is a stable key into grant data: a derived name moves when the operation is renamed". The same text sits in every copy of the registry description: spec/metamodel/api.json, server/csharp/MetaObjects/SpecMetamodel/api.json, server/python/src/metaobjects/spec_metamodel/api.json, server/typescript/packages/metadata/src/core/api/api-definition.embedded.ts, fixtures/registry-conformance/expected-registry.json, fixtures/metamodel-docs/expected/types/operation.md and site-reference/types/operation.html. Fix the spec once and regenerate the ports' copies and the two generated pages.🔧 Fix applied.
7 issues (2 warnings, 5 infos) still open:
server/typescript/packages/sdk/src/config.ts:413-rules.lifecycle.create(initial|any) is registered, validated and carried in all ports' config readers. The config.ts doc comment says it "is validated and has no effect yet, since no service shell reads it". The stated intent (Q1, Q2, Q5, the layering ruling, the two 2026-11-13 rulings) lists no such setting. Nothing in this change reads it, andfixtures/rules-check-conformance/lifecycle-create-anyonly checks that it parses. It is a config key that promises behavior nobody enforces. Smallest honest remedy: remove the key fromRULES_LIFECYCLE_CREATEand therules.lifecycle.createreader in every port, and add it back when a shell reads it. The remedy changes the config contract and the fixtures, so it needs authorization. Sites: server/typescript/packages/sdk/src/config.ts:413, server/typescript/packages/metadata/src/rules-settings.ts, server/python/src/metaobjects/rules_settings.py (RULES_LIFECYCLE_CREATE), server/python/src/metaobjects/config/neutral_config.py (_RULES_BLOCKS), server/csharp/MetaObjects/Config/NeutralConfig.cs (ReadRulescreate), server/java/metadata/src/main/java/com/metaobjects/config/NeutralConfig.java, fixtures/rules-check-conformance/lifecycle-create-any.spec/metamodel/api.json- Several registry descriptions of the new vocabulary describe the generated service shell in the present tense as if it shipped: operation.command ("the generated shell around it loads the row, checks the permission and the current state, runs the body, and makes the guarded update in one transaction"), operation @Permission ("the permission name the generated shell asks the project's policy about", "the shell uses the derived name"), operation @public ("The shell calls no permission check"), operation.command @errors ("the shell refuses an undeclared one"), and in spec/metamodel/transition.json transition @Permission and @public ("the derived command ... asks the policy", "the derived command calls no permission check") and transition.action ("Each transition becomes a guarded update ..., its own command ..., its own permission point and its own wire error"). No shell or derived command is generated in this change: ADR-0066 and docs/features/business-rules.md say nothing is generated from this vocabulary yet. A reader of the generated reference is told behaviour exists that does not. Reword each to state the contract the shell will honour and that no shell is generated yet; sweep both description sets for any other claim of shipped behaviour that is not shipped. Same text sits in every copy of the registry description (each port's embedded or copied metamodel, fixtures/registry-conformance/expected-registry.json, fixtures/metamodel-docs/expected, site-reference); fix the spec once, carry it to every copy byte-identically, and regenerate the generated pages.metaobjects/meta.requirements.yaml:1348- ThetransitionActionrequirement says a transition sits "on a field of an entity with a writable source". The 2026-11-13 ruling, ADR-0066 §2 and rule L2 say an entity with no source at all is allowed: its lifecycle loads and is inert. Only a read-only source (a concrete entity with a source that is not writable) is refused with ERR_TRANSITION_NOT_ON_ENTITY. The ledger statement overstates the rule. Reword to say a lifecycle on an entity with a source needs a writable one, and a sourceless entity's lifecycle is inert.server/csharp/MetaObjects/Loader/ValidationPasses.Rules.cs:11- Header comment says an operation failing O2 or O3 "is not checked for O4 or O5". The code skips O4 and B1 (it returns before them) and checks O5 first. The TS reference and the Rust header both say "O4 or B1". Change "O5" to "B1".spec/metamodel/api.json:20- Theapi.operationalrulestext says "Two declared bindings may not share a method and path (ERR_BINDING_PATH_MISMATCH)" with no scope. The check is per API:checkApiRoutes(ops, sink)runs inside the per-API loop inserver/typescript/packages/metadata/src/loader/rules-validation.ts(around line 376), and the rule header, thebinding.rest@pathdescription and the ERROR-CODES entry all say "of one API". The versioned-APIs case (v1andv2declaring the same route) is legal, andapi.operationalitself says versioned APIs may declare the same operation side by side. A reader of the generated reference could conclude that two APIs cannot share a route. Add "of one API" to the sentence. The same text sits in server/csharp/MetaObjects/SpecMetamodel/api.json, server/python/src/metaobjects/spec_metamodel/api.json, server/typescript/packages/metadata/src/core/api/api-definition.embedded.ts, fixtures/registry-conformance/expected-registry.json, fixtures/metamodel-docs/expected/types/api.md, fixtures/metamodel-docs/expected/INDEX.md and site-reference/types/api.html. Edit the spec once, copy it to each port, and regenerate the two generated pages.fixtures/codegen-noop/rules/README.md:10- README says thewith/model "is the positive conformance fixturefixtures/conformance/rules-purchase-request/". The two are not the same:with/meta.purchasing.jsonputs@permission: purchasing.reviewon therejecttransition, and the conformance input does not. The pair is also described as differing "ONLY by the business-rules vocabulary", which holds, but the copy claim is wrong. Reword to "derived from" or drop the claim. The inert tests do not depend on the two files being identical, so this is documentation only.server/java/codegen-kotlin/src/test/kotlin/com/metaobjects/generator/kotlin/RulesInertTest.kt:112- The doc comment onapiDocssays "A served report has a generated API to document (its row, table, list route and allowlist); a sourceless one has none.". It was copied from the reporting inert test and does not describe this fixture, which has no report. Replace it with a comment about the api-docs surface of the with/without model pair.🔧 Fix applied.
3 issues (2 warnings, 1 info) still open:
server/typescript/packages/sdk/src/config.ts:413-rules.lifecycle.create(initial|any) is registered, validated and carried in all ports' config readers. The config.ts doc comment says it "is validated and has no effect yet, since no service shell reads it". The stated intent (Q1, Q2, Q5, the layering ruling, the two 2026-11-13 rulings) lists no such setting. Nothing in this change reads it, andfixtures/rules-check-conformance/lifecycle-create-anyonly checks that it parses. It is a config key that promises behavior nobody enforces. Smallest honest remedy: remove the key fromRULES_LIFECYCLE_CREATEand therules.lifecycle.createreader in every port, and add it back when a shell reads it. The remedy changes the config contract and the fixtures, so it needs authorization. Sites: server/typescript/packages/sdk/src/config.ts:413, server/typescript/packages/metadata/src/rules-settings.ts, server/python/src/metaobjects/rules_settings.py (RULES_LIFECYCLE_CREATE), server/python/src/metaobjects/config/neutral_config.py (_RULES_BLOCKS), server/csharp/MetaObjects/Config/NeutralConfig.cs (ReadRulescreate), server/java/metadata/src/main/java/com/metaobjects/config/NeutralConfig.java, fixtures/rules-check-conformance/lifecycle-create-any.server/java/metadata/src/main/java/com/metaobjects/loader/RulesValidation.java:52- Header comment says an operation whose target fails O2 or O3 "is not checked for O4 or O5". The code (and the TS reference, Rust, C# and ADR-0066) skip O4 and B1; O5 (@errors) runs before the target is derived and is never skipped. Round 4's fix (review-2) corrected "O5" to "B1" only in the C# header and left this sibling behind. Same stale wording remains at: server/python/src/metaobjects/loader/validate_rules.py:13 ("not checked for O4 or O5"). Change both to "O4 or B1".fixtures/requirement-harness/typescript/requirement-harness.test.ts:80- Stale generated harness comments after the round-4 fix. That round (review-1) reworded thetransitionActionrequirement statement inmetaobjects/meta.requirements.yaml:1345to "…on a field of an entity; an entity with a source needs a writable one, and the lifecycle of an entity with no source is inert…". It did not regenerate the harness. Every port's harness still prints the old text "…on a field of an entity with a writable source; the field's default is the initial state…".scripts/generate-requirement-harness.tsemits// ${title} — ${statement}andci-local.shgate_requirement_harnessruns it with--check, so the drift gate fails. The round-4 fix introduced the defect by editing the ledger without the generated copies. Fix: rerunbun scripts/generate-requirement-harness.tsto rewrite all five copies. Sibling sites carrying the same stale line: fixtures/requirement-harness/python/test_requirement_harness.py:80, fixtures/requirement-harness/java/RequirementHarnessTest.java:85, fixtures/requirement-harness/kotlin/RequirementHarnessTest.kt:85, fixtures/requirement-harness/csharp/RequirementHarnessTests.cs:71.🔧 Fix applied.
4 issues (2 warnings, 2 infos) still open:
server/typescript/packages/sdk/src/config.ts:413-rules.lifecycle.create(initial|any) is registered, validated and carried in all ports' config readers. The config.ts doc comment says it "is validated and has no effect yet, since no service shell reads it". The stated intent (Q1, Q2, Q5, the layering ruling, the two 2026-11-13 rulings) lists no such setting. Nothing in this change reads it, andfixtures/rules-check-conformance/lifecycle-create-anyonly checks that it parses. It is a config key that promises behavior nobody enforces. Smallest honest remedy: remove the key fromRULES_LIFECYCLE_CREATEand therules.lifecycle.createreader in every port, and add it back when a shell reads it. The remedy changes the config contract and the fixtures, so it needs authorization. Sites: server/typescript/packages/sdk/src/config.ts:413, server/typescript/packages/metadata/src/rules-settings.ts, server/python/src/metaobjects/rules_settings.py (RULES_LIFECYCLE_CREATE), server/python/src/metaobjects/config/neutral_config.py (_RULES_BLOCKS), server/csharp/MetaObjects/Config/NeutralConfig.cs (ReadRulescreate), server/java/metadata/src/main/java/com/metaobjects/config/NeutralConfig.java, fixtures/rules-check-conformance/lifecycle-create-any.server/java/metadata/src/main/java/com/metaobjects/loader/RulesValidation.java:52- Header comment says an operation whose target fails O2 or O3 "is not checked for O4 or O5". The code (and the TS reference, Rust, C# and ADR-0066) skip O4 and B1; O5 (@errors) runs before the target is derived and is never skipped. Round 4's fix (review-2) corrected "O5" to "B1" only in the C# header and left this sibling behind. Same stale wording remains at: server/python/src/metaobjects/loader/validate_rules.py:13 ("not checked for O4 or O5"). Change both to "O4 or B1".fixtures/requirement-harness/typescript/requirement-harness.test.ts:80- Stale generated harness comments after the round-4 fix. That round (review-1) reworded thetransitionActionrequirement statement inmetaobjects/meta.requirements.yaml:1345to "…on a field of an entity; an entity with a source needs a writable one, and the lifecycle of an entity with no source is inert…". It did not regenerate the harness. Every port's harness still prints the old text "…on a field of an entity with a writable source; the field's default is the initial state…".scripts/generate-requirement-harness.tsemits// ${title} — ${statement}andci-local.shgate_requirement_harnessruns it with--check, so the drift gate fails. The round-4 fix introduced the defect by editing the ledger without the generated copies. Fix: rerunbun scripts/generate-requirement-harness.tsto rewrite all five copies. Sibling sites carrying the same stale line: fixtures/requirement-harness/python/test_requirement_harness.py:80, fixtures/requirement-harness/java/RequirementHarnessTest.java:85, fixtures/requirement-harness/kotlin/RequirementHarnessTest.kt:85, fixtures/requirement-harness/csharp/RequirementHarnessTests.cs:71.server/csharp/MetaObjects/Core/Transition/RulesCheck.cs:27- Header comment says the permission check runs "per concrete entity". The code uses CommandEntities, which also requires a source (LifecycleIsLive). The TS reference header says "concrete entity that has a source" and carries the paragraph on derived permission names including their owner. The C# header lacks that paragraph. The Python header has the same stale sentence at server/python/src/metaobjects/rules_check.py:28 and lacks the same paragraph. Code behaviour matches across TS, C#, Python and Java; only the comments lag. Fix: copy the TS wording into both headers.✅ **Test** - passed
✅ No issues found.
scripts/ci-local.sh --affected --strict-toolchainsbun server/typescript/packages/cli/bin/meta.ts verify --templates (advise mode, scratch project from fixtures/rules-check-conformance/permission-names-advise)bun server/typescript/packages/cli/bin/meta.ts verify --templates (require mode, same input with rules.permissions.names=require)bun server/typescript/packages/cli/bin/meta.ts verify --templates (loader refusal, input from fixtures/conformance/error-rules-lifecycle-readonly-source)Compared CLI diagnostics against fixtures/rules-check-conformance/permission-names-advise/expected.json (3 WARN_PERMISSION_DERIVED_NAME, summary operations 4 / lifecycles 1 / transitions 5)Baseline: scripts/ci-local.sh --affected --strict-toolchains (already passed at target commit; not re-run, no source changed in this turn)docs/features/cli.md:67- Follow-up (out of scope): the bare-verify default gate list is restated in several places: docs/features/cli.md, docs/features/migrations-and-drift.md, agent-context/skills/metaobjects-verify/SKILL.md, agent-context/skills/metaobjects-fit-assessment/references/capability-sheet.md and docs/features/templates-and-payloads.md (partly). This change had to edit four copies of one fact. Proposed follow-up: keep the full list in cli.md only and reduce the others to pointers. The agent-context copies are mirrored into fixtures/agent-context-conformance, so that consolidation needs the fixture mirrors regenerated in the same change.✅ **Lint** - passed
✅ No issues found.
✅ **Push** - passed
✅ No issues found.