feat: require Controller Handoff plus Thread State Ledger (Closes #507) #511
Labels
Clear labels
allocator
anti-stomp
architecture
bug
chore
codex
concurrency
contamination
control-plane
dashboard
database
design
documentation
enhancement
gitea
glitchtip
important
incident
incident-bridge
integration
jenkins
labels
leases
mcp
mcp-health
mcp-menu
multi-project
mutating
nice-to-have
observability
portability
preflight
protected-branch
queue
read-only
reconnect
recovery
refactor
release
reliability
resumable-review
reviewer
roadmap
safety
security
self-hosted
sentry
stale-runtime
status:blocked
status:in-progress
status:pr-open
status:ready
terminal-lock
testing
tracker
type:bug
type:feature
type:feature
type:guardrail
visibility
workflow
workflow-hardening
workflow-hardening
Controller-owned work allocator
Prevent concurrent LLM session stomping
Architecture / structural design
OpenAI Codex client / workflow session surface
Concurrent session safety
Workflow or session contamination incident
MCP control-plane coordination and allocation authority
MCP operational dashboard/queue view
Internal coordination storage (SQLite/Postgres)
Design / investigation, no implementation
Docs / runbooks
New feature or improvement
Gitea MCP workflow
GlitchTip integration
Operational or process incident requiring durable audit trail
Sentry-to-Gitea incident bridging
Integration testing
Jenkins integration
Label taxonomy management
Lease adopt/release/expire lifecycle
MCP server / tooling
MCP namespace and runtime health
MCP menu surface
Work spanning multiple monitoring projects or Gitea repos
Mutating action; requires gating
Observability, metrics, traces, error reporting
Cross-platform / portability
Shared preflight gates before mutation
Protected branch / stable-branch policy concern
Work queue visibility and allocation
Read-only, no mutation
MCP client reconnect/reload recovery path
Recovery paths for stale/foreign leases
Code refactor / restructure
Release / versioning
Reliability / failure handling
Persist and resume prepared review verdicts across sessions
Reviewer workflow tooling
Roadmap / umbrella issue
Safety rails and fail-closed mutation guards
Security / trust boundary
Self-hosted infrastructure integration
Sentry error monitoring integration
Stale backend daemon / runtime-vs-master parity failures
Issue is blocked
Issue is being worked on
Issue has an open pull request
Issue is ready for work
Terminal review lock (#332) path
Tests / test coverage
Issue tracker hygiene / meta
Bug or defect
Feature or enhancement
Feature or enhancement
Safety gate or guardrail
Workflow state visibility for LLMs/operators
Cross-tool workflow
LLM workflow coordination hardening
LLM workflow coordination hardening
No labels
Milestone
No items
No Milestone
Projects
Clear projects
No projects
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: Scaled-Tech-Consulting/Gitea-Tools#511
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Closes #507
Summary
Requires every meaningful controller handoff to be followed by a concise
[THREAD STATE LEDGER]comment that states canonical thread truth in ~30 seconds.Changes
thread_state_ledger_validator.pywith ambiguous-state detection, mutation-ledger contradiction checks, and blocker classificationsthread_state_ledger_examples.pydocs/two-comment-workflow.mdand examplesgitea_create_issue_commentshared.two_comment_workflowrule tofinal_report_validator.pytests/test_thread_state_ledger_validator.py(15 tests)Validation
pr: #511
branch: feat/issue-507-controller-thread-ledger
worktree: /Users/jasonwalker/Development/Gitea-Tools/branches/issue-507-controller-thread-ledger
profile: prgs-author
session_id: unknown
phase: claimed
head_before:
59f2de9711expires_at: 2026-07-09T04:31:20Z
reviewer_active: no
repo: Scaled-Tech-Consulting/Gitea-Tools
pr: #511
issue: #507
reviewer_identity: sysadmin
profile: prgs-reviewer
session_id: 10371-5292735bc447
worktree: /Users/jasonwalker/Development/Gitea-Tools/branches/review-feat-issue-507-controller-thread-ledger
phase: claimed
candidate_head:
97b3c6573btarget_branch: master
target_branch_sha: none
last_activity: 2026-07-09T03:08:54Z
expires_at: 2026-07-09T05:08:54Z
blocker: none
repo: Scaled-Tech-Consulting/Gitea-Tools
pr: #511
issue: #507
reviewer_identity: sysadmin
profile: prgs-reviewer
session_id: 10371-5292735bc447
worktree: /Users/jasonwalker/Development/Gitea-Tools/branches/review-feat-issue-507-controller-thread-ledger
phase: released
candidate_head:
97b3c6573btarget_branch: master
target_branch_sha: none
last_activity: 2026-07-09T03:09:36Z
expires_at: 2026-07-09T05:09:36Z
blocker: manual-release
repo: Scaled-Tech-Consulting/Gitea-Tools
pr: #511
issue: #507
reviewer_identity: sysadmin
profile: prgs-reviewer
session_id: continue-prgs-review-bbe8ce14df90
worktree: /Users/jasonwalker/Development/Gitea-Tools/branches/issue-507-controller-thread-ledger
phase: claimed
candidate_head:
a8177c2e73target_branch: master
target_branch_sha: none
last_activity: 2026-07-09T13:22:46Z
expires_at: 2026-07-09T15:22:46Z
blocker: none
repo: Scaled-Tech-Consulting/Gitea-Tools
pr: #511
issue: #507
reviewer_identity: sysadmin
profile: prgs-reviewer
session_id: continue-prgs-review-bbe8ce14df90
worktree: /Users/jasonwalker/Development/Gitea-Tools/branches/issue-507-controller-thread-ledger
phase: claimed
candidate_head:
a8177c2e73target_branch: master
target_branch_sha: none
last_activity: 2026-07-09T13:23:16Z
expires_at: 2026-07-09T15:23:16Z
blocker: none
repo: Scaled-Tech-Consulting/Gitea-Tools
pr: #511
issue: #507
reviewer_identity: sysadmin
profile: prgs-reviewer
session_id: continue-prgs-review-bbe8ce14df90
worktree: /Users/jasonwalker/Development/Gitea-Tools/branches/issue-507-controller-thread-ledger
phase: claimed
candidate_head:
a8177c2e73target_branch: master
target_branch_sha: none
last_activity: 2026-07-09T13:23:34Z
expires_at: 2026-07-09T15:23:34Z
blocker: none
repo: Scaled-Tech-Consulting/Gitea-Tools
pr: #511
issue: #507
reviewer_identity: sysadmin
profile: prgs-reviewer
session_id: continue-prgs-review-bbe8ce14df90
worktree: /Users/jasonwalker/Development/Gitea-Tools/branches/issue-507-controller-thread-ledger
phase: claimed
candidate_head:
a8177c2e73target_branch: master
target_branch_sha: none
last_activity: 2026-07-09T13:24:02Z
expires_at: 2026-07-09T15:24:02Z
blocker: none
repo: Scaled-Tech-Consulting/Gitea-Tools
pr: #511
issue: #507
reviewer_identity: sysadmin
profile: prgs-reviewer
session_id: continue-prgs-review-bbe8ce14df90
worktree: /Users/jasonwalker/Development/Gitea-Tools/branches/issue-507-controller-thread-ledger
phase: claimed
candidate_head:
a8177c2e73target_branch: master
target_branch_sha: none
last_activity: 2026-07-09T13:24:29Z
expires_at: 2026-07-09T15:24:29Z
blocker: none
repo: Scaled-Tech-Consulting/Gitea-Tools
pr: #511
issue: #507
reviewer_identity: sysadmin
profile: prgs-reviewer
session_id: continue-prgs-review-bbe8ce14df90
worktree: /Users/jasonwalker/Development/Gitea-Tools/branches/issue-507-controller-thread-ledger
phase: claimed
candidate_head:
a8177c2e73target_branch: master
target_branch_sha: none
last_activity: 2026-07-09T13:24:56Z
expires_at: 2026-07-09T15:24:56Z
blocker: none
repo: Scaled-Tech-Consulting/Gitea-Tools
pr: #511
issue: #507
reviewer_identity: sysadmin
profile: prgs-reviewer
session_id: continue-prgs-review-bbe8ce14df90
worktree: /Users/jasonwalker/Development/Gitea-Tools/branches/issue-507-controller-thread-ledger
phase: claimed
candidate_head:
a8177c2e73target_branch: master
target_branch_sha: none
last_activity: 2026-07-09T13:25:41Z
expires_at: 2026-07-09T15:25:41Z
blocker: none
Review APPROVE — PR #511
Sound scoped change for #507: Controller Handoff + Thread State Ledger validation.
Evidence: 10 files; local master merge clean; pytest 64 passed; fail-closed tagged comment gate only.
Canonical PR State
STATE: APPROVED at current head; awaiting merge
WHO_IS_NEXT: merger
NEXT_ACTION: merge PR #511 with expected_head_sha pin and expected_changed_files
NEXT_PROMPT:
WHAT_HAPPENED: Reviewer approved after local validation of thread-state ledger work
WHY: Scope matches #507; tests green; no blockers
ISSUE: #507
HEAD_SHA:
a8177c2e73REVIEW_STATUS: APPROVE
MERGE_READY: yes
BLOCKERS: none
VALIDATION: pytest 64 passed (thread_state_ledger + final_report + mcp comment gate) after merging prgs/master locally
LAST_UPDATED_BY: sysadmin (prgs-reviewer)
adopted_at: 2026-07-09T13:26:27Z
adopted_by_identity: sysadmin
adopted_by_profile: prgs-merger
adopted_from_session_id: continue-prgs-review-bbe8ce14df90
adopted_from_profile: prgs-reviewer
adopted_from_reviewer_identity: sysadmin
adopted_from_comment_id: 8023
adoption_reason: merger-handoff-approved-head
repo: Scaled-Tech-Consulting/Gitea-Tools
pr: #511
issue: #507
reviewer_identity: sysadmin
profile: prgs-merger
session_id: continue-prgs-review-bbe8ce14df90
worktree: /Users/jasonwalker/Development/Gitea-Tools/branches/issue-507-controller-thread-ledger
phase: adopted
candidate_head:
a8177c2e73target_branch: master
target_branch_sha: none
last_activity: 2026-07-09T13:26:27Z
expires_at: 2026-07-09T15:26:27Z
blocker: none
adopted_at: 2026-07-09T13:27:33Z
adopted_by_identity: sysadmin
adopted_by_profile: prgs-merger
adopted_from_session_id: continue-prgs-review-bbe8ce14df90
adopted_from_profile: prgs-merger
adopted_from_reviewer_identity: sysadmin
adopted_from_comment_id: 8027
adoption_reason: merger-handoff-approved-head
repo: Scaled-Tech-Consulting/Gitea-Tools
pr: #511
issue: #507
reviewer_identity: sysadmin
profile: prgs-merger
session_id: continue-prgs-merger-9e0101f9da
worktree: /Users/jasonwalker/Development/Gitea-Tools/branches/issue-507-controller-thread-ledger
phase: adopted
candidate_head:
a8177c2e73target_branch: master
target_branch_sha: none
last_activity: 2026-07-09T13:27:33Z
expires_at: 2026-07-09T15:27:33Z
blocker: none
repo: Scaled-Tech-Consulting/Gitea-Tools
pr: #511
issue: #507
reviewer_identity: sysadmin
profile: prgs-merger
session_id: continue-prgs-merger-9e0101f9da
worktree: /Users/jasonwalker/Development/Gitea-Tools/branches/issue-507-controller-thread-ledger
phase: released
candidate_head:
a8177c2e73target_branch: master
target_branch_sha: none
last_activity: 2026-07-09T13:29:13Z
expires_at: 2026-07-09T15:29:13Z
blocker: post-merge-moot