Skip to content

Self-hosted, Self-Improving, Federated Everything App — dev management, agent orchestration, persistent mind, digital twin, second brain, and creative pipeline from a single dashboard over Tailscale to port the user into the OS

test: align delivery prompt snapshots with focused validation policy

[._.]/ Adam Eivy35e8a7da2553
diff --git a/server/services/promptSections/__snapshots__/reviewLoopMatrix/followUp-gh-merge-compact.txt b/server/services/promptSections/__snapshots__/reviewLoopMatrix/followUp-gh-merge-compact.txt
index b27d951b5b..8e1d8ba49f 100644
--- a/server/services/promptSections/__snapshots__/reviewLoopMatrix/followUp-gh-merge-compact.txt
+++ b/server/services/promptSections/__snapshots__/reviewLoopMatrix/followUp-gh-merge-compact.txt
@@ -26,7 +26,7 @@ Only an `ok: true` response with a validated `clean` or `findings` verdict and a
2. Fix EVERY finding from the review in this worktree, including non-blocking findings and nits; run tests, commit (`feat:`/`fix:` prefix, no Co-Authored-By), push, and resolve ALL review threads from that review, including non-blocking findings and nits.
3. Re-review with the same reviewer until clean, then advance to the next reviewer in the list.
**Own delivery through completion:** By default stay responsible for "https://github.com/example-org/example-repo/pull/42" through all required CI, review, confirmed MERGED and safe cleanup. GitHub auto-merge enabled is not completion and does not transfer failure recovery or cleanup. Early finish is allowed only with an explicit persisted PortOS pending-merge receipt for the exact published/reviewed head, accepted after the server observes the configured CI backlog threshold. The app setting `mergeHandoffMinQueuedRuns` is opt-in: absent/null means keep ownership; no threshold is inferred from elapsed time. Unknown backlog, refused handoff or failed receipt persistence means continue in-session. The receipt owns CI failure recovery, changed heads, merge confirmation and preserved cleanup across restarts. Report its receipt ID and PR/head as pending, never merged; preserve the checkout and issue until the successor confirms completion. Intentional leave-open policies remain unchanged. Never enable native GitHub auto-merge to bypass local admission or a refused handoff.
-**Pregate attestation (GitHub, right after the push):** if this repository has `scripts/pregate-attest.js`, run it from the checkout you pushed — for a new pull request, after the push and before opening it. It posts a `pregate` commit status bound to the tree your green `npm run pregate` validated, so the pull request's CI skips the attested stages (docs/GITHUB_ACTIONS.md "Pregate attestation"). If it refuses, do not rerun pregate or retry just to attest: say why in your completion summary and wait for full CI as before.
+**Local validation:** Honor repo-focused lint/style, structural guards and changed-behavior tests; broad local suites are opt-in. Hosted CI and configured reviews remain mandatory. For repositories with `scripts/pregate-attest.js`, inspect receipt `validationMode`: `focused` never attests CI; only explicit `ci` or compatible legacy proof may attest after push. Report refusals; never rerun solely to attest.
4. **Wait for CI to finish**: `gh pr checks "https://github.com/example-org/example-repo/pull/42" --watch --fail-fast --interval 30`. "No checks reported" is AMBIGUOUS — a just-opened PR reports it while checks are still attaching, and merging on it races the CI this gate exists to wait for. Treat it as green ONLY when the repo genuinely has no CI (`gh workflow list` is empty / nothing in `.github/workflows` triggers on pull_request, and no external status check is configured). If CI IS expected, wait 30s and re-check for up to 5 minutes — and if it still hasn't attached, **leave the PR open and say so**; never merge on checks that were expected but never appeared.
5. **Clear whatever blocks the merge, then re-check.** A conflict-free branch may merge behind the base when required checks pass for its current head and configured reviews are satisfied. Base movement alone does not require rebasing or restarting CI. Rebase only for actual conflicts, an enforced up-to-date branch policy, or evidenced integration risk; after any resulting head change, rerun affected validation and required reviews/checks. If a check failed, read the failing job's log (`gh run view --log-failed`), fix the cause here, run the project's tests, commit (`fix:` prefix, no Co-Authored-By), push. If the CI fix changes code, repeat the configured review loop for `ollama`, `copilot`, `codex`, `@example-user` against the new HEAD before returning to the CI wait; an earlier clean verdict does not cover changed code. Then go back to the previous step — cap this at 5 rounds. If `gh pr view "https://github.com/example-org/example-repo/pull/42" --json mergeable -q .mergeable` reports `CONFLICTING`, `git fetch origin`, rebase onto the base branch, resolve the conflicts keeping BOTH sides' intent, repeat the configured review loop for `ollama`, `copilot`, `codex`, `@example-user` against the rebased HEAD before re-checking CI; an earlier clean verdict does not cover changed code; re-run the tests, `git push --force-with-lease`, and re-check.
6. **Merge** with these flags, replacing <verified-head> with the exact head whose required CI and configured reviews passed — a true merge commit keeps the branch tip in the base branch's history so automated worktree cleanup can prove the branch is merged, unless the exact-head durable PortOS successor above accepted responsibility for the remaining work. If it is already merged, skip to the next step:
diff --git a/server/services/promptSections/__snapshots__/reviewLoopMatrix/followUp-gh-merge-verbose.txt b/server/services/promptSections/__snapshots__/reviewLoopMatrix/followUp-gh-merge-verbose.txt
index d7fe51ff24..f881b9c457 100644
--- a/server/services/promptSections/__snapshots__/reviewLoopMatrix/followUp-gh-merge-verbose.txt
+++ b/server/services/promptSections/__snapshots__/reviewLoopMatrix/followUp-gh-merge-verbose.txt
@@ -31,7 +31,7 @@ Only an `ok: true` response with a validated `clean` or `findings` verdict and a
2. Fix EVERY finding from the review in this worktree, including non-blocking findings and nits; run the project's tests, commit (`feat:`/`fix:` prefix, no Co-Authored-By), push, and resolve ALL review threads from that review, including non-blocking findings and nits.
3. Re-review with the same reviewer until it reports clean, then advance to the next reviewer in the list.
**Own delivery through completion:** By default stay responsible for "https://github.com/example-org/example-repo/pull/42" through all required CI, review, confirmed MERGED and safe cleanup. GitHub auto-merge enabled is not completion and does not transfer failure recovery or cleanup. Early finish is allowed only with an explicit persisted PortOS pending-merge receipt for the exact published/reviewed head, accepted after the server observes the configured CI backlog threshold. The app setting `mergeHandoffMinQueuedRuns` is opt-in: absent/null means keep ownership; no threshold is inferred from elapsed time. Unknown backlog, refused handoff or failed receipt persistence means continue in-session. The receipt owns CI failure recovery, changed heads, merge confirmation and preserved cleanup across restarts. Report its receipt ID and PR/head as pending, never merged; preserve the checkout and issue until the successor confirms completion. Intentional leave-open policies remain unchanged. Never enable native GitHub auto-merge to bypass local admission or a refused handoff.
-**Pregate attestation (GitHub, right after the push):** if this repository has `scripts/pregate-attest.js`, run it from the checkout you pushed — for a new pull request, after the push and before opening it. It posts a `pregate` commit status bound to the tree your green `npm run pregate` validated, so the pull request's CI skips the attested stages (docs/GITHUB_ACTIONS.md "Pregate attestation"). If it refuses, do not rerun pregate or retry just to attest: say why in your completion summary and wait for full CI as before.
+**Local validation:** Honor repo-focused lint/style, structural guards and changed-behavior tests; broad local suites are opt-in. Hosted CI and configured reviews remain mandatory. For repositories with `scripts/pregate-attest.js`, inspect receipt `validationMode`: `focused` never attests CI; only explicit `ci` or compatible legacy proof may attest after push. Report refusals; never rerun solely to attest.
4. **Wait for CI to finish**: `gh pr checks "https://github.com/example-org/example-repo/pull/42" --watch --fail-fast --interval 30`. "No checks reported" is AMBIGUOUS — a just-opened PR reports it while checks are still attaching, and merging on it races the CI this gate exists to wait for. Treat it as green ONLY when the repo genuinely has no CI (`gh workflow list` is empty / nothing in `.github/workflows` triggers on pull_request, and no external status check is configured). If CI IS expected, wait 30s and re-check for up to 5 minutes — and if it still hasn't attached, **leave the PR open and say so**; never merge on checks that were expected but never appeared.
5. **Clear whatever blocks the merge, then re-check.** A conflict-free branch may merge behind the base when required checks pass for its current head and configured reviews are satisfied. Base movement alone does not require rebasing or restarting CI. Rebase only for actual conflicts, an enforced up-to-date branch policy, or evidenced integration risk; after any resulting head change, rerun affected validation and required reviews/checks. If a check failed, read the failing job's log (`gh run view --log-failed`), fix the cause here, run the project's tests, commit (`fix:` prefix, no Co-Authored-By), push. If the CI fix changes code, repeat the configured review loop for `ollama`, `copilot`, `codex`, `@example-user` against the new HEAD before returning to the CI wait; an earlier clean verdict does not cover changed code. Then go back to the previous step — cap this at 5 rounds. If `gh pr view "https://github.com/example-org/example-repo/pull/42" --json mergeable -q .mergeable` reports `CONFLICTING`, `git fetch origin`, rebase onto the base branch, resolve the conflicts keeping BOTH sides' intent, repeat the configured review loop for `ollama`, `copilot`, `codex`, `@example-user` against the rebased HEAD before re-checking CI; an earlier clean verdict does not cover changed code; re-run the tests, `git push --force-with-lease`, and re-check.
6. **Merge** with these flags, replacing <verified-head> with the exact head whose required CI and configured reviews passed — a true merge commit keeps the branch tip in the base branch's history so automated worktree cleanup can prove the branch is merged, unless the exact-head durable PortOS successor above accepted responsibility for the remaining work. If it is already merged, skip to the next step:
diff --git a/server/services/promptSections/__snapshots__/reviewLoopMatrix/followup-copilot-first.txt b/server/services/promptSections/__snapshots__/reviewLoopMatrix/followup-copilot-first.txt
index d9ab480893..3bdf42a54f 100644
--- a/server/services/promptSections/__snapshots__/reviewLoopMatrix/followup-copilot-first.txt
+++ b/server/services/promptSections/__snapshots__/reviewLoopMatrix/followup-copilot-first.txt
@@ -13,7 +13,7 @@ A previous agent finished task **task-example** and opened **PR https://github.c
2. Fix EVERY finding from the review in this worktree, including non-blocking findings and nits; run tests, commit (`feat:`/`fix:` prefix, no Co-Authored-By), push, and resolve ALL review threads from that review, including non-blocking findings and nits.
3. Re-review with the same reviewer until clean, then advance to the next reviewer in the list.
**Own delivery through completion:** By default stay responsible for "https://github.com/example-org/example-repo/pull/42" through all required CI, review, confirmed MERGED and safe cleanup. GitHub auto-merge enabled is not completion and does not transfer failure recovery or cleanup. Early finish is allowed only with an explicit persisted PortOS pending-merge receipt for the exact published/reviewed head, accepted after the server observes the configured CI backlog threshold. The app setting `mergeHandoffMinQueuedRuns` is opt-in: absent/null means keep ownership; no threshold is inferred from elapsed time. Unknown backlog, refused handoff or failed receipt persistence means continue in-session. The receipt owns CI failure recovery, changed heads, merge confirmation and preserved cleanup across restarts. Report its receipt ID and PR/head as pending, never merged; preserve the checkout and issue until the successor confirms completion. Intentional leave-open policies remain unchanged. Never enable native GitHub auto-merge to bypass local admission or a refused handoff.
-**Pregate attestation (GitHub, right after the push):** if this repository has `scripts/pregate-attest.js`, run it from the checkout you pushed — for a new pull request, after the push and before opening it. It posts a `pregate` commit status bound to the tree your green `npm run pregate` validated, so the pull request's CI skips the attested stages (docs/GITHUB_ACTIONS.md "Pregate attestation"). If it refuses, do not rerun pregate or retry just to attest: say why in your completion summary and wait for full CI as before.
+**Local validation:** Honor repo-focused lint/style, structural guards and changed-behavior tests; broad local suites are opt-in. Hosted CI and configured reviews remain mandatory. For repositories with `scripts/pregate-attest.js`, inspect receipt `validationMode`: `focused` never attests CI; only explicit `ci` or compatible legacy proof may attest after push. Report refusals; never rerun solely to attest.
4. **Wait for CI to finish**: `gh pr checks "https://github.com/example-org/example-repo/pull/42" --watch --fail-fast --interval 30`. "No checks reported" is AMBIGUOUS — a just-opened PR reports it while checks are still attaching, and merging on it races the CI this gate exists to wait for. Treat it as green ONLY when the repo genuinely has no CI (`gh workflow list` is empty / nothing in `.github/workflows` triggers on pull_request, and no external status check is configured). If CI IS expected, wait 30s and re-check for up to 5 minutes — and if it still hasn't attached, **leave the PR open and say so**; never merge on checks that were expected but never appeared.
5. **Clear whatever blocks the merge, then re-check.** A conflict-free branch may merge behind the base when required checks pass for its current head and configured reviews are satisfied. Base movement alone does not require rebasing or restarting CI. Rebase only for actual conflicts, an enforced up-to-date branch policy, or evidenced integration risk; after any resulting head change, rerun affected validation and required reviews/checks. If a check failed, read the failing job's log (`gh run view --log-failed`), fix the cause here, run the project's tests, commit (`fix:` prefix, no Co-Authored-By), push. If the CI fix changes code, repeat the configured review loop for `copilot`, `codex`, `@example-user` against the new HEAD before returning to the CI wait; an earlier clean verdict does not cover changed code. Then go back to the previous step — cap this at 5 rounds. If `gh pr view "https://github.com/example-org/example-repo/pull/42" --json mergeable -q .mergeable` reports `CONFLICTING`, `git fetch origin`, rebase onto the base branch, resolve the conflicts keeping BOTH sides' intent, repeat the configured review loop for `copilot`, `codex`, `@example-user` against the rebased HEAD before re-checking CI; an earlier clean verdict does not cover changed code; re-run the tests, `git push --force-with-lease`, and re-check.
6. **Merge** with these flags, replacing <verified-head> with the exact head whose required CI and configured reviews passed — a true merge commit keeps the branch tip in the base branch's history so automated worktree cleanup can prove the branch is merged, unless the exact-head durable PortOS successor above accepted responsibility for the remaining work. If it is already merged, skip to the next step:
diff --git a/server/services/promptSections/__snapshots__/reviewLoopMatrix/inline-gh-merge-compact.txt b/server/services/promptSections/__snapshots__/reviewLoopMatrix/inline-gh-merge-compact.txt
index 6e13ba9ada..46ebbe2732 100644
--- a/server/services/promptSections/__snapshots__/reviewLoopMatrix/inline-gh-merge-compact.txt
+++ b/server/services/promptSections/__snapshots__/reviewLoopMatrix/inline-gh-merge-compact.txt
@@ -36,7 +36,7 @@ Only an `ok: true` response with a validated `clean` or `findings` verdict and a
**Required local-review merge gate:** Before any CI-fix or merge action, load the worktree-private local review state with `LOCAL_REVIEW_STATE_FILE="$(git rev-parse --git-path portos-local-review-state)"`, fail closed if it is missing, and source it. If `LOCAL_OVERALL_STATUS=review-blocked`, do NOT run this merge path; the PR/MR was already published, so leave it open and return to the enclosing completion handoff (write the sentinel for a TUI run or exit for a CLI run) without claiming a merge. Report the pending review in your run summary — do NOT post a PR/MR comment saying the review was unavailable or inconclusive. Accept only `clean` or `partial`; any other or missing status, or a `LOCAL_REVIEWED_HEAD_SHA` that does not equal `$(git rev-parse HEAD)`, fails closed.
**Code-changing CI fix gate:** If a CI fix changes code, repeat the pre-PR local review phase for `mtplx` against the new HEAD, using its same required/optional and stop-mode rules; commit and verify any reviewer fixes before pushing or merging.
**Own delivery through completion:** By default stay responsible for "https://github.com/example-org/example-repo/pull/42" through all required CI, review, confirmed MERGED and safe cleanup. GitHub auto-merge enabled is not completion and does not transfer failure recovery or cleanup. Early finish is allowed only with an explicit persisted PortOS pending-merge receipt for the exact published/reviewed head, accepted after the server observes the configured CI backlog threshold. The app setting `mergeHandoffMinQueuedRuns` is opt-in: absent/null means keep ownership; no threshold is inferred from elapsed time. Unknown backlog, refused handoff or failed receipt persistence means continue in-session. The receipt owns CI failure recovery, changed heads, merge confirmation and preserved cleanup across restarts. Report its receipt ID and PR/head as pending, never merged; preserve the checkout and issue until the successor confirms completion. Intentional leave-open policies remain unchanged. Never enable native GitHub auto-merge to bypass local admission or a refused handoff.
-**Pregate attestation (GitHub, right after the push):** if this repository has `scripts/pregate-attest.js`, run it from the checkout you pushed — for a new pull request, after the push and before opening it. It posts a `pregate` commit status bound to the tree your green `npm run pregate` validated, so the pull request's CI skips the attested stages (docs/GITHUB_ACTIONS.md "Pregate attestation"). If it refuses, do not rerun pregate or retry just to attest: say why in your completion summary and wait for full CI as before.
+**Local validation:** Honor repo-focused lint/style, structural guards and changed-behavior tests; broad local suites are opt-in. Hosted CI and configured reviews remain mandatory. For repositories with `scripts/pregate-attest.js`, inspect receipt `validationMode`: `focused` never attests CI; only explicit `ci` or compatible legacy proof may attest after push. Report refusals; never rerun solely to attest.
4. **Wait for CI to finish**: `gh pr checks "https://github.com/example-org/example-repo/pull/42" --watch --fail-fast --interval 30`. "No checks reported" is AMBIGUOUS — a just-opened PR reports it while checks are still attaching, and merging on it races the CI this gate exists to wait for. Treat it as green ONLY when the repo genuinely has no CI (`gh workflow list` is empty / nothing in `.github/workflows` triggers on pull_request, and no external status check is configured). If CI IS expected, wait 30s and re-check for up to 5 minutes — and if it still hasn't attached, **leave the PR open and say so**; never merge on checks that were expected but never appeared.
5. **Clear whatever blocks the merge, then re-check.** A conflict-free branch may merge behind the base when required checks pass for its current head and configured reviews are satisfied. Base movement alone does not require rebasing or restarting CI. Rebase only for actual conflicts, an enforced up-to-date branch policy, or evidenced integration risk; after any resulting head change, rerun affected validation and required reviews/checks. If a check failed, read the failing job's log (`gh run view --log-failed`), fix the cause here, run the project's tests, commit (`fix:` prefix, no Co-Authored-By), push. If the CI fix changes code, repeat the configured review loop for `ollama`, `copilot`, `codex`, `@example-user` against the new HEAD before returning to the CI wait; an earlier clean verdict does not cover changed code. Then go back to the previous step — cap this at 5 rounds. If `gh pr view "https://github.com/example-org/example-repo/pull/42" --json mergeable -q .mergeable` reports `CONFLICTING`, `git fetch origin`, rebase onto the base branch, resolve the conflicts keeping BOTH sides' intent, after that rebase, repeat the pre-PR local review phase for `mtplx` against the new HEAD, using its same required/optional and stop-mode rules; commit and verify any fixes before pushing or merging; repeat the configured review loop for `ollama`, `copilot`, `codex`, `@example-user` against the rebased HEAD before re-checking CI; an earlier clean verdict does not cover changed code; re-run the tests, `git push --force-with-lease`, and re-check.
6. **Merge** with these flags, replacing <verified-head> with the exact head whose required CI and configured reviews passed — a true merge commit keeps the branch tip in the base branch's history so automated worktree cleanup can prove the branch is merged, unless the exact-head durable PortOS successor above accepted responsibility for the remaining work. If it is already merged, skip to the next step:
diff --git a/server/services/promptSections/__snapshots__/reviewLoopMatrix/inline-gh-merge-verbose.txt b/server/services/promptSections/__snapshots__/reviewLoopMatrix/inline-gh-merge-verbose.txt
index 454c276418..702b44f71b 100644
--- a/server/services/promptSections/__snapshots__/reviewLoopMatrix/inline-gh-merge-verbose.txt
+++ b/server/services/promptSections/__snapshots__/reviewLoopMatrix/inline-gh-merge-verbose.txt
@@ -41,7 +41,7 @@ Only an `ok: true` response with a validated `clean` or `findings` verdict and a
**Required local-review merge gate:** Before any CI-fix or merge action, load the worktree-private local review state with `LOCAL_REVIEW_STATE_FILE="$(git rev-parse --git-path portos-local-review-state)"`, fail closed if it is missing, and source it. If `LOCAL_OVERALL_STATUS=review-blocked`, do NOT run this merge path; the PR/MR was already published, so leave it open and return to the enclosing completion handoff (write the sentinel for a TUI run or exit for a CLI run) without claiming a merge. Report the pending review in your run summary — do NOT post a PR/MR comment saying the review was unavailable or inconclusive. Accept only `clean` or `partial`; any other or missing status, or a `LOCAL_REVIEWED_HEAD_SHA` that does not equal `$(git rev-parse HEAD)`, fails closed.
**Code-changing CI fix gate:** If a CI fix changes code, repeat the pre-PR local review phase for `mtplx` against the new HEAD, using its same required/optional and stop-mode rules; commit and verify any reviewer fixes before pushing or merging.
**Own delivery through completion:** By default stay responsible for "https://github.com/example-org/example-repo/pull/42" through all required CI, review, confirmed MERGED and safe cleanup. GitHub auto-merge enabled is not completion and does not transfer failure recovery or cleanup. Early finish is allowed only with an explicit persisted PortOS pending-merge receipt for the exact published/reviewed head, accepted after the server observes the configured CI backlog threshold. The app setting `mergeHandoffMinQueuedRuns` is opt-in: absent/null means keep ownership; no threshold is inferred from elapsed time. Unknown backlog, refused handoff or failed receipt persistence means continue in-session. The receipt owns CI failure recovery, changed heads, merge confirmation and preserved cleanup across restarts. Report its receipt ID and PR/head as pending, never merged; preserve the checkout and issue until the successor confirms completion. Intentional leave-open policies remain unchanged. Never enable native GitHub auto-merge to bypass local admission or a refused handoff.
-**Pregate attestation (GitHub, right after the push):** if this repository has `scripts/pregate-attest.js`, run it from the checkout you pushed — for a new pull request, after the push and before opening it. It posts a `pregate` commit status bound to the tree your green `npm run pregate` validated, so the pull request's CI skips the attested stages (docs/GITHUB_ACTIONS.md "Pregate attestation"). If it refuses, do not rerun pregate or retry just to attest: say why in your completion summary and wait for full CI as before.
+**Local validation:** Honor repo-focused lint/style, structural guards and changed-behavior tests; broad local suites are opt-in. Hosted CI and configured reviews remain mandatory. For repositories with `scripts/pregate-attest.js`, inspect receipt `validationMode`: `focused` never attests CI; only explicit `ci` or compatible legacy proof may attest after push. Report refusals; never rerun solely to attest.
4. **Wait for CI to finish**: `gh pr checks "https://github.com/example-org/example-repo/pull/42" --watch --fail-fast --interval 30`. "No checks reported" is AMBIGUOUS — a just-opened PR reports it while checks are still attaching, and merging on it races the CI this gate exists to wait for. Treat it as green ONLY when the repo genuinely has no CI (`gh workflow list` is empty / nothing in `.github/workflows` triggers on pull_request, and no external status check is configured). If CI IS expected, wait 30s and re-check for up to 5 minutes — and if it still hasn't attached, **leave the PR open and say so**; never merge on checks that were expected but never appeared.
5. **Clear whatever blocks the merge, then re-check.** A conflict-free branch may merge behind the base when required checks pass for its current head and configured reviews are satisfied. Base movement alone does not require rebasing or restarting CI. Rebase only for actual conflicts, an enforced up-to-date branch policy, or evidenced integration risk; after any resulting head change, rerun affected validation and required reviews/checks. If a check failed, read the failing job's log (`gh run view --log-failed`), fix the cause here, run the project's tests, commit (`fix:` prefix, no Co-Authored-By), push. If the CI fix changes code, repeat the configured review loop for `ollama`, `copilot`, `codex`, `@example-user` against the new HEAD before returning to the CI wait; an earlier clean verdict does not cover changed code. Then go back to the previous step — cap this at 5 rounds. If `gh pr view "https://github.com/example-org/example-repo/pull/42" --json mergeable -q .mergeable` reports `CONFLICTING`, `git fetch origin`, rebase onto the base branch, resolve the conflicts keeping BOTH sides' intent, after that rebase, repeat the pre-PR local review phase for `mtplx` against the new HEAD, using its same required/optional and stop-mode rules; commit and verify any fixes before pushing or merging; repeat the configured review loop for `ollama`, `copilot`, `codex`, `@example-user` against the rebased HEAD before re-checking CI; an earlier clean verdict does not cover changed code; re-run the tests, `git push --force-with-lease`, and re-check.
6. **Merge** with these flags, replacing <verified-head> with the exact head whose required CI and configured reviews passed — a true merge commit keeps the branch tip in the base branch's history so automated worktree cleanup can prove the branch is merged, unless the exact-head durable PortOS successor above accepted responsibility for the remaining work. If it is already merged, skip to the next step:
diff --git a/server/services/promptSections/__snapshots__/reviewLoopMatrix/mergeonly-followUp-gh.txt b/server/services/promptSections/__snapshots__/reviewLoopMatrix/mergeonly-followUp-gh.txt
index bc473bdf40..a9d5d6d780 100644
--- a/server/services/promptSections/__snapshots__/reviewLoopMatrix/mergeonly-followUp-gh.txt
+++ b/server/services/promptSections/__snapshots__/reviewLoopMatrix/mergeonly-followUp-gh.txt
@@ -2,7 +2,7 @@
A previous agent finished the work for source task **task-example** and opened **PR https://github.com/example-org/example-repo/pull/42** on `feature/example`. **No code review was requested for this task, so nothing else will merge this PR Your job is to land it once CI is green.**
**Own delivery through completion:** By default stay responsible for "https://github.com/example-org/example-repo/pull/42" through all required CI, review, confirmed MERGED and safe cleanup. GitHub auto-merge enabled is not completion and does not transfer failure recovery or cleanup. Early finish is allowed only with an explicit persisted PortOS pending-merge receipt for the exact published/reviewed head, accepted after the server observes the configured CI backlog threshold. The app setting `mergeHandoffMinQueuedRuns` is opt-in: absent/null means keep ownership; no threshold is inferred from elapsed time. Unknown backlog, refused handoff or failed receipt persistence means continue in-session. The receipt owns CI failure recovery, changed heads, merge confirmation and preserved cleanup across restarts. Report its receipt ID and PR/head as pending, never merged; preserve the checkout and issue until the successor confirms completion. Intentional leave-open policies remain unchanged. Never enable native GitHub auto-merge to bypass local admission or a refused handoff.
-**Pregate attestation (GitHub, right after the push):** if this repository has `scripts/pregate-attest.js`, run it from the checkout you pushed — for a new pull request, after the push and before opening it. It posts a `pregate` commit status bound to the tree your green `npm run pregate` validated, so the pull request's CI skips the attested stages (docs/GITHUB_ACTIONS.md "Pregate attestation"). If it refuses, do not rerun pregate or retry just to attest: say why in your completion summary and wait for full CI as before.
+**Local validation:** Honor repo-focused lint/style, structural guards and changed-behavior tests; broad local suites are opt-in. Hosted CI and configured reviews remain mandatory. For repositories with `scripts/pregate-attest.js`, inspect receipt `validationMode`: `focused` never attests CI; only explicit `ci` or compatible legacy proof may attest after push. Report refusals; never rerun solely to attest.
1. **Wait for CI to finish**: `gh pr checks "https://github.com/example-org/example-repo/pull/42" --watch --fail-fast --interval 30`. "No checks reported" is AMBIGUOUS — a just-opened PR reports it while checks are still attaching, and merging on it races the CI this gate exists to wait for. Treat it as green ONLY when the repo genuinely has no CI (`gh workflow list` is empty / nothing in `.github/workflows` triggers on pull_request, and no external status check is configured). If CI IS expected, wait 30s and re-check for up to 5 minutes — and if it still hasn't attached, **leave the PR open and say so**; never merge on checks that were expected but never appeared.
2. **Clear whatever blocks the merge, then re-check.** A conflict-free branch may merge behind the base when required checks pass for its current head and configured reviews are satisfied. Base movement alone does not require rebasing or restarting CI. Rebase only for actual conflicts, an enforced up-to-date branch policy, or evidenced integration risk; after any resulting head change, rerun affected validation and required reviews/checks. If a check failed, read the failing job's log (`gh run view --log-failed`), fix the cause here, run the project's tests, commit (`fix:` prefix, no Co-Authored-By), push. Then go back to the previous step — cap this at 5 rounds. If `gh pr view "https://github.com/example-org/example-repo/pull/42" --json mergeable -q .mergeable` reports `CONFLICTING`, `git fetch origin`, rebase onto the base branch, resolve the conflicts keeping BOTH sides' intent, re-run the tests, `git push --force-with-lease`, and re-check.
3. **Merge** with these flags, replacing <verified-head> with the exact head whose required CI and configured reviews passed — a true merge commit keeps the branch tip in the base branch's history so automated worktree cleanup can prove the branch is merged, unless the exact-head durable PortOS successor above accepted responsibility for the remaining work. If it is already merged (a saved `/do:pr` default can merge it for you), skip to the next step:
diff --git a/server/services/promptSections/__snapshots__/reviewLoopMatrix/mergeonly-inline-gh.txt b/server/services/promptSections/__snapshots__/reviewLoopMatrix/mergeonly-inline-gh.txt
index 06f03cf1ac..4acb5b5149 100644
--- a/server/services/promptSections/__snapshots__/reviewLoopMatrix/mergeonly-inline-gh.txt
+++ b/server/services/promptSections/__snapshots__/reviewLoopMatrix/mergeonly-inline-gh.txt
@@ -2,7 +2,7 @@
This runs as **step 4 of the Completion Workflow above**, against the PR you just opened on `feature/example` (`https://github.com/example-org/example-repo/pull/42` / `42` are the shell variables you captured there). **No code review was requested for this task, so nothing else will merge this PR Land it yourself once CI is green.**
**Own delivery through completion:** By default stay responsible for "https://github.com/example-org/example-repo/pull/42" through all required CI, review, confirmed MERGED and safe cleanup. GitHub auto-merge enabled is not completion and does not transfer failure recovery or cleanup. Early finish is allowed only with an explicit persisted PortOS pending-merge receipt for the exact published/reviewed head, accepted after the server observes the configured CI backlog threshold. The app setting `mergeHandoffMinQueuedRuns` is opt-in: absent/null means keep ownership; no threshold is inferred from elapsed time. Unknown backlog, refused handoff or failed receipt persistence means continue in-session. The receipt owns CI failure recovery, changed heads, merge confirmation and preserved cleanup across restarts. Report its receipt ID and PR/head as pending, never merged; preserve the checkout and issue until the successor confirms completion. Intentional leave-open policies remain unchanged. Never enable native GitHub auto-merge to bypass local admission or a refused handoff.
-**Pregate attestation (GitHub, right after the push):** if this repository has `scripts/pregate-attest.js`, run it from the checkout you pushed — for a new pull request, after the push and before opening it. It posts a `pregate` commit status bound to the tree your green `npm run pregate` validated, so the pull request's CI skips the attested stages (docs/GITHUB_ACTIONS.md "Pregate attestation"). If it refuses, do not rerun pregate or retry just to attest: say why in your completion summary and wait for full CI as before.
+**Local validation:** Honor repo-focused lint/style, structural guards and changed-behavior tests; broad local suites are opt-in. Hosted CI and configured reviews remain mandatory. For repositories with `scripts/pregate-attest.js`, inspect receipt `validationMode`: `focused` never attests CI; only explicit `ci` or compatible legacy proof may attest after push. Report refusals; never rerun solely to attest.
1. **Wait for CI to finish**: `gh pr checks "https://github.com/example-org/example-repo/pull/42" --watch --fail-fast --interval 30`. "No checks reported" is AMBIGUOUS — a just-opened PR reports it while checks are still attaching, and merging on it races the CI this gate exists to wait for. Treat it as green ONLY when the repo genuinely has no CI (`gh workflow list` is empty / nothing in `.github/workflows` triggers on pull_request, and no external status check is configured). If CI IS expected, wait 30s and re-check for up to 5 minutes — and if it still hasn't attached, **leave the PR open and say so**; never merge on checks that were expected but never appeared.
2. **Clear whatever blocks the merge, then re-check.** A conflict-free branch may merge behind the base when required checks pass for its current head and configured reviews are satisfied. Base movement alone does not require rebasing or restarting CI. Rebase only for actual conflicts, an enforced up-to-date branch policy, or evidenced integration risk; after any resulting head change, rerun affected validation and required reviews/checks. If a check failed, read the failing job's log (`gh run view --log-failed`), fix the cause here, run the project's tests, commit (`fix:` prefix, no Co-Authored-By), push. Then go back to the previous step — cap this at 5 rounds. If `gh pr view "https://github.com/example-org/example-repo/pull/42" --json mergeable -q .mergeable` reports `CONFLICTING`, `git fetch origin`, rebase onto the base branch, resolve the conflicts keeping BOTH sides' intent, re-run the tests, `git push --force-with-lease`, and re-check.
3. **Merge** with these flags, replacing <verified-head> with the exact head whose required CI and configured reviews passed — a true merge commit keeps the branch tip in the base branch's history so automated worktree cleanup can prove the branch is merged, unless the exact-head durable PortOS successor above accepted responsibility for the remaining work. If it is already merged, skip to the next step: