D-TEH-1: move bridge_gate to lance-graph-contract; callcenter drops its thinking-engine dependency - #1139
Conversation
…ts thinking-engine dependency First code wave of thinking-engine-harvest-closure-v1 (W1). The zero-dep cross-tenant authorization contract — CognitiveOpKind, CognitiveAuthResult, CognitiveBridgeError, auth_to_result, the CognitiveBridgeGate trait, PassthroughGate, DenyAllGate — moves from thinking_engine::bridge_gate to lance_graph_contract::bridge_gate as one module with identical shapes and its 9 unit tests. thinking-engine keeps a pub-use shim so every old path resolves, and keeps the engine-side pure_ops_dont_touch_gate test next to the lens modules it calls. lance-graph-callcenter re-imports from the contract at both sites and its pure_ops_emit_zero_audit_events test now exercises the crate's own gate-free helpers (prefetch_from_u8 over every depth, auth_to_result over every verdict, the verdict predicates) with the real sink and counter still asserted at zero; the four thinking-engine lens lookups are gone. The path dependency is removed. Falsifier: with the dependency line removed and nothing else changed, callcenter fails at exactly the six crossing sites (E0433 x6). After the move it builds and passes 156/156. Verified: contract 1303/1303; callcenter 156/156 (named test green); clippy -D warnings clean on both crates; fmt clean; cognitive-shader- driver builds default and with-engine; thinking-engine lib builds and the shim test passes; cargo metadata shows no thinking-engine dependency for callcenter; git diff is empty on dto.rs, engine_bridge.rs, cognitive_shader.rs, mailbox_soa.rs and the driver manifest (the ALU artery is untouched). Not done by stop condition: re-pointing the driver's with-engine edge waits on D-TTV-1 (Queued); the engine hook still lives in thinking-engine. Board: LATEST_STATE inventory delta, PR_ARC entry, STATUS_BOARD D-TEH-1 Shipped, closure plan W1 + D-TEH-1 rows, SUPERSESSION-INDEX regenerated. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PFnYKqw6d7TTiB9cT8eFdK
Bugbot couldn't run - usage limit reachedBugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit. A user or team admin can review and increase usage limits in the Cursor dashboard. (requestId: serverGenReqId_054892f7-0771-4a9f-abf2-e967de4929ad) |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Essentials Run ID: 📒 Files selected for processing (10)
Included review availability: 0 reviews are currently available. Your included PR review attempts over the past 7 days set your current allowance at 1 review per hour. 📝 WalkthroughWalkthroughThe bridge gate contract moved from ChangesBridge gate migration
Estimated code review effort: 3 (Moderate) | ~25 minutes Merge Risk: ⚪ Minimal · up to The change relocates the bridge-gate contract while preserving compatibility and removes the callcenter's engine dependency; no actionable merge-blocking risk remains after normal checks and review. Suggested reviewers: Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 90.91% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 22 functions across 5 files. (5 skipped: 5 unsupported.) ✨ Finishing Touches📝 Generate docstrings
Comment |
GitHub reported #1140 in conflict after main moved 7 commits (#1138/#1139). The local three-way merge is CLEAN — GitHub's detector is more conservative than git's on two-sided prepends to the same append-only board file. Verified on the merged tree rather than assumed: - EPIPHANIES.md: 25344 lines >= both parents (25319 / 25291); my entry present exactly once; main's three newest headings present exactly once each; newest-first order preserved. - main touched none of the files this branch changes (jc/, sigker/, .cargo/, TECH_DEBT.md); its ec62e98 moves bridge_gate into lance-graph-contract. - Supersession index regenerated on the MERGED board: byte-identical, current. - jc release: 127 + 13 tests green. lance-graph-contract release: 1302 green. Merge, not rebase: the branch's five commits are under review and the operator ruled no force-push on it. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KCGhDYoQBXs3poaR7sFuqp
First code wave of
thinking-engine-harvest-closure-v1(W1), after #1138. One commit (ec62e98). Cuts the one REQUIRED dependency around the ALU artery without touching the artery.What moved
thinking_engine::bridge_gate→lance_graph_contract::bridge_gate, as one module with identical shapes, all seven public items together:CognitiveOpKind,CognitiveAuthResult(+is_allowed/is_denied),CognitiveBridgeError,auth_to_result, theCognitiveBridgeGate: Send + Synctrait,PassthroughGate,DenyAllGate. Zero-dep (std only). Its 9 unit tests moved with it.thinking_engine::bridge_gateis now apub useshim so every old path still resolves; the engine-sidepure_ops_dont_touch_gatetest stays there, next to the lens modules it calls.Consumer rewrite
lance-graph-callcenter/src/cognitive_bridge_gate.rs: both import sites →lance_graph_contract::bridge_gate.pure_ops_emit_zero_audit_events: the four thinking-engine lens lookups are replaced by the crate's own gate-free helpers (prefetch_from_u8over every depth,auth_to_resultover every verdict, the verdict predicates); the realRecordingSinkand the Chinese-wall counter are still asserted at zero, so the test measures a real sink, not the absence of a gate. The doc comment names where the engine-side half of the claim now lives.lance-graph-callcenter/Cargo.toml: thethinking-enginepath dependency removed; three doc comments updated.Falsifier (run before the rewrite)
With ONLY the dependency line removed,
cargo check -p lance-graph-callcenter --all-targetsfails with exactly sixE0433at the six crossing sites (2 imports, 4 lens calls). After the move it builds and passes.Measured dependency edge
cargo metadatacallcenter deps containingthinking['thinking-engine'][]with-engine, optional)with-engineonly (the ALU's engine hook)Verification
bridge_gatemodule 9/9)pure_ops_emit_zero_audit_eventsgreencargo clippy -p lance-graph-contract -p lance-graph-callcenter --all-targets -- -D warningsclean;cargo fmtcleancognitive-shader-driver: default build green;--features with-enginebuild green--manifest-path): lib builds; shim test 1/1git diffonthinking-engine/src/dto.rs,cognitive-shader-driver/src/engine_bridge.rs,contract/src/cognitive_shader.rs,mailbox_soa.rs, and the driver manifest.StreamDto/PerturbationDto/BusDto/ThoughtStructand theengine_bridgemappings are byte-identical.thinking_engine::reference remains in callcenter source (comments only); everybridge_gate::importer resolves to the contract.Stop condition honoured
Step 6 (re-point the driver's
with-engineedge) is NOT done: D-TTV-1 is Queued and the engine hook still lives in thinking-engine, so there is nothing to re-point it at. No D-TEH-2..5, D-HOUSE-1, D-ARW, ghost harvest, calibration migration, M8 or crate retirement started.Board
LATEST_STATE contract-inventory delta; PR_ARC entry; STATUS_BOARD D-TEH-1 → Shipped with the before/after edge; closure plan W1 + D-TEH-1 rows; SUPERSESSION-INDEX regenerated last. An unrelated
crates/thinking-engine/Cargo.lockchurn produced by the standalone build was reverted, not committed.🤖 Generated with Claude Code
https://claude.ai/code/session_01PFnYKqw6d7TTiB9cT8eFdK
Generated by Claude Code
Summary by CodeRabbit
New Features
Compatibility
Bug Fixes
Tests