Skip to content

Drift status (check 1 of 2)#36

Draft
crutkas wants to merge 3 commits into
mainfrom
signed-copy-drift-status
Draft

Drift status (check 1 of 2)#36
crutkas wants to merge 3 commits into
mainfrom
signed-copy-drift-status

Conversation

@crutkas
Copy link
Copy Markdown
Member

@crutkas crutkas commented May 28, 2026

Layered on top of #34 (the signed-copy drift guard). Please review and merge #34 first. When #34 merges, GitHub will auto-update this PR's base to main and it becomes mergeable on its own.

What this PR adds

A single new workflow: .github/workflows/drift-visibility.yml. It calls the shared comparator (src/tools/check-signed-drift.ps1, introduced in #34) on every PR — no paths: filter, so the check runs even for PRs that only edit src/. When any file drift exists between src/ and the top-level signed copies (Workloads/, windows-dev-config/, wsl-comfort/), the job exits non-zero and the check surfaces as a red ❌ entry named Drift status inside the PR's "Some checks were not successful" panel at the top of the conversation.

What this PR does not add

  • No comparator changes — that script lives in Signed-copy drift guard (check 2 of 2) #34 and is the single source of truth.
  • No badge, no Gist, no PAT, no schedule trigger, no sticky comments.
  • No README change. The dev guide subsection (src/docs/development.md) is the only doc update.

Intended branch protection

This check is informational, not blocking. Do not add it to required status checks in main branch protection. Drift is expected during the window between a src/ change landing on main and the next sign-pipeline cycle catching up; the red ❌ is the awareness signal the user explicitly asked for ("I''m OK with drift, the issue is not knowing there is drift"). The companion Signed copy guard from #34 is the one that should be required.

Verification

Tested locally in a CI-emulating environment (fresh pwsh process spawned with the OS-level WorkingDirectory set to the workspace, matching how the GH Actions runner invokes shell: pwsh steps):

  • Clean tree: comparator reports ok=30, drifted=0, missing_in_root=0, missing_in_src=0; workflow exits 0; job summary shows "✅ Signed copies in sync with src/. 30 file(s) checked. No drift detected."
  • Single byte flipped in windows-dev-config/dev-config.winget (then reverted): comparator reports drifted=1; workflow exits 1; ::notice:: annotation emitted; job summary contains the markdown table:
    | windows-dev-config/dev-config.winget | drifted | bytes differ at offset 0 (src len=39522, root len=39522) |
  • Post-revert verify: clean again, exit 0.

cc reviewers of #34 — same author/scope/intent.

crutkas and others added 2 commits May 27, 2026 22:34
Introduces src/tools/check-signed-drift.ps1 (shared comparator) and
.github/workflows/signed-copy-guard.yml. The workflow runs on PRs
that touch the top-level signed-copy roots and fails if any
PR-touched file no longer matches its src/ counterpart (modulo the
Authenticode signature block on .ps1 files).

A follow-up PR will layer a non-blocking "Drift status" visibility
check on the same comparator (check 1 of 2).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Introduces .github/workflows/drift-visibility.yml. The workflow runs on
every PR (no paths filter) and reuses the shared comparator script
introduced by the preceding signed-copy-drift-guard branch. When any
file drift exists between src/ and the top-level signed copies, the
job exits non-zero so the check surfaces as a red ❌ entry named
"Drift status" in the PR's "Some checks were not successful" panel,
with a markdown table written to the job summary listing every drifted
/ missing file.

Unlike the signed-copy guard, this check is informational — drift is
expected in the window between a src/ change landing on main and the
next sign-pipeline cycle catching up — and is not intended to be a
required status check by default. The user-facing intent is purely
visibility: "I'm OK with drift, the issue is not knowing there is
drift."

Stacked on top of signed-copy-drift-guard. The companion docs
subsection in src/docs/development.md replaces that branch's
forward-reference sentence with a back-reference to this new
"Drift status" subsection.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@crutkas crutkas changed the base branch from signed-copy-drift-guard to main May 28, 2026 05:47
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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