Skip to content

capability_registry: generic hot-plug resolution (classid -> vocab + actions)#175

Merged
AdaWorldAPI merged 1 commit into
mainfrom
claude/happy-hamilton-0azlw4
Jul 7, 2026
Merged

capability_registry: generic hot-plug resolution (classid -> vocab + actions)#175
AdaWorldAPI merged 1 commit into
mainfrom
claude/happy-hamilton-0azlw4

Conversation

@AdaWorldAPI

Copy link
Copy Markdown
Owner

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_registry gains:

  • 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_registration path from #174 stays for now; consumers migrate to resolve_hotplug (tesseract-rs first — companion PR there declares a lance_graph_contract::hotplug::HotPlug const and activates through this resolution; the contract side is the zero-dep socket + OgarAuthority bridge in lance-graph #658).

Gates: fmt + clippy -D warnings clean, 124 tests green (-p ogar-vocab scoped), incl. one test per drift arm.

Companions (merge THIS first)

  • lance-graph #658 (contract hotplug socket + OgarAuthority bridge — updated in place)
  • tesseract-rs follow-up PR (HOT_PLUG migration)

🤖 Generated with Claude Code

https://claude.ai/code/session_016b33swuXE23hKtqxsHu9p1

…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
@cursor

cursor Bot commented Jul 7, 2026

Copy link
Copy Markdown

Bugbot couldn't run - usage limit reached

Bugbot 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)

@AdaWorldAPI AdaWorldAPI merged commit 27ad054 into main Jul 7, 2026
2 checks passed

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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();

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

AdaWorldAPI added a commit that referenced this pull request Jul 7, 2026
Board discipline: hot-plug consumer-migration doc + E-HOTPLUG-GENERIC-1 (missed the #175 train)
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.

2 participants