feat(agent): support canonical global execution in trusted broker - #4484
Conversation
There was a problem hiding this comment.
Your trial has ended. Reactivate Greptile to resume code reviews.
📦 Client bundle boundary
A server module in a client graph aborts hydration in the browser. New leaks fail CI; known leaks are tracked in |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (3)
Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review. 📝 WalkthroughWalkthroughThe runtime now supports canonical executions for globally owned tools without a project identity. Schemas, trusted-runtime validation, broker context construction, tests, and documentation reject invalid project-scoped or project-slug combinations. ChangesGlobal projectless execution
Priority: ⬇️ Low Estimated code review effort: 3 (Moderate) | ~20 minutes Change: Feature Sequence Diagram(s)sequenceDiagram
participant ManagedExecutorBroker
participant TrustedManagedRuntime
participant ProjectTool
ManagedExecutorBroker->>TrustedManagedRuntime: Validate canonical execution with null projectId
TrustedManagedRuntime-->>ManagedExecutorBroker: Allow global-scope execution
ManagedExecutorBroker->>ProjectTool: Provide context without projectId
Merge Risk: ⚪ Minimal · up to The change is mergeable; the new global execution boundaries and context handling have no unresolved material risk identified. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 23.08% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 13 functions across 8 files. (1 skipped: 1 unsupported.)
✨ Finishing Touches 💡 1📝 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 |
Code Review — Score: 87/100 (Good)Focused, well-tested change that lets the trusted broker accept an explicit Strengths
Concerns
Nothing here blocks merging; the two schema-boundary notes above are worth a quick confirmation from the author rather than required changes. Generated by Claude Code |
|
The global-owner/non-null-project combination is intentional and already supported: source ownership identifies the deployed code, while execution.projectId is the approved application context. The platform's global agent can operate on a selected project. Existing executor-project-runtime tests already use a global artifact owner with a non-null project context; the new cases add explicit projectless canonical execution. This PR preserves the existing non-null project behavior and does not introduce cross-project authorization. Initial project-registered API dispatch separately checks that service.projectId equals run.projectId in The new null case is stricter: it requires a globally owned source and no project slug. Missing projectId remains invalid. Local verification passed 88 focused checks, full types/lint, module/dependency boundaries and references. Current-head CI and the required automated review are still completing. |
There was a problem hiding this comment.
Your trial has ended. Reactivate Greptile to resume code reviews.
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 63d1d8fe77
ℹ️ About Codex in GitHub
Codex has been enabled to automatically 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 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
There was a problem hiding this comment.
Your trial has ended. Reactivate Greptile to resume code reviews.
|
@codex review |
|
Codex Review: Didn't find any major issues. What shall we delve into next? 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". |
|



The trusted broker requires a non-null project ID even for canonical runs backed by a globally owned source. Global chat therefore cannot use the project-tools executor profile without inventing a project identity.
Accept explicit
projectId: nullfor canonical execution with a global source. Keep the canonical run binding, omit project identity from the tool's execution context, and normalize the broker's internal tool context consistently. Project-owned sources still require a project ID; missing projectId and a project slug without an ID are rejected. Optional global steering remains an explicit capability with matching callbacks. The agent loop, model/host operations and private data stay in the broker; no full-runtime fallback is added.Validation: the global end-to-end broker fixture failed on the original project-only guard and now passes. The five focused files pass 93 nested checks, including real in-memory channel installation, model/host/project-tool execution, private-data non-disclosure on the project wire, global steering and pre-allocation rejection of invalid contexts. Full framework and explicit test types, lint/format, module/dependency boundaries and generated API references pass. No native/prototype security probes were executed locally.
This is framework support for veryfront/veryfront-issue-inbox#1037 and #367. Product broker composition, ephemeral execution, authorized project transitions, infrastructure readiness and actual routing cutover remain separate delivery work. It does not activate isolated staging or production traffic.
Summary by CodeRabbit
New Features
nullproject ID while retaining their canonical run identity.Bug Fixes
Documentation