Skip to content

Resume Auditor sampling while preserving unresolved checkpoint gaps - #76596

Merged
pelikhan merged 2 commits into
mainfrom
pelikhan/recent-aw-failure-clusters
Nov 10, 2026
Merged

pelikhan merged 2 commits into
mainfrom
pelikhan/recent-aw-failure-clusters

Conversation

@pelikhan

Copy link
Copy Markdown
Collaborator

Summary

Fix Auditor's permanent stale-checkpoint halt without silently resetting historical coverage. Keep the existing bounded current-revision health sample and preserve missed intervals as unresolved recovery obligations.

Root cause

Both 42834459335 and 42844693035, in the investigation's 2026-11-10 14:05:56–16:05:56 UTC creation window, restored stale collection state and failed before agent startup: Collection checkpoint gap exceeds 24 hours; refusing to reset it silently.

Discovery already samples the preceding 24 hours rather than consuming the checkpoint as a historical census cursor. Repeated failed collection cannot advance its success-only checkpoint, so the age guard permanently disabled current monitoring.

Changes

  • Resume the unchanged bounded current health sample while recording sampling_gaps; never label those intervals covered or recovered.
  • Preserve content-addressed bundles containing the entire previous checkpoint and referenced compact query reports before normal retention filtering. Hash-check and re-upload them, persist unresolved gap records, and emit warnings on every subsequent collection.
  • Fail closed on missing/tampered snapshots, invalid paths/times, unavailable bootstrap history, and missing cache after any prior Auditor run or retry. Overall workflow failure does not prove that collection saved no state.
  • Include health partial/reason/completeness metadata in collection failures without relaxing validation.
  • Preserve existing permissions, GitHub recipients, isolation, representative selection, PR deduplication, and mutation safeguards.

Validation

  • node --test scripts/auditor-workflow.test.cjs: 42 passed, including stale-state resumption, preserved reports, persistent gaps, whole-cache loss after overall success/failure/cancellation, retry/bootstrap failures, tampering and traversal rejection.
  • make fmt, explicit normal Auditor compile, make recompile: 365/365 compiled, only intended Auditor lock changed.
  • Final make agent-report-progress: passed, including build, impacted-test selection, schema freshness and workflow drift.
  • Final independent security review: PASS, all ten required questions YES, no confirmed vulnerabilities. Earlier review concerns about cache loss and collection-success/workflow-failure were retained and resolved; user explicitly authorized restarting the unavailable reviewer.

Coverage and limitations

No workflow was dispatched/rerun, no live checkpoint/cache recovery was performed, and no existing write was replayed. Production resumption remains unverified until this source is adopted and existing scheduled runs exercise it.

Historical gaps remain unresolved and require separately authorized reconciliation or an explicit acknowledged-gap decision. Bundles preserve compact reports, not a standalone backup of raw artifacts. Missing state after prior execution requires recovery, not automatic bootstrap. Existing GitHub history/cache/artifact retention limits apply.

An earlier diagnostic --dry-run emitted a lock and passed shellcheck, but its overall gate failed on the generated custom-job output literal warning (jobs.collect.outputs.has_new_failures). This PR does not claim clean diagnostic/live validation or dispatch authorization; the normal production lock passed repository validation.

Fresh all-open PR checks found no equivalent Auditor fix. #76425 was inspected and concerns work-queue settlement, not Auditor sampling. Independent cluster fixes are #76585, #76587, #76588 and #76589; this PR does not duplicate their scope.

Authored Markdown security overview

Auditor source at this commit: missing-state initialization now checks prior execution history; stale age becomes explicit unresolved-gap persistence with hash-verified bundles; prompts/docs distinguish current sampling from historical reconciliation. New effects are read-only repository Actions history and existing recovery cache/artifact persistence. Credentials, recipients, permissions, firewall, protected-file review and publication safeguards are unchanged.

Record unresolved sampling gaps and prior compact reports, reject cache-loss bootstrap after any prior execution, and retain fail-closed evidence validation.

Co-authored-by: Copilot App <[email protected]>
@pelikhan
pelikhan marked this pull request as ready for review November 10, 2026 22:05
Copilot AI adaptive review requested due to automatic review settings November 10, 2026 22:05
@pelikhan

Copy link
Copy Markdown
Collaborator Author

@copilot resolve the merge conflicts on this branch.

Copilot AI commented Nov 10, 2026

Copy link
Copy Markdown
Contributor

@pelikhan Unfortunately I hit an unexpected error while processing your comment. I've automatically reported this to GitHub.

You can ask me to try again later by mentioning me in a new comment.

If you want to contact GitHub about this error, please mention the following identifier so they can better serve you: 91ecc87e-7b90-4857-9b83-98a104c6187b

Sorry for the inconvenience!

@pelikhan

Copy link
Copy Markdown
Collaborator Author

@copilot resolve the merge conflicts on this branch.

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

Cache eviction can halt monitoring indefinitely because artifacts lack recoverable state, while delayed snapshot integrity checks repeatedly waste API and download budgets when snapshots are missing or changed.

2 open issues
What changed in this PR

Updates Auditor’s collection workflow to resume current health sampling after stale checkpoints while preserving unresolved historical coverage gaps.

Changes:

  • Replace the stale-checkpoint halt with persistent sampling-gap records.
  • Preserve, hash-check and re-upload prior checkpoint and compact-report bundles.
  • Add missing-state history checks, clearer failure diagnostics and regression coverage.
File Description
scripts/​auditor-workflow.test.cjs Adds coverage for stale-state resumption, persistent gaps, cache loss and damaged snapshots.
.github/​workflows/​auditor.md Implements gap preservation and bootstrap safeguards; documents recovery limits.
.github/​workflows/​auditor.lock.yml Regenerates the executable workflow and metadata for the source changes.

Review effort: Max (auto)

Comment on lines +115 to +116
throw new Error('Collection checkpoint cache is missing with prior Auditor execution history; ' +
'restore the previous checkpoint and recovery files before resuming; history is not reset');
!/^checkpoint-[a-f0-9]{64}\.json$/.test(gap.state_file)) {
throw new Error('Invalid sampling gap record; checkpoint unchanged');
}
}
…ilure-clusters

# Conflicts:
#	.github/workflows/auditor.lock.yml
#	.github/workflows/auditor.md

Co-authored-by: pelikhan <[email protected]>

Copilot AI commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

@copilot resolve the merge conflicts on this branch.

Resolved and pushed in merge commit 8195fa6104.

@copilot resolve the merge conflicts on this branch.

Resolved and pushed in merge commit 8195fa6104.

@github-actions

Copy link
Copy Markdown
Contributor

🎉 This pull request is included in a new release.

Release: v1.2.3

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.

3 participants