Repository navigation
Add per-checkout data-only acknowledgement for ref warnings - #76806
Conversation
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
This comment has been minimized.
This comment has been minimized.
|
✅ 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.
|
|
✅ Ponytail Reviewer completed successfully! Ponytail ReviewerOutcome: 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.
|
|
✅ PR Code Quality Reviewer completed the code quality review. 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.
|
|
🧠 Matt Pocock Skills Reviewer has completed the skills-based review. ✅
|
|
✅ PR Specification Reviewer completed successfully!
|
🏗️ Design Decision Gate — ADR RequiredThis PR makes significant changes to core business logic (160 added lines under 📄 Draft ADR committed:
📋 What to do next
Once an ADR is linked in the PR body, this gate re-runs and verifies that the implementation matches the decision. 🔎 Evidence used
References: PR #76806 · workflow run 42992498557
|
Comment MemoryPeek at saved memory (pr-code-quality-reviewer)Note This comment is managed by comment memory.Expand the saved memory block to view or edit the persistent context for this thread.
|
There was a problem hiding this comment.
🔎 Code quality review by PR Code Quality Reviewer · copilot · gpt50 · ~3 AIC · ⌖ ~1 AIC · ⊞ 1.6K
Comment /review to run again
| "checkout step %q uses checkout.ref %q with an untrusted or unparseable expression, and host setup steps run after it. "+ | ||
| "Imported or workflow-owned steps and pre-agent-steps execute outside the sandbox and may run checked-out code. "+ | ||
| "Keep the agent workspace on a trusted ref and inspect fetched untrusted refs only as data; do not check them out or run their scripts on the host. "+ | ||
| "Keep executable host tooling on a trusted ref and inspect untrusted refs only as data; do not run their scripts on the host. "+ |
There was a problem hiding this comment.
The revised warning removes the explicit guidance not to check untrusted refs out on the host. The new wording only warns against running scripts, but checkout itself can expose repo-controlled configuration, hooks, plugins, or tooling to host setup. Please retain the original "do not check them out or run their scripts on the host" guidance for the normal warning, then add the data-only acknowledgement as a separate, explicitly self-attested exception.
There was a problem hiding this comment.
Restored the explicit host-workspace checkout warning and kept data-only as a separate, self-attested exception. Commit: 4a12457.
| continue | ||
| } | ||
| if !checkoutRefMayBeUntrusted(entry.key.repository, entry.ref) { | ||
| if entry.dataOnly || !checkoutRefMayBeUntrusted(entry.key.repository, entry.ref) { |
There was a problem hiding this comment.
data-only currently suppresses the warning for the default workspace checkout as well as separate data checkouts. A workflow can therefore set checkout: {ref: ${{ needs.plan.outputs.branch }}, data-only: true} while imported or pre-agent host steps execute in that same workspace, bypassing the guard this warning provides and contradicting the documented instruction not to switch the host workspace to an untrusted ref. Please reject or ignore data-only for the workspace-root/default checkout, and add a regression test that still expects the warning there.
There was a problem hiding this comment.
Restricted warning suppression to separate non-root checkout paths; default and other workspace-root checkouts still warn. Added regression coverage. Commit: 4a12457.
There was a problem hiding this comment.
Found two blocking correctness/documentation issues: the acknowledgement bypasses the warning for the default workspace checkout, and the revised warning weakens the explicit host-checkout safety guidance. The specialist pass completed; findings were independently adjudicated. Static review only; tests were not run per review instructions.
🔎 Code quality review by PR Code Quality Reviewer · copilot · gpt50 · ~3 AIC · ⌖ ~1 AIC · ⊞ 1.6K
Comment /review to run again
There was a problem hiding this comment.
Reviewed PR head fcc347a against Checkout Behavior Specification v1.3.4. The intentional data-only behavior is aligned with implementation and tests. Synchronized docs/src/content/docs/specs/checkout-behavior-specification.md to v1.4.0 (2026-11-11): added literal boolean/default semantics, warning-only scope, conservative merge rule, T-CHK-022, checklist coverage, and changelog entry. Specification commit publication is queued via safe output; no blocking findings.
Generated by PR Specification Reviewer for #76806 · copilot · gpt50 · ~5 AIC · ⌖ ~2 AIC · ⊞ 1.6K
Comment /review-specs to run again
There was a problem hiding this comment.
Skills-Based Review 🧠
Applied /grill-with-docs (wording and vocabulary) and /codebase-design (generated docs and schema consistency). Requesting changes on two items. The core logic looks correct.
📋 Key Themes & Highlights
Key Themes
- Dropped safety guidance: the warning no longer says not to check out untrusted refs on the host, which is the main hazard the warning exists to flag.
- Generated docs out of sync:
frontmatter-full.mdis generated from the schema byscripts/generate-schema-docs.jsand has nodata-onlyentry. - Default checkout suppression:
data-onlyon the default workspace checkout silences the warning even when imported host steps run in that workspace. This matches the stated author-acknowledgement model, but it is worth confirming that is the intent.
Positive Highlights
- ✅ Merge semantics are correct:
dataOnlyis ANDed across merged entries, so any request without the flag keeps the warning. - ✅ The option is literal-boolean only, and the parser test covers strings, expressions, numbers, and null.
- ✅ The
DataOnlyfield is excluded from JSON, which is safe becauseCheckoutConfigis never marshalled. Imported checkouts go throughParseCheckoutConfigs, so the flag survives import. - ✅ Targeted tests pass in
pkg/workflow(CheckoutRefWithSteps|CheckoutDataOnly) andpkg/parser(CheckoutDataOnly).
Notes
- The
pr-triagestep was not run separately. Change type and skill selection were made directly from the diff.
@copilot please address the review comments above.
🧠 Reviewed using Matt Pocock's skills by Matt Pocock Skills Reviewer · copilot · routed: haiku55 xhigh · ~5 AIC · ⌖ ~2 AIC · ⊞ 6.6K
Comment /matt to run again
| "checkout step %q uses checkout.ref %q with an untrusted or unparseable expression, and host setup steps run after it. "+ | ||
| "Imported or workflow-owned steps and pre-agent-steps execute outside the sandbox and may run checked-out code. "+ | ||
| "Keep the agent workspace on a trusted ref and inspect fetched untrusted refs only as data; do not check them out or run their scripts on the host. "+ | ||
| "Keep executable host tooling on a trusted ref and inspect untrusted refs only as data; do not run their scripts on the host. "+ |
There was a problem hiding this comment.
[/grill-with-docs] The rewritten warning drops the instruction not to check out untrusted refs on the host. The old text said "do not check them out or run their scripts on the host", and that is the core risk: a manual checkout can run Git hooks, which the reference docs already call out. The new text also replaces "agent workspace" with "executable host tooling", but the docs still say agent workspace, so the vocabulary now drifts.
💡 Suggested wording
Restore the removed clause and keep the original terms, for example: "Keep the agent workspace and executable host tooling on a trusted ref, inspect untrusted refs only as data, and do not check them out or run their scripts on the host."
@copilot please address this.
There was a problem hiding this comment.
Restored the agent-workspace and no-checkout/no-script guidance, with separate self-attested data-only wording. Commit: 4a12457.
| "description": "Configuration for a single actions/checkout step", | ||
| "additionalProperties": false, | ||
| "properties": { | ||
| "data-only": { |
There was a problem hiding this comment.
[/codebase-design] This schema change is not reflected in the generated reference docs. docs/src/content/docs/reference/frontmatter-full.md is generated from this schema by scripts/generate-schema-docs.js, and it currently has no data-only entry. Regenerate it so the published reference matches the schema.
💡 Command
make generate-schema-docs@copilot please address this.
There was a problem hiding this comment.
Updated the schema description and regenerated frontmatter-full.md from the schema. Commit: 4a12457.
There was a problem hiding this comment.
🟡 Changes recommended
Ref-warning checks run before path derivation, allowing an untrusted-ref warning to be suppressed even when merged checkout requests lack unanimous data-only opt-in.
2 open issues
What changed in this PR
Adds a per-checkout data-only acknowledgement to gh-aw’s ref-warning heuristic, supporting workflows where trusted host tooling reads dynamic checkouts only as data.
Changes:
- Accepts literal booleans and requires every merged checkout request to opt in.
- Suppresses the marked checkout’s ref warning without changing checkout execution.
- Documents the acknowledgement’s limits and adds validation, merge, and warning tests.
| File | Description |
|---|---|
pkg/workflow/checkout_ref_warning.go |
Applies scoped suppression and updates warning guidance. |
pkg/workflow/checkout_ref_warning_test.go |
Tests suppression, merging, parsing, and unchanged generated steps. |
pkg/workflow/checkout_manager.go |
Stores the acknowledgement and combines merged requests conservatively. |
pkg/workflow/checkout_config_parser.go |
Parses data-only and rejects non-boolean values. |
pkg/parser/schemas/main_workflow_schema.json |
Defines the option’s type, default, and semantics. |
pkg/parser/schema_checkout_data_only_test.go |
Tests schema validation for object and list forms. |
docs/src/content/docs/reference/checkout.md |
Documents tooling/data separation and safety limitations. |
Review effort: Max (auto)
| continue | ||
| } | ||
| if !checkoutRefMayBeUntrusted(entry.key.repository, entry.ref) { | ||
| if entry.dataOnly || !checkoutRefMayBeUntrusted(entry.key.repository, entry.ref) { |
There was a problem hiding this comment.
Moved the ref-warning check after derived checkout path processing and added coverage for an implicit path merging with an explicit path in 4a12457.
| | `max-repos` | integer | Maximum unique repositories per `multi: true` checkout entry. Requires `allowed-repos` in multi mode; defaults to `10`. Must be a positive literal integer. Ignored in single-repository mode. | | ||
| | `allow-private-repos` | boolean | With `multi: true`, allow private/internal targets in a runtime list hosted by a private/internal repository. Requires `allowed-repos` in multi mode; defaults to `false` and must be a literal boolean. Public hosts always reject non-public multi targets, even when `true`. Ignored in single-repository mode. | | ||
| | `ref` | string | Branch, tag, or SHA to checkout. Defaults to the triggering ref. | | ||
| | `data-only` | boolean | Acknowledge data-only consumption by host steps and suppress only this checkout's checkout-ref warning. Defaults to `false`; literal boolean only. Does not enforce isolation or change execution. All merged requests for the target must opt in. See [Separate Tooling and Data Checkouts](#separate-tooling-and-data-checkouts). | |
There was a problem hiding this comment.
Added data-only to the checkout syntax reference with its literal-boolean, default, merge, suppression, and acknowledgement semantics in 4a12457.
|
🍳 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": "3982e84057a5839c2974553f782d20a954974b1d",
"kind": "requested",
"schema_version": "1",
"state": "92ffda3623892d22b8d53c8542beabadd7f5c2f0c50931c1d79350880cfbfba0",
"work": [
"b3c292a66779b78b9bfec3bf5bf81bda5aababfbd8a0d1b6254e825ed72e3eda",
"d1162f29093f0939e36e9146b1d66d48cf6a6e62bdd578a830a1124f3cc9ec98",
"d642cf19c2d25456ada72f1f6b98bc76964b388aa26ef3a25a62ac1fd901f63d",
"fca2f0c8bb46e9f667213072a921c9cc4a57d3d6a00af90459bc09301e78ce38"
],
"workflow": "pr-sous-chef"
}
|
Co-authored-by: gh-aw-bot <259018956+gh-aw-bot@users.noreply.github.com>
…ing-tooling-data-repositories Co-authored-by: gh-aw-bot <259018956+gh-aw-bot@users.noreply.github.com>
Co-authored-by: gh-aw-bot <259018956+gh-aw-bot@users.noreply.github.com>
|
Category: bug | Risk: medium | Score: 69/100 (impact 33 + urgency 20 + quality 16). Recommended action: auto_merge. Batch: pr-batch:copilot-runtime. Reason: narrow safety improvement for checkout warnings, with clear behavior and passing CI.
|
|
🍳 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": "4a124570f1110860b172f3738841aacfb7ad9fdf",
"kind": "requested",
"schema_version": "1",
"state": "c3dd0f49c8b8dfb2020a7227a0c1b426d8eb30bdadcd2e9727c99e7222a1f8fc",
"work": [
"42e5d572d9d75b7168fe7d0aeda0717cc07e65ed240f6d299e6fec661214f1ac",
"43282e7f5b3023b8c8cf9099eab79e7b99f650965f08b47d3df33cde5589879d"
],
"workflow": "pr-sous-chef"
}
|
…ing-tooling-data-repositories Co-authored-by: gh-aw-bot <259018956+gh-aw-bot@users.noreply.github.com>
Merged latest
Merged latest |
|
🎉 This pull request is included in a new release. Release: |


The checkout-ref heuristic warns whenever host steps follow a dynamic checkout, even when trusted tooling consumes that checkout only as data.
data-only, defaulting tofalse, to suppress only the marked checkout’s ref warning. Every merged request for the same target must opt in.Host tooling must not execute scripts, hooks, plugins, or configuration from the data checkout.