Repository navigation
Resolve impossible non-JSON required-capture declarations #1401
Description
Activity
- changed the title
[-]Resolve TechVault capture-offer admission against current RAES contracts[/-][+]Resolve impossible non-JSON required-capture declarations[/+]on Sep 30, 2026 - addedin-progressAn agent is actively working this issue via /implementAn agent is actively working this issue via /implement
on Sep 30, 2026 🛠️ Picked up by /implement - driver codex, branch
1401-required-media-type-consistency, 2026-09-30T04:31:04.427Z.gc workflow phase recorded:
plan(issue #1401). Posted by the MCP server to enforce ordering between workflow steps (issue #794 MVP-2). Do not edit or delete — used by downstream tools to gate phase prerequisites.Plan for #1401
Decision. Required-capture media types remain limited to the output/proof registry:
application/jsonand array-rootapplication/jsonl. Reject the full declaration when any type is unsupported. When an output contract is explicit, require every declared type to be supported by that contract. Keep omitted SDL media types unconstrained and keep RFC 6901 selectors over decoded JSON.Path B — shipped contract defect: Add red tests for SDL authoring, capture-spec model validation, mixed supported/unsupported lists, unknown or misleading output contracts, and the model/offer/proof path for accepted JSON and JSON Lines. Then add a shared registry-backed declaration validator in
raes_contracts.evidence_output_validationand call it fromraes.evidence_requirementsandExperimentCaptureRequirementModel. Preserve atomic offer admission and bounded content proof. Update the DSL-124 PCAP fixture to a supported declaration and add a negative PCAP case.Published contracts and docs: Keep generated SDL/capture-spec schemas in sync with runtime validation, including semantic-invariant metadata as needed. If a published schema changes, update
contracts/schema-publication-manifest.jsonwith its content hash and regenerate/verify the reference bundle. Keep the preflight guidance indocs/migration/required-capture-admission.mdand adjust other affected docs or fixtures.Design checks: Reuse the closed output registry, published schema resolver, existing Pydantic validators, atomic capture matcher, and content-backed proof; add no separate eligibility list or parser. Validation fails before backend effects, with errors identifying media/contract incompatibility and no artifact bytes or locator data. Authorization, safe URI handling, checksum, byte bounds, and error envelopes remain on their existing paths. A future encoding enters through a governed registration plus bounded parser/proof before authoring can accept it. Review the SDL schema, experiment capture schema, manifest/offer schema, model consumers, and test fixtures for whole-repo consistency.
Verification: Run only targeted pytest modules/cases for authoring, capture models, admission, output registry, and evidence proof; run schema drift checks only for any changed published schemas. Set
RAES_REQUIREMENT_UIDfor local gates because this branch has no UID. The pre-publish hook, review, CI, SonarCloud, and readiness gates remain in the workflow.gc_codex_review — sanitized deferred publication for issue #1401, cycle 1 of 1
Reviewed revision:24dee37109db61fc26e87c8bf40f73f7e58dbe07520b0af3c6831de830e79b5eArchitectural read
The authoring and capture-spec checks use the existing output registry and preserve offer and byte-proof boundaries. The updated refinement fixture uses selectors that cannot resolve against its array-root contract; both fixture declarations need correction.
Verdict:
don't-shipFindings
core-F1 — Updated refinement fixture cannot satisfy its declared output contract
- Classification:
class - Decision:
fix - Location:
implementations/python/tests/test_exp_731_evidence_requirement_refinement.py:68 - Rationale: The array-root stream uses numeric JSON Pointer paths. Correct both fixture declarations and add regression evidence that their selectors resolve against valid stream content.
- Classification:
gc_codex_review pre-push cycle 1 of 1 complete for issue #1401 on branch '1401-required-media-type-consistency'. Posted by the MCP server to enforce the pre-push hard-cap-1 contract (issues #796, #804, #906). Do not edit or delete — used by the next
gc_codex_review(uncommitted) invocation to count cycles.Review decision record — codex cycle 1 (issue #1401)
Reviewer: codex
Cycle: 1
Verdict:don't-shipArchitectural read:
The authoring and capture-spec checks use the existing output registry and preserve offer and byte-proof boundaries. The updated refinement fixture uses selectors that cannot resolve against its array-root contract; both fixture declarations need correction.
Blocking findings: 1
Finding 1 —
class(2 instances)- ID:
core-F1 - Title: Updated refinement fixture cannot satisfy its declared output contract
- Location:
implementations/python/tests/test_exp_731_evidence_requirement_refinement.py:68 - Decision: fix
- Rationale: The array-root stream uses numeric JSON Pointer paths. Correct both fixture declarations and add regression evidence that their selectors resolve against valid stream content.
- Instances:
implementations/python/tests/test_exp_731_evidence_requirement_refinement.py:68implementations/python/tests/test_exp_731_evidence_requirement_refinement.py:161
- ID:
Pre-PR base synchronization
- Source:
refs/remotes/origin/devat79c50a957063948d459dcdcf806f57ddea1976b5 - Outcome:
merged_clean - Published feature head:
3a1c619e36f7e10247c84d7e1793b787bdb55d71 - Synchronized tree:
8b055bb42e18e529a4236edfc294e8609ec8c93f
- Source:
- removedin-progressAn agent is actively working this issue via /implementAn agent is actively working this issue via /implement
on Oct 2, 2026
RAES contract gap
RAES accepts a required SDL evidence declaration with
media_types: [text/plain].EvidenceRequirementvalidates it, andcompile_scenario_capture_demandsprojects it into a demand fortext/plain. The capture matcher requires a matching offer media type. Yet no validObservationCaptureOffercan advertisetext/plain: its constructor callsvalidate_evidence_output_offer, and the closedevidence_output_registrations()contains onlyexperiment-evidence-record-v1andparticipant-behavior-history-event-stream-v1, both with JSON encodings. The same restriction applies toapplication/x-ndjsonand other non-JSON media types. Required evidence that RAES accepts at authoring can therefore be impossible to admit or prove, regardless of backend implementation.This is a RAES language and contract consistency problem. It is not a request to loosen matching or to special-case an integration. The output contract must describe the emitted artifact bytes;
experiment-evidence-record-v1describes a structured evidence record and cannot stand in for arbitrary text or JSON content.Code evidence
implementations/python/packages/raes/evidence_requirements.py:EvidenceRequirement.media_typesaccepts nonempty media-type strings; no output contract is required unless field selectors are present.implementations/python/packages/raes_processor/capture_admission.pyandimplementations/python/packages/raes_contracts/capture_dimensions.py: required media types are projected and matched by overlap with one atomic offer.implementations/python/packages/raes_backend_protocols/observation_capture.pyandimplementations/python/packages/raes_contracts/contracts/observation_capture.py: every offer requires an output contract and validates its offered media types against that contract.implementations/python/packages/raes_contracts/evidence_output_validation.py: the registered output contracts accept onlyapplication/json, withapplication/jsonladditionally supported for the array-root contract.implementations/python/packages/raes_contracts/_evidence_content_validation.py: post-run proof parses the artifact under the registered JSON output contract, so changing admission alone would not make non-JSON evidence provable.A direct run against current RAES code accepted an
EvidenceRequirementwithmedia_types=['text/plain']and compiled a demand for('text/plain',). Constructing the corresponding offer withoutput_contract='experiment-evidence-record-v1'andmedia_types={'text/plain'}raisedValueError: capture offer media types cannot be validated against its output_contract. A JSON offer constructed successfully but cannot satisfy the text demand.Required outcome
Related RAES work: #1112, #1237.