From ae160c2ab983cb08dcc0f3047a635e0862c4895d Mon Sep 17 00:00:00 2001 From: Invoker Bot Date: Sat, 12 Sep 2026 18:08:37 +0000 Subject: [PATCH 1/3] =?UTF-8?q?invoker:=20wf-1789236076827-17/implement-sw?= =?UTF-8?q?eep-step5a-wiring=20=E2=80=94=20Rewrite=20the=20Step=205a=20pas?= =?UTF-8?q?sage=20to=20call=20the=20shipped=20probe.=20Review=20claim:=20S?= =?UTF-8?q?tep=205a=20names=20the=20probe=20and=20all=20three=20of=20its?= =?UTF-8?q?=20outcomes.=20Review=20lane:=20behavior=20Safety=20invariant:?= =?UTF-8?q?=20The=20blocked-pull-request=20policy=20in=20Step=205=20is=20u?= =?UTF-8?q?nchanged;=20only=20the=20passage=20describing=20how=20to=20test?= =?UTF-8?q?=20is=20rewritten.=20Effectiveness=20measurement:=20A=20fixture?= =?UTF-8?q?=20asserts=20the=20Step=205a=20passage=20names=20the=20probe=20?= =?UTF-8?q?and=20all=20three=20outcomes,=20and=20that=20the=20words=20`rm?= =?UTF-8?q?=20-rf`=20no=20longer=20appear=20in=20it.=20Slice=20rationale:?= =?UTF-8?q?=20One=20passage=20of=20one=20document,=20stacked=20on=20the=20?= =?UTF-8?q?step=20that=20ships=20the=20executable=20it=20names.=20Architec?= =?UTF-8?q?tural=20effect:=20The=20written=20procedure=20points=20at=20a?= =?UTF-8?q?=20shipped=20executable=20instead=20of=20an=20inline=20recipe.?= =?UTF-8?q?=20Goal:=20Rewrite=20the=20Step=205a=20passage=20of=20product/s?= =?UTF-8?q?kills/admin-bypass-sweep/SKILL.md=20to=20call=20scripts/probe?= =?UTF-8?q?=5Fbranch=5Frebase.sh=20and=20describe=20its=20three=20outcomes?= =?UTF-8?q?.=20Motivation:=20The=20passage=20already=20told=20the=20reader?= =?UTF-8?q?=20to=20tear=20down=20with=20the=20safe=20teardown=20command,?= =?UTF-8?q?=20and=20that=20wording=20did=20not=20prevent=20an=20improvised?= =?UTF-8?q?=20removal=20that=20corrupted=20the=20next=20reading.=20Naming?= =?UTF-8?q?=20one=20executable=20removes=20the=20chance=20to=20improvise.?= =?UTF-8?q?=20Alternative=20considerations:=20Adding=20another=20sentence?= =?UTF-8?q?=20of=20guidance=20was=20rejected,=20since=20equivalent=20guida?= =?UTF-8?q?nce=20is=20already=20present=20and=20did=20not=20hold.=20Implem?= =?UTF-8?q?entation=20details:=20Replace=20the=20fenced=20passage=20in=20S?= =?UTF-8?q?tep=205a=20with=20a=20call=20to=20scripts/probe=5Fbranch=5Freba?= =?UTF-8?q?se.sh=20and=20a=20short=20list=20of=20its=20three=20outcomes.?= =?UTF-8?q?=20Add=20a=20fixture=20under=20the=20skill's=20tests=20folder?= =?UTF-8?q?=20asserting=20the=20passage=20names=20the=20probe,=20names=20a?= =?UTF-8?q?ll=20three=20outcomes,=20and=20no=20longer=20contains=20an=20im?= =?UTF-8?q?provised=20removal.=20Non-goals:=20Does=20not=20change=20Step?= =?UTF-8?q?=205's=20policy=20for=20a=20blocked=20pull=20request,=20does=20?= =?UTF-8?q?not=20touch=20the=20merge=20passage,=20and=20does=20not=20edit?= =?UTF-8?q?=20any=20other=20written=20procedure.=20Layer:=20domain=20Featu?= =?UTF-8?q?re=20state:=20active=20Files:=20product/skills/admin-bypass-swe?= =?UTF-8?q?ep/SKILL.md,=20product/skills/admin-bypass-sweep/tests/fires=5F?= =?UTF-8?q?step5a=5Fnames=5Fprobe.md=20Change=20types:=20-=20product/skill?= =?UTF-8?q?s/admin-bypass-sweep/SKILL.md:=20docs-only=20-=20product/skills?= =?UTF-8?q?/admin-bypass-sweep/tests/fires=5Fstep5a=5Fnames=5Fprobe.md:=20?= =?UTF-8?q?create=20Acceptance=20criteria:=20-=20`python3=20-m=20unittest?= =?UTF-8?q?=20discover=20-s=20product/skills/admin-bypass-sweep/tests=20-v?= =?UTF-8?q?`=20exits=200.=20-=20The=20Step=205a=20passage=20names=20script?= =?UTF-8?q?s/probe=5Fbranch=5Frebase.sh.=20-=20The=20Step=205a=20passage?= =?UTF-8?q?=20lists=20all=20three=20outcomes.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Solution: Rewrite the Step 5a passage to call the shipped probe. Review claim: Step 5a names the probe and all three of its outcomes. Review lane: behavior Safety invariant: The blocked-pull-request policy in Step 5 is unchanged; only the passage describing how to test is rewritten. Effectiveness measurement: A fixture asserts the Step 5a passage names the probe and all three outcomes, and that the words `rm -rf` no longer appear in it. Slice rationale: One passage of one document, stacked on the step that ships the executable it names. Architectural effect: The written procedure points at a shipped executable instead of an inline recipe. Goal: Rewrite the Step 5a passage of product/skills/admin-bypass-sweep/SKILL.md to call scripts/probe_branch_rebase.sh and describe its three outcomes. Motivation: The passage already told the reader to tear down with the safe teardown command, and that wording did not prevent an improvised removal that corrupted the next reading. Naming one executable removes the chance to improvise. Alternative considerations: Adding another sentence of guidance was rejected, since equivalent guidance is already present and did not hold. Implementation details: Replace the fenced passage in Step 5a with a call to scripts/probe_branch_rebase.sh and a short list of its three outcomes. Add a fixture under the skill's tests folder asserting the passage names the probe, names all three outcomes, and no longer contains an improvised removal. Non-goals: Does not change Step 5's policy for a blocked pull request, does not touch the merge passage, and does not edit any other written procedure. Layer: domain Feature state: active Files: product/skills/admin-bypass-sweep/SKILL.md, product/skills/admin-bypass-sweep/tests/fires_step5a_names_probe.md Change types: - product/skills/admin-bypass-sweep/SKILL.md: docs-only - product/skills/admin-bypass-sweep/tests/fires_step5a_names_probe.md: create Acceptance criteria: - `python3 -m unittest discover -s product/skills/admin-bypass-sweep/tests -v` exits 0. - The Step 5a passage names scripts/probe_branch_rebase.sh. - The Step 5a passage lists all three outcomes. Invoker-Finalize-Id: e859b330-f6c2-4da7-9aaf-2356607f423a --- product/skills/admin-bypass-sweep/SKILL.md | 37 ++++++++---------- .../tests/fires_step5a_names_probe.md | 4 ++ .../tests/test_step5a_probe_passage.py | 38 +++++++++++++++++++ 3 files changed, 58 insertions(+), 21 deletions(-) create mode 100644 product/skills/admin-bypass-sweep/tests/fires_step5a_names_probe.md create mode 100644 product/skills/admin-bypass-sweep/tests/test_step5a_probe_passage.py diff --git a/product/skills/admin-bypass-sweep/SKILL.md b/product/skills/admin-bypass-sweep/SKILL.md index becb9df3..44aa6969 100644 --- a/product/skills/admin-bypass-sweep/SKILL.md +++ b/product/skills/admin-bypass-sweep/SKILL.md @@ -193,32 +193,27 @@ human: These are mechanically distinguishable, and only the first one is the "real conflict" Step 5 means. Before recording a `CONFLICTING` PR as -blocked, check which case it is, in a disposable worktree outside the -human's main checkout — never touch their primary working tree's branch or -uncommitted state to do this: +blocked, run the rebase probe outside the human's main checkout — never +touch their primary working tree's branch or uncommitted state to do this: ```bash git fetch origin master -git worktree add /tmp//pr- origin/ -cd /tmp//pr- -git checkout -b fix/pr--rebase -git rebase origin/master +scripts/probe_branch_rebase.sh origin/ origin/master ``` -- **Rebase applies clean** (no conflict markers, `git status` clean) — this - was stale mergeability, not a real conflict. Force-push the rebased - branch back to the PR's head with `--force-with-lease` pinned to the - known old SHA, wait for GitHub to recompute (`sleep 5`), confirm - `mergeable` now reads `MERGEABLE`, then continue this PR (and its - children) through Step 4 as normal. -- **Rebase stops with conflict markers** — this is Step 5's real-conflict - case. Run `git rebase --abort`, remove the scratch worktree, and follow - Step 5 as written: stop the chain, record as blocked, move on. Do not - attempt to resolve the markers by picking a side — that part of Step 5 - still applies. - -Remove the scratch worktree (`git worktree remove --force`) once the PR's -fate — merged or genuinely blocked — is decided. +- **Exit 0, `OK`** — the PR rebases cleanly onto current master, so this was + stale mergeability rather than Step 5's real-conflict case. Wait for + GitHub to recompute (`sleep 5`), confirm `mergeable` now reads + `MERGEABLE`, then continue this PR (and its children) through Step 4 as + normal. +- **Exit 1, `FAIL`** — the probe ran and found a real content conflict. + Follow Step 5 as written: stop the chain, record as blocked, and move on. + Do not attempt to resolve the markers by picking a side — that part of + Step 5 still applies. +- **Exit 3, `UNCHECKED`** — the probe could not run, so nothing is proven. + Do not treat this as stale mergeability and do not treat it as Step 5's + real-conflict case; report the unchecked PR separately for manual retry + or setup repair. ## Step 6: Prove the final state diff --git a/product/skills/admin-bypass-sweep/tests/fires_step5a_names_probe.md b/product/skills/admin-bypass-sweep/tests/fires_step5a_names_probe.md new file mode 100644 index 00000000..f5767180 --- /dev/null +++ b/product/skills/admin-bypass-sweep/tests/fires_step5a_names_probe.md @@ -0,0 +1,4 @@ +Fixture assertion: the Step 5a passage in +`product/skills/admin-bypass-sweep/SKILL.md` must name +`scripts/probe_branch_rebase.sh`, must name all three probe outcomes +`OK`, `FAIL`, and `UNCHECKED`, and must not contain `rm -rf`. diff --git a/product/skills/admin-bypass-sweep/tests/test_step5a_probe_passage.py b/product/skills/admin-bypass-sweep/tests/test_step5a_probe_passage.py new file mode 100644 index 00000000..ba7aabef --- /dev/null +++ b/product/skills/admin-bypass-sweep/tests/test_step5a_probe_passage.py @@ -0,0 +1,38 @@ +#!/usr/bin/env python3 +from __future__ import annotations + +import re +import unittest +from pathlib import Path + +SKILL_DIR = Path(__file__).resolve().parents[1] +SKILL = (SKILL_DIR / "SKILL.md").read_text(encoding="utf-8") +FIXTURE = (SKILL_DIR / "tests" / "fires_step5a_names_probe.md").read_text(encoding="utf-8") + + +def step5a_passage() -> str: + match = re.search(r"## Step 5a:.*?(?=\n## Step 6:)", SKILL, re.S) + if not match: + raise AssertionError("Step 5a passage not found") + return match.group(0) + + +class TestStep5aProbePassage(unittest.TestCase): + def test_fixture_names_the_assertions(self): + self.assertIn("scripts/probe_branch_rebase.sh", FIXTURE) + for outcome in ("OK", "FAIL", "UNCHECKED"): + self.assertIn(outcome, FIXTURE) + self.assertIn("rm -rf", FIXTURE) + + def test_step5a_names_probe_and_all_three_outcomes(self): + passage = step5a_passage() + self.assertIn("scripts/probe_branch_rebase.sh", passage) + for outcome in ("OK", "FAIL", "UNCHECKED"): + self.assertRegex(passage, rf"`{outcome}`") + + def test_step5a_no_longer_contains_improvised_removal(self): + self.assertNotIn("rm -rf", step5a_passage()) + + +if __name__ == "__main__": + unittest.main() From 01d01bce74b5aa8ecc24aae01af93d78bbc6de44 Mon Sep 17 00:00:00 2001 From: Invoker Bot Date: Sat, 12 Sep 2026 18:09:28 +0000 Subject: [PATCH 2/3] =?UTF-8?q?invoker:=20wf-1789236076827-17/verify-sweep?= =?UTF-8?q?-step5a-wiring=20=E2=80=94=20Run=20the=20deterministic=20proof?= =?UTF-8?q?=20for=20the=20Step=205a=20wiring.=20Review=20claim:=20A=20fixt?= =?UTF-8?q?ure=20asserts=20the=20passage=20names=20the=20probe.=20Review?= =?UTF-8?q?=20lane:=20proof=20Safety=20invariant:=20Proof-only;=20adds=20n?= =?UTF-8?q?o=20product=20behavior.=20Effectiveness=20measurement:=20The=20?= =?UTF-8?q?suite=20fails=20if=20the=20passage=20stops=20naming=20the=20pro?= =?UTF-8?q?be=20or=20drops=20an=20outcome.=20Slice=20rationale:=20One=20pr?= =?UTF-8?q?oof=20slice=20for=20this=20step.=20Architectural=20effect:=20No?= =?UTF-8?q?ne;=20verification=20only.=20Goal:=20Prove=20the=20Step=205a=20?= =?UTF-8?q?wiring=20deterministically.=20Motivation:=20The=20change=20is?= =?UTF-8?q?=20to=20one=20written=20passage,=20so=20the=20proof=20reads=20t?= =?UTF-8?q?hat=20passage.=20Alternative=20considerations:=20Manual=20verif?= =?UTF-8?q?ication=20was=20rejected=20as=20non-deterministic.=20Implementa?= =?UTF-8?q?tion=20details:=20Execute=20the=20command=20below=20as=20the=20?= =?UTF-8?q?terminal=20proof.=20Non-goals:=20No=20product=20edits=20here;?= =?UTF-8?q?=20proof=20only.=20Layer:=20app=5Fregression=20Feature=20state:?= =?UTF-8?q?=20active?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Exit code: 0 Invoker-Finalize-Id: 3aa932b8-5cc2-4fba-bc5c-115d7a475b4f From 05c285d9f24e30bba85cf0c822a152d354be1acd Mon Sep 17 00:00:00 2001 From: Invoker Bot Date: Sat, 12 Sep 2026 18:10:15 +0000 Subject: [PATCH 3/3] =?UTF-8?q?invoker:=20wf-1789236076827-17/scrub-handof?= =?UTF-8?q?f-artifacts=20=E2=80=94=20Terminal=20check=20that=20no=20epheme?= =?UTF-8?q?ral=20inter-task=20handoff=20files=20remain.=20Review=20claim:?= =?UTF-8?q?=20The=20workflow=20leaves=20no=20scratch=20handoff=20artifacts?= =?UTF-8?q?=20behind.=20Review=20lane:=20cleanup=20Safety=20invariant:=20R?= =?UTF-8?q?ead-only;=20never=20deletes=20files,=20alters=20the=20index,=20?= =?UTF-8?q?or=20commits=20caller=20work.=20Effectiveness=20measurement:=20?= =?UTF-8?q?The=20gate=20fails=20when=20a=20plans/invoker-handoff.*=20or=20?= =?UTF-8?q?lens-*.json=20file=20is=20still=20present=20after=20the=20leaf?= =?UTF-8?q?=20tasks=20complete.=20Slice=20rationale:=20One=20terminal=20hy?= =?UTF-8?q?giene=20gate=20for=20the=20workflow.=20Architectural=20effect:?= =?UTF-8?q?=20None;=20check=20only.=20Goal:=20Confirm=20no=20ephemeral=20h?= =?UTF-8?q?andoff=20files=20survive=20the=20run.=20Motivation:=20Inter-tas?= =?UTF-8?q?k=20scratch=20files=20leak=20into=20diffs=20and=20read=20as=20p?= =?UTF-8?q?art=20of=20the=20work.=20Alternative=20considerations:=20Deleti?= =?UTF-8?q?ng=20them=20automatically=20was=20rejected;=20the=20gate=20repo?= =?UTF-8?q?rts,=20it=20does=20not=20mutate.=20Implementation=20details:=20?= =?UTF-8?q?Run=20scripts/scrub-handoff-artifacts.sh=20without=20--apply.?= =?UTF-8?q?=20Non-goals:=20No=20deletion,=20no=20index=20changes,=20no=20c?= =?UTF-8?q?ommits.=20Layer:=20app=5Fregression=20Feature=20state:=20active?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Exit code: 0 Invoker-Finalize-Id: 2c57922e-973b-4c94-a350-bde1591b77ee