Repository navigation
refactor(composition): unify capability bindings and cleanup ownership - #8441
Conversation
Compose typed services, live availability and exact cleanup capabilities together. Derive provider catalogs from pure source declarations and share live-tool factories between CLI and MCP. Retain failed cleanup owners without revisiting released peers. Refs #8429 Assisted-by: Suika (gensokyo-skills:suika-scatter-gather-planning)
Document paired public workflows, actual Codex CLI qualification, complete Evidence parity, measured resource use and explicit provider/check limitations. Assisted-by: Suika (gensokyo-skills:suika-scatter-gather-planning)
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
@codex review |
|
Codex Review: Didn't find any major issues. Can't wait for the next one! Reviewed commit: ℹ️ About Codex in GitHubCodex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback". |
[High impact] The PR appears safe to merge, with both previous findings addressed and no new blocking issue found. SummaryMoves service construction, availability and cleanup into shared capability bindings. Provider catalogs read static declarations and canonical contract groups.
Diagram%%{init: {'theme': 'neutral'}}%%
flowchart LR
Contracts["Canonical contract arrays"] --> Groups["TOOL_CONTRACT_GROUPS"]
Groups --> Families["Tool-family selection"]
Groups --> Catalog["Provider catalog"]
Metadata["Pure provider metadata"] --> Declarations["CAPABILITY_DECLARATIONS"]
Declarations --> Catalog
Declarations --> Bindings["Typed service bindings"]
Factories["Shared CLI/MCP factories"] --> Bindings
Bindings --> Services["Services and availability"]
Bindings --> Scope["CapabilityScope"]
Scope --> Close["Close pending owners"]
Close -->|Success| Released["Remove released owner"]
Close -->|Failure| Retry["Retain owner for retry"]
Reviews (2) · Last reviewed commit: "docs(composition): qualify review correc..." · Reviewed by Greptile |
|
CodeQL attribution for the six reported alerts on All six exact alert IDs have open instances on the pinned base I inspected all 24 SARIF paths and obtained an independent source review. Their new source locations are the factories' default
No source suppression, global alert dismissal or unrelated security change is included. Per the owner's explicit instruction to allow merging when a failed check is unrelated to this PR, this existing-alert CodeQL aggregate is eligible for that exception after the remaining CI/review completes. Raw SARIF, exact-base alert instances and the attribution assessment are retained with the local verification receipts. Final-head recheck: |
Only whole-declaration type imports and type queries erase their module edges under verbatimModuleSyntax. Compare the parser facts to compiler emit and retain inline-only import/export edges in constructor ownership guards. Assisted-by: Suika (gensokyo-skills:suika-scatter-gather-planning)
Share canonical contract groups between advertising families and provider metadata. Keep precise subsets explicit, reject unknown groups and operations, and prove a new real ADB group operation is included without a metadata edit. Assisted-by: Suika (gensokyo-skills:suika-scatter-gather-planning)
Record compiler-backed module-edge regressions, canonical group ownership, unchanged public catalogs and the final real mixed-domain checkpoint replay. Assisted-by: Suika (gensokyo-skills:suika-scatter-gather-planning)
|
@codex review |
|
Codex Review: Didn't find any major issues. More of your lovely PRs please. Reviewed commit: ℹ️ About Codex in GitHubCodex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback". |
Upstream's composition refactor (morluto#8441) moved RIZIN_PROVIDER_IDENTITY and OBJDUMP_PROVIDER_IDENTITY into their own modules, while this branch had added the Rizin version probe beside the identity in RizinCommand.ts and imported both from there. Take upstream's identity modules; the probe stays with the command it builds and imports the identity from RizinProviderIdentity.ts.
Take main a6caa79 (morluto#8441, morluto#8450). The one conflict was an import in tests/boundary/providers/hopper/hopperAnalysisProfile.test.ts: main moved HOPPER_PROVIDER_IDENTITY to HopperProviderMetadata.js, and this branch added the rawLoadAtEntry fixture import; both are kept.
morluto#8441) Bind typed service creation, observed availability and retryable cleanup in one composition owner. Reuse selected CLI/MCP factories and canonical contract groups without copying provider operation inventories. Closes morluto#8429. Refs morluto#740. Validated paired real application workflows, actual local Codex CLI Terra/high use, complete Evidence and Unknown checkpoint parity, compiler-backed import boundaries, SDK schemas and final real mixed routing. Automated review findings were fixed at their producing owners. Existing exact-base CodeQL alerts are documented on the PR under the owner-authorized unrelated-check exception; no global alerts or security rules were changed. Assisted-by: Suika (gensokyo-skills:suika-scatter-gather-planning)
Summary
Closes #8429. Refs #740.
Service construction, live availability and shutdown previously had separate server lists, so extending a capability required keeping multiple inventories aligned. Compose 49 precisely typed services through named bindings that register their close capability at acquisition; successful cleanup leaves the pending set, while failed owners remain retryable. CLI and MCP share the remaining Frida/Cutter/GDB/Rizin factories.
Contract and boundary impact
CapabilityScopeowns pending cleanup, and provider-owned pure metadata supplies the shared static declaration. MCP retains argument/schema registration;BinarySessionretains its single transition/admission barrier.Evidence and regression coverage
The new successful-peer cleanup regression fails with the old manual close list restored. Controlled tests cover synchronous/undefined cleanup failures, concurrent close, failed-owner retry, caller-owned observations, constructor failure and SDK shutdown/publication. The moved Frida test body is unchanged and discovered in its provider lane.
Actual public workflows: 5 CLI tasks per arm; 7 MCP tasks per arm (424 calls total), including real GitHub CLI, NuGet, agent-browser, NewPipe, WASM, Ghidra/jq and mixed target routing. Independent source-format oracles and complete baseline/feature Evidence/checkpoint/Unknown-history comparisons passed. Ghidra retained the same owned JVM across healthy reset.
Local Codex CLI requested
gpt-6.1-terra/high with 19 selected tools: 32 calls across 4 domains, plus 9 calls in an independent fresh process. All complete facts/IDs/history matched baseline. The model honestly left its JSJSON.stringifyself-check unverified after object key order changed; independent full structural/fresh-checkpoint verification resolved content equality. No model rerun or token-savings claim. Detailed verification.The two actionable Greptile findings are fixed at their owners: fully erased module-edge facts are checked against compiler emit; 37 whole-provider bindings now resolve the same named canonical arrays used by contract families. A regression mutates the real ADB group with a new valid operation and proves it reaches the actual provider without a metadata edit. Both old representations fail the new checks. Final type/source (228 cases)/SDK-MCP (34 cases) checks pass; final real mixed-routing replay adds 58 calls with complete baseline/Unknown parity and no OOM. Public product and SDK catalogs are byte-identical to their qualified pre-review equivalents.
Validation performed
npm run build:cached,npm run typecheck, module/architecture/discovery/production-reachability checks, changed-file lint/typed lint,npm run docs:check,npm run format:check— passed (relevant test groups/results in the report).npm run knip— the sole failure is unusedDarwinHelperCachein an untouched file; independently reproduced identically on clean baseline6e9ee97. No unrelated repair.6e9ee97; all 24 paths were traced to equivalent pre-existing local environment selection. Attribution and base-instance evidence. No source suppression or global alert dismissal; owner-authorized unrelated-check exception applies after other checks/reviews complete.Final head
a7532ecd4: required CI (Static checks,Portable tests,CI required, Conventional PR title) passed; Codex completed with no new findings, Greptile passed and both actionable threads are resolved. The sole failed aggregate is the same six existing-base CodeQL alerts documented above.Compatibility and remaining proof gaps
No caller-visible migration or new execution authority. Real JADX, Hopper/IDA/JEB/Cutter GUI/debugger/Frida target attachment and a genuine local model-weight artifact remain outside this verification scope; real NewPipe coverage is inventory/graph. This increment does not split
BinarySessioninto competing lifecycle owners. Exact cleanup retry, synchronous failures, concurrent close and SDK publication/cancellation are checked at controlled production seams; real repeated close alone does not prove a natural cleanup failure.Author readiness
Human owner: @N0zoM1z0
The owner explicitly authorized implementation, readiness declarations and merge, including delegation of normally human-filled fields. The agent reviewed the diff and evidence under that delegation; these declarations are entered on that basis. A separate in-person review is not asserted.
Before merge
a7532ecd4; the six existing-base CodeQL alerts are the sole documented exception.