Skip to content

test(v0.49): qualify three-case sampled deadline routing - #17

Merged
grove merged 2 commits into
issue/11-explicit-escalation-timefrom
test/v049-multicase-sampled-deadlines
Oct 21, 2026
Merged

grove merged 2 commits into
issue/11-explicit-escalation-timefrom
test/v049-multicase-sampled-deadlines

Conversation

@grove

@grove grove commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

CI repair — 2026-10-21

At original head 03a9ea40536aa34ad4a0e6ad64a9f91ab014b333, pinned MDM compatibility #39650748844 failed while running the newly added three-case SQL fixture, before any worker assertions. The precise PostgreSQL error was operator is not unique: unknown - unknown at tests/integrations/pg-mdm/time/routing.sql:240, caused by SQL operator precedence in oracle->'explanation' - 'escalation_level'. Commit b9285a5 fixes the fixture by parenthesizing JSONB extraction, matching the existing passing one-case oracle: ((oracle -> 'explanation') - 'escalation_level').

No qualification requirement, case vector, timestamp boundary, SQL implementation, production path, permission, dependency pin, or assertion was relaxed. Current-head CI is pending: pinned compatibility #39653229584, MDM preview #39653229550, core #39653229680. Keep this PR draft until the new head is green.

Scope: deterministic three-case time frontier

Adds an independent full-row oracle to tests/integrations/pg-mdm/time/routing.sql. Reuses the existing v0.49 explicit-time route_cases(..., captured_at) implementation and v0.47 fixture table. It preserves two original case identities, then tests three simultaneous cases with due times one second before, exactly equal to, and one second after a single sampled UTC instant. A single sample yields two eligible next-level rows and one ineligible row. Samples before equality and after the last deadline must return the exact independently constructed three-row vectors.

Assertions

  • Exactly one deterministic output per distinct case_key, original review_id, configured level and reason; no cross-case filtering or duplicated work candidates.
  • All complete route result fields and explanation JSON match the literal oracle, including WINNER versus INELIGIBLE, action, priority and immutable competitors.
  • Timestamps use one explicit sampled timestamptz, with equality due and no hidden wall-clock selection.
  • The entire source case population is byte-for-byte unchanged after every read. Fixture rows are transaction-local and rolled back at the end.
  • Existing legacy routing and full joint MDM/React audits are retained.

Boundaries

This is deterministic multi-case evaluation, not runtime batch admissions, a real multi-case outage/catch-up, backlog fairness, latency/resource qualification or T49.06/T49.12 closure. No production SQL, policy semantics, grants, dependencies, worker limits or release artifacts change. Remains dependent on React #14 and issue #11. Keep draft until current-head CI passes.

@grove grove mentioned this pull request Oct 21, 2026
5 of 12 tasks
@grove
grove marked this pull request as ready for review October 21, 2026 18:57
@grove
grove merged commit 2ee3f6e into issue/11-explicit-escalation-time Oct 21, 2026
7 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.

1 participant