test: specify extract_batch contract - #28
Merged
Merged
Conversation
laynepenney
force-pushed
the
agent/extract-batch-spec
branch
from
July 13, 2026 12:17
bffb984 to
e7ea622
Compare
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
extract_batchcontract before implementation.BatchUnitinput, injected inference, per-unit attribution, strict shaping and validation, fallback, and the output count invariant.Contract covered
BatchUnit(id, text, capabilities?)input andsource_unit_idoutput attributioninferseam with no recall or MLX dependencyunparseable,schema_invalid,dropped, andmerged//comment strippingentity_refs: coerce with entities in scope, drop for recall's setrawandresolvedReal fixture provenance
Copied verbatim from
synapt-dev/configconfig#480, merged at43c4687:design/results/extract-batch-limits-2026-07-13/fixtures/extract-batch-real-failures-v1.jsonSHA-256:
9b183f18ab5116cfb1f5ee67d0e99cd5af3fb7f7b99d649b1d58821f9e7489f1The pack covers 21 raw responses, 25 malformed leaves, 10 dropped source occurrences, 2 unknown-key leaves, 3 temporal conflict cases, and 1 explicitly contract-derived scalar
entity_refscase.Verification
python3 -m compileall -q tests/python/test_extract_batch.py: passpython3 -m pytest -q tests/python --ignore=tests/python/test_extract_batch.py: 307 passedpython3 -m pytest -q tests/python/test_extract_batch.py: expected TDD red at_strip_output_hygiene()NotImplementedErrorin the landed batch skeleton (1 passed, then implementation gap)git diff --check: passBoundary: OSS extraction reliability only. No identity, org, evaluation, training, repair-product, or premium implementation logic.
Reviewers: Opus for the pinned contract seam; Apollo for the implementation contract-read.