Repository navigation
feat(runtime): report task and workflow process identity - #5185
Conversation
📦 Client bundle boundary
A server module in a client graph aborts hydration in the browser. New leaks fail CI; known leaks are tracked in |
Codex independent reviewReviewed SHA: FindingsNo actionable findings. The implementation matches the bounded framework-consumer contract from veryfront/veryfront-api#6664. Verification
Verdict: APPROVE Score: 98/100 Review-Gate: |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Independent review —
|
|
@codex review |
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. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 20adf95f22
ℹ️ 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".
Write process identity onto finalized responses through captured host intrinsics. Refused dispatches omit identity, while admitted execution failures retain their receiving process. Defer public projection claims until the API producer rollout. Tested: Four failing-then-passing task/workflow attribution regressions; pinned handler and docs suites; typecheck and changed-file lint/format Not-tested: Final deployed API producer and replica staging qualification Confidence: high Scope-risk: narrow
|
Fixed the three review findings in exact head Pinned Deno 2.7.7 verification: handler suite 13 groups / 442 steps; docs 66 groups / 281 steps; both changed TypeScript files typecheck; changed-file lint/format and diff checks pass. Four setter-forgery/admission-refusal regressions demonstrably fail on the old handler and pass with the fix. Mandatory uncommitted and refreshed-base Codex reviews report no actionable findings. The PR remains draft while fresh CI/review and final deployed staging qualification are pending. API producer veryfront/veryfront-api#6691 remains open, so this does not claim deployed persistence/projection qualification. @codex review |
There was a problem hiding this comment.
💡 Codex Review
Fresh evidence after the prior admission fix is that this flag is still set before executeProjectRun() reaches its own execution-entry checks. For example, an already-expired task returns RUN_TIMEOUT and calls acknowledgeNotStarted without invoking task code, while missing tasks and workflows return their not-found failures without entering execution; all of these responses nevertheless receive the runtime headers and can be persisted as accepted process snapshots. Propagate actual task/workflow entry state instead of marking the dispatch owned before these refusal paths.
AGENTS.md reference: AGENTS.md:L26-L28
ℹ️ 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".
|
Independent Codex review of local candidate No actionable findings. The candidate fixes the prior execution-boundary concern. Discovered tasks mark ownership in The process identity and encoded display name are captured before tenant execution. Final response decoration uses captured native response/header operations, so tenant changes to Verification performed with the repository-pinned Deno 2.7.7:
Score: 98/100 (correctness 40/40, tests 20/20, reliability/security 15/15, repository standards 14/15, scope/docs 9/10). This is an approval of the exact local candidate only. The PR remote head is still Review-Gate: |
kwakayama
left a comment
There was a problem hiding this comment.
Independent Review — 641f7a8d9
Three commits move process attribution from the dispatch-accepted boundary to the actual-execution-admitted boundary. Headers x-veryfront-runtime-id, x-veryfront-runtime-mode, and x-veryfront-runtime-name are set only after the onExecutionOwned callback fires; refusal before admission omits them.
Findings
F1 (low): No explicit test for workflow failure-after-admission retaining headers.
The task path has reports actual task entry for throws task input or execution (handler.test.ts:1391-1425) asserting the runtime-id header survives a throw after entry. No symmetric workflow test exists. The handler catch path at handler.ts:5889 wraps the error response with withRuntimeIdentity(..., executionOwned), so behavior is correct when onStart has fired -- the gap is in explicit verification, not logic.
F2-F4 (informational): executionEntered vs executionOwned divergence is intentional and sound. Knowledge-ingest admission points correctly treat validation as pre-admission. Captured intrinsics (RuntimeEncodeURIComponent, HeadersSet, copyNativeResponse, frozen HostResponse prototype) protect against tenant replacement -- validated by the header-setter protection test.
Verification
deno task test:file src/task/runner.test.ts
ok | 1 passed (33 steps) | 0 failed
deno task test:file src/server/handlers/request/project-run-execute.handler.test.ts
ok | 13 passed (456 steps) | 0 failed
Candidate is local, not yet pushed to the remote.
Review-Gate:
Reviewer: Claude
Reviewed-SHA: 641f7a8d9c043d595bca5ba2a76804c8dee6d5d6
Score: 92/100
Actionable-Findings: 1
Verdict: APPROVE
Independent Codex Review — local candidate
|
Claude Code Review: PR #5185 @ 865dab4Candidate SHA: SummaryThis candidate implements process attribution for task and workflow executions. The runtime Correctness (40/40)Admission boundary placement is correct across all paths:
Header injection is tamper-resistant:
Refusal paths correctly omit headers:
Failure-after-admission retains headers:
Tests (19/20)Comprehensive new coverage (280+ lines of tests):
Minor gap (-1):
Reliability and Security (15/15)
Repo Standards (15/15)
Scope and Docs (10/10)
VerificationAll tests pass. Candidate is local (not yet pushed to remote). Gaps
Review-Gate: |
|
Addressed the execution ownership finding in Ownership now comes from actual execution entry, rather than dispatching Regression evidence: the refusal cases failed before the fix; removing either actual-entry hook fails the corresponding positive controls. Restored implementation passes handler + task runner (490 steps), workflow executor/control/process identity (121 steps), changed-file typecheck/lint and repository formatting/lint/public entrypoint typecheck. The new real dynamic-workflow failure test asserts execution occurred, the response failed, and all three exact runtime headers remain present. |
|
@codex review Please review published head |
|
@codex review |
|
Codex Review: Didn't find any major issues. Hooray! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
|



Task and workflow responses now report the actual service process that entered execution. Runtime identity is captured before tenant code and returned only after task admission or workflow executor activation, including resumed workflows. Expired deadlines, missing targets, input validation failures and other preflight refusals carry no process identity. Failures after execution starts retain attribution, and result JSON remains unchanged.
Consumer for veryfront/veryfront-api#6664 and API producer PR veryfront/veryfront-api#6691. Deploy this framework consumer first. Older consumers remain compatible with the API producer and omit attribution.
Validation: handler and task runner suites pass 490 steps; workflow executor, workflow control and runtime identity suites pass 121 steps. Changed-file typecheck, lint and diff checks pass. Full repository pre-push checks also pass: formatting, lint, public entrypoint typecheck, all 24 parallel unit-test batches, serial tests and working-directory suites. Regression tests fail without the execution-entry fix and pass with it. Coverage includes all four builtin task refusal paths, real task schema rejection and body failure, workflow schema rejection, missing/terminal resumes, and admitted initial/manual-resume attribution.
Previous installed-package proof completed task and workflow on each of two local processes with distinct runtime IDs and four execution IDs, preserving structured output. The final reviewed package, aligned consumer pins and staging qualification remain pending; the release lane will rerun that proof after this PR merges.