Skip to content

test(protocol): publish context graph golden fixtures - #35

Merged
macanderson merged 2 commits into
mainfrom
codex/contextgraph-conformance-fixtures
Jul 22, 2026
Merged

test(protocol): publish context graph golden fixtures#35
macanderson merged 2 commits into
mainfrom
codex/contextgraph-conformance-fixtures

Conversation

@macanderson

Copy link
Copy Markdown
Owner

Summary

  • publish the contextgraph/1.0-draft golden fixture profile for cross-language consumers
  • freeze strict profile validation, default-array normalization, RFC 8785/JCS bytes, and lowercase SHA-256 digests
  • cover full/minimal frames, a minimal query, missing and blank citations, unknown fields at every current object level, and RFC 8785 Unicode/escaping/number boundaries
  • verify exact manifest coverage and package the fixtures with contextgraph-conformance

This is PR 0A of the governed run-evidence implementation described in Oxagen PR #1088. It intentionally does not change the forward-compatible general CGP wire types. Strictness applies only to the pinned evidence-digest profile.

Contract

  • absent provenance, relations, kinds, and anchors materialize as empty arrays before JCS hashing
  • optional scalar fields remain absent and array order is preserved
  • unknown fields are rejected before typed deserialization/hashing so producer data cannot be silently stripped
  • ordinary Serde JSON output is not treated as RFC 8785
  • JCS digests are interoperability vectors, not new CGP wire fields

Verification

  • cargo test -p contextgraph-conformance --test golden_fixtures — 7 passed
  • cargo test -p contextgraph-conformance — 18 passed
  • cargo clippy -p contextgraph-conformance --tests -- -D warnings — passed
  • cargo package -p contextgraph-conformance --list --allow-dirty — includes all profile fixtures and the golden test
  • independent cross-language review reproduced all normalized objects, JCS strings, SHA-256 digests, and manifest hashes; final review approved with no findings

Follow-up

Oxagen PR 0B and Stella PR 0C will vendor these exact bytes and pin the merged upstream revision before their own merges.

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry @macanderson, you have reached your weekly rate limit of 500000 diff characters.

Please try again later or upgrade to continue using Sourcery

@macanderson
macanderson marked this pull request as ready for review July 22, 2026 00:32
@macanderson
macanderson merged commit 396606e into main Jul 22, 2026
1 check passed
@macanderson
macanderson deleted the codex/contextgraph-conformance-fixtures branch July 22, 2026 00:33
macanderson added a commit that referenced this pull request Jul 22, 2026
Resolves the 12 conflict hunks across 7 files. Every conflict was additive —
main's consent/egress-scope track (#35, #36, #37) versus this branch's
normative sweep — so the resolution is a union in each case, with main's
newer normative wording kept where both sides described the same rule.

Resolutions:
- contextgraph-types/src/lib.rs — union of both module sets and re-exports.
- contextgraph-conformance/src/lib.rs — keeps this branch's check_budget
  (§B1/§B3/§B4, strictly stronger than main's inline respects_budget) and
  adds main's check_consent_scopes; the runner already calls both.
- contextgraph-example-docs — union of imports and of the misbehave modes,
  so scope-lie joins the branch's eleven.
- schema — main's egress_scopes + EgressScope $def, rewritten in the
  expanded JSON style this branch normalized the file to.
- host.rs / host consent.rs / reference-messages.json — main's newer text.

Also repairs breakage that predates this merge: the previous merge commit
(10808ed) silently dropped ContextFrame::identity() while keeping the
content_digest field it feeds, so PR 33's head did not compile against its
own tree. identity() is restored and the reference provider now declares a
content_digest. rustfmt applied to main's frame_representation_witness.rs,
which arrived unformatted.

Verified: cargo check/clippy -D warnings clean, fmt clean, schema examples
validate, conformance green 6/6 and red 12/12 misbehave modes caught,
cargo test 136 passing.

Known-red, pre-existing on main and not addressed here:
frame_representation_witness::reference_frame_without_inline_content_deserializes
fails identically on origin/main — ContextFrame.content is a required String,
so a content-less reference frame cannot deserialize. Making it optional is a
normative decision that interacts with §B3 canonical token accounting, so it
is left for the maintainer.
macanderson added a commit that referenced this pull request Aug 1, 2026
…og, and backfill the gaps (#73)

CHANGELOG.md relied on every PR remembering to write its own [Unreleased]
entry. An audit of the 22 merges since v0.1.0 whose numbers never appear
in the file found 9 user-visible changes with no entry at all — including
the OCP -> CGP rename itself, the repo's biggest breaking change. The
Unreleased section had also accumulated duplicate category headings
(two '### Added', two '### Changed', two '### Fixed') from PRs appending
their own blocks.

Go-forward: .github/workflows/changelog.yml watches pushes to main. When
a merge lands without touching CHANGELOG.md, it drafts the missing
entries from the merge's actual diff (.github/scripts/changelog-ai.sh,
Vercel AI Gateway, degrade-open: no key or a failed call is a log line,
never a red check) and proposes them as a bot/changelog PR — a draft for
human review, never a direct push. The gap is measured from the last
commit that touched CHANGELOG.md, so merging the bot PR resets it, and
each run regenerates the whole current gap, so a superseded bot PR loses
nothing.

Backfill: entries for the rename (#1), frame identity/composition/usage
reports (#32), golden wire fixtures (#35), ADR 0007 (#61, #27),
composition conformance + the canary scheduled-run gate (#70) — written
from each PR's diff, in the file's existing voice. Three further audit
hits (#68, #69, #71) turned out to be already covered by newer entries
and were left alone. Duplicate category headings merged: one heading per
category, Keep-a-Changelog order.
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