test(intent): lock the .print scaffold's authored-wins semantics (#6497) - #6498
Merged
Conversation
The generator already emits doc/Templates/<Entity>/Print/en/standard.print through writeModelFileIfAbsent (generate-once, like the developer-owned .settings) and the CMS seeding is create-if-absent - but nothing locked that contract, so a regression could silently reintroduce clobbering a hand-improved template. The new IntentEngineIT case regenerates a project with a hand-edited standard.print and asserts it survives byte-identical, and that a fresh project still receives the scaffold. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.
Closes #6497.
Investigation outcome: the platform generator already has the requested authored-wins semantics —
PrintIntentGeneratorwritesdoc/Templates/<Entity>/Print/en/standard.printviawriteModelFileIfAbsent(generate-once, the developer-owned.settingspattern, in place since #6184), and the CMS seeding is create-if-absent. The clobbering observed in the field comes from downstream regeneration pipelines that classify.printas generated output and delete/rewrite it before invoking Generate — a consumer-side fix.What this PR adds is the missing test lock: a new
IntentEngineITcase that<document+ the items table),standard.print, regenerates, and asserts the authored content survives byte-identical.A platform regression to emit-on-every-regen now fails CI instead of silently rewriting formatted/audited business documents.
🤖 Generated with Claude Code