Repository navigation
Resume Auditor sampling while preserving unresolved checkpoint gaps - #76596
Conversation
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]>
|
@copilot resolve the merge conflicts on this branch. |
|
@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: Sorry for the inconvenience! |
|
@copilot resolve the merge conflicts on this branch. |
There was a problem hiding this comment.
🟡 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)
| 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]>
|
🎉 This pull request is included in a new release. Release: |


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
sampling_gaps; never label those intervals covered or recovered.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.make agent-report-progress: passed, including build, impacted-test selection, schema freshness and workflow drift.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-runemitted 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.