Repository navigation
[CTX-1185] feat(dynapi): registry-backed name arbitration for provided interfaces (#2003) - #2047
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Merge Risk: ⚪ Minimal · up to
|
Xuepoo
left a comment
There was a problem hiding this comment.
Independent review verdict (guard cron / separate agent reviewer)
Commit reviewed: 349c26a82 (branch carryctx/ctx-1185-dynapi-arbitration, PR #2047)
Verdict: APPROVE (non-blocking nits only)
Checks run (read-only, against the PR checkout):
git log --oneline -1 && git show --stat HEADgit show HEAD -- crates/bitty-plugin-host/src/registry.rs crates/bitty-runtime/src/plugin_runtime/services.rs crates/bitty-plugin-host/src/manifest.rsgit show HEAD -- crates/bitty-lua/src/host.rs crates/bitty-runtime/src/plugin_runtime/manifest_toml.rsrg -n 'parse_service_reference|bitty\.|reserved|owner:' crates/bitty-plugin-host/src crates/bitty-runtime/src/plugin_runtimerg -in 'unmount|register_panel' crates/
Findings:
- Grammar is centralized in
manifest.rs::parse_service_reference(rejects >1 colon, empty owner/short, NUL/space, >128-byte) and reused by provide/require validation, the registry graph gate, and the broker; the Lua bridge (bitty-lua/src/host.rs~5725) mirrors only the structural shape and defers owner-identity/reservation to the host — matches the PR intent. - Core
bitty.*reservation fails closed on every claimed path:manifest.rsprovide validate ~1396 and require ~2537, plusservices.rs::service_provide~2975 mapping to E_SERVICE_UNDECLARED; covered by manifest/manifest_toml tests. - Arbitration pins owner by the providing plugin id (
registry.rs~365/390,services.rs~3085) with no static Core allowlist; ambiguity for an unqualified short is judged over grant-visible records only (services.rs~3089-3120) and fails closed naming every owner even when optional. - Non-blocking nits: (1)
visible_ownersinsert happens beforeVersion::parse(~services.rs:3095), so an unparseable-version provider could trip the multi-owner error instead of being skipped; (2) the registry graph gate stays permissive on ambiguity while the runtime broker fails closed (intended graph-vs-runtime layering, but the two layers disagree); (3) could not compile to confirmBTreeSetis in scope in services.rs.
Merge gate: APPROVE + green CI. Prior Wayland red was a flake — 4 bitty-lua::colorscheme_bridge tests failed at a uniform ~1.02s timeout while X11 and macOS passed on the same commit; failed jobs rerun.
Supports #2003 (dynapi 1/4): one-time Core rule for dynamic extension-API names.
Acceptance: two-extension same-short test (qualified both work, short fails naming both), bitty.* claim fails closed, owner pinned by registry, just check-relevant gates green; docs sync noted for bitty-terminal-docs interface material + Plugins API surface (separate repo).
Gates: fmt clean, clippy -D warnings clean (workspace + dev-tools), nextest workspace 6635 passed 1 skipped, doctests clean, windows target check clean, verify_w147_small_core_graph 9/9. ci-local blocked by pre-existing sccache GHA-backend failure under act (log recording/ctx-1185/ci-local-pr1.log); scratch-paths fails pre-existing in untouched wsl.rs/component.rs.
Priority: P1 | Area: plugins | Labels: feat,P1,area:plugins | Milestone: v0.1.0 | Task: CTX-1185
Closes #2003
Summary by CodeRabbit
owner:interface) to select a specific provider.bitty.*interfaces cannot be provided or required.