Skip to content

Add chainable health-selected audits and simplify Auditor discovery - #75868

Closed
pelikhan wants to merge 5 commits into
mainfrom
pelikhan/auditor-evidence-scope
Closed

pelikhan wants to merge 5 commits into
mainfrom
pelikhan/auditor-evidence-scope

Conversation

@pelikhan

@pelikhan pelikhan commented Nov 8, 2026 •

Copy link
Copy Markdown
Collaborator

Why

Auditor repeatedly failed at metadata collection with Incomplete or oversized recent run scope; checkpoint unchanged. Run 42458892731 restored a successful collection cache from roughly 14 hours earlier. Historical queries over the approximate checkpoint window returned 2,500 runs, versus 104 in its final hour, supporting a filtered-result ceiling diagnosis. Four additional runs have the same first-failure signature; their logs do not establish which guard branch fired. The exact failed response and restored checkpoint contents were unavailable.

The initial commit implemented bounded oldest-prefix catch-up. At the user's request, this follow-up replaces that custom all-run collector with the existing revision-aware health algorithm and makes its selected targets directly chainable into audit.

Changes

  • Add gh aw audit --health [workflow] for shared health discovery followed by up to five independent audits, rather than a multi-run diff.
  • Add gh aw health --json | gh aw audit --health --stdin --json and saved-report input without repeating discovery. Preserve the original health report, completed audits, remaining targets and explicit partial/error status. JSON stays on stdout despite root help routing.
  • Validate health completeness, repository/host scope, cluster references, duplicate targets and run attempt/update identity before accepting audit results. Add attempt identity to ordinary audit reports and regenerate their schemas/cache version.
  • Replace Auditor's inline pagination/catch-up implementation with a regression-tested trusted collector: a fixed preceding-24-hour health sample, complete all-author open-PR listing, and at most three new singleton stdin audits per invocation. It uses existing released audit --stdin, not an unreleased runtime flag.
  • Use version-2 attempt/update-aware observation state. Partial health/audits, changing run identities, PR incompleteness or API reserve/window failures never advance state or activate the agent. Verify run attempts before and after audits.
  • Preserve read-only scheduled collection, credential-free checkout, draft/count/file publication controls, protected-file review and native lock exclusions; additionally exclude the trusted collector from Auditor-generated patches.
  • Document that this is a bounded current-revision sample, not an exhaustive census or completeness watermark. Remaining target/cluster coverage is explicit. Health's 1,000-request discovery cap plus time/API-reserve limits replaces the old 150-request logs allowance; no shared absolute request cap is claimed.

Validation

  • Focused health, audit, ordinary-output, timeout and schema Go regression suites passed.
  • All 20 isolated collector fixtures passed, including singleton chaining, repeated observations, bounded audit backlog, changed attempts before/during audit, malformed plans, PR pagination and checkpoint preservation.
  • Both direct audit --health and piped health --json | audit --health --stdin worked against existing Auditor evidence. The scoped health scan used 20 metadata requests, selected two runs and audited one with a limit of one; JSON reported complete: true, partial: false, and one remaining target.
  • make agent-report-progress passed. The final additional test/control delta passed focused regressions and make agent-report-progress-no-test without rerunning unchanged impacted Go tests.
  • Normal recompilation succeeded for all 362 workflows; formatting, Go/custom lint, JavaScript lint and workflow-lock freshness passed with existing repository warnings.

Limitations and review

No workflow was dispatched or rerun, and no live checkpoint or credentials were changed. CLI verification only read existing evidence and wrote local reports.

Dry-run compilation remains blocked by Auditor's pre-existing authored host steps; those controls were not removed or bypassed, and no diagnostic lock or live-execution approval is claimed. The earlier independent review covered only the initial catch-up candidate. This health-based follow-up has direct validation but no independent security-review verdict. Review the intentional sampling/activation and budget changes before any live execution.

Split oversized discovery into complete oldest prefixes, retain catch-up failure identities, and delay audits and activation until discovery completes. Preserve metadata limits and checkpoint safety with isolated regression coverage.

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

github-actions Bot commented Nov 8, 2026 •

Copy link
Copy Markdown
Contributor

✅ Design Decision Gate 🏗️ completed the design decision gate check. See the comment below for the result and any generated ADR draft.

Design Decision Gate 🏗️

Outcome: reported_no_action

The agent completed and reported no action. A no-op output alone does not verify that all required work was completed or that publication was possible.

Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.

Generated from Design Decision Gate 🏗️ · routed: opus55 medium · ~11 AIC · ⌖ ~2 AIC · ⊞ 7.7K · ◷

🏗️ ADR gate enforced by Design Decision Gate 🏗️

@github-actions

github-actions Bot commented Nov 8, 2026 •

Copy link
Copy Markdown
Contributor

✅ Ponytail Reviewer completed successfully!

Ponytail Reviewer

Outcome: reported_no_action

The agent completed and reported no action. A no-op output alone does not verify that all required work was completed or that publication was possible.

Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.

Generated from Ponytail Reviewer · routed: gpt56 max · ~4 AIC · ⌖ ~1 AIC · ⊞ 118 · ◷

Generated by Ponytail Reviewer for #75868

@github-actions

github-actions Bot commented Nov 8, 2026 •

Copy link
Copy Markdown
Contributor

✅ PR Specification Reviewer completed successfully!

PR Specification Reviewer

Outcome: reported_no_action

The agent completed and reported no action. A no-op output alone does not verify that all required work was completed or that publication was possible.

Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.

Generated from PR Specification Reviewer · gpt56 · ~2 AIC · ⌖ ~1 AIC · ⊞ 1.7K · ◷

Generated by PR Specification Reviewer for #75868

@github-actions

github-actions Bot commented Nov 8, 2026 •

Copy link
Copy Markdown
Contributor

✅ PR Code Quality Reviewer completed the code quality review.

🔎 Code quality review by PR Code Quality Reviewer

@github-actions

github-actions Bot commented Nov 8, 2026

Copy link
Copy Markdown
Contributor

🧠 Matt Pocock Skills Reviewer is reviewing this pull request using Matt Pocock's engineering skills...

@github-actions

github-actions Bot commented Nov 8, 2026 •

Copy link
Copy Markdown
Contributor

✅ Test Quality Sentinel completed test quality analysis.

Test Quality Sentinel

Outcome: reported_no_action

The agent completed and reported no action. A no-op output alone does not verify that all required work was completed or that publication was possible.

Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.

Generated from Test Quality Sentinel · routed: gpt56 max · ~1 AIC · ⌖ ~2 AIC · ⊞ 6.3K · ◷

🧪 Test quality analysis by Test Quality Sentinel

@github-actions github-actions Bot 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.

Review complete: no actionable correctness, performance, or maintainability issues found in the changed lines. The specialist pass completed with no findings.

🔎 Code quality review by PR Code Quality Reviewer · copilot · gpt50 · ~5 AIC · ⌖ ~1 AIC · ⊞ 1.6K
Comment /review to run again

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

Unresolved batching and prefix-selection defects can prevent failures from triggering audits and leave catch-up unable to advance its checkpoint.

3 open issues
What changed in this PR

Adds bounded catch-up to Auditor’s incremental run collection so oversized discovery windows can make checkpoint progress while audits and agent activation wait for complete evidence.

Changes:

  • Bisects oversized creation windows and checkpoints fully collected prefixes with overlap and backward-progress protection.
  • Introduces failure carry-over state and gates activation on complete discovery and evidence.
  • Adds catch-up and failure-boundary fixtures, updates workflow guidance, and regenerates the executable workflow.
File Description
scripts/​auditor-workflow.test.cjs Adds catch-up, pagination, boundary, and checkpoint-preservation fixtures.
.github/​workflows/​auditor.md Implements bounded discovery, failure carry-over, activation gates, and updated guidance.
.github/​workflows/​auditor.lock.yml Regenerates the executable workflow and metadata hashes.

Review effort: Max (auto)

Comment thread .github/workflows/auditor.md Outdated
(total !== undefined && total !== body.total_count)) {
throw new Error('Incomplete or changing recent run scope; checkpoint unchanged');
}
if (body.total_count >= 1000) {

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.

The bisection-based collector was replaced with revision-aware health selection in 13c53c9, so this tracked-prefix selection path is no longer used.

Comment thread .github/workflows/auditor.md Outdated
Comment on lines +134 to +135
const midpoint = Math.floor((Date.parse(start) + Date.parse(discoveryEnd)) / 2000) * 1000;
if (page !== 1 || midpoint <= Date.parse(state.checkpoint)) {

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.

The midpoint catch-up collector was replaced with revision-aware health selection in 13c53c9, so this boundary case no longer applies to the current collector.

Comment thread .github/workflows/auditor.md Outdated
Comment on lines +365 to +366
catchup_failures: !manifest.evidence_complete &&
(!discoveryComplete || (state.catchup_failures || []).length) ? newFailureKeys : []});

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.

The failure carry-over logic was removed with the bisection-based collector and replaced by revision-aware health selection in 13c53c9.

@pelikhan pelikhan changed the title Fix bounded Auditor checkpoint catch-up Add chainable health-selected audits and simplify Auditor discovery Nov 8, 2026
...response.data.map(pr => ({
number: pr.number,
title: pr.title,
body: pr.body,

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.

This assignment focused on syncing main and fixing the impacted Go test failure; it did not change PR text handling in the collector. This security concern remains unaddressed and should stay open.

...response.data.map(pr => ({
number: pr.number,
title: pr.title,
body: pr.body,

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.

This assignment focused on syncing main and fixing the impacted Go test failure; it did not change PR body persistence in the collector. This disclosure concern remains unaddressed and should stay open.

@gh-aw-bot

Copy link
Copy Markdown
Collaborator

@copilot

Copilot assignment requested for the following outstanding work:

  1. Update this branch with the latest main using make merge-main, resolving any conflicts and preserving the intended changes.
  2. Fix failing check impacted-go-tests (FAILURE): https://github.com/github/gh-aw/actions/runs/42463756609/job/128678518820.

Once you start work, post this work summary as a PR comment without the leading Copilot mention, including the Sous-chef head, work, and state lines below, to record that the assignment is running. Apply the necessary fixes on this PR's existing branch, reply to each listed review thread and resolve it when addressed. Ignore feedback already answered or resolved; stop when only human review or CI remains. Do not merge or trigger CI.

Sous-chef requested-head: 13c53c9
Sous-chef requested-work: 42e5d572d9d75b7168fe7d0aeda0717cc07e65ed240f6d299e6fec661214f1ac
Sous-chef requested-state: 6daaefe6fcb074539865a5f00cb7ec10ec5778238db4ee5b2e7ab7e0278778d7

Generated by 👨🍳 PR Sous Chef · pi · haiku45 · ~15 AIC · ⌖ ~12 AIC · ⊞ 1.2K · ◷
Comment /souschef to run again

Copilot AI commented Nov 8, 2026

Copy link
Copy Markdown
Contributor

@copilot

Copilot assignment requested for the following outstanding work:...

I’m updating this branch from main and investigating the impacted-go-tests failure, then I’ll make and validate the necessary fixes without triggering CI.

Sous-chef requested-head: 13c53c9
Sous-chef requested-work: 42e5d572d9d75b7168fe7d0aeda0717cc07e65ed240f6d299e6fec661214f1ac
Sous-chef requested-state: 6daaefe6fcb074539865a5f00cb7ec10ec5778238db4ee5b2e7ab7e0278778d7

@pelikhan

pelikhan commented Nov 8, 2026

Copy link
Copy Markdown
Collaborator Author

@copilot piping is not essential since --health provides already the dynamic selection of runs. make sure it does not add too much complexity

Copilot AI commented Nov 8, 2026

Copy link
Copy Markdown
Contributor

@copilot piping is not essential since --health provides already the dynamic selection of runs. make sure it does not add too much complexity

Removed health-report stdin/pipeline support; audit --health now performs discovery directly, and ordinary audit --stdin remains for run IDs. Validation passed in e2b9a91.

@pelikhan pelikhan closed this Nov 8, 2026
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.

5 participants