Skip to content

core: test-health batch e3855-core-01 #3905

Closed

Description

@schlessera

Context

Test-health push for epic #3855, shard e3855-core-01 (108 packages/core/tests/ member files, 48 clusters, run th-20261110163736-83b662). Every member file was audited across the eight lenses and recorded in the test-health ledger. The batch branch test-health/e3855-core-01 lands into epic/3855-test-health.

Scope

Test code only, in the 39 changed files below. Each fixed finding:

File Lens Smell What was wrong / what changed
audit-grouped-findings.test.ts nondeterminism wall-clock today came from Date.now while the spawned audit read the clock again, so a run crossing midnight made review-today overdue; today is now 2026-07-12 and the audit and maintain children run under the hygiene-clock preload at that instant, which the passing review-today case proves reaches them.
auditor-canonical-policy.test.ts hygiene opaque-failure startsWith(...).toBe(true) printed only a boolean; toStartWith prints the message on failure.
briefing-audit-count.test.ts hygiene opaque-failure Two some(...).toBe(true) category checks are one arrayContaining over the category list, which prints it.
briefing-audit-count.test.ts nondeterminism wall-clock today came from the wall clock and the spawned audit and briefing read it again, so a run crossing midnight could change '0 day(s) ago' or a stale count; both children now run under the hygiene-clock preload pinned to 2026-07-12, which the passing '0 day(s) ago' line proves reaches them.
briefing.test.ts hygiene opaque-failure some()/has() checks at 159, 235 and 236 now compare lists, so a failure names the offending line or path.
cache-merge.test.ts failure-issues test-fault #3485: the fixture commits honoured an environment-scoped commit.gpgsign=true over the repository-local false and failed silently, so all four merge cases failed; the file's git helper now passes -c commit.gpgsign=false, and it passes 10 runs under the issue's GIT_CONFIG_COUNT method.
chunker-version-readonly.test.ts hygiene opaque-failure cols.some(...).toBe(false) printed only a boolean; the column-name list now prints on failure.
claude-runner-default-native.test.ts hygiene opaque-failure some(is_error).toBe(true) printed a boolean; toContainEqual prints the tool results.
claude-runner-rejected-token.test.ts hygiene opaque-failure every(...).toBe(true) hid which authorization a request carried; the header list is now compared.
cli-contract.test.ts failure-issues test-fault #3485: with env-scoped commit.gpgsign=true the fixture commit and brain sync's commit tried to sign and failed; the fixture git and the sync runs now carry withoutSigning(keylessEnv), and the file passes 10 runs under the issue's GIT_CONFIG_COUNT method.
cli-harness-host-isolation.test.ts hygiene opaque-failure startsWith(...).toBe(true) hid which utility directory escaped the owned TMPDIR; toStartWith prints it.
cli-onboarding.test.ts failure-issues test-fault #3485: under env-scoped commit.gpgsign=true the two pre-commit pass cases exited 128 at signing; the fixture commit now carries withoutSigning, and the file passes 10 runs under the issue's GIT_CONFIG_COUNT method.
cli-read-many.test.ts hygiene opaque-failure startsWith(...).toBe(true) is now toStartWith, which prints the item content.
compute-cli.test.ts hygiene opaque-failure startsWith(...).toBe(true) now toStartWith, which prints the artifact path.
compute-cli.test.ts nondeterminism order-dependent The gated cases asserted zero live sandboxes in a brain the leaky-provider cases share, and the plan case asserted no jobs at all, so a shuffled order failed them; each now compares with the count taken just before its own run, which still catches a run that leaks.
compute-config.test.ts nondeterminism unrestored-global The globalThis.__ogygiaProvider stand-in was deleted only after the last assertion, so a failing assertion left it for every later file in the process; it is now removed in finally.
compute-identity.test.ts hygiene opaque-failure includes(...).toBe(false) is now not.toContain, which prints the job record.
compute-mcp.test.ts hygiene opaque-failure every(...).toBe(true) hid which log line lacked the path; the lines without it are now listed.
compute-ops.test.ts hygiene opaque-failure some(kill|release).toBe(false) now lists the offending calls.
compute-refusals.test.ts hygiene opaque-failure every(files.size === 0).toBe(true) now lists the staged file counts that are not zero.
compute-state.test.ts hygiene opaque-failure every(secret).toBe(true) now lists the provider calls that did not carry the instance secret.
context-assembler.test.ts hygiene opaque-failure startsWith/endsWith(...).toBe(true) printed only a boolean; toStartWith/toEndWith print the output (lines 105, 462, 592, 608).
context-assembler.test.ts nondeterminism order-dependent The hand-built describe shared one in-memory index, so a shuffled order let earlier tests' documents answer later queries (4 cases failed in the shuffled baseline); each test now gets a fresh index in beforeEach.
context-scope-surfaces.test.ts hygiene opaque-failure Four startsWith/some(...).toBe(...) checks now list the paths or blocks that break them, or use toStartWith.
context-scope.test.ts hygiene opaque-failure includes/some(...).toBe(true) at 107 and 276 now use toContain and toContainEqual, which print the lists.
doctor-instructions-weight.test.ts hygiene opaque-failure startsWith(...).toBe(true) is now toStartWith, which prints the detail.
doctor.test.ts hygiene opaque-failure some(startsWith).toBe(true) is now toContainEqual(stringMatching), which prints the ref list.
document-page.test.ts hygiene opaque-failure Six every/some/startsWith/endsWith(...).toBe(...) checks now compare values or use anchored matchers, so a failure prints the totals, paths, summary or warnings.
document-parts.test.ts hygiene opaque-failure Six startsWith(...).toBe(true) checks now use toStartWith, which prints the output on failure.
document-writes.test.ts nondeterminism order-dependent The failing-write case assumed the document still held SOURCE, but the successful update case rewrites it; shuffled first, the comparison failed. The case now writes its own starting bytes, as its sibling already did.
enrichment.test.ts hygiene opaque-failure startsWith(...).toBe(true) is now toStartWith, which prints the document half.
eval-baseline.test.ts nondeterminism order-dependent The test read evals/shared.json written by the previous test and failed when shuffled first; it now writes its own redacted baseline before comparing against it.
eval-dates.test.ts hygiene opaque-failure every(...).toBe(true) now compares the rows' current_first values, and the selector comment names the fixture's real deadline (2026-07-29, not 2026-08-15).
frontmatter-edit.test.ts nondeterminism wall-clock TODAY came from the wall clock while the archiver and the MCP server stamped updated from it again, so a run crossing midnight failed the byte-exact comparisons; TODAY is now 2026-07-12, the in-process archive runs under setSystemTime, and the MCP child under the hygiene-clock preload, which the passing comparisons prove reaches it.
generated-from.test.ts hygiene opaque-failure some(file).toBe(true) is now toContain over the issue files, which prints them.
geo-cli.test.ts hygiene opaque-failure every(!available).toBe(true) printed a boolean; the per-leg availability list is now compared.
graph-profiles.test.ts hygiene opaque-failure every(...).toBe(true) now lists the nodes that still carry analytics.
graph.test.ts hygiene opaque-failure Three every/some/has(...).toBe(...) checks (edges, virtual nodes, community members) now list the offending items.
indexer.test.ts cannot-fail empty-by-construction With no provider the embedding phase returns false and the sidecar is never written, so the per-entry loop ran over an empty cache; the run now has a provider and the cache is asserted empty, which kills a mutant that drops the placeholder filter in saveAssetCache.
instructions-weight.test.ts hygiene opaque-failure problems.some(...) toBe(true) printed only a boolean; toContainEqual(stringMatching) prints the problem list on failure.
jev-reranker.test.ts hygiene opaque-failure every(!source).toBe(true) now lists the candidates that carry a source.
link-walk.test.ts cannot-fail nothing-to-observe If walkLinks never called its afterEdges seam, no deletion happened and the node was present anyway, so the case passed (receipts/c35-before.json, survived); it now asserts the deletion ran mid-walk, which kills that mutant.

Out of scope

Acceptance criteria

  • bun scripts/test-health.ts batch verify --base origin/epic/3855-test-health --head <head> prints "ok": true, with no test removed.
  • bun run check:pr --base origin/epic/3855-test-health exits 0.
  • Hosted proof passes on the pull request's head before it merges into epic/3855-test-health.

Verification

The batch gate and the check:pr receipt in the pull request, and the per-cluster worksheets and receipts in the test-health ledger.

Contract impact

None: test code only.

Refs #3485

Activity

  1. added this to the 0.45.0 milestone on Nov 10, 2026
  2. added
    type: test
    area: core
    on Nov 10, 2026
  3. added
    priority: p1
    on Nov 10, 2026
  4. schlessera commented on Nov 11, 2026

    @schlessera
    OwnerAuthor

    Delivered by #3906, which merged into epic/3855-test-health as c86fb029a (the push in #3855). It landed in the combined merge without proof of its own; the gate, typecheck and check:pr passed on the combined branch. The epic's two exhaustive runs on dc2439551, 42996974186 and 42997012467, then passed. GitHub does not apply Closes for a pull request into a non-default branch, so I'm closing this by hand. The change reaches main with the epic's single landing pull request.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: corepriority: p1type: test

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions