Author worktree binding can disappear mid-session and mutation guards enforce it inconsistently #618
Closed
opened 2026-07-09 21:21:12 -05:00 by jcwalker3
·
3 comments
No Branch/Tag Specified
master
fix/issue-987-native-mcp-bootstrap
feat/issue-985-project-scoped-launcher-identity
fix/issue-983-cross-repo-base-ref
feat/issue-980-stale-worker-retirement
fix/issue-975-client-identity-heartbeat
fix/issue-973-cross-repo-canonical-roots
fix/issue-970-safely-resolve-missing-worktrees
fix/issue-969-native-mcp-bootstrap
feat/issue-664-break-glass-restart
feat/issue-708-mcp-namespace-attachment
feat/issue-665-restart-audit
fix/issue-700-durable-walls
fix/issue-704-prevent-env-workspace-bindings
feat/issue-707-cross-project-boundaries
fix/issue-690-review-profile-switch-guard
fix/issue-953-bootstrap-lock-provenance
feat/issue-949-native-fleet-inventory
fix/issue-943-runtime-context-helpers
fix/issue-945-owning-pr-renewal-evidence
fix/issue-941-scope-guard-bootstrap-wiring
docs/issue-930-remote-mcp-coupling-inventory
fix/issue-892-author-bootstrap-deadlock
fix/issue-686-detect-reject-manual-mcp
fix/issue-672-mcp-config-drift
fix/issue-689-deterministic-mcp-namespace
feat/issue-666-concurrent-mcp-restart-tests
feat/issue-659-maintenance-drain-mode
feat/issue-648-notifications-console
fix/issue-670-direct-master-incident
feat/issue-644-console-recovery
feat/issue-650-providers-insights
feat/issue-669-scoped-component-recovery
docs/issue-668-mcp-ha-rolling-restart
feat/issue-667-console-restart-controls
feat/issue-645-linkage-console
feat/issue-643-request-preview-initiate
fix/issue-897-permission-stale-runtime-classification
feat/issue-641-runtime-session-view
feat/issue-663-restart-classes
feat/issue-661-drain-proof-hard-gate
fix/issue-854-semantic-container-exclusion
issue-640
fix/issue-682-starlette-httpx2
v1.1.0
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
bug
duplicate
enhancement
help wanted
invalid
question
wontfix
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
Something is not working
This issue or pull request already exists
New feature
Need some help
Something is wrong
More information is needed
This won't be fixed
Milestone
No items
No Milestone
Projects
Clear projects
No projects
No Assignees
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: Scaled-Tech-Consulting/Gitea-Tools#618
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.
Problem
The author MCP runtime can remain bound to a role worktree path that no longer exists on disk.
Observed case:
GITEA_AUTHOR_WORKTREEpointed tobranches/mcp-author-clean-nsgit worktree listpreflight_workspace.inspected_git_root: nullcreate_issuecorrectly failed closed under the branches-only / worktree-existence guard.However, an earlier
create_issue_commentmutation succeeded from the same broader author environment. This suggests mutation guard behavior is inconsistent between issue creation and issue comment paths.Impact
This creates confusing and unsafe behavior:
Required behavior
If a role-bound worktree path is configured but missing, the MCP runtime must fail early and consistently before any mutation.
All author mutation tools should agree on workspace safety.
At minimum, these paths must not disagree:
create_issuecreate_issue_commentAcceptance criteria
Runtime context fails or clearly reports an unhealthy state when a configured role-bound worktree path does not exist.
The error must identify:
git worktree listinspected_git_rootis nullcreate_issueandcreate_issue_commentmust enforce the same worktree-existence rule.If
GITEA_AUTHOR_WORKTREEpoints to a missing path, all author mutation tools must fail closed before API mutation.The runtime should return a clear blocker message:
bound worktree missing; operator must recreate or repoint the worktree and reconnectAdd tests for:
GITEA_AUTHOR_WORKTREEcreate_issueblockedcreate_issue_commentblocked consistentlyinspected_git_root=nullAdd or update canonical
[THREAD STATE LEDGER]example for this blocker class.Related issues
Related but not duplicates:
Desired outcome
A missing role-bound worktree should be a clear environment/tooling blocker.
The MCP runtime must not allow one author mutation path to proceed while another blocks on the same missing worktree binding.
Issue claim heartbeat
Canonical Issue State
STATE: in-progress; local implementation complete; remote publication fails closed on pre-fix author MCP control-checkout binding
WHO_IS_NEXT: user
NEXT_ACTION: reconnect author MCP bound to the #618 worktree, then publish local commit via gitea_commit_files + gitea_create_pr
NEXT_PROMPT:
WHAT_HAPPENED: Durable author worktree resolution implemented and tested locally on branch fix/issue-618-author-worktree-resolution. MCP gitea_commit_files from the live control-checkout-bound author session fails closed (the defect under repair). No shell push or direct API used.
WHY: Author mutations must never silently fall back to control/master; missing role-bound worktrees must fail closed consistently before any mutation.
RELATED_PRS: none yet (publication pending user reconnect)
BLOCKERS: environment/tooling — live author MCP process bound to control checkout; gitea_commit_files has no worktree_path parameter to rebind in-session
VALIDATION: 48 related unit tests passed (tests/test_issue_618_author_worktree_resolution.py + workspace guards)
LAST_UPDATED_BY: author session (jcwalker3)
[THREAD STATE LEDGER] Issue #618 — durable author worktree fix present locally; publication path fails closed on pre-fix MCP binding
What is true now:
What changed:
What is blocked:
Who/what acts next:
Canonical Issue State
STATE: open; AUTHOR_RECOVERY_REQUIRED; local implementation complete at cbf56ccd; not on master; not pushed; no PR
WHO_IS_NEXT: author
NEXT_ACTION: after PR #767 releases author WIP slot — recover lock on fix/issue-618-author-worktree-resolution, rebase onto current prgs/master, re-run #618 tests, publish and open PR (Closes #618); do not open PR from reconciler
NEXT_PROMPT:
WHAT_HAPPENED: Supervised reconciler disposition for #618 only. Candidate cbf56ccd84d81f509e9595fedac82848f8dd5de6 is unique vs master
edaeede, clean worktree, never pushed, no PR. Master lacks bound_worktree_missing / resolve_durable_author_worktree / #618 tests. Classified AUTHOR_RECOVERY_REQUIRED; artifacts preserved; no PR created this session.WHY: #618 required durable author worktree resolution remains absent from master; local commit is the complete intended fix and must be recovered by author after WIP slot free.
RELATED_PRS: none for #618; open author WIP is PR #767 (Closes #607) — do not open #618 PR until that slot releases
BLOCKERS: environment/tooling blocker — local-only unpublished candidate; master missing ACs; exclusive author WIP held by open PR #767; prior publication waited on worktree-bound author MCP
VALIDATION: ancestry/patch-id/blob compare vs prgs/master; ls-remote empty for 618; PR inventory open_count=1 (#767 only); file lock pid 68230 dead; CP leases have no work_number 618; worktree porcelain empty at cbf56ccd; comment 13065 documents same SHA
LAST_UPDATED_BY: reconciler session (sysadmin / prgs-reconciler)
Supervised branch disposition — AUTHOR_RECOVERY_REQUIRED
Profile: prgs-reconciler · Identity: sysadmin · Role: reconciler
Disposition iteration: one supervised pass for Issue #618 only
Date: 2026-07-20
Candidate (preserve)
fix/issue-618-author-worktree-resolutioncbf56ccd84d81f509e9595fedac82848f8dd5de6fcf6981b1ba4d8d5072357ba13be0fdb6baa07ff/Users/jasonwalker/Development/Gitea-Tools/branches/issue-618-author-worktree-resolutionpreserve/issue-618-cbf56cc→ same SHAComparison vs master
edaeede250f46f361784061f025ab0e867172d2ccbf56cc)5a96f15392e16c38777396b5604e97a59f259633(no master match)bound_worktree_missing,resolve_durable_author_worktree,tests/test_issue_618_author_worktree_resolution.py, canonical missing-worktree messageMissing on master / AC status
All seven #618 acceptance criteria are present on candidate and missing on master (durable resolve, structured missing-binding errors, create_issue ≡ create_issue_comment, fail-closed mutations, canonical message, 16 focused tests, ledger example).
Ownership
Classification
AUTHOR_RECOVERY_REQUIRED (not LANDED_EQUIVALENT / INCOMPLETE_OR_CONTAMINATED / PRESERVE_AMBIGUOUS).
Preserve branch, worktree, and preserve ref. Do not create PR from reconciler.
[THREAD STATE LEDGER] Issue #618 — AUTHOR_RECOVERY_REQUIRED; local complete at cbf56ccd; master lacks behavior; no remote branch/PR
What is true now:
edaeedelacks #618 behaviorWhat changed:
What is blocked:
Who/what acts next: