fix(stagecraft): studio serve starts without a data query, and claim prints the title as JSON (swamp-club #2951) #445

Merged
seth merged 2 commits from cue/2951-stagecraft-studio-serve into main 2026-10-02 18:58:08 +00:00
Owner

Fixes swamp-club #2951: two low findings from the #2944 verification reviews.

Studio serve without a data query

serveStudio refused to start when the method context had no queryData, although the handler already treats the query as optional. Serve now starts without one: Design and Simulate work, the work-item routes (Board, the work-item page, and #2969's Ticket tab) answer 422 "this studio cannot read work items", and no work-item poll runs. Real swamp always binds queryData, so this aligns the contract rather than fixing an outage.

The printed start command's title

The issue guessed a numeric title would be coerced. It is not: swamp keeps key=value inputs as strings. The real failure was a title beginning with @, which swamp reads as a file's path, so the command claim and new_key print failed with Input file not found for key "title". startCommand now prints --input 'title:json="<title>"', which swamp parses as JSON, bypassing @ handling, so any title arrives as a string.

Tests

  • New studio_serve_test.ts: serve with no query starts, serves /, answers 422 on both work-item routes, and stops on abort; it fails at once (not hangs) on the old guard.
  • claim_test.ts: the title:json form, and @-leading, numeric and quoted titles round-trip exactly.
  • New integration test (installed swamp): a board ticket titled @alice cannot log in is claimed and started with the printed command, and the run records the exact title. It fails on the old title= form with swamp's "Input file not found".
  • Docs: the skill's example claim output, and one sentence in driving.md on passing an @-leading title as JSON.

🤖 Generated with Claude Code

Fixes swamp-club #2951: two low findings from the #2944 verification reviews. ## Studio serve without a data query `serveStudio` refused to start when the method context had no `queryData`, although the handler already treats the query as optional. Serve now starts without one: Design and Simulate work, the work-item routes (Board, the work-item page, and #2969's Ticket tab) answer 422 "this studio cannot read work items", and no work-item poll runs. Real swamp always binds `queryData`, so this aligns the contract rather than fixing an outage. ## The printed start command's title The issue guessed a numeric title would be coerced. It is not: swamp keeps `key=value` inputs as strings. The real failure was a title beginning with `@`, which swamp reads as a file's path, so the command `claim` and `new_key` print failed with `Input file not found for key "title"`. `startCommand` now prints `--input 'title:json="<title>"'`, which swamp parses as JSON, bypassing `@` handling, so any title arrives as a string. ## Tests - New `studio_serve_test.ts`: serve with no query starts, serves `/`, answers 422 on both work-item routes, and stops on abort; it fails at once (not hangs) on the old guard. - `claim_test.ts`: the `title:json` form, and `@`-leading, numeric and quoted titles round-trip exactly. - New integration test (installed swamp): a board ticket titled `@alice cannot log in` is claimed and started with the printed command, and the run records the exact title. It fails on the old `title=` form with swamp's "Input file not found". - Docs: the skill's example claim output, and one sentence in `driving.md` on passing an `@`-leading title as JSON. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
serveStudio no longer refuses a method context with no queryData: Design and
Simulate still work, the work-item routes answer 422 as they already did, and
serve runs no work-item poll.

claim and new_key print start's title as title:json=<JSON string>. As title=,
a title beginning with @ was read by swamp as a file's path, so the printed
command failed with "Input file not found". A numeric title was never at risk:
swamp keeps key=value inputs as strings.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
test(stagecraft): the serve test fails, not hangs, when serve stops before it listens (swamp-club #2951)
All checks were successful
CI / Review Integrity (pull_request) Successful in 1m10s
CI / Validate Attestation (pull_request) Successful in 1m11s
07f033c223
Races the wait for the listen URL against serveStudio itself, so a serve that
throws first (as before the fix) reports its error. From the verify-reviews
code review.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
seth merged commit 7f5c4a2f60 into main 2026-10-02 18:58:08 +00:00
seth deleted branch cue/2951-stagecraft-studio-serve 2026-10-02 18:58:08 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
swamp-club/swamp-extensions!445
No description provided.