Skip to content

test(intent): lock the .print scaffold's authored-wins semantics (#6497) - #6498

Merged
delchev merged 1 commit into
masterfrom
test/print-scaffold-authored-wins
Aug 4, 2026
Merged

test(intent): lock the .print scaffold's authored-wins semantics (#6497)#6498
delchev merged 1 commit into
masterfrom
test/print-scaffold-authored-wins

Conversation

@delchev

@delchev delchev commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Closes #6497.

Investigation outcome: the platform generator already has the requested authored-wins semantics — PrintIntentGenerator writes doc/Templates/<Entity>/Print/en/standard.print via writeModelFileIfAbsent (generate-once, the developer-owned .settings pattern, 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 .print as generated output and delete/rewrite it before invoking Generate — a consumer-side fix.

What this PR adds is the missing test lock: a new IntentEngineIT case that

  1. generates a fresh project and asserts the scaffold is produced (<document + the items table),
  2. hand-edits 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

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>
@delchev
delchev merged commit 858dcf7 into master Aug 4, 2026
15 of 16 checks passed
@delchev
delchev deleted the test/print-scaffold-authored-wins branch August 4, 2026 15:01
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.

Lock the generated .print scaffold's authored-wins semantics (regen must never clobber a hand-improved template)

1 participant