Created
Jun 22, 20:55
Started
Jun 23, 14:17
Completed
Jun 23, 15:35
DevOps handoff
Type
Feature
Shape
backend
Worktree Slug
session-claim-lease-gate
Repositories
mcritchie-studio
Release Train
—
Branch
feat/session-claim-lease-gate
Local URL
—
QA URL
—
Production URL
—
Acceptance Criteria
Expected Test Plan
Checks Run
Agent Context
V2 of session-resume (V1 shipped: stores session_id + session_provider in metadata.devops, /tasks copy-resume control, bin/statusline last-4). V2 adds the ENFORCEMENT gate. Key design decision (settled this session): claim by a LIVE INSTANCE, not bare session id — claimed_by = session_id + a per-process nonce generated at process start, with claim_expires_at (TTL lease) renewed by heartbeat. Before a session moves a task to building, refuse if it's already claimed by a different, non-expired instance ('claimed by <instance>, last heartbeat Ns ago — steal?'). The instance nonce is what catches the operator's terminal-A/terminal-B case: 'claude --resume X' in terminal B is a NEW process (new nonce) forking from the same transcript, so the gate detects a second live instance of the same session and warns. Same mechanism also catches two DIFFERENT sessions grabbing one task (the original duplicate-work problem — e.g. my #88 vs the parallel #98 this session). This is the build-stage analogue of the heartbeat lease already specced in devops-cycle-design.md §4.1. Resume link should reuse the liveness check (warn 'session looks active in another terminal — resume anyway?').
Stage Timeline
Who handled each stage, the time it took (measured), and the model / tokens / cost reported (best-effort) — plus who's on it right now. — means the agent didn't report that metric.
Conversation
QA review feedback, agent handoffs, and follow-up notes for this task.
2-senior review (reviewer-select: carl heavy + shannon light). BOTH APPROVE. Carl(heavy, adversarial) EMPIRICALLY ran the prod-only nonce resolver live inside a Claude Code bash tool: 'claude' ancestor stable, nonce identical across invocations (0d190f608cf8), TTY degrade also stable per-terminal -> AC#4 holds via 2 mechanisms; lease fails-open on every garbled/nil path (never bricks a task); heartbeat never steals a live claim; claim persists through the real API update! path (3 keys in DEVOPS_SCALAR_KEYS). 111 tests 0 failures, rubocop clean. Non-blocking: sub-second TOCTOU on same-unclaimed-task = last-writer-wins (out of scope for a soft signal); cosmetic <=120s live-dot. Shannon(light) APPROVE — board hint well-formed + degrades, CLI warn/steal message clear (stderr+exit1), --steal documented; noted 'refuses vs warns' = intended gate semantics per spec. = 2 approvals.
Sealed-bid sizing
Edit →Alex (PM)
—
Avi (PO)
—
Dev
—
Actual
—
We emailed a one-tap sign-in link to . It expires shortly and can only be used once.
No email? Check spam, or close this and try again.