chore(deps): upgrade Context Graph Protocol to the pre-freeze normative sweep (#33) - #354
Merged
Conversation
…ve sweep (#33) Bumps contextgraph-types/-host/-conformance from 58a933a to 9fb559a — the CGP normative sweep. It is a breaking API change (canonical token accounting, content-optional frames, ADR-0004 dead-capability removal), migrated across every stella consumer: - ContextFrame.content is now Option<String> (a `reference` frame carries none). Every construction wraps its inline content in Some(...); every consumer (graph render, memory projection, conformance) handles the None case. Stella's frames are all Representation::Full, so the new canonical/reference/transform/fidelity fields are None — the "legacy full frame" shape the spec round-trips unchanged. - Capabilities lost `upsert`/`subscribe` and gained `correlation`/`verify`; durability is now declared on DataFlow.writes (ADR 0004). QueryCapability lost its advertised `filters`. DataFlow gained `egress_scopes` (the local plane declares none). ContextQuery gained `representation_preferences` (empty ⇒ the default [full]). Full workspace compiles; stella-context/-graph/-cli tests and the CGP conformance gate pass; clippy -D warnings clean. Signed-off-by: macanderson <mac@oxagen.sh>
Contributor
There was a problem hiding this comment.
Sorry @macanderson, you have reached your weekly rate limit of 500000 diff characters.
Please try again later or upgrade to continue using Sourcery
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
macanderson
marked this pull request as ready for review
July 23, 2026 06:59
macanderson
added a commit
that referenced
this pull request
Jul 23, 2026
* fix(cgp): declare §B3-honest frame token_cost (budget_tokens) The CGP pin rebase (#354) claimed to adopt "canonical token accounting" but kept the old estimate: the store declared `estimate_tokens(content) + estimate_tokens(title)` and the graph declared `estimate_tokens(content).max(1)`. Under the pinned protocol, §B3 requires `token_cost == budget_tokens(content)` — the canonical inline count (ceil(bytes/4)), exact, no tolerance. Neither builder was honest: the store added the title's tokens (always non-zero) and used chars not bytes; the graph's `.max(1)` diverges on empty content. The existing conformance gate didn't catch it: its probe query returns zero frames from the mismatched seed, so §B3 never fired on a real frame. Fix: both production builders now declare `budget_tokens(content)`. `pack_to_budget` already packs against each frame's own token_cost, so the summed-budget invariant is preserved. New `recalled_frames_declare_honest_token_cost` drives the real `recall` builder with a query that provably surfaces a frame and asserts `declares_honest_token_cost()` — it fails on the pre-fix code (token_cost 18 vs canonical 15) and passes after. A matching assertion guards the graph builder. Dead `estimate_tokens` helpers removed. * fix(ci): clear two pre-existing clippy -D-warnings blocking CI `main` (b0117f3) fails `cargo clippy --workspace --all-targets -- -D warnings` — the exact CI gate — on two warnings that landed unprotected: - `run_shared_candidates` (pipeline.rs, from #352) lacks the `#[allow(clippy::too_many_arguments)]` its five sibling functions in the same file already carry. - `use contextgraph_types::Representation` (contextgraph.rs, from #354) is used only in a `#[cfg(test)]` helper, so it is unused in the bin build. Import removed; the one test use is fully-qualified. Both unrelated to the token_cost fix but required for this PR's CI to be green.
This was referenced Jul 23, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Bumps
contextgraph-types/-host/-conformancefrom58a933a→9fb559a— the CGP pre-freeze normative sweep (upstream #33: canonical token accounting, content-optional frames, ADR-0004 dead-capability removal). A breaking API change, migrated across every stella consumer.The API changes and how stella tracks them
ContextFrame.contentis nowOption<String>(areferenceframe carries none). Every construction site wraps its inline content inSome(...); every consumer (graph render, memory projection, conformance) handlesNone. Stella's frames are allRepresentation::Full, so the new canonical/reference/transform/fidelity fields areNone— the "legacy full frame" shape the spec round-trips unchanged.Capabilitieslostupsert/subscribe, gainedcorrelation/verify. Durability is now declared onDataFlow.writes(ADR 0004), which stella already sets.QueryCapabilitylost its advertisedfilters(still functional, just not a declared capability).DataFlowgainedegress_scopes— the local plane declares none (vec!, consistent withegress: false).ContextQuerygainedrepresentation_preferences— empty ⇒ the default[full].Verification
cargo test --workspacegreen (no failures).stella-context/stella-graph/stella-clitests pass, including the CGP conformance gate (contextgraph-conformance).clippy -D warnings+fmt --checkclean.Follow-up: oxagen
The user also asked to "link up at the highest level, oxagen too." Oxagen has a separate, un-renamed
ocp-*copy of the protocol (per the OCP→Context Graph Protocol rename). Bringing it onto this samecontextgraph-*revision is a cross-repo change in~/Projects/oxagen-platform, tracked separately from this stella PR.