feat: controller-owned allocator API on control-plane DB (Closes #600) #622
Merged
sysadmin
merged 1 commits from 2026-07-10 02:12:00 -05:00
feat/issue-600-controller-allocator-api into master
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#622
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
Implements #600 — controller-owned
gitea_allocate_next_workon the merged #613 control-plane DB substrate.Dependency chain:
#613 substrate → #600 allocator (this PR) → #612 incident bridge#612 remains downstream and incomplete. This PR never assigns raw monitoring incidents.
Substrate proof
prgs/masterat merge commit10228e1c068ade36d08e696b7473bcf0a39d0c0d(PR #619 / #613).ControlPlaneDB.assign_and_leaseonly — not file locks or comment-only leases.Changes
allocator_service.pygitea_mcp_server.pygitea_allocate_next_work+ Gitea inventorytask_capability_map.pyallocate_next_workcapabilitytests/test_allocator_service.pydocs/architecture/control-plane-db-substrate.mdOutcomes
assigned_work·preview(dry-run) ·wait·blocked_by_terminal_path·no_safe_work·role_ineligibleRouting (ADR §5.3)
Validation
Closes #600
Canonical Issue State
STATE:
awaiting review
WHO_IS_NEXT:
reviewer
NEXT_ACTION:
review PR #622 at head
db5d14184ffor issue #600 allocator API built on #613 control-plane substrate; keep issue #612 out of scopeNEXT_PROMPT:
WHAT_HAPPENED:
Author implemented controller-owned allocator API on the #613 substrate and opened PR #622 with body Closes #600.
WHY:
LLM sessions were self-selecting the same issue/PR; #600 requires DB-backed atomic allocation after substrate #613 landed at commit
10228e1c06.RELATED_PRS:
#622 (this PR for #600); #619 closed #613 substrate at 10228e1; #612 remains open and downstream
BLOCKERS:
none that block reviewer validation of PR #622; issue #612 stays dependency-waiting until #600 is fully accepted and a separate session schedules the bridge
VALIDATION:
pytest tests/test_allocator_service.py tests/test_control_plane_db.py -q reported 34 passed; git diff --check against prgs/master is clean; head db5d14184f20626fc3ff3208622ac4e3237655c9; substrate ancestor
10228e1c06LAST_UPDATED_BY:
jcwalker3 (prgs-author)
[THREAD STATE LEDGER] PR #622 / Issue #600 — author implementation posted for review
What is true now:
db5d14184f10228e1c06What changed:
What is blocked:
Who/what acts next:
repo: Scaled-Tech-Consulting/Gitea-Tools
pr: #622
issue: none
reviewer_identity: sysadmin
profile: prgs-reviewer
session_id: 60669-a25749a76562
worktree: /Users/jasonwalker/Development/Gitea-Tools/branches/review-pr-622
phase: claimed
candidate_head:
db5d14184ftarget_branch: master
target_branch_sha: none
last_activity: 2026-07-10T07:05:32Z
expires_at: 2026-07-10T09:05:32Z
blocker: none
repo: Scaled-Tech-Consulting/Gitea-Tools
pr: #622
issue: none
reviewer_identity: sysadmin
profile: prgs-reviewer
session_id: 60669-a25749a76562
worktree: /Users/jasonwalker/Development/Gitea-Tools/branches/review-pr-622
phase: claimed
candidate_head:
db5d14184ftarget_branch: master
target_branch_sha: none
last_activity: 2026-07-10T07:08:35Z
expires_at: 2026-07-10T09:08:35Z
blocker: none
Canonical PR State
STATE: merge
WHO_IS_NEXT: merger
NEXT_ACTION: Merge PR #622 under profile prgs-merger on explicit operator command
NEXT_PROMPT:
WHAT_HAPPENED: Reviewed PR #622 implementing the #600 controller allocator API on the #613 control-plane DB substrate. All 34 tests in test_allocator_service.py and test_control_plane_db.py passed.
WHY: The allocator API implements atomic DB assignments, correct role routing, terminal-path first prioritization, and proper dry-run/apply outcomes, satisfying all acceptance criteria. Sentry/GlitchTip raw incident mapping (#612) remains deferred downstream.
ISSUE: #600
HEAD_SHA:
db5d14184fREVIEW_STATUS: APPROVED
MERGE_READY: true
BLOCKERS: none
VALIDATION: 34 passed (tests/test_allocator_service.py + tests/test_control_plane_db.py)
LAST_UPDATED_BY: sysadmin
adopted_at: 2026-07-10T07:11:41Z
adopted_by_identity: sysadmin
adopted_by_profile: prgs-merger
adopted_from_session_id: 60669-a25749a76562
adopted_from_profile: prgs-reviewer
adopted_from_reviewer_identity: sysadmin
adopted_from_comment_id: 9335
adoption_reason: merger-handoff-approved-head
repo: Scaled-Tech-Consulting/Gitea-Tools
pr: #622
issue: #600
reviewer_identity: sysadmin
profile: prgs-merger
session_id: 65784-539b6b7dd505
worktree: /Users/jasonwalker/Development/Gitea-Tools/branches/merge-control
phase: adopted
candidate_head:
db5d14184ftarget_branch: master
target_branch_sha: none
last_activity: 2026-07-10T07:11:41Z
expires_at: 2026-07-10T09:11:41Z
blocker: none