Skip to content

Adopt context-graph 2.0.0: ContextQueryResult gained two attestation fields and stella-context no longer compiles against CGP HEAD #4359

Description

@macanderson

Problem

context-graph-protocol's scheduled Downstream Canary builds stella against CGP main HEAD and runs cargo test -p stella-cli -p stella-graph -p stella-context. It is red, and since CGP moved to 2.0.0 it fails at compile time rather than on an assertion:

error[E0063]: missing fields `frame_attestations` and `result_attestation`
              in initializer of `ContextQueryResult`

CGP 2.0.0 added two fields to ContextQueryResult (contextgraph-types/src/query.rs): frame_attestations: Vec<FrameAttestation> and result_attestation: Option<ProvenanceAttestation>. Stella still pins contextgraph-types / -host / -trace / -conformance at "=0.1.2" in the root Cargo.toml [workspace.dependencies], so stella's own main is green. This is forward incompatibility with unreleased upstream, which is what the canary exists to catch early.

Why it cannot be fixed today

crates.io serves only 0.1.2 of every contextgraph-* crate (index checked 2026-09-05). Pinning =2.0.0 fails resolution and lockfile-sync, and no partial adaptation compiles against 0.1.2, because the fields do not exist there.

The upstream blocker is macanderson/context-graph-protocol#102 — the crates-io GitHub Environment and token that release.yml needs do not exist, so nothing has been published since the by-hand 0.1.2 cut. CGP#16, named in the first version of this issue, is closed and is no longer the blocker.

What stella attests

Stella's built-in context providers hold no signing key and mint no commitment, so both new fields are empty for every answer stella produces: Vec::new() and None. Write them out at each site with a comment naming the producer that owes them, rather than ..Default::default(), which would absorb the next upstream field in silence.

Both fields carry #[serde(default, skip_serializing_if = ...)] upstream, so an unattested result serializes exactly as it does today and invariant 4 holds.

Duplicates folded in

#6012 and #6263 reported the same break and were closed as duplicates of this issue. #6429 (2026-09-07) is a third report of the same break, closed as a duplicate of this one — its one new finding is folded into the checklist below: the record_hash coupling comment in the root Cargo.toml needs a re-check against whatever version actually lands, since a major-version bump can change what that hash covers. #6436 did that re-check against CGP main and corrected the comment; confirming it against the published artifact is what remains.

Definition of done

  • CGP 2.0.0 is on crates.io (blocked on Publish the contextgraph 2.0.0 crates to crates.io (crates-io environment + token are not set up) context-graph-protocol#102).
  • The four contextgraph-* pins in the root Cargo.toml read "=2.0.0", and Cargo.lock is regenerated with a scoped cargo update -p contextgraph-types -p contextgraph-host -p contextgraph-trace -p contextgraph-conformance --precise 2.0.0, moving no unrelated lock edge.
  • The five production construction sites carry both fields as empty: provider.rs's query, retrieval/outcome.rs's From<RecallResult> for ContextQueryResult, and the three in stella-cli's contextgraph.rs. Each has a comment naming the producer that owes real evidence.
  • The four test construction sites compile (stella-context's provider.rs test module, stella-cli's contextgraph/tests.rs).
  • pinned_protocol_version_is_a_conformance_verified_wire_version names exactly the wire versions 2.0.0 declares, and the contextgraph/1.0-draft entry is deleted now that the pin has left 0.1.x.
  • A serde round-trip test covers a result with both fields populated and one with neither, proving the unattested shape is byte-identical to today's (invariant 4).
  • The record_hash coupling comment in the root Cargo.toml is confirmed against the published 2.0.0 artifact (folded in from stella no longer builds against context-graph-protocol HEAD: ContextQueryResult gained two attestation fields #6429). Most of this re-check is already done, against CGP main at 2.0.0, and shipped in fix(stella-protocol): state where the record digest stops matching CGP's #6436: the canonicalizer version matches (serde_json_canonicalizer = "0.3.2" on both sides, reached through contextgraph-types' record-hash feature rather than through contextgraph-conformance, which the comment named), and the comment's byte-identity claim was corrected — CGP's record_hash_preimage keeps null-valued object members and stella's drops them, so the two preimages agree only on a record carrying no such member. stella_protocol::hash's strip_nulls_is_the_only_divergence_from_cgps_preimage pins that boundary. What is left is re-reading the same two facts off the published crate rather than off main.
  • CI is green on the bumped tree, and a manual workflow_dispatch of CGP's Downstream Canary passes.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P1Important — next in linearea:contextstella-context — graph, embeddings, memory, retrievalblockedCorrect work that must not start yet; a goal:* label names the foundation it waits onbugSomething isn't workingpain:maintainabilityHard to change safelyuse-model:proHigh tier: cross-crate design, tricky invariants (e.g. Opus-class)

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions