capability_registry: generic hot-plug resolution (classid -> vocab + actions)#175
Conversation
…actions)
The migration target for EVERY consumer (operator ruling): the consumer
declares which classids it hot-plugs + which capabilities its executor
covers; resolve_hotplug verifies and returns BOTH the vocab rows and
the action surface for exactly those ids. Domain tables register in
domain_tables() -- append-only; the thinking-styles table adds one
entry and is instantly hot-pluggable. Drift arms: UnknownClassid /
NoCapabilitiesFor ("the table was forgotten") / UnexpectedConsumer /
Uncovered / Undeclared -- each one named bang, classid is the join key
on both sides. The per-registration verify_registration path stays for
now; consumers migrate to resolve_hotplug (tesseract-rs first).
Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016b33swuXE23hKtqxsHu9p1
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_e95c72e0-1ddc-49dd-a225-23a643c0f664) |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e096f77a64
ℹ️ 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".
| .next() | ||
| .unwrap_or_default() | ||
| .to_string(); | ||
| let id = crate::canonical_concept_id(&concept).unwrap_or_default(); |
There was a problem hiding this comment.
Reject unmapped table subjects
When a domain action's object_class suffix no longer resolves to a canonical concept (for example, an OCR subject is renamed or typoed), this falls back to classid 0 instead of failing. resolve_hotplug only matches requested minted classids, so that malformed capability is silently omitted; if the requested classid still has any other capability, a consumer can drop the missing dispatch arm and still get Ok, defeating the drift check this resolver is meant to provide.
Useful? React with 👍 / 👎.
Board discipline: hot-plug consumer-migration doc + E-HOTPLUG-GENERIC-1 (missed the #175 train)
What
The generic hot-plug resolution — the migration target for EVERY consumer (operator ruling; supersedes the per-registration shape from #174 as the primary path):
ogar_vocab::capability_registrygains:DomainTable { domain, expected_executors, entries: fn() -> Vec<(capability, subject_classid)> }+domain_tables()— the append-only registry of authoritative action tables. OCR is the first entry; the planned thinking-styles best-practice table adds one entry and is instantly hot-pluggable.resolve_hotplug(consumer, classids, covered) -> Result<(vocab rows, capability names), HotplugDrift>— the consumer tells OGAR which classids are hot-plugged and receives BOTH the vocab rows and the action surface for exactly those ids. The classid is the join key on both sides.HotplugDrift— five named bangs:UnknownClassid/NoCapabilitiesFor("the table was forgotten") /UnexpectedConsumer/Uncovered/Undeclared.The per-registration
verify_registrationpath from #174 stays for now; consumers migrate toresolve_hotplug(tesseract-rs first — companion PR there declares alance_graph_contract::hotplug::HotPlugconst and activates through this resolution; the contract side is the zero-dep socket +OgarAuthoritybridge in lance-graph #658).Gates: fmt + clippy
-D warningsclean, 124 tests green (-p ogar-vocabscoped), incl. one test per drift arm.Companions (merge THIS first)
hotplugsocket +OgarAuthoritybridge — updated in place)🤖 Generated with Claude Code
https://claude.ai/code/session_016b33swuXE23hKtqxsHu9p1