Skip to content

Infra RL8: new-thread create reads room-cli's current thread spawn receipt (fixes the uncertain create) #949

Closed

Description

@jparker2006

Parent

Ticket RL8 of infra spec #437 (was ClosedWiz #2183). No version milestone. It blocks #18 (RL5).

What to build

openwiz new --yes creates its one thread through room-cli thread spawn ... --json (the allowlisted call; its arguments don't change). The current room-cli (v155 at the 2026-11-16 call; v152 on 2026-11-14) prints a receipt that the CloudRoom adapter no longer recognises as the documented thread row. So every create, even a successful one, reports uncertain ("thread spawn: receipt drift: the receipt is not the documented thread row"). Seen on 2026-11-14 and again in v0.0.12's live smoke on 2026-11-16, where exactly one thread was created each time. It blocks v0.0.12's new_once step, so nothing can ship.

  1. Recorded shape. Add a synthetic fixture for today's receipt: the declared ThreadResponse shape from room-cli v155's client code (one flat object; the new thread's id is top-level id, its project top-level projectId; no repeated keys). Use synthetic values throughout. Label it in the scenario's synthetic_assumptions as declared, not observed: the observed 2026-11-16 bytes weren't retained. Source: the PC's read-only capture (ClosedWiz Proposal: reject changed budget allowances in scale comparisons #325 comment 6909844357).
  2. Parser. The likely cause: RECEIPT_KEYS accepts only a fixed key set, and v155's row adds activeBackgroundCommandCount, activeWorkflowCount, dispatchingMessageCount, asleepSince, teleport and teleportLocalStep. Fix: require and type-check only the keys OpenWiz uses: top-level id and projectId as non-empty strings, exactly once each, plus any other key the create record reads, at its type. Tolerate unknown additional keys of any type, so an additive room-cli release doesn't break new again. A receipt that meets that reports created, with that id. Keep the older documented row working.
  3. Fail closed. A receipt that is still ambiguous (a duplicate key, a missing or mistyped required key, or an unparsable receipt) still reports uncertain, never created, and the product still says never retry. Unknown extra keys alone never make it ambiguous.
  4. No allowlist or argument change. The room-cli call and its flags stay exactly as they are.

Owned paths

  • crates/adapters/cloudroom/src/new_thread.rs
  • tests/fixtures/ (the new synthetic spawn-receipt scenario and its README provenance row only)
  • tests/new-thread/ (the cases for this receipt)
  • changes/ (this ticket's line, per J110)

Relies on: contracts/web-api.v1.md

Links

none

Acceptance criteria

  • Red first: with the current-shape fixture, a create reports uncertain before the fix and created after it, with the new thread's id.
  • Unknown extra keys alone still give created.
  • Every ambiguous variant (a duplicate key, a missing or mistyped required key, an unparsable receipt) still reports uncertain, with the never-retry message.
  • The older documented row still parses, if it did before.
  • crates/adapters/cloudroom/src/allowlist.rs and the spawn argv are unchanged; the allowlist checks pass.
  • The fixture is synthetic and labelled; the privacy check passes.
  • No live call in this ticket. The live proof is Infra RL5: first public-path release and ship-to-install timing (reused #285) #18's next smoke run.

Activity

  1. added
    ready-for-agent
    on Nov 16, 2026
  2. jparker2006 commented on Nov 16, 2026

    @jparker2006
    MemberAuthor

    launch-fleet: start checked, branch room/rl8-spawn-receipt-949

  3. jparker2006 commented on Nov 16, 2026

    @jparker2006
    MemberAuthor

    Builder question: item 4 / AC "the create record holds the receipt's structure" needs paths outside this ticket's owned paths.

    Found. The adapter (crates/adapters/cloudroom/src/new_thread.rs) only returns a SpawnReply; it writes no record. SpawnReply::Created { thread_id } carries nothing else, and Outcome::from_reply drops everything for a created reply. The stored record is read strictly against a fixed RECORD_KEYS list (crates/core/src/new_thread/read.rs) and is a contract shape (contracts/new-thread.v1.schema.json, $defs.record). So storing the structure means a contract change plus core edits.

    Options.

    • A. Widen: add an optional receipt_structure (keys, nesting and JSON types, values replaced; absent on older records, so they keep their shape) to $defs.record in contracts/new-thread.v1.schema.json, and to crates/core/src/new_thread/{outcome.rs,operation.rs,record.rs,read.rs}: SpawnReply::Created/Unclear carry an Option<Value> structure, run copies it to the record, and the reader accepts the optional key. About 40 lines plus the tests in tests/new-thread/.
    • B. Split: this PR ships items 1, 2, 3 and 5 (the fix v0.0.12 needs; J133's approved scope names only the parsing). Item 4 becomes a follow-up ticket. Until then, the orchestrator's ruling already puts a structure-only capture in the next smoke's prepare step.

    Recommendation: B, because it's the smallest change for today's release and makes no contract change. Until this is answered I'm building items 1, 2, 3 and 5 and handing them back as one PR. A doesn't change that PR's parsing work.

  4. added
    needs-info
    on Nov 16, 2026
  5. jparker2006 commented on Nov 16, 2026

    @jparker2006
    MemberAuthor

    Orchestrator ruling (Manager #437, within Jake's approved RL8 scope), answering the builder question: option B. Item 4 and its acceptance line came from the manager's draft, beyond the approved scope, which names the receipt parsing only. They are removed from this ticket (plan revision 12 on #437) and moved to follow-up #951. This PR ships items 1–4 as now numbered: the fixture, the parser, fail-closed, and no allowlist or argument change. No contract change.

  6. removed
    needs-info
    on Nov 16, 2026
  7. jparker2006 commented on Nov 16, 2026

    @jparker2006
    MemberAuthor

    launch-fleet: archived

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    ready-for-agent

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions