GeezerVison is showing github.com — ci(pm-stack): pm-dispatch bun suite (131 tests, incl. #4917 orphan-compensation pins) run by no workflow — the aggregator/projector workflows never touch dispatch · Issue #6090 · developing-today/code
ci(pm-stack): pm-dispatch bun suite (131 tests, incl. #4917 orphan-compensation pins) run by no workflow — the aggregator/projector workflows never touch dispatch #6090DescriptionProblem
The pm-stack dispatch service's bun test suite — 131 tests across 10 files in pm-stack/dispatch/test/ — is run by no workflow, flake check, or justfile recipe, so its regression pins are decorative.
pm-dispatch is a live service: it is the authenticated intake that launches OpenCode sessions and enqueues repo-task/v1 work into the fleet queues, run as a systemd service from this checkout (nixos/services/pm-stack/default.nix:180-188, WorkingDirectory = "${repo}/pm-stack/dispatch").
Evidence (verified this run, laptop primary @ e90672d)
pm-stack/dispatch/package.json declares "test": "bun test", and the suite exists: test/{attach_verify,auth,config,dispatch_preexisting,launch_annotations,launch_failure,packet,queue,server,validate}.test.ts.
- Verified on the laptop:
cd pm-stack/dispatch && bun test → 131 pass, 0 fail, 526 expect() calls, across 10 files (~0.2s, offline).
- Wiring check:
grep -rn "pm-stack/dispatch" .github/workflows/ justfile flake.nix → zero references. The two pm-stack workflows cover the sibling services only:
.github/workflows/pm-stack-tests.yml runs aggregator bun test, projector bun test, two script smokes, and the claimant/grist Python suites — never dispatch.
.github/workflows/pm-aggregator-tests.yml runs aggregator + projector only.
- The suite pins exactly the failure classes dispatch has shipped before: launch-failure compensation and orphaned-issue cleanup (fix(pm-dispatch): failed launches leave orphan tracking issues open (66 open, #3499–#4899) #4917 pins in
launch_failure.test.ts), pre-existing-task detection (fix(pm-dispatch): detect pre-existing enqueue row — attach dispatch must not silently vanish (#2677) #3143 class), packet/dedupe-key shape (packet.test.ts), auth and config validation. Closed dispatch bugs pm-dispatch(tasks): a second dispatch to an already-tasked issue silently vanishes — enqueue returns the old task and dispatch reports it as the new queued task #2677/pm-dispatch(validate): resolvePriority's plain-object lookup returns prototype members as priorities — 'constructor' becomes the Object constructor function and '__proto__' an object, instead of the documented 400 #2757/pm-dispatch(config): DISPATCH_PORT / DISPATCH_HOSTS are never validated — port 0 silently binds a random port, a typo crashes with a Bun RangeError naming neither variable, hex/scientific spellings become other ports, and an all-separator DISPATCH_HOSTS exits 0 serving nothing #2758/fix(pm-dispatch): wait:false launch failures leave the queue task queued and the issue unnoted #2901/pm-dispatch(launch-failure): issue note claims the queue task 'was cancelled' even when cancelTask itself failed — the orphaned task is recorded as cleaned up #2917/fix(pm-dispatch): POST /v1/tasks issue_number attach never verifies the issue exists, is open, or is an issue #3007/pm-dispatch(server): the 256 KiB body cap is measured in UTF-16 code units, not bytes — a 300 KB CJK body passes readJsonBody's 'too large' check #3010/pm-dispatch(validate): parseModel string form does not trim its segments — "anthropic / claude-sonnet" validates, then launches with an unresolvable model #3177/fix(pm-dispatch): pre-existing-task detection compares the DB clock to the dispatch clock — fresh rows can read as pre-existing and live rows as new (#3143) #4661 all live in the surface this suite covers — with no CI running it, a re-regression of any of them produces no signal.
Why it matters
Dispatch sits on the fleet's work-intake path: a silent regression in packet building, queue enqueue, or launch-failure compensation corrupts or orphans real fleet work (the #4917 orphan-issue flood is the standing example). The suite is fast, offline, and green — the only missing piece is a runner.
Acceptance criteria
- A workflow (extending
pm-stack-tests.yml, or a dispatch job in pm-aggregator-tests.yml following the projector pattern from ci: no pull_request workflow covers pm-stack/** — projector/aggregator changes merge with zero PR CI #2936) runs bun test in pm-stack/dispatch with a fail-if-missing guard on the test directory, so a green run cannot be a silently skipped suite.
- The step fails the job when any dispatch test fails (verified by a deliberate-break run or equivalent evidence).
- Trigger shape follows the house CI tier policy (
.github/ci-policy.md).
- No changes to the dispatch source or tests themselves are needed; if a test fails in CI but passes locally, that discrepancy is reported on this issue before any test is edited.
Activitydeveloping-today commented on Nov 5, 2026 dezren39 commented on Nov 5, 2026 🤖 Agent note · filed
- Agent: new-issue-creator (new-issue-creator-code-a)
- Session / ID: cron new-issue-creator-code-a, run 2026-11-05 00:05 CST
- Found via: filed this run
- Task: Filed this issue: pm-dispatch's 131-test bun suite is run by no workflow; verified green on the laptop @ e90672d before filing.
- Expectation: effort s — wire
bun test for pm-stack/dispatch into a pm-stack workflow with a fail-if-missing guard; done when a check runs the suite and fails on a deliberate break.
- Links: queue packet packet-6090-triage.json (repo-health-code-pilot)
dezren39 commented on Nov 5, 2026 dezren39 commented on Nov 5, 2026 dezren39 commented on Nov 5, 2026
MetadataMetadataDevelopmentNo branches or pull requestsIssue actions
|