Skip to content

Chore/backlog sweep 2026 07 - #67

Merged
macanderson merged 15 commits into
mainfrom
chore/backlog-sweep-2026-07
Jul 30, 2026
Merged

Chore/backlog sweep 2026 07#67
macanderson merged 15 commits into
mainfrom
chore/backlog-sweep-2026-07

Conversation

@macanderson

@macanderson macanderson commented Jul 30, 2026

Copy link
Copy Markdown
Owner

Introduce a full prompt-composition and budgeting layer on top of the host fan-out, add MCP interop and in-repo reference providers, harden stdio and HTTP transports, and broaden conformance, CI, and documentation around provider and host behavior.

New Features:

Add a reference prompt-composition module that splits global budgets across providers, deduplicates cross-provider evidence, orders frames by value, and produces a fenced prompt plus citation map and audit record
Introduce MCP interop: an MCP→CGP bridge that wraps MCP resource servers as CGP providers, and a CGP→MCP server that exposes a host fan-out as an MCP query_context tool
Enhancements:

Refactor stdio transport to support correlated, pipelined queries via a dedicated reader task while keeping non-correlating and verify exchanges lock-step
Extend the HTTP transport with bearer credential support and transport security checks that reject insecure non-loopback HTTP endpoints before any bytes leave the host
Add host-side budgeted fan-out and usage reporting improvements so honest legs collectively respect a global token budget
Strengthen host and provider conformance checks with new scenarios for version rejection, crash isolation, composition audit, malformed input labelling, and provenance–fixture consistency
Add shared reference-provider skeleton and two conformant in-repo providers (ripgrep and treesitter) backed by real files and symbol graphs
Build:

Wire new reference providers, MCP bridge/server, and create-contextgraph-provider scaffold into the workspace and CI, including external conformance gates for all SDKs and HTTP adapters and a downstream canary against stella
Add release and SDK publish workflows, including crates.io dry-run and guarded tag-triggered publishing steps
CI:

Extend CI to run host-conformance, provider conformance for reference and MCP-based providers, HTTP conformance for SDK examples, scaffold-generated project conformance, schema validation, and crates.io dry-run packaging
Documentation:

Expand provider implementation docs with SDK quick-starts, HTTP hosting guidance, scaffold usage, and conformance registry information, plus new pages on composing frames into prompts, reference providers, MCP composition, and protocol surface/stability clarifications
Tests:

Add extensive unit and property tests for the composition module, pipelined stdio transport, HTTP credential handling and transport security, conformance suite behavior, and MCP bridge/server flows
Chores:

Update SPEC, governance, ADRs, changelog, PR template, and schema tooling to reflect new host checks, HTTP rules, composition behavior, usage-report naming, and downstream canary setup

…ma $id

Five file-disjoint backlog issues, all additive (no wire/Rust-logic change):

- #20 Conformance registry page + reproducible-report seed + badge + PR
  submission checklist. Seed report is a verified 12/12 capture of
  `contextgraph-inspect stdio --json` against the bundled example provider.
- #16 Tag-triggered, environment-gated crates.io release.yml + a credential-free
  `publish-dry-run` CI job + crates.io/docs.rs badges. Version cut and the
  crates-io environment/secret remain the owner's decision.
- #59 sdk/PUBLISHING.md + tag-gated publish-sdks.yml; PyPI/Go publishes and the
  Go tag remain human-only. npm already live via #46.
- #29 downstream-canary.yml builds stella's contextgraph-* consumers against
  HEAD (advisory); oxagen-canary activates once OXAGEN_PLATFORM_TOKEN is wired.
- #58 schema $id repointed to the GitHub-raw URL that resolves today (interim
  until #57's Vercel relink); schema validate-examples.py green, mirror
  byte-identical.

Closes #20, #29, #58
Refs #16, #59 (publish/tag/secret steps are human-only)

Claude-Session: https://claude.ai/code/session_01Co9faUWdYC1SPqrof7njyD
…mment (#49)

Closes the two remaining #49 "survivors":

- SPEC.md gains a normative §7.3 "Usage reports" (UR1): a host MUST be able to
  produce a usage report whose budget_consumed equals the summed token_cost of
  served frames, referencing them by FrameId — backed by the existing, tested
  contextgraph-host::FanOut::usage_report. Resolves the "U1" anchor collision
  with §13's ignore-unknown-members rule by labelling this UR1 across SPEC.md,
  docs/context-reuse.md, and docs/protocol-surface.md, and repointing §14's A1
  cross-reference at §7.3.
- Reword the schema canonical_token_cost $comment so tokenizer_ref pairs only
  with canonical_token_cost (the exact-count companion), never the byte-formula
  token_cost (§B3/§7.2) — resolving #50's tokenizer residual. Source and site
  schema copies stay byte-identical.

schema/validate-examples.py green.

Closes #49
Refs #50

Claude-Session: https://claude.ai/code/session_01Co9faUWdYC1SPqrof7njyD
The graph itself is already real and witnessed — §8 specifies graph frames, the
open `rel` vocabulary, and the G1/G2/G3/G4 checks (G4's anchored predicate and
its `anchor-relevance` check landed in #63/#64). The one remaining #7 acceptance
box was the design sketch for multi-hop traversal.

Adds docs/sketches/context-neighbors.md (a `context/neighbors { uri, rels, depth }`
envelope pair as a post-1.0 additive minor, defined so `depth: 1` ≡ the G4
anchored set) following the docs/sketches/resolve.md template, and a §8.3
forward-reference in SPEC.md mirroring the §6.4.1 deferral pattern. No wire
change — traversal beyond one hop is explicitly out of scope for the 1.0 freeze.

Closes #7

Claude-Session: https://claude.ai/code/session_01Co9faUWdYC1SPqrof7njyD
#9)

The wire already carried `code: Option<ErrorCode>`; nothing read it. This plumbs
it end to end and tightens the conformance floor:

- ErrorCode gains `unsupported_representation` (§P5) and `incompatible_version`
  (§H3), wired through as_str/From<&str>/reaction(). incompatible_version is
  permanent — a new HostReaction::DropProvider (the request is fine, the provider
  is unusable; distinct from DoNotRetry/Respawn/ReportAndCount).
- HostError::Provider now carries `code`; the four http.rs/stdio.rs error arms
  pass it through instead of discarding it, so FanOut::failures() surfaces it.
- The malformed-input-tolerance conformance check now passes only on a
  `bad_request` code (was: any Envelope::Error), per SPEC.md R1. A new
  `--misbehave mislabel-malformed` mode (answers `internal`) exercises the
  tightened check in conformance-red.sh, with a matching suite test.

Gate green: fmt, clippy -D warnings, test --workspace, conformance-green (12/12),
conformance-red (all misbehave modes caught).

Closes #9

Claude-Session: https://claude.ai/code/session_01Co9faUWdYC1SPqrof7njyD
C7/C8 were specified (§4.2) but listed as a live enforcement gap (§11.1). This
implements them in the reference host:

- C7 (TLS for non-loopback): HttpProvider refuses a plaintext http:// target to
  any non-loopback host with HostError::InsecureTransport, BEFORE the client is
  built or DNS resolves. Loopback (localhost / 127.0.0.0/8 / [::1]) stays exempt
  so the wiremock suite keeps working.
- C8 (credentials never logged): a new Credential type whose Debug AND Display
  both render only "Credential(<redacted>)" (secret reachable only via a
  crate-private expose()); attached via reqwest bearer_auth, never a format
  string. A redaction test asserts no HostError/format string leaks the secret.
- connect_with_auth / Host::add_http take an optional Credential (connect stays
  as a back-compat None wrapper); a 401 surfaces as HostError::Unauthorized.
- SPEC.md §11.1 updated: C7/C8 now enforced + unit-tested at the
  transport-refusal/redaction level; full live-TLS-peer conformance remains the
  stated next increment (unchanged).

Gate green: fmt, clippy -D warnings, test (119 host + 4 new), conformance
green/red, schema validate. wiremock was already a dev-dep.

Closes #13

Claude-Session: https://claude.ai/code/session_01Co9faUWdYC1SPqrof7njyD
…cenarios (#14)

The host-conformance harness gained the two adversarial transport scenarios it
was missing (the primitives already existed in contextgraph-host; this wires
them in as witnessed checks). run_host_conformance now exposes 8 checks:

- host-version-reject (§3 H3, host-side): drives the reference host's handshake
  at a fixture declaring contextgraph/2.0 (mismatched major family), under an
  explicit tokio timeout so "never a hang" is a load-bearing assertion, and
  asserts HostError::VersionMismatch. Distinct from §3's provider-facing
  handshake check (both now named in the H3 "Verified by" cell).
- host-crash-isolation (§11): a query_all fan-out where one provider dies
  mid-query (ProviderCrashed via the BrokenPipe/EOF path) while a healthy peer
  is queried concurrently; asserts the fan-out still completes with the healthy
  frames and the crash is reported + excluded, never poisoning the query.

Each keeps the adversarial+well-behaved-counterpart discrimination pattern, and
both were red-then-green mutation-tested (invert the fixture → check fails).
SPEC.md §11.1 updated to name both host-side scenarios (added to #13's C7/C8
text, not reverting it).

Gate green: fmt, clippy -D warnings, test, host-conformance (8/8),
conformance green/red, schema validate.

Closes #14

Claude-Session: https://claude.ai/code/session_01Co9faUWdYC1SPqrof7njyD
…ick-starts (#17)

Fills the provider-SDK residue (skip Java; publishing is #59):

- HTTP adapter per SDK, mirroring the stdio provider loop as a single-endpoint
  POST handler: createHttpHandler (TypeScript), make_wsgi_app (Python),
  Handler (Go). Each ships a runnable example-docs-http provider that goes green
  under `contextgraph-inspect http` (9 passed / 3 skipped — the 3 skips are the
  harness's stdio-only wire probes, unavoidable over HTTP).
- create-contextgraph-provider: a zero-dep Node CLI with TypeScript + Python
  templates that scaffold a provider wired to both transports PLUS a bundled
  GitHub Actions workflow running contextgraph-inspect against the generated
  provider in its OWN CI from the first commit (the literal acceptance criterion).
- Quick-starts: TS + Python quick-starts, an HTTP-transport section, and a
  scaffold section appended to docs/implementing-a-provider.md and the docs-site
  mirror; HTTP APIs documented in each SDK README.

Validated via the pre-built contextgraph-inspect: TS/Python/Go HTTP all green,
existing stdio conformance still 12/12, both scaffolded templates conformant.
The CI jobs (sdk-*-http, sdk-scaffold) are applied to ci.yml separately.

Closes #17

Claude-Session: https://claude.ai/code/session_01Co9faUWdYC1SPqrof7njyD
…CHANGELOG

- ci.yml: add sdk-typescript-http, sdk-python-http, sdk-go-http (start each
  example server, run `contextgraph-inspect http` against it) and sdk-scaffold
  (generate a provider from create-contextgraph-provider and assert its own
  conformance check passes) for #17. actionlint clean.
- CHANGELOG [Unreleased]: record #9, #13, #14, #17.

Refs #9, #13, #14, #17

Claude-Session: https://claude.ai/code/session_01Co9faUWdYC1SPqrof7njyD
…ency check (#12)

The reference fixture now verifies its own digests end to end, closing the
"stdio fixture" survivor of #12 (the digest grammar + host verify API were
already done):

- The example-docs fixture gains real on-disk backing files
  (fixtures/example-docs/{getting-started,configuration}.md); fixture_digest now
  computes a genuine sha256 over those bytes at runtime and frames carry file://
  provenance, so verify_file_provenance can re-read and re-hash them.
- New provider check `provenance-fixture-consistency`: re-reads each frame's file
  provenance and re-hashes it against the bytes on disk (Verified→pass,
  Mismatch→fail, Unreadable→host-local skip). The suite is now 13 checks.
- New `--misbehave stale-digest` mode emits a WELL-FORMED sha256 (one hex digit
  flipped) that passes F5 grammar and verify-honesty but does not match the real
  bytes — provenance forgery only the new check catches. conformance-red.sh
  auto-discovers it (no script edit).
- sha2 moved from a conformance dev-dep to the workspace 0.10 normal dep (matches
  the host verifier); verify_wire.rs now computes real digests from the files.

Gate green: fmt, clippy -D warnings, test, conformance-green (13/13),
conformance-red (all modes incl. stale-digest), schema validate.

Closes #12

Claude-Session: https://claude.ai/code/session_01Co9faUWdYC1SPqrof7njyD
#12 added the provenance-fixture-consistency check (suite 12→13). Regenerate the
bundled contextgraph-example-docs conformance report from
`contextgraph-inspect stdio --json` and update the registry table to 13/13 so the
listed attestation stays a faithful capture, not a stale claim.

Refs #20, #12

Claude-Session: https://claude.ai/code/session_01Co9faUWdYC1SPqrof7njyD
…tex (#4)

Delivers the demux/pipelining half of ADR 0002 (the correlation-id decision half
already shipped). StdioProvider previously held one mutex across the whole query
round-trip, so concurrent queries serialized even when the provider negotiated
capabilities.correlation.

- The connection is split after handshake into a write-half (stdin mutex), a
  dedicated reader task, and a control handle (StdioControl) that reproduces the
  SHUTDOWN_GRACE + kill_group semantics exactly. RawStdioConnection::into_parts
  moves the fields out without running Drop (ManuallyDrop + one ptr::read per
  field — sound: each read once, destructor suppressed).
- A `pending: HashMap<id, oneshot::Sender>` demuxes replies. query() (correlated)
  registers its oneshot before sending, holds the stdin mutex only for the write,
  then awaits its reply with no lock held — so two queries interleave. Reader
  drains every waiter on EOF/decode/transport error, so a crash fails in-flight
  queries instead of hanging them.
- Non-correlating providers and verify() keep the strict lock-step path
  (exchange_lockstep), provably unchanged. RawStdioConnection's public raw
  send/recv API is byte-for-byte unchanged, so the conformance crate's wire
  probes compile and pass untouched.
- Witness test (ADR 0002): a fixture that reads both queries before answering
  either, then replies to the second FIRST — deadlocks a lock-step transport,
  demuxes correctly here. Ran 15x, no flakes.

Gate green: fmt, clippy -D warnings, test --workspace (+witness), conformance
green (13/13)/red/host, schema validate.

Closes #4

Claude-Session: https://claude.ai/code/session_01Co9faUWdYC1SPqrof7njyD
#15)

Layered on compose_context's byte-stability floor (the injection-escaping half
shipped in #63); this delivers the rest of #15:

- Host::query_all_budgeted splits a global token budget into per-provider shares
  before fan-out, so N honest legs sum to <= the whole budget instead of N x it.
- compose::dedup_cross_provider collapses the same evidence from two providers
  (content_digest match, then uri+range provenance overlap), keeping the
  higher-scored frame and merging provenance.
- order_by_value places the highest-value frames at the top/bottom edges
  (Lost in the Middle, Liu et al. 2024), byte-stable for a fixed set.
- compose_for_prompt returns an injection-resistant fenced prompt with an
  "evidence, not instructions" preamble, a citation map (label -> frame id +
  provenance), and a CompositionAudit that explains every included/excluded frame.
- New host-conformance check host-composition-audit (host suite now 9),
  red-then-green mutation-tested; a property test bounds composed tokens <=
  budget; an injection-corpus test proves no instruction-shaped payload escapes
  the fence. SPEC.md R3 now cites the host checks + the new reference doc.

Gate green: fmt, clippy -D warnings, test --workspace (+property +injection),
conformance green/red, host-conformance (9/9), schema validate.

Closes #15

Claude-Session: https://claude.ai/code/session_01Co9faUWdYC1SPqrof7njyD
Five new publish=false workspace crates, each conformance-green:

#18 — reference providers:
- contextgraph-ripgrep: Snippet frames from a ripgrep/built-in content search
  with real, re-verifiable file provenance.
- contextgraph-treesitter: Symbol + Graph frames (code.defines/calls/imports),
  via a self-contained pure-Rust symbol extractor (no tree-sitter C toolchain).
- contextgraph-refprov: the shared stdio-provider kit both binaries reuse.
Both providers pass all 13 provider checks under conformance-external.sh; git
history episodes deferred as the sanctioned stretch. See docs/reference-providers.md.

#19 — MCP interop, a bridge in each direction:
- contextgraph-mcp-bridge: wraps any MCP resource server as a budgeted, cited,
  consent-gated CGP provider (MCP resources -> Doc/Snippet frames with
  mcp-resource provenance; local file:// resources get a byte-verifiable digest).
  Goes fully conformance-green against a hermetic in-repo MCP fixture — no
  network, no npx.
- contextgraph-mcp-server: exposes a CGP host's fan-out as an MCP
  query_context(goal, budget, kinds) tool returning frames, provenance,
  citations, and a budget audit as structured content. See docs/composition-walkthrough.md.

CI gains reference-provider-ripgrep, reference-provider-treesitter, and mcp-bridge
jobs. No new external dependencies. Full workspace gate green: fmt, clippy
-D warnings, test, conformance green (13/13)/red/host, the three external-provider
suites, and schema validate.

Closes #18
Closes #19

Claude-Session: https://claude.ai/code/session_01Co9faUWdYC1SPqrof7njyD

@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, your pull request is larger than the review limit of 150000 diff characters

Signed-off-by: Mac Anderson <mac@oxagen.sh>
@macanderson
macanderson merged commit 64f2d6b into main Jul 30, 2026
18 of 21 checks passed
@macanderson
macanderson deleted the chore/backlog-sweep-2026-07 branch July 30, 2026 02:10
@sourcery-ai

sourcery-ai Bot commented Jul 30, 2026

Copy link
Copy Markdown

Reviewer's Guide

Introduces a full reference prompt-composition module and global-budgeted fan-out on the host; pipelines the stdio transport with correlation-aware demux; hardens HTTP transport with TLS/credential rules; extends provider and host conformance (including provenance byte checks and composition audit); adds MCP bridges, reference providers, SDK HTTP adapters and scaffolding; and wires new CI and publishing workflows and documentation updates around these features.

Sequence diagram for the pipelined stdio provider with correlation-aware demux

sequenceDiagram
  participant Host
  participant StdioProvider
  participant ReaderTask
  participant Child as ChildProcess

  Host->>StdioProvider: query(query)
  alt capabilities.correlation == false
    StdioProvider->>StdioProvider: exchange_lockstep(Envelope::Query)
    StdioProvider->>Child: write_envelope
    Child-->>ReaderTask: Frames (no id)
    ReaderTask->>StdioProvider: Reply via no_id_slot
    StdioProvider-->>Host: ContextQueryResult
  else correlation enabled
    StdioProvider->>StdioProvider: next_correlation_id
    StdioProvider->>StdioProvider: pending.insert(id, oneshot::Sender)
    StdioProvider->>Child: write_envelope(Envelope::Query{id})
    par reader loop
      loop run_reader
        ReaderTask->>ReaderTask: read_framed_line
        ReaderTask->>ReaderTask: decode_line
        alt Envelope::Frames{id}
          ReaderTask->>StdioProvider: fulfill oneshot::Sender(Ok(Envelope::Frames))
        else error / EOF
          ReaderTask->>StdioProvider: drain_waiters(Err(HostError))
        end
      end
    and reply handling
      StdioProvider-->>Host: ContextQueryResult
    end
  end
Loading

Flow diagram for the new reference prompt composition pipeline

flowchart LR
  Host[Host::query_all_budgeted]
  Budget[compose::budget_split]
  Providers[ContextProvider implementations]
  FanOut[FanOut]
  Compose[compose_for_prompt]
  Dedup[dedup_cross_provider]
  Order[order_by_value]
  Render[render_frame + EVIDENCE_PREAMBLE]
  Output[ComposedPrompt]

  Host --> Budget
  Budget --> Providers
  Providers --> FanOut
  FanOut --> Compose
  Compose --> Dedup
  Dedup --> Order
  Order --> Render
  Render --> Output
Loading

File-Level Changes

Change Details Files
Add reference prompt-composition module and global-budgeted fan-out with a detailed composition audit.
  • Refactor render_frame to use a shared citation_label_for helper and import Provenance.
  • Introduce budget_split to divide a global token budget into per-provider shares for query_all_budgeted.
  • Add dedup_cross_provider and supporting types (Deduped, DedupDrop, Citation, VerificationState, FrameDisposition, CompositionAudit) to collapse cross-provider duplicates while merging provenance.
  • Implement order_by_value and fold_to_edges to place highest-value frames at the top/bottom of the prompt (Lost-in-the-Middle).
  • Add compose_for_prompt to produce a preambled, fenced prompt, citations, and audit over accepted frames and expose these APIs from contextgraph-host.
  • Extend Host and FanOut with query_all_budgeted and compose_for_prompt, plus tests to assert share-splitting and per-leg budget enforcement.
contextgraph-host/src/compose.rs
contextgraph-host/src/host.rs
contextgraph-host/src/lib.rs
Pipeline the stdio transport with correlation-aware demultiplexing and shared framing helpers.
  • Factor shared read_framed_line and write_framed_line helpers and use them from RawStdioConnection and the new StdioProvider reader/writer paths.
  • Split RawStdioConnection into stdin/stdout plus a StdioControl handle via into_parts, moving process-group teardown out of the connection.
  • Redesign StdioProvider to own stdin, a pending table keyed by correlation id, an id-less slot plus lockstep mutex, a control handle, and a reader task that demuxes replies on id.
  • Implement exchange_lockstep for non-correlating queries and verify, preserving strict round-trip semantics for those cases.
  • Add an ADR-0002 witness test that two correlated queries answered out of order are demuxed back to their caller correctly.
contextgraph-host/src/stdio.rs
Harden HTTP transport with TLS/credential rules and bearer auth support, including new HostError variants and unit tests.
  • Introduce a Credential type with redacted Debug/Display and expose-bearer-token helper, and wire it into HttpProvider and Host::add_http.
  • Add is_loopback_host and refuse_insecure_transport to reject plaintext http:// to non-loopback hosts with HostError::InsecureTransport.
  • Extend post_envelope to attach Authorization: Bearer headers and surface HTTP 401 as HostError::Unauthorized, and propagate provider error codes via HostError::Provider.code.
  • Add tests for insecure transport refusal, loopback allowance, bearer header attachment, and credential redaction/HostError string hygiene.
contextgraph-host/src/http.rs
contextgraph-host/src/error.rs
contextgraph-host/src/host.rs
Extend provider and host conformance suites with version-reject, provenance byte-consistency, composition audit, crash isolation, and malformed-input code checks.
  • Add HCHECK_VERSION_REJECT, HCHECK_CRASH_ISOLATION, and HCHECK_COMPOSITION_AUDIT to host_conformance, including fixture-based tests that drive version mismatch and crash-isolation scenarios via StdioProvider and bash scripts.
  • Extend the provider conformance suite with CHECK_PROVENANCE_FIXTURE_CONSISTENCY that re-reads fixture files and re-hashes file provenance via verify_file_provenance, and add a stale-digest misbehave mode to the example provider.
  • Tighten malformed-input-tolerance to require bad_request error codes (not just any error) and add a mislabel-malformed mode and corresponding tests.
  • Update SPEC.md and protocol-surface.md to reflect UR1 naming, H3 host-side check, R3 composition module reference, deferred neighbors operation, and clarified HTTP transport rules.
  • Adjust host_conformance and conformance tests to assert expanded check counts (host: 9, provider: 13) and new check names.
contextgraph-conformance/src/host_conformance.rs
contextgraph-conformance/src/lib.rs
contextgraph-conformance/src/bin/contextgraph-example-docs.rs
contextgraph-conformance/tests/conformance_suite.rs
contextgraph-conformance/tests/host_conformance_suite.rs
contextgraph-conformance/tests/verify_wire.rs
contextgraph-conformance/src/bin/contextgraph-inspect.rs
SPEC.md
docs/protocol-surface.md
docs/context-reuse.md
docs/running-conformance.md
Introduce MCP interop (bridge and server) plus reference providers and shared refprov crate, and wire them into CI.
  • Add contextgraph-refprov crate exposing a shared stdio loop, honest file-backed/derived frame builders, and utilities (sha256, line_range_bytes, walk) for reference providers.
  • Implement contextgraph-ripgrep and contextgraph-treesitter binaries using refprov::FrameSource to serve Snippet and Symbol/Graph frames from fixture/workspace files, with real file provenance and graph relations.
  • Add contextgraph-mcp-bridge (MCP client → CGP provider) and contextgraph-mcp-fixture (local MCP server) crates, plus an end-to-end host integration test that fans out against the bridge and asserts consent gating for remote configuration.
  • Add contextgraph-mcp-server crate that wraps a Host as an MCP server exposing a query_context tool and tests it via JSON-RPC over stdio.
  • Extend CI to run conformance-external against ripgrep/treesitter, the MCP bridge (wrapping the fixture server), and HTTP adapters for all SDKs, and to add downstream-canary and publish-dry-run jobs.
contextgraph-refprov/src/lib.rs
contextgraph-refprov/Cargo.toml
contextgraph-ripgrep/src/main.rs
contextgraph-ripgrep/Cargo.toml
contextgraph-ripgrep/fixtures/reference.md
contextgraph-treesitter/src/main.rs
contextgraph-treesitter/Cargo.toml
contextgraph-treesitter/fixtures/sample.rs
contextgraph-mcp-bridge/src/lib.rs
contextgraph-mcp-bridge/src/bin/contextgraph-mcp-bridge.rs
contextgraph-mcp-bridge/src/bin/contextgraph-mcp-fixture.rs
contextgraph-mcp-bridge/tests/bridge_via_host.rs
contextgraph-mcp-bridge/Cargo.toml
contextgraph-mcp-server/src/lib.rs
contextgraph-mcp-server/src/bin/contextgraph-mcp-server.rs
contextgraph-mcp-server/tests/smoke.rs
contextgraph-mcp-server/Cargo.toml
.github/workflows/ci.yml
.github/workflows/downstream-canary.yml
.github/workflows/release.yml
.github/scripts/downstream-canary-stella.sh
.github/scripts/wait-for-crate.sh
Enhance SDKs and scaffolding with HTTP adapters, CLI scaffolder, and README updates.
  • Export HTTP helpers from the TypeScript SDK (handleEnvelope, respondToEnvelopeBody, createHttpHandler) and add an HTTP example provider, plus documentation in README and implementing-a-provider docs.
  • Add HTTP adapter functions to the Python SDK (handle_envelope, respond_to_body, make_wsgi_app) and an example_docs_http WSGI server, with README updates mirroring TS.
  • Expose an HTTP handler in the Go SDK and add an example HTTP provider, with README and CI wiring to run contextgraph-inspect http against it.
  • Introduce the create-contextgraph-provider scaffold CLI with TypeScript/Python templates, scripts, and GitHub Actions workflows that run contextgraph-inspect in generated projects; wire a CI job to scaffold and test both languages.
  • Update docs (implementing-a-provider, site docs index, sdk/README) to advertise SDKs, HTTP adapters, and scaffolding, and clarify publishing status in SDK READMEs.
sdk/typescript/src/http.ts
sdk/typescript/src/index.ts
sdk/typescript/examples/example-docs-http.ts
sdk/typescript/README.md
sdk/python/contextgraph_sdk/http.py
sdk/python/contextgraph_sdk/__init__.py
sdk/python/examples/example_docs_http.py
sdk/python/README.md
sdk/go/contextgraph/http.go
sdk/go/examples/example-docs-http/main.go
sdk/go/README.md
sdk/create-contextgraph-provider/index.js
sdk/create-contextgraph-provider/package.json
sdk/create-contextgraph-provider/templates/**
sdk/README.md
docs/implementing-a-provider.md
site/content/docs/implementing-a-provider.mdx
.github/workflows/ci.yml
sdk/PUBLISHING.md
Add conformance registry, publishing prep, badges, and documentation cross-links.
  • Introduce docs/registry.md and site/content/docs/registry.mdx plus a static conformant.svg badge and PULL_REQUEST_TEMPLATE registry submission checklist.
  • Add crates.io and docs.rs badges to the root README and crate READMEs, and clarify that they read 'not found' until the first publish.
  • Add PUBLISHING.md for crates and sdk/PUBLISHING.md for SDKs, plus a publish-dry-run CI job and a tag-triggered release workflow guarded by a crates-io environment.
  • Update docs index pages to link to new composition, reference providers, composition/MCP walkthrough, and registry docs, and add sketches/context-neighbors.md.
  • Clarify downstream canary behavior in ADR 0007 and adaptive-context-reconciliation docs, making it advisory, not gating.
docs/registry.md
site/content/docs/registry.mdx
site/public/badges/conformant.svg
.github/PULL_REQUEST_TEMPLATE.md
README.md
contextgraph-types/README.md
contextgraph-host/README.md
contextgraph-conformance/README.md
PUBLISHING.md
sdk/PUBLISHING.md
docs/index.md
site/content/docs/index.mdx
docs/composing-frames-into-a-prompt.md
docs/composition-walkthrough.md
docs/sketches/context-neighbors.md
docs/adaptive-context-reconciliation.md
docs/adr/0007-protocol-product-boundary.md
.github/workflows/ci.yml

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 that referenced this pull request Jul 30, 2026
Resolves the conflicts on PR #69. Most of this branch had already landed on
main via #66 and #67, so the merge is mainly about keeping what is genuinely
new (#28, #21, #2) and taking main's side everywhere #68 made a decision.

Resolution rules applied:

- site/ is retired (ADR 0008, #68). All nine modify/delete conflicts under
  site/ take main's deletion; the branch's edits to the .mdx mirrors and to
  site/public/schema/ are dropped rather than resurrected. tests/
  docs_site_witness_test.py goes with it — it asserted the site mirrored the
  markdown docs.
- Advertised artifact URLs take main's rewrite: cgp.oxagen.sh/badges/... and
  site/public/... become the GitHub-raw paths that check-deploy-hygiene.py
  enforces. This covers the three SDK READMEs, docs/registry.md,
  docs/implementing-a-provider.md and the CHANGELOG entry for #20.
- The CGP abbreviation convention (#21) is kept where it does not collide with
  the above: docs/index.md, docs/composition-walkthrough.md, and the
  "CGP maintainers" cell in the registry table now sit on top of main's paths.
- .github/workflows/ci.yml: the branch's publish-dry-run job is dropped
  because main already carries it (via #66) — keeping both would have created
  a duplicate YAML job key. The branch's `site: docs site builds` job is
  dropped for the same reason site/ is; main's deploy-hygiene job stands.
- schema/validate-examples.py keeps the new lifecycle-record section (#28) —
  13 fixtures plus the detached attestation — with its site/public/schema/
  mirror checks removed, since there is no second copy to keep in sync.
- docs/profiles/context-exchange-provider.md LF2 is restated: the normative
  MUST was a byte-identical site/public/schema/ mirror enforced by a check
  that no longer exists. It now pins the $id to GitHub-raw per ADR 0008. This
  was in cleanly auto-merged text, so git did not flag it.

Net contribution over main after the merge is 34 files / +2,507: the Context
Exchange Provider lifecycle profile (#28), the CGP abbreviation pass (#21),
and the README CI badge (#2 partial).

Verified: cargo fmt --check, cargo test --workspace --all-features,
cargo clippy -D warnings, python3 schema/validate-examples.py (all examples
validate), python3 .github/scripts/check-deploy-hygiene.py (deploy hygiene
holds), and all relative links in 58 markdown files resolve.

Claude-Session: https://claude.ai/code/session_014H5SE4vnAP4Nw1MBMHfUpt
macanderson added a commit that referenced this pull request Jul 30, 2026
Resolves the conflicts on PR #69. Most of this branch had already landed on
main via #66 and #67, so the merge is mainly about keeping what is genuinely
new (#28, #21, #2) and taking main's side everywhere #68 made a decision.

Resolution rules applied:

- site/ is retired (ADR 0008, #68). All nine modify/delete conflicts under
  site/ take main's deletion; the branch's edits to the .mdx mirrors and to
  site/public/schema/ are dropped rather than resurrected. tests/
  docs_site_witness_test.py goes with it — it asserted the site mirrored the
  markdown docs.
- Advertised artifact URLs take main's rewrite: cgp.oxagen.sh/badges/... and
  site/public/... become the GitHub-raw paths that check-deploy-hygiene.py
  enforces. This covers the three SDK READMEs, docs/registry.md,
  docs/implementing-a-provider.md and the CHANGELOG entry for #20.
- The CGP abbreviation convention (#21) is kept where it does not collide with
  the above: docs/index.md, docs/composition-walkthrough.md, and the
  "CGP maintainers" cell in the registry table now sit on top of main's paths.
- .github/workflows/ci.yml: the branch's publish-dry-run job is dropped
  because main already carries it (via #66) — keeping both would have created
  a duplicate YAML job key. The branch's `site: docs site builds` job is
  dropped for the same reason site/ is; main's deploy-hygiene job stands.
- schema/validate-examples.py keeps the new lifecycle-record section (#28) —
  13 fixtures plus the detached attestation — with its site/public/schema/
  mirror checks removed, since there is no second copy to keep in sync.
- docs/profiles/context-exchange-provider.md LF2 is restated: the normative
  MUST was a byte-identical site/public/schema/ mirror enforced by a check
  that no longer exists. It now pins the $id to GitHub-raw per ADR 0008. This
  was in cleanly auto-merged text, so git did not flag it.

Net contribution over main after the merge is 34 files / +2,507: the Context
Exchange Provider lifecycle profile (#28), the CGP abbreviation pass (#21),
and the README CI badge (#2 partial).

Verified: cargo fmt --check, cargo test --workspace --all-features,
cargo clippy -D warnings, python3 schema/validate-examples.py (all examples
validate), python3 .github/scripts/check-deploy-hygiene.py (deploy hygiene
holds), and all relative links in 58 markdown files resolve.
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