Repository navigation
Measure Whether a Copilot Setup Step Can Place Content Where the Reviewer Reads It - #1449
Conversation
…up Steps Reach the Reviewer Issue #1321 rests on whether a hub checkout can be placed in front of the Copilot reviewer without carrying anything, which is the reach-not-carry question the fleet already answers that way for tooling. GitHub documents `.github/workflows/copilot-code-review.yml` as the way to configure the environment a review runs in, with `copilot-setup-steps.yml` as its fallback, and the job id rather than its name is what the mechanism matches. The step writes a token keyed to the run id, which is not derivable from the tree, so a review quoting it read the file rather than the workflow that wrote it. An empty run id would write a token that is derivable, so the step fails instead of writing one. This is a measurement rather than a permanent workflow, and it is reverted once the question is answered. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
…ter Checkout Cannot Clean It Review of the first commit raised three defects that each defeat the measurement or the repository. `actions/checkout` persists a credential into the workspace by default, and this workspace is handed to a model that then writes public comments, so the step is removed rather than configured. Nothing here needs repository content, and GitHub checks the repository out after these steps finish in any case. That same documented ordering breaks the single-location write: the checkout Copilot runs afterward cleans untracked files, so a token written only to the workspace is plausibly deleted before a review reads it. It is now written to the workspace, the runner temp directory, and the home directory, which also turns a positive result into evidence of where a setup step can reach. The token was printed to the run log, and this repository is public, so a review could have quoted it from the log without reading any file, which is the confound the run id was chosen to avoid. It is no longer printed. The workspace path is added to `.gitignore`, since every review of an unrelated pull request runs this step while the workflow is on the default branch. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
…scribing a Pin Review raised that one fail-fast step made three independent measurements share one fate. An unset `RUNNER_TEMP` aborted the step under `-u` before the home directory was ever tried, and the probe then reported "nothing at home", which is the answer it exists to distinguish from "home is unreadable". Each destination now reports its own outcome and none can end the step. The block also declares `shell: bash`, since `set -Eeuo pipefail` is bash-only and the shell this environment runs a setup step under is not established. Verified against `bash --noprofile --norc -eo pipefail` for all three destinations present, one unset, one unwritable, and an empty run id. The job dropped `contents: read`, which granted a repository-read token to the setup environment of every review in this repository while it sits on the default branch, for a job that performs no checkout and no network read. It now inherits the workflow's empty set. `docs/homelab-runner-selection-plan.md` prescribed pinning this workflow to `ubuntu-24.04` and asserting `runner.environment` at runtime. Both came from evaluating self-hosted runners and neither is kept: a GitHub-hosted job in this fleet runs on `ubuntu-latest`, which all twenty other `runs-on` declarations here already say, and an assertion cannot make a job safe once GitHub has assigned it to the wrong runner, so it buys nothing the organization policy does not already give while costing a rule about which runner a job may accept. The self-hosted label keeps its own version, since that names a machine rather than selecting a GitHub-hosted image. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
…th the Probe Measures
A setup step reads the job's keys rather than the workflow's, so a workflow-level `permissions: {}`
alone left the Copilot path running under whatever the repository default grants. The empty set is
now declared on the job as well, and the workflow-level block stays, since it still governs the
ordinary Actions run and any job added later.
The `.gitignore` entry is removed, because it altered the measurement it was meant to tidy up
after. Nothing local ever creates that directory, since it is written only on a runner, and there
an ignored file and an untracked file are not equivalent: a clean without `-x` keeps the first and
removes the second, and a context gather that enumerates through git does not see the first at all.
Either outcome would make the workspace result unrepresentative of the question being asked, and
the other two destinations sit outside the repository and would not share it.
A `push:` trigger is added so the copy on the default branch is validated by a run of its own
rather than only through a merge ref. It carries the same branch filter as the pull request
trigger, since GitHub's example omits one and a `push:` filtered only by path runs on every branch.
The runner plan keeps the factual correction and drops the reasoning added beside it. That
reasoning claimed the pin and the assertion "were tried", which the same document records as
implementation not started, and claimed the fleet has no rule restricting which runner a job may
accept, which this document's own policy table, selector, trust contract and rollback section each
contradict. Its test list no longer asserts a fixed Copilot runner, and the bullet is dropped
rather than reworded, since the two bullets after it already state what a static test can check
and a live runner assignment is not statically checkable. The plan now records that the workflow
path is occupied by a temporary measurement.
Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
|
ⓘ Qodo reviews are paused because your trial has ended. Ask your workspace admin to add credits to resume reviews. Manage billing |
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Advanced Run ID: 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 |
There was a problem hiding this comment.
🟡 Changes recommended
The runner plan text remains internally contradictory about whether repo-level Copilot runner customization is disabled, and the new workflow is configured to run as a normal Actions workflow on PR/push when it likely only needs to exist for Copilot consumption.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
This PR introduces a temporary GitHub Actions workflow at .github/workflows/copilot-code-review.yml to measure whether Copilot code review setup steps can place non-derivable content where the reviewer can read it, and updates the homelab runner plan to reflect the workflow’s temporary occupancy and the move away from pinning a GitHub-hosted image.
Changes:
- Add
.github/workflows/copilot-code-review.ymlwith a setup-step job that writes a probe token to multiple locations without printing it. - Update
docs/homelab-runner-selection-plan.mdto switch the GitHub-hosted references fromubuntu-24.04toubuntu-latestand adjust the verification checklist accordingly.
File summaries
| File | Description |
|---|---|
| docs/homelab-runner-selection-plan.md | Updates the runner selection plan language and examples to align with the temporary Copilot workflow and ubuntu-latest. |
| .github/workflows/copilot-code-review.yml | Adds the temporary Copilot setup-step measurement workflow that writes a non-derivable probe token to candidate locations. |
Review details
- Files reviewed: 2/2 changed files
- Comments generated: 2
- Review effort level: Lite
💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Review raised that the plan states repository customization of the Copilot runner type is disabled and then specifies a repository-level `runs-on` for that same workload, which reads as certain about a precedence the document never established. The sentence now says the two appear to contradict and points at the issue tracking it, rather than asserting either side. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
There was a problem hiding this comment.
🟢 Approval recommended
The changes are small, self-contained, and the workflow avoids credential checkout and avoids logging the probe token while aligning the docs with the intended temporary measurement.
Review details
- Files reviewed: 2/2 changed files
- Comments generated: 0 new
- Review effort level: Lite
…nch Can Answer It (#1450) Promotes one commit, `ba86490`, and nothing else. The measurement in it only engages from the default branch, which is the whole reason this promotion exists rather than waiting for an ordinary release. GitHub documents that a `copilot-code-review.yml` is not picked up unless it sits on the default branch, so the question #1321 turns on cannot be answered from a feature branch. ## What lands - `.github/workflows/copilot-code-review.yml`, a setup-steps workflow that writes a token to three destinations and reports each outcome separately. It performs no checkout, holds no token scope, and never prints the token. - `docs/homelab-runner-selection-plan.md`, which no longer prescribes pinning that workflow to a fixed image or asserting `runner.environment` at runtime. A GitHub-hosted job in this repository runs on `ubuntu-latest`, and the fleet has no rule restricting which runner a job may accept. ## What this obliges The workflow is temporary and is reverted once #1321 has its answer. While it sits here it defines the setup environment for every Copilot review in this repository, which is one extra short job per review. Its own job ran and passed on #1449, so the file is known to parse and execute. The revert is recorded in the workflow's own header comment, in the runner plan at the paragraph describing that path, and on #1321. It does not depend on anyone remembering it. The unresolved question of whether an organization Copilot runner setting or a repository workflow wins is tracked in #1448 and is not settled here.
Temporary measurement for #1321, which asks whether the fleet can put a rule in front of a reviewer
by reaching for it rather than carrying it. GitHub documents
.github/workflows/copilot-code-review.ymlas the way to configure the environment a Copilot codereview runs in, and this adds one, with a step that writes a token a review can be asked to report.
This is not permanent content. It lands on
develop, is promoted tomainbecause themechanism only engages from the default branch, produces one measurement, and is then reverted. The
maintainer authorised that sequence.
What it measures
The token is
PROBE-SETUP-plus the run id, which is not derivable from the tree, and it is neverprinted, so a review quoting it read a file rather than a log or the workflow that wrote it. It is
written to three destinations, each reporting its own outcome, because GitHub checks the repository
out after setup steps complete and that checkout cleans untracked files. A positive result
therefore also says where a setup step can reach:
${GITHUB_WORKSPACE}/.copilot-probe/setup-token.txt${RUNNER_TEMP}/copilot-probe-setup-token.txt${HOME}/.copilot-probe-setup-token.txtThe shell block was verified against
bash --noprofile --norc -eo pipefailin every state thereview raised: all three destinations present, one unset, one unwritable, one a file where a
directory was expected, symlinked targets, an over-long path, and an empty run id. The three writes
are independent, an unreachable destination reports itself, and an empty run id aborts before
writing a token that would have been derivable.
The runner change beside it
docs/homelab-runner-selection-plan.mdprescribed pinning this workflow toubuntu-24.04andadding a step that fails unless
runner.environmentisgithub-hosted. Both are removed. AGitHub-hosted job in this repository runs on
ubuntu-latest, which all twenty otherruns-ondeclarations here already say, and the fleet has no rule restricting which runner a job may accept.
The self-hosted label keeps its own version, since that names a machine rather than selecting a
GitHub-hosted image. The plan's test list no longer asserts a fixed Copilot runner, and it records
that this workflow path is occupied until #1321 is answered.
Review record
Four local adversarial passes ran against this branch, raising 5, 9, 8 and 6 findings. Every
introducedfinding is fixed. Two are worth naming because they were real rather than stylistic:an
actions/checkoutthat would have persisted a repository credential into the workspace an LLMthen reads before writing public comments, and a
catthat published the token to a public runlog, which would have let a review quote it without reading anything.
One
pre-existingfinding is filed as #1448 and blocks nothing: the plan says repositorycustomization of the Copilot runner type is disabled, then describes the repository setting it.
The final three-line correction was verified by assertion and
greprather than by a fifth pass.