Skip to content

core: test-health batch e3855-core-02 #3859

Closed

Description

@schlessera

Context

Test-health push for epic #3855, shard e3855-core-02 (106 packages/core/tests/ files, 57 clusters, run th-20261110163724-c232a4). Every member file was audited across the eight lenses and recorded in the test-health ledger. The batch branch test-health/e3855-core-02 lands into epic/3855-test-health.

Scope

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

File Lens Smell What was wrong / what changed
sync-pull-rebase.test.ts hygiene opaque-failure A some().toBe(true) hid the recorded rebase calls; it now asserts the list contains the abort so a failure prints the calls.
propagation-review.test.ts hygiene opaque-failure A some().toBe(true) hid the detected categories; it now asserts the category list contains propagation.
propagation-review.test.ts hygiene opaque-failure Same boolean-hiding some() on the keyless baseline's detected categories, now a toContain over the list.
tags.test.ts cannot-fail weak-matcher not.toBeNull accepted any value as the baseline, so accepting indexed_at instead of file_mtime passed; it now asserts accepted_mtime equals the indexed file_mtime.
video-completions.test.ts cost real-time-wait The PROCESSING case waited out video.ts's real 1000 ms poll interval; that one interval now fires on the next timer turn (other timers stay real) and the test asserts exactly one poll wait.
provider-relay-video.test.ts cost real-time-wait Both relay cases spent the real 1000 ms poll interval; it now fires on the next timer turn and the lifecycle case asserts one poll wait.
provider-relay-video.test.ts hygiene opaque-failure Three every/some booleans printed only true/false; they now list the offending request URLs.
scratch.test.ts cannot-fail nothing-to-observe The four swap-race tests never checked that their readdir spy actually swapped the directory, so a listing that stopped reading the plain path left the outside directory intact and the cleanup-listing pair green (verified: both pass under that mutant); each now asserts SWAP_HAPPENED, as the lstat variant already did.
okf-exporter.test.ts cannot-fail weak-matcher errors >= 4 against five fixture errors let any one conformance rule be dropped (verified: the log-heading check removed stays green); it now pins the error per file and the count of five.
render-scratch.test.ts cost per-test-setup Six render tests launched brain doctor --fix only to write the scratch ignore line; they now call ignoreScratch in-process (asserting it wrote the line), while the three tests that name doctor keep the CLI; faster on this machine (median 19.7 s to 9.4 s over 5 runs).
render.test.ts cannot-fail weak-matcher It asserted only that notes/t8.html exists, a path another test also writes, so an ignored --as passed; it now renders its own input to its own output and asserts the markdown heading was parsed.
render.test.ts cannot-fail empty-by-construction The input was a lone HTML block, which markdown also passes through, so treating .html as markdown stayed green; the input now carries a markdown heading that HTML mode must leave as text.
render.test.ts nondeterminism order-dependent The --as case read notes/raw.html written by the previous case and failed when shuffled first (1 of 10 baseline runs); it now writes its own input, 10/10 green shuffled.
storage-inventory.test.ts failure-issues test-fault #3485: the fixture commit inherited environment-scoped commit.gpgsign and failed with a missing signer (2/2 runs red); it now passes command-scoped -c commit.gpgsign=false and is green 10/10 under the same env (Refs #3485, this file only).
storage-inventory.test.ts hygiene opaque-failure Three .some(...).toBe(true) checks in the test being changed now compare the reason and root-path lists, so a failure prints them.
stats-history.test.ts cannot-fail conditional-assertion The loop only checked entries a week past the daily window, so judging a week's latest over older snapshots only (dropping a straddling week's keeper later) survived; it now checks every entry past yesterday's window and pins that set non-empty.
stats-history.test.ts hygiene opaque-failure endsWith(...).toBe(true) printed only a boolean; it now compares the file's last two characters.
stats-trends-cli.test.ts hygiene opaque-failure Both every(...).toBe(true) state checks now compare the list of states, so a failure prints them.
sync-verbs.test.ts hygiene opaque-failure Two some(startsWith).toBe(true) checks hid the commit subjects; they are now toContainEqual(stringMatching) so a failure prints the subjects.
sync-merge-hidden.test.ts hygiene opaque-failure notes.some(...) printed only false; the assertion now matches the notes list so a failure shows the notes.
safe-path.test.ts cannot-fail weak-matcher startsWith(root) accepted any path under the brain, the root itself included; it now asserts the exact resolved path.
safe-path.test.ts hygiene leaked-resource The resolveWritable describe's temp directory was never removed; it now joins the fixtures the afterAll deletes, and its precondition compares the path instead of a boolean.
skills-index-emitters.test.ts nondeterminism order-dependent Three cases read the AGENTS.md the first case wrote and failed with ENOENT under shuffle (4 of 10 baseline runs); each case now builds and emits its own repo.
skills-index-emitters.test.ts nondeterminism order-dependent The surrounding-content cases chained one file through three tests and failed under shuffle; each now starts from its own appended repo.
skills-claude-emitter.test.ts nondeterminism order-dependent The round-trip cases shared one repo and failed in 5 of 10 baseline runs when shuffled; each now gets a repo emitted the number of times it needs.
skills-pi-emitter.test.ts nondeterminism order-dependent The same shared-repo chain as the claude emitter test, fixed the same way.
skills-index-emitters.test.ts hygiene opaque-failure startsWith().toBe(true) checks at 142 and 596 now compare the leading slice, and the some(startsWith) warning checks at 464 and 562 compare the warning prefixes, so failures print values.
skills-shipped-lint.test.ts hygiene opaque-failure every(source === core).toBe(true) now lists the names of non-core skills and expects none.
skills-lint.test.ts hygiene opaque-failure Boolean some/every checks at 74, 205 and 234 are now toContainEqual(objectContaining), a severity list and an offender filter.
search-result-tags.test.ts hygiene opaque-failure A boolean over every score printed only true/false; the assertion now lists the offending path and score.
sync-assess.test.ts cannot-fail empty-by-construction The group check only asked that no grouped path names credentials, which an empty group list also passes; it now requires a TRACK file in the groups and compares the path list, so dropping TRACK files or adding SENSITIVE ones both fail.
storage-host-reader.test.ts hygiene opaque-failure roots.some(...) printed only false; it now matches the root path list so a failure shows the roots.
media-effects.test.ts nondeterminism shared-state The fixture commit inherited the host's signing setting, so all 27 cases failed under a global commit.gpgsign=true with a missing signer; the fixture git now passes command-scoped commit.gpgsign=false.
media-config.test.ts nondeterminism shared-state Same host-signing leak in the fixture commit (every case failed under global signing); fixed the same way, and the env-scoped GIT_CONFIG_COUNT channel passes too.
media-inventory.test.ts hygiene opaque-failure Two every/some booleans now compare the category, urgency and counted paths, so a failure prints them.
media-references.test.ts hygiene opaque-failure An every() boolean now lists the references whose path or note is wrong.
storage-pack.test.ts failure-issues test-fault #3485: the three fixture-only commits inherited env-scoped signing (both committing cases failed with GIT_CONFIG_COUNT signing and a missing gpg.program); they now pass command-scoped commit.gpgsign=false and run clean under the same environment.
sync-artifacts.test.ts failure-issues test-fault Under env-scoped GIT_CONFIG_COUNT signing with a missing signer the seven applyIgnores cases failed (c35-issue-3485-before.log, 12 pass 7 fail) because the fixture's repository-local gpgsign=false is outranked; each test now appends withoutSigning's overrides to process.env and restores it, and the file passes under the env-scoped, the scratch-global and no signing configuration (Refs #3485).
reranker-helpers.test.ts failure-issues test-fault Issue #2787 names this file's stock company path segment; it is now an Ithaca client path, and a control mutation matching only the basename was killed (receipts/c37-control.json).
paid-provider-qualification.test.ts hygiene opaque-failure An every().toBe(true) over the first five embedding calls now filters the offending calls and expects none, so a failure prints them; semantics unchanged.
paid-provider-qualification.test.ts hygiene opaque-failure A some().toBe(true) for the file DELETE is now toContainEqual over the method/path list, so a failure prints the transport.
links-target-index.test.ts hygiene opaque-failure some(SCAN).toBe(false) at 92 and 128 now filter the SCAN lines and expect none, so a failure prints the plan rows; includes().toBe(true) at 84 is now toContain.
sync-stash.test.ts failure-issues test-fault #3485 lists this file: its repository-local commit.gpgsign=false is outranked by env-scoped signing, and all 26 cases failed under GIT_CONFIG_COUNT signing with a missing gpg.program; its git helpers now pass command-scoped commit.gpgsign=false and run clean under the same environment.
module-renderers.test.ts cannot-fail weak-matcher The six rejects cases used a bare rejects.toThrow(), so a renderer validator that crashed for every package still passed them; each now names its own refusal (the manifest key or the own-package export rule).
sync-commit.test.ts hygiene opaque-failure Boolean comparisons (endsWith, every, some, in) printed only true/false; they now compare the subject, the domains, the results and their errors so a failure shows the values.
module-entry.test.ts cannot-fail wrong-object The specifier scan matched only ... from "x", so a bare side-effect import "node:fs" in the fixture passed (receipts/c50-F1-before.json survived); the pattern now reads bare imports too.
storage-attachment-facts.test.ts hygiene opaque-failure A some() boolean hid the references; toContainEqual now prints them, and an always-resolved mutation still fails the case (receipts/c51-C1.json).
storage-attachments.test.ts cannot-fail masked-assertion The symlink case accepted any rejection, so dropping O_NOFOLLOW still passed on a later identity check's 'changed'; it now requires the link itself to be refused (ELOOP or protected).
taxonomy.test.ts cannot-fail wrong-object The test asserted three regexes it declared itself, so weakening the loader's cron schema could not fail it; it now loads a local module through loadModules and asserts each injection is refused with the schema's message.
taxonomy.test.ts failure-issues test-fault #2787 names this file's two stock-company path literals; they are now Scheria paths from the Odysseus world, with the same assertions (the issue's other files remain).
skills-discover.test.ts hygiene opaque-failure warnings.some(...) printed only false; the assertions now match the warning list so a failure shows the warnings.
sync-pending-state.test.ts failure-issues test-fault #3485 reproduced (29/29 cases fail with env-scoped commit.gpgsign=true and a missing signer); each test now appends withoutSigning entries to process.env, reaching fixture git, in-process sync and CLI children, and restores them after.
seam-contracts.test.ts nondeterminism unrestored-global afterAll restored fetch by plain assignment; it now restores the saved property descriptor (or deletes a fetch that was never there).

Out of scope

Product code, shared fixtures outside a cluster (for example sync-fixture.ts, whose signing isolation stays with #3485), timeouts and deadlines, shard and selection rules.

Acceptance criteria

  • bun scripts/test-health.ts batch verify --base origin/epic/3855-test-health --head <head> prints "ok": true (609 tests before and after, none removed).
  • Every cannot-fail/strengthen/rewrite fix carries a killed mutation receipt; every deflake 10 clean runs; every speed-up a faster local median.
  • The pull request's hosted proof passes on its head.

Verification

check:pr --base origin/epic/3855-test-health receipt and the hosted proof run on the pull request.

Contract impact

None.

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 #3863, which passed its proof on its own head and merged into epic/3855-test-health as 1bbdbbfb9 (the push in #3855). 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