mirror of
https://github.com/OpenRouterTeam/spawn.git
synced 2026-04-30 12:59:32 +00:00
refactor: simplify trigger server to fire-and-forget + fix monitoring loop prompts (#1384)
The trigger server streamed script stdout back to GitHub Actions via a
long-lived HTTP response, requiring --http1.1, heartbeat injection,
server.timeout(req, 0), createEnqueuer, drainStreamOutput, and 90-min
GH Actions timeouts. In practice GitHub Actions is just a dumb trigger
— the real state lives on the VM (log files, journalctl). Simplify to
fire-and-forget: spawn script, return 200 JSON immediately.
Also fix the refactor and discovery team lead monitoring loops. The
prompts buried the loop in a single compressed line that the model
ignored (doing Bash("sleep 10") repeatedly without calling TaskList).
Replace with a dedicated "Monitor Loop (CRITICAL)" section with numbered
steps, matching the security.sh pattern that actually works.
Changes:
- trigger-server.ts: remove ~150 lines of streaming code (createEnqueuer,
drainStreamOutput, startStreamingRun, heartbeat, ReadableStream),
replace with startFireAndForgetRun (stdout: "inherit", immediate JSON)
- All 4 workflows: simple curl POST, timeout-minutes 90→5, remove
--http1.1/-N/--max-time/exit-code handling
- refactor.sh: add Monitor Loop (CRITICAL) section with numbered steps
- discovery-team-prompt.txt: same Monitor Loop fix
- SKILL.md: update architecture docs, remove streaming sections
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
aff3b73850
commit
f3cfe890f7
8 changed files with 90 additions and 299 deletions
6
.github/workflows/qa.yml
vendored
6
.github/workflows/qa.yml
vendored
|
|
@ -9,13 +9,13 @@ concurrency:
|
|||
jobs:
|
||||
trigger:
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 90
|
||||
timeout-minutes: 5
|
||||
steps:
|
||||
- name: Trigger QA cycle on Sprite
|
||||
- name: Trigger QA cycle
|
||||
env:
|
||||
SPRITE_URL: ${{ secrets.QA_SPRITE_URL }}
|
||||
TRIGGER_SECRET: ${{ secrets.QA_TRIGGER_SECRET }}
|
||||
run: |
|
||||
curl -sSN --fail-with-body --max-time 5400 -X POST \
|
||||
curl -sS --fail-with-body -X POST \
|
||||
"${SPRITE_URL}/trigger?reason=${{ github.event_name }}" \
|
||||
-H "Authorization: Bearer ${TRIGGER_SECRET}"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue