fix(004): render live-plane shapes; complete 003/004/005 live checks#6
Merged
Conversation
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.
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.
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 arraytenants show: platform returns{tenant, installations}(siblings), not a flat record with nested installationsfleet list: platform returns{apps:[...]}, not a bare arrayfleet backup: platform returns{repository, tag, jobName}, not an op record with id/statusShapes read off the stagecraft service code (backend/{tenants,factory,fleet}/api.ts) and confirmed live.
--output jsonwas 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)
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.