fix(allocator): pre-rank exclusions and candidates_json transport (Closes #776) #777
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#777
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.
Summary
Fixes allocator MCP defects exposed by the Grok canary: missing fail-closed pre-rank exclusions and broken
candidates_jsonstring/list transport.Changes
exclude_issue_numbersongitea_allocate_next_work; excluded numbers removed before ranking/selection/lease.candidates_jsonaccepts already-decoded lists and JSON strings; rejects malformed JSON, scalars, invalid records, and booleans-as-integers fail-closed.candidate_set_fingerprinton dry-run and apply; apply rejects material fingerprint drift.blocked_by_excluded_own_leasewith resume/release guidance.excluded_by_controller; all-excluded yields WAIT with no lease.Files
allocator_service.pygitea_mcp_server.pytests/test_allocator_pre_rank_exclusions.pyTests
tests/test_allocator_*.pyand control-plane/dashboard): 140 passedtests/test_allocator_pre_rank_exclusions.py: all passed52ded0ea…(not introduced by this PR)Published head
d17f055e8646c38a2f473aa39b01bae7e0abf2740570dd62…vsc3fa30c1…)Closes #776
CTH: Author Handoff
Canonical Issue State
STATE: author_complete_pr_open
WHO_IS_NEXT: reviewer
NEXT_ACTION: formal review of PR #777 at head d17f055e8646c38a2f473aa39b01bae7e0abf274; do not merge from author role
NEXT_PROMPT:
WHAT_HAPPENED: Implemented fail-closed allocator pre-rank exclusions and candidates_json transport normalization for Issue #776; pushed head d17f055e8646c38a2f473aa39b01bae7e0abf274; opened PR #777.
WHY: Grok canary proved native MCP lacked exclude_issue_numbers and coerced candidates_json incorrectly, allowing protected #617 to be leased.
RELATED_PRS: PR #777 closes Issue #776; prior terminal canary path was PR #775 / Issue #617 (closed; not reopened).
BLOCKERS: none
VALIDATION: focused allocator suite 140 passed; tests/test_allocator_pre_rank_exclusions.py all passed; full suite 3957 passed / 11 failed (same 11 failures on pristine base
52ded0ea— pre-existing).LAST_UPDATED_BY: jcwalker3 / prgs-author
Published head:
d17f055e86Tree:
0570dd62c8(differs from masterc3fa30c183)Branch: fix/issue-776-allocator-pre-rank-exclusions
Worktree: /Users/jasonwalker/Development/Gitea-Tools/branches/issue-776-allocator-pre-rank-exclusions
Files: allocator_service.py, gitea_mcp_server.py, tests/test_allocator_pre_rank_exclusions.py
exact next role: prgs-reviewer
repo: Scaled-Tech-Consulting/Gitea-Tools
pr: #777
issue: #776
reviewer_identity: sysadmin
profile: prgs-reviewer
session_id: 23268-7972139ddcca
worktree: /Users/jasonwalker/Development/Gitea-Tools/branches/review-pr-777-d17f055
phase: claimed
candidate_head:
d17f055e86target_branch: master
target_branch_sha:
52ded0ea71last_activity: 2026-07-21T03:14:15Z
expires_at: 2026-07-21T03:24:15Z
blocker: none
repo: Scaled-Tech-Consulting/Gitea-Tools
pr: #777
issue: #776
reviewer_identity: sysadmin
profile: prgs-reviewer
session_id: 23268-7972139ddcca
worktree: /Users/jasonwalker/Development/Gitea-Tools/branches/review-pr-777-d17f055
phase: claimed
candidate_head:
d17f055e86target_branch: master
target_branch_sha:
52ded0ea71last_activity: 2026-07-21T03:18:29Z
expires_at: 2026-07-21T03:28:29Z
blocker: none
repo: Scaled-Tech-Consulting/Gitea-Tools
pr: #777
issue: #776
reviewer_identity: sysadmin
profile: prgs-reviewer
session_id: 23268-7972139ddcca
worktree: /Users/jasonwalker/Development/Gitea-Tools/branches/review-pr-777-d17f055
phase: claimed
candidate_head:
d17f055e86target_branch: master
target_branch_sha:
52ded0ea71last_activity: 2026-07-21T03:18:55Z
expires_at: 2026-07-21T03:28:55Z
blocker: none
Formal review body
Canonical PR State
STATE: reviewer_verdict_ready
WHO_IS_NEXT: reviewer
NEXT_ACTION: record APPROVE at head
d17f055e86via native MCP review mutationNEXT_PROMPT:
WHAT_HAPPENED: Completed independent AC1–AC9 review of PR #777 / Issue #776; preparing native APPROVE at pinned head.
WHY: Full base..head diff and independent validation support approval.
ISSUE: #776
HEAD_SHA:
d17f055e86REVIEW_STATUS: pending_native_approve
MERGE_READY: false
BLOCKERS: none
VALIDATION: tests/test_allocator_pre_rank_exclusions.py 24 passed; allocator suites 97 passed; full suite 3957 passed / 11 pre-existing failures on base
52ded0ea.LAST_UPDATED_BY: sysadmin / prgs-reviewer
AC1–AC9 PASS. Scope limited to allocator_service.py, gitea_mcp_server.py, tests/test_allocator_pre_rank_exclusions.py.
repo: Scaled-Tech-Consulting/Gitea-Tools
pr: #777
issue: #776
reviewer_identity: sysadmin
profile: prgs-reviewer
session_id: 23268-7972139ddcca
worktree: /Users/jasonwalker/Development/Gitea-Tools/branches/review-pr-777-d17f055
phase: released
candidate_head:
d17f055e86target_branch: master
target_branch_sha:
52ded0ea71last_activity: 2026-07-21T03:20:21Z
expires_at: 2026-07-21T03:30:21Z
blocker: manual-release
CTH: Reviewer Handoff
Canonical PR State
STATE: approved_at_current_head
WHO_IS_NEXT: merger
NEXT_ACTION: merge PR #777 at expected head
d17f055e86via prgs-merger if gates passNEXT_PROMPT:
WHAT_HAPPENED: Formal independent review submitted APPROVE via native gitea_submit_pr_review at head d17f055e8646c38a2f473aa39b01bae7e0abf274; reviewer lease released (comment 13525).
WHY: AC1–AC9 satisfied; full base..head scope clean; independent tests green; full-suite failures proven pre-existing on base
52ded0ea.ISSUE: #776
HEAD_SHA:
d17f055e86REVIEW_STATUS: APPROVE
MERGE_READY: true
RELATED_PRS: PR #777 closes Issue #776
BLOCKERS: none
VALIDATION: test_allocator_pre_rank_exclusions 24 passed; allocator/control-plane/dashboard 97 passed; full suite 3957 passed / 11 failed (same 11 IDs on pristine base
52ded0ea). gitea_assess_pr_sync_status: approval_at_current_head=true, recommended_next_action=merge_now, approval_valid_for_merge=true.LAST_UPDATED_BY: sysadmin / prgs-reviewer
NATIVE_REVIEW_PROOF: native MCP gitea_submit_pr_review performed=true submitted_verdict=APPROVED review_verdict_visible=true at head
d17f055e86by sysadminReadback: approval_at_current_head=true; stale_approval=false; reviewed_head_sha=d17f055e8646c38a2f473aa39b01bae7e0abf274; reviewer lease released comment_id=13525.
exact next role: prgs-merger
repo: Scaled-Tech-Consulting/Gitea-Tools
pr: #777
issue: #776
reviewer_identity: sysadmin
profile: prgs-merger
session_id: 23266-39c3a20cb63b
worktree: /Users/jasonwalker/Development/Gitea-Tools/branches/merge-pr-777-d17f055
phase: claimed
candidate_head:
d17f055e86target_branch: master
target_branch_sha:
52ded0ea71last_activity: 2026-07-21T03:32:32Z
expires_at: 2026-07-21T03:42:32Z
blocker: none
Stale #332 review-decision lock cleanup (#594)
Status: APPLIED
sysadminprgs-merger2026-07-21T03:33:08.409776+00:00approveon PR fix(allocator): pre-rank exclusions and candidates_json transport (Closes #776) (#777)closed(merged=True)1d11cbab0fdc529859bdace2bd01e20da22ff4491prgs-reviewerManual deletion of session-state files is not the workflow.
This path only clears a lock when the referenced PR is merged/closed.
repo: Scaled-Tech-Consulting/Gitea-Tools
pr: #777
issue: #776
reviewer_identity: sysadmin
profile: prgs-merger
session_id: 23266-39c3a20cb63b
worktree: /Users/jasonwalker/Development/Gitea-Tools/branches/merge-pr-777-d17f055
phase: released
candidate_head:
d17f055e86target_branch: master
target_branch_sha:
52ded0ea71last_activity: 2026-07-21T03:37:44Z
expires_at: 2026-07-21T03:47:44Z
blocker: post-merge-moot
CTH: Terminal Cleanup Ledger (reconciler)
Canonical Issue State
STATE: terminal_cleanup_complete
WHO_IS_NEXT: controller
NEXT_ACTION: optional separate bounded canary of the landed allocator exclusion path; do not re-review or re-merge PR #777
NEXT_PROMPT:
WHAT_HAPPENED: Post-merge terminal cleanup for merged PR #777 / closed Issue #776 completed under prgs-reconciler / sysadmin.
WHY: Merger handoff required reconciler-owned cleanup of moot merger lease, residual status:pr-open, session worktrees, and feature branch after merge commit landed on master.
RELATED_PRS: PR #777 merged at
1d11cbab0f(closes Issue #776); headd17f055e86BLOCKERS: none for cleanup scope
VALIDATION: Gate Zero parity at 1d11cbab…; PR closed/merged with matching merge commit; Issue #776 closed;
d17f055ancestor of master; open-PR inventory complete (0 open); no open PR on feature branch; review 490 historical APPROVED at d17f055; merger lease released comment 13537; reviewer lease already released comment 13525; remote branch verified_absent; three worktrees absent/unregistered; local branch deleted via git branch -d; control checkout clean at 1d11cbab…LAST_UPDATED_BY: sysadmin / prgs-reconciler
Gate Zero
1d11cbab0fdc529859bdace2bd01e20da22ff449(ff-only parity; clean)gitea-reconciler/ profileprgs-reconciler/ identitysysadmin(verified)prgs/master=1d11cbab…(in_parity=true)Terminal verification
1d11cbab0fdc529859bdace2bd01e20da22ff449d17f055e8646c38a2f473aa39b01bae7e0abf274ancestor of live masterd17f055…fix/issue-776-allocator-pre-rank-exclusionsLease cleanup
23266-39c3a20cb63b/ comment13529/ headd17f055…: dry-run cleanup_allowed=true; apply posted terminal released marker comment 13537 (blocker: post-merge-moot)13525: already phase released — inactiveLabels
status:pr-openfrom closed Issue Allocator MCP lacks fail-closed pre-rank exclusions and coerces structured candidates_json incorrectly (#776)anti-stomp,mcp-health,type:bug,workflow-hardeningAuthor head/tree comparison
d17f055e8646c38a2f473aa39b01bae7e0abf2740570dd62c848e31e7632fa7d7829c9fb0e832dcbidentical to merged head and master treesWorktree / branch actions (readback)
branches/review-pr-777-d17f055branches/merge-pr-777-d17f055branches/issue-776-allocator-pre-rank-exclusionsfix/issue-776-allocator-pre-rank-exclusionsgit branch -dafter unattached+landedgitea_cleanup_merged_pr_branchexact confirmationCleanup mutations
gitea_cleanup_post_merge_moot_leaseapply → comment 13537gitea_set_issue_labelson Allocator MCP lacks fail-closed pre-rank exclusions and coerces structured candidates_json incorrectly (#776)gitea_cleanup_merged_pr_branchon fix(allocator): pre-rank exclusions and candidates_json transport (Closes #776) (#777)git branch -dMerge mutations
gitea_merge_pr)Preserved residual artifacts
Control checkout final
1d11cbab0fdc529859bdace2bd01e20da22ff449exact next role: controller