Skip to content

fix(copilot): re-approve the baseline for measurement scope 2 - #120

Merged
imran-siddique merged 2 commits into
mainfrom
fix/copilot-baseline-scope
Aug 15, 2026
Merged

fix(copilot): re-approve the baseline for measurement scope 2#120
imran-siddique merged 2 commits into
mainfrom
fix/copilot-baseline-scope

Conversation

@imran-siddique

@imran-siddique imran-siddique commented Aug 15, 2026

Copy link
Copy Markdown
Member

main is currently failing the Copilot integrity gate on every new pull request. This fixes it.

What happened

#119 committed .agentrust/copilot-baseline.json at scope 1. #117 widened the MCP path list and moved MEASUREMENT_SCOPE to 2. They landed in that order, so the committed baseline is now a scope behind the engine that reads it, and fail-on-drift: true turns that into a red check for everyone.

This is the scope mechanism working: it refuses to guess whether a newly measured file was always present or was just added. The baseline is re-approved at scope 2; the measured composition remains empty.

Security review

An earlier revision restored internal pull-request comments by granting pull-requests: write to the same job that executes the pull request's local action code. That expansion was removed during review. Verification remains read-only, with no persisted checkout credentials and no comment permission.

Restoring internal comments safely is separate work because it needs a trust boundary that does not execute head-controlled code under a write-capable token.

Evidence

  • python copilot/engine/capture.py verify exits 0 on this head.
  • The effective diff against main changes only the generated baseline scope and capture time.
  • GitHub's live Copilot integrity check must pass before merge.

#119 committed the baseline and #117 widened the MCP path list. They landed
in that order, so `main` carries a scope 1 baseline against a scope 2 engine
and the gate fails every new pull request with a re-approval notice until
someone re-approves.

This is the scope mechanism doing its job, not a defect: it refuses to guess
whether a newly measured file was always there or was just added. It still
needs the one action it asks for.

Re-approved with `python copilot/engine/capture.py approve`. The composition
itself is unchanged and still empty; only `scope` moves from 1 to 2.

Also turns the pull-request comment back on for pull requests from this
repository. It was disabled outright to keep fork pull requests read-only,
which is the right instinct with the wrong blast radius: it also removed the
comment from every internal pull request, which is the integration's main
output. The job now requests pull-requests: write and passes `comment` only
when head and base are the same repository, so forks stay read-only and get
the job summary, which carries the same content.

Signed-off-by: Imran Siddique <imran.siddique@opaque.co>
@github-actions

Copy link
Copy Markdown

Copilot agent composition unchanged

Nothing added, nothing subtracted in the instructions, skills and MCP configuration this repository gives Copilot.

Signed-off-by: Imran Siddique <imran.siddique@opaque.co>
@imran-siddique
imran-siddique merged commit 7d10436 into main Aug 15, 2026
5 checks passed
@imran-siddique
imran-siddique deleted the fix/copilot-baseline-scope branch August 15, 2026 23:40
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.

1 participant