feat(protocol): rename ingest.* + grounding.* to match categorized namespace (Phase 2c-2c)#505
Merged
Merged
Conversation
…mespace (Phase 2c-2c) Third in the daemon-as-process arc (plan: thoughts/shared/plans/ 2026-05-22-daemon-as-process-arc.md). Aligns the wire method names on ProtocolClient and daemon.runtime with the categorized prefixes that Phase 2c-1 (#500) locked in. Without this, the facade quietly drifts from the namespace it's supposed to enforce — call sites in Phase 2c-4+ would either inherit the drift or ship two renames in one PR. Renames: - ingest.ingest → write.ingest - ingest.link_commit → write.link_commit - grounding.validate_symbols → grounding.lookup.validate_symbols - grounding.extract_symbols → grounding.lookup.extract_symbols - grounding.get_neighbors → grounding.lookup.get_neighbors - grounding.analyze_region → grounding.analyze.region - grounding.batch_analyze_regions → grounding.analyze.batch Updated: - protocol/client.py — 7 facade method strings - daemon/runtime.py — 2 server-side registrations - tests/test_protocol_versioning.py — test stub - tests/test_protocol_transport_uds.py — test stub New: tests/test_protocol_namespace_invariant.py — 3 invariants: - ProtocolClient method-name strings match a categorized prefix (AST-walk) - daemon.runtime registrations match a categorized prefix - WIRE_METHOD_ALLOWLIST stays fresh (no dead entries) Open question deferred: egress.deliver still lives under egress.*. The 2c-1 categorization didn't include EGRESS_PREFIX; adding one vs renaming egress.deliver → write.deliver is its own design call. Added to the allowlist with a comment explaining the gap. Will surface in PR body. Bicameral preflight UNAVAILABLE this session (MCP server disconnected) — will validate against ledger before 2c-3. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
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.
Summary
Third in the daemon-as-process arc (plan). Aligns wire method names on
ProtocolClientanddaemon.runtimewith the categorized prefixes that Phase 2c-1 (#500) locked in.Without this, the facade quietly drifts from the namespace it's supposed to enforce — call sites in 2c-4+ would either inherit the drift or ship two renames in one PR. Better to do it now while the surface is small.
Renames
ingest.ingestwrite.ingestingest.link_commitwrite.link_commitgrounding.validate_symbolsgrounding.lookup.validate_symbolsgrounding.extract_symbolsgrounding.lookup.extract_symbolsgrounding.get_neighborsgrounding.lookup.get_neighborsgrounding.analyze_regiongrounding.analyze.regiongrounding.batch_analyze_regionsgrounding.analyze.batchFiles touched
protocol/client.py— 7 facade method stringsdaemon/runtime.py— 2 server-side registrationstests/test_protocol_versioning.py— test stub registrationtests/test_protocol_transport_uds.py— test stub registrationtests/test_protocol_namespace_invariant.py(new) — 3 invariants:ProtocolClientmatches a categorized prefix or the explicit allowlist (AST-walked).register(...)call indaemon.runtimematches the same.WIRE_METHOD_ALLOWLISTentries are still referenced somewhere (catches dead entries).Open question — please weigh in
egress.deliveris NOT renamed in this PR. It sits on the explicit allowlist with a comment. The 2c-1 categorization committed to five prefixes (read.*,write.*,grounding.lookup.*,grounding.analyze.*,system.*); egress is implicit in the parent plan but not explicit. Three options for follow-up:EGRESS_PREFIX = "egress."to the categorization — egress is conceptually distinct (outbound delivery, not ledger mutation). Adds a sixth category +@egress_tooldecorator. Symmetric withIngestAdapter/EgressAdapterProtocols.egress.deliver→write.deliver— conflates ledger mutation with delivery semantics; I'd push back on this, but it keeps the namespace at 5.egress.*actually grows beyonddeliver(today it's a single method).My recommendation: Option 1, do it in 2c-3. The daemon supervisor PR is the natural time to expand the categorization since it's also when egress dispatch first runs for real.
Compatibility
Breaking at the wire level if anything outside this repo speaks the protocol — but nothing does yet. The protocol is in-tree pre-extraction; only
ProtocolClient(which this PR updates) anddaemon.runtime(which this PR updates) reference the names.Test plan
pytest tests/test_protocol_namespace_invariant.py— 3 passingpytest tests/test_protocol_*.py tests/test_mcp_adapter_bootstrap.py— 36 passing (no regressions)ruff format --check . && ruff check .cleanmypy protocol/ daemon/cleanKnown limitation
Bicameral preflight unavailable this session (MCP server disconnected). Will validate against the ledger before opening 2c-3 (daemon supervisor).
Plan refs
thoughts/shared/plans/2026-05-22-daemon-as-process-arc.md🤖 Generated with Claude Code