Skip to content

Commit f1d3681

Browse files
committed
P-022 Stage 3: record the Windows campaign, and fix the assertion that could not fail
P07 is closed. The Windows-native campaign ran on a Windows runner against the re-anchored definition and its result is taken from the log the workflow prints for exactly this purpose -- not reconstructed, not guessed: p022-stage1-windows @ baf3771: 9/9 caught, 0 survived, 0 compile-error, 0 invalid, 0 runner-error; expected catchers missed: none Verified before installing it: the result's definition_sha256 (656c5e69e4ec...) equals the sha256 of the definition in this tree, the honesty control M00 survived the unmutated tree, and P07 is caught by `ps1::ps1-not-started-is-2`, the catcher its definition names. The checkpoint gate is green and all 19 campaign definitions anchor. The Windows dogfood leg then failed, and it is the same class of defect as the regression that caused it -- a step that could not fail: if ($out -notmatch 'OWN001') { throw "the Rust core found no OWN001" } On an ARRAY, PowerShell's -notmatch is a FILTER, not a boolean. Over a 166-line capture where 137 lines carry OWN001 it returns the other 29, and a non-empty result is truthy, so the assertion fires on correct output. The mirror image is how it passed for the whole of Stage 2: while the Rust branch wrote to an inherited console handle $out was $null, -notmatch filtered an empty collection to an empty collection, that is falsy, and the step went green having captured and verified NOTHING. So the OWN001 half of this gate has never actually held on the Rust path. `-not ($out -match 'OWN001')` is the idiom the rest of this file already uses, and it is correct in both directions -- MEASURED: with the real 166-line capture it does not throw; with an empty capture it does. It was the only instance in any workflow. Full Python suite green, ruff and mypy clean, checkpoint gate green. Refs #262 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01376o4syzCem5aQ6NssxwX2
1 parent baf3771 commit f1d3681

3 files changed

Lines changed: 28 additions & 20 deletions

File tree

‎.github/workflows/ci.yml‎

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2952,7 +2952,18 @@ jobs:
29522952
$rc = $LASTEXITCODE
29532953
$out | Write-Host
29542954
if ($rc -ne 1) { throw "expected exit 1 (findings), got $rc" }
2955-
if ($out -notmatch 'OWN001') { throw "the Rust core found no OWN001" }
2955+
# `-not ($out -match ...)`, NOT `$out -notmatch ...`. On an ARRAY
2956+
# PowerShell's -notmatch is a FILTER, not a boolean: it returns the
2957+
# elements that do not match, and a non-empty result is truthy. So
2958+
# over a 166-line capture where 137 lines carry OWN001 it returns the
2959+
# other 29 and the assertion fires anyway.
2960+
#
2961+
# The mirror image is how it passed before: while the Rust branch
2962+
# wrote to an inherited console handle, $out was $null, -notmatch
2963+
# filtered an empty collection to an empty collection, and the step
2964+
# went green having captured and verified NOTHING. Both directions
2965+
# are the same bug, and this is the idiom the rest of this file uses.
2966+
if (-not ($out -match 'OWN001')) { throw "the Rust core found no OWN001" }
29562967
Write-Host "OK: Rust-default dogfood on windows (own-check.ps1)"
29572968
exit 0
29582969
# No fallback, measured rather than asserted: with the candidate broken,

‎docs/evidence/p022-stage1-windows.result.json‎

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33
"comment": "Recorded mutation-campaign run (scripts/mutate_campaign.py --run). Raw facts only: outcomes, catchers, provenance. Counts are derived by scripts/render_checkpoint_status.py; regenerate this file by re-running the campaign, never by hand.",
44
"campaign": "p022-stage1-windows",
55
"definition": "docs/evidence/p022-stage1-windows.json",
6-
"definition_sha256": "6dbfa6054f6447bb41886b30b1b1ade3dcb9e1be0fb874dc5795b7775c30ebc3",
7-
"source_commit": "da897b42fcd76ea1914d286bd6bae6065c072c70",
6+
"definition_sha256": "656c5e69e4ec01672928d8c812ad7115274cfb032c1d29afe529fa9b80b88b5b",
7+
"source_commit": "baf3771cd0106bf9a2242261c203445cf24f85c7",
88
"dirty": false,
9-
"recorded_at": "2026-09-09T08:33:54Z",
9+
"recorded_at": "2026-09-18T05:00:44Z",
1010
"layers": [
1111
"ps1",
1212
"shapes"
@@ -16,7 +16,7 @@
1616
"id": "M00",
1717
"outcome": "survived",
1818
"catchers": [],
19-
"elapsed_seconds": 58.9
19+
"elapsed_seconds": 57.6
2020
},
2121
"mutations": [
2222
{
@@ -25,39 +25,40 @@
2525
"catchers": [
2626
"ps1::ps1-absolute-locator"
2727
],
28-
"elapsed_seconds": 36.4
28+
"elapsed_seconds": 28.5
2929
},
3030
{
3131
"id": "P02",
3232
"outcome": "caught",
3333
"catchers": [
3434
"ps1::ps1-not-started-is-2"
3535
],
36-
"elapsed_seconds": 28.8
36+
"elapsed_seconds": 24.5
3737
},
3838
{
3939
"id": "P03",
4040
"outcome": "caught",
4141
"catchers": [
4242
"ps1::ps1-agreement-replays"
4343
],
44-
"elapsed_seconds": 31.6
44+
"elapsed_seconds": 22.9
4545
},
4646
{
4747
"id": "P04",
4848
"outcome": "caught",
4949
"catchers": [
5050
"ps1::ps1-failure-evidence"
5151
],
52-
"elapsed_seconds": 32.7
52+
"elapsed_seconds": 22.2
5353
},
5454
{
5555
"id": "P05",
5656
"outcome": "caught",
5757
"catchers": [
58+
"ps1::ps1-agreement-replays",
5859
"shapes::locator-shapes"
5960
],
60-
"elapsed_seconds": 31.1
61+
"elapsed_seconds": 12.9
6162
},
6263
{
6364
"id": "P06",
@@ -68,31 +69,31 @@
6869
"ps1::ps1-failure-evidence",
6970
"ps1::ps1-not-started-is-2"
7071
],
71-
"elapsed_seconds": 18.5
72+
"elapsed_seconds": 13.2
7273
},
7374
{
7475
"id": "P07",
7576
"outcome": "caught",
7677
"catchers": [
7778
"ps1::ps1-not-started-is-2"
7879
],
79-
"elapsed_seconds": 29.5
80+
"elapsed_seconds": 21.1
8081
},
8182
{
8283
"id": "P08",
8384
"outcome": "caught",
8485
"catchers": [
8586
"ps1::ps1-agreement-replays"
8687
],
87-
"elapsed_seconds": 28.8
88+
"elapsed_seconds": 20.6
8889
},
8990
{
9091
"id": "P09",
9192
"outcome": "caught",
9293
"catchers": [
9394
"ps1::ps1-absolute-locator"
9495
],
95-
"elapsed_seconds": 58.2
96+
"elapsed_seconds": 42.0
9697
}
9798
]
9899
}

‎docs/generated/p022-stage1-mutations.md‎

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ Definition: `docs/evidence/p022-stage1-windows.json` (sha256 `656c5e69e4ec0167
5555

5656
| measure | value |
5757
|--------------------------------------------------|---|
58-
| recorded at commit | `da897b42fcd76ea1914d286bd6bae6065c072c70` |
58+
| recorded at commit | `baf3771cd0106bf9a2242261c203445cf24f85c7` |
5959
| layers run (every one, for every mutation) | `ps1`, `shapes` |
6060
| mutations | 9 |
6161
| caught | 9 |
@@ -66,17 +66,13 @@ Definition: `docs/evidence/p022-stage1-windows.json` (sha256 `656c5e69e4ec0167
6666
| caught without every expected catcher | none |
6767
| honesty control `M00` (unmutated tree must pass) | survived — as required |
6868

69-
**This run is not evidence:**
70-
71-
- the recorded result was taken over a different campaign definition (sha256 or campaign name differs) — re-run the campaign
72-
7369
| id | rule | mutation | outcome | caught by |
7470
|---|---|---|---|---|
7571
| P01 | ps1-locator-must-be-absolute | own-check.ps1 accepts a relative OWEN_RUST_CORE — Test-Path says the file is there, which is true and not the question D3 asks | caught | `ps1::ps1-absolute-locator` |
7672
| P02 | ps1-not-started-is-configuration | own-check.ps1 reports a candidate that never started as an internal failure — 'the engine blew up' read as Owen's bug rather than the caller's configuration, which is the exact side of D3.1's seam the old comment got backwards | caught | `ps1::ps1-not-started-is-2` |
7773
| P03 | ps1-agreement-replays-raw-bytes | own-check.ps1 replays STDOUT through `Get-Content -Raw | Write-Output` — a decode-and-re-encode read as an echo. Scoped to stdout ONLY: it leaves the stderr replay intact, so it can be killed by nothing but the stdout half of the byte-faithfulness assertion. The earlier version of this mutation also emptied $errBytes, which meant its death proved only that stdout was checked and left 'both streams' as grammar | caught | `ps1::ps1-agreement-replays` |
7874
| P04 | ps1-failure-evidence-survives | own-check.ps1 deletes the reproduction directory it just named — cleanup reads as tidiness, and the message that pointed at it is left describing something that no longer exists | caught | `ps1::ps1-failure-evidence` |
79-
| P05 | absolute-locator-is-accepted | the shell's drive-rooted arm stops matching — this is the defect that actually shipped: `[/\]` escapes the closing bracket, so the set is unterminated and matches NEITHER `C:/` nor `C:\`, and every correct Windows locator was refused as 'not absolute' while every Linux control stayed green | caught | `shapes::locator-shapes` |
75+
| P05 | absolute-locator-is-accepted | the shell's drive-rooted arm stops matching — this is the defect that actually shipped: `[/\]` escapes the closing bracket, so the set is unterminated and matches NEITHER `C:/` nor `C:\`, and every correct Windows locator was refused as 'not absolute' while every Linux control stayed green | caught | `ps1::ps1-agreement-replays`<br>`shapes::locator-shapes` |
8076
| P06 | absolute-locator-is-accepted | own-check.ps1's absoluteness test is inverted — the over-rejection direction on this surface: every fully qualified locator is refused as 'not absolute' and every relative one is admitted, which no assertion that only feeds it a relative path can see | caught | `ps1::ps1-absolute-locator`<br>`ps1::ps1-agreement-replays`<br>`ps1::ps1-failure-evidence`<br>`ps1::ps1-not-started-is-2` |
8177
| P07 | the-candidate-is-spawned-not-opened | own-check.ps1 goes back to invoking the candidate with the call operator -- 'PowerShell runs it either way, why the ceremony?'. It does not run it: it asks the platform to OPEN it, so a file the loader cannot start is handed to a desktop handler (notepad on Windows, xdg-open on Linux), the run exits 0 with empty streams, and own-check.ps1 reports a clean finding-free scan having analysed nothing. Re-anchored at #262 Stage 3, when this function grew stream redirection: the candidate's output has to reach PowerShell's PIPELINE or a caller capturing this script gets nothing, so the spawn now returns a result object. The defect the mutant describes is unchanged -- only the lines it replaces moved. | caught | `ps1::ps1-not-started-is-2` |
8278
| P08 | ps1-agreement-replays-raw-bytes | own-check.ps1 drops the STDERR half of the agreement replay while leaving stdout byte-faithful — 'stderr is diagnostics, the result is stdout', which is how the original defect was written in the first place. It is the twin of P03 and exists because a single mutation that broke both streams could be killed by the stdout assertion alone: with this one, the stderr assertion is the only thing standing between the mutant and a green run | caught | `ps1::ps1-agreement-replays` |

0 commit comments

Comments
 (0)