fix(mcp): honor the create-issue bootstrap in anti-stomp preflight (Closes #757) #759

Merged
sysadmin merged 2 commits from fix/issue-757-create-issue-bootstrap-anti-stomp into master 2026-07-19 12:34:08 -05:00
Owner

Closes #757

Problem

The sanctioned create_issue bootstrap shipped by #749/#750 was unreachable in production. Two guards assessed one workspace for one task and reached opposite conclusions:

  1. The #274 branches-only guard consulted the bootstrap and permitted a clean canonical control checkout.
  2. The #604 anti-stomp preflight — which never consulted the bootstrap — rejected that very checkout as wrong_worktree.

Production error, reproduced verbatim by the new end-to-end test:

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/

Root cause

Confirmed independently at the filing commit. create_issue is a declared member of the #604 mutation set, so its worktree check always ran, but it called assess_author_mutation_worktree directly with no bootstrap consultation and no task-sensitivity. create_issue_bootstrap appeared zero times in anti_stomp_preflight.py.

The defect was wiring, not policy. The bootstrap decision was computed in one guard and discarded, while the other re-derived a conflicting answer from a lower-level assessor that has no notion of the bootstrap phase. There was no single source of truth for "may this task mutate from this workspace".

Design — one computation site, one interpretation site

  • create_issue_bootstrap.bootstrap_permits_control_checkout() — the single predicate both guards use to interpret an assessment. Fail-closed by construction: missing, malformed, refused, incomplete, or contradictory evidence returns False, leaving the ordinary block in force. It uses strict identity checks (is not True), so no truthy value can be smuggled in, and it verifies the assessment describes the exact workspace and canonical root being guarded — a stale or foreign assessment cannot be reused.
  • _create_issue_bootstrap_assessment() — computes the assessment once per preflight from inspected repository state. verify_preflight_purity threads that single result into both guards.
  • The #604 assessor accepts the assessment and waives only the wrong-worktree verdict.

Safety properties

  • AC1/AC2/AC3 — the waiver requires a proven bootstrap: create_issue task, canonical binding, exact stable control checkout, allowed attached base branch, clean tree, local/base/live-remote SHA agreement, current runtime.
  • AC4 — dirty, detached, stale, noncanonical, non-base, and remote-divergent control checkouts stay blocked.
  • AC5 — all non-create_issue author mutations keep the branches-only requirement.
  • AC6 — evidence is server-derived and travels an internal path. No MCP tool signature gains a bootstrap argument; a test asserts no public gitea_* tool exposes one. No caller-controlled boolean can manufacture eligibility.
  • AC7 — both guards consume one shared assessment through one shared predicate and cannot disagree.
  • AC10 — no issue or PR number is special-cased in production behavior.

Not waived: dirty-file checks, repository membership, stale runtime, identity/profile, remote/base divergence, detached rejection, task scope, and branches-only enforcement for every other mutation. Root checkout, repo, role, lease, head-SHA, workflow-hash, and contamination checks are evaluated independently and still apply — covered by explicit tests.

Behavior is unchanged for callers that supply no evidence (review_pr / merge_pr sites are untouched). No circular imports: create_issue_bootstrap depends only on leaf modules.

Files changed

File Change
create_issue_bootstrap.py new shared bootstrap_permits_control_checkout() predicate
anti_stomp_preflight.py consume the assessment; waive only wrong_worktree
gitea_mcp_server.py single computation site; thread one result into both guards
tests/test_issue_757_bootstrap_guard_agreement.py new — 38 tests, 26 subtests
tests/test_reconciler_close_workspace_guard.py corrected a case that encoded the defect

Tests

New suite covers: the shared predicate (missing / malformed / refused / not-applicable / incomplete / contradictory / truthy-smuggling / wrong-task / foreign-binding / scope tampering); the narrow waiver; that the waiver does not suppress stale-runtime, wrong-repo, or wrong-role blockers; branches/ worktrees unaffected; non-forgeable eligibility; guard agreement across a 10-case workspace-state matrix; and an end-to-end native gitea_create_issue run with the #604 gate live.

All 38 tests fail against the unfixed sources — verified by reverting the three production files and re-running. The pre-existing #749 e2e test patched _run_anti_stomp_preflight to a no-op, which is exactly why this defect reached production; the new e2e leaves it running.

tests/test_reconciler_close_workspace_guard.py asserted that create_issue stays blocked on the control checkout. That only held because the bootstrap-blind #604 guard was overriding #750 — it encoded the defect. Re-pointed to lock_issue, which is issue-backed and legitimately still requires a branches/ worktree. Its teardown now restores module-level preflight task/role so test order cannot leak resolved state.

Validation

  • Focused #757 suite: 38 passed, 26 subtests
  • Affected guard/preflight suites (bootstrap, workspace-guard, anti-stomp, author-mutation-worktree, root-checkout, remote-repo, stale-runtime, workflow-scope, preflight-purity, namespace-binding, #751): 236 passed, 42 subtests
  • Full suite on this branch: 3624 passed, 2 failed, 6 skipped, 426 subtests
  • Baseline at bde5c5fb 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). The baseline worktree was removed afterward. git diff --check clean; py_compile passes on every changed source.

Closes #757 ## Problem The sanctioned `create_issue` bootstrap shipped by #749/#750 was unreachable in production. Two guards assessed one workspace for one task and reached opposite conclusions: 1. The #274 branches-only guard consulted the bootstrap and **permitted** a clean canonical control checkout. 2. The #604 anti-stomp preflight — which never consulted the bootstrap — **rejected** that very checkout as `wrong_worktree`. Production error, reproduced verbatim by the new end-to-end test: ```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/ ``` ## Root cause Confirmed independently at the filing commit. `create_issue` is a declared member of the #604 mutation set, so its worktree check always ran, but it called `assess_author_mutation_worktree` directly with no bootstrap consultation and no task-sensitivity. `create_issue_bootstrap` appeared zero times in `anti_stomp_preflight.py`. The defect was **wiring, not policy**. The bootstrap decision was computed in one guard and discarded, while the other re-derived a conflicting answer from a lower-level assessor that has no notion of the bootstrap phase. There was no single source of truth for "may this task mutate from this workspace". ## Design — one computation site, one interpretation site - **`create_issue_bootstrap.bootstrap_permits_control_checkout()`** — the single predicate both guards use to interpret an assessment. Fail-closed by construction: missing, malformed, refused, incomplete, or contradictory evidence returns `False`, leaving the ordinary block in force. It uses strict identity checks (`is not True`), so no truthy value can be smuggled in, and it verifies the assessment describes the exact workspace and canonical root being guarded — a stale or foreign assessment cannot be reused. - **`_create_issue_bootstrap_assessment()`** — computes the assessment once per preflight from inspected repository state. `verify_preflight_purity` threads that single result into both guards. - **The #604 assessor** accepts the assessment and waives **only** the wrong-worktree verdict. ## Safety properties - **AC1/AC2/AC3** — the waiver requires a proven bootstrap: create_issue task, canonical binding, exact stable control checkout, allowed attached base branch, clean tree, local/base/live-remote SHA agreement, current runtime. - **AC4** — dirty, detached, stale, noncanonical, non-base, and remote-divergent control checkouts stay blocked. - **AC5** — all non-`create_issue` author mutations keep the branches-only requirement. - **AC6** — evidence is server-derived and travels an internal path. No MCP tool signature gains a bootstrap argument; a test asserts no public `gitea_*` tool exposes one. No caller-controlled boolean can manufacture eligibility. - **AC7** — both guards consume one shared assessment through one shared predicate and cannot disagree. - **AC10** — no issue or PR number is special-cased in production behavior. Not waived: dirty-file checks, repository membership, stale runtime, identity/profile, remote/base divergence, detached rejection, task scope, and branches-only enforcement for every other mutation. Root checkout, repo, role, lease, head-SHA, workflow-hash, and contamination checks are evaluated independently and still apply — covered by explicit tests. Behavior is unchanged for callers that supply no evidence (`review_pr` / `merge_pr` sites are untouched). No circular imports: `create_issue_bootstrap` depends only on leaf modules. ## Files changed | File | Change | |---|---| | `create_issue_bootstrap.py` | new shared `bootstrap_permits_control_checkout()` predicate | | `anti_stomp_preflight.py` | consume the assessment; waive only `wrong_worktree` | | `gitea_mcp_server.py` | single computation site; thread one result into both guards | | `tests/test_issue_757_bootstrap_guard_agreement.py` | new — 38 tests, 26 subtests | | `tests/test_reconciler_close_workspace_guard.py` | corrected a case that encoded the defect | ## Tests New suite covers: the shared predicate (missing / malformed / refused / not-applicable / incomplete / contradictory / truthy-smuggling / wrong-task / foreign-binding / scope tampering); the narrow waiver; that the waiver does not suppress stale-runtime, wrong-repo, or wrong-role blockers; branches/ worktrees unaffected; non-forgeable eligibility; **guard agreement across a 10-case workspace-state matrix**; and an **end-to-end native `gitea_create_issue` run with the #604 gate live**. All 38 tests fail against the unfixed sources — verified by reverting the three production files and re-running. The pre-existing #749 e2e test patched `_run_anti_stomp_preflight` to a no-op, which is exactly why this defect reached production; the new e2e leaves it running. `tests/test_reconciler_close_workspace_guard.py` asserted that `create_issue` stays blocked on the control checkout. That only held because the bootstrap-blind #604 guard was overriding #750 — it encoded the defect. Re-pointed to `lock_issue`, which is issue-backed and legitimately still requires a `branches/` worktree. Its teardown now restores module-level preflight task/role so test order cannot leak resolved state. ## Validation - Focused #757 suite: **38 passed, 26 subtests** - Affected guard/preflight suites (bootstrap, workspace-guard, anti-stomp, author-mutation-worktree, root-checkout, remote-repo, stale-runtime, workflow-scope, preflight-purity, namespace-binding, #751): **236 passed, 42 subtests** - Full suite on this branch: **3624 passed, 2 failed, 6 skipped, 426 subtests** - Baseline at `bde5c5fb` 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). The baseline worktree was removed afterward. `git diff --check` clean; `py_compile` passes on every changed source.
jcwalker3 added 1 commit 2026-07-19 01:29:31 -05:00
The sanctioned create_issue bootstrap from #749/#750 was unreachable in
production. Two guards assessed the same workspace for the same task and
reached opposite conclusions: the #274 branches-only guard consulted the
bootstrap and permitted a clean canonical control checkout, then the #604
anti-stomp preflight -- which never consulted it -- rejected that same
checkout as wrong_worktree.

The defect was wiring, not policy: the bootstrap decision was computed in
one guard and discarded, while the other re-derived a conflicting answer
from a lower-level assessor with no notion of the bootstrap phase.

Fix: one computation site, one interpretation site.

* create_issue_bootstrap.bootstrap_permits_control_checkout() is the single
  predicate both guards use to interpret an assessment. It is fail-closed by
  construction: missing, malformed, refused, incomplete, or contradictory
  evidence returns False and leaves the ordinary block in force. It also
  verifies the assessment describes the exact workspace and canonical root
  being guarded, so a stale or foreign assessment cannot be reused.
* _create_issue_bootstrap_assessment() computes the assessment once per
  preflight from inspected repository state. verify_preflight_purity threads
  that single result into both guards.
* The #604 assessor accepts the assessment and waives ONLY the wrong-worktree
  verdict. Root checkout, repo, role, stale runtime, lease, head-SHA,
  workflow-hash, and contamination checks are evaluated independently and
  still apply.

Evidence is server-derived only and travels an internal path: no MCP tool
signature gains a bootstrap argument, and no caller-controlled boolean can
manufacture eligibility. Behavior is unchanged for callers that supply no
evidence, and for every non-create_issue author mutation.

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

Tests: new tests/test_issue_757_bootstrap_guard_agreement.py (38 tests, 26
subtests) covering the shared predicate, the narrow waiver, guard agreement
across the full workspace-state matrix, non-forgeable eligibility, and an
end-to-end native gitea_create_issue run with the #604 gate LIVE. All 38
fail against unfixed sources; the e2e reproduces the production error text
verbatim ("Anti-stomp preflight (#604) blocked mutation [wrong_worktree]").

tests/test_reconciler_close_workspace_guard.py: one case asserted that
create_issue stays blocked on the control checkout, which only held because
the bootstrap-blind #604 guard was overriding #750 -- it encoded the defect.
Re-pointed to lock_issue, which is issue-backed and legitimately still
requires a branches/ worktree. Its teardown now restores the module-level
preflight task/role so test order cannot leak resolved state.

Full suite: 3624 passed, 2 failed, 6 skipped (426 subtests).
Baseline at bde5c5fb on a clean detached worktree: 3586 passed, 2 failed,
6 skipped (400 subtests). The same 2 failures reproduce identically on
pristine master and are unrelated to this change
(test_issue_702_review_findings_f1_f6 F1 worktree recovery;
test_reconciler_supersession_close org/repo forwarding).

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Owner

repo: Scaled-Tech-Consulting/Gitea-Tools
pr: #759
issue: #757
reviewer_identity: sysadmin
profile: prgs-reviewer
session_id: 88750-2ff610fa236b
worktree: /Users/jasonwalker/Development/Gitea-Tools/branches/review-pr-759-adc61255-independent-20260719T025309
phase: claimed
candidate_head: adc61255b2
target_branch: master
target_branch_sha: bde5c5fb20
last_activity: 2026-07-19T06:55:15Z
expires_at: 2026-07-19T07:05:15Z
blocker: none

<!-- mcp-review-lease:v1 --> repo: Scaled-Tech-Consulting/Gitea-Tools pr: #759 issue: #757 reviewer_identity: sysadmin profile: prgs-reviewer session_id: 88750-2ff610fa236b worktree: /Users/jasonwalker/Development/Gitea-Tools/branches/review-pr-759-adc61255-independent-20260719T025309 phase: claimed candidate_head: adc61255b2d7eb65d1670e09e561dbd84b652317 target_branch: master target_branch_sha: bde5c5fb20fbf6aec9cd6b802341c43078921d13 last_activity: 2026-07-19T06:55:15Z expires_at: 2026-07-19T07:05:15Z blocker: none
sysadmin approved these changes 2026-07-19 02:00:36 -05:00
Dismissed
sysadmin left a comment
Owner

Canonical PR State

STATE: approved
WHO_IS_NEXT: merger
NEXT_ACTION: Merge PR #759 at pinned head adc61255 after re-checking open/mergeable state and native merger lease; do not force-merge
NEXT_PROMPT:

Merge PR #759 (Closes #757) on Scaled-Tech-Consulting/Gitea-Tools @ prgs.
Pinned head: adc61255b2d7eb65d1670e09e561dbd84b652317
Base: master @ bde5c5fb20fbf6aec9cd6b802341c43078921d13
Independent reviewer APPROVE already posted by sysadmin/prgs-reviewer.
Use merger namespace only; re-verify identity, parity, head pin, and lease before merge.

WHAT_HAPPENED: Independent reviewer phase completed APPROVE for PR #759 after gates, full diff inspection, focused/affected suites, and baseline reproduction of two pre-existing full-suite failures.
WHY: Design matches #757: single bootstrap assessment site, shared threading into #274 and #604, wrong_worktree-only waiver, fail-closed identity/workspace binding, no public bootstrap tool args, non-create_issue behavior preserved.
ISSUE: 757
HEAD_SHA: adc61255b2
REVIEW_STATUS: APPROVE
MERGE_READY: yes
BLOCKERS: none for this PR; two full-suite failures are baseline on bde5c5fb (test_issue_702 F1 worktree recovery; test_reconciler_supersession_close org/repo mock)
VALIDATION: git diff --check clean; py_compile OK on changed files; pytest tests/test_issue_757_bootstrap_guard_agreement.py 38 passed (26 subtests); expanded affected suites 217 passed (42 subtests); claimed baseline failures reproduced identically on head and pristine bde5c5fb
NATIVE_REVIEW_PROOF: transport=native_mcp; entrypoint=gitea_submit_pr_review; server=gitea-reviewer; profile=prgs-reviewer; identity=sysadmin; head=adc61255b2d7eb65d1670e09e561dbd84b652317; lease_comment=12856
LAST_UPDATED_BY: sysadmin (prgs-reviewer independent review)

Independent review summary

Reviewed head: adc61255b2
Base: master @ bde5c5fb20
Author: jcwalker3
Reviewer: sysadmin / prgs-reviewer (identity_match=true)
Parity: in_parity, restart_required=false
Lease: session 88750-2ff610fa236b, comment 12856

Design (no material defects)

  1. _create_issue_bootstrap_assessment is the single computation site; verify_preflight_purity threads one assessment into both guards.
  2. Shared predicate bootstrap_permits_control_checkout uses strict is True/is False (no truthy smuggling).
  3. #604 waives only wrong_worktree; other blockers remain.
  4. Workspace/root binding prevents cross-context reuse of assessments.
  5. No public gitea_* tool exposes a bootstrap argument.
  6. lock_issue and other non-create_issue mutations keep branches-only.
  7. test_reconciler_close_workspace_guard.py re-point to lock_issue correctly removes an assertion that encoded the #757 defect; it does not hide a reconciler regression.
  8. New e2e leaves real #604 preflight live (unlike #749 which patched _run_anti_stomp_preflight to no-op).
  9. PR body/title correctly Closes #757.

Baseline failures (not introduced by this PR)

Reproduced on both head and pristine base bde5c5fb:

  • test_issue_702_review_findings_f1_f6::test_removed_worktree_recovers_before_probe
  • test_reconciler_supersession_close::test_tool_posts_comment_and_closes_superseded_pr_issue

Verdict: APPROVE. Do not merge from this review.

## Canonical PR State STATE: approved WHO_IS_NEXT: merger NEXT_ACTION: Merge PR #759 at pinned head adc61255 after re-checking open/mergeable state and native merger lease; do not force-merge NEXT_PROMPT: ```text Merge PR #759 (Closes #757) on Scaled-Tech-Consulting/Gitea-Tools @ prgs. Pinned head: adc61255b2d7eb65d1670e09e561dbd84b652317 Base: master @ bde5c5fb20fbf6aec9cd6b802341c43078921d13 Independent reviewer APPROVE already posted by sysadmin/prgs-reviewer. Use merger namespace only; re-verify identity, parity, head pin, and lease before merge. ``` WHAT_HAPPENED: Independent reviewer phase completed APPROVE for PR #759 after gates, full diff inspection, focused/affected suites, and baseline reproduction of two pre-existing full-suite failures. WHY: Design matches #757: single bootstrap assessment site, shared threading into #274 and #604, wrong_worktree-only waiver, fail-closed identity/workspace binding, no public bootstrap tool args, non-create_issue behavior preserved. ISSUE: 757 HEAD_SHA: adc61255b2d7eb65d1670e09e561dbd84b652317 REVIEW_STATUS: APPROVE MERGE_READY: yes BLOCKERS: none for this PR; two full-suite failures are baseline on bde5c5fb (test_issue_702 F1 worktree recovery; test_reconciler_supersession_close org/repo mock) VALIDATION: git diff --check clean; py_compile OK on changed files; pytest tests/test_issue_757_bootstrap_guard_agreement.py 38 passed (26 subtests); expanded affected suites 217 passed (42 subtests); claimed baseline failures reproduced identically on head and pristine bde5c5fb NATIVE_REVIEW_PROOF: transport=native_mcp; entrypoint=gitea_submit_pr_review; server=gitea-reviewer; profile=prgs-reviewer; identity=sysadmin; head=adc61255b2d7eb65d1670e09e561dbd84b652317; lease_comment=12856 LAST_UPDATED_BY: sysadmin (prgs-reviewer independent review) ## Independent review summary **Reviewed head:** adc61255b2d7eb65d1670e09e561dbd84b652317 **Base:** master @ bde5c5fb20fbf6aec9cd6b802341c43078921d13 **Author:** jcwalker3 **Reviewer:** sysadmin / prgs-reviewer (identity_match=true) **Parity:** in_parity, restart_required=false **Lease:** session 88750-2ff610fa236b, comment 12856 ### Design (no material defects) 1. `_create_issue_bootstrap_assessment` is the single computation site; `verify_preflight_purity` threads one assessment into both guards. 2. Shared predicate `bootstrap_permits_control_checkout` uses strict is True/is False (no truthy smuggling). 3. #604 waives only wrong_worktree; other blockers remain. 4. Workspace/root binding prevents cross-context reuse of assessments. 5. No public gitea_* tool exposes a bootstrap argument. 6. lock_issue and other non-create_issue mutations keep branches-only. 7. test_reconciler_close_workspace_guard.py re-point to lock_issue correctly removes an assertion that encoded the #757 defect; it does not hide a reconciler regression. 8. New e2e leaves real #604 preflight live (unlike #749 which patched _run_anti_stomp_preflight to no-op). 9. PR body/title correctly Closes #757. ### Baseline failures (not introduced by this PR) Reproduced on both head and pristine base bde5c5fb: - test_issue_702_review_findings_f1_f6::test_removed_worktree_recovers_before_probe - test_reconciler_supersession_close::test_tool_posts_comment_and_closes_superseded_pr_issue **Verdict: APPROVE. Do not merge from this review.**
Owner

Review correction authorization audit (#693)

Status: AUTHORIZED

  • actor: sysadmin
  • profile: prgs-reviewer
  • timestamp: 2026-07-19T16:26:49.230245+00:00
  • prior_review_id: 472
  • prior_review_state: approve
  • target_pr: #759
  • target_head_sha: adc61255b2d7eb65d1670e09e561dbd84b652317
  • reason: Material AC3/AC4 safety defect: create_issue bootstrap fails open when local and/or remote master SHAs are missing or remote-tip resolution throws; both tips must be known and equal before bootstrap allowance. Independent probe on head adc61255 permits missing local, missing remote, and both-missing. Prior APPROVE #472 is mistaken and must be superseded by REQUEST_CHANGES.
  • scope: same_pr_head_only (cannot unlock a different PR)

This is not a generic decision-lock unlock. Cross-PR recovery uses isolation (#693) or moot cleanup (#594), never correction.

## Review correction authorization audit (#693) Status: **AUTHORIZED** - actor: `sysadmin` - profile: `prgs-reviewer` - timestamp: `2026-07-19T16:26:49.230245+00:00` - prior_review_id: `472` - prior_review_state: `approve` - target_pr: `#759` - target_head_sha: `adc61255b2d7eb65d1670e09e561dbd84b652317` - reason: Material AC3/AC4 safety defect: create_issue bootstrap fails open when local and/or remote master SHAs are missing or remote-tip resolution throws; both tips must be known and equal before bootstrap allowance. Independent probe on head adc61255 permits missing local, missing remote, and both-missing. Prior APPROVE #472 is mistaken and must be superseded by REQUEST_CHANGES. - scope: `same_pr_head_only` (cannot unlock a different PR) This is **not** a generic decision-lock unlock. Cross-PR recovery uses isolation (#693) or moot cleanup (#594), never correction.
Owner

repo: Scaled-Tech-Consulting/Gitea-Tools
pr: #759
issue: #757
reviewer_identity: sysadmin
profile: prgs-reviewer
session_id: 88750-8d2c3f21d117
worktree: /Users/jasonwalker/Development/Gitea-Tools/branches/review-pr-759-adc61255-independent-20260719T025309
phase: claimed
candidate_head: adc61255b2
target_branch: master
target_branch_sha: bde5c5fb20
last_activity: 2026-07-19T16:27:18Z
expires_at: 2026-07-19T16:37:18Z
blocker: none

<!-- mcp-review-lease:v1 --> repo: Scaled-Tech-Consulting/Gitea-Tools pr: #759 issue: #757 reviewer_identity: sysadmin profile: prgs-reviewer session_id: 88750-8d2c3f21d117 worktree: /Users/jasonwalker/Development/Gitea-Tools/branches/review-pr-759-adc61255-independent-20260719T025309 phase: claimed candidate_head: adc61255b2d7eb65d1670e09e561dbd84b652317 target_branch: master target_branch_sha: bde5c5fb20fbf6aec9cd6b802341c43078921d13 last_activity: 2026-07-19T16:27:18Z expires_at: 2026-07-19T16:37:18Z blocker: none
sysadmin requested changes 2026-07-19 11:27:38 -05:00
Dismissed
sysadmin left a comment
Owner

Canonical PR State

STATE: changes-requested
WHO_IS_NEXT: author
NEXT_ACTION: Fail closed when local or remote master SHA is missing; require both known and equal before create_issue bootstrap allowance; add production regression tests; supersede mistaken APPROVE #472
NEXT_PROMPT:

Remediate PR #759 / issue #757 AC3/AC4 on head adc61255 (or push a new head).
Material defect: assess_create_issue_bootstrap only blocks when BOTH tips exist and differ:
  if remote_tip and local_tip and remote_tip != local_tip
Missing local HEAD, missing remote tip, both missing, and resolver Exception→None all permit bootstrap.
Required fix:
1) Both local head_sha and remote_master_sha must be nonempty and equal before allowed/proven.
2) Do not convert resolve_remote_master_sha failures into silent None that still allows bootstrap.
3) bootstrap_permits_control_checkout must require recorded, nonempty, equal tips (or assess must block first).
4) Add tests: missing local; missing remote; both missing; resolver exception fail-closed.
Do not re-request merge until REQUEST_CHANGES is addressed at a new head.

WHAT_HAPPENED: Independent re-verification reproduced AC3/AC4 fail-open on exact head adc61255. Prior APPROVE review #472 is mistaken. Correction authorized via gitea_authorize_review_correction (audit_comment_id 12863). This submission supersedes #472 with REQUEST_CHANGES.
WHY: Bootstrap exemption can be granted without proof that the control checkout equals live remote master, violating issue #757 AC3 (live remote base head) and AC4 (stale/remote-divergent remain blocked).
ISSUE: 757
HEAD_SHA: adc61255b2
REVIEW_STATUS: REQUEST_CHANGES
MERGE_READY: no
BLOCKERS: AC3/AC4 SHA-tip fail-open; mistaken approval #472 must not be treated as merge-ready
VALIDATION: Independent probe on adc61255: missing_local permits=True; missing_remote permits=True; both_missing permits=True; empty strings permits=True; equal_ok permits=True; mismatch permits=False. Source: create_issue_bootstrap.py:145-151; gitea_mcp_server.py:_create_issue_bootstrap_assessment except→None; bootstrap_permits has no SHA equality check; tests lack missing-tip cases.
NATIVE_REVIEW_PROOF: transport=native_mcp; entrypoint=gitea_submit_pr_review; server=gitea-reviewer; profile=prgs-reviewer; identity=sysadmin; head=adc61255b2d7eb65d1670e09e561dbd84b652317; supersedes_review=472; correction_audit_comment=12863; lease_comment=12867
LAST_UPDATED_BY: sysadmin (prgs-reviewer correction of #472)

REQUEST_CHANGES — material safety finding

Exact head: adc61255b2d7eb65d1670e09e561dbd84b652317
Supersedes: formal APPROVE review #472 (same head)

Reproduced facts (all true on this head)

  1. create_issue_bootstrap.py compares SHAs only inside:
    if remote_tip and local_tip and remote_tip != local_tip:
  2. Bootstrap is not refused when either SHA is missing.
  3. gitea_mcp_server._create_issue_bootstrap_assessment converts remote-tip resolution exceptions to remote_master_sha=None.
  4. bootstrap_permits_control_checkout does not require recorded, nonempty, equal local/remote SHAs.
  5. Committed #757 suite has no missing-local / missing-remote / both-missing / resolver-exception rejection case.
  6. Independent probe produced permits=True for missing local HEAD, missing remote tip, and both missing.

Required remediation

  • Both local and remote master SHAs must be known and equal before bootstrap allowance.
  • Missing tip or resolver failure must fail closed (block), not grant exemption.
  • Production-level regression tests for:
    • missing local SHA
    • missing remote SHA
    • both missing
    • resolver failure

Approval #472 disposition

  • gitea_authorize_review_correction authorized with operator_authorized=true (audit comment 12863).
  • This REQUEST_CHANGES is the sanctioned superseding formal review at the same head.
  • Quarantine tool is reconciler/merger/controller-gated; not used from reviewer profile.

Do not merge.

## Canonical PR State STATE: changes-requested WHO_IS_NEXT: author NEXT_ACTION: Fail closed when local or remote master SHA is missing; require both known and equal before create_issue bootstrap allowance; add production regression tests; supersede mistaken APPROVE #472 NEXT_PROMPT: ```text Remediate PR #759 / issue #757 AC3/AC4 on head adc61255 (or push a new head). Material defect: assess_create_issue_bootstrap only blocks when BOTH tips exist and differ: if remote_tip and local_tip and remote_tip != local_tip Missing local HEAD, missing remote tip, both missing, and resolver Exception→None all permit bootstrap. Required fix: 1) Both local head_sha and remote_master_sha must be nonempty and equal before allowed/proven. 2) Do not convert resolve_remote_master_sha failures into silent None that still allows bootstrap. 3) bootstrap_permits_control_checkout must require recorded, nonempty, equal tips (or assess must block first). 4) Add tests: missing local; missing remote; both missing; resolver exception fail-closed. Do not re-request merge until REQUEST_CHANGES is addressed at a new head. ``` WHAT_HAPPENED: Independent re-verification reproduced AC3/AC4 fail-open on exact head adc61255. Prior APPROVE review #472 is mistaken. Correction authorized via gitea_authorize_review_correction (audit_comment_id 12863). This submission supersedes #472 with REQUEST_CHANGES. WHY: Bootstrap exemption can be granted without proof that the control checkout equals live remote master, violating issue #757 AC3 (live remote base head) and AC4 (stale/remote-divergent remain blocked). ISSUE: 757 HEAD_SHA: adc61255b2d7eb65d1670e09e561dbd84b652317 REVIEW_STATUS: REQUEST_CHANGES MERGE_READY: no BLOCKERS: AC3/AC4 SHA-tip fail-open; mistaken approval #472 must not be treated as merge-ready VALIDATION: Independent probe on adc61255: missing_local permits=True; missing_remote permits=True; both_missing permits=True; empty strings permits=True; equal_ok permits=True; mismatch permits=False. Source: create_issue_bootstrap.py:145-151; gitea_mcp_server.py:_create_issue_bootstrap_assessment except→None; bootstrap_permits has no SHA equality check; tests lack missing-tip cases. NATIVE_REVIEW_PROOF: transport=native_mcp; entrypoint=gitea_submit_pr_review; server=gitea-reviewer; profile=prgs-reviewer; identity=sysadmin; head=adc61255b2d7eb65d1670e09e561dbd84b652317; supersedes_review=472; correction_audit_comment=12863; lease_comment=12867 LAST_UPDATED_BY: sysadmin (prgs-reviewer correction of #472) ## REQUEST_CHANGES — material safety finding **Exact head:** `adc61255b2d7eb65d1670e09e561dbd84b652317` **Supersedes:** formal APPROVE review **#472** (same head) ### Reproduced facts (all true on this head) 1. `create_issue_bootstrap.py` compares SHAs only inside: `if remote_tip and local_tip and remote_tip != local_tip:` 2. Bootstrap is **not** refused when either SHA is missing. 3. `gitea_mcp_server._create_issue_bootstrap_assessment` converts remote-tip resolution exceptions to `remote_master_sha=None`. 4. `bootstrap_permits_control_checkout` does **not** require recorded, nonempty, equal local/remote SHAs. 5. Committed #757 suite has no missing-local / missing-remote / both-missing / resolver-exception rejection case. 6. Independent probe produced `permits=True` for missing local HEAD, missing remote tip, and both missing. ### Required remediation - Both local and remote master SHAs must be **known and equal** before bootstrap allowance. - Missing tip or resolver failure must **fail closed** (block), not grant exemption. - Production-level regression tests for: - missing local SHA - missing remote SHA - both missing - resolver failure ### Approval #472 disposition - `gitea_authorize_review_correction` authorized with `operator_authorized=true` (audit comment 12863). - This REQUEST_CHANGES is the sanctioned superseding formal review at the same head. - Quarantine tool is reconciler/merger/controller-gated; not used from reviewer profile. **Do not merge.**
Owner

repo: Scaled-Tech-Consulting/Gitea-Tools
pr: #759
issue: #757
reviewer_identity: sysadmin
profile: prgs-reviewer
session_id: 88750-8d2c3f21d117
worktree: /Users/jasonwalker/Development/Gitea-Tools/branches/review-pr-759-adc61255-independent-20260719T025309
phase: released
candidate_head: adc61255b2
target_branch: master
target_branch_sha: bde5c5fb20
last_activity: 2026-07-19T16:27:54Z
expires_at: 2026-07-19T16:37:54Z
blocker: manual-release

<!-- mcp-review-lease:v1 --> repo: Scaled-Tech-Consulting/Gitea-Tools pr: #759 issue: #757 reviewer_identity: sysadmin profile: prgs-reviewer session_id: 88750-8d2c3f21d117 worktree: /Users/jasonwalker/Development/Gitea-Tools/branches/review-pr-759-adc61255-independent-20260719T025309 phase: released candidate_head: adc61255b2d7eb65d1670e09e561dbd84b652317 target_branch: master target_branch_sha: bde5c5fb20fbf6aec9cd6b802341c43078921d13 last_activity: 2026-07-19T16:27:54Z expires_at: 2026-07-19T16:37:54Z blocker: manual-release
jcwalker3 added 1 commit 2026-07-19 11:59:21 -05:00
Remediates review #473 (REQUEST_CHANGES) on PR #759 / issue #757 AC3/AC4.

The bootstrap compared SHAs only inside:

    if remote_tip and local_tip and remote_tip != local_tip:

so agreement was assumed whenever either tip was unknown. A missing local
HEAD, an unresolvable live master, or a resolver exception silently granted
the control-checkout exemption instead of blocking it. An unknown tip is
missing evidence, not proof of equivalence.

Changes:

* assess_create_issue_bootstrap now blocks unless BOTH tips are known and
  equal, with distinct reasons for missing local HEAD, unknown live master,
  and resolver failure. Adds a remote_master_sha_error parameter so a failed
  resolution is reported as missing evidence rather than absence of a
  constraint.
* Both normalized SHAs and a derived base_tips_verified flag are recorded on
  the assessment. normalize_sha() treats only case and surrounding whitespace
  as equivalent spellings of a commit.
* bootstrap_permits_control_checkout re-derives the comparison from the
  recorded tips instead of trusting base_tips_verified, so a hand-built or
  truncated assessment cannot assert agreement it never proved.
* _create_issue_bootstrap_assessment captures the resolver exception and
  forwards it, replacing the silent except -> None.

One shared assessment still serves both the #274 and #604 guards, and
_BOOTSTRAP_UNSET is preserved. No MCP tool signature gains a bootstrap
argument (AC6). No issue or PR number is special-cased (AC10).

Tests: 16 new assertions across two classes covering missing local, missing
remote, both missing, empty/whitespace tips, mismatch, resolver exception at
the assessment site, and resolver exception through the real
verify_preflight_purity path; plus predicate rejection of stripped tips, a
forged base_tips_verified flag, and a missing flag. All 16 fail against the
sources at adc61255 and pass after this change. The valid non-create_issue
lock_issue test is retained unchanged.

Validation: focused #757 suite 51 passed (31 subtests); affected guard and
preflight suites 217 passed (67 subtests); full suite 3637 passed, 2 failed,
6 skipped, 431 subtests. Both failures (test_issue_702 F1 worktree recovery;
test_reconciler_supersession_close org/repo forwarding) are the documented
pre-existing baseline failures on bde5c5fb and are not caused by this change.

Refs #757

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_015KRvvrFtaM5FEvQ6LvDJMH
Author
Owner

Canonical Issue State

STATE: changes-remediated-awaiting-fresh-review
WHO_IS_NEXT: reviewer
NEXT_ACTION: Perform a fresh independent review of PR #759 at new head 9d2c652ae897afee2f6de139f9b85ab2569b5a85; review #473 was recorded against superseded head adc61255 and is now stale
NEXT_PROMPT:

Independently review PR #759 (Refs #757) on Scaled-Tech-Consulting/Gitea-Tools @ prgs.
Head to review: 9d2c652ae897afee2f6de139f9b85ab2569b5a85
Base: master @ bde5c5fb20fbf6aec9cd6b802341c43078921d13
Prior review #473 (REQUEST_CHANGES) targeted superseded head adc61255.
Verify AC3/AC4: both local and remote master SHAs known and equal before bootstrap
allowance; resolver failure fails closed; predicate requires recorded equal tips.
Use the reviewer namespace only; re-verify identity, parity, head pin, and lease.

WHAT_HAPPENED: Author remediated the AC3/AC4 base-equivalence fail-open identified by review #473 and pushed a second focused commit to the existing branch without force.
WHY: The bootstrap compared SHAs only when both tips existed, so a missing local HEAD, an unknown live master, or a resolver exception granted the control-checkout exemption instead of refusing it.
ISSUE: 757
RELATED_PRS: #759 (this PR, head 9d2c652ae8, open); #750 (landed on master; delivered the create_issue bootstrap this PR makes reachable); #754 (landed on master; dead-session lock recovery assessor used to recover the #757 author lock)
HEAD_SHA: 9d2c652ae8
PRIOR_HEAD_SHA: adc61255b2
REVIEW_STATUS: awaiting-fresh-independent-review
MERGE_READY: no
BLOCKERS: no author-scope blocker; the new head carries no formal verdict yet
VALIDATION: git diff --check clean; py_compile OK on all three changed files; focused #757 suite 51 passed (31 subtests); affected guard/preflight suites 217 passed (67 subtests); full suite 3637 passed, 2 failed, 6 skipped, 431 subtests, both failures pre-existing baseline on bde5c5fb
LAST_UPDATED_BY: jcwalker3 (prgs-author remediation of review #473)

[THREAD STATE LEDGER]

Server-side decision state: REQUEST_CHANGES review #473 exists, is undismissed, and is marked stale by the server. has_blocking_change_requests=true, approval_at_current_head=false, latest_approved_head_sha=null, author_pushed_after_request_changes=true. No formal verdict exists at head 9d2c652. No server-side state changed by this author session other than the branch push and this comment.

Local verdict/state: Author-side remediation is complete; local checks were executed and their results are recorded below. The author records no review verdict; verdicts are reviewer-owned.

Next actor: reviewer

Required action: Perform a fresh independent formal review of PR #759 at exact head 9d2c652ae8 from the reviewer namespace.

Blocker classification: no blocker

What is true now

  • PR #759 is open. Live head is 9d2c652ae897afee2f6de139f9b85ab2569b5a85; base is master @ bde5c5fb20fbf6aec9cd6b802341c43078921d13.
  • Local head, remote branch head, and PR head agree at 9d2c652.
  • Review #473 (REQUEST_CHANGES) targeted adc61255 and is now stale; it remains undismissed. Review #472 (APPROVE verdict) remains dismissed and stale.
  • The #757 author lock is live under the recovered claim, held by jcwalker3 / prgs-author until 2026-07-19T20:52:20Z.
  • Full suite on this head: 3637 passed, 2 failed, 6 skipped, 431 subtests. Both failures are the documented pre-existing baseline failures on bde5c5fb.

What changed

  • Second focused commit 9d2c652 pushed fast-forward onto the existing branch. adc61255 was not amended and remains its parent.
  • create_issue_bootstrap.py — added normalize_sha(); the base-equivalence gate now refuses unless both tips are known and equal, with distinct reasons for missing local HEAD, unknown live master, and resolver failure; both normalized tips and a derived base_tips_verified flag are recorded; bootstrap_permits_control_checkout re-derives the comparison rather than trusting the flag.
  • gitea_mcp_server.py_create_issue_bootstrap_assessment captures the resolver exception and forwards it as remote_master_sha_error instead of discarding it into a permissive None.
  • tests/test_issue_757_bootstrap_guard_agreement.py — two new classes, 16 assertions covering missing local, missing remote, both missing, empty and whitespace tips, mismatch, resolver exception at the assessment site, resolver exception through the real verify_preflight_purity path, and predicate rejection of stripped tips, a forged flag, and a missing flag.
  • All 16 new assertions fail against the sources at adc61255 and pass on 9d2c652.

What is blocked

  • Merge eligibility. No approval exists at 9d2c652, and the undismissed REQUEST_CHANGES from #473 remains on record. This is expected and correct.
  • Nothing else. The author has no outstanding remediation item from #473.

Who/what acts next

A reviewer, operating in the reviewer namespace, performs a fresh independent formal review at head 9d2c652. The author's turn is complete.

Do not do:

  • Do not treat review #472 (APPROVE verdict) as conferring merge authority at this or any head; it is dismissed and stale.
  • Do not treat review #473 as satisfied by this comment. An author comment cannot clear a formal verdict; only a fresh reviewer verdict at the new head can.
  • Do not merge PR #759 at 9d2c652 without a fresh independent approval at that exact head.
  • Do not review, approve, or merge from this author session or the author profile.
  • Do not force-push, rebase, or amend adc61255 or 9d2c652.
  • Do not dismiss, quarantine, or edit reviews #472 or #473 from an author profile.
  • Do not modify issue #758, the branches/fix-issue-757-shared-bootstrap worktree, or the branches/baseline-bde5c5f-issue-757 worktree; none were touched by this work.

Detail — findings addressed

#473 finding Remediation
SHAs compared only inside if remote_tip and local_tip and remote_tip != local_tip Gate inverted: refuses unless both tips are known and equal
Bootstrap not refused when either SHA missing Missing local HEAD and unknown live master each append their own refusing reason
Resolver exceptions become remote_master_sha=None Exception captured and forwarded as missing evidence, not absence of a constraint
Predicate lacks recorded, nonempty, equal SHA check Predicate re-derives the comparison from the recorded tips
Suite lacks missing-tip and resolver cases 16 new assertions across two classes
Probe produced permits=True for missing tips All such inputs now yield permits=False

One shared assessment still serves both the #274 and #604 guards; _BOOTSTRAP_UNSET is preserved; no MCP tool signature gains a bootstrap argument (AC6); no issue or PR number is special-cased (AC10). The valid non-create_issue lock_issue test is retained unchanged.

Tracking issue #760 was filed separately for the expired-lock exact-owner renewal gap; it is not in this PR's scope.

## Canonical Issue State STATE: changes-remediated-awaiting-fresh-review WHO_IS_NEXT: reviewer NEXT_ACTION: Perform a fresh independent review of PR #759 at new head 9d2c652ae897afee2f6de139f9b85ab2569b5a85; review #473 was recorded against superseded head adc61255 and is now stale NEXT_PROMPT: ```text Independently review PR #759 (Refs #757) on Scaled-Tech-Consulting/Gitea-Tools @ prgs. Head to review: 9d2c652ae897afee2f6de139f9b85ab2569b5a85 Base: master @ bde5c5fb20fbf6aec9cd6b802341c43078921d13 Prior review #473 (REQUEST_CHANGES) targeted superseded head adc61255. Verify AC3/AC4: both local and remote master SHAs known and equal before bootstrap allowance; resolver failure fails closed; predicate requires recorded equal tips. Use the reviewer namespace only; re-verify identity, parity, head pin, and lease. ``` WHAT_HAPPENED: Author remediated the AC3/AC4 base-equivalence fail-open identified by review #473 and pushed a second focused commit to the existing branch without force. WHY: The bootstrap compared SHAs only when both tips existed, so a missing local HEAD, an unknown live master, or a resolver exception granted the control-checkout exemption instead of refusing it. ISSUE: 757 RELATED_PRS: #759 (this PR, head 9d2c652ae897afee2f6de139f9b85ab2569b5a85, open); #750 (landed on master; delivered the create_issue bootstrap this PR makes reachable); #754 (landed on master; dead-session lock recovery assessor used to recover the #757 author lock) HEAD_SHA: 9d2c652ae897afee2f6de139f9b85ab2569b5a85 PRIOR_HEAD_SHA: adc61255b2d7eb65d1670e09e561dbd84b652317 REVIEW_STATUS: awaiting-fresh-independent-review MERGE_READY: no BLOCKERS: no author-scope blocker; the new head carries no formal verdict yet VALIDATION: git diff --check clean; py_compile OK on all three changed files; focused #757 suite 51 passed (31 subtests); affected guard/preflight suites 217 passed (67 subtests); full suite 3637 passed, 2 failed, 6 skipped, 431 subtests, both failures pre-existing baseline on bde5c5fb LAST_UPDATED_BY: jcwalker3 (prgs-author remediation of review #473) [THREAD STATE LEDGER] Server-side decision state: REQUEST_CHANGES review #473 exists, is undismissed, and is marked stale by the server. `has_blocking_change_requests=true`, `approval_at_current_head=false`, `latest_approved_head_sha=null`, `author_pushed_after_request_changes=true`. No formal verdict exists at head 9d2c652. No server-side state changed by this author session other than the branch push and this comment. Local verdict/state: Author-side remediation is complete; local checks were executed and their results are recorded below. The author records no review verdict; verdicts are reviewer-owned. Next actor: reviewer Required action: Perform a fresh independent formal review of PR #759 at exact head 9d2c652ae897afee2f6de139f9b85ab2569b5a85 from the reviewer namespace. Blocker classification: no blocker ### What is true now * PR #759 is open. Live head is `9d2c652ae897afee2f6de139f9b85ab2569b5a85`; base is master @ `bde5c5fb20fbf6aec9cd6b802341c43078921d13`. * Local head, remote branch head, and PR head agree at `9d2c652`. * Review #473 (REQUEST_CHANGES) targeted `adc61255` and is now stale; it remains undismissed. Review #472 (APPROVE verdict) remains dismissed and stale. * The #757 author lock is live under the recovered claim, held by jcwalker3 / prgs-author until `2026-07-19T20:52:20Z`. * Full suite on this head: 3637 passed, 2 failed, 6 skipped, 431 subtests. Both failures are the documented pre-existing baseline failures on `bde5c5fb`. ### What changed * Second focused commit `9d2c652` pushed fast-forward onto the existing branch. `adc61255` was not amended and remains its parent. * `create_issue_bootstrap.py` — added `normalize_sha()`; the base-equivalence gate now refuses unless both tips are known and equal, with distinct reasons for missing local HEAD, unknown live master, and resolver failure; both normalized tips and a derived `base_tips_verified` flag are recorded; `bootstrap_permits_control_checkout` re-derives the comparison rather than trusting the flag. * `gitea_mcp_server.py` — `_create_issue_bootstrap_assessment` captures the resolver exception and forwards it as `remote_master_sha_error` instead of discarding it into a permissive `None`. * `tests/test_issue_757_bootstrap_guard_agreement.py` — two new classes, 16 assertions covering missing local, missing remote, both missing, empty and whitespace tips, mismatch, resolver exception at the assessment site, resolver exception through the real `verify_preflight_purity` path, and predicate rejection of stripped tips, a forged flag, and a missing flag. * All 16 new assertions fail against the sources at `adc61255` and pass on `9d2c652`. ### What is blocked * Merge eligibility. No approval exists at `9d2c652`, and the undismissed REQUEST_CHANGES from #473 remains on record. This is expected and correct. * Nothing else. The author has no outstanding remediation item from #473. ### Who/what acts next A reviewer, operating in the reviewer namespace, performs a fresh independent formal review at head `9d2c652`. The author's turn is complete. **Do not do:** * Do not treat review #472 (APPROVE verdict) as conferring merge authority at this or any head; it is dismissed and stale. * Do not treat review #473 as satisfied by this comment. An author comment cannot clear a formal verdict; only a fresh reviewer verdict at the new head can. * Do not merge PR #759 at `9d2c652` without a fresh independent approval at that exact head. * Do not review, approve, or merge from this author session or the author profile. * Do not force-push, rebase, or amend `adc61255` or `9d2c652`. * Do not dismiss, quarantine, or edit reviews #472 or #473 from an author profile. * Do not modify issue #758, the `branches/fix-issue-757-shared-bootstrap` worktree, or the `branches/baseline-bde5c5f-issue-757` worktree; none were touched by this work. ### Detail — findings addressed | #473 finding | Remediation | |---|---| | SHAs compared only inside `if remote_tip and local_tip and remote_tip != local_tip` | Gate inverted: refuses unless both tips are known and equal | | Bootstrap not refused when either SHA missing | Missing local HEAD and unknown live master each append their own refusing reason | | Resolver exceptions become `remote_master_sha=None` | Exception captured and forwarded as missing evidence, not absence of a constraint | | Predicate lacks recorded, nonempty, equal SHA check | Predicate re-derives the comparison from the recorded tips | | Suite lacks missing-tip and resolver cases | 16 new assertions across two classes | | Probe produced `permits=True` for missing tips | All such inputs now yield `permits=False` | One shared assessment still serves both the #274 and #604 guards; `_BOOTSTRAP_UNSET` is preserved; no MCP tool signature gains a bootstrap argument (AC6); no issue or PR number is special-cased (AC10). The valid non-`create_issue` `lock_issue` test is retained unchanged. Tracking issue **#760** was filed separately for the expired-lock exact-owner renewal gap; it is not in this PR's scope.
Owner

repo: Scaled-Tech-Consulting/Gitea-Tools
pr: #759
issue: #757
reviewer_identity: sysadmin
profile: prgs-reviewer
session_id: 90364-6d2faa3709ef
worktree: /Users/jasonwalker/Development/Gitea-Tools/branches/review-418
phase: claimed
candidate_head: 9d2c652ae8
target_branch: master
target_branch_sha: bde5c5fb20
last_activity: 2026-07-19T17:28:25Z
expires_at: 2026-07-19T17:38:25Z
blocker: none

<!-- mcp-review-lease:v1 --> repo: Scaled-Tech-Consulting/Gitea-Tools pr: #759 issue: #757 reviewer_identity: sysadmin profile: prgs-reviewer session_id: 90364-6d2faa3709ef worktree: /Users/jasonwalker/Development/Gitea-Tools/branches/review-418 phase: claimed candidate_head: 9d2c652ae897afee2f6de139f9b85ab2569b5a85 target_branch: master target_branch_sha: bde5c5fb20fbf6aec9cd6b802341c43078921d13 last_activity: 2026-07-19T17:28:25Z expires_at: 2026-07-19T17:38:25Z blocker: none
sysadmin approved these changes 2026-07-19 12:29:08 -05:00
sysadmin left a comment
Owner

Canonical PR State

STATE: approved
WHO_IS_NEXT: merger
NEXT_ACTION: Fresh merger session must reassess and merge PR #759 at exact head 9d2c652ae897afee2f6de139f9b85ab2569b5a85; do not force-merge
NEXT_PROMPT:

Merge PR #759 (Closes #757) on Scaled-Tech-Consulting/Gitea-Tools @ prgs.
Pinned head: 9d2c652ae897afee2f6de139f9b85ab2569b5a85
Base: master @ bde5c5fb20fbf6aec9cd6b802341c43078921d13
Independent reviewer APPROVE already posted by sysadmin/prgs-reviewer at this exact head.
Use merger namespace only; re-verify identity, parity, head pin, and lease before merge.

WHAT_HAPPENED: Independent reviewer (Grok / sysadmin / prgs-reviewer) completed APPROVE at remediated head 9d2c652 after full production-code inspection and required validation. Review #473 REQUEST_CHANGES is stale after author remediation and is superseded by this fresh verdict at the new head.
WHY: #757 AC3/AC4 fail-open from adc61255 is closed: both local and remote master tips must be known and equal; resolver exceptions fail closed; shared predicate re-derives equality; single assessment serves #274 and #604; wrong_worktree-only waiver; no public bootstrap args; non-create_issue guards preserved.
ISSUE: 757
HEAD_SHA: 9d2c652ae8
PRIOR_HEAD_SHA: adc61255b2
REVIEW_STATUS: APPROVE
MERGE_READY: yes (merger recheck required)
BLOCKERS: none for this PR; full-suite failures claimed by author as baseline on bde5c5fb were not re-run here because focused/affected suites fully passed and author baseline evidence matched prior independent reproduction pattern
VALIDATION: git diff --check clean; py_compile OK; pytest tests/test_issue_757_bootstrap_guard_agreement.py 51 passed (31 subtests); expanded affected suites (create_issue bootstrap/workspace-guard, anti-stomp, author-mutation-worktree, create_issue, reconciler close workspace) 142 passed (47 subtests); independent probe confirms missing_local/remote/both/resolver fail-closed at 9d2c652 and fail-open at adc61255
NATIVE_REVIEW_PROOF: transport=native_mcp; entrypoint=gitea_submit_pr_review; server=gitea-reviewer; profile=prgs-reviewer; identity=sysadmin; head=9d2c652ae897afee2f6de139f9b85ab2569b5a85; lease_comment=12902; supersedes_review=473
LAST_UPDATED_BY: sysadmin (prgs-reviewer independent review; LLM=Grok)

Independent review summary

Reviewed head: 9d2c652ae897afee2f6de139f9b85ab2569b5a85
Base: master @ bde5c5fb20fbf6aec9cd6b802341c43078921d13
Author: jcwalker3 (self-review blocked; identity differs)
Reviewer: sysadmin / prgs-reviewer / reviewer (identity_match=true)
Parity: in_parity, restart_required=false
Lease: session 90364-6d2faa3709ef, comment 12902
Handoff comment: 12892 present

Findings verified (all pass)

  1. Single assessment_create_issue_bootstrap_assessment once in verify_preflight_purity; same object threaded into #274 and #604.
  2. Known local HEAD — missing/empty/whitespace local HEAD refuse bootstrap.
  3. Known live remote tip — missing/empty remote tip refuse bootstrap.
  4. Exact equality — normalized tips must match before allowance.
  5. Resolver errors — exception captured as remote_master_sha_error; fail-closed (not permissive None).
  6. Downstream predicatebootstrap_permits_control_checkout requires base_tips_verified and independently re-derives equality from recorded tips.
  7. Guard consistency — both guards use shared predicate on shared assessment.
  8. Blast-radius#604 waives only wrong_worktree; dirty/repo/stale/detached/role/task/lease remain independent; lock_issue still blocked on control checkout.
  9. Internal-only evidence — no public gitea_* tool param exposes bootstrap eligibility.
  10. _BOOTSTRAP_UNSET — distinguishes unset vs refused assessment; refused not recomputed into permission when threaded.
  11. Review #473 coverage — remediation tests for missing/empty local+remote, both missing, mismatch, resolver exception, forged/incomplete assessment, real preflight path.
  12. Non-vacuous — independent probe fails open on adc61255 and fail-closed on 9d2c652; e2e leaves #604 live (does not patch to no-op).
  13. Reconciler regression — lock_issue control-checkout block retained.

Prior reviews

  • #472 APPROVED at adc61255: dismissed=true, stale=true
  • #473 REQUEST_CHANGES at adc61255: undismissed, stale=true, author_pushed_after_request_changes=true; not authoritative for 9d2c652

Verdict: APPROVE. Do not merge from this review session.

## Canonical PR State STATE: approved WHO_IS_NEXT: merger NEXT_ACTION: Fresh merger session must reassess and merge PR #759 at exact head 9d2c652ae897afee2f6de139f9b85ab2569b5a85; do not force-merge NEXT_PROMPT: ```text Merge PR #759 (Closes #757) on Scaled-Tech-Consulting/Gitea-Tools @ prgs. Pinned head: 9d2c652ae897afee2f6de139f9b85ab2569b5a85 Base: master @ bde5c5fb20fbf6aec9cd6b802341c43078921d13 Independent reviewer APPROVE already posted by sysadmin/prgs-reviewer at this exact head. Use merger namespace only; re-verify identity, parity, head pin, and lease before merge. ``` WHAT_HAPPENED: Independent reviewer (Grok / sysadmin / prgs-reviewer) completed APPROVE at remediated head 9d2c652 after full production-code inspection and required validation. Review #473 REQUEST_CHANGES is stale after author remediation and is superseded by this fresh verdict at the new head. WHY: #757 AC3/AC4 fail-open from adc61255 is closed: both local and remote master tips must be known and equal; resolver exceptions fail closed; shared predicate re-derives equality; single assessment serves #274 and #604; wrong_worktree-only waiver; no public bootstrap args; non-create_issue guards preserved. ISSUE: 757 HEAD_SHA: 9d2c652ae897afee2f6de139f9b85ab2569b5a85 PRIOR_HEAD_SHA: adc61255b2d7eb65d1670e09e561dbd84b652317 REVIEW_STATUS: APPROVE MERGE_READY: yes (merger recheck required) BLOCKERS: none for this PR; full-suite failures claimed by author as baseline on bde5c5fb were not re-run here because focused/affected suites fully passed and author baseline evidence matched prior independent reproduction pattern VALIDATION: git diff --check clean; py_compile OK; pytest tests/test_issue_757_bootstrap_guard_agreement.py 51 passed (31 subtests); expanded affected suites (create_issue bootstrap/workspace-guard, anti-stomp, author-mutation-worktree, create_issue, reconciler close workspace) 142 passed (47 subtests); independent probe confirms missing_local/remote/both/resolver fail-closed at 9d2c652 and fail-open at adc61255 NATIVE_REVIEW_PROOF: transport=native_mcp; entrypoint=gitea_submit_pr_review; server=gitea-reviewer; profile=prgs-reviewer; identity=sysadmin; head=9d2c652ae897afee2f6de139f9b85ab2569b5a85; lease_comment=12902; supersedes_review=473 LAST_UPDATED_BY: sysadmin (prgs-reviewer independent review; LLM=Grok) ## Independent review summary **Reviewed head:** `9d2c652ae897afee2f6de139f9b85ab2569b5a85` **Base:** master @ `bde5c5fb20fbf6aec9cd6b802341c43078921d13` **Author:** jcwalker3 (self-review blocked; identity differs) **Reviewer:** sysadmin / prgs-reviewer / reviewer (identity_match=true) **Parity:** in_parity, restart_required=false **Lease:** session 90364-6d2faa3709ef, comment 12902 **Handoff comment:** 12892 present ### Findings verified (all pass) 1. **Single assessment** — `_create_issue_bootstrap_assessment` once in `verify_preflight_purity`; same object threaded into #274 and #604. 2. **Known local HEAD** — missing/empty/whitespace local HEAD refuse bootstrap. 3. **Known live remote tip** — missing/empty remote tip refuse bootstrap. 4. **Exact equality** — normalized tips must match before allowance. 5. **Resolver errors** — exception captured as `remote_master_sha_error`; fail-closed (not permissive None). 6. **Downstream predicate** — `bootstrap_permits_control_checkout` requires `base_tips_verified` and independently re-derives equality from recorded tips. 7. **Guard consistency** — both guards use shared predicate on shared assessment. 8. **Blast-radius** — #604 waives only wrong_worktree; dirty/repo/stale/detached/role/task/lease remain independent; lock_issue still blocked on control checkout. 9. **Internal-only evidence** — no public `gitea_*` tool param exposes bootstrap eligibility. 10. **`_BOOTSTRAP_UNSET`** — distinguishes unset vs refused assessment; refused not recomputed into permission when threaded. 11. **Review #473 coverage** — remediation tests for missing/empty local+remote, both missing, mismatch, resolver exception, forged/incomplete assessment, real preflight path. 12. **Non-vacuous** — independent probe fails open on adc61255 and fail-closed on 9d2c652; e2e leaves #604 live (does not patch to no-op). 13. **Reconciler regression** — lock_issue control-checkout block retained. ### Prior reviews - #472 APPROVED at adc61255: dismissed=true, stale=true - #473 REQUEST_CHANGES at adc61255: undismissed, stale=true, author_pushed_after_request_changes=true; not authoritative for 9d2c652 **Verdict: APPROVE. Do not merge from this review session.**
Owner

repo: Scaled-Tech-Consulting/Gitea-Tools
pr: #759
issue: #757
reviewer_identity: sysadmin
profile: prgs-reviewer
session_id: 90364-6d2faa3709ef
worktree: /Users/jasonwalker/Development/Gitea-Tools/branches/review-418
phase: released
candidate_head: 9d2c652ae8
target_branch: master
target_branch_sha: bde5c5fb20
last_activity: 2026-07-19T17:29:15Z
expires_at: 2026-07-19T17:39:15Z
blocker: manual-release

<!-- mcp-review-lease:v1 --> repo: Scaled-Tech-Consulting/Gitea-Tools pr: #759 issue: #757 reviewer_identity: sysadmin profile: prgs-reviewer session_id: 90364-6d2faa3709ef worktree: /Users/jasonwalker/Development/Gitea-Tools/branches/review-418 phase: released candidate_head: 9d2c652ae897afee2f6de139f9b85ab2569b5a85 target_branch: master target_branch_sha: bde5c5fb20fbf6aec9cd6b802341c43078921d13 last_activity: 2026-07-19T17:29:15Z expires_at: 2026-07-19T17:39:15Z blocker: manual-release
Owner

repo: Scaled-Tech-Consulting/Gitea-Tools
pr: #759
issue: #757
reviewer_identity: sysadmin
profile: prgs-merger
session_id: 93874-b75cdb469c9a
worktree: /Users/jasonwalker/Development/Gitea-Tools/branches/merge-pr-759-9d2c652
phase: claimed
candidate_head: 9d2c652ae8
target_branch: master
target_branch_sha: bde5c5fb20
last_activity: 2026-07-19T17:33:52Z
expires_at: 2026-07-19T17:43:52Z
blocker: none

<!-- mcp-review-lease:v1 --> repo: Scaled-Tech-Consulting/Gitea-Tools pr: #759 issue: #757 reviewer_identity: sysadmin profile: prgs-merger session_id: 93874-b75cdb469c9a worktree: /Users/jasonwalker/Development/Gitea-Tools/branches/merge-pr-759-9d2c652 phase: claimed candidate_head: 9d2c652ae897afee2f6de139f9b85ab2569b5a85 target_branch: master target_branch_sha: bde5c5fb20fbf6aec9cd6b802341c43078921d13 last_activity: 2026-07-19T17:33:52Z expires_at: 2026-07-19T17:43:52Z blocker: none
sysadmin merged commit 854818e65a into master 2026-07-19 12:34:08 -05:00
Owner

Stale #332 review-decision lock cleanup (#594)

Status: APPLIED

Manual deletion of session-state files is not the workflow.
This path only clears a lock when the referenced PR is merged/closed.

## Stale #332 review-decision lock cleanup (#594) Status: **APPLIED** - actor: `sysadmin` - profile: `prgs-merger` - timestamp: `2026-07-19T17:34:10.758647+00:00` - last terminal: `approve` on PR #759 - PR state: `closed` (merged=True) - merge_commit_sha: `854818e65a2741ba0740773fd9593d5e1f3d5751` - prior live_mutations_count: `3` - prior profile_identity: `prgs-reviewer` Manual deletion of session-state files is **not** the workflow. This path only clears a lock when the referenced PR is merged/closed.
Owner

repo: Scaled-Tech-Consulting/Gitea-Tools
pr: #759
issue: #757
reviewer_identity: sysadmin
profile: prgs-merger
session_id: 93874-b75cdb469c9a
worktree: /Users/jasonwalker/Development/Gitea-Tools/branches/merge-pr-759-9d2c652
phase: released
candidate_head: 9d2c652ae8
target_branch: master
target_branch_sha: bde5c5fb20
last_activity: 2026-07-19T17:39:43Z
expires_at: 2026-07-19T17:49:43Z
blocker: post-merge-moot

<!-- mcp-review-lease:v1 --> repo: Scaled-Tech-Consulting/Gitea-Tools pr: #759 issue: #757 reviewer_identity: sysadmin profile: prgs-merger session_id: 93874-b75cdb469c9a worktree: /Users/jasonwalker/Development/Gitea-Tools/branches/merge-pr-759-9d2c652 phase: released candidate_head: 9d2c652ae897afee2f6de139f9b85ab2569b5a85 target_branch: master target_branch_sha: bde5c5fb20fbf6aec9cd6b802341c43078921d13 last_activity: 2026-07-19T17:39:43Z expires_at: 2026-07-19T17:49:43Z blocker: post-merge-moot
Sign in to join this conversation.
No Reviewers
No labels
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

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