Skip to content

test: strengthen assertions and reconcile mutation coverage (#71) - #195

Merged
abogartz merged 5 commits into
abogartz:mainfrom
WhollyMindless:test/assertion-integrity-complete
Oct 31, 2026
Merged

abogartz merged 5 commits into
abogartz:mainfrom
WhollyMindless:test/assertion-integrity-complete

Conversation

@WhollyMindless

@WhollyMindless WhollyMindless commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #71.

The listed weak assertions could accept parseable data loss, damaged snapshot identity, cropped memory rows, and invented accounting numbers. This strengthens ten existing tests, replaces a missing-source test that never exercised a missing source, prevents a symlink test from swallowing its own failed assertion, and makes the temp-path guard fail its test rather than aborting the suite. It also corrects the promised capture-session control comment.

Nine targeted probe cases (eight distinct source perturbations) pass their old selected test and fail the strengthened test. Exact source replacements, selectors, and outcomes are in bench/test-integrity-71-probes.json. These are additional probes, separate from the scored 44-mutant catalog.

No tests were deleted. The matrix records a decision for every printed test identifier, and the table below gives the per-file reasons requested by the issue. A test with no observed failure under this catalog is not automatically redundant: reporting, host envelopes, capture boundaries, dataset validity, and several identity/accounting paths have no corresponding mutants here.

Measurement method

The old 231/288 figure was measured against a different tree and a 24-mutant catalog. This measurement is pinned to production base 525ed89, with instrumented baseline 8f97437 and strengthened tests at 96b7d3d.

The instrument needed repair first: five mutation anchors had drifted; the duplicate-verdict mutant now returns a valid result shape; and Bun's final failure recap could incorrectly attribute earlier failures to the last test file. Two parser regression tests are included in both measurements. Logs now expose passing/skipped identifiers and final mutant verdicts, allowing scripts/triage-71.ts to rebuild the ledger and reject incomplete or mismatched inputs.

Both runs use Bun 1.4.4 on Windows, repeat=1 with the existing confirmation policy for timing-only kills. Baseline: two workers, 120-second suite limit. Candidate: four workers, 180-second limit. They ran concurrently in independent scratch worktrees; these timings are not a performance benchmark. Calibration (--selftest) detected its planted defect. The matrix describes observed witnesses, not a claim that every incidental failure establishes causality.

Both complete sweeps detect 38 of 43 non-equivalent mutants (88.4%), with the same five survivors, one equivalent, and no load errors or timeouts. No previously detected mutant was lost. The candidate matrix contains 724 passing identifiers and 12 declared skips across 74 files; 483 passing identifiers have no observed kill in this catalog. The extra observed witness compared with the baseline is an unchanged capture test, so it is not credited as an assertion improvement. The nine controlled probes above demonstrate the assertion changes independently.

Validation and limits

bun run gate: typecheck and lint pass; 724 unit/scenario tests pass, 12 skip; all 11 terminal E2E tests pass. Test assertions were checked with the nine additional old-pass/new-fail probes above. Production runtime code is unchanged.

The 12 declared skips are seven platform-specific containment cases, four live-repository cases, and the pre-#194 rejection acceptance spec. Some chmod/ACL capability probes can also return early and print as passed; the ledger does not claim branch coverage from that outcome.

The retained survivors need distinct treatment:

  • Restore timeout policy needs a forced busy-timeout witness using the actual restore configuration.
  • Supersede locking needs a deterministic losing interleave; a passing race is not proof the lock is unnecessary.
  • Snapshot exclusivity needs a forced name collision.
  • Viewer grammar and the lexical restore-target check have validation elsewhere that may make these particular mutations redundant. Audit equivalence separately before changing their classification; this PR preserves the catalog's existing denominator.

The report generator refuses missing final verdicts, unknown witnesses, unaccounted test removals, missing file decisions, and loss of a previously detected mutant. Reproduction commands and the exact per-test kill sets are in bench/test-integrity-71.json.

Review follow-up

The original Windows sweep inputs are committed at bench/test-integrity-71/before.jsonl and bench/test-integrity-71/after.jsonl. Running bun scripts/triage-71.ts bench/test-integrity-71/before.jsonl bench/test-integrity-71/after.jsonl <output.json> regenerates the pinned report byte-for-byte (SHA-256 2a88f6076f06fa0147f38de4ba8c87c10b00e7f2e7d1488918c7a185a37c9ebe). These are the original measurements, not a new sweep of the review follow-up or current main. Per-test kill sets are observations that varied across runs, not stable coverage quantities.

At 224ea37, the reader test explicitly requires 400 observations; missing status deliveries name the request before arithmetic; the sweeper warns when Bun reports passing totals without test identifiers; and the older sweep report points to this newer pinned catalog. The full Windows gate passes: 724 unit tests, 12 skips, 11 E2E tests, typecheck and lint. The added non-null-assertion lint warning is removed (409 existing warnings remain).

Per-file verdicts

File Passing Killers before / after Verdict
attribution.test.ts 11 0 / 0 Keep: measured command reuse, prior lookup ordering, inferred file coverage, and empty-input arithmetic are not mutated by this catalog.
boundaries.test.ts 15 5 / 5 Keep: schema equality, rejected input conservation, viewer coercion, and timestamp validation exercise separate boundary paths; timestamp mutants cover only part.
capture-compaction.test.ts 10 5 / 6 Keep: compaction trigger controls, cooldown, model failure, and capture-to-gate wiring are not interchangeable with direct gate tests.
capture-sid-race.test.ts 3 3 / 3 Keep, comment corrected: deterministic interleavings pin session ownership; the no-interleave control alone does not prove isolation. No identity-interleave mutant exists here.
capture.test.ts 35 5 / 5 Keep: parser/model/prompt/transcript cases, redaction, event vocabulary, heartbeat, and end-to-end capture have distinct seams; write-floor mutants reach only some.
command.test.ts 3 0 / 0 Strengthened: replace the happy-path test mislabeled missing-source with an actual absent command source, null result, and no filesystem output. Preserve install and no-overwrite cases.
compaction.test.ts 10 1 / 1 Strengthened: budget case requires complete seeded memory rows and the anchor header. Keep hook totality and model-call preservation cases; budget mutants do not model those contracts.
complete-store-reads.test.ts 10 2 / 2 Keep: actual Bun cached-size premise and complete bytes at snapshot/undo/blocklist/ledger/import/status callers, including errors and BOMs; no cached-size mutant in this catalog.
concurrency.test.ts 7 7 / 7 Strengthened: each reader observation conserves all 300 IDs and contents, including parseable prefixes; retain malformed-row and final-size checks plus independent cross-process conservation cases.
consolidate-bench.test.ts 3 1 / 1 Keep: measured recall non-regression, proposal applicability, and per-query/store-wide cost bounds have no consolidation mutants; positive workload controls are necessary premises.
consolidate-tool.test.ts 3 1 / 1 Keep: proposal-only tool conserves durable IDs and reports measured versus unmeasured plans; catalog does not mutate consolidation tool behavior.
consolidate.test.ts 15 0 / 0 Keep: cluster partition, survivor ordering, inherited keywords, measured-read acceptance, and proposal rendering are not modeled by this catalog.
containment.test.ts 33 0 / 0 Keep: traversal, symlink, sibling-prefix, missing-path, import/export, and opt-out cases test distinct filesystem boundaries; undo containment mutants do not substitute for these callers. Permission-error cases can return early where chmod is unenforced; a printed pass does not prove that conditional branch ran.
convergence.test.ts 10 2 / 2 Keep: exact rollup counts, tap timing, late-tap merge, no-tap/silent controls, and real recall wiring. Nonnegative elapsed time is a bound alongside exact evidence assertions, not their substitute; no rollup mutants.
epoch-lifecycle.test.ts 3 2 / 2 Keep: uncached pre-prompt/post-compaction requests, independent setups, and coordinated eviction are unmodeled lifecycle boundaries.
epoch.test.ts 23 13 / 13 Strengthened: the integration budget case requires full seeded rows, not just row prefixes. Retain freeze, invalidation, identity, budget-boundary, and store-version cases; no full epoch lifecycle mutant family.
event-fidelity.test.ts 5 0 / 0 Keep: recorded host-event replay pins actual envelopes, distinct from unit adapter fixtures; catalog has no host-envelope mutants.
export-visibility.test.ts 4 4 / 4 Keep: private/global export filtering and explicit reader snapshots are separate public read boundaries, not redundant with direct loadAll visibility.
frontier.test.ts 16 10 / 10 Keep: open status, ambiguous planning, exact newest-thread ordering, budgets, adversarial tags, and scoring ties; frontier-limit mutant covers only a subset.
gated-injection.test.ts 10 5 / 5 Keep: engagement gates, real tool path, corrupt-store behavior, and cross-session evidence cannot be inferred from direct gate unit cases.
hits.test.ts 13 3 / 3 Keep: hit ledger schema, throttling, rotation, time window, and surface reporting are unmodeled accounting invariants.
host.test.ts 34 0 / 0 Keep: tool/session/usage envelope precedence and malformed-input controls are unmodeled adapter contracts; replay tests cover a narrower set of recorded inputs.
init.test.ts 6 4 / 4 Keep: first install, idempotence, force re-derivation, mode and git fallback cases conserve seed/stamp rows; gate mutations reach some, not the initialization contract itself.
inject.test.ts 11 1 / 1 Keep: exact selected rows, abstention, query thresholds, ranking, and contextual-pull budget boundaries remain distinct from epoch hook delivery; positive budget bounds alone are not the sole assertions.
injection-accounting.test.ts 6 4 / 4 Keep: ledger credits follow budget-surviving deliveries, discarded rebuilds add none, and pre-epoch requests are not abstentions; no accounting-decision mutants.
injection-framing.test.ts 18 2 / 2 Keep: all model-facing sinks, multiline forgery, provenance, import and capture boundaries; catalog write guards do not fully model output framing.
keywords.test.ts 15 3 / 3 Keep: write-time keyword validation, ranking, prose exclusion, and chronological tie-breaks are not modeled by the catalog's query-threshold mutant.
lock-absent-holder.test.ts 3 2 / 2 Keep: missing-lock deadline race is a specific forced interleave and error identity contract, not implied by ordinary timeout tests.
lock.test.ts 10 7 / 7 Keep: exclusion, stale takeover, ownership release, separate files, timeout policy and deadline races are distinct lock contracts; timing-only kills retain confirmation requirements. The ACL case can return early if the runner cannot enforce the denial; #190 adds phase diagnostics for that capability-dependent path.
logfmt.test.ts 17 4 / 4 Keep: serialization/legacy escape grammar, row forgery, append conservation and anchored rename retry. Pure grammar tests need their own mutants; the calibration plant is not part of the scored catalog.
metrics-tool.test.ts 1 1 / 1 Keep: real memory_status wiring and rendered measured lag/never-retrieved numbers are not implied by pure metrics tests; no reporting mutants.
metrics.test.ts 7 0 / 0 Keep: nearest-rank percentile, active-day windows, timestamp selection, missing observations and formatting have explicit arithmetic expectations; no math mutants.
negative-eval.test.ts 21 6 / 6 Keep: forbidden hits, no-memory and permutation controls, re-ingestion and gate tripwires check measurement validity and independent model-facing paths, not just write outcomes.
outcome-truth-audit.test.ts 8 7 / 7 Keep: durable versus audited outcomes, metadata-compatible collapse, global visibility, and partial-write truth are unmodeled multi-step failure contracts.
path-refs.test.ts 15 1 / 1 Keep: extraction boundaries, existence checks, and full gate rejection exercise distinct seams; a broad gate bypass mutant does not replace extractor cases.
plugin.test.ts 4 0 / 0 Strengthened: context delivery is exactly one text part containing the recall guidance and auto-injection explanation; keep registration and hook-wiring cases.
portable.test.ts 19 5 / 5 Keep: export schema, import validation, provenance/frontier policy, stale-open detection and actual tool round trips; import policy mutants cover only their named guards.
read-lines-atomic-replace.test.ts 3 0 / 0 Keep: deterministic actual cached BunFile replacement, whitespace/missing behavior and non-ENOENT errors; atomic publish mutants do not recreate the stale-metadata read bug.
realrepo.test.ts 1 0 / 0 Keep: live source-layout integration is environment-conditional and skipped here; the pure sameArgs control runs. Do not infer live-repo coverage from this sweep.
recall-dataset.test.ts 10 0 / 0 Keep: benchmark gold coverage, uniqueness, query separation, determinism, synthetic paths and keyword integrity validate authored data, outside production-source mutants.
repo-scope-serve-host.test.ts 4 0 / 0 Keep: serve-host events without location and fallback refresh pin the public host path; static visibility mutants do not model identity resolution timing.
repo-scope-session.test.ts 8 1 / 1 Keep: session precedence, stamping, setup without location and first-turn backstops are distinct from ambient scope tests.
repo-scope.test.ts 12 8 / 8 Keep: private/global stamping and visibility across sinks, admin paths, origin validation and remote normalization; direct visibility mutants cannot replace caller-specific tests.
repokey-path.test.ts 4 0 / 0 Strengthened: trailing slash is refused for a non-root fixture and alias equality failures escape the symlink-creation catch. Preserve legacy-path compatibility; case-sensitivity migration remains #109.
resolver.test.ts 3 0 / 0 Keep: prose/file-parenthesis negatives and real call positives have no extraction mutants; gate scenarios do not enumerate these false-positive boundaries.
runtime.test.ts 10 0 / 0 Keep: numeric semver parsing, missing runtime and warning floor boundaries are not mutated; exact expected versions/messages are independent oracles.
scenarios-consistency.test.ts 7 7 / 7 Keep: real competing writers at restore/prune/viewer/import seams conserve IDs and content; timing-dependent observations retain the sweep's confirmation caveat.
scenarios-scripted.test.ts 5 4 / 4 Keep: ordered public lifecycle, duplicate, two-session, restore and re-ingestion flows assert receipts and durable state across API boundaries.
scenarios.test.ts 25 18 / 18 Strengthened: prune snapshot must equal every pre-prune byte, including identity, exactly once. Retain independent drift/conflict/gate/evidence flows and controls.
security-capture-crop.test.ts 2 0 / 0 Keep: secrets straddling transcript crop boundaries are a distinct input-to-model invariant; durable-write redaction mutants do not model it.
security-evidence-path.test.ts 4 0 / 0 Keep: date traversal, impossible dates, readable controls and symlink refusal protect an evidence read boundary absent from the catalog.
security-evidence-redaction.test.ts 5 0 / 0 Keep: output-summary/crop/private-key/deletion-reason redaction precedes evidence storage; memory append redaction is a separate boundary.
security-evidence-unbound-server.test.ts 2 0 / 0 Keep: unresolved server evidence is neither global nor another instance's private evidence; no evidence-identity mutants.
security-merge-ownership.test.ts 4 4 / 4 Keep: both loser and survivor ownership, revival and positive same-repo/global controls cover merge authorization, not merely read filtering.
security-session-isolation.test.ts 3 2 / 2 Keep: forced mid-read interleaving, unbound privacy and positive session delivery test immutable reader identity; static visibility mutants cover only part.
security-unbound-identity.test.ts 5 4 / 4 Keep: last-setup leakage, evidence isolation, secret supersede reasons, foreign merge and post-retirement audit failure are distinct regression paths.
security-unresolved-write-scope.test.ts 10 2 / 2 Keep: unresolved write/import/capture refusal and explicit-global/sessionless controls cover write authority, which static visibility mutants do not model.
security-viewer-scope.test.ts 4 3 / 3 Keep: edits/restores preserve private origin and omitted provenance, legacy rows remain global; viewer Host/Origin mutants do not test row ownership.
sessions.test.ts 1 0 / 0 Keep: exact LRU eviction order and refresh callbacks are not modeled by the mutation catalog.
status.test.ts 30 0 / 0 Strengthened: cumulative characters equal the actual relevance blocks delivered on two requests. Keep status serialization, missing measurements, report arithmetic and usage-envelope cases; no status mutants.
supersede-batch.test.ts 8 5 / 5 Keep: batch conservation, per-file snapshots, missing targets and reuse are distinct from one-row supersede; shared lock mutants cover only part.
sweep-output.test.ts 2 0 / 0 Keep (new instrument regression tests): recaps cannot fabricate a last-file witness, and module-load failures are not assertion kills. No catalog mutant targets the measurement parser.
t4-evidence.test.ts 3 0 / 0 Keep: bounded long recovery evidence retains the old fix, chronological sample, counts and family reset; no bounded-evidence mutants.
temp-root.test.ts 2 0 / 0 Strengthened: valid temp-path acceptance is observed through child exit status, so rejection fails a test instead of terminating the whole suite; retain unsafe-path refusal.
undo-ownership.test.ts 6 4 / 4 Keep: force/merge preserve foreign content and supersession while own/global rows roll back; shared undo mutations do not fully model authorization.
undo.test.ts 18 9 / 9 Keep: exact check/merge/force outcomes, safety copies, deletion awareness, snapshot path containment and tool guidance are independent rollback contracts.
update-collapse-visibility.test.ts 14 12 / 12 Keep: collapse survivor resolution must not narrow global visibility or choose an unreadable identity; no collapse-visibility mutant in the catalog.
update-partial-failure.test.ts 2 1 / 1 Keep: post-append retirement/evidence failures must report partial durable outcomes; a gate-bypass mutant is not a multi-step update failure.
update-provenance.test.ts 2 2 / 2 Keep: omitted versus explicitly edited status/keywords/issue/tags and session-reader snapshots are unmodeled update-provenance boundaries.
update-supersede-truth.test.ts 12 11 / 11 Keep: exact retirement target, race/error truth, successor metadata and retry convergence each protect a different durable state transition.
update-targeting.test.ts 17 13 / 13 Keep: ID/substrings/ambiguity/default targeting, conflicts, concurrent updates, merge integrity and survivor revival are not implied by a single broad gate scenario.
viewer.test.ts 24 6 / 6 Keep: real HTTP validation, snapshot-before-edit/delete, poison controls, restore containment, Host/Origin and escaping. Shared backend coverage does not replace HTTP wiring.
write-caps.test.ts 10 5 / 5 Keep: lower-level size/type/metadata floors protect bypass callers independently from gate-level error messages.
write-evidence.test.ts 5 3 / 3 Keep: bounded audit records retain total counts, old gate recovery, session isolation and reader compatibility; no evidence-budget mutants.

Optional contribution—please feel free to decline or close this if the approach does not fit your plans.

@abogartz abogartz left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review: APPROVED_WITH_NITS

Reviewed adversarially at head 70d17ee on macOS / Bun 1.4.3 (CI pin is 1.4.4), against base 525ed89. I check the tree, not the body — here is what each claim was checked with.

Verified against the tree

Body claim How it was checked Result
17 files, production runtime code unchanged git diff 525ed89 HEAD -- src/ e2e/ package.json → empty confirmed
No tests deleted leaf-title multiset diff of test/ between the two trees: 1 rename (command.test.ts missing-source → missing-command-source) + 2 new in sweep-output.test.ts; unit count moves 722 → 724, exactly +2 confirmed
Strengthens ten existing tests decision:"strengthened" = 10 identifiers over 9 files; verdicts.json 9 Strengthened + 65 Keep, 74/74 files, no strays confirmed
The old "missing source" test never exercised a missing source base test was loadPlugin(cwd) + expect(Object.keys(hooks.tool).length).toBeGreaterThan(0); head calls ensureCommand with a deliberately absent command and asserts null + no directory created confirmed
The temp-path guard now fails its test instead of aborting the suite base really was requireTempPath(...); expect(true).toBe(true) — a tautology whose failure mode was process.exit(2) killing the run; head asserts a child's exitCode === 0 and empty stderr confirmed
Nine probes (eight distinct perturbations), old test PASS → new test FAIL replayed two myself in a clean tree at 525ed89: path-trailing-slash (old 4 pass → new 1 fail on expect(n.endsWith("/")).toBe(false)) and command-missing-throws (old 3 pass while ensureCommand rethrew → new fails on the ENOENT). Both match the recorded baselineExit=0 / candidateExit=1. The remaining seven were replayed on the same method and reproduce, including that each failure lands on the intended new assertion rather than a crash confirmed
Five mutation anchors had drifted bun scripts/test-sweep.ts --validate at 525ed89 fails with exactly prune-repofloor-off, undo-force-safety-after-publish, restore-merge-drops, repo-floor-off, gate-dupes-promoted; at head 45 patterns, all one site. The base sweeper was not merely drifted — it aborted, so no sweep could have been produced at the stated base confirmed
Report generator refuses incomplete/mismatched input synthetic logs: all five refusals fire (verdict completeness, absent witness, unaccounted removed test, missing/stray file verdict, killed→survived) with exit 1 and no output; green control exit 0 confirmed
Per-file verdict table regenerated from the committed artifact with triage-71.ts's own logic → byte-identical, 74/74 rows confirmed
Gate numbers locally: base58 typecheck clean, lint exit 0 / 409 warnings, 722 pass / 12 skip / 0 fail, e2e 11; head: typecheck clean, lint exit 0 / 410 warnings, 724 / 12 / 0, e2e 11 confirmed
Determinism the 11 changed files 5× forward (113 pass every run), 3× reversed, and the full suite with a reversed file list 2× (724/12/0 both) confirmed

No existing assertion got weaker. expect( counts per changed file never decrease (e.g. concurrency 21→21, epoch 90→90, scenarios 155→155, command 4→6, status 84→85). The substitutions are all tightenings: toBeGreaterThan(0) → exact lengths, a tautology → toBe(false), toContain(row) → full-byte toBe(before), cumChars > 0 → === expectedChars. No new swallowing try/catch, no .catch(() => {}), no widened timeouts.

Nits

  • N1 — a positive control was dropped where this PR's own standard applies. test/concurrency.test.ts:76-99: base's expect(reads).toBeGreaterThan(0) is replaced by expect(incompleteReads).toBe(0), so a reader loop that ran zero times would pass vacuously. It is only safe today because the loop is structurally unconditional (400 reads). Please add expect(reads).toBe(400), or say in the comment that the loop itself is the control — your own per-file prose argues "positive workload controls are necessary premises".
  • N2 — +1 lint warning (test/status.test.ts:406, block!.length; measured 409 → 410). Narrowing block once would make a missing delivery report itself by name instead of as an arithmetic mismatch. Cosmetic.
  • N3 — the instrument's identifier harvest is bun-build-dependent. scripts/sweep-output.ts parses (pass)/(skip) lines and test-sweep.ts spawns plain bun test ./test/; this host's Bun prints neither, so the pipeline fails closed at triage-71.ts with "expected one green baseline with test identifiers". A one-line message in main() when pass > 0 && passed.length === 0 would save the next operator the archaeology.
  • N4 — two sweep reports now sit in bench/ with different denominators. bench/test-sweep-results.md still advertises 43 mutants / 483 pass on Bun 1.3.10 @ 7bfe99b (staleness predates this PR); one pointer line to bench/test-integrity-71.json at the top would keep a reader from quoting the old number.

Residual (not blocking, worth one line in the thread)

The 38/43 score itself rests on your machine: the artifact is internally consistent and I regenerated it bit-exactly from a synthetic log pair, but before.jsonl/after.jsonl are neither committed nor hashed, and --selftest spawns git worktrees so it was out of scope in this review setup. Committing the two logs (or their SHA-256) would make the score re-derivable by the next person. Also: four tests changed kill sets between the two runs while all 38 mutants stayed killed — "no previously detected mutant was lost" is true, but per-test kill columns are not a stable quantity and I would not cite them as such.

What I could not verify: that the two Windows sweeps ran as described (repeat=1, jobs 2/4, 120 s/180 s, Bun 1.4.4); --selftest calibration; the Bun failure-recap misattribution trigger (reproduced the old parser's fabricated witness and proved the two new tests kill five parser mutations, but Bun 1.4.3/macOS emits no recap even at 60 failures); Windows behaviour of the trailing-slash and empty-stderr pins (mitigated by test-windows passing at head, not proven here).

Artifact note: the matrix is measured on a tree 7 commits behind main (main's skip count is now 11, not 12, because #194 removed the pre-#194 rejection spec — your body already names that skip). Regenerate when convenient; no rebase required for correctness.

@WhollyMindless

Copy link
Copy Markdown
Contributor Author

Addressed N1–N4 in 224ea37:

  • N1: count completed reader observations and assert exactly 400 alongside the content/identity checks.
  • N2: narrow each delivered block with an explicit missing-delivery error naming the provider request; removed block!. Lint now reports 409 existing warnings.
  • N3: warn in the sweeper when a positive passing total has no harvested identifiers, pointing to Bun build/output behavior and the per-test ledger limitation. The triage refusal is unchanged.
  • N4: mark the older report as historical and link the newer pinned catalog, with a warning not to combine denominators.

For the residual reproducibility concern, committed the actual original before.jsonl and after.jsonl under bench/test-integrity-71/, rather than only hashes. Regenerating from those files reproduces the existing report byte-for-byte (SHA-256 2a88f6076f06fa0147f38de4ba8c87c10b00e7f2e7d1488918c7a185a37c9ebe). Agreed that per-test kill sets are run observations, not stable quantities; the report pointer and PR body now say so explicitly. These retained logs do not independently certify the original execution environment, and I have not represented them as a fresh sweep of this follow-up or current main.

Validation: 39 focused tests pass; full Windows/Bun 1.4.4 gate passes (724 unit tests, 12 skipped; 11 E2E tests; typecheck and lint). No production runtime change, rebase, or mutation-score change. Hosted checks are running for the new head.

@abogartz abogartz left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Round 2: APPROVED

Re-verified at 224ea37. All four nits are closed, and the residual — the one thing that kept my own approval hedged — is closed harder than I asked.

The score is now re-derivable by anyone. You committed the two sweep logs and the pointer sentence, and I took the documented command literally:

bun scripts/triage-71.ts bench/test-integrity-71/before.jsonl bench/test-integrity-71/after.jsonl out.json
→ byte-identical to bench/test-integrity-71.json (219,362 bytes, cmp clean)

That is the strongest form the claim could take, and it holds on my machine, on Bun 1.4.3 / macOS — the same build whose missing (pass) lines were the reason I could not regenerate in round 1. So the 38/43 number is no longer resting on your host; the input/output pair is checked in and the derivation is deterministic across builds.

Nits, one by one:

  • N1 — expect(reads).toBe(400) in test/concurrency.test.ts. The reader loop is now its own positive control, so incompleteReads === 0 can never again be earned by a reader that did not run.
  • N2 — test/status.test.ts narrows once and throws provider request N did not receive its durable memory block, and the block! is gone. Measured consequence: biome is back to 409 warnings, flat versus main (my round-1 report was 409 → 410).
  • N3 — scripts/test-sweep.ts now warns when the baseline reports passes but yields no harvested identifiers, names the consequence for triage-71.ts, and says which build was validated. That message is exactly the archaeology I did.
  • N4 — the pointer line at the top of test-sweep-results.md is there, and the sentence I would have written myself is the one about denominators: "describe different trees/catalogs and must not be combined."

Two sentences in the new prose are worth calling out because they foreclose the misuse I was worried about: the logs "reproduce the original pinned report, not a new sweep of subsequent changes", and per-test kill sets are "observations from those runs, not stable coverage quantities". My round-1 complaint was that 4 tests changed kill sets while all 38 mutants stayed killed; the artifact now says that in its own words rather than waiting for a reviewer to notice.

Gates at this head: typecheck clean, biome exit 0 at 409 warnings, unit 724 pass / 12 skip / 0 fail, real-host e2e 11 pass / 0 fail. Round-1 verification stands (no assertion weakened anywhere in the sweep diff, --validate still reproduces the five drifted anchors at 525ed89, two probes replayed personally).

Leftovers, honestly weighted: +390 KB of committed logs is real, and it is the right trade — a mutation-catalog artifact nobody can re-derive is worth more than a fifth of a megabyte. And the two Windows-only claims in "what I could not verify" stay unverifiable from here, with test-windows green at head as the substitute evidence.

@abogartz
abogartz merged commit 9112d27 into abogartz:main Oct 31, 2026
4 checks passed
@abogartz-opencode-self-improvement

Copy link
Copy Markdown

🎉 This PR is included in version 0.15.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Testing-3: triage the 231 tests that pin nothing — strengthen or delete

2 participants