Skip to content

fix(004): render live-plane shapes; complete 003/004/005 live checks#6

Merged
bartekus merged 1 commit into
mainfrom
fix/004-live-render-drift
Jul 15, 2026
Merged

fix(004): render live-plane shapes; complete 003/004/005 live checks#6
bartekus merged 1 commit into
mainfrom
fix/004-live-render-drift

Conversation

@bartekus

Copy link
Copy Markdown
Contributor

What

The deferred live e2e for specs 003/004/005 finally ran against a local control plane. It surfaced real shape drift in the governance-verb human renderers; the fix is here, with 003/004/005 flipped to implementation: complete.

Drift found and fixed (spec 004 §1: the platform wins)

The CLI human renderers assumed JSON shapes the plane never returns:

  • tenants list: platform returns {tenants:[...]}, not a bare array
  • tenants show: platform returns {tenant, installations} (siblings), not a flat record with nested installations
  • fleet list: platform returns {apps:[...]}, not a bare array
  • fleet backup: platform returns {repository, tag, jobName}, not an op record with id/status

Shapes read off the stagecraft service code (backend/{tenants,factory,fleet}/api.ts) and confirmed live. --output json was correct throughout (passthrough); only the human renderers plus the mock tests that had encoded the wrong shapes changed. Spec 004 §5.3 corrected with a dated note; +5 unit tests lock the real shapes.

Live checks (local plane)

  • 003: login (bearer handoff via the chassis mock auth driver), whoami in both formats, raw authenticated GET (200), --debug leaks the token zero times.
  • 004: every read verb against real data, stamp status --watch exit 1 on a terminal failed job (§5.4), JSON passthrough stable. Governed write evidenced by a pre-existing launched stamp job read live; a fresh launch deferred by owner decision (real GitHub repo side effect).
  • 005: a scripted stdio client drove the real MCP server: initialize, tools/list (9), tools/call tenants_list (real tenant), tools/call stamp_status (real job).

006 stays in-progress (still needs a stamped app plus a newer template release).

Gates

fmt, clippy -D warnings, 122 tests (106 unit + 16 integration), spec-spine lint 0/0/0, index fresh.

Spec-Drift-Waiver: src/mcp.rs and src/verbs/*.rs couple to spec 002 (and mod.rs to 006) via the codebase index, which owns the source-tree scaffold; the behavioral change is authored against specs 004 and 005, both edited in this PR. The residual coupling to 002/006 is the standing Cargo-scaffold coupling, waived per the owner-approved standing waiver.

The deferred live e2e against a local control plane could finally run,
and it found real drift: the CLI's human renderers assumed JSON shapes
the platform never returns. Corrected per spec 004 §1 (the platform
wins; the CLI's expectation is amended, never coded to drift):

- tenants list:   {tenants:[...]}          (was a bare array)
- tenants show:   {tenant, installations}  (record under `tenant`,
                                            installations a sibling;
                                            was flat + nested)
- fleet list:     {apps:[...]}             (was a bare array)
- fleet backup:   {repository, tag, jobName} BackupResponse receipt
                                            (was an op record needing
                                            id/status)

The shapes were read off the stagecraft service code
(backend/{tenants,factory,fleet}/api.ts) and confirmed against the
running plane. `--output json` was correct throughout (it wraps the
plane payload verbatim); only the human renderers and the mock tests
that had encoded the wrong shapes needed fixing. The flat stamp and
fleet-app views were already correct. Spec 004 §5.3 is corrected with a
dated note; +5 unit tests lock the wrapped/nested/receipt shapes and
reject the old bare-array/op-record assumptions.

Live checks (all against a local plane, resolving the deferred items):

- 003: login (bearer handoff over the chassis mock auth driver), whoami
  in both formats, a raw authenticated GET (200), --debug leaks the
  token zero times.
- 004: every read verb against real data (list/show/fleet-list/
  stamp-status/install-url), stamp status --watch exit 1 on a terminal
  failed job (§5.4), JSON passthrough stable. The governed write is
  evidenced by a pre-existing launched stamp job read live; a fresh
  self-launch was deferred by owner decision (it creates a real GitHub
  repo, an outward-facing side effect).
- 005: a scripted stdio client drove the real MCP server against the
  plane: initialize -> tools/list (9 tools) -> tools/call tenants_list
  (real tenant) -> tools/call stamp_status (real job). The MCP face is
  unaffected by the §5.3 correction (its result is the passthrough
  envelope, already carrying the real shape).

Flip 003, 004, and 005 to implementation: complete. 006 stays
in-progress (still needs a stamped app plus a newer template release;
unchanged). Regenerated the .derived shards.
@bartekus
bartekus merged commit fe1e9f4 into main Jul 15, 2026
2 checks passed
@bartekus
bartekus deleted the fix/004-live-render-drift branch July 15, 2026 22:34
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.

1 participant