Skip to content

ticket locks are the format's .lock.md claim; PENDING placeholders + 6h timer removed (fix #1420) - #1425

Merged
suleimansh merged 1 commit into
mainfrom
1420-lock-md-unification
Jul 31, 2026
Merged

ticket locks are the format's .lock.md claim; PENDING placeholders + 6h timer removed (fix #1420)#1425
suleimansh merged 1 commit into
mainfrom
1420-lock-md-unification

Conversation

@suleimansh

Copy link
Copy Markdown
Member

Implements the plan agreed on #1420 (comment): the code now speaks the same lock the prompts define, and the old mechanism is gone.

What changed

spike-locks.tsticket-locks.ts. The claim is now one tickets/<STEM>.lock.md per ticket holding CLAIMED: <AGENT_ID> — the file ticketing_format.md defines — instead of PENDING: placeholders pre-filling .spike.md/.plan.md. The daemon still writes, commits, and pushes the locks before agents start (an agent only pushes at session end onto its own branch, so it can never place the lock in time; cloud runs can't push at all — #1320).

The 6h staleness release is deleted (releaseStaleSpikeLocks, SPIKE_LOCK_STALE_MS), per the issue: a coordinator can hold a ticket for days, and a timer releasing under a live agent re-opens the double-work window. Release is now explicit:

  • the fanned-out agent's pinned prompt tells it to delete the lock in the same commit as its plan — the merge that lands the work frees the ticket;
  • a human can lift a dead agent's claim with the new Release lock button on the ticket's detail page (sendReleaseTicketLock: delete, commit, best-effort push — a release only one machine sees would leave the ticket claimed where it matters).

Readers switched over. readTickets/readTicket mark locked from the .lock.md sibling's existence (plus lockedBy from its CLAIMED: line, shown as the badge/button tooltip); the lock file never renders as a ticket row; the daemon's spikeCandidates filter is unchanged in shape but no longer runs a stale-lock sweep. Tickets wear a "claimed" badge in the list and on the detail page.

Existence is meaning again: a .plan.md that exists is a plan (the placeholder ambiguity is gone), which also un-breaks the planned-quick-wins fail-closed path for tickets currently being planned.

Not in this PR (flagged for follow-up)

Tests

  • the-framework: 1650 tests, 0 fail (lock module rewritten: batch acquire, race skip, commit rollback, push tolerance, feature-branch guard; new release paths incl. a real-git end-to-end RPC test)
  • framework-dashboard: 671 tests, 0 fail (claimed badge, release button flow, failure surfacing)

🤖 Generated with Claude Code

…s and their 6h timer are gone (#1420)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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