Skip to content

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

Description

@delchev

While hand-authoring print templates over the generated scaffolds, a regeneration appeared to clobber the improved standard.print.

Finding. The platform generator already has authored-wins semantics: PrintIntentGenerator 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 ("an existing CMS document is a user customization and is never overwritten"). The observed clobbering therefore comes from regeneration pipelines that treat .print as generated output and delete/rewrite it before invoking Generate - a consumer-side classification, not a platform defect.

What lands here. An integration test locking the contract, so a platform regression can never reintroduce the clobber silently: regenerate a project with a hand-edited standard.print and assert it survives byte-identical; a fresh project still gets the scaffold.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions