test(watchdog): integration test for tail-PR rebase against fixture forge #544

Merged
charles merged 1 commit from boss/445 into main 2026-04-28 21:35:24 +00:00
Collaborator

Adds an in-process fixture-forge integration test for the tail-PR rebase watchdog. Wires the real runTailPrRebaseTick + ForgejoAdapter against a globalThis.fetch stub that responds to the three REST endpoints the watchdog hits, and asserts dispatch lands within the 60 s tick budget.

Test plan

  • bun test apps/server/src/background/tail-pr-rebase-watchdog.integration.test.ts — 2 pass
  • bun run qa — typecheck + Biome + 2526 server tests green
  • Steady-state: PR mergeable=false at boot → dispatch fires; verify list / detail / status URLs hit + Authorization: token … forwarded
  • Mid-life transition: PR flips mergeable=true → mergeable=false on a later tick → next tick dispatches

Closes #445

Adds an in-process fixture-forge integration test for the tail-PR rebase watchdog. Wires the real `runTailPrRebaseTick` + `ForgejoAdapter` against a `globalThis.fetch` stub that responds to the three REST endpoints the watchdog hits, and asserts dispatch lands within the 60 s tick budget. ## Test plan - [ ] `bun test apps/server/src/background/tail-pr-rebase-watchdog.integration.test.ts` — 2 pass - [ ] `bun run qa` — typecheck + Biome + 2526 server tests green - [ ] Steady-state: PR mergeable=false at boot → dispatch fires; verify list / detail / status URLs hit + `Authorization: token …` forwarded - [ ] Mid-life transition: PR flips mergeable=true → mergeable=false on a later tick → next tick dispatches Closes #445
test(watchdog): integration test for tail-PR rebase against fixture forge
All checks were successful
qa / qa (pull_request) Successful in 13m12s
qa / dockerfile (pull_request) Successful in 15s
013c58e1ca
Wires the real watchdog tick + ForgejoAdapter against an in-process
fetch-spy fixture forge, covering the end-to-end path the unit tests
deferred: HTTP REST traversal (list / detail / aggregate status) +
real adapter wiring. Asserts dispatch lands well within the 60 s tick
budget for both the steady-state PR (mergeable=false at boot) and the
mid-life "main moves forward" transition.

Closes #445
charles deleted branch boss/445 2026-04-28 21:35:25 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
charles/claude-hooks!544
No description provided.