feat(runtime): add channel-neutral execution context - #182
Conversation
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. |
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. Note Currently processing new changes in this PR. This may take a few minutes, please wait... ⚙️ Run configuration
📒 Files selected for processing (12)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Review Clean, small, no schema changes, and the tests cover the main paths. The scope handling is right: Concerns
Minor
Tests
Nothing here blocks the design. I'd fix 1 and 2 before merge. 🤖 Generated with Claude Code |
|
Review: channel-neutral execution context Overall this is a clean, small change. It adds no schema changes, it keeps authorization separate from provenance, and the middleware runs after Issues / suggestions
None of these look blocking, though items 1 and 2 are worth fixing before merge. 🤖 Generated with Claude Code |
|
Review: channel-neutral execution context Clean, small change. No schema changes, and provenance stays separate from authorization (the test showing Issues
Minor
Tests
No blocking security problem found, since authorization is unaffected. I'd fix 1, 2 and 4 before merge. 🤖 Generated with Claude Code |
Review: channel-neutral execution contextOverall this is a clean, small, additive change. The security posture is right: the context is built after Issues / suggestions
Test coverageGood unit coverage of intent inference, baggage parsing and the scope-isolation case. Missing:
No blocking issues. I'd address points 1 and 4, and add the ledger and malformed-header tests, before merge. |
Review: channel-neutral execution contextOverall this is a clean, small, additive change. The middleware runs after Worth addressing
Minor / design notes
No security blockers found: provenance never feeds authorization, and the tests assert that. I couldn't run CI here, so I haven't verified the tests pass. |
Review: channel-neutral execution contextThe design is sound. The context is built after auth and tenant checks, and scope comes only from Issues / suggestions
SecurityThere are no concerns that block merge. Header and baggage inputs are length-bounded, restricted to printable ASCII and percent-decoded safely. No provenance field feeds authorization. Stored audit values are attacker-controlled strings, so downstream ledger consumers should treat them as untrusted. StyleThis matches the repo conventions: Hono middleware, types in Overall this is good to merge once the MCP/ledger tests are added and the |
Review: channel-neutral execution contextOverall this is a clean, small, well-documented change. It adds no schema changes, and the middleware is correctly placed after Potential issues
Nits
Test coverage
Performance and security
Items 1–3 are the ones I'd address before merge. |
|
Review: channel-neutral execution context Overall this is a clean, small, well-scoped change. It adds no schema changes, it keeps provenance audit-only, and the tests cover the main sanitization paths. Notes below, roughly by priority. Issues / suggestions
Security
Performance
Tests
No blocking issues. I'd address items 1-3 before merge. 🤖 Generated with Claude Code |
Review: channel-neutral execution contextOverall this is a clean, small, no-schema change. Provenance is sanitized and kept audit-only, and the middleware runs after Issues / suggestions
TestsGood coverage of parsing, oversized input and the MCP overrides. Gaps: ledger enrichment (3), DocsThe docs updates are consistent with CLAUDE.md conventions. No mocks or schema changes. Nothing blocking apart from (1), which I'd fix before merge. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: dffa4d5aff
ℹ️ 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".
| // storageMiddleware runs first so hybridAuth can resolve JWT → chittyId → userId | ||
| const authAndContext: MiddlewareHandler<HonoEnv>[] = [storageMiddleware, hybridAuth, callerContext]; | ||
| const protectedRoute: MiddlewareHandler<HonoEnv>[] = [...authAndContext, tenantMiddleware]; | ||
| const protectedRoute: MiddlewareHandler<HonoEnv>[] = [...authAndContext, tenantMiddleware, executionContextMiddleware]; |
There was a problem hiding this comment.
Mount execution context on allocation routes
The new middleware only runs through protectedRoute, but protectedPrefixes does not include /api/allocations. Consequently, real requests to /api/allocations/preview and /api/allocations/execute never receive an executionContext, despite the new test asserting those intents using an isolated app that mounts the middleware globally; in particular, the allocation.executed ledger entry remains unenriched. Add the allocation prefix to the production middleware registration rather than relying on the test-only setup.
Useful? React with 👍 / 👎.
Review: channel-neutral execution contextClean, small, additive change. Authorization is not derived from provenance ( Should address
Minor
Tests Only item 1 is worth fixing before merge. |
ReviewOverall: clean, small, well-scoped, and the security stance is right. Provenance is applied after tenant auth and never feeds back into Issues / suggestions
No blocking security concerns beyond #1, which I'd fix before merge since it undermines the audit-correlation purpose. |
|
Review Overall: a clean, well-scoped change. Context is built after auth and tenant resolution. Provenance is sanitized and size-bounded. Issues / suggestions
Tests
Other
Nice work. Item 1 is the one I'd fix before merge. 🤖 Generated with Claude Code |
|
Review of #182: channel-neutral execution context The middleware runs after auth and tenant checks. Provenance is audit-only, and there are no schema changes. Tests cover the main paths. Issues / risks
Tests
Security |
Closes #181.
Changes
X-Source-Serviceplus W3Ctraceparent/baggagefor provenancePortable projection
The same runtime context can be populated by ChatGPT, Claude, or ChittyClaw/OpenClaw adapters without provider-specific finance logic. ChittyAuth remains actor authority;
tenant_usersremains financial authority.Verification
Adds focused execution-context tests. Full repository CI is the execution proof.