Repository navigation
fix(schemas): stop rejected validation probes early - #4831
Merged
Sinity merged 2 commits intoSep 8, 2026
Merged
Conversation
…y' into batch/polylogue-20260908-155826-95f8266b/integration
Sinity
enabled auto-merge (squash)
September 8, 2026 16:15
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Advanced Run ID: Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Sinity
deleted the
batch/polylogue-20260908-155826-95f8266b/integration
branch
September 8, 2026 16:21
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Stop validating rejected historical schema candidates at their first invalid sample.
Problem
A malformed 32-record stream received 96 validations across three rejected schemas. Each candidate retained a complete result tuple until selection finished, multiplying work and memory for large streams.
Solution
Retain the initial probe for the fallback result and discard rejected historical probes. An accepted historical schema returns its complete original verdicts. If every candidate rejects, finish the initial probe from its unvalidated suffix. Explicit selection, sample limits, and drift classification retain their existing contracts.
Verification
POLYLOGUE_PYTEST_WORKERS=2 agentctl job start polylogue pytest_focused --workspace /realm/worktrees/polylogue-batch-polylogue-20260908-155826-95f8266b-polylogue-pdcvy -- tests/unit/schemas/test_historical_payload_resolution.py -k test_rejected_schema_probes_stop_at_first_invalid_sample: both cases failed before the fix (job 4443), with 32 calls to each rejected schema instead of 1.POLYLOGUE_PYTEST_WORKERS=2 agentctl job start polylogue pytest_focused --workspace /realm/worktrees/polylogue-batch-polylogue-20260908-155826-95f8266b-polylogue-pdcvy -- tests/unit/schemas/test_historical_payload_resolution.py tests/unit/pipeline/test_validation_parallelism_contracts.py tests/unit/core/test_schema_validation.py: 67 passed (job 4446). The successful-historical case performs 33 validations; the all-rejected case performs 34.agentctl job start polylogue verify_quick --workspace /realm/worktrees/polylogue-batch-polylogue-20260908-155826-95f8266b-polylogue-pdcvy: all 14 gates passed (job 4448).The full master corpus is pending publication. Previous run 4440 was deliberately cancelled to land this correction first. The validator is in the derived-schema identity closure; no source regeneration, archive reconvergence, or deployment is included.