Repository navigation
Description
Finding
orchestrationSectionProblem / isOrchestrationSection (pm-stack/aggregator/src/feed.ts) check that the orchestration section's arrays exist, but never check the elements of tiers.needsDrew / tiers.needsOrchestrator, goals[].linedUp, or goals[].stalled. A section whose arrays contain null, a number, or an empty object passes the gate — the only gate on the live path (normalizeOrchestrationSection, feed.ts:200-201, used at sources/live.ts:661 and :911) — and then crashes the consumers that dereference the elements, instead of being diagnosed "invalid" and falling back to the derived view.
This is the element-level remainder of closed #949, which fixed the presence of the per-goal arrays (isGoalMeasurement, feed.ts:89-98, checks only Array.isArray on linedUp/stalled/gaps). Element shapes were never checked.
Evidence (main 5a34fa7, verified this run)
- feed.ts:130-143
orchestrationSectionProblem:tiers.needsDrew/needsOrchestrator,dependencies,actionschecked withArray.isArrayonly;goalschecked withs.goals.every(isGoalMeasurement), andisGoalMeasurement(feed.ts:89-98) checks only thatlinedUp/stalled/gapsare arrays — never their elements, and never the tier arrays' elements at all. - derive.ts:299-305
tierItemSessionId(item)dereferencesitem.sessionId, thenitem.id.startsWith(...)— called on every tier element at derive.ts:412-419 (buildAttention) and again in the extras filter at :438. - derive.ts:674
g.linedUp.filter((t) => t.horizon === "today")and derive.ts:693g.stalled.filter((s) => s.blocker)intodayFromSectiondereference every goal element. - Laptop Bun probe (~/git/fleet/probe-2026-10-29-laneA-orch-elements/, real feed.ts/derive.ts from a fresh clone at 5a34fa7; control section passes and renders fine):
goals: [{...valid, linedUp: [null]}]→ validatortrue,todayFromSectionthrowsTypeError: null is not an object (evaluating 't.horizon')goals: [{...valid, stalled: [null]}]→ validatortrue, throwsTypeError: null is not an object (evaluating 's.blocker')tiers.needsDrew: [null]→ validatortrue,buildAttentionthrowsTypeError: null is not an object (evaluating 'item.sessionId')tiers.needsDrew: [42]and[{}]→ validatortrue,buildAttentionthrowsTypeError: undefined is not an object (evaluating 'item.id.startsWith')
Why it matters
The orchestration section is produced by an LLM-run job writing JSON by hand — exactly the producer the gate exists to fail-soft against (#949's rationale). One malformed element in a tier list or a goal's lined-up/stalled list currently takes down the attention/today derivation for the whole feed instead of the section being diagnosed invalid (feed.ts's diagnoseOrchestrationSection machinery already exists to surface exactly this) and the aggregator falling back to its locally derived view.
Acceptance criteria
- A section whose
tiers.needsDrew/needsOrchestratorcontains a non-object element (or one without a stringid), or whosegoals[].linedUp/goals[].stalledcontains a non-object element, no longer crashesbuildAttentionortodayFromSection; the owning layer is pinned (gate rejects the section as invalid vs consumers skip bad elements) and applied consistently to both tier arrays and both goal arrays. - A poisoned section is treated as invalid/absent with the existing diagnosis wording instead of throwing on the live read path.
- Regression tests cover at least: tier element
null, tier element42/{}, goallinedUp: [null], goalstalled: [null]; a well-formed section (existing orchestration fixtures/tests) still derives unchanged. - Triage records a ruling on the adjacent unchecked surfaces in the same gate:
actionselements (sliced at derive.ts:709, rendered by field in render.ts) anddependencieselements — validate, tolerate, or explicitly leave with a reason.
Dedup: #949 (closed) covered missing per-goal arrays and missing provenance — presence, not element shapes; searches for "orchestration validator / tierItem null / isGoalMeasurement elements" returned only #949/#1110/#898, none covering element-level validation. The dns/aa/quota-current gate issues (#2412/#2415/#2416) are different files and fields.
Activity
developing-today commentedon Oct 29, 2026
CODE-1235
dezren39 commentedon Oct 29, 2026
🤖 Agent note · filed
66 remaining items
dezren39 commentedon Nov 2, 2026
agent-note:v1 — parked
Agent: repo-worker-code (OpenChamber scheduled lane)
Task: repo-health-code-pilot task 5314
At: 2026-11-02T09:32:00Z
State: parked
Fresh evidence: #2417 remains OPEN and assigned to dezren39; canonical PR #4176 remains OPEN, non-draft, and Drew-authored against main on the task branch.
Disposition: parked 30 minutes at the Drew-owned hard stop. No PR contents, diff, branch, worktree, CI, reviews, or source inspected/touched. Labels reflect parked state; work/assigned remains set.
Resume condition: PR closes, ownership changes, or Drew explicitly hands off; revalidate first.
Links: #2417 · #4176 · task 5314
dezren39 commentedon Nov 2, 2026
🤖 Agent note · picked up (ownership correction + CI disposition)
queue/5314-2417-orchestration-elements, body "Implements the triage ruling on aggregator(orchestration): section gate never checks tier/goal array elements — a [null] tier item or goal task passes validation and crashes buildAttention/todayFromSection #2417 (queue task 5314)". Noheld/user/owned/do-not-merge/do-not-auto-editlabel on aggregator(orchestration): section gate never checks tier/goal array elements — a [null] tier item or goal task passes validation and crashes buildAttention/todayFromSection #2417 or PR fix(aggregator): validate orchestration section array elements at the gate (#2417) #4176 (verified fresh).bun test test/orchestration.test.ts31 pass incl. 5 new poisoned-element cases; in CI run 41391193019 the orchestration test group also passes.testcheck fails on exactly 2 of 970 tests, both pre-existing on main and already tracked: slice-3 registry record expectation (aggregator: slice3 registry test fails on clean main — no claude-code record via fixture path #3835) and hub-renders service-detail "Pace projections" (aggregator: 'hub renders > service detail' test fails in CI on main #4091). Neither touches the orchestration section validation changed here.fix(aggregator): validate orchestration section array elements at the…
dezren39 commentedon Nov 2, 2026
🤖 Agent note · done