Repository navigation
Closed
Labels
app/pm-stackpm-stack (Pad/Grist) in developing-today/codepm-stack (Pad/Grist) in developing-today/codeeffort/xsTrivial: expected under 30 minutes of workTrivial: expected under 30 minutes of workkind/ciCI/CD pipelines, workflows, and build automationCI/CD pipelines, workflows, and build automationkind/testTest coverage, test infrastructure, or test-only fixesTest coverage, test infrastructure, or test-only fixespriority/highImportant and time-sensitiveImportant and time-sensitivesource/creatorFiled by the new-issue-creator jobFiled by the new-issue-creator jobtask/small-fixQueue packet kind: bounded fix with reproduction and targeted testsQueue packet kind: bounded fix with reproduction and targeted tests
Description
pm-stack(aggregator): health-surface inbox tests fail on main — loadConfig({}) throws the fixture-mode guard
Summary
Two aggregator tests are red on main: the whole "health surface counts the inbox (#1282 slice 1)" block in test/conflicts-1282.test.ts. Both tests call loadConfig({}), and loadConfig now refuses an empty env by design — so the tests throw before buildHealth ever runs. The aggregator suite's merge-time signal (.github/workflows/pm-aggregator-tests.yml) is red on main until this is fixed.
Evidence (verified 2026-11-04, origin/main fd961f654)
pm-stack/aggregator/test/conflicts-1282.test.ts:186and:199:cfg: loadConfig({})in both health tests.pm-stack/aggregator/src/config.ts:118-123(parseAggregatorSource): withPM_AGG_SOURCEunset andPM_AGG_DEVnot"1", it throwsRefusing to serve fixture data outside explicit dev mode: PM_AGG_SOURCE=null; set PM_AGG_SOURCE=live, or PM_AGG_SOURCE=fixtures with PM_AGG_DEV=1. That guard is intentional (a non-dev deployment must never silently serve canned data) and must not be weakened.- Every other test that calls
loadConfigpasses an explicit env:test/config.test.tsuses{ PM_AGG_DEV: "1" }/{ PM_AGG_SOURCE: "live" },test/checkout-drift.test.ts:91usesloadConfig({ PM_AGG_DEV: "1" }). The two health tests are the outliers. - Reproduction (laptop, detached worktree at
fd961f654):- Full suite:
bun test→ 1574 pass / 2 fail (1576 tests, 115 files). Both failures are exactly these two tests. - Isolated:
bun test ./test/events.test.ts ./test/conflicts-1282.test.ts→ 40 pass / 2 fail, with the stackparseAggregatorSource (src/config.ts:123) → loadConfig (src/config.ts:131) → conflicts-1282.test.ts:186(and:199).
- Full suite:
Failing tests:
health surface counts the inbox (#1282 slice 1) > buildHealth carries the count and the page renders ithealth surface counts the inbox (#1282 slice 1) > a health view assembled without the inbox says so instead of inventing zero
Why it matters
- The aggregator's CI workflow runs this suite on every pm-stack PR and main push; a permanently red suite trains everyone to ignore it and hides real regressions (the failure class ci: no workflow runs the pm-stack aggregator test suite — aggregator PRs merge with no test signal #1579 created the workflow to prevent).
- The two tests are the only coverage that
buildHealthcarries the feat(aggregator): source-conflict inbox — one resolvable queue for Project-vs-derived and Kaneo-vs-GitHub disagreements, with per-class trust rulings #1282 conflicts-inbox count into the health page (and renders "not assembled" instead of inventing zero when the inbox is absent) — that behavior currently has no working test signal.
Fix direction
Pass an explicit dev/fixtures env to loadConfig in the two tests, matching the established precedent (loadConfig({ PM_AGG_DEV: "1" }), as in checkout-drift.test.ts:91). The tests already pass mode: "fixtures" to buildHealth, so the config env should agree. Do not change src/config.ts's guard.
Acceptance criteria
-
bun testinpm-stack/aggregatorat main: 0 failures (both health tests pass, in isolation and in the full suite). -
test/config.test.tsstill passes — the fixture-mode guard insrc/config.tsis unchanged. - No production-code change is needed; if one turns out to be needed, it is called out on this issue first.
Dedup / related
- Not pm-stack(aggregator): typecheck red on main — src/item-history.ts uses GhKind without importing it from model.ts #5247 (the
GhKindtypecheck error insrc/item-history.ts— separate, already tracked and parked). - Not pm-stack(aggregator): typecheck red on main — test/overview.test.ts HealthView fixture missing the new required conflicts field (from #1282 / PR #5032) #5043 (closed; a different feat(aggregator): source-conflict inbox — one resolvable queue for Project-vs-derived and Kaneo-vs-GitHub disagreements, with per-class trust rulings #1282-era breakage —
overview.test.tsfixture missing theconflictsfield). - The parent feature is feat(aggregator): source-conflict inbox — one resolvable queue for Project-vs-derived and Kaneo-vs-GitHub disagreements, with per-class trust rulings #1282 (still open as the feature tracker; this issue is only its red tests).
Metadata
Metadata
Assignees
Labels
app/pm-stackpm-stack (Pad/Grist) in developing-today/codepm-stack (Pad/Grist) in developing-today/codeeffort/xsTrivial: expected under 30 minutes of workTrivial: expected under 30 minutes of workkind/ciCI/CD pipelines, workflows, and build automationCI/CD pipelines, workflows, and build automationkind/testTest coverage, test infrastructure, or test-only fixesTest coverage, test infrastructure, or test-only fixespriority/highImportant and time-sensitiveImportant and time-sensitivesource/creatorFiled by the new-issue-creator jobFiled by the new-issue-creator jobtask/small-fixQueue packet kind: bounded fix with reproduction and targeted testsQueue packet kind: bounded fix with reproduction and targeted tests
Activity
dezren39 commentedon Nov 4, 2026
🤖 Agent note · filed
dezren39 commentedon Nov 4, 2026
🤖 Agent note · handed off
dezren39 commentedon Nov 4, 2026
🤖 Agent note · handed off
19 remaining items
dezren39 commentedon Nov 5, 2026
agent-note:v1
state: handed off
task: 9367
worker: repo-worker-code
lane: 02cafe76-eafd-4d0b-aaa6-2b7a737d68dc
execution_lane: opencode
issue: #5364
at: 2026-11-05T06:50:46.990Z
summary: Triage confirmed the focused regression on main c7a0982: the targeted run had 18 pass and the two inbox health tests fail at loadConfig's intentional fixture guard; config tests pass. Full-suite run had 1397 pass, 23 fail, and 2 errors with unrelated laptop/environment failures also present. Classified as kind/test, small-fix, priority/high, effort/xs. Follow-up task 9914 is queued for the two test-only env fixes; production guard remains out of scope. Labels now reflect the queued follow-up.
dezren39 commentedon Nov 5, 2026
agent-note:v1
state: done
task: 9367
worker: repo-worker-code
lane: 02cafe76-eafd-4d0b-aaa6-2b7a737d68dc
execution_lane: opencode
issue: #5364
at: 2026-11-05T06:51:26.286Z
summary: Triage task 9367 completed as triaged. Follow-up small-fix task 9914 is queued; issue #5364 remains open and its labels reflect the queued work.
dezren39 commentedon Nov 5, 2026
🤖 Agent note · picked up
Merge pull request #6106 from developing-today/queue/9914-5364-aggreg…
dezren39 commentedon Nov 5, 2026
🤖 Agent note · done
loadConfig({ PM_AGG_DEV: "1" }), matching the checkout-drift.test.ts precedent and themode: "fixtures"already passed to buildHealth). Test-only; the src/config.ts fixture-mode guard is unchanged. PR test(aggregator): pass explicit dev env in inbox health tests (#5364) #6106 merged (merge commit b122cca); Codex review completed with no findings. Issue pm-stack(aggregator): health-surface inbox tests fail on main — loadConfig({}) throws the fixture-mode guard (conflicts-1282.test.ts) #5364 closed by the merge.bun test ./test/conflicts-1282.test.ts ./test/config.test.ts: 18 pass / 2 fail before, 20 pass / 0 fail after (laptop). Full aggregator suite: 1398 pass / 22 fail / 2 errors (filing baseline 1397/23/2; remaining failures are the documented unrelated baseline environment/repository issues).