Skip to content

release: contextgraph crates 0.1.2, publish contextgraph-trace, restore record.rs to the published types crate - #74

Merged
macanderson merged 1 commit into
mainfrom
release/cgp-0.1.2
Aug 1, 2026
Merged

release: contextgraph crates 0.1.2, publish contextgraph-trace, restore record.rs to the published types crate#74
macanderson merged 1 commit into
mainfrom
release/cgp-0.1.2

Conversation

@macanderson

@macanderson macanderson commented Aug 1, 2026

Copy link
Copy Markdown
Owner

Cut so stella can depend on these crates by version instead of by git rev (stella#819).

What this fixes

1. contextgraph-types was published without record.rs

This repository's history was re-rooted at some point: main (root 1990edd1) and the older line (root f77cca5c) share no common ancestor. contextgraph-types 0.1.0 was published from the older line, which does not contain contextgraph-types/src/record.rs.

main's lib.rs declares pub mod record; and re-exports ContextRecord, RecordBody, RecordProvenance, RecordAttestation, RecordLink, RecordScope, RecordStatus, ContractRequirement, DirectiveKind, Enforcement, KnowledgeKind, OriginClass, RequirementResult, SharingScope, ValidationOutcome, ConstraintEffect, and LIFECYCLE_SCHEMA_VERSION — 758 lines of public lifecycle vocabulary that has never existed in a published crate. 0.1.2 is cut from main and ships it.

2. contextgraph-trace was unpublished

It was publish = false, documented as "deliberately NOT published… publication is an open question recorded in the sketch." This PR answers that question yes.

Leaving it unpublished did not stop anyone depending on it. It only forced its one downstream — stella's stella arena, which uses EventBody, TraceEvent, Journal, run_oracles, and ToolStatus — to pin the entire workspace by raw SHA to reach it.

The crate remains sketch stage, and the Cargo.toml, crate docs, README, and changelog all say so: it implements docs/sketches/host-trace.md, is not part of the contextgraph/1.0 surface, and its journal wire format may change in any 0.x release. Gate on TRACE_FORMAT, not on the crate version. A published crate with an honest instability caveat is a smaller supply-chain risk than an unpublished one consumed by commit hash.

Registry state

crate 0.1.0 0.1.1 0.1.2
contextgraph-types live yanked live
contextgraph-host live yanked live
contextgraph-conformance live yanked live
contextgraph-trace yanked live (first real release)

0.1.1 was a mistake and is yanked. It was published from the pre-re-root line before that divergence was diagnosed, so it corresponds to no commit on main, and its contextgraph-types had the same missing record.rs. Nothing should depend on it. 0.1.2, in this PR, is the version cut from main.

Reversible with cargo unyank if you disagree.

Do not push a contextgraph-v* tag for this version — release.yml triggers on it and would attempt a duplicate publish, which crates.io rejects.

Also on the remote

feat/host-selfcert-and-c7-preflight was pushed as a separate branch. Its tip c5fb2fec is the commit stella currently pins, and it was on no branch and no PR — reachable only by raw SHA and eligible for garbage collection, which would have broken stella's build for everyone with a cold cargo cache. Pushing it made it reachable. Its crate-source content turns out to already be on main (contextgraph-host and contextgraph-conformance are byte-identical between the two), so it needs no merge; it can be deleted once stella is off the rev pin.

release/cgp-0.1.1 is the superseded orphan-history attempt and can be deleted.

Verification

  • cargo test -p contextgraph-types -p contextgraph-host -p contextgraph-trace -p contextgraph-conformance on this branch — exit 0.
  • cargo publish --dry-run for all four — exit 0.
  • cargo package --list -p contextgraph-types confirms src/record.rs is in the package.
  • Packaged file lists scanned for stray .DS_Store / env / credential / key files — clean.
  • Registry independently confirms the table above.

Summary by Sourcery

Release version 0.1.2 of the Context Graph Protocol crates from main, including publishing contextgraph-trace and correcting the contents of contextgraph-types.

New Features:

  • Publish the contextgraph-trace crate as a sketch-stage host trace and replay oracle vocabulary, with crate metadata and README added.
  • Document the inclusion of contextgraph-trace alongside the other Context Graph Protocol crates in the changelog.

Bug Fixes:

  • Ensure contextgraph-types 0.1.2 includes the previously missing record.rs lifecycle vocabulary that was absent from prior published versions.
  • Clarify in the changelog that contextgraph-types 0.1.1 corresponds to no commit on main and should not be depended on.

Enhancements:

  • Update the workspace package version to 0.1.2 for all protocol crates and note that four crates (types, host, conformance, trace) are now published by default.

Documentation:

  • Add a README for contextgraph-trace that documents its sketch-stage status, journal format, oracles, and usage guidance.
  • Extend the changelog with a 0.1.2 entry describing the crate release and stability expectations for contextgraph-trace.

…graph-trace

Supersedes 0.1.1, which was published from a tree predating this repo's
history re-root and therefore corresponds to no commit on main. The visible
consequence: contextgraph-types 0.1.0 and 0.1.1 both shipped without
src/record.rs, so the whole ContextRecord lifecycle vocabulary was declared in
lib.rs on main but missing from the published crate. 0.1.2 is cut from main
and contains it.

Also flips contextgraph-trace to publish = true. It was documented as
deliberately unpublished, which did not stop anyone depending on it -- it only
forced stella to pin the entire workspace by git rev to reach the trace
vocabulary (stella#819). The crate stays sketch stage: not part of
contextgraph/1.0, wire format may change in any 0.x, gate on TRACE_FORMAT.

@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

@sourcery-ai

sourcery-ai Bot commented Aug 1, 2026

Copy link
Copy Markdown

Reviewer's Guide

Release 0.1.2 of the Context Graph Protocol workspace crates: bump workspace version, formally publish contextgraph-trace with docs and metadata, and ensure contextgraph-types is published from main with its previously-missing record.rs lifecycle vocabulary, with changelog updates reflecting the release and stability caveats.

File-Level Changes

Change Details Files
Workspace crate version bumped to 0.1.2 so the four contextgraph crates can be published consistently from main.
  • Updated [workspace.package] version to 0.1.2 in Cargo.toml
  • Clarified workspace-level publish defaults to note four published crates (types, host, conformance, trace) opt in via publish = true
Cargo.toml
contextgraph-trace is now a published crate with proper metadata and documentation, while remaining explicitly marked as sketch-stage and version-unstable at the wire-format level.
  • Added crate-level metadata for documentation URL, README, keywords, and categories in contextgraph-trace/Cargo.toml
  • Set publish = true in contextgraph-trace/Cargo.toml to opt the crate into publishing
  • Reworded crate docs in contextgraph-trace/src/lib.rs to describe sketch-stage status, journal wire-format instability, and the recommendation to gate on TRACE_FORMAT rather than crate version
  • Introduced a README for contextgraph-trace describing purpose, sketch-stage status, journal/oracle concepts, usage example, dependencies, and licensing
contextgraph-trace/Cargo.toml
contextgraph-trace/src/lib.rs
contextgraph-trace/README.md
Changelog updated to document the 0.1.2 crate release, including publication of contextgraph-trace and the fix for missing record.rs in contextgraph-types 0.1.0/0.1.1.
  • Extended the introductory sentence to list contextgraph-trace among the tracked crates
  • Added a new 0.1.2 release section with notes about all four crates being published from main
  • Documented that contextgraph-trace is now published but remains sketch-stage, with guidance on TRACE_FORMAT gating
  • Recorded the fix that ensures contextgraph-types 0.1.2 includes record.rs and notes that 0.1.1 should not be depended on
CHANGELOG.md

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

macanderson added a commit to macanderson/stella that referenced this pull request Aug 1, 2026
…819) (#1156)

Closes #819.

`stella-context`, `stella-graph`, and `stella-cli` took
`contextgraph-types`, `-host`, `-trace`, and `-conformance` as git
dependencies pinned by commit rev — **six lines repeated across three
manifests**.

## The pin was worse than the issue described

The rev it named, `c5fb2fec`, was on **no branch and no PR** in the
protocol repository. It was reachable only by raw SHA and eligible for
garbage collection — one cold cargo cache away from breaking every
build, including CI's.

It was also on a history line that repository had **re-rooted away
from**: `git merge-base origin/main c5fb2fec` returns nothing.
`context-graph-protocol` has two roots, and stella was pinned to the
abandoned one.

And a git rev is invisible to `cargo audit` / `cargo vet`, and carries
no checksum in `Cargo.lock`.

## Why this needed an upstream fix first

Two of the four crates could not simply be re-pointed at the published
0.1.0:

- `contextgraph-host` and `contextgraph-conformance` had **diverged**
from 0.1.0 (composition conformance, C7 exported as public API), so
0.1.0 would not compile against this code.
- `contextgraph-trace` had **never been published** — `publish = false`,
documented as "deliberately NOT published… sketch stage".
`stella-cli/src/arena.rs` uses `EventBody`, `TraceEvent`, `Journal`,
`run_oracles`, and `ToolStatus` from it, so it could not be inlined
away.

Fixed upstream in
**[context-graph-protocol#74](macanderson/context-graph-protocol#74
(all checks green): 0.1.2 is cut from that repo's `main`,
`contextgraph-trace` is published for the first time, and
`contextgraph-types` once again ships `src/record.rs` — the
`ContextRecord` lifecycle vocabulary that 0.1.0 silently omitted because
it too was published from the abandoned line. 0.1.1 was a mistake made
while diagnosing that and is **yanked**.

## What changed here

- The four crates are declared **once** in `[workspace.dependencies]` at
`=0.1.2`; members write `contextgraph-types.workspace = true`. The next
bump is a one-line edit instead of six — that scattering is how these
drifted onto a rev in the first place.
- **Exact `=` requirements, not caret.** `contextgraph-trace` is sketch
stage and exempt from the protocol's stability promise; its journal wire
format may change in any `0.x`, and `stella arena` writes that format to
disk. Gate behaviour on its `TRACE_FORMAT` constant, not on the version.
- **`deny.toml`'s `allow-git` exemption is removed** — its own comment
scoped it to "until they are published to crates.io." Left as an
explicit empty list rather than deleted, so re-introducing a git source
is a visible edit to that file and not a silent append to an existing
exemption. That exemption is precisely what let the pin drift somewhere
unreachable.

## Verification

- `make gate` — **exit 0** (fmt, clippy `-D warnings`, full workspace
tests, rustdoc, file-size, invariants, licence parity, shellcheck,
action pins).
- `cargo deny check sources` — **exit 0** with `allow-git = []`, proving
the workspace has no git dependencies left at all.
- `Cargo.lock` shows all four as
`registry+https://github.com/rust-lang/crates.io-index` at `0.1.2`, each
now carrying a checksum; `rg 'git\+.*context-graph-protocol' Cargo.lock`
returns nothing.
- No Rust source files were touched — the diff is manifests, lockfile,
`deny.toml`, and a changelog entry.

## Note for the reviewer

`contextgraph-types` 0.1.2 **adds** `record.rs`, which the old git rev
did not have. It is purely additive and nothing broke, but stella now
has CGP's record types in scope alongside its own `record_hash` work —
worth a look before building anything new in that area.

## Summary by Sourcery

Switch Context Graph Protocol dependencies from pinned git revisions to
crates.io registry releases and centralize their version management in
the workspace manifest.

Enhancements:
- Centralize declaration of `contextgraph-types`, `contextgraph-host`,
`contextgraph-trace`, and `contextgraph-conformance` in
`[workspace.dependencies]` with an exact `=0.1.2` version to avoid drift
and simplify future bumps.
- Update member crates (`stella-cli`, `stella-context`, `stella-graph`)
to consume Context Graph Protocol crates via workspace dependencies
instead of direct git sources.
- Document the dependency change and auditability improvements in the
changelog for the unreleased version.

Build:
- Ensure all Context Graph Protocol crates are pulled from crates.io
with checksummed lockfile entries, eliminating the previous reliance on
an unreachable git commit rev.

CI:
- Tighten `cargo-deny` configuration by clearing the `allow-git` list,
so any future git dependency becomes a visible, audited change rather
than relying on a lingering exemption.

Co-authored-by: Stella Test <ops@oxagen.sh>
@macanderson
macanderson merged commit 00377ab into main Aug 1, 2026
21 checks passed
@macanderson
macanderson deleted the release/cgp-0.1.2 branch August 1, 2026 18:30
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