Skip to content

feat: registry consolidation — context / start / join (3.3.0) - #34

Merged
ashmitb95 merged 12 commits into
mainfrom
feat/registry-consolidation
Jul 4, 2026
Merged

feat: registry consolidation — context / start / join (3.3.0)#34
ashmitb95 merged 12 commits into
mainfrom
feat/registry-consolidation

Conversation

@ashmitb95

Copy link
Copy Markdown
Owner

What

Canopy 4.0 phase 3: one registry read (context) and a lazy-growth write path (start + join) so the feature ↔ repo ↔ branch ↔ path ↔ PR ↔ state map is a single source of truth the agent consults. Additive only — nothing removed from the MCP surface (that's phase 5).

Design spec: ~/.claude/plans/2026-07-04-phase3-registry-design.md.

context — the registry read (two intent-selected tiers)

  • Tier 1 (default, ZERO network): workspace + per-feature repo/branch/path + local git state (dirty, local divergence) + slots + advisories + cwd-detected position. Authoritative for "where am I / what's my code state." A test asserts it makes no network call.
  • Tier 2 (--remote / remote=True): live PR review state + CI checks_summary + origin divergence, fetched at call time; falls back to prs.json cache flagged stale + fetched_at when GitHub is unreachable.
  • The seam is honest: only PR/CI/origin-divergence cost a round-trip, so the common local read is instant. Absorbs the old debug context (now a superset) and supersedes workspace_context.

start <alias> — begin new work (lazy)

Resolves the issue provider best-effort, creates the feature with zero repos (partial-scope is first-class), marks it active. Idempotent (existing feature resumes).

canopy join <repo> — lazy repo join

Creates/adopts the active feature's branch in a repo, registers it, and promotes the feature to slots.canonical so the shipped enforcement gate recognizes commits there (preserving warm slots). This is the explicit write that keeps the registry truthful.

Observe-as-advisory

context and the SessionStart brief surface repos sitting on a feature branch that were never join-ed (unregistered_join_candidate) — closing the raw-git checkout -b gap without ever auto-writing or blocking.

Correctness

  • Milestone review (no blocking defects) + fix round: worktree zero-repo guard, join GitError→BlockerError, stale.fetched_at, and the CI checks_summary the design promised.
  • Fixed a shared-method landmine: coordinator.create now treats repos=None as all-repos and repos=[] as none (was repos or [...]), with a guard against a vacuous "all failed" raise on zero-repo create.

Tests

973 passed. New: test_registry, test_start, test_join, test_advisories, test_prs_cache, test_active + brief/coordinator extensions.

Version

3.3.0 (CHANGELOG updated). workspace_context MCP tool deprecated (removed in phase 5).

@ashmitb95
ashmitb95 merged commit ef040c7 into main Jul 4, 2026
3 checks passed
@ashmitb95
ashmitb95 deleted the feat/registry-consolidation branch July 4, 2026 07:52
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