Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(server): fall back when the recorded PR base is unavailable remotely #22943

Closedjuliusmarmingewants to merge 9 commits intomain fromfix/issue-22920opened View on GitHub

Showing 8 changed files with 52 additions and 0 deletions (loading 5).

x
0 of 8 viewed, 8 left
20 additions and 0 deletionsapps/server/scripts/evidence/pr-22943/bin/codexAdded
View file
@@ -0,0 +1,20 @@
+#!/bin/bash
+# Fake codex: answers the probes T3 makes and writes a fixed PR title/body for `exec`.
+dir="${EV_LOG_DIR:-/tmp}"
+echo "codex $*" >> "$dir/codex.log"
+case "$1" in
+ --version) echo "codex-cli 0.0.0-fake"; exit 0 ;;
+ mcp) echo "[]"; exit 0 ;;
+ exec)
+ out=""
+ prev=""
+ for arg in "$@"; do
+ if [ "$prev" = "--output-last-message" ] || [ "$prev" = "-o" ]; then out="$arg"; fi
+ prev="$arg"
+ done
+ n=$(ls "$dir"/prompt-*.txt 2>/dev/null | wc -l)
+ cat > "$dir/prompt-$((n + 1)).txt"
+ if [ -n "$out" ]; then printf '%s' '{"title":"Fixture PR","body":"fixture body"}' > "$out"; fi
+ exit 0 ;;
+esac
+exit 0
5 additions and 0 deletionsapps/server/scripts/evidence/pr-22943/bin/ghAdded
View file
@@ -0,0 +1,5 @@
+#!/bin/sh
+# Fake gh: only hands out a token for the stub forge. Logs argv.
+echo "gh $*" >> "${EV_LOG_DIR:-/tmp}/gh.log"
+if [ "$1" = "auth" ] && [ "$2" = "token" ]; then echo fake-token; exit 0; fi
+exit 1
27 additions and 0 deletionsapps/server/scripts/evidence/pr-22943/fixture.shAdded
View file