Commit Graph
504 Commits
Author SHA1 Message Date
sysadmin e7811cb5bb Merge branch 'master' into feat/issue-523-reconciler-cleanup 2026-07-08 23:13:24 -05:00
sysadmin e5bf8c9647 fix: strengthen reconciler merged cleanup tests and runbook (#523)
Make the preflight bypass test actually exercise purity (not test short-circuit),
cover unmerged/open-head fail-closed cleanup, and document post-merge cleanup
ownership for prgs-reconciler so authors are not required for that path.
2026-07-09 00:09:47 -04:00
sysadmin b68805e88a Merge pull request 'feat: add skip-stale-REQUEST_CHANGES reviewer menu prompt (Closes #482)' (#491) from feat/issue-482-skip-stale-request-changes-pr into master 2026-07-08 23:06:57 -05:00
sysadmin 08957aeb2a Merge pull request 'feat: validate Selected PR: none in cleanup mode when queue is empty' (#576) from feat/issue-572-empty-queue-fallback into master 2026-07-08 23:01:11 -05:00
sysadmin 72ae320400 Merge branch 'master' into feat/issue-523-reconciler-cleanup 2026-07-08 22:44:45 -05:00
sysadmin f04f61058f Merge branch 'master' into feat/issue-420-server-code-parity 2026-07-08 22:44:27 -05:00
sysadmin a82d35f8bd feat: validate Selected PR: none in cleanup mode when queue is empty 2026-07-08 23:33:51 -04:00
sysadmin 066eec8477 Merge pull request 'feat: require true pre-merge baseline proof for non-zero validation exits (Closes #533)' (#574) from feat/issue-533-premerge-baseline-proof into master 2026-07-08 22:21:30 -05:00
sysadmin e4f1a52a87 feat: authorized cleanup for reviewer scratch worktrees (Closes #534)
Discover branches/review-pr<N>[-submit] worktrees separately from author
cleanup, fail closed on dirty trees / open PRs / active reviewer leases,
and remove only assessed-safe scratch paths via reconcile.
2026-07-08 23:12:57 -04:00
sysadmin 631620d264 Merge pull request 'feat: add canonical state handoff ledger (Closes #494)' (#498) from feat/issue-494-state-handoff-ledger into master 2026-07-08 22:07:47 -05:00
sysadminandClaude Opus 4.8 7fb813446f feat: require true pre-merge baseline proof for non-zero validation exits (Closes #533)
Add premerge_baseline_proof.py distinguishing four validation outcomes
(clean pass / current-master failure reproduced / pre-merge baseline-proven
failure / unresolved regression risk). A non-zero exit may only be labeled
"baseline"/"pre-existing" with pre-merge proof: the failure reproduced on the
PR's pre-merge base commit, or a documented known-failure record predating the
PR. Current-master (post-merge) reproduction is explicitly rejected as
sufficient baseline proof.

- premerge_baseline_proof.py: assess_premerge_baseline_proof + labels
- final_report_validator.py: reviewer.premerge_baseline_proof rule on
  review_pr and reconcile_already_landed tasks
- skills/llm-project-workflow/templates/review-pr.md: baseline proof section
  requiring base commit, tested commit, command, exit status, failure signature
- tests/test_premerge_baseline_proof.py: reject current-master-only proof,
  accept pre-merge base proof and documented known-failure records

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
2026-07-08 23:04:44 -04:00
sysadmin f6b2adac4d Merge pull request 'feat: discover non-canonical worktrees by branch matching (Closes #528)' (#568) from feat/issue-528-reconcile-worktree-naming into master 2026-07-08 22:03:44 -05:00
sysadmin 7a0de4a8e9 feat: discover non-canonical worktrees by branch matching (Closes #528) 2026-07-08 22:53:34 -04:00
sysadmin e0c583db75 Merge branch 'master' into feat/issue-494-state-handoff-ledger 2026-07-08 21:52:36 -05:00
sysadmin 32fc1719aa feat: allow reconciler profile to run merged cleanup directly (Closes #523) 2026-07-08 22:49:19 -04:00
sysadmin 565363d5f4 docs: define bootstrap review path for self-hosted MCP fixes (Closes #557)
Document the narrow controller-authorized path for landing MCP workflow
fixes when live daemons cannot canonically review themselves, with
required audits, allowed/forbidden actions, and post-land restart steps.
2026-07-08 22:36:10 -04:00
sysadmin 9a2e585a9e Merge pull request 'feat: enforce reconciler PR-close proof fields in final reports (Closes #306)' (#423) from feat/issue-306-reconciler-close-proof into master 2026-07-08 21:32:32 -05:00
sysadmin 81822da04d Merge pull request 'feat: add controller issue-acceptance gate (Closes #500)' (#504) from feat/issue-500-controller-issue-acceptance-gate into master 2026-07-08 21:29:05 -05:00
sysadminandClaude Opus 4.8 e97b1d3642 fix: resolve conflicts for PR #444
Merge prgs/master into PR branch to restore mergeability.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
2026-07-08 22:28:12 -04:00
sysadmin 2a3d30fb3a feat: persist MCP workflow proof and decision lock across daemons (Closes #559)
Share review-workflow-load and review-decision-lock state across MCP
daemon process pools via a user-private durable store keyed by profile
identity (not host-global /tmp), with TTL and fail-closed profile checks.
2026-07-08 22:22:34 -04:00
sysadmin 1ffa911dbc Merge pull request 'feat: add lease and collision visibility to web UI (Closes #433)' (#454) from feat/issue-433-lease-visibility into master 2026-07-08 21:22:21 -05:00
sysadmin 5ad764b359 Merge pull request 'Detect stale MCP runtime before mutation tools execute' (#545) from fix/issue-531-mcp-eof-defect into master 2026-07-08 21:20:16 -05:00
sysadmin 0e791325f8 feat: add canonical run-tests runner (Closes #473)
Merge PR #476 — root-level run-tests.sh full-validation runner (Closes #473).
2026-07-08 21:16:06 -05:00
sysadmin 826d632173 Merge pull request 'feat: require exact per-mutation capability proof in reviewer reports (Closes #405)' (#418) from feat/issue-405-mutation-capability-proof into master 2026-07-08 21:13:08 -05:00
sysadmin 9d86fc44e4 fix: return structured conflict-fix push assessment errors (Closes #519)
Merge PR #520 — structured conflict-fix push assessment errors (Closes #519).
2026-07-08 21:11:29 -05:00
sysadmin 8db26c9a15 fix: preserve actual reconciler role for comment_issue preflight (Closes #540)
Merge PR #541 — preserve actual reconciler role for #274/#475 exemptions during comment_issue preflight (Closes #540).
2026-07-08 21:09:33 -05:00
sysadmin ae9ed8a908 fix: bind issue comments to explicit worktree path (Closes #560)
Merge PR #561 — bind issue comments to explicit worktree path (Closes #560).
2026-07-08 21:09:01 -05:00
sysadmin f1449ff5c8 fix: isolate #519 PR lookup from shared lease comment listing
Keep _fetch_pr_lease_comments_safe for gitea_assess_conflict_fix_push
only. Restore _list_pr_lease_comments to a single comments GET so merge
approval feedback and #485 non-list handling keep stable API call order.

Closes #519
2026-07-08 22:07:59 -04:00
sysadmin 08bcc03f17 fix: return structured conflict-fix push assessment errors (Closes #519)
Resolve PR via pulls API before fetching lease comments so
gitea_assess_conflict_fix_push fails closed with actionable reasons
instead of surfacing HTTP 500 when Gitea returns not-found errors.

Add regression tests and document assessment-failure handoff in work-issue.
2026-07-08 22:07:59 -04:00
sysadmin 6e589e73ea fix: guard remote/repo mismatch vs local git remote (Closes #530)
Merge PR #555 — remote/repo mismatch guard vs local git remote (Closes #530).
2026-07-08 21:07:02 -05:00
sysadmin 8c171fb47b Merge pull request 'feat: add root MCP operator shell menu (#478)' (#479) from feat/issue-478-mcp-menu-shell into master 2026-07-08 21:04:35 -05:00
sysadmin 18e7d7b6e1 Merge pull request 'fix: remove duplicate verify_preflight_purity in gitea_adopt_merger_pr_lease (closes #548)' (#550) from issue-548-fix-duplicate-preflight into master 2026-07-08 20:54:40 -05:00
sysadmin bd22135906 fix: bind issue comments to explicit worktree path (Closes #560) 2026-07-08 16:13:34 -04:00
sysadminandClaude Opus 4.8 fd2bc018ff fix: guard remote/repo mismatch vs local git remote (Closes #530)
Bare remote=prgs resolved to the hardcoded REMOTES default
Scaled-Tech-Consulting/Timesheet instead of the Gitea-Tools repository
the local git remote points at, causing false 404s and risking mutation
of a different repository.

Add remote_repo_guard.assess_remote_repo_match (pure) + formatter, wired
into gitea_mcp_server._resolve so every read/lookup/mutation tool fails
closed when the MCP-resolved org/repo disagrees with the local git remote
URL and the caller did not pass explicit org/repo. The guard is
best-effort: it skips when both org and repo are explicit, when the local
remote URL is unavailable, and is bypassed under pytest unless
GITEA_FORCE_REMOTE_REPO_CHECK is set.

Add tests/test_remote_repo_guard.py (pure-function cases + server wiring
proving a lookup tool cannot silently query a different repository), and
update author/reviewer/merger handoff templates to require explicit
remote/org/repo.

Closes #530

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
2026-07-08 15:49:31 -04:00
sysadmin 535da1bc5a chore: remove trailing extra blank line at EOF in test_mcp_server.py 2026-07-08 15:40:12 -04:00
sysadmin dfbee45309 fix: resolve reviewer preflight capability/lease deadlock and add gitea_release_reviewer_pr_lease tool (closes #546) 2026-07-08 15:29:18 -04:00
sysadmin a4e014e62b fix: remove duplicate verify_preflight_purity in gitea_adopt_merger_pr_lease (#548)
The second direct call after _verify_role_mutation_workspace caused
_clear_preflight_capability_state() to run twice (or between checks),
clearing valid capability/preflight state. This forced temp local
patches during #542/#517 merge/reconcile.

- Remove the redundant verify call (the _verify already performs
  purity verification with correct worktree_path).
- Update test to reflect single invocation path and add explicit
  test proving state preservation, single call, no dupe clear,
  and no need for raw/temp fallbacks.
- Reconciler/controller flows stay fully MCP-native.

Fixes #548
2026-07-08 15:01:48 -04:00
sysadmin c64809134f Detect stale MCP runtime before mutation tools execute 2026-07-08 13:43:50 -04:00
sysadminandClaude Opus 4.8 749ca04388 fix: scope MCP cleanup proof to mutation ledgers (#517)
Raw branch/comment delete detection now scans only Cleanup mutations,
Git ref mutations, and Worktree mutations ledger fields so narrative
§28B citations and validation notes no longer false-positive.

Authorized cleanup tool proof also applies when cleanup is claimed under
Git ref or Worktree mutation ledgers while Cleanup mutations is none.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
2026-07-08 13:43:39 -04:00
sysadminandClaude Opus 4.8 ea51b0196a feat: require MCP-native post-merge cleanup proof (Closes #517)
Add mcp_native_cleanup_proof verifier that blocks raw git branch deletion and
raw API comment deletion scripts as cleanup proof, requires authorized
reconciler MCP tools in cleanup mutation ledgers, and separates merge from
cleanup mutations in controller handoffs.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
2026-07-08 12:54:37 -04:00
sysadmin cc63ab74e6 Merge pull request 'feat: add worktree cleanup audit integrity (Closes #404)' (#417) from feat/issue-404-worktree-cleanup-audit into master 2026-07-08 11:51:06 -05:00
sysadminandClaude Opus 4.8 9438855fdd fix: preserve actual reconciler role for #274/#475 role exemptions during comment_issue preflight (Closes #540)
resolve_task_capability("comment_issue") stamps _preflight_resolved_role
= "author" because comment_issue.required_role_kind = author.
_effective_workspace_role() prefers that stamp, so a genuine
prgs-reconciler session was classified as an author inside the #274
branch-only mutation guard and the #475 root checkout guard, blocking
gitea_create_issue_comment from the control checkout.

Fix keys the role exemptions off the actual active profile role as well
as the effective workspace role:

- Add _actual_profile_role(): derives the workspace role from the active
  profile alone, never from _preflight_resolved_role.
- _enforce_branches_only_author_mutation: exempt when EITHER the
  effective role OR the actual profile role is a non-author role.
- _enforce_root_checkout_guard: pass actual_role; assess_root_checkout_guard
  now exempts a reconciler by resolved OR actual role.

Author blocking is preserved: an actual author profile classifies as
author in both signals, so it stays blocked on a contaminated control
checkout. Merger strictness stays keyed on the resolved task role so a
merger operating from its clean branches/ workspace under a non-merge
task is not over-tightened.

Regression tests (tests/test_issue_540_comment_role_poison.py) cover the
reconciler comment path, author-blocking path, reviewer/merger/reconciler
role classification under a poisoned author stamp, and the root guard
actual_role exemption.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
2026-07-08 12:03:14 -04:00
sysadmin cfce823dd7 Merge pull request 'feat: guarded merger lease adoption flow (#536)' (#538) from feat/issue-536-merger-lease-adoption into master 2026-07-08 10:47:51 -05:00
sysadmin e27b6ddefb feat: add worktree cleanup audit integrity (Closes #404)
Reconcile before/after branches/ snapshots so preserved worktrees cannot
disappear without removal logs or explained state transitions.

- worktree_cleanup_audit.py: snapshot capture, disposition reconciliation
- gitea_capture_branches_worktree_snapshot, gitea_assess_worktree_cleanup_integrity
- Final-report rule author.worktree_cleanup_audit_proof
- worktree-cleanup.md bulk audit section
- tests/test_worktree_cleanup_audit.py (11 cases)
2026-07-08 11:15:55 -04:00
sysadmin cefebd7643 test: seed review workflow load and pass expected_head_sha in legacy test fixtures 2026-07-08 11:14:06 -04:00
sysadminandClaude Opus 4.8 3d540f6fba feat: add workflow-load session boundary proof (Closes #403)
Extend the review workflow load gate with pre-review command classification,
boundary violation tracking, and structured helper-result requirements in
final reports. Adds gitea_record_pre_review_command MCP tool.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
2026-07-08 11:13:43 -04:00
sysadmin 2bb45c0f80 Merge pull request 'feat: add root checkout guard for contaminated control checkout (Closes #475)' (#488) from feat/issue-475-root-checkout-guard into master 2026-07-08 10:12:52 -05:00
sysadmin 0b62d4e06a Merge pull request 'feat: add session-owned worktree cleanup audit and TTL enforcement (Closes #401)' (#492) from feat/issue-401-worktree-cleanup-ttl into master 2026-07-08 10:11:15 -05:00
sysadmin a2aea5357d fix: resolve conflicts for PR #444
Merge prgs/master into feat/issue-420-server-code-parity and preserve PR intent
alongside compatible master guardrails.
2026-07-08 11:10:13 -04:00
sysadminandClaude Opus 4.8 7d5c7df82f fix: resolve conflicts for PR #418
Merge prgs/master into feat/issue-405-mutation-capability-proof and keep
both reviewer mutation-capability proof and post-merge cleanup proof rules.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
2026-07-08 11:06:03 -04:00