mirror of
https://github.com/garrytan/gstack.git
synced 2026-09-20 11:52:20 +02:00
v1.84.1.0 fix: default Codex and Claude to frontier models (#2835)
* fix: default cross-model workflows to frontier models * chore: bump version and changelog (v1.82.1.0) Co-Authored-By: OpenAI Codex <noreply@openai.com> * fix: repair frontier eval budgets and workflow instructions Preserve frontier models and quality thresholds while fixing truncated judge output, ordered section expansion, consent checks, QA scoring, and ship audit gates. Add regression coverage and refresh generated docs. Co-Authored-By: OpenAI Codex <noreply@openai.com> * fix: resolve workflow gaps exposed by frontier evals Clarify plan-review ordering and fallback modes, preserve deploy readiness gates, honor configured merge methods, correct benchmark and canary contracts, and restore vendored installs on setup failure. Cover recovery with real-shell regressions. Co-Authored-By: OpenAI Codex <noreply@openai.com> * fix: use agent capture budgets for deploy evals Multi-turn deploy and benchmark sessions were incorrectly limited to the single-call judge timeout. Use the existing capture tier and leave outer-test cleanup headroom, with a free policy regression test. Keep all behavioral assertions and frontier models unchanged. Co-Authored-By: OpenAI Codex <noreply@openai.com> * fix: clarify retro workflow and evaluate compare instructions Include compare mode in the frontier judge excerpt, define metric sources and snapshot ordering, and preserve the existing prompt-size budget. Co-authored-by: OpenAI Codex <noreply@openai.com> * fix: make documentation release review and publication consistent Review before commit, clarify changelog safeguards and unavailable reviewer modes, and preserve raw PR bodies across separate shell calls. Keep title sync in one shell and add regression coverage. Co-authored-by: OpenAI Codex <noreply@openai.com> --------- Co-authored-by: OpenAI Codex <noreply@openai.com>
This commit is contained in:
co-authored by
OpenAI Codex
parent
c8f0c4e368
commit
71f6048e8a
+26
-26
@@ -56,24 +56,9 @@ gh pr view --json url,number,state -q 'if .state == "OPEN" then "PR #\(.number):
|
||||
glab mr view -F json 2>/dev/null | jq -r 'if .state == "opened" then "MR_EXISTS" else "NO_MR" end' 2>/dev/null || echo "NO_MR"
|
||||
```
|
||||
|
||||
If an **open** PR/MR already exists: **update** the PR body using `gh pr edit --body-file "$PR_BODY_FILE"` (GitHub) or `glab mr update -d ...` (GitLab). Always regenerate the PR body from scratch using this run's fresh results (test output, coverage audit, review findings, adversarial review, TODOS summary, documentation_section from Step 18). Never reuse stale PR body content from a prior run. **Run the same redaction scan-at-sink (PR body + title) as the create path (Step 19) before editing — scan the temp file, then `gh pr edit --body-file` from it.**
|
||||
Record whether an open PR/MR exists. For BOTH paths, compose fresh results below, scan the body and final title, then use the matching publication path after the scan. Do not publish or skip to Step 20 yet.
|
||||
|
||||
**REST fallback (#1079):** on some repos `gh pr edit` hard-errors with a GraphQL deprecation mentioning `repository.pullRequest.projectCards` ("Projects (classic) is being deprecated..."). That is a `gh` GraphQL-path problem, not a permissions problem — do not re-ask for auth. Fall back to the REST endpoint, which never touches the deprecated field, using the SAME already-scanned temp file: `PR_NUMBER=$(gh pr view --json number -q .number)` then `gh api "repos/{owner}/{repo}/pulls/$PR_NUMBER" -X PATCH -F body=@"$PR_BODY_FILE"` for the body, and `gh api "repos/{owner}/{repo}/pulls/$PR_NUMBER" -X PATCH -f title="$NEW_TITLE"` when the title edit below hits the same error. Verify with the same self-checks as the primary path.
|
||||
|
||||
**Always update the PR title to start with `v$NEW_VERSION`.** PR titles use the workspace-aware format `v<NEW_VERSION> <type>: <summary>` — version ALWAYS first, no exceptions, no "custom title kept intentionally" escape hatch. The shared helper `bin/gstack-pr-title-rewrite.sh` is the single source of truth for the rule.
|
||||
|
||||
1. Read the current title: `CURRENT=$(gh pr view --json title -q .title)` (or `glab mr view -F json | jq -r .title`).
|
||||
2. Compute the corrected title: `NEW_TITLE=$(~/.claude/skills/gstack/bin/gstack-pr-title-rewrite.sh "$NEW_VERSION" "$CURRENT")`. The helper handles three cases: title already correct (no-op), title has a different `v<X.Y.Z.W>` prefix (replace it), or title has no version prefix (prepend one).
|
||||
3. If `NEW_TITLE` differs from `CURRENT`, run `gh pr edit --title "$NEW_TITLE"` (or `glab mr update -t "$NEW_TITLE"`).
|
||||
4. **Self-check:** re-fetch the title and assert it starts with `v$NEW_VERSION `. If it does not, retry the edit once. If still wrong, surface the failure to the user.
|
||||
|
||||
This keeps the title truthful when Step 12's queue-drift detection rebumps a stale version, and forces the format on PRs that were created without it.
|
||||
|
||||
Print the existing URL and continue to Step 20.
|
||||
|
||||
If no PR/MR exists: create a pull request (GitHub) or merge request (GitLab) using the platform detected in Step 0.
|
||||
|
||||
The PR/MR body should contain these sections:
|
||||
The PR/MR body should contain these sections (never reuse a prior run's body):
|
||||
|
||||
```
|
||||
## Summary
|
||||
@@ -162,8 +147,8 @@ you missed it.>
|
||||
<If Step 18 returned `documentation_section: null` (no docs updated), omit this section entirely.>
|
||||
|
||||
## Test plan
|
||||
- [x] All Rails tests pass (N runs, 0 failures)
|
||||
- [x] All Vitest tests pass (N tests)
|
||||
- [x] <Actual project test command>: <observed passing summary>
|
||||
- [x] <Other executed test lane, if any>: <observed passing summary>
|
||||
|
||||
🤖 Generated with [Claude Code](https://claude.com/claude-code)
|
||||
```
|
||||
@@ -177,6 +162,11 @@ sections in tool-attributed fences (` ```codex-review ` / ` ```greptile `) so th
|
||||
engine WARN-degrades the example credentials those tools quote instead of blocking
|
||||
the PR (a live-format credential inside the fence still blocks).
|
||||
|
||||
**Always update the PR title to start with `v$NEW_VERSION`.** For an existing PR,
|
||||
read `CURRENT=$(gh pr view --json title -q .title)` (or `glab mr view -F json | jq -r .title`)
|
||||
and compute `NEW_TITLE=$(~/.claude/skills/gstack/bin/gstack-pr-title-rewrite.sh "$NEW_VERSION" "$CURRENT")`.
|
||||
For a new PR, compose `v<NEW_VERSION> <type>: <summary>`. Use that final value below.
|
||||
|
||||
```bash
|
||||
REDACT_VIS=$(~/.claude/skills/gstack/bin/gstack-config get redact_repo_visibility 2>/dev/null)
|
||||
[ -z "$REDACT_VIS" ] && REDACT_VIS=$(gh repo view --json visibility -q .visibility 2>/dev/null | tr 'A-Z' 'a-z')
|
||||
@@ -190,14 +180,24 @@ case $? in
|
||||
3) echo "BLOCKED — credential in PR body. Rotate + redact, do not create the PR."; exit 1 ;;
|
||||
2) echo "MEDIUM findings — confirm per finding (sterner on public) before proceeding." ;;
|
||||
esac
|
||||
# Also scan the title (short, single-line):
|
||||
printf '%s' "v$NEW_VERSION <type>: <summary>" | ~/.claude/skills/gstack/bin/gstack-redact --repo-visibility "$REDACT_VIS" --json
|
||||
# Set NEW_TITLE to the final title before scanning. For an existing PR, use
|
||||
# gstack-pr-title-rewrite.sh with NEW_VERSION and the current title.
|
||||
NEW_TITLE="<final vNEW_VERSION type: summary>"
|
||||
printf '%s' "$NEW_TITLE" | ~/.claude/skills/gstack/bin/gstack-redact --repo-visibility "$REDACT_VIS" --json
|
||||
```
|
||||
|
||||
HIGH blocks (exit 3, no skip). MEDIUM → AskUserQuestion (PII subset offers
|
||||
`--auto-redact`). Same scan runs before the `gh pr edit --body` path (Step 17).
|
||||
`--auto-redact`). Same scan runs before the `gh pr edit --body` path (Step 19).
|
||||
|
||||
**If GitHub:** create from the SCANNED file (exact bytes scanned = bytes sent).
|
||||
**Existing open PR/MR:** update from the scanned file using `gh pr edit --body-file "$PR_BODY_FILE"` (GitHub) or `glab mr update -d "$(cat "$PR_BODY_FILE")"` (GitLab). If blocks ran in separate shells, restate the literal scanned file path and final `NEW_TITLE`; never compose a second body.
|
||||
|
||||
Update the title with the same scanned `NEW_TITLE`: `gh pr edit --title "$NEW_TITLE"` (or `glab mr update -t "$NEW_TITLE"`).
|
||||
|
||||
**REST fallback (#1079):** if `gh pr edit` fails with the `repository.pullRequest.projectCards` GraphQL deprecation, do not re-ask for auth. Use the SAME scanned file: `PR_NUMBER=$(gh pr view --json number -q .number)`, then `gh api "repos/{owner}/{repo}/pulls/$PR_NUMBER" -X PATCH -F body=@"$PR_BODY_FILE"`; for the title use `gh api "repos/{owner}/{repo}/pulls/$PR_NUMBER" -X PATCH -f title="$NEW_TITLE"`.
|
||||
|
||||
**Self-check:** re-fetch the title and assert it starts with `v$NEW_VERSION `. Retry once if wrong, then surface any failure. Print the existing URL and continue to Step 20; do not run the create commands below.
|
||||
|
||||
**No open PR/MR, GitHub:** create from the SCANNED file (exact bytes scanned = bytes sent).
|
||||
`$PR_BODY_FILE` comes from the scan block above — restate it in this shell if
|
||||
blocks ran separately, and never proceed with an empty file:
|
||||
|
||||
@@ -205,11 +205,11 @@ blocks ran separately, and never proceed with an empty file:
|
||||
# PR title MUST start with v$NEW_VERSION — enforced on every run, no exceptions.
|
||||
# (See Step 19 idempotency block + bin/gstack-pr-title-rewrite.sh for the rule.)
|
||||
[ -s "$PR_BODY_FILE" ] || { echo "ERROR: scanned body file missing/empty — re-run the scan block." >&2; exit 1; }
|
||||
gh pr create --base <base> --title "v$NEW_VERSION <type>: <summary>" --body-file "$PR_BODY_FILE"
|
||||
gh pr create --base <base> --title "$NEW_TITLE" --body-file "$PR_BODY_FILE"
|
||||
rm -f "$PR_BODY_FILE"
|
||||
```
|
||||
|
||||
**If GitLab:**
|
||||
**No open PR/MR, GitLab:**
|
||||
|
||||
```bash
|
||||
# MR title MUST start with v$NEW_VERSION — enforced on every run, no exceptions.
|
||||
@@ -218,7 +218,7 @@ rm -f "$PR_BODY_FILE"
|
||||
# from a fresh heredoc (that reopens the scan-vs-send gap). $PR_BODY_FILE comes
|
||||
# from the scan block above; never proceed with an empty file.
|
||||
[ -s "$PR_BODY_FILE" ] || { echo "ERROR: scanned body file missing/empty — re-run the scan block." >&2; exit 1; }
|
||||
glab mr create -b <base> -t "v$NEW_VERSION <type>: <summary>" -d "$(cat "$PR_BODY_FILE")"
|
||||
glab mr create -b <base> -t "$NEW_TITLE" -d "$(cat "$PR_BODY_FILE")"
|
||||
rm -f "$PR_BODY_FILE"
|
||||
```
|
||||
|
||||
|
||||
Reference in New Issue
Block a user