Skip to content

fix(schemas): stop rejected validation probes early - #4831

Merged
Sinity merged 2 commits into
masterfrom
batch/polylogue-20260908-155826-95f8266b/integration
Sep 8, 2026
Merged

Sinity merged 2 commits into
masterfrom
batch/polylogue-20260908-155826-95f8266b/integration

Conversation

@Sinity

@Sinity Sinity commented Sep 8, 2026 •

Copy link
Copy Markdown
Owner

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.

@Sinity
Sinity enabled auto-merge (squash) September 8, 2026 16:15
@coderabbitai

coderabbitai Bot commented Sep 8, 2026

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Advanced

Run ID: 0b447cb4-cae2-4ec3-a8dd-a143e58d6629


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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@Sinity Sinity changed the title fix: Bound validation work for rejected historical schemas fix(schemas): stop rejected validation probes early Sep 8, 2026
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-08T16:18:13.045178Z c8204a8 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@Sinity
Sinity merged commit 4082980 into master Sep 8, 2026
3 checks passed
@Sinity
Sinity deleted the batch/polylogue-20260908-155826-95f8266b/integration branch September 8, 2026 16:21
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