Repository navigation
Commit baf3771
committed
P-022 Stage 3: fix the own-check.ps1 output regression the cutover introduced
The qualification round found a real defect in a product surface, which is what
a qualification round is for. 30 of 31 jobs were green; the one failure was
own-check.ps1's exit-code tiers, reporting "expected OWN001 in the annotated
output" over output that visibly CONTAINED OWN001.
It was not a harness fault. PowerShell's call operator routes a child's stdout
through its PIPELINE, and that is what makes
$out = & ./scripts/own-check.ps1 -Format github -Paths src
capture anything at all. The Python branch uses the call operator. The Rust
branch spawned a process that inherited the console handle and so bypassed the
pipeline entirely. While Python was the default nobody noticed; the moment Rust
became the default, every caller capturing or piping this script silently got
NOTHING -- and because the text still appeared on screen, it looked fine.
The in-code comment asserted the opposite, and that is where the error lived:
it said an inherited handle leaves the child's output "live, exactly as the call
operator's did". The first half is true and the second half is false.
MEASURED both ways on one tree, and it is not Windows-specific -- it reproduces
on Linux pwsh; the Windows job is simply the only place own-check.ps1 is
exercised with output capture:
before -Engine python captured 1 line with OWN001
-Engine rust captured 0 lines
after both capture 1 line with OWN001, and the captured arrays are IDENTICAL
The candidate's streams are now redirected and replayed by the caller: stdout to
the pipeline, stderr to the error stream, decoded as UTF-8 with NO BOM -- a byte
order mark in front of a SARIF document or a workflow command is not a decoding
detail, it is corrupt output -- and both pipes drained CONCURRENTLY, because
reading one to the end and then the other deadlocks as soon as the child fills
the pipe nobody is reading, which for a large SARIF log is not hypothetical.
Nothing else moved: exit tiers still 1 with -FailOnFinding and 0 without, SARIF
still 1413 bytes from either engine with no BOM and one result, and the four
Stage-1 ps1 controls still pass. Recorded as a CLOSURE, not as a known
difference: an accidental behaviour change beyond the engine is what #262's
guardrails forbid, so it is repaired rather than declared.
Also recorded from the same run, measured and not predicted:
* rollback-windows PASS -- all four states distinct on both surfaces;
* cancellation-windows PASS, and the disposition vindicates refusing to invent
130. Both engines on Windows EXIT with code 3221225786 (0xC000013A,
STATUS_CONTROL_C_EXIT); both on Linux DIE BY SIGNAL 2 and have no exit code
at all. Neither platform is 130, and a universal contract would have been
wrong on both;
* CANCEL-TRACEBACK is now known to be LINUX-ONLY. Python prints a 1478-byte
KeyboardInterrupt traceback there and nothing on Windows, where the default
CTRL_BREAK handler terminates the process before Python's handler runs. A
single-platform measurement would have got this wrong in either direction.
No OWED rows remain in the decision packet.
One item is knowingly left red, and named rather than worked around:
p022-stage1-windows's P07 mutates this very function back to the call operator,
so re-anchoring it to the new lines invalidates the committed result -- which
can only be re-recorded on a Windows runner. The workflow prints that result in
full for exactly this purpose, so it is taken from the next run rather than
guessed at here. Until then the checkpoint gate correctly says so.
Refs #262
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01376o4syzCem5aQ6NssxwX21 parent f69f098 commit baf3771
5 files changed
Lines changed: 99 additions & 29 deletions
File tree
- docs
- evidence
- generated
- scripts
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
101 | 101 | | |
102 | 102 | | |
103 | 103 | | |
104 | | - | |
| 104 | + | |
105 | 105 | | |
106 | | - | |
107 | | - | |
| 106 | + | |
| 107 | + | |
108 | 108 | | |
109 | 109 | | |
110 | 110 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
93 | 93 | | |
94 | 94 | | |
95 | 95 | | |
96 | | - | |
97 | | - | |
98 | | - | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
99 | 99 | | |
100 | 100 | | |
101 | 101 | | |
| |||
109 | 109 | | |
110 | 110 | | |
111 | 111 | | |
112 | | - | |
113 | | - | |
114 | | - | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
115 | 115 | | |
116 | 116 | | |
117 | 117 | | |
| |||
169 | 169 | | |
170 | 170 | | |
171 | 171 | | |
172 | | - | |
173 | | - | |
| 172 | + | |
| 173 | + | |
174 | 174 | | |
175 | 175 | | |
176 | 176 | | |
| |||
198 | 198 | | |
199 | 199 | | |
200 | 200 | | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
201 | 206 | | |
202 | 207 | | |
203 | 208 | | |
| |||
217 | 222 | | |
218 | 223 | | |
219 | 224 | | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
220 | 230 | | |
221 | 231 | | |
222 | 232 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
54 | | - | |
| 54 | + | |
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
| |||
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
69 | 73 | | |
70 | 74 | | |
71 | 75 | | |
| |||
74 | 78 | | |
75 | 79 | | |
76 | 80 | | |
77 | | - | |
| 81 | + | |
78 | 82 | | |
79 | 83 | | |
0 commit comments