Fix CI contracts and custom grader download failures by pelikhan · Pull Request #70217 · github/gh-aw · GitHub
Skip to content

Fix CI contracts and custom grader download failures - #70217

Merged
pelikhan merged 1 commit into
mainfrom
pelikhan-cuddly-garbanzo
Oct 19, 2026
Merged

pelikhan merged 1 commit into
mainfrom
pelikhan-cuddly-garbanzo

Conversation

@pelikhan

Copy link
Copy Markdown
Collaborator

Summary

Fix the failures observed in main CI run 39229760817 and the related CGO run 39226402518:

  • Document work expiry and hard-clear diagnostic codes while retaining the playbook's 2,800-word budget.
  • Align grader help and global safe-output token fixtures with the current contract; preserve the prohibition on user-provided conclusion steps.
  • Record getExecOutput calls in the checkout bridge so existing fetch-safety assertions observe the current implementation.
  • Grant the Agy reusable-workflow caller the read-only PR permission required by its generated safe-output lifecycle checks, with job-scoped assertions.
  • Surface registered custom-grader download errors without changing best-effort bulk log downloads; verify failed downloads preserve built-in results and can recover on a later request.

Validation

  • make build and make fmt
  • make test-guidance (15 tests)
  • go test ./pkg/cli ./pkg/workflow -run '^(TestAuditCustom|TestAgyProductionConformancePermissionsAreBoundedAndScoped|TestFormalRS05a_|TestDownloadArtifactsByName)' -count=1
  • go test -tags integration ./pkg/cli ./pkg/workflow -run '^(TestGradersCommandIntegration|TestGitHubTokenValidation.*)$' -count=1
  • actionlint -oneline .github/workflows/credentials-check.yml
  • make agent-report-progress: impacted unit tests passed; lint initially encountered another session's shared linter lock. Retried the non-test gate with an isolated TMPDIR: make agent-report-progress-no-test passed lint, schema freshness, and workflow drift checks (345 workflows in sync).

No workflow runs were dispatched.

Surface registered custom grader artifact download failures without changing best-effort log downloads. Align grader help, token validation, checkout command recording, and Agy caller permissions with current runtime contracts. Document newly introduced work-queue diagnostics within the guidance budget.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@pelikhan
pelikhan marked this pull request as ready for review October 19, 2026 09:42
Copilot AI max review requested due to automatic review settings October 19, 2026 09:42
@pelikhan
pelikhan merged commit b8f6f36 into main Oct 19, 2026
40 of 45 checks passed
@pelikhan
pelikhan deleted the pelikhan-cuddly-garbanzo branch October 19, 2026 09:42
@github-actions

Copy link
Copy Markdown
Contributor

@github-actions

Copy link
Copy Markdown
Contributor

🔎 PR Code Quality Reviewer is reviewing code quality for this pull request...

@github-actions

Copy link
Copy Markdown
Contributor

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

@github-actions

Copy link
Copy Markdown
Contributor

🔬 Test Quality Sentinel is analyzing test quality on this pull request...

@github-actions

Copy link
Copy Markdown
Contributor

✂️ Ponytail Reviewer has started processing this pull request

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

Expired optional grader artifacts can prevent audits from rendering otherwise available results.

2 open issues
What changed in this PR

Repairs gh-aw CI contract checks and surfaces registered custom-grader download failures while preserving best-effort bulk downloads.

Changes:

  • Updates diagnostic guidance within the playbook’s word budget.
  • Aligns test fixtures and Agy permissions with current contracts.
  • Propagates custom-grader download errors and tests cleanup and recovery.
File Description
pkg/​workflow/​security_architecture_rs05a_formal_test.go Records checkout output-command calls for safety assertions.
pkg/​workflow/​github_token_validation_test.go Expects rejection of conclusion token-minting steps.
pkg/​workflow/​agy_engine_test.go Checks caller and job-scoped permissions.
pkg/​cli/​logs_download.go Adds strict download-error option.
pkg/​cli/​logs_download_artifacts.go Returns download failures when requested.
pkg/​cli/​graders_integration_test.go Updates grader help expectations.
pkg/​cli/​audit_custom_graders.go Enables strict custom-grader downloads.
pkg/​cli/​audit_custom_graders_test.go Tests failed-download cleanup and later recovery.
.github/​workflows/​credentials-check.yml Grants the Agy caller read-only PR access.
.github/​aw/​debug-playbook.md Documents expiry and hard-clear codes; condenses guidance.

Review effort: Max

}
if err := downloadArtifactsByName(ctx, downloadArtifactsOptions{
runID: cfg.runID, outputDir: cfg.outputDir, owner: cfg.owner, repo: cfg.repo, hostname: cfg.hostname, verbose: cfg.verbose,
failOnDownloadError: true,
Comment on lines +166 to +168
if opts.failOnDownloadError {
return fmt.Errorf("failed to download artifact %q: %w", name, cmdErr)
}
@github-actions

Copy link
Copy Markdown
Contributor

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.

2 participants