Bind the scaffold templates and the demo-project fixture to one canonical project shape #181

Closed
opened 2026-07-02 19:23:42 +02:00 by Brummel · 1 comment
Owner

The cycle-0103 scaffolder (crates/aura-cli/src/scaffold.rs template constants) and the cycle-0102 e2e fixture (crates/aura-cli/tests/fixtures/demo-project/) encode the same project shape twice with no lockstep guard: the fixture's lib.rs/blueprint json and the templates already diverge deliberately in docstrings and manifest comments, and nothing fails when a future edit changes one copy's load-bearing content (node shape, descriptor invocation, blueprint wiring) but not the other's. The 0103 architect review flagged this as medium drift debt; the ledger is silent on which copy is canonical.

Possible directions (none decided): a test that scaffolds with name=demo-project/namespace=demo and asserts equality on the load-bearing regions only; regenerating the fixture from the scaffolder in the test harness so one copy vanishes; or a ledger note declaring the templates canonical and the fixture an intentionally frozen twin. A decision belongs to a design pass, not a mechanical edit — the deliberate divergences make naive byte-lockstep wrong.

The cycle-0103 scaffolder (crates/aura-cli/src/scaffold.rs template constants) and the cycle-0102 e2e fixture (crates/aura-cli/tests/fixtures/demo-project/) encode the same project shape twice with no lockstep guard: the fixture's lib.rs/blueprint json and the templates already diverge deliberately in docstrings and manifest comments, and nothing fails when a future edit changes one copy's load-bearing content (node shape, descriptor invocation, blueprint wiring) but not the other's. The 0103 architect review flagged this as medium drift debt; the ledger is silent on which copy is canonical. Possible directions (none decided): a test that scaffolds with name=demo-project/namespace=demo and asserts equality on the load-bearing regions only; regenerating the fixture from the scaffolder in the test harness so one copy vanishes; or a ledger note declaring the templates canonical and the fixture an intentionally frozen twin. A decision belongs to a design pass, not a mechanical edit — the deliberate divergences make naive byte-lockstep wrong.
Brummel added the idea label 2026-07-02 19:23:42 +02:00
Brummel added this to the Project environment — the project-as-crate authoring loop milestone 2026-07-02 19:24:03 +02:00
Author
Owner

Resolution: canon declared, no lockstep mechanism (design pass, 2026-07-02)

This issue named three directions. The design pass (derived decision, adversarially checked by an independent skeptic lens against the actual test code) resolves it as the third: a ledger declaration, no equality test, no fixture regeneration. Recorded in docs/design/INDEX.md (the C24 section's project-as-crate passage).

The declaration: the aura new templates (crates/aura-cli/src/scaffold.rs) are the canonical authoring shape and evolve with the engine; crates/aura-cli/tests/fixtures/demo-project/ is an intentionally frozen known-good twin for the load-boundary tests.

Rationale (corrected by the skeptic pass — the original over-claim is retracted):

  • No consumer requires the copies to match (skeptic-verified: no doc, test, or ledger passage treats the fixture as "what aura new emits"; the only couplings are a name string and the test path). A divergence therefore harms no user of either surface.
  • Each copy is e2e-guarded on its fitness for purposetests/project_load.rs (fixture: cargo build → descriptor-ABI load → charter check → deterministic run) and tests/project_new.rs (templates: scaffold → cargo build → run twice bit-identically → introspect). Stated honestly: these guards cover build/load/run/determinism/namespace, not blueprint wiring — the skeptic refuted the stronger "independently guarded on all load-bearing content" claim, and the ledger note carries the corrected wording.
  • Against option (a) (region-equality test): the deliberate divergences (docstrings, manifest comments, rel-vs-abs engine path, blueprints/ layout) force a normalizing comparator, and the guard would convert every deliberate template improvement into forced churn of the deliberately frozen fixture (or vice versa) — coupling the two copies' distinct purposes.
  • Against option (b) (regenerate fixture from scaffolder): couples the 0102 load-boundary tests to scaffolder behaviour — a scaffolder bug would break tests whose subject is the loader; the fixture's frozen-ness is its test value.

Accepted residual: the copies' wiring/doc content may drift; that costs conceptual tidiness only, and the declared canon answers "which shape is the project's". If a future consumer ever requires the fixture to equal scaffold output (e.g. docs that present the fixture as aura new's result), that new consumer re-opens the guard question on its own terms.

Status: resolved by the ledger declaration; closes with the doc commit.

## Resolution: canon declared, no lockstep mechanism (design pass, 2026-07-02) This issue named three directions. The design pass (derived decision, adversarially checked by an independent skeptic lens against the actual test code) resolves it as the third: **a ledger declaration, no equality test, no fixture regeneration.** Recorded in `docs/design/INDEX.md` (the C24 section's project-as-crate passage). **The declaration:** the `aura new` templates (`crates/aura-cli/src/scaffold.rs`) are the **canonical** authoring shape and evolve with the engine; `crates/aura-cli/tests/fixtures/demo-project/` is an intentionally **frozen** known-good twin for the load-boundary tests. **Rationale (corrected by the skeptic pass — the original over-claim is retracted):** - **No consumer requires the copies to match** (skeptic-verified: no doc, test, or ledger passage treats the fixture as "what `aura new` emits"; the only couplings are a name string and the test path). A divergence therefore harms no user of either surface. - **Each copy is e2e-guarded on its fitness for purpose** — `tests/project_load.rs` (fixture: cargo build → descriptor-ABI load → charter check → deterministic run) and `tests/project_new.rs` (templates: scaffold → cargo build → run twice bit-identically → introspect). Stated honestly: these guards cover build/load/run/determinism/namespace, **not** blueprint wiring — the skeptic refuted the stronger "independently guarded on all load-bearing content" claim, and the ledger note carries the corrected wording. - **Against option (a) (region-equality test):** the deliberate divergences (docstrings, manifest comments, rel-vs-abs engine path, blueprints/ layout) force a normalizing comparator, and the guard would convert every deliberate template improvement into forced churn of the deliberately frozen fixture (or vice versa) — coupling the two copies' distinct purposes. - **Against option (b) (regenerate fixture from scaffolder):** couples the 0102 load-boundary tests to scaffolder behaviour — a scaffolder bug would break tests whose subject is the loader; the fixture's frozen-ness is its test value. **Accepted residual:** the copies' wiring/doc content may drift; that costs conceptual tidiness only, and the declared canon answers "which shape is the project's". If a future consumer ever *requires* the fixture to equal scaffold output (e.g. docs that present the fixture as `aura new`'s result), that new consumer re-opens the guard question on its own terms. Status: resolved by the ledger declaration; closes with the doc commit.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Brummel/Aura#181