Skip to content

Commit 7c5ea99

Browse files
authored
Merge pull request #410 from githubnext/codex/evergreen-diagnostics-timeout
Improve Evergreen CI diagnostics
2 parents a7269d3 + 6cb49d1 commit 7c5ea99

3 files changed

Lines changed: 65 additions & 10 deletions

File tree

.github/workflows/evergreen.lock.yml

Lines changed: 24 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.github/workflows/evergreen.md

Lines changed: 35 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ concurrency:
2222
group: gh-aw-${{ github.workflow }}-${{ github.event.inputs.pr || github.event.pull_request.number || github.ref || github.run_id }}
2323
cancel-in-progress: true
2424

25+
timeout-minutes: 60
26+
2527
permissions:
2628
contents: read
2729
issues: read
@@ -52,7 +54,7 @@ jobs:
5254
name: Evaluate PR gate state
5355
shell: bash
5456
env:
55-
GH_TOKEN: ${{ github.token }}
57+
GH_TOKEN: ${{ secrets.GH_AW_CI_TRIGGER_TOKEN || github.token }}
5658
REPO: ${{ github.repository }}
5759
EVENT_NAME: ${{ github.event_name }}
5860
EVENT_ACTION: ${{ github.event.action }}
@@ -434,11 +436,38 @@ pre-agent-steps:
434436
echo "Evergreen workspace is on branch $current_branch at $current_head_sha for PR #$PR_NUMBER."
435437
436438
tools:
439+
timeout: 600
437440
github:
438441
toolsets: [repos, issues, pull_requests, actions]
439442
bash:
440-
- gh
443+
- awk
444+
- base64
445+
- bun:*
446+
- find
447+
- gh:*
448+
- git add:*
449+
- git branch:*
450+
- git checkout:*
451+
- git commit:*
452+
- git diff:*
453+
- git log:*
454+
- git rev-parse:*
455+
- git rm:*
456+
- git show:*
457+
- git status
458+
- git switch:*
459+
- grep
441460
- jq
461+
- mkdir
462+
- node:*
463+
- npm:*
464+
- npx:*
465+
- pwd
466+
- rg
467+
- rm:*
468+
- sed
469+
- tar:*
470+
- unzip:*
442471

443472
imports:
444473
- shared/skills/pr-intake.md
@@ -529,6 +558,10 @@ are merge gates.
529558
4. Run `ci-run-deduper`.
530559
5. Run `ci-gate-evaluator`.
531560
6. Run `ci-log-parser` for failing checks.
561+
For CI, lint, typecheck, or test failures, collect the exact failing command
562+
and full relevant diagnostics before guessing or delegating. Use GitHub job
563+
logs/API, downloaded logs when needed, and targeted local reproduction such as
564+
`bun run lint` or `bun run typecheck`.
532565
7. Run `merge-blocker-comment-reader` only for configured gates or explicit
533566
merge blockers.
534567
8. Run `deterministic-repair` before agentic edits.

.github/workflows/shared/evergreen/repo-policy.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,8 +98,8 @@ readiness controller and the agentic orchestrator must both respect this file.
9898
through safe outputs by the agent (never from preflight) and labeled
9999
`evergreen: trigger CI`; they do not count as semantic repair attempts.
100100
- Token policy: `GITHUB_TOKEN` for reads and control-plane label writes.
101-
`GH_AW_CI_TRIGGER_TOKEN` (existing PAT) is used by gh-aw for pushes so that PR
102-
branch pushes trigger CI (default-token pushes do not).
101+
`GH_AW_CI_TRIGGER_TOKEN` (existing PAT) is used by gh-aw for CI reruns and
102+
pushes so that PR branch pushes trigger CI (default-token pushes do not).
103103

104104
## Repair Policy
105105

@@ -121,6 +121,10 @@ readiness controller and the agentic orchestrator must both respect this file.
121121
- E2E: `bun run test:e2e`
122122
- Golden snapshots: `python golden/generate.py`
123123
- Workflow compile: `gh aw compile` (and `apm compile` when APM sources change)
124+
- CI/lint diagnosis policy: when a CI gate fails, fetch the exact failing job
125+
logs and run the targeted repo command locally before editing. For lint
126+
failures, `bun run lint` is the source of truth; do not guess from truncated
127+
GitHub summaries.
124128
- Generated file policy: recompile committed lockfiles/snapshots when their
125129
sources change. After editing any `.github/workflows/*.md` workflow, recompile
126130
and commit the generated `.lock.yml`.

0 commit comments

Comments
 (0)