Skip to content

fix(aggregator): isOrchestrationSection validates only the top level — a malformed goal crashes /today instead of falling back #949

Closed

Description

@dezren39

Finding

isOrchestrationSection validates only the orchestration section's top level, but the today-view consumer dereferences nested per-goal arrays unconditionally. A section that passes the validator can still crash /today and /api/today.json with a TypeError instead of falling back to the locally derived view.

Evidence

Why it matters

The section is produced by an LLM-run orchestration job writing JSON by hand — exactly the producer a structural check exists to fail-soft against. The validator's documented contract (feed.ts comment: "Absent or malformed = 'not measured'") promises the derived fallback; instead, one malformed goal takes down the today view with a 500, which is the aggregator's headline page.

Acceptance criteria

  • The validator rejects (or the consumer tolerates) a goal missing any of linedUp/stalled/gaps/progressedSinceLastRun, and a section missing provenance.
  • Regression tests mirror orchestration.test.ts for the nested cases (goal missing each array in turn).
  • For such a feed, /today and /api/today.json return the locally derived view, not an error.

Found by the pr-diff-review job reviewing PRs #900 and #901 against current main (one finding covering both PRs: #900 introduced the validator, #901 the consumer). Dedupe: searches for isOrchestrationSection / orchestration linedUp validator returned only the closed implementation issue #899.

Activity

  1. added
    kind/bugSomething isn't working (prefixed form of the classic bug label)
    task/triageQueue packet kind: verify, reproduce, and route this item
    on Oct 26, 2026
  2. developing-today commented on Oct 26, 2026

    @developing-today
    Contributor
  3. added
    priority/normalOrdinary priority (the default)
    queue/queuedHas a queued task in the Supabase agent queue
    app/aggregatorPackage/app: aggregator (pm-stack in this repo)
    on Oct 26, 2026
  4. dezren39 commented on Oct 26, 2026

    @dezren39
    MemberAuthor

    Agent note — state: filed; Agent: pr-diff-review job; Session/ID: pr-diff-review run 2026-10-25 23:37 CDT; Found via: filed this run (PR diff review against current main a2eef6f). A repo-task/v1 packet for this issue is being enqueued to the repo-health-code-pilot queue.

  5. added
    work/assignedQueue worker lifecycle state
    queue/claimedQueue worker lifecycle state
    and removed
    queue/queuedHas a queued task in the Supabase agent queue
    on Oct 26, 2026
  6. 8 remaining items

  7. added
    work/assignedQueue worker lifecycle state
    queue/claimedQueue worker lifecycle state
    and removed
    queue/queuedHas a queued task in the Supabase agent queue
    on Oct 26, 2026
  8. dezren39 commented on Oct 26, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · picked up

    • Agent: queue worker (repo-worker-code), lane A shift
    • Session / ID: queue task 1151
    • Found via: queue claim
    • Task: Implement the fix(aggregator): isOrchestrationSection validates only the top level — a malformed goal crashes /today instead of falling back #949 fix per triage task 1098's design: deepen isOrchestrationSection in pm-stack/aggregator/src/feed.ts with per-goal checks (linedUp/stalled/gaps arrays; progressedSinceLastRun string-or-array) plus a section-level provenance string check, with regression tests in test/orchestration.test.ts. Validator only — no consumer changes.
    • Expectation: m — done = PR open with bun test green in pm-stack/aggregator.
    • Links: branch queue/1151-949-orchestration-validator (to be created)
  9. dezren39 commented on Oct 26, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

app/aggregatorPackage/app: aggregator (pm-stack in this repo)kind/bugSomething isn't working (prefixed form of the classic bug label)priority/normalOrdinary priority (the default)source/pr-diff-reviewFiled by the pr-diff-review jobstatus:donetask/small-fixQueue packet kind: bounded fix with reproduction and targeted tests

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions