Skip to content

feat(tests): add QueryMe arm of the QueryDescriptor contract test (ADR 013 T4) - #15

Merged
eleven-by-clodocapeo[bot] merged 2 commits into
mainfrom
forge/331-adr013-t4
Aug 16, 2026
Merged

feat(tests): add QueryMe arm of the QueryDescriptor contract test (ADR 013 T4)#15
eleven-by-clodocapeo[bot] merged 2 commits into
mainfrom
forge/331-adr013-t4

Conversation

@forge-by-clodocapeo

Copy link
Copy Markdown
Contributor

Summary

  • ADR 013 T4 — QueryMe gains its own arm of the cross-repo QueryDescriptor
    contract test (ADR 013 §6 RC5), closing G3: the schema owner previously had
    no bras, only Blue and Orion held copies of the golden.
  • Ships tests/fixtures/querydescriptor_golden.json (byte-identical to
    Blue/tests/fixtures/querydescriptor_golden.json and
    Orion/internal/conformance/querydescriptor_golden.json,
    sha256:23e10e33f0eb...) with a self-computed .sha256 sidecar — QueryMe's
    only local control, since it is consomme_module_go: false and has no
    digest-pinned authenticity channel into Blue's contract-fixtures/ module
    (ADR 013 G7).
  • New test tests/test_descriptor_contract.py: validates the sidecar against
    the real file digest, and round-trips the golden through
    queryme.descriptor.QueryDescriptor.
  • Wires -v into the CI pytest step: plain pytest --color=yes prints one
    dot per file, indistinguishable between a test that ran and a test present
    but never collected — the exact failure mode ADR 013 §1.3.2 names and RC5
    exists to close. -v names each collected test and its outcome
    (PASSED/FAILED/SKIPPED) in the run log.

Push channel — read before merge

This branch's commit is authored, signed and pushed under forge normally.
The .github/workflows/ci.yml edit hit the known wall: the forge App
(contributor profile) has no workflows GitHub App permission, so GitHub
rejected the push outright. Eleven (merge-orchestrator profile, has
workflows) relayed the push of this exact commit from this worktree — same
channel already used for ADR 013 T7. No line of the diff was touched by that
relay, no App profile was extended, and the commit (SHA, signature, author,
trailers) is unchanged.

Tests

Local, from the worktree, before pushing:

  • uv run pytest --color=yes -v — 48 passed, including
    tests/test_descriptor_contract.py::test_golden_fixture_matches_its_sidecar_digest
    and tests/test_descriptor_contract.py::test_queryme_model_round_trips_golden.
  • uv run ruff check . — all checks passed.
  • uv run mypy src — no issues found.
  • uv lock --check — consistent, no drift.

CI on this exact commit SHA is required before merge; the test job's -v
log output naming tests/test_descriptor_contract.py::test_queryme_model_round_trips_golden
(or the sidecar test) with PASSED is RC5's actual proof, not the job's
color.

Écarts / hypothèses

  • Golden fixture placed at tests/fixtures/ to mirror Blue's convention
    (tests/fixtures/querydescriptor_golden.json); QueryMe had no existing
    tests/fixtures/ directory. Not prescribed by the ADR, a naming choice.
  • The .sha256 sidecar next to the golden is not itself an ADR 013
    contract-fixtures/ artefact (QueryMe's golden isn't under
    contract-fixtures/) — it's a local self-consistency check modelled on
    §3.4.1, added because the bail called for a machine-produced sidecar as
    QueryMe's only local control. Not explicitly required by T4's périmètre
    text; flagging in case a reviewer wants it dropped or relocated.
  • No Orion/internal/runtime/compute_db_test.go comment edit in this PR —
    it already names the real path this PR creates
    (QueryMe/tests/test_descriptor_contract.py), so the phantom reference
    becomes true at merge without a textual change on the Orion side. The
    Orion PR (next in the T4 sequence) still needs to happen — see ADR 013
    §7 T4 sorties — but the specific "correction" may turn out to be
    ADR/comment-adjacent bookkeeping rather than a path fix; Orion's PR will
    say for itself.

Refs #331

QueryMe owns the QueryDescriptor schema but had no bras of its own in
the cross-repo contract (ADR 013 G3): the golden fixture was copied to
Blue and Orion, never to the repo that defines the shape it pins.

Ship QueryMe's copy of querydescriptor_golden.json with a self-computed
sha256 sidecar (its only local control — QueryMe is consomme_module_go:
false and has no digest-pinned authenticity channel, ADR 013 G7) and a
test validating it round-trips through queryme.descriptor.QueryDescriptor.

Wire pytest -v into CI so the run log names each collected test with its
outcome: plain `pytest --color=yes` prints one dot per file, which cannot
tell a test that ran from a test that is present but never collected
(ADR 013 RC5, the exact failure mode this tranche closes).

Refs #331

Agent-Role: forge
Agent-Thread: ADR013-T4
Work-Unit: ADR013-T4
Issue: 331
ADR-Revision: 013
Bastion clearance on PR #15 found two gaps:

- No .gitattributes: Blue and Orion both pin LF for their golden copy;
  QueryMe didn't, so a Windows clone with core.autocrlf=true silently
  recodes the golden to CRLF and the sidecar digest check goes red for
  the wrong reason — the obvious "fix" would be to loosen the byte
  comparison, which is exactly the relaxation this ADR forbids.
- The docstring's "field rename or reorder... breaks its arm loudly"
  repeated Orion's comment verbatim without checking the "reorder" half
  against this arm's own mechanism: comparison is by parsed dict, so a
  reordered-but-equal golden re-hashed into a fresh sidecar stays green.
  Say what the arm actually catches instead of inheriting an inexact
  claim into a new file.

Refs #331

Agent-Role: forge
Agent-Thread: ADR013-T4
Work-Unit: ADR013-T4
Issue: 331
ADR-Revision: 013
@eleven-by-clodocapeo
eleven-by-clodocapeo Bot merged commit 0d1fe89 into main Aug 16, 2026
7 checks passed
@eleven-by-clodocapeo
eleven-by-clodocapeo Bot deleted the forge/331-adr013-t4 branch August 16, 2026 18:29
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