feat(handlers): mutation writes routed through DaemonProxy (Phase 2c-6c)#516
feat(handlers): mutation writes routed through DaemonProxy (Phase 2c-6c)#516jinhongkuan wants to merge 1 commit into
Conversation
|
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 |
|
@jinhongkuan — the three skipped ratify boundary tests ( Also: only Schema Persistence + CodeRabbit ran on this PR. Full MCP Regression / lint / perf gate didn't fire. PR body mentions "merging on lint-only" — confirming that's still the intent here? |
Adds RatifyRequest/Result, ResolveComplianceRequest/Result, ResolveCollisionRequest/Result, JudgeGapsRequest/Result protocol contracts. Wires write.ratify, write.resolve_compliance, write.resolve_collision, write.judge_gaps server-side dispatchers in protocol/handlers/writes.py. Adds matching DaemonProxy methods. Migrates four handlers/*.py call-sites (ratify, resolve_compliance, resolve_collision, gap_judge) to the facade/_impl pattern with daemon routing when ctx.daemon is reachable. Boundary tests cover dispatcher registration, missing-descriptor error, empty/error paths for each method. Three end-to-end ratify tests (seed-then-ratify, idempotent, concurrent) are skipped with a clear "requires Phase 2c-6b" reason — they need shared ledger state between the test process and the daemon subprocess, which is unblocked once write.ingest can seed through the daemon. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
4ad244f to
1e34159
Compare
|
Closing during PR hygiene because this branch is stale/conflicting and should not be merged as a lint-only daemon migration. The daemon write-routing direction can continue only behind an explicit experimental or disabled-by-default path until the end-to-end ratify/write boundary is testable. Re-cut from current dev if needed, link the daemon epic, and include deterministic coverage proving production mutation writes cannot be affected accidentally. |
Summary
Phase 2c-6c — third write-migration layer. Adds protocol surface + dispatcher + proxy methods for the four mutation handlers (ratify, resolve_compliance, resolve_collision, judge_gaps). Each gets the standard facade/_impl split.
Plan refs
Test plan
Skipped tests
Three end-to-end ratify boundary tests (`test_ratify_through_daemon`, `test_ratify_idempotent_through_daemon`, `test_concurrent_ratify_serializes_through_daemon`) are intentionally skipped — they require seeding a decision in a ledger shared between the test process and the daemon subprocess, which is unblocked once Phase 2c-6b lands `write.ingest`. Skip-reasons cite the dependency explicitly.
🤖 Generated with Claude Code