Skip to content

fix: test runner cleanup + fanout timestamp bounded discovery#413

Merged
matheus1lva merged 1 commit into
mainfrom
fix/test-runner-and-fanout-timestamp
May 29, 2026
Merged

fix: test runner cleanup + fanout timestamp bounded discovery#413
matheus1lva merged 1 commit into
mainfrom
fix/test-runner-and-fanout-timestamp

Conversation

@matheus1lva
Copy link
Copy Markdown
Collaborator

@matheus1lva matheus1lva commented May 27, 2026

Summary

Split from #400 per review feedback — smaller, independently measurable changes.

Test runner cleanup

  • Fix mocha arg parsing (split --timeout from value)
  • Default to **/*.spec.ts when no spec args provided
  • Remove describe.only from strider.spec.ts (was still there on the old branch)
  • Remove it.only from strider rollback test
  • Fix hook.spec.ts blockTime to be recent (within 7-day lookback window)

Fanout timestamp discovery

  • Replace unbounded DISTINCT block_time scan with series_time bounded query on the output table, scoped to the fanout window
  • Maps to the top pg_stat_statements offender — the 99%+ row-reduction win
  • Deploy and measure before adding more changes

From

Split from #400 (PR 1+2 per review request)

Follow-ups (surfaced during review)

Test runner:
- Fix mocha arg parsing (split --timeout from value)
- Default to **/*.spec.ts when no spec args provided
- Remove describe.only from strider.spec.ts
- Remove it.only from strider rollback test
- Fix hook.spec.ts blockTime to be recent (within 7-day lookback)

Fanout:
- Replace unbounded DISTINCT block_time scan with series_time bounded
  query on the output table, scoped to the fanout window.
- Maps to the top pg_stat_statements offender.
@vercel
Copy link
Copy Markdown

vercel Bot commented May 27, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
kong Ready Ready Preview, Comment May 27, 2026 12:08pm

Request Review

Copy link
Copy Markdown
Contributor

@murderteeth murderteeth left a comment

Choose a reason for hiding this comment

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

Summary

Two unrelated fixes bundled, split from #400:

  • Test runner: fix mocha --timeout arg splitting, default to **/*.spec.ts fallback, drop describe.only/it.only from strider, bump hook.spec.ts blockTime into the 7-day lookback window.
  • Fanout timestamp discovery: replace unbounded DISTINCT block_time scan with a series_time range-bounded scan on output, returning epoch seconds directly. Aligns with the hypertable partition column for chunk pruning.

Issues

None blocking.

Follow-ups (not blockers, separate from this PR)

  • packages/lib/types.spec.ts is broken on disk — Removing the .only calls in strider.spec.ts correctly unmasks every other lib spec, which surfaces a pre-existing failure: OutputSchema.parse({ address: '0x', ... }) is rejected by EvmAddressSchema → viem.getAddress. The test fixture has address: '0x', which has never been a valid checksum address. Either fix the fixture (use a real address) or loosen the schema. Worth fixing soon so bun --filter lib test goes back to exit 0.
  • bun --filter ingest test discovery is broken (pre-existing)packages/ingest/run-tests.ts (unchanged here) uses the same ['**/*.spec.ts'] fallback with spawn(..., { shell: true }). Bash's globstar is off by default, so ** collapses to * and only depth-2 specs are discovered (abis/index.spec.ts, extract/evmlogs.spec.ts). Top-level (things.spec.ts, prices.spec.ts, abiutil.spec.ts) and depth-3+ specs are silently skipped — including the hook.spec.ts blockTime fix in this PR at abis/yearn/2/strategy/snapshot/hook.spec.ts. The fix itself is correct, but the runner doesn't exercise it. Options: drop shell: true and let mocha's own glob handle **, prefix the shell with shopt -s globstar, or pre-expand with a JS glob lib.

Verdict

APPROVE


How This Was Reviewed

This review was conducted using the review-pr skill.

@matheus1lva matheus1lva merged commit dbe9622 into main May 29, 2026
6 checks passed
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.

2 participants