Skip to content

test: interleaved ratio guard for retained metadata scans; mock runs keep their target - #1485

Merged
chio-labs-delivery[bot] merged 2 commits into
mainfrom
fix/ui-mock-run-target
Nov 14, 2026
Merged

chio-labs-delivery[bot] merged 2 commits into
mainfrom
fix/ui-mock-run-target

Conversation

@kvlonge

@kvlonge kvlonge commented Nov 14, 2026

Copy link
Copy Markdown
Contributor

Why

A warehouse-metadata test bounded a retained-history scan with a fixed five-second wall clock around ten write requests. Each request commits, and on a busy Windows runner the disk syncs alone sometimes pass five seconds, so the test failed without a code change. Separately, the mock UI printed ad-hoc and job runs launched in the demo with an empty --target.

Changes

  • The retained-scan guard now interleaves each retained page with a control page: the same 100 unchanged records, in a namespace whose whole history is that one page. Every control page uses a new scan, so both pages change as many rows per commit. The test asserts the median per-pair cost ratio stays under 1.8. A 60-second bound only catches hangs.
  • Runs launched in the mock record the location and target they were launched for, so their commands read --target prod.

Verification

  • Clean, 10 runs × 4 cases (SQLite and PostgreSQL, two kinds): median ratios 0.90–1.12, five of the runs under heavy synced disk writes. Under that load the old per-total ratio swung 0.71–2.24.
  • History-proportional work injected per scanned record fails the guard: a JSON-field lookup over the namespace gave 2.13–2.25 on SQLite; a full-row text scan gave 3.67–3.90 on PostgreSQL. The old five-second bound passed both (slowest 2.9 s).
  • One scan of the namespace per page (about 1,000 rows) is below noise for both guards.
  • Mock: svelte-check, UI unit tests, and the run page showing sqb build --select stg_orders --target prod.
  • No DuckShop case: this changes a test guard and mock data, not a project shape.
  • make check-ci.

@kvlonge kvlonge added the full-verify Run the full Verify matrix on this pull request label Nov 14, 2026
@chio-labs-delivery
chio-labs-delivery Bot added this pull request to the merge queue Nov 14, 2026
Merged via the queue into main with commit d932622 Nov 14, 2026
39 of 64 checks passed
@chio-labs-delivery
chio-labs-delivery Bot deleted the fix/ui-mock-run-target branch November 14, 2026 19:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

full-verify Run the full Verify matrix on this pull request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant