Skip to content

The cluster the agent is deciding is locked, and the Review page says it is working - #460

Merged
WaylandYang merged 2 commits into
devfrom
feat/agent-lock-and-status
Sep 6, 2026
Merged

WaylandYang merged 2 commits into
devfrom
feat/agent-lock-and-status

Conversation

@WaylandYang

Copy link
Copy Markdown
Contributor

Follow-up to #457 (record 0025's "What a reader sees" gains a paragraph).

What this adds

  • A lock on the cluster in flight. When the govern job takes a cluster it marks those pairs stage = adjudicating; decide_review refuses such a pair with a 409 ("The agent is deciding this pair right now; wait for its proposal or turn governance off") while the base's switch is on and its job is running. All three conditions are needed, so a stale mark left by a crashed job, or by the old adjudicator when the switch is off, locks nothing; the job clears every mark when it starts and when it ends, whatever way it ends.
  • The Review page shows it. A locked duplicate card shows "The agent is deciding this pair" with a pulsing dot and its Merge / Keep buttons and checkbox off; "Select this page" skips locked pairs. The Agent item in the rail carries a pulsing dot while the job runs. The Overview's Agent section says "The agent is working · N pairs still to look at" while it runs, and "N pairs waiting for the agent" when the switch is on and there is backlog.
  • ReviewCounts.agent_running / agent_queue and ReviewSummary.agent.running / queue carry the state; the page refreshes on the review events the job already emits after each cluster.

Verified

  • Store test: with a running govern job row, a locked pair refuses decide_review; releasing the locks or removing the job unlocks it; queue_len counts the pairs the agent has not looked at.
  • On the dev server against the bench base during a run: the Overview line reads "The agent is working · 449 pairs still to look at", the rail dot pulses, and a POST to decide a locked pair returns 409 with the message.

🤖 Generated with Claude Code

WaylandYang and others added 2 commits September 7, 2026 06:59
… it is working

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Signed-off-by: WaylandYang <wayland0916@gmail.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Signed-off-by: WaylandYang <wayland0916@gmail.com>
@WaylandYang
WaylandYang merged commit 872b91c into dev Sep 6, 2026
4 checks passed
@WaylandYang
WaylandYang deleted the feat/agent-lock-and-status branch September 6, 2026 23:28
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