fix(gatorwalk-factory): claim moves a reservation whose factory no longer loads (swamp-club #2712) #426

Merged
seth merged 1 commit from cue/2712-gatorwalk-factory-claim into main 2026-10-01 18:53:17 +00:00
Owner

Fixes swamp-club #2712 (GW-18 follow-ups).

Problem

A claim writes the ticket index record before the work item starts. If the reserved factory was then deleted, renamed or made invalid, its printed start could only fail, and every later claim with another factory was refused ("start it with ''"). The ticket was stuck until someone deleted the index record by hand.

Change

  • Stuck reservation: when the reservation never started and a different factory is passed, claim checks whether the reserved factory still loads. If it does, the refusal stands. If it does not, the new factory (which must load) takes the reservation over under the same key, and claim prints the new start command. The key stays because the failed start may have left a definition under it. A dry run only says the reservation would move.
  • The printed start command shell-quotes the key.
  • The already-started answer names the work item's factory, and any different factory passed as not used.
  • A failed snapshot write after a successful claim is logged as a warning instead of failing the claim; the index record is the claim's result.
  • DESIGN "Start from a ticket" and Retention (the previous list is kept whole), README, and the driving skill's claim answers are updated.

Testing

Unit tests in gatorwalk-factory/extensions/models/tracker/claim_test.ts: the triage repro (claim under team, break team, start fails, claim with other) now moves the reservation and its start works; a dry run writes nothing; a second broken factory is refused with nothing written; key quoting; the already-started message; a failed snapshot write. verify-build and verify-reviews passed on this commit; attestation posted. Both reviewers noted (low) that loadError counts a transient read error as "no longer loads"; accepted in planning, since a move needs an explicit factory that does load.

🤖 Generated with Claude Code

Fixes swamp-club #2712 (GW-18 follow-ups). ## Problem A claim writes the ticket index record before the work item starts. If the reserved factory was then deleted, renamed or made invalid, its printed start could only fail, and every later claim with another factory was refused ("start it with '<factory>'"). The ticket was stuck until someone deleted the index record by hand. ## Change - **Stuck reservation:** when the reservation never started and a different factory is passed, claim checks whether the reserved factory still loads. If it does, the refusal stands. If it does not, the new factory (which must load) takes the reservation over under the **same key**, and claim prints the new start command. The key stays because the failed start may have left a definition under it. A dry run only says the reservation would move. - The printed start command shell-quotes the key. - The already-started answer names the work item's factory, and any different factory passed as not used. - A failed snapshot write after a successful claim is logged as a warning instead of failing the claim; the index record is the claim's result. - DESIGN "Start from a ticket" and Retention (the `previous` list is kept whole), README, and the driving skill's claim answers are updated. ## Testing Unit tests in `gatorwalk-factory/extensions/models/tracker/claim_test.ts`: the triage repro (claim under team, break team, start fails, claim with other) now moves the reservation and its start works; a dry run writes nothing; a second broken factory is refused with nothing written; key quoting; the already-started message; a failed snapshot write. verify-build and verify-reviews passed on this commit; attestation posted. Both reviewers noted (low) that `loadError` counts a transient read error as "no longer loads"; accepted in planning, since a move needs an explicit factory that does load. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
fix(gatorwalk-factory): claim moves a reservation whose factory no longer loads (swamp-club #2712)
All checks were successful
CI / Review Integrity (pull_request) Successful in 1m51s
CI / Validate Attestation (pull_request) Successful in 1m32s
4cfc061dd1
A claim reserved under a factory that was then deleted, renamed or made
invalid left the ticket stuck: the printed start failed and every other
factory was refused. Now a different factory that loads takes the
reservation over under the same key, and claim says so.

Also from the GW-18 follow-ups: the printed start command quotes the
key, the already-started answer names the work item's factory and any
factory passed that was not used, a failed snapshot write is logged
rather than failing a claim whose index record was written, and DESIGN
notes that the previous list is kept whole.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
seth merged commit 1b41baa9b9 into main 2026-10-01 18:53:17 +00:00
seth deleted branch cue/2712-gatorwalk-factory-claim 2026-10-01 18:53:17 +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!426
No description provided.