Skip to content

Commit 5001f4a

Browse files
authored
fix(workflows): harden recurring agentic incidents (#1529)
1 parent 9358c26 commit 5001f4a

6 files changed

Lines changed: 22 additions & 5 deletions

File tree

.github/workflows/doc-freshness-check.lock.yml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.github/workflows/doc-freshness-check.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,10 @@ agent files, and any tool that ingests repo context), so they must be
4646
> **Out of scope — do not touch:** `README.md` and other human-facing site
4747
> content are owned by the separate `docs-writer` workflow. Never edit files
4848
> outside `AGENTS.md` and `docs/**` in this workflow.
49+
> Treat Rust, TypeScript, YAML, and other non-documentation files as read-only
50+
> evidence. If fixing documentation drift appears to require a source-code
51+
> change, do not make that code change in this workflow; either document the
52+
> current behavior accurately or emit `noop` / `report-incomplete`.
4953
5054
## Documentation Model
5155

@@ -227,6 +231,10 @@ There is no build step for these markdown docs, but before opening a PR:
227231
- Confirm all links you added or moved resolve to real files/anchors.
228232
- Confirm all modified files are within `AGENTS.md`, `docs/**`, or `prompts/**`.
229233
If a needed fix is outside this scope, do not edit it in this workflow.
234+
- Before calling `create-pull-request`, run `git diff --name-only` and remove or
235+
revert any source-code/configuration changes outside the allowed documentation
236+
paths. The safe-output allowlist is a backstop, not a substitute for this
237+
check.
230238

231239
## Pull Request Format
232240

.github/workflows/test-gap-finder.lock.yml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.github/workflows/test-gap-finder.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,11 @@ EOF
110110

111111
If you find meaningful gaps, implement them directly in `tests/**` instead of filing an issue.
112112
For this workflow, **high-value** means coverage for security-sensitive paths, error-handling branches, or previously untested public behavior.
113+
Only edit test files under `tests/**`. Treat `src/**`, workflow files, and other
114+
production/configuration files as read-only while diagnosing coverage gaps. If a
115+
useful test exposes a production bug or requires a production-code fix, do not
116+
include that source change in this workflow's PR; skip that candidate and choose
117+
a test-only gap or emit `noop`.
113118

114119
Scope limits per run:
115120
- Add or update at most **3** high-value tests.
@@ -121,8 +126,12 @@ Before opening a PR, run:
121126
```bash
122127
cargo test 2>&1
123128
cargo clippy --all-targets --all-features 2>&1
129+
git diff --name-only
124130
```
125131

132+
If `git diff --name-only` lists anything outside `tests/**`, revert those files
133+
before calling `create-pull-request`.
134+
126135
Open at most one pull request via `create-pull-request` when tests were added and checks passed.
127136
Note: this repository requires `GH_AW_CI_TRIGGER_TOKEN` for PR CI triggers when using `create-pull-request`.
128137
PRs opened via the default `GITHUB_TOKEN` do not trigger follow-up workflows.

.github/workflows/update-awf-version.lock.yml

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

.github/workflows/update-awf-version.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ safe-outputs:
3535
required-title-prefix: "[deps-release-notes] "
3636
max: 10
3737
state-reason: "not_planned"
38-
max-ai-credits: -1
38+
max-ai-credits: 1500
3939
max-daily-ai-credits: -1
4040
---
4141

0 commit comments

Comments
 (0)