Skip to content

CI: Clarify shared resolver drift reporting - #182

Merged
tykeal merged 1 commit into
lfreleng-actions:mainfrom
modeseven-lfreleng-actions:ci/clarify-sync-check-reporting
Aug 3, 2026
Merged

tykeal merged 1 commit into
lfreleng-actions:mainfrom
modeseven-lfreleng-actions:ci/clarify-sync-check-reporting

Conversation

@ModeSevenIndustrialSolutions

Copy link
Copy Markdown
Member

Problem

The scheduled run on 2026-08-03 (run 30793145483) correctly caught the window where the sole-org fallback paired PRs had landed in harden-runner-block-action but not yet here. The reporting, however, made that hard to tell:

  • no GITHUB_STEP_SUMMARY output at all, only three untitled ::error:: annotations;
  • a failed curl and a genuine byte-difference produced the same annotation shape and the same exit code, so a transport outage was indistinguishable from the drift the job exists to measure — or from a plain workflow syntax error;
  • the console log ended with a raw diff tail followed immediately by Error: lines, with no marker saying whether the comparison had actually completed.

Change

Outcomes are now separated and labelled everywhere they surface:

Outcome Exit Annotation title
✅ All shared files byte-identical 0 —
❌ Comparison ran, files differ 1 Shared resolver drift
⚠️ Sibling file unfetchable, nothing compared 2 Sync check could not run

Also:

  • each file logs ✅ Comparison performed successfully followed by an explicit per-file verdict, so a diff tail is never the last thing before Error:;
  • diff --label names both sides (… (this repository) / … (lfreleng-actions/harden-runner-block-action)) instead of leaking sibling.tmp;
  • a step summary is written with a per-file result table, collapsible diffs, and the next action to take — including the note that landing the paired PR turns this green on the next push to main;
  • a per-outcome counter block precedes the verdict;
  • temp files move to ${RUNNER_TEMP} rather than the checkout.

The "could not run" case explicitly states that it is evidence of neither drift nor sync, which is the distinction that was missing.

Paired change

An identical change (differing only in SIBLING_REPO) is raised in the sibling repository so both sides report consistently. The mirrored src/resolve_config_source.py and tests/test_resolve_config_source.py are untouched, so the two PRs are independent and neither can deadlock the other.

Validation

  • pre-commit run --files .github/workflows/sync-shared-resolver.yaml — passes (yamllint, actionlint incl. shellcheck, check-github-workflows).
  • All three outcomes exercised locally against a stubbed curl (in-sync, drift, fetch failure), confirming exit codes 0/1/2 and the rendered summary in each case.
  • This workflow triggers on pushes touching itself, so the in-sync path is exercised on merge.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR improves the sync-shared-resolver GitHub Actions workflow’s drift-check reporting so CI failures clearly distinguish “real drift” from “check could not run”, and provide richer job summaries for debugging and next steps.

Changes:

  • Adds distinct outcomes (0/1/2) with titled annotations and a structured GITHUB_STEP_SUMMARY table + collapsible diffs.
  • Improves console logging with explicit “comparison performed successfully” markers and per-file verdicts.
  • Moves temporary artifacts into ${RUNNER_TEMP} and improves diff labeling to clearly name both sides.
Suppressed comments (1)

.github/workflows/sync-shared-resolver.yaml:200

  • This summary text says “no comparison was performed”, but this block can run even when some files were successfully compared (e.g., one matched, one fetch failed). Reword to reflect an incomplete/inconclusive run rather than claiming nothing was compared.
              echo "One or more sibling files could not be fetched, so"
              echo "**no comparison was performed**. This is a transport"
              echo "or availability failure and is evidence of neither"
              echo "drift nor sync. Re-run this job."

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

A red run of this job previously gave no way to tell whether the
check had measured drift or had simply failed to run: both cases
emitted an untitled ::error:: annotation and exit code 1, with no
job summary at all. The scheduled run that caught the sole-org
fallback drift window was therefore hard to distinguish from a
broken workflow.

Separate the outcomes so the signal is unambiguous. Drift keeps
exit code 1 and is titled as a resolver-drift annotation; an
unfetchable sibling file now exits 2, is titled as a check that
could not run, and states that it is evidence of neither drift
nor sync. Each file logs an explicit success/failure marker
alongside its diff, and the job writes a step summary carrying a
per-file result table, collapsible diffs and the next action to
take.

Co-authored-by: Claude <noreply@anthropic.com>
Signed-off-by: Matthew Watkins <mwatkins@linuxfoundation.org>
Copilot AI review requested due to automatic review settings August 3, 2026 12:51
@ModeSevenIndustrialSolutions
ModeSevenIndustrialSolutions force-pushed the ci/clarify-sync-check-reporting branch from c3fb215 to 48dd095 Compare August 3, 2026 12:51

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.

Suppressed comments (2)

.github/workflows/sync-shared-resolver.yaml:175

  • The diff error path (rc >= 2) is labeled as a "tooling failure" and advises re-running. But rc>=2 can also happen for non-transient, actionable problems like a missing local file path, so the annotation text should avoid claiming the cause and should point to verifying file existence/tool availability if it persists.
              echo "::error title=Sync check could not run::diff exited" \
                "${rc} while comparing ${f}; no verdict was reached for" \
                "this file. This is a tooling failure, not resolver" \
                "drift. Re-run this job."

.github/workflows/sync-shared-resolver.yaml:129

  • The curl failure annotation text states this is a "transport failure" and suggests re-running; however curl can also fail due to persistent causes (e.g., 404 because the file/ref path is wrong). The message should avoid asserting a specific root cause and should direct maintainers to verify the file/ref if retries keep failing.

This issue also appears on line 172 of the same file.

              echo "::error title=Sync check could not run::Could not" \
                "fetch ${f} from ${SIBLING_REPO}; no verdict was" \
                "reached for this file. This is a transport failure," \
                "not resolver drift. Re-run this job."

@tykeal
tykeal merged commit 9aebbbe into lfreleng-actions:main Aug 3, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CI CI and tests updates

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants