Skip to content

test: migrate behavioral tests and enforce 90% branch coverage - #296

Merged
jackhai9 merged 2 commits into
mainfrom
codex/behavioral-test-migration
Sep 16, 2026
Merged

jackhai9 merged 2 commits into
mainfrom
codex/behavioral-test-migration

Conversation

@jackhai9

Copy link
Copy Markdown
Owner

Replace legacy source-text regressions, method replacements, and fixed waits with executable behavior tests, and enforce the policy across the repository. The default complete coverage run now requires at least 90% branch coverage across all production sources and separately in each of seven critical orderbook modules.

Changes

  • Migrate all 83 legacy Node test files and remove the seven method-replacement and 31 fixed-wait allowances. Map all 71 former orderbook source checks to current evidence while retaining metadata, distribution, and CSS contracts.
  • Add strict test lint, explicit external-host contracts, deterministic clock/response boundaries, affected-test selection, and GitHub Actions integration.
  • Merge actual Node and Chromium V8 execution back to all 82 production source files. Preserve raw captures, require complete passing runs, and give no branch credit to Chromium teardown calls that lack block evidence.
  • Fix regressions exposed by the new behavior tests: retained depth wrappers after restoration, rate-limit cooldown parsing, precision observation, Stop availability, cancellation-list restoration, subtitle error handling, and duplicate/off-route automatic refreshes.
  • Rebuild the affected installers: Orderbook 2.7.211 and m3u8 downloader 0.10.40; update the hand-maintained auto-refresh script to 1.0.11.

Local validation

Verified with Node 24.16.0:

Check Result
Node and JSDOM 2,078 tests passed across 126 files
Chromium 364 scenarios passed: 357 production scenarios and seven collector proofs
Complete production branch coverage 9,179 / 10,184 branches, 90.13%
Seven critical-module branch gates All passed, from 92.44% to 100%
Test lint, affected builds, syntax checks, and whitespace checks Passed
Independent read-only reviews Passed; no unresolved findings

The coverage percentage is a retained-evidence lower bound. No skipped or retried scenarios were accepted, and all 82 reported source hashes matched the workspace after collection.

Migration map · Coverage contract and measurements

All account, order, and media operations in these tests use offline fixtures. Live Binance, Tampermonkey installation, and media-site acceptance have not been performed.

Migrate the remaining 83 legacy Node test files, remove method-replacement and fixed-wait allowances, and replace runtime source checks with observed behavior. Preserve fixes exposed by the new entrypoint regressions.

Validate all 2,078 Node tests and 364 offline Chromium scenarios. Enforce 90% branch coverage across all 82 production files and each critical module; the final retained-evidence lower bound is 9,179/10,184 branches (90.13%).
@jackhai9
jackhai9 merged commit b15195e into main Sep 16, 2026
3 checks passed
@jackhai9
jackhai9 deleted the codex/behavioral-test-migration branch September 16, 2026 14:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant