refactor(runtime): centralize capability result projection - #1311
Conversation
Coverage ReportTotal coverage: 77% (threshold: 50%) |
* refactor(runtime): parse capability inputs once * docs(architecture): enforce typed adapter boundaries * fix(runtime): preserve request values before validation
|
Bugbot is not enabled for your account, so this pull request was not reviewed. Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7a3edda3e3
ℹ️ 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".
Synchronize #1311 before fixing typed composition-value binding.
Carry a JSON accounting view beside each resolved input-port value, restore the exact validated object for strict Python-mode request binding, and keep ordinary caller payloads on the existing strict JSON parse. Add a regression proving both object identity and rejection of stringly external fields.
Synchronize #1311 after fixing typed composition-value identity.
Restore exact model instances at input ports, keep canonical JSON projection solely for request-size accounting, and parse the assembled typed payload directly in strict Python mode. External requests still cross the strict JSON parser, while direct and referenced composition preserve object identity.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 82dff03b91
ℹ️ 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".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 82dff03b91
ℹ️ 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".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: adb73d75b5
ℹ️ 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".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 588431ace9
ℹ️ 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".
|
Reconciled this branch with current main and pushed merge commit 2219b0f. The resolution keeps the current declaration-owned runtime implementation and the dispatch refactor's typed preparation path. Focused validation: 18 passed, 1 skipped because the pinned Lean runtime was unavailable locally. |
Problem
The runtime still had two independent
CapabilityResultconstructors fordispatch failures, even though successful operation outcomes already flowed
through the final operation projection. Those failure paths also embedded the
entire installed capability inventory or operator policy document in error
output, duplicating discovery and exposing more runtime configuration than a
failed invocation needs.
This advances #1210, #1219, and the #1148 cleanup roadmap.
Solution
result-validation failures through
OperationProjectionand the final resultcompiler.
recovery resources are useful, without putting the complete catalog in the
runtime result.
definition.
result-construction path.
operation_projection.pymay construct the public result envelope.Testing
Focused regression evidence:
make checkpassed 872 unit, 906 component, 479 domain, 157 composition,4 end-to-end, and 64 provider-boundary tests. The focused regression set passed
20 tests; the architecture scan checked 1,684 files and all seven import
contracts were kept.
make checkbecause this changes the common dispatch boundary.Trust & Compatibility Impact
Mathematical results, checker authorization, verification-record validation,
and artifact lineage are unchanged. Unknown-operation runtime results no longer
contain the complete installed inventory, and policy-denial results no longer
contain the complete policy definition. MCP clients retain bounded recovery
guidance for unknown IDs.
Architecture Budget
No operation or shared abstraction is added. This removes two competing wire
result constructors, one context-building path, and an obsolete fixture; the
single remaining constructor owner is the final operation projection.
Checklist
make checkpassesmake harbor-prepare-taskthenmake harbor-validate-task(not applicable)