Repository navigation
Relay request-continuation through a generated continuation workflow - #79701
Conversation
Replace the request_continuation self-dispatch with a continuation-policy
relay:
- safe-outputs.request-continuation gains continuation-policy
({type: workflow-dispatch, approval}); policy is recorded in lock metadata.
- The handler validates and uploads a continuation-request artifact; the
safe-outputs job no longer needs actions: write.
- The conclusion job dispatches the lazily generated
agentic-continuation-relay.yml with parent_run_id/attempt (actions: write
only when the feature is enabled; suppressed when staged).
- The relay validates the dispatch (event, default branch, not a fork,
trusted actors, parent lineage, branch-head lock policy, depth, expiry,
idempotency), optionally gates on a protected approval environment
(fail closed), and dispatches the child with relay_run_id lineage.
- The child restores the checkpoint, reads hints from the parent request
artifact, verifies relay lineage, and records relay_run_id.
- Drop the durable concurrency group and the explicit-concurrency
restriction.
Co-authored-by: copilot-swe-agent[bot] <[email protected]>
|
🧠 Matt Pocock Skills Reviewer is reviewing this pull request using Matt Pocock's engineering skills... |
|
🚀 PR Specification Reviewer has started processing this pull request |
|
✅ Ponytail Reviewer completed successfully!
|
|
✅ Test Quality Sentinel completed test quality analysis. Test Quality SentinelOutcome: The agent completed and reported no action. A no-op output alone does not verify that all required work was completed or that publication was possible. Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.
|
This comment has been minimized.
This comment has been minimized.
|
✅ PR Code Quality Reviewer completed the code quality review. Caution agentic threat detected DetailsPotential security threats were detected in the agent output. Detected threat types: prompt injection. Review the workflow run logs for details. PR Code Quality ReviewerOutcome: The agent completed and reported one or more actions. The no-op output is a completion signal, not a claim that no action was taken. Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.
|
There was a problem hiding this comment.
What this change does: It records continuation requests and sends them through a generated relay workflow. The relay validates the request before dispatching the next run.
Should fix
-
Reuse the default-branch lookup (
actions/setup/js/dispatch_continuation_relay.cjs:22)- What this is: The conclusion job resolves the branch used to dispatch the relay.
- Problem: The new
getDefaultBranchhelper already performs the same lookup. - Fix: Import that helper and remove
resolveDefaultBranch. - If we skip it: Changes to branch resolution must be made in two places.
Verdict: Ship.
Lean: -12 lines possible.
Generated by ✂️ Ponytail Reviewer for #79701 · codex · routed: gpt61 medium · ~10 AIC · ⌖ ~1 AIC · ⊞ 185
Comment /ponytail to run again
There was a problem hiding this comment.
Caution
agentic threat detected
Threat detection flagged this output in warn mode. Manual review is REQUIRED before any follow-up automation.
Details
Potential security threats were detected in the agent output. Detected threat types: prompt injection.
Review the workflow run logs for details.
Reviewed the current diff and found no actionable correctness, security, performance, or maintainability issues on changed lines. Existing review comments were empty. Static review only; tests were not run per review instructions.
🔎 Code quality review by PR Code Quality Reviewer · copilot · gpt50 · ~4 AIC · ⌖ ~2 AIC · ⊞ 1.6K
Comment /review to run again
🏗️ Design Decision Gate — ADR RequiredThis PR makes significant changes to core business logic (>100 new lines) but does not have a linked Architecture Decision Record (ADR). 📄 Draft ADR committed:
📋 What to do next
Once an ADR is linked in the PR body, this gate will re-run and verify the implementation matches the decision. ❓ Why ADRs MatterADRs create a searchable, permanent record of why the codebase looks the way it does. Future contributors (and your future self) will thank you. 📋 Michael Nygard ADR Format ReferenceAn ADR must contain these four sections to be considered complete:
All ADRs are stored in
|
Comment MemoryPeek at saved memory (review-history)History |
There was a problem hiding this comment.
🟡 Changes recommended
Unresolved critical relay authorization and deduplication flaws can expose parent checkpoints to unauthorized children and dispatch duplicate continuation runs.
12 open issues
Elect one eligible pending relay per parent attempt · New Check failed relays for existing dispatch markers · New Bind approval results to the revalidated environment · New Persist dispatch claims before allowing relay retries · New Verify dispatch evidence before exposing parent artifacts · New Generate continuation relays during targeted compilation · New Normalize @ref suffixes before validating workflow paths · New Use artifact producer attempts for conclusion-only reruns · New Restore child checkpoints without requiring an unexpired parent request · New Preserve relayRunId through session collection and compaction · New Preserve relays when compilation errors leave consumers unknown · New Retain dispatch evidence for the full artifact eligibility window · New
What changed in this PR
Moves durable continuation dispatch out of the safe-outputs job and into a compiler-generated relay, separating request recording from dispatch and adding optional human approval.
Changes:
- Adds continuation policy, lock metadata, and a resolve/approve/dispatch relay workflow.
- Records requests as artifacts and dispatches the relay from conclusion, removing continuation-specific write permissions from safe-outputs.
- Updates checkpoint lineage, relay-ID data structures, tests, documentation, and generated workflows.
Verification was limited to focused, dependency-free checks; project tests and builds were not run.
| File | Description |
|---|---|
schemas/logs-jsonl.schema.json |
Adds the optional relay run ID field. |
schemas/audit.schema.json |
Adds the optional relay run ID field. |
pkg/workflow/safe_output_handlers.go |
Removes continuation-specific write permissions. |
pkg/workflow/request_continuation.go |
Parses policy and builds continuation metadata. |
pkg/workflow/request_continuation_test.go |
Tests policy, permissions, artifacts, and staging. |
pkg/workflow/notify_comment.go |
Adds conclusion-side relay dispatch and permissions. |
pkg/workflow/lock_schema.go |
Defines continuation lock metadata. |
pkg/workflow/js/safe_outputs_tools.json |
Mentions optional approval in tool guidance. |
pkg/workflow/engine_durable.go |
Allows explicit durable-workflow concurrency. |
pkg/workflow/engine_durable_test.go |
Updates concurrency and metadata expectations. |
pkg/workflow/continuation_relay_workflow.go |
Generates and removes the relay workflow. |
pkg/workflow/continuation_relay_workflow_test.go |
Tests relay generation, permissions, and cleanup. |
pkg/workflow/concurrency.go |
Removes automatic durable concurrency groups. |
pkg/workflow/compiler_yaml_header.go |
Writes continuation policy into lock headers. |
pkg/workflow/compiler_safe_outputs_job.go |
Uploads request artifacts and exposes request status. |
pkg/workflow/compiler_orchestrator_workflow.go |
Updates the validation-order comment only. |
pkg/parser/schemas/main_workflow_schema.json |
Defines continuation-policy configuration. |
pkg/cli/durable_session.go |
Adds relay-ID parsing, validation, and rendering. |
pkg/cli/compile_post_processing.go |
Adds the relay-generation wrapper. |
pkg/cli/compile_post_processing_work_queue_test.go |
Tests lazy relay generation and removal. |
pkg/cli/compile_pipeline.go |
Integrates relay generation into directory post-processing. |
docs/src/content/docs/reference/safe-outputs.md |
Documents relay requests, approval, and recovery. |
docs/src/content/docs/reference/engines.md |
Updates durable-run behavior and lineage documentation. |
actions/setup/js/safe_outputs_tools.json |
Mentions optional approval in runtime tool guidance. |
actions/setup/js/request_continuation.test.cjs |
Tests artifact recording instead of direct dispatch. |
actions/setup/js/request_continuation.cjs |
Records validated continuation requests locally. |
actions/setup/js/durable_session.cjs |
Reformats prompt construction without changing behavior. |
actions/setup/js/durable_session_record.cjs |
Adds relay IDs to durable event records. |
actions/setup/js/durable_artifact.test.cjs |
Tests relay lineage, artifact hints, and restoration. |
actions/setup/js/durable_artifact.cjs |
Checks relay lineage and reads parent request hints. |
actions/setup/js/dispatch_continuation_relay.test.cjs |
Tests conclusion-side dispatch and recovery errors. |
actions/setup/js/dispatch_continuation_relay.cjs |
Dispatches the relay with parent run identity. |
actions/setup/js/continuation_request.cjs |
Adds shared artifact and lineage helpers. |
actions/setup/js/continuation_relay.test.cjs |
Tests validation, approval, dispatch, and duplicate handling. |
actions/setup/js/continuation_relay.cjs |
Implements relay validation and child dispatch. |
.github/workflows/smoke-copilot.lock.yml |
Regenerates continuation metadata and relay steps. |
.github/workflows/smoke-codex.lock.yml |
Regenerates relay steps and reduces safe-output permissions. |
.github/workflows/smoke-claude.lock.yml |
Regenerates relay steps and reduces safe-output permissions. |
.github/workflows/research.lock.yml |
Regenerates relay steps and reduces safe-output permissions. |
.github/workflows/daily-arxiv-researcher.lock.yml |
Regenerates continuation metadata and relay steps. |
.github/workflows/copilot-cli-deep-research.lock.yml |
Regenerates relay steps and reduces safe-output permissions. |
.github/workflows/agentic-continuation-relay.yml |
Adds the generated validation, approval, and dispatch jobs. |
.changeset/request-continuation-safe-output.md |
Updates release notes for relay-based continuation. |
Review effort: Max (adaptive)
| status: data.status, | ||
| ...(data.parentRunId ? { parentRunId: String(data.parentRunId) } : {}), | ||
| ...(data.artifactId ? { artifactId: String(data.artifactId) } : {}), | ||
| ...(data.relayRunId ? { relayRunId: String(data.relayRunId) } : {}), |
There was a problem hiding this comment.
Added relayRunId to the collection and compaction allow-lists, with coverage that verifies it survives into the session output. Fixed in cc8ccba.
| if config.Strict { | ||
| return err | ||
| } | ||
| if err := generateDirectoryCompanionWorkflows(ctx, compiler, workflowDataList, config, getAbsoluteWorkflowDir(workflowsDir, gitRoot), gitRoot); err != nil { |
There was a problem hiding this comment.
Directory companion workflow regeneration is skipped after compile errors, preserving the existing relay until a complete successful scan. Fixed in cc8ccba.
|
🍳 A little prep to help this PR along! Copilot assignment requested for the following outstanding work:
Keeping the changes focused; human review and CI get the final taste test. No merging or CI triggering. Structured data{
"completed_task": 0,
"head": "41abf0c6311169f5e964ba086285da816f5a6c6d",
"kind": "requested",
"schema_version": "1",
"state": "24fe1e97eb8b8ecdaed1c93c624d5d7bb6a7dcb050c305fe5a2b381e7692592c",
"work": [
"0f44f3af4e9a97ab4f78a65cb6908d7281f306abebda7045d4b5cc9c142d822b",
"137695344334a3f41ace7d141b983d513627adc6484fa1c54f46eb2fe6886ca9",
"239025719befed5a273ef98dfcfa7e7f438ec6ca0e13959c510726a7d3b350a5",
"3aecfbb64c70fc6ea6c78441ba5936819978563dbb4be85a1f45feaf03d274ec",
"40d5b10d0aec8fe8ed26a0c6e14a1faeb3ade307170c044726a32a948392ea19",
"44a06563554a716cd9c3e1a115e033852d3c55944423a62209a6de24256d27a9",
"57603601ac557794e0a712d043ae182959c8db01139546e43b010aae7dd0b0b6",
"7f8f46d096c568cc2b8a82cf753a08e58ebbe5fe95edd242a35ae976d133a1ea",
"934f08fcdd4bc37f78b902dd9b09fe118956eb63386116945ab3b30ba9e18868",
"a8d5c7be149c51080aa8cbf8056cf90c2a106d68ab56e3df11e8acef932c42b3",
"bd0674b6454229f5c82200d1184020baf2d228a5c960c64f876aa67bc748a027",
"c442430ac43f25c943ebd9ebf443055b898ebd4e42438fd5fcb4cbf74950cf8d",
"e2ac38b7cbd9955e36f9a105c1468f76b3366e1aa407b57d53b2570dd3da5c1b"
],
"workflow": "pr-sous-chef"
}
|
Co-authored-by: copilot-swe-agent[bot] <[email protected]>
|
@copilot fix ci failures |
|
Co-authored-by: copilot-swe-agent[bot] <[email protected]>
The requested base is already an ancestor;
In |
Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Added legacy |


Stacked on
pelikhan/verbose-waddle. The currentrequest_continuationdesign has the safe-outputs job self-dispatch the workflow, which needsactions: writein an agent-adjacent job, cannot gate on human approval, and lets anyaw_contextforge continuation lineage. This PR moves dispatch into a generic, compiler-generated relay workflow that validates every hop and fails closed.How it works
safe-outputs.request-continuationgainscontinuation-policy(workflow-dispatch, or{type: workflow-dispatch, approval: <environment>}). The policy is recorded ascontinuationmetadata in the lock file header.request_continuationhandler validates the request and uploads acontinuation-request-<attempt>artifact instead of dispatching. The safe-outputs job no longer needsactions: write.agentic-continuation-relay.ymlwithparent_run_id/parent_run_attempt. The conclusion job getsactions: writeonly when the feature is enabled; dispatch is skipped when staged..github/workflows/agentic-continuation-relay.ymlis generated lazily inrunPostProcessingForDirectory(likeagentic-maintenance.yml) and removed when no workflow uses the feature. Jobs:resolve-> optionalapprove(environment gate) ->dispatch.relay_run_idin audit / logs schemas.Relay validation (fail closed)
workflow_dispatchon the default branch, same repo, not a fork.actor,triggering_actor, context actor) isgithub-actions[bot]or a user with write/admin.head_shaand rechecked at the branch head (strictermaxwins; approvals must agree).depth < max; request and checkpoint artifacts exist and are unexpired.repository_dispatch).Other changes
gh-aw-durable-*concurrency group and the explicit-concurrency restriction.safe-outputs.md) and Durable runs (engines.md); changeset updated.make recompileregenerated affected locks plus the relay.Worth a careful look
GITHUB_TOKENworkflow could replay a legitimaterelay_run_idto start a duplicate child; it cannot forge lineage, depth, or hints.gh aw add/init,--dir/--no-emitwarnings.Validation
tscclean, ESLint 0 errors, vitest 417 passed / 3 skipped across continuation, durable, and handler-manager suites.pkg/workflowandpkg/cli; targeted continuation/durable/concurrency tests andpkg/parserpass. Remaining full-package failures are pre-existing git-signing fixture tests.make agent-report-progress: all steps pass except custom Go linters, which flag only code not touched here.