Repository navigation
feat(codegen): skip generation when the model and generators are unchanged (ADR-0064) - #590
Merged
Merged
Conversation
Forward-port of #585 from release/1.2 (b9bc9c7) onto main, merged with the manifest written once per run (#584) and the uniform entity selection (#588). The skip ADR is numbered ADR-0064 here: ADR-0062 and ADR-0063 are taken on main. - gen builds a key from the loaded model (each root node in canonical effective form), the generators' identity (built engine code, config, owned generators, templates, declared extra inputs, project config) and the output-changing flags, before anything renders. A match with the last successful run, with every generated file still holding that run's bytes, renders and writes nothing. --force (Maven: -Dmetaobjects.force=true) turns it off; a generator that cannot declare its inputs opts out. - A run that names entities (positional, --entities, -Dmeta.entities) forces exactly those: it never skips, never stores a key and leaves the stored full-run key alone, in every port. - verify --codegen may answer "no drift" locally from the key; CI and --full always render, and every port compares in memory. - The hash manifest stays loaded once and written once, and only when an entry changed; identical bytes are never rewritten; TypeScript runs git merge-file only for a hand-edited file. - fixtures/codegen-skip-conformance/cases.json: the shared case table. Hand-resolved: TypeScript runner, overwrite-policy, gen/verify/args/index and codegen-drift; Python cli, runner, overwrite_policy; C# CodegenRunner, CodegenCli, CodegenDrift, Generator, Program; Java generate and verify mojos; docs, changelog and the ADR index.
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.
Forward-port of PR 585
This is a forward-port to
mainof #585 (commitb9bc9c733onrelease/1.2), so 1.3 skips generation when metadata, templates and generator settings are unchanged, in every port. It is meant to be a faithful port: behavior PR 585 already has onrelease/1.2is carried over unchanged.main(it was ADR-0062 onrelease/1.2;mainalready uses 0062 and 0063, which are not renumbered). Every reference was updated.b6dec3694: the merge fast-path tests (merge-fastpath.test.ts) from that commit are part of this change.main: PR 584 (manifest written once,ctx.selected) and PR 588 (uniform entity selection). The skip layers on top of both.meta gen A B,--entities,-Dmeta.entities) forces exactly those entities. It never skips, never stores a key, and leaves the stored full-run key alone. A test per port covers it.Hand-resolved files (31 files that conflicted against
main)AGENTS.md,CHANGELOG.md,agent-context/skills/metaobjects-fit-assessment/references/capability-sheet.md,docs/CONFORMANCE.md,docs/features/cli.md,docs/llms/llms-full.txt,docs/recipes/write-your-own-generator.md,examples/showcase/site-payload.json,spec/decisions/README.md, and the twofixtures/agent-context-conformance/ts-requirements/reference files (resolved by dropping them, sincemaindoes not have that fixture).server/typescript/packages/cli/src/{commands/gen.ts,commands/verify.ts,index.ts,lib/args.ts,lib/codegen-drift.ts},cli/test/unit/args-verify.test.ts,codegen-ts/src/{index.ts,overwrite-policy.ts,runner.ts,generators/docs-site-file.ts}.server/python/src/metaobjects/{cli.py,codegen/overwrite_policy.py,codegen/runner.py}.server/csharp/MetaObjects.Cli/Program.cs,MetaObjects.Codegen/{CodegenCli.cs,CodegenDrift.cs,CodegenRunner.cs,Generator.cs}.server/java/maven-plugin/src/main/java/com/metaobjects/mojo/{MetaDataGeneratorMojo.java,MetaDataVerifyMojo.java}.Ports a regression fix not present in 585
A skipped
meta genin TypeScript returned before the ADR-0023 unknown-attribute advisory, so a typo'd attribute produced no warning on a skipped run (Python and C# already warned before skipping). The advisory is now printed before the skip, the skipped--format jsondocument carries the warnings, and a regression test covers both. This is not in PR 585. The one other main-specific gap found and fixed: the C# agent-context conformance fixture (a filerelease/1.2does not have) now says "regenerate in memory".Known residuals (carried from 585, not changed here)
ModelKeykeys its nodes by type and name, so two root nodes with the same type and name in different packages would collide. It is latent: the whole-run skip uses only the model-level hash, and the per-object keys that would need package-qualified node keys are not part of this change. The other ports key by resolution key. Changing Java's key here would make it diverge from 1.2.gen, and a localverify --codegenmay answer "no drift" from the key. CI always renders.Validation runs
One no-mistakes validation run (review and test fix rounds happened inside that same run; one run per PR). The "2 runs" in the Testing block below refers to rounds inside it.
What Changed
release/1.2) tomain: every port'sgen(meta gen,metaobjects gen,dotnet meta gen,mvn metaobjects:generate) now builds a fingerprint from the loaded model (canonical effective form per root node), each generator's identity (built engine code, config, owned generators, templates, declared extra inputs) and the output-changing flags — and skips rendering and writing entirely when it matches the last successful run and every recorded generated file still holds its bytes. The key lives uncommitted in.metaobjects/.gen-state/.fingerprint-<port>.json;--force(JVM:-Dmetaobjects.force=true) renders everything, and a generator that cannot declare its inputs opts out viacache: false. Runs that name entities never skip and never touch the full-run key. Behavior is carried over unchanged fromrelease/1.2, including the Java model key (nodes keyed by type and name) and the existence-only guard for generated files outside the project root..hashes.jsonmanifest is now loaded once and saved at most once per run (only when an entry changed), a generated file whose fresh bytes equal what is on disk is never rewritten, TypeScript runsgit merge-fileonly for hand-edited files, and Python no longer reports unchanged files as written. Localverify --codegenmay answer "no drift" from the same fingerprint (--fullforces a render; CI always renders), and rendered comparisons happen in memory with no temp tree.fixtures/codegen-skip-conformance/case table (cases.json), run by all five ports (TS, Python, C#, Java/Kotlin Maven) with per-port test suites, plus ADR-0064, the--forceflag on every port's CLI, and documentation updates (docs/features/cli.md,codegen-concepts.md, port docs, agent-context skill references and their conformance fixtures).Validation
Risk Assessment
✅ Low: The uncertified fix-round commits are small and correct: the advisory and
warningsnow precede and accompany the skip, with regression tests asserting real CLI output and state. The only open items are two explicitly user-ignored, intent-sanctioned PR 585 carry-overs.Testing
Baseline regression came from the configured command
scripts/ci-local.sh --affected --strict-toolchains, which passed at this commit. I then drove the changed behavior directly: built a disposable metadata project in $DEV_SCRATCH and ran the realmetaCLI (via bun on the worktree bin) six times — first run generates, unchanged rerun skips, a metadata change regenerates, deleting a recorded output re-emits instead of skipping, and a typo'd unknown attribute on a skipped run is still warned on stderr and carried in the json document. Every scenario passed; the CLI surface is text-only so no visual artifacts apply, and transcripts plus the raw stderr/json outputs are saved as evidence.roomfield regenerates Talk.ts (4 occurrences of room)…rm generated/Talk.ts, gen answersgenerated/Talk.ts,new — 1 writtenand the file is restored on diskEvidence: Live CLI transcript: gen → skip → regen → skip → deleted-output regen → typo-warn-on-skip
Evidence: Skipped-run json document carrying warnings (isAbstrakt advisory)
{ "gen": [], "summary": "nothing changed since the last meta gen...", "skipped": true, "upToDate": 2, "warnings": [ "ERR_UNKNOWN_ATTR: Unknown key 'isAbstrakt' on object.entity 'BaseThing' ... in meta.app.json ...", "meta gen loads leniently and generated anyway, butmeta verifyrejects this metadata (ADR-0023) ..." ] }Evidence: Skipped-run stderr in text mode (same two warnings)
Pipeline
Updates from git push no-mistakes
✅ **Intent** - passed
✅ No issues found.
✅ **Rebase** - passed
✅ No issues found.
🔧 **Review** - 4 issues found → auto-fixed (2) → no changes applied (3) ✅
docs/features/own-your-codegen.md:373- The edit that replaced "writes into a temporary tree and ctx.projectRoot is that tree" left a stray "tree." behind, garbling the sentence ("...ctx.projectRoot is the real project root, tree."). Fixed inline during this pass: the sentence now reads "...is the real project root." with the leftover removed.server/typescript/packages/cli/README.md:130- The new --force bullet links to docs/features/cli.md with the anchor suffix adr-0062 (the 1.2.x ADR number), but the heading on main is "(ADR-0064)" — a broken deep link. Fixed inline during this pass: anchor changed from adr-0062 to adr-0064.server/java/maven-plugin/src/main/java/com/metaobjects/mojo/ModelKey.java:41- ModelKey.of keys its nodes map by unqualifiedtype.subType + " " + name, so two root-level nodes with the same type and name in different packages collide and the last silently overwrites the first innodes. Today this is latent: the whole-run skip uses onlytree.model(), and the per-package lines that feed it carry both entries, so no wrong skip is reachable. But ADR-0064 §6 plans per-object/per-package keys built from exactly these node hashes, and there a same-name cross-package pair drops one sibling — the wrong-direction failure the ADR forbids. The other ports do not share the flaw: TS model-hash.ts keys nodes by resolutionKey(), Python model_key.py by resolution_key(), C# ModelHash keeps both nodes (package is a separate record field). Remedy: key the Java map by the child's resolution key (package-qualified), matching the siblings.server/typescript/packages/cli/src/lib/gen-fingerprint.ts:483- Generated files written outside the project root (the manifest records none of them) are guarded by existence only, in every port: gen-fingerprint.ts:483-485 (TS), skip.py untracked_exist (Python), GenFingerprint.cs CanSkipGenstored.Untracked.All(File.Exists)(C#), AbstractMetaDataMojo.java fingerprintMatches untracked loop (Java). So a hand EDIT to an outside-project output after the last run is skipped over bygen(pre-ADR gen would have restored it via the outside-file auto-overwrite policy) and, because it is not in the manifest, a localverify --codegenmay also answer "no drift" from the key without rendering. This is the behavior ADR-0064 §3/§4 explicitly specify ("the manifest records none of them, so a skip needs each to still exist"), and CI always renders — so it is a documented residual, not a contradiction. A cheap follow-up that closes it: at store time also record the sha256 of each untracked path as the run left it (the run knows the bytes it wrote) and compare content, not just existence. Reported for the record; no action required for this PR.🔧 No changes applied.
4 issues (3 warnings, 1 info) still open:
server/java/maven-plugin/src/main/java/com/metaobjects/mojo/ModelKey.java:41- ModelKey.of keys its nodes map by unqualifiedtype.subType + " " + name, so two root-level nodes with the same type and name in different packages collide and the last silently overwrites the first innodes. Today this is latent: the whole-run skip uses onlytree.model(), and the per-package lines that feed it carry both entries, so no wrong skip is reachable. But ADR-0064 §6 plans per-object/per-package keys built from exactly these node hashes, and there a same-name cross-package pair drops one sibling — the wrong-direction failure the ADR forbids. The other ports do not share the flaw: TS model-hash.ts keys nodes by resolutionKey(), Python model_key.py by resolution_key(), C# ModelHash keeps both nodes (package is a separate record field). Remedy: key the Java map by the child's resolution key (package-qualified), matching the siblings.server/typescript/packages/cli/src/lib/gen-fingerprint.ts:483- Generated files written outside the project root (the manifest records none of them) are guarded by existence only, in every port: gen-fingerprint.ts:483-485 (TS), skip.py untracked_exist (Python), GenFingerprint.cs CanSkipGenstored.Untracked.All(File.Exists)(C#), AbstractMetaDataMojo.java fingerprintMatches untracked loop (Java). So a hand EDIT to an outside-project output after the last run is skipped over bygen(pre-ADR gen would have restored it via the outside-file auto-overwrite policy) and, because it is not in the manifest, a localverify --codegenmay also answer "no drift" from the key without rendering. This is the behavior ADR-0064 §3/§4 explicitly specify ("the manifest records none of them, so a skip needs each to still exist"), and CI always renders — so it is a documented residual, not a contradiction. A cheap follow-up that closes it: at store time also record the sha256 of each untracked path as the run left it (the run knows the bytes it wrote) and compare content, not just existence. Reported for the record; no action required for this PR.server/typescript/packages/cli/src/commands/gen.ts:241- The ADR-0064 skip block returns 0 at gen.ts:241-244, BEFORE the ADR-0023 unknown-attribute advisory is built and printed at gen.ts:247-257 — so a run that skips renders no warning. Concrete reachable sequence: a project whose lastmeta genstored a key; the user adds a typo'd attribute (isAbstrakt: trueor@requird: true) to a metadata file and runsmeta gen. The lenient loader drops the unknown attribute from the loaded tree (sdk/src/memory.ts:192-195 — findings come from a separate strict pass), somodelHashTree(loaded.root)is unchanged, the key still matches, the recorded outputs are untouched, and gen answers "nothing changed since the last meta gen" — silently. The advisory whose whole purpose is to name that typo on the gen path never prints. This is both a regression of established behavior (the ADR-0023 advisory was added precisely because "the typo changed what was generated" and gen is the command users run) and a cross-port divergence: Python prints_print_unknown_attr_warningsat server/python/src/metaobjects/cli.py:2017, before its skip check at cli.py:2052, and C# callsWarnUnknownAttrs(meta)at server/csharp/MetaObjects.Codegen/CodegenCli.cs:809, before its skip at CodegenCli.cs:826. Sibling sites checked and NOT affected: C# (CodegenCli.cs:809→826) and Python (cli.py:2017→2052) both warn-then-skip; the Java mojo loads strictly per its own config and has no lenient-warning path to lose. Fix: move the skip decision below the warning-emission block (or print the collected warnings before the skip return) in gen.ts; the skip itself is correct — only its position relative to the advisory is wrong.server/java/maven-plugin/src/main/java/com/metaobjects/mojo/AbstractMetaDataMojo.java:576- The Javadoc onplanWholeRunsaid "Decide, before anything loads, whether this run can be skipped", contradicting both the code (the model IS loaded for its key, viaModelKey.of(loader)insidefingerprintInputs) and the call-site comment at AbstractMetaDataMojo.java:504-506 ("the metadata is loaded (the model key is made of it)"). A leftover from an earlier iteration. Fixed inline during this pass: the comment now says the metadata is loaded and nothing has rendered yet, and names ModelKey#of.🔧 Fix applied.
4 issues (3 warnings, 1 info) still open:
server/java/maven-plugin/src/main/java/com/metaobjects/mojo/ModelKey.java:41- ModelKey.of keys its nodes map by unqualifiedtype.subType + " " + name, so two root-level nodes with the same type and name in different packages collide and the last silently overwrites the first innodes. Today this is latent: the whole-run skip uses onlytree.model(), and the per-package lines that feed it carry both entries, so no wrong skip is reachable. But ADR-0064 §6 plans per-object/per-package keys built from exactly these node hashes, and there a same-name cross-package pair drops one sibling — the wrong-direction failure the ADR forbids. The other ports do not share the flaw: TS model-hash.ts keys nodes by resolutionKey(), Python model_key.py by resolution_key(), C# ModelHash keeps both nodes (package is a separate record field). Remedy: key the Java map by the child's resolution key (package-qualified), matching the siblings.server/typescript/packages/cli/src/lib/gen-fingerprint.ts:483- Generated files written outside the project root (the manifest records none of them) are guarded by existence only, in every port: gen-fingerprint.ts:483-485 (TS), skip.py untracked_exist (Python), GenFingerprint.cs CanSkipGenstored.Untracked.All(File.Exists)(C#), AbstractMetaDataMojo.java fingerprintMatches untracked loop (Java). So a hand EDIT to an outside-project output after the last run is skipped over bygen(pre-ADR gen would have restored it via the outside-file auto-overwrite policy) and, because it is not in the manifest, a localverify --codegenmay also answer "no drift" from the key without rendering. This is the behavior ADR-0064 §3/§4 explicitly specify ("the manifest records none of them, so a skip needs each to still exist"), and CI always renders — so it is a documented residual, not a contradiction. A cheap follow-up that closes it: at store time also record the sha256 of each untracked path as the run left it (the run knows the bytes it wrote) and compare content, not just existence. Reported for the record; no action required for this PR.server/typescript/packages/cli/src/commands/gen.ts:241- The ADR-0064 skip block returns 0 at gen.ts:241-244, BEFORE the ADR-0023 unknown-attribute advisory is built and printed at gen.ts:247-257 — so a run that skips renders no warning. Concrete reachable sequence: a project whose lastmeta genstored a key; the user adds a typo'd attribute (isAbstrakt: trueor@requird: true) to a metadata file and runsmeta gen. The lenient loader drops the unknown attribute from the loaded tree (sdk/src/memory.ts:192-195 — findings come from a separate strict pass), somodelHashTree(loaded.root)is unchanged, the key still matches, the recorded outputs are untouched, and gen answers "nothing changed since the last meta gen" — silently. The advisory whose whole purpose is to name that typo on the gen path never prints. This is both a regression of established behavior (the ADR-0023 advisory was added precisely because "the typo changed what was generated" and gen is the command users run) and a cross-port divergence: Python prints_print_unknown_attr_warningsat server/python/src/metaobjects/cli.py:2017, before its skip check at cli.py:2052, and C# callsWarnUnknownAttrs(meta)at server/csharp/MetaObjects.Codegen/CodegenCli.cs:809, before its skip at CodegenCli.cs:826. Sibling sites checked and NOT affected: C# (CodegenCli.cs:809→826) and Python (cli.py:2017→2052) both warn-then-skip; the Java mojo loads strictly per its own config and has no lenient-warning path to lose. Fix: move the skip decision below the warning-emission block (or print the collected warnings before the skip return) in gen.ts; the skip itself is correct — only its position relative to the advisory is wrong.server/typescript/packages/cli/src/commands/gen.ts:234- The fix round (a7e0116) that moved the skip decision below the ADR-0023 warning block left the 4-line ADR-0064 skip-decision comment duplicated: one copy above theskipInputscomputation (gen.ts:234-237, where it inaccurately described the decision as happening there) and an identical copy above the actualif (skipInputs !== undefined && genMaySkip(flags))block at gen.ts:252-255. Fixed inline during this pass: the first copy now says it is the skip key's model half from the same load the warnings come from, and that the decision runs below, after the advisory is printed. Comment-only, no behavior change.🔧 No changes applied.
3 warnings still open:
server/java/maven-plugin/src/main/java/com/metaobjects/mojo/ModelKey.java:41- ModelKey.of keys its nodes map by unqualifiedtype.subType + " " + name, so two root-level nodes with the same type and name in different packages collide and the last silently overwrites the first innodes. Today this is latent: the whole-run skip uses onlytree.model(), and the per-package lines that feed it carry both entries, so no wrong skip is reachable. But ADR-0064 §6 plans per-object/per-package keys built from exactly these node hashes, and there a same-name cross-package pair drops one sibling — the wrong-direction failure the ADR forbids. The other ports do not share the flaw: TS model-hash.ts keys nodes by resolutionKey(), Python model_key.py by resolution_key(), C# ModelHash keeps both nodes (package is a separate record field). Remedy: key the Java map by the child's resolution key (package-qualified), matching the siblings.server/typescript/packages/cli/src/lib/gen-fingerprint.ts:483- Generated files written outside the project root (the manifest records none of them) are guarded by existence only, in every port: gen-fingerprint.ts:483-485 (TS), skip.py untracked_exist (Python), GenFingerprint.cs CanSkipGenstored.Untracked.All(File.Exists)(C#), AbstractMetaDataMojo.java fingerprintMatches untracked loop (Java). So a hand EDIT to an outside-project output after the last run is skipped over bygen(pre-ADR gen would have restored it via the outside-file auto-overwrite policy) and, because it is not in the manifest, a localverify --codegenmay also answer "no drift" from the key without rendering. This is the behavior ADR-0064 §3/§4 explicitly specify ("the manifest records none of them, so a skip needs each to still exist"), and CI always renders — so it is a documented residual, not a contradiction. A cheap follow-up that closes it: at store time also record the sha256 of each untracked path as the run left it (the run knows the bytes it wrote) and compare content, not just existence. Reported for the record; no action required for this PR.server/typescript/packages/cli/src/lib/gen-skip.ts:22- A skippedmeta genprints its warnings to stderr but leaves them out of the json/toon document. gen.ts:160-165 states the invariant: every warning is also collected because the structured result carries them, and on a pipe the default format is the document. The skip returns at gen.ts:254-258, after the stale-agent-context, manifest-ignored, stock-copy and ADR-0023 unknown-attribute warnings are collected intowarnings.reportGenSkip(fmt, verdict.recorded.length)takes no warnings, and the doc built at gen-skip.ts:22-29 has nowarningskey. Concrete sequence: the user adds a typo'disAbstrakt, runsmeta gen --format jsonor pipes it, and the key still matches. The run skips. stderr carries the advisory, but a reader of the document seesskipped: truewith no caveats. A normal run's document (gen.ts:442) does carry them. The previous round (a7e0116) moved the skip below the warning block, so this is the same invariant that round addressed, left unfinished at the output layer. No other site in the changed code collects a warning and then returns early. Fix: passwarningstoreportGenSkipand addwarnings: fmt === "text" ? [] : warningsto the doc, matching gen.ts:442. Extend the regression test in gen-unknown-attr-warning.test.ts with a--format jsoncase that asserts the unknown-attribute advisory appears in the document.🔧 Fix applied.
2 warnings still open:
server/java/maven-plugin/src/main/java/com/metaobjects/mojo/ModelKey.java:41- ModelKey.of keys its nodes map by unqualifiedtype.subType + " " + name, so two root-level nodes with the same type and name in different packages collide and the last silently overwrites the first innodes. Today this is latent: the whole-run skip uses onlytree.model(), and the per-package lines that feed it carry both entries, so no wrong skip is reachable. But ADR-0064 §6 plans per-object/per-package keys built from exactly these node hashes, and there a same-name cross-package pair drops one sibling — the wrong-direction failure the ADR forbids. The other ports do not share the flaw: TS model-hash.ts keys nodes by resolutionKey(), Python model_key.py by resolution_key(), C# ModelHash keeps both nodes (package is a separate record field). Remedy: key the Java map by the child's resolution key (package-qualified), matching the siblings.server/typescript/packages/cli/src/lib/gen-fingerprint.ts:483- Generated files written outside the project root (the manifest records none of them) are guarded by existence only, in every port: gen-fingerprint.ts:483-485 (TS), skip.py untracked_exist (Python), GenFingerprint.cs CanSkipGenstored.Untracked.All(File.Exists)(C#), AbstractMetaDataMojo.java fingerprintMatches untracked loop (Java). So a hand EDIT to an outside-project output after the last run is skipped over bygen(pre-ADR gen would have restored it via the outside-file auto-overwrite policy) and, because it is not in the manifest, a localverify --codegenmay also answer "no drift" from the key without rendering. This is the behavior ADR-0064 §3/§4 explicitly specify ("the manifest records none of them, so a skip needs each to still exist"), and CI always renders — so it is a documented residual, not a contradiction. A cheap follow-up that closes it: at store time also record the sha256 of each untracked path as the run left it (the run knows the bytes it wrote) and compare content, not just existence. Reported for the record; no action required for this PR.🔧 No changes applied.
2 warnings still open:
server/java/maven-plugin/src/main/java/com/metaobjects/mojo/ModelKey.java:41- ModelKey.of keys its nodes map by unqualifiedtype.subType + " " + name, so two root-level nodes with the same type and name in different packages collide and the last silently overwrites the first innodes. Today this is latent: the whole-run skip uses onlytree.model(), and the per-package lines that feed it carry both entries, so no wrong skip is reachable. But ADR-0064 §6 plans per-object/per-package keys built from exactly these node hashes, and there a same-name cross-package pair drops one sibling — the wrong-direction failure the ADR forbids. The other ports do not share the flaw: TS model-hash.ts keys nodes by resolutionKey(), Python model_key.py by resolution_key(), C# ModelHash keeps both nodes (package is a separate record field). Remedy: key the Java map by the child's resolution key (package-qualified), matching the siblings.server/typescript/packages/cli/src/lib/gen-fingerprint.ts:483- Generated files written outside the project root (the manifest records none of them) are guarded by existence only, in every port: gen-fingerprint.ts:483-485 (TS), skip.py untracked_exist (Python), GenFingerprint.cs CanSkipGenstored.Untracked.All(File.Exists)(C#), AbstractMetaDataMojo.java fingerprintMatches untracked loop (Java). So a hand EDIT to an outside-project output after the last run is skipped over bygen(pre-ADR gen would have restored it via the outside-file auto-overwrite policy) and, because it is not in the manifest, a localverify --codegenmay also answer "no drift" from the key without rendering. This is the behavior ADR-0064 §3/§4 explicitly specify ("the manifest records none of them, so a skip needs each to still exist"), and CI always renders — so it is a documented residual, not a contradiction. A cheap follow-up that closes it: at store time also record the sha256 of each untracked path as the run left it (the run knows the bytes it wrote) and compare content, not just existence. Reported for the record; no action required for this PR.✅ No issues found.
🔧 **Test** - 3 issues found → auto-fixed ✅
scripts/ci-local.sh --affected --strict-toolchainsexited 1 on this change (it passes on the base commit). I could not find which lane failed. Thets-fastlane passes on its own, and the focused skip-conformance tests pass in TypeScript, Python and C#, so the failure is probably in the TypeScript unit lane, the Java reactor, or a full-suite Python or C# test outside the skip tests. Run those lanes one at a time and read the failing output.meta gentwice on a disposable TypeScript project with nothing changed: the second run renders and writes nothing and says someta gen: it regenerates, and the following unchanged run skips againindex.ts. An edit to an ejected template triggere…fixtures/codegen-skip-conformance/cases.json) hold in the TypeScript, Python and C# portsts-fastcompleted (passed). To resolve this, re-run `scripts/ci-local.s…scripts/ci-local.sh --affected --strict-toolchainsLivemeta genon a disposable TypeScript project: an unchanged second run skipped and printed 'nothing changed since the last meta gen'Livemeta gen: adding a metadata field regenerated 2 files, and the next unchanged run skipped againLivemeta gen: deleting a generated output regenerated it as NEW, and removing a generator from the config regenerated and REMOVED its outputLivemeta gen: a hand edit to a generated file was MERGED rather than skipped,--forceran a full pass, and--format jsonon a skip returnedskipped: truewith awarningskeyLivemeta eject names, then an edit to the ejected template: gen regenerated, and the following unchanged run skippedbun testinserver/typescript/packages/cliovergen-skip-conformance,gen-unknown-attr-warning,gen-docs-site,args-genandargs-verify: 88 pass, 0 failpython3 -m pytest tests/test_gen_skip_conformance.py tests/codegen/test_gen_unchanged.pyinserver/python: 36 passeddotnet test MetaObjects.Cli.Tests --filter FullyQualifiedName~GenSkipinserver/csharp: 29 passedscripts/ci-local.sh --only ts-fast --strict-toolchains: LOCAL CI PASSED (exit 0, about 7m)scripts/ci-local.sh --affected --strict-toolchainsand--only ts-unit --only java-slow --only python --only csharp: started, stopped before any lane result was printed🔧 Fix applied.
✅ Re-checked - no issues remain.
roomfield regenerates Talk.ts (4 occurrences of room)…rm generated/Talk.ts, gen answersgenerated/Talk.ts,new — 1 writtenand the file is restored on diskscripts/ci-local.sh --affected --strict-toolchainsBroad regression (baseline, already run at this target):scripts/ci-local.sh --affected --strict-toolchains— passedLive:bun <worktree>/server/typescript/packages/cli/bin/meta.ts gen --cwd <scratch>— fresh generate, then skip on unchanged (skipped:true, upToDate:2)Live: metadata edit (add room field) defeats skip → Talk.ts regenerated with the new field; rerun skips againLive adversarial: delete generated/Talk.ts → gen re-emits it (new) instead of skippingLive: bare typo'd keyisAbstrakt:trueafter stored key → run skips yet ERR_UNKNOWN_ATTR warning prints to stderr (text) and appears in the--format jsondocument's warnings array✅ **Document** - passed
✅ No issues found.
✅ **Lint** - passed
✅ No issues found.
✅ **Push** - passed
✅ No issues found.