Skip to content

Promote the Copilot Review Environment Measurement so the Default Branch Can Answer It - #1450

Merged
ptr727 merged 2 commits into
mainfrom
develop
Sep 8, 2026
Merged

ptr727 merged 2 commits into
mainfrom
develop

Conversation

@ptr727

@ptr727 ptr727 commented Sep 8, 2026

Copy link
Copy Markdown
Owner

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.

…ewer Reads It (#1449)

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.yml` as the way to configure the
environment a Copilot code
review 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 to
`main` because the
mechanism 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 never
printed, 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:

| Destination | Path |
| --- | --- |
| Workspace | `${GITHUB_WORKSPACE}/.copilot-probe/setup-token.txt` |
| Runner temp | `${RUNNER_TEMP}/copilot-probe-setup-token.txt` |
| Home | `${HOME}/.copilot-probe-setup-token.txt` |

The shell block was verified against `bash --noprofile --norc -eo
pipefail` in every state the
review 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.md` prescribed pinning this workflow
to `ubuntu-24.04` and
adding a step that fails unless `runner.environment` is `github-hosted`.
Both are removed. A
GitHub-hosted job in this repository runs on `ubuntu-latest`, which all
twenty other `runs-on`
declarations 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
`introduced` finding is fixed. Two are worth naming because they were
real rather than stylistic:
an `actions/checkout` that would have persisted a repository credential
into the workspace an LLM
then reads before writing public comments, and a `cat` that published
the token to a public run
log, which would have let a review quote it without reading anything.

One `pre-existing` finding is filed as #1448 and blocks nothing: the
plan says repository
customization of the Copilot runner type is disabled, then describes the
repository setting it.

The final three-line correction was verified by assertion and `grep`
rather than by a fifth pass.

---------

Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
Copilot AI lite review requested due to automatic review settings September 8, 2026 21:37
@qodo-code-review

Copy link
Copy Markdown

ⓘ Qodo reviews are paused because your trial has ended. Ask your workspace admin to add credits to resume reviews. Manage billing

@coderabbitai

coderabbitai Bot commented Sep 8, 2026 •

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Advanced

Run ID: a847cfdb-ec41-4f19-a690-25971ef0686e


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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The updated Markdown introduces implicit inline issue links that conflict with the repo's reference-style link convention for docs.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

Promotes the temporary Copilot review environment measurement to the default branch so GitHub will apply .github/workflows/copilot-code-review.yml, enabling #1321's setup-step reachability test from main.

Changes:

  • Adds .github/workflows/copilot-code-review.yml with a copilot-setup-steps job that writes a probe token to multiple locations without checking out the repo.
  • Updates docs/homelab-runner-selection-plan.md to remove the earlier recommendation to pin the Copilot workflow runner image and to record the currently-occupied workflow path and the unresolved precedence question (#1448).
File summaries
File Description
docs/homelab-runner-selection-plan.md Updates runner-selection guidance and documents the temporary measurement occupying the Copilot setup workflow path.
.github/workflows/copilot-code-review.yml Introduces the temporary Copilot setup-steps workflow used to measure where setup steps can write probe content.
Review details
  • Files reviewed: 2/2 changed files
  • Comments generated: 1
  • Review effort level: Lite

💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread docs/homelab-runner-selection-plan.md Resolved
…y Other Link Here (#1451)

Answers the one finding on the promotion pull request #1450.

The Copilot review environment measurement added two issue references to
`docs/homelab-runner-selection-plan.md` as inline links. Every Markdown
file in the repository uses reference-style links only, except the four
read one section at a time, and this document already follows that rule:
its opening line reaches issue 889 through a definition. The two new
references now do the same, defined under the file's existing `<!--
GitHub -->` group.

No prose changes, only the link form.

---------

Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
Copilot AI review requested due to automatic review settings September 8, 2026 22:03

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The workflow is narrowly scoped (no checkout, empty permissions, no token printing) and the documentation updates match the stated intent and link structure conventions.

Review details
  • Files reviewed: 2/2 changed files
  • Comments generated: 0 new
  • Review effort level: Lite

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants