W14: fix C22/K104 — harness logs IO before invoking the mock (+3 pins)
The interceptor appended the IO-log entry only after the mock returned, so
a throwing mock left no entry and error-path tests falsely reported "never
invoked" through assert-io-called/count (hosts.md C22, core.md K104).
spec/harness.sx make-interceptor now appends {:args :result nil :op}
BEFORE invoking the mock and updates :result in place via dict-set! on
return. This is W14-owned test infrastructure (PLAN.md W14 approach item
4), not a semantics edit.
Pins: suite gate-C22-throwing-mock-logged (throwing mock leaves an entry
with pending result; happy path updates the result; mixed throwing +
successful sequence counts all calls). Harness self-suite (15 tests) and
test-relate-picker (the only other harness consumer) verified green;
285/0 on the pins run.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -69,7 +69,8 @@ Pin each confirmed-and-fixed finding with a minimal repro. Add suites to
|
||||
- [x] K19 — harness/runtime parity pinned (`scripts/test-harness-parity.sh`:
|
||||
drives mcp_tree sx_eval over JSON-RPC vs fresh sx_server over epoch,
|
||||
12-probe battery from the finding, errors compared by message)
|
||||
- [ ] C22/K104 — harness logs IO *before* invoking the mock (throwing-mock pin)
|
||||
- [x] C22/K104 — FIXED harness (spec/harness.sx make-interceptor: log entry
|
||||
appended before the mock runs, :result updated via dict-set!) + 3 pins
|
||||
- [ ] C21 — real perform/suspend mode in harness
|
||||
- [ ] C23 — adapter-dom render-output tests
|
||||
|
||||
@@ -86,6 +87,19 @@ Pin each confirmed-and-fixed finding with a minimal repro. Add suites to
|
||||
|
||||
## Progress log (newest first)
|
||||
|
||||
- 2026-07-04 — **C22/K104 throwing-mock fix + pins (item C.2)**. First
|
||||
actual FIX of the loop — in scope because spec/harness.sx is W14-owned
|
||||
test infrastructure (PLAN approach item 4 assigns "log IO before invoking
|
||||
the mock" to W14). TDD: reproduced pre-fix (caught error, 0 log entries),
|
||||
then restructured `make-interceptor` to append the entry BEFORE the mock
|
||||
runs (`:result nil` while pending, `dict-set!` in place on return).
|
||||
Verified: throwing mock leaves entry, happy path updates result, mixed
|
||||
sequence counts all 3. Added suite `gate-C22-throwing-mock-logged`
|
||||
(3 tests). Harness self-suite (15) + test-relate-picker (only other
|
||||
harness consumer) green; 285/0 pins run. Tooling notes: replace/insert
|
||||
tools take `new_source` (not `replacement`); find_all paths still
|
||||
disagree with read_subtree/replace_node on define-library files —
|
||||
sx_write_file remains the reliable route. Test-infra-only.
|
||||
- 2026-07-04 — **K19 harness-parity pin (item C.1)**. Authored
|
||||
`scripts/test-harness-parity.sh`: drives `mcp_tree.exe` `sx_eval` with
|
||||
raw JSON-RPC over stdio and a fresh `sx_server.exe` over the epoch
|
||||
|
||||
Reference in New Issue
Block a user