mirror of
https://github.com/zed-industries/zed.git
synced 2026-06-01 03:14:56 +07:00
ci: Harden background-agent MVP git authentication loop (#49373)
## Summary - refresh git auth headers before each per-crash iteration in `background_agent_mvp` - add guarded `git fetch`/`git checkout` handling so one candidate auth failure doesn’t fail the entire run ## Context - fixes the auth failure seen in workflow run 22106378719 (`fatal: could not read Username for 'https://github.com'`) - related Linear issue: BIZOPS-853 ## Testing - ruby -e "require 'yaml'; YAML.load_file('.github/workflows/background_agent_mvp.yml')" Release Notes: - N/A
This commit is contained in:
parent
03ed4e9036
commit
7620c684eb
2 changed files with 13 additions and 4 deletions
15
.github/workflows/background_agent_mvp.yml
vendored
15
.github/workflows/background_agent_mvp.yml
vendored
|
|
@ -148,8 +148,17 @@ jobs:
|
|||
continue
|
||||
fi
|
||||
|
||||
git fetch origin main
|
||||
git checkout -B "$BRANCH" origin/main
|
||||
git config --local http.https://github.com/.extraheader "AUTHORIZATION: bearer ${GH_TOKEN}"
|
||||
|
||||
if ! git fetch origin main; then
|
||||
echo "WARNING: Failed to fetch origin/main for $CRASH_ID — skipping"
|
||||
continue
|
||||
fi
|
||||
|
||||
if ! git checkout -B "$BRANCH" origin/main; then
|
||||
echo "WARNING: Failed to create checkout branch $BRANCH for $CRASH_ID — skipping"
|
||||
continue
|
||||
fi
|
||||
|
||||
CRASH_DATA_FILE="/tmp/crash-data/crash-${CRASH_ID}.md"
|
||||
if [ ! -f "$CRASH_DATA_FILE" ]; then
|
||||
|
|
@ -170,7 +179,7 @@ jobs:
|
|||
2. Follow .factory/prompts/crash/investigate.md and write ANALYSIS.md
|
||||
3. Follow .factory/prompts/crash/link-issues.md and write LINKED_ISSUES.md
|
||||
4. Follow .factory/prompts/crash/fix.md to implement a minimal fix with tests
|
||||
5. Run validators required by the fix prompt for the affected crate(s)
|
||||
5. Run validators required by the fix prompt for the affected code paths
|
||||
6. Write PR_BODY.md with sections:
|
||||
- Crash Summary
|
||||
- Root Cause
|
||||
|
|
|
|||
|
|
@ -147,7 +147,7 @@ Required workflow:
|
|||
2. Follow .factory/prompts/crash/investigate.md and write ANALYSIS.md
|
||||
3. Follow .factory/prompts/crash/link-issues.md and write LINKED_ISSUES.md
|
||||
4. Follow .factory/prompts/crash/fix.md to implement a minimal fix with tests
|
||||
5. Run validators required by the fix prompt for the affected crate(s)
|
||||
5. Run validators required by the fix prompt for the affected code paths
|
||||
6. Write PR_BODY.md with sections:
|
||||
- Crash Summary
|
||||
- Root Cause
|
||||
|
|
|
|||
Loading…
Reference in a new issue