feat(author): dirty-preserving same-claimant author-session rebind (#864) #865
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#865
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
Closes #864.
Adds an explicit sanctioned recovery operation that rebinds a live author session to an already-registered dirty issue worktree when:
gitea_lock_issuecorrectly refuses the dirty worktree;This is the capability identified by the reconciler as:
BLOCKED + DIAGNOSE — OPERATOR REBIND CAPABILITY REQUIREDIt unblocks publication of PR #861 remediations without mutating the real #860 worktree in this PR.
Distinct from #860
Capability and safety model
gitea_rebind_dirty_same_claimant_author_sessionalready_reboundgitea_rebind_dirty_same_claimant_author_sessionis create-PR sanctioned_session_author_lock_worktree)Role restrictions
gitea-author: exact same claimant onlygitea-reconciler: assess + tightly pinned execute withauthorize_reconciler_executeonly; no commit/publication authorityallowed=trueis not ownership proofFail-closed cases
Live old PID; foreign/mismatched identity/profile; ambiguous ownership; unregistered/noncanonical/symlink paths; branch/issue/repo/path disagreement; head movement; dirty-path or fingerprint drift; competing session/lock/lease; malformed durable state; partial/replayed journal.
Ordinary dirty-worktree locking remains fail-closed.
Tests
Includes real-git integration coverage for success path, byte preservation, fingerprint pins, atomic session-pointer swap, retry, live/foreign/profile/competing/head/path/malformed refusals, ordinary dirty-lock fail-closed, and #860-class 7-path fixture (no real #860 mutation).
Non-mutation confirmation
Commit
a3f8f67c9323ec7e78b5c7cc8ce8b051ab061e23Next role
gitea-reviewer for this bootstrap PR at the authoritative head above.
repo: Scaled-Tech-Consulting/Gitea-Tools
pr: #865
issue: #864
reviewer_identity: sysadmin
profile: prgs-reviewer
session_id: 70847-229338691d4f
worktree: /Users/jasonwalker/Development/Gitea-Tools/branches/fix-issue-864-dirty-same-claimant-session-rebind
phase: claimed
candidate_head:
a3f8f67c93target_branch: master
target_branch_sha:
6d0015cabclast_activity: 2026-07-24T04:42:53Z
expires_at: 2026-07-24T04:52:53Z
blocker: none
Canonical PR State
STATE: reviewed-approved
WHO_IS_NEXT: merger
NEXT_ACTION: gitea-merger acquires a merger PR lease and merges PR #865 into master at head
a3f8f67c93on explicit approval. Approval is head-scoped and becomes invalid if the head moves.NEXT_PROMPT:
WHAT_HAPPENED: Independent gitea-reviewer review of bootstrap PR #865. Read the new module and MCP wiring line by line and independently ran the full claimed test suite (123 passed) at the pinned head. Verdict APPROVE.
WHY: The author same-claimant rebind path — the actual unblock for PR #861 remediation by jcwalker3 — is correct, safe, and fail-closed. Role and identity are derived server-side (not caller-spoofable), so no foreign-author worktree hijack is possible. Byte preservation is enforced by disk-observed fingerprints compared to caller pins (pins cannot be made tautological), with pre-bind and post-bind re-verification. Fail-closed coverage is comprehensive; journal-before-mutation + CAS generation; ordinary gitea_lock_issue dirty refusal is not weakened. Scope is clean and matches issue #864 exactly.
ISSUE: 864
HEAD_SHA:
a3f8f67c93REVIEW_STATUS: APPROVE
MERGE_READY: yes — 0 behind base, no conflicts, mergeable, checks not required; approval head-scoped to
a3f8f67cBLOCKERS: none
Non-blocking follow-ups (do NOT block this bootstrap PR — all fail CLOSED, no safety regression):
VALIDATION: pytest tests/test_dirty_same_claimant_session_rebind.py tests/test_issue_lock_store.py tests/test_issue_753_dead_pid_lock_recovery.py tests/test_issue_772_unpublished_claim_recovery.py tests/test_issue_lock_provenance.py -> 123 passed (run locally at
a3f8f67c). No local edits, no code mutations by this review.LAST_UPDATED_BY: gitea-reviewer sysadmin/prgs-reviewer
NATIVE_REVIEW_PROOF: workflow=review-merge-pr hash=263d0a6cb8a6 schema=b6c65affc336; reviewer=sysadmin/prgs-reviewer; head=a3f8f67c9323ec7e78b5c7cc8ce8b051ab061e23; lease_comment=15350; verdict=APPROVE.
repo: Scaled-Tech-Consulting/Gitea-Tools
pr: #865
issue: #864
reviewer_identity: sysadmin
profile: prgs-merger
session_id: 70855-19a097c3ea0f
worktree: /Users/jasonwalker/Development/Gitea-Tools/branches/fix-issue-864-dirty-same-claimant-session-rebind
phase: claimed
candidate_head:
a3f8f67c93target_branch: master
target_branch_sha:
6d0015cabclast_activity: 2026-07-24T04:54:18Z
expires_at: 2026-07-24T05:04:18Z
blocker: none
Stale #332 review-decision lock cleanup (#594)
Status: APPLIED
sysadminprgs-merger2026-07-24T04:55:09.988254+00:00approveon PR feat(author): dirty-preserving same-claimant author-session rebind (#864) (#865)closed(merged=True)ef14622ba0badd0cd7d654c05af13aca7d81bc051prgs-reviewerManual deletion of session-state files is not the workflow.
This path only clears a lock when the referenced PR is merged/closed.