Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
ci: Harden background-agent MVP git authentication loop (#49373)
morgankrey7620c684ebf2
diff --git a/.github/workflows/background_agent_mvp.yml b/.github/workflows/background_agent_mvp.ymlindex 02f9bf04cde..633b2339f00 100644--- a/.github/workflows/background_agent_mvp.yml+++ b/.github/workflows/background_agent_mvp.yml@@ -148,8 +148,17 @@ jobs:continuefi- 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+ fiCRASH_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.md3. Follow .factory/prompts/crash/link-issues.md and write LINKED_ISSUES.md4. 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 paths6. Write PR_BODY.md with sections:- Crash Summary- Root Causediff --git a/script/run-background-agent-mvp-local b/script/run-background-agent-mvp-localindex a229b6af9e5..c04bf405370 100755--- a/script/run-background-agent-mvp-local+++ b/script/run-background-agent-mvp-local@@ -147,7 +147,7 @@ Required workflow:2. Follow .factory/prompts/crash/investigate.md and write ANALYSIS.md3. Follow .factory/prompts/crash/link-issues.md and write LINKED_ISSUES.md4. 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 paths6. Write PR_BODY.md with sections:- Crash Summary- Root Cause