Concordia Stage 1 Fixture Research
Status: complete
Date: 2026-04-24
Branch: codex/concordia-stage1-fixture-research
Scope
Stage 1 inspected the installed concordia-protocol==0.4.0 sidecar fixture
surface already used by Sanctuary composition tests. The goal was to identify
the smallest real-sidecar proof needed before later tool-handler integration.
Findings
- The local Concordia sidecar venv exists under
sidecars/concordia/.venvand importsconcordia.__version__ == "0.4.0". - Existing composition tests spawn the real Python sidecar and prove receipt packing, version reporting, mandate parsing, graceful degradation, and references propagation.
- The missing fixture proof was round-trip receipt verification. A receipt
packed by
pack_receiptdid not verify throughverify_receiptin the same sidecar process. - Root cause:
pack_receiptsignedsource_event_type, butverify_receiptrebuilt the signable receipt withoutsource_event_type. The TypeScript adapter also did not forward that field during verification.
Stage 1 Change
The branch adds a real-sidecar regression test:
packed receipt verifies through the same real Concordia sidecar
The fix keeps the existing receipt schema intact and only aligns the verifier with the packer:
sidecars/concordia/sidecar.py: includesource_event_typein the verification signable payload.server/src/composition/concordia-adapter.ts: forwardreceipt.source_event_typetoverify_receipt.
Remaining Follow-Ups
- Cross-process receipt verification still depends on sidecar key continuity.
The sidecar returns
public_keyfrompack_receipt, butConcordiaReceiptdoes not currently persist it. Same-process verification is fixed; restart-stable verification needs a separate design. - The Sanctuary composition reference shape uses
ref_typeandref_id. Concordia’s session-attestation helper usestypeandid. This is not changed in Stage 1 because Sanctuary’s composition v1.0 type has existing tests and downstream assumptions. A future interop pass should decide whether to normalize at the sidecar boundary or keep the Sanctuary wrapper shape explicit. - The production pipeline still synthesizes a
ConcordiaReceiptfrom the signed proposal rather than callingCompositionService.packReceipt(). Tool-handler integration should decide whether the real sidecar pack path is required before Verascore signal emission.
Verification
cd server
npm test -- --run test/composition/composition-v1.test.ts
npm run typecheck
Expected result after this branch:
test/composition/composition-v1.test.ts: 54 passed
typecheck: clean