Honor the create-issue bootstrap in anti-stomp preflight #757

Closed
opened 2026-07-19 01:01:46 -05:00 by jcwalker3 · 1 comment
Owner

Summary

The sanctioned create_issue bootstrap shipped by #749/#750 is unreachable in production. Two independent guards assess the same workspace for the same task and reach opposite conclusions: the #274 branches-only guard consults the bootstrap and permits a clean canonical control checkout, then the #604 anti-stomp preflight — which never consults the bootstrap — rejects that same checkout as wrong_worktree.

The #749 deadlock is therefore reproduced through a second gate, and #750's remedy is effectively dead code on the live path.

Verified against master bde5c5fb20fbf6aec9cd6b802341c43078921d13.

Observed behavior

A native gitea_create_issue call from the clean canonical control checkout — clean tree, attached to master, at exactly bde5c5fb20fbf6aec9cd6b802341c43078921d13, which matched live refs/heads/master on prgs — failed pre-API:

Anti-stomp preflight (#604) blocked mutation [wrong_worktree]:
author mutation blocked: workspace is the stable control checkout;
create or switch to a session-owned worktree under branches/

Returned with mutation_stage: "preflight_purity", reason_code: "internal_error", retryable: false, success: false. No Gitea mutation occurred.

The error text is decisive about which guard fired. A #274 rejection is formatted as Branches-only mutation guard (#274): ... (author_mutation_worktree.py:225-234). The message received is the #604 format (anti_stomp_preflight.format_anti_stomp_error). The #274 guard had therefore already passed — the bootstrap worked exactly as #750 intended — and the later, bootstrap-blind guard overrode it.

Root cause

Guard order and the disagreement

gitea_create_issue invokes the shared preflight at gitea_mcp_server.py:3018-3026:

with _mutation_stage("preflight_purity"):
    verify_preflight_purity(
        remote,
        worktree_path=worktree_path,
        task="create_issue",
        org=org,
        repo=repo,
    )

Inside verify_preflight_purity (gitea_mcp_server.py:1117), the two guards run in sequence:

  • gitea_mcp_server.py:1251_enforce_branches_only_author_mutation(worktree_path, task=task) — the #274 guard.
  • gitea_mcp_server.py:1258_run_anti_stomp_preflight(..., raise_on_block=True) — the #604 guard.

The #274 guard is bootstrap-aware. At gitea_mcp_server.py:861-886 it imports create_issue_bootstrap, calls assess_create_issue_bootstrap(...) with the workspace, canonical root, branch, head SHA, porcelain status, resolved remote master SHA, and task, and returns cleanly when the assessment reports allowed:

bootstrap = _cib.assess_create_issue_bootstrap(...)
if bootstrap.get("allowed"):
    return

The #604 guard is not. create_issue is a declared member of its mutation set at anti_stomp_preflight.py:76, so the check definitely runs, and task is in scope there as task_name. But its worktree check at anti_stomp_preflight.py:574-604 calls the underlying assessor directly, with no bootstrap consultation and no task-sensitivity at all:

wt = author_mutation_worktree.assess_author_mutation_worktree(
    workspace_path=workspace_path,
    project_root=project_root,
    current_branch=current_branch,
)

and on wt["block"] appends BLOCKER_WRONG_WORKTREE (anti_stomp_preflight.py:47).

create_issue_bootstrap appears zero times in anti_stomp_preflight.py.

assess_author_mutation_worktree (author_mutation_worktree.py:194-205) blocks unconditionally when the workspace equals the project root — which is precisely the control-checkout condition the bootstrap module (create_issue_bootstrap.py:30, :55) was written to permit for CREATE_ISSUE_TASKS.

Why this is a wiring defect, not a policy disagreement

Both guards are correct in isolation given what they are told. The defect is that the bootstrap decision is computed in one guard and discarded, while a second guard re-derives a conflicting answer from a lower-level assessor that has no notion of the bootstrap phase. There is no single source of truth for "may this task mutate from this workspace".

Impact

  • The sanctioned control-checkout create-issue path is unreachable; #750 delivers no live behavior.
  • The #749 bootstrapping deadlock recurs: filing any issue requires a branches/ worktree, which the issue-first rule forbids creating before an issue number exists.
  • Authors are pushed toward unsanctioned escapes — fabricating a placeholder worktree, borrowing an unrelated one, or bypassing MCP — to file routine tracking issues.
  • Two guards disagreeing on identical inputs is itself a workflow-safety hazard: it makes guard behavior unpredictable and hard to reason about during incidents.

Required implementation investigation

  • anti_stomp_preflight.py — worktree check, MUTATION_TASKS, blocker construction, and how task is threaded into assess_anti_stomp_preflight.
  • create_issue_bootstrap.pyassess_create_issue_bootstrap, CREATE_ISSUE_TASKS, is_create_issue_task.
  • gitea_mcp_server.py_enforce_branches_only_author_mutation, _run_anti_stomp_preflight, verify_preflight_purity ordering and argument threading.
  • author_mutation_worktree.pyassess_author_mutation_worktree as the shared lower-level assessor.
  • root_checkout_guard.resolve_remote_master_sha — remote base-head resolution used by the bootstrap.

Preferred direction: compute the bootstrap assessment once, in a single place, and have both guards consume that same result. Do not duplicate the bootstrap logic into anti_stomp_preflight.py, and do not relax assess_author_mutation_worktree, which correctly serves every non-create_issue author mutation.

Acceptance criteria

AC1. The anti-stomp preflight recognizes the server-derived create_issue bootstrap decision for both create_issue and gitea_create_issue.

AC2. The exemption applies only to issue creation from the exact clean canonical control checkout.

AC3. The checkout must be on an allowed stable base branch, at the live remote base head, clean, attached, canonical, and runtime-current.

AC4. Dirty, detached, stale, noncanonical, non-base, or remote-divergent control checkouts remain blocked.

AC5. All non-create_issue author mutations remain subject to the branches-only worktree requirement.

AC6. No caller-controlled boolean can manufacture bootstrap eligibility. Eligibility is derived from inspected repository state only.

AC7. The #604 and #274 guards consume the same bootstrap assessment and cannot disagree.

AC8. An end-to-end regression invokes native gitea_create_issue from a qualifying clean control checkout and proves both guards permit it.

AC9. Rejection tests cover dirty, stale, detached, incorrect-task, and wrong-repository cases.

AC10. No issue or PR number is special-cased in production behavior.

Validation expectations

  • Unit tests for the shared bootstrap assessment covering each rejection reason independently.
  • A guard-agreement test asserting that #274 and #604 return the same verdict for identical inputs across the full matrix of workspace states — this is the regression that would have caught the present defect.
  • An end-to-end test through the native tool path, not merely against the assessor functions, since both guards individually pass their own unit tests today.
  • The relevant full-suite baseline comparison, reported against known pre-existing master failures rather than as an absolute pass count.

Linkage and ownership boundary

  • #749 — closed; owns the original deadlock. #750 — its merged remedy. This issue owns the wiring gap that leaves that remedy unreachable; do not reopen either.
  • #713 — open; tightens the same branches-only guard by requiring registered-worktree proof. Sequence against it: both touch author-mutation worktree authorization and should share one assessment path rather than adding a third.
  • #604 — closed; the parent feature that introduced the anti-stomp preflight.
  • #618, #711 — open; adjacent guard-consistency defects on other tools. Related, not duplicates.

Canonical issue state

STATE: ready-for-author
WHO_IS_NEXT: author
NEXT_ACTION: Lock this issue in a separately bounded author task, then implement AC1-AC10
NEXT_PROMPT: Author the shared bootstrap-assessment fix so #274 and #604 cannot disagree; PR; stop
## Summary The sanctioned `create_issue` bootstrap shipped by #749/#750 is unreachable in production. Two independent guards assess the same workspace for the same task and reach opposite conclusions: the #274 branches-only guard consults the bootstrap and permits a clean canonical control checkout, then the #604 anti-stomp preflight — which never consults the bootstrap — rejects that same checkout as `wrong_worktree`. The #749 deadlock is therefore reproduced through a second gate, and #750's remedy is effectively dead code on the live path. Verified against master `bde5c5fb20fbf6aec9cd6b802341c43078921d13`. ## Observed behavior A native `gitea_create_issue` call from the clean canonical control checkout — clean tree, attached to `master`, at exactly `bde5c5fb20fbf6aec9cd6b802341c43078921d13`, which matched live `refs/heads/master` on `prgs` — failed pre-API: ```text Anti-stomp preflight (#604) blocked mutation [wrong_worktree]: author mutation blocked: workspace is the stable control checkout; create or switch to a session-owned worktree under branches/ ``` Returned with `mutation_stage: "preflight_purity"`, `reason_code: "internal_error"`, `retryable: false`, `success: false`. No Gitea mutation occurred. The error text is decisive about which guard fired. A #274 rejection is formatted as `Branches-only mutation guard (#274): ...` (`author_mutation_worktree.py:225-234`). The message received is the #604 format (`anti_stomp_preflight.format_anti_stomp_error`). The #274 guard had therefore already **passed** — the bootstrap worked exactly as #750 intended — and the later, bootstrap-blind guard overrode it. ## Root cause ### Guard order and the disagreement `gitea_create_issue` invokes the shared preflight at `gitea_mcp_server.py:3018-3026`: ```python with _mutation_stage("preflight_purity"): verify_preflight_purity( remote, worktree_path=worktree_path, task="create_issue", org=org, repo=repo, ) ``` Inside `verify_preflight_purity` (`gitea_mcp_server.py:1117`), the two guards run in sequence: * `gitea_mcp_server.py:1251` — `_enforce_branches_only_author_mutation(worktree_path, task=task)` — the #274 guard. * `gitea_mcp_server.py:1258` — `_run_anti_stomp_preflight(..., raise_on_block=True)` — the #604 guard. The #274 guard **is** bootstrap-aware. At `gitea_mcp_server.py:861-886` it imports `create_issue_bootstrap`, calls `assess_create_issue_bootstrap(...)` with the workspace, canonical root, branch, head SHA, porcelain status, resolved remote master SHA, and task, and returns cleanly when the assessment reports `allowed`: ```python bootstrap = _cib.assess_create_issue_bootstrap(...) if bootstrap.get("allowed"): return ``` The #604 guard is not. `create_issue` is a declared member of its mutation set at `anti_stomp_preflight.py:76`, so the check definitely runs, and `task` is in scope there as `task_name`. But its worktree check at `anti_stomp_preflight.py:574-604` calls the underlying assessor directly, with no bootstrap consultation and no task-sensitivity at all: ```python wt = author_mutation_worktree.assess_author_mutation_worktree( workspace_path=workspace_path, project_root=project_root, current_branch=current_branch, ) ``` and on `wt["block"]` appends `BLOCKER_WRONG_WORKTREE` (`anti_stomp_preflight.py:47`). `create_issue_bootstrap` appears **zero** times in `anti_stomp_preflight.py`. `assess_author_mutation_worktree` (`author_mutation_worktree.py:194-205`) blocks unconditionally when the workspace equals the project root — which is precisely the control-checkout condition the bootstrap module (`create_issue_bootstrap.py:30`, `:55`) was written to permit for `CREATE_ISSUE_TASKS`. ### Why this is a wiring defect, not a policy disagreement Both guards are correct in isolation given what they are told. The defect is that the bootstrap decision is computed in one guard and discarded, while a second guard re-derives a conflicting answer from a lower-level assessor that has no notion of the bootstrap phase. There is no single source of truth for "may this task mutate from this workspace". ## Impact * The sanctioned control-checkout create-issue path is unreachable; #750 delivers no live behavior. * The #749 bootstrapping deadlock recurs: filing any issue requires a `branches/` worktree, which the issue-first rule forbids creating before an issue number exists. * Authors are pushed toward unsanctioned escapes — fabricating a placeholder worktree, borrowing an unrelated one, or bypassing MCP — to file routine tracking issues. * Two guards disagreeing on identical inputs is itself a workflow-safety hazard: it makes guard behavior unpredictable and hard to reason about during incidents. ## Required implementation investigation * `anti_stomp_preflight.py` — worktree check, `MUTATION_TASKS`, blocker construction, and how `task` is threaded into `assess_anti_stomp_preflight`. * `create_issue_bootstrap.py` — `assess_create_issue_bootstrap`, `CREATE_ISSUE_TASKS`, `is_create_issue_task`. * `gitea_mcp_server.py` — `_enforce_branches_only_author_mutation`, `_run_anti_stomp_preflight`, `verify_preflight_purity` ordering and argument threading. * `author_mutation_worktree.py` — `assess_author_mutation_worktree` as the shared lower-level assessor. * `root_checkout_guard.resolve_remote_master_sha` — remote base-head resolution used by the bootstrap. Preferred direction: compute the bootstrap assessment **once**, in a single place, and have both guards consume that same result. Do not duplicate the bootstrap logic into `anti_stomp_preflight.py`, and do not relax `assess_author_mutation_worktree`, which correctly serves every non-create_issue author mutation. ## Acceptance criteria **AC1.** The anti-stomp preflight recognizes the server-derived `create_issue` bootstrap decision for both `create_issue` and `gitea_create_issue`. **AC2.** The exemption applies only to issue creation from the exact clean canonical control checkout. **AC3.** The checkout must be on an allowed stable base branch, at the live remote base head, clean, attached, canonical, and runtime-current. **AC4.** Dirty, detached, stale, noncanonical, non-base, or remote-divergent control checkouts remain blocked. **AC5.** All non-`create_issue` author mutations remain subject to the branches-only worktree requirement. **AC6.** No caller-controlled boolean can manufacture bootstrap eligibility. Eligibility is derived from inspected repository state only. **AC7.** The #604 and #274 guards consume the same bootstrap assessment and cannot disagree. **AC8.** An end-to-end regression invokes native `gitea_create_issue` from a qualifying clean control checkout and proves both guards permit it. **AC9.** Rejection tests cover dirty, stale, detached, incorrect-task, and wrong-repository cases. **AC10.** No issue or PR number is special-cased in production behavior. ## Validation expectations * Unit tests for the shared bootstrap assessment covering each rejection reason independently. * A guard-agreement test asserting that #274 and #604 return the same verdict for identical inputs across the full matrix of workspace states — this is the regression that would have caught the present defect. * An end-to-end test through the native tool path, not merely against the assessor functions, since both guards individually pass their own unit tests today. * The relevant full-suite baseline comparison, reported against known pre-existing master failures rather than as an absolute pass count. ## Linkage and ownership boundary * **#749** — closed; owns the original deadlock. **#750** — its merged remedy. This issue owns the wiring gap that leaves that remedy unreachable; do not reopen either. * **#713** — open; tightens the same branches-only guard by requiring registered-worktree proof. Sequence against it: both touch author-mutation worktree authorization and should share one assessment path rather than adding a third. * **#604** — closed; the parent feature that introduced the anti-stomp preflight. * **#618**, **#711** — open; adjacent guard-consistency defects on other tools. Related, not duplicates. ## Canonical issue state ```text STATE: ready-for-author WHO_IS_NEXT: author NEXT_ACTION: Lock this issue in a separately bounded author task, then implement AC1-AC10 NEXT_PROMPT: Author the shared bootstrap-assessment fix so #274 and #604 cannot disagree; PR; stop ```
jcwalker3 added status:pr-open and removed status:ready labels 2026-07-19 01:29:32 -05:00
Author
Owner

[THREAD STATE LEDGER] Issue #757 — author implementation landed on a branch; PR #759 opened at head adc61255b2

What is true now:

  • Issue state: open, status:pr-open
  • PR #759 state: open, base master, mergeable true
  • Current head SHA: adc61255b2
  • Base SHA: bde5c5fb20
  • Server-side decision state: none — no review verdict exists for PR #759; no merge operation was performed
  • Local verdict/state: author implementation complete on branch fix/issue-757-create-issue-bootstrap-anti-stomp; no verdict prepared or held
  • Latest known validation: full suite 3624 passed / 2 failed / 6 skipped / 426 subtests on this branch; baseline at bde5c5fb 3586 passed / 2 failed / 6 skipped / 400 subtests; identical 2 failures on pristine master

What changed:

  • One server-derived create_issue bootstrap assessment is now computed once per preflight and consumed by both the #274 branches-only guard and the #604 anti-stomp preflight through one shared predicate, create_issue_bootstrap.bootstrap_permits_control_checkout()
  • The #604 assessor waives only the wrong-worktree verdict for a proven bootstrap; root checkout, repo, role, stale runtime, lease, head-SHA, workflow-hash, and contamination checks remain independent and still apply
  • Five files changed: create_issue_bootstrap.py, anti_stomp_preflight.py, gitea_mcp_server.py, tests/test_issue_757_bootstrap_guard_agreement.py (new, 38 tests / 26 subtests), tests/test_reconciler_close_workspace_guard.py
  • Commit adc61255b2 pushed; PR #759 opened; issue moved to status:pr-open

What is blocked:

  • Blocker classification: no blocker
  • The author phase is complete and requires no unblock condition. Review authority is not held by this session: the prgs-author profile forbids gitea.pr.approve, gitea.pr.request_changes, and gitea.pr.merge.

Who/what acts next:

  • Next actor: reviewer
  • Required action: start a fresh independent Grok reviewer session pinned to PR #759 at exact head adc61255b2 and evaluate AC1-AC10 of this issue against that SHA
  • Do not do: do not review, approve, request changes, or merge from this author session; do not re-run the author phase; do not edit, label, claim, or implement #758; do not touch #642, #633, #634, #605 or the residual chore/issue-642-block-diagnose branch and lock; do not force push, rebase, reset, or amend this branch; do not modify the canonical control checkout
  • Resume from: PR #759 diff at head adc61255b2

Canonical Issue State

STATE:
PR_OPEN_AWAITING_INDEPENDENT_REVIEW

WHO_IS_NEXT:
reviewer

NEXT_ACTION:
Start a fresh independent Grok reviewer session pinned to PR #759 head adc61255b2 and evaluate AC1-AC10 of this issue against that exact SHA.

NEXT_PROMPT:

Review PR #759 (Closes #757) at exact head adc61255b2d7eb65d1670e09e561dbd84b652317, base bde5c5fb20fbf6aec9cd6b802341c43078921d13. Verify the #274 and #604 guards consume one server-derived create_issue bootstrap assessment through one shared predicate and cannot disagree; that the waiver covers only the wrong-worktree verdict; that dirty, detached, stale, noncanonical, non-base, and remote-divergent control checkouts still fail closed; that non-create_issue author mutations still require a branches/ worktree; and that no MCP tool signature or caller-controlled boolean can manufacture bootstrap eligibility. Confirm no repository issue number is special-cased.

WHAT_HAPPENED:
The author phase implemented the shared bootstrap-assessment fix for this issue, added focused regression coverage, ran the full test suite against a pristine baseline checkout at bde5c5fb20, pushed commit adc61255b2, and opened PR #759 against master. The root cause in the issue body was independently reverified before any edit: create_issue was already in the #604 mutation set, its worktree check called assess_author_mutation_worktree directly, and create_issue_bootstrap appeared zero times in anti_stomp_preflight.py.

WHY:
The create_issue bootstrap from #749/#750 was unreachable: the #274 guard consulted the bootstrap and permitted the clean canonical control checkout, then the bootstrap-blind #604 anti-stomp preflight refused the identical checkout as wrong_worktree. The bootstrap decision is now computed once and interpreted by one shared predicate, so the two guards cannot reach opposite conclusions on identical evidence.

RELATED_PRS:
PR #759 (this issue's fix, open, head adc61255b2). Historical context only, not reopened and not modified by this task: #750 (the remedy that landed for #749), #749 (closed, original deadlock), #604 (closed, parent anti-stomp feature), #274 (branches-only guard). Adjacent open work not touched: #713, #618, #711.

BLOCKERS:
No blocker. The author phase is complete and requires no unblock condition.

VALIDATION:
Focused #757 suite 38 passed / 26 subtests. Affected guard and preflight suites 236 passed / 42 subtests (create-issue bootstrap, create-issue workspace guard, anti-stomp, author-mutation-worktree, root-checkout, remote-repo, stale-runtime, workflow-scope, preflight-read-survival, namespace-binding, #751 checks assessor). Full suite on this branch 3624 passed / 2 failed / 6 skipped / 426 subtests. Baseline at bde5c5fb20 on a fresh clean detached worktree 3586 passed / 2 failed / 6 skipped / 400 subtests; both failures reproduce identically on pristine master and are not caused by this change (test_issue_702_review_findings_f1_f6 F1 worktree recovery; test_reconciler_supersession_close org/repo forwarding). Baseline worktree removed afterward. git diff --check clean. py_compile passes on all five changed sources. All 38 new tests fail against the unfixed sources, and the end-to-end case reproduces the production error text verbatim.

LAST_UPDATED_BY:
author (jcwalker3 / prgs-author)

Author execution record

  • Identity: jcwalker3 / prgs-author / role author / identity_match true / Scaled-Tech-Consulting/Gitea-Tools on prgs.
  • OS identity: jasonwalker, UID 502, non-root.
  • Runtime parity: bde5c5fb20 on the author, merger, and reconciler namespaces (in_parity, restart_required false). Local master matched live prgs/master exactly. The reviewer namespace parity probe was declined by a client-side permission prompt; it is not required for an author task and no reviewer capability was used.
  • Ownership: native gitea_lock_issue acquired for issue #757, branch fix/issue-757-create-issue-bootstrap-anti-stomp, worktree branches/issue-757-create-issue-bootstrap-anti-stomp, owner jcwalker3 / prgs-author, freshness live, no competing claim. Lease created 2026-07-19T06:11:51Z, expires 2026-07-19T10:11:51Z. No lock file was hand-created or hand-edited.
  • One pre-existing test asserted that create_issue stays refused on the control checkout. That expectation only held because the bootstrap-blind #604 guard was overriding #750, so it encoded the defect itself. It was re-pointed to lock_issue, which is issue-backed and legitimately still requires a branches/ worktree, and its teardown now restores module-level preflight task and role state so test ordering cannot leak a resolved task.
  • The canonical control checkout was not modified and remains clean at bde5c5fb20.

NATIVE_REVIEW_PROOF: none — this is an author handoff; no review verdict was recorded by this session and the prgs-author profile forbids gitea.pr.approve, gitea.pr.request_changes, and gitea.pr.merge.

[THREAD STATE LEDGER] Issue #757 — author implementation landed on a branch; PR #759 opened at head adc61255b2d7eb65d1670e09e561dbd84b652317 What is true now: - Issue state: open, status:pr-open - PR #759 state: open, base master, mergeable true - Current head SHA: adc61255b2d7eb65d1670e09e561dbd84b652317 - Base SHA: bde5c5fb20fbf6aec9cd6b802341c43078921d13 - Server-side decision state: none — no review verdict exists for PR #759; no merge operation was performed - Local verdict/state: author implementation complete on branch fix/issue-757-create-issue-bootstrap-anti-stomp; no verdict prepared or held - Latest known validation: full suite 3624 passed / 2 failed / 6 skipped / 426 subtests on this branch; baseline at bde5c5fb 3586 passed / 2 failed / 6 skipped / 400 subtests; identical 2 failures on pristine master What changed: - One server-derived create_issue bootstrap assessment is now computed once per preflight and consumed by both the #274 branches-only guard and the #604 anti-stomp preflight through one shared predicate, create_issue_bootstrap.bootstrap_permits_control_checkout() - The #604 assessor waives only the wrong-worktree verdict for a proven bootstrap; root checkout, repo, role, stale runtime, lease, head-SHA, workflow-hash, and contamination checks remain independent and still apply - Five files changed: create_issue_bootstrap.py, anti_stomp_preflight.py, gitea_mcp_server.py, tests/test_issue_757_bootstrap_guard_agreement.py (new, 38 tests / 26 subtests), tests/test_reconciler_close_workspace_guard.py - Commit adc61255b2d7eb65d1670e09e561dbd84b652317 pushed; PR #759 opened; issue moved to status:pr-open What is blocked: - Blocker classification: no blocker - The author phase is complete and requires no unblock condition. Review authority is not held by this session: the prgs-author profile forbids gitea.pr.approve, gitea.pr.request_changes, and gitea.pr.merge. Who/what acts next: - Next actor: reviewer - Required action: start a fresh independent Grok reviewer session pinned to PR #759 at exact head adc61255b2d7eb65d1670e09e561dbd84b652317 and evaluate AC1-AC10 of this issue against that SHA - Do not do: do not review, approve, request changes, or merge from this author session; do not re-run the author phase; do not edit, label, claim, or implement #758; do not touch #642, #633, #634, #605 or the residual chore/issue-642-block-diagnose branch and lock; do not force push, rebase, reset, or amend this branch; do not modify the canonical control checkout - Resume from: PR #759 diff at head adc61255b2d7eb65d1670e09e561dbd84b652317 ## Canonical Issue State STATE: PR_OPEN_AWAITING_INDEPENDENT_REVIEW WHO_IS_NEXT: reviewer NEXT_ACTION: Start a fresh independent Grok reviewer session pinned to PR #759 head adc61255b2d7eb65d1670e09e561dbd84b652317 and evaluate AC1-AC10 of this issue against that exact SHA. NEXT_PROMPT: ```text Review PR #759 (Closes #757) at exact head adc61255b2d7eb65d1670e09e561dbd84b652317, base bde5c5fb20fbf6aec9cd6b802341c43078921d13. Verify the #274 and #604 guards consume one server-derived create_issue bootstrap assessment through one shared predicate and cannot disagree; that the waiver covers only the wrong-worktree verdict; that dirty, detached, stale, noncanonical, non-base, and remote-divergent control checkouts still fail closed; that non-create_issue author mutations still require a branches/ worktree; and that no MCP tool signature or caller-controlled boolean can manufacture bootstrap eligibility. Confirm no repository issue number is special-cased. ``` WHAT_HAPPENED: The author phase implemented the shared bootstrap-assessment fix for this issue, added focused regression coverage, ran the full test suite against a pristine baseline checkout at bde5c5fb20fbf6aec9cd6b802341c43078921d13, pushed commit adc61255b2d7eb65d1670e09e561dbd84b652317, and opened PR #759 against master. The root cause in the issue body was independently reverified before any edit: create_issue was already in the #604 mutation set, its worktree check called assess_author_mutation_worktree directly, and create_issue_bootstrap appeared zero times in anti_stomp_preflight.py. WHY: The create_issue bootstrap from #749/#750 was unreachable: the #274 guard consulted the bootstrap and permitted the clean canonical control checkout, then the bootstrap-blind #604 anti-stomp preflight refused the identical checkout as wrong_worktree. The bootstrap decision is now computed once and interpreted by one shared predicate, so the two guards cannot reach opposite conclusions on identical evidence. RELATED_PRS: PR #759 (this issue's fix, open, head adc61255b2d7eb65d1670e09e561dbd84b652317). Historical context only, not reopened and not modified by this task: #750 (the remedy that landed for #749), #749 (closed, original deadlock), #604 (closed, parent anti-stomp feature), #274 (branches-only guard). Adjacent open work not touched: #713, #618, #711. BLOCKERS: No blocker. The author phase is complete and requires no unblock condition. VALIDATION: Focused #757 suite 38 passed / 26 subtests. Affected guard and preflight suites 236 passed / 42 subtests (create-issue bootstrap, create-issue workspace guard, anti-stomp, author-mutation-worktree, root-checkout, remote-repo, stale-runtime, workflow-scope, preflight-read-survival, namespace-binding, #751 checks assessor). Full suite on this branch 3624 passed / 2 failed / 6 skipped / 426 subtests. Baseline at bde5c5fb20fbf6aec9cd6b802341c43078921d13 on a fresh clean detached worktree 3586 passed / 2 failed / 6 skipped / 400 subtests; both failures reproduce identically on pristine master and are not caused by this change (test_issue_702_review_findings_f1_f6 F1 worktree recovery; test_reconciler_supersession_close org/repo forwarding). Baseline worktree removed afterward. git diff --check clean. py_compile passes on all five changed sources. All 38 new tests fail against the unfixed sources, and the end-to-end case reproduces the production error text verbatim. LAST_UPDATED_BY: author (jcwalker3 / prgs-author) ### Author execution record - Identity: jcwalker3 / prgs-author / role author / identity_match true / Scaled-Tech-Consulting/Gitea-Tools on prgs. - OS identity: jasonwalker, UID 502, non-root. - Runtime parity: bde5c5fb20fbf6aec9cd6b802341c43078921d13 on the author, merger, and reconciler namespaces (in_parity, restart_required false). Local master matched live prgs/master exactly. The reviewer namespace parity probe was declined by a client-side permission prompt; it is not required for an author task and no reviewer capability was used. - Ownership: native gitea_lock_issue acquired for issue #757, branch fix/issue-757-create-issue-bootstrap-anti-stomp, worktree branches/issue-757-create-issue-bootstrap-anti-stomp, owner jcwalker3 / prgs-author, freshness live, no competing claim. Lease created 2026-07-19T06:11:51Z, expires 2026-07-19T10:11:51Z. No lock file was hand-created or hand-edited. - One pre-existing test asserted that create_issue stays refused on the control checkout. That expectation only held because the bootstrap-blind #604 guard was overriding #750, so it encoded the defect itself. It was re-pointed to lock_issue, which is issue-backed and legitimately still requires a branches/ worktree, and its teardown now restores module-level preflight task and role state so test ordering cannot leak a resolved task. - The canonical control checkout was not modified and remains clean at bde5c5fb20fbf6aec9cd6b802341c43078921d13. NATIVE_REVIEW_PROOF: none — this is an author handoff; no review verdict was recorded by this session and the prgs-author profile forbids gitea.pr.approve, gitea.pr.request_changes, and gitea.pr.merge.
sysadmin removed the status:pr-open label 2026-07-19 12:40:55 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Scaled-Tech-Consulting/Gitea-Tools#757