Skip to content

Complete Compass scoping and bounds phase - #306

Closed
GQAdonis wants to merge 9 commits into
crabbuild:mainfrom
GQAdonis:docs/claude-md
Closed

Complete Compass scoping and bounds phase#306
GQAdonis wants to merge 9 commits into
crabbuild:mainfrom
GQAdonis:docs/claude-md

Conversation

@GQAdonis

Copy link
Copy Markdown

Summary

Completes the Compass scoping-and-bounds phase and integrates the current release line. The change delivers bounded discovery and query contracts, segmented snapshot publication, PR intelligence and task-context workflows, expanded agent distribution support, low-inference graph normalization, viewer workbench updates, and current MCP 2026-07-28 behavior.

It also establishes the immutable phase-first development doctrine in AGENTS.md and CLAUDE.md: complete implementation before compilation/testing, full integration tests as correctness evidence, serialized Cargo ownership, and smaller development profiles/artifacts.

Motivation

This phase closes the planned scoping, bounded-work, storage, query, MCP, and agent-harness contracts while preserving deterministic publication and compatibility boundaries. C-011 was accepted for the Surreal dual-engine licensing decision. C-010 uses the latest MCP stack (rmcp 3.1.4 and protocol 2026-07-28).

Verification

PASS cargo test --workspace --test '*' --locked
PASS cargo fmt --all -- --check
PASS cargo clippy --workspace --lib --bins --locked -- -D warnings
PASS sh scripts/check_product_boundary.sh
PASS ./scripts/qualify_code_graph_v1.sh --fixtures-only
PASS COMPASS_BIN=target/debug/compass ./scripts/qualify_mcp_conformance.sh
PASS ./scripts/qualify_harness_packages.sh --compass target/debug/compass
PASS node scripts/check_viewer_assets.mjs
PASS npm run typecheck:js
PASS openspec validate --all --strict

npm run test:js was intentionally not run because the repository's phase doctrine accepts full integration suites—not unit-test harnesses—as correctness evidence. Browser integration changes remain covered by the checked-in integration specifications and deterministic asset/type gates.

Compatibility and documentation

Public command, MCP, query, snapshot, history, viewer, security, performance, and migration documentation is updated. Unknown MCP resources now return -32602 with the requested URI in error data. The latest MCP conformance baseline passes; its remaining diagnostic probes are the repository's explicitly documented expected failures.

Checklist

  • The change is focused and excludes unrelated formatting or generated files
  • Tests cover changed behavior, or this pull request changes documentation only
  • User-facing commands, flags, limits, and examples are documented
  • Compatibility or migration effects are described
  • No credentials, private source code, or sensitive report details are included
  • I agree to license my contribution under MIT OR Apache-2.0
  • I followed the Compass code of conduct

Co-Authored-By: Warp agent@warp.dev

GQAdonis and others added 8 commits August 9, 2026 05:52
Add a repository-level CLAUDE.md for Claude Code that defers to AGENTS.md
as the authoritative operating guide and covers the mechanics it leaves
implicit:

- the mandatory per-invocation CARGO_TARGET_DIR requirement, including the
  Makefile targets that resolve binaries through a literal target/ path;
- narrow-loop and baseline Rust commands, surface-specific gates, and the
  npm workspace commands for the viewer and VS Code extension;
- the one-directional build pipeline across compass-files, -languages,
  -resolve, -graph, and -model, with the extractor/resolver evidence
  boundary and the compass-cypher/compass-query syntax-vs-execution split;
- enforced workspace constraints (lint set, determinism, boundedness) and
  the compatibility-sensitive surfaces.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Track the .prometheus/knowledge/wiki/ session records so the knowledge
content lives with the repository.

Initialize OpenSpec (schema: spec-driven) with generated configuration for
Claude Code, Codex, Kimi CLI, and OpenCode. Zed was requested but is not a
supported `openspec init` target, so it has no generated configuration.

Kimi receives skills only; OpenSpec reports no command adapter for it.
The local .claude/settings.local.json permission allowlist is intentionally
left untracked.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Add the KBD orchestrator state for the compass-scoping-and-bounds phase and
track the accumulated Prometheus session knowledge.

.kbd-orchestrator/:
- project.json and constraints.md generated by /kbd-init, with the AGENTS.md
  CARGO_TARGET_DIR requirement applied to every compiling command;
- phase artifacts for compass-scoping-and-bounds — assessment, analysis,
  spec, plan, goals, decision log, stage handoffs, and the library-candidates
  and tasks machine contracts;
- current-waypoint at plan_ready with 6 registered changes.

The phase investigates a 2 GiB canonical graph publication failure. It
establishes that scoping already ships and works, that PartitionedGraph
already exists in compass-history, and that the operative defect is
read_snapshot materializing a payload no production caller reads.

.prometheus/:
- session wiki transcripts and update log;
- events.jsonl and prompt snapshots.

AGENTS.md gains a Prometheus state ownership rule classifying
.prometheus/knowledge/wiki/** as repository-owned tracked content and every
other .prometheus/** path as local runtime state.

The local .claude/settings.local.json permission allowlist remains untracked.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
AGENTS.md mandated that every compiling Cargo command set CARGO_TARGET_DIR
beneath /Volumes/Workspace/crabbuild-target, and stop rather than fall back to
a local target/ when that volume was absent. The path describes one
contributor's machine; it is not a property of the project. On any checkout
without that volume the rule blocks all verification.

Introduced in dd14b3c ("docs: add AI contributor guidance"). Still present
upstream on crabbuild/compass at merge time.

Two of the references were executable, not advisory:

- scripts/qualify_compass_store_release.sh hard-failed with exit 1 unless
  /Volumes/Workspace was mounted and writable, making the store qualification
  gate unrunnable elsewhere;
- both qualification scripts defaulted CARGO_TARGET_DIR to that path, silently
  writing outside the checkout.

Replace the mandate with environment-neutral guidance that keeps the useful
parts — per-checkout target directories, CARGO_TARGET_DIR not persisting
between invocations, external qualification repositories treated as read-only.
Scripts now honor CARGO_TARGET_DIR when set and fall back to the checkout's own
target directory. Documentation uses <cargo-target-dir> and
<qualification-corpus-root> placeholders.

Regenerates the KBD orchestrator commands and clears the phase artifacts'
environment blocker, which derived from the removed rule.

Historical .prometheus session transcripts are left unmodified; they record
what was true when written.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Implement the full phase across bounded graph storage and query contracts, latest MCP conformance, native agent distribution, installed harness qualification, and phase-first build policy.

Co-Authored-By: Warp <agent@warp.dev>
Resolve mainline integration across discovery, storage, MCP, and agent distribution contracts.

Co-Authored-By: Warp <agent@warp.dev>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Aug 29, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-08-29T21:39:41.145529Z dc8e034 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: dc8e034a41

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +206 to +207
if self.node_count > GRAPH_SNAPSHOT_MAX_ITEMS as u64
|| self.edge_count > GRAPH_SNAPSHOT_MAX_ITEMS as u64

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Keep materialization limits out of snapshot publication

Remove this aggregate record-count check from the publication/open path. When a graph has more than 5,000,000 nodes or edges, finish_content, activation, and open_active now reject it, even though GRAPH_SNAPSHOT_MAX_ITEMS is explicitly documented as a per-materialized-read limit and current graph-index snapshots are documented as having no aggregate record-count cap. This regresses large graph publication and also makes previously valid snapshots unreadable; enforce the cap only on operations that materialize a whole response.

Useful? React with 👍 / 👎.

Comment on lines +1757 to +1761
pub fn open_selector_for_maintenance(
store: &'a S,
selector: SnapshotSelector,
) -> Result<Self, SnapshotError> {
Self::open_selector_with_policy(store, selector, false)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Route snapshot GC through the maintenance opener

Use this maintenance path from garbage_collect_graph_snapshots. If a retained snapshot was published with a higher COMPASS_MAX_GRAPH_BYTES value and a later process runs under the default/lower bound, GC still calls open_selector at line 1590, which applies the current materialization ceiling and aborts the otherwise bounded reachability pass. The new opener bypasses precisely that irrelevant whole-graph limit, but currently only store validation uses it.

Useful? React with 👍 / 👎.

Comment on lines +2441 to +2445
installs.push(install_skill_package_at_scoped(
focused_destination,
consumers.clone(),
scope,
root,

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Publish the focused skill collection atomically

Stage or roll back the whole sibling collection rather than committing each package inside this loop. If any later focused package fails to stage or rename—for example because of an I/O error after the umbrella or earlier focused skills were activated—the ? returns an installation failure while leaving a partially upgraded collection on disk. A retry may observe mixed manifests and doctor can report checksum failures; capture and restore all prior directories or atomically swap one staged collection.

AGENTS.md reference: AGENTS.md:L143-L145

Useful? React with 👍 / 👎.

Comment on lines +468 to +470
if existing.complete {
validate_candidate(database, plan).await?;
upsert_pointer(database, plan).await?;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Validate complete generation payloads before reactivation

Validate the stored records, not just their identity lists, before moving the active pointer. If a completed generation's payloadJson or projected fields are altered while its Compass node/edge IDs remain unchanged, validate_candidate succeeds because it compares only ID vectors, and this branch reactivates the generation; native queries then decode those altered payloads without recomputing the projection fingerprint. Compare the bounded stored records or per-record digests against the supplied plan before upsert_pointer.

AGENTS.md reference: AGENTS.md:L141-L145

Useful? React with 👍 / 👎.

Resolve upstream integration across graph, history, MCP, language, distribution, and qualification contracts.

Co-Authored-By: Warp <agent@warp.dev>
@GQAdonis

Copy link
Copy Markdown
Author

Closing because this branch is intended to merge into the fork's main branch. The correct PR is GQAdonis#1: GQAdonis#1

@GQAdonis GQAdonis closed this Aug 30, 2026
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