GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — aggregator(card-state): actions load filter never checks payload — a null/malformed payload crashes cardState on every render, a string answers fabricates a survey answer · Issue #2444 · developing-today/code

aggregator(card-state): actions load filter never checks payload — a null/malformed payload crashes cardState on every render, a string answers fabricates a survey answer #2444

New issue
Copy link
New issue
Copy link
Closed
#3433
Closed
aggregator(card-state): actions load filter never checks payload — a null/malformed payload crashes cardState on every render, a string answers fabricates a survey answer#2444
#3433
Copy link
Assignees
dezren39
Labels
app/aggregatorPackage/app: aggregator (pm-stack in this repo)effort/xsTrivial: expected under 30 minutes of workkind/bugSomething isn't working (prefixed form of the classic bug label)priority/normalOrdinary priority (the default)source/creatorFiled by the new-issue-creator jobstatus:donetask/small-fixQueue packet kind: bounded fix with reproduction and targeted tests

Description

@dezren39
dezren39
opened on Oct 29, 2026
Issue body actions

Summary

The actions store's load filter checks only that a record has a string id — its payload is never shape-checked on load — and cardState() (the render-time derivation every dashboard card goes through) dereferences payload unguarded. One stored action record with a malformed payload crashes card rendering for every page that shows that object, and the store re-persists the record forever. The write path validates payloads thoroughly (validateActionInput, actions.ts:226-313), so this is reachable only through the store file itself: a hand edit, a partial/rolled-back write from an older build, or any future writer that skips the boundary validator — exactly the class of record the load filter exists to contain (cf. #2347, the same filter's createdAt hole).

Evidence (main 5a34fa7)

  • pm-stack/aggregator/src/actions.ts:438-443 — doLoad() keeps any record with a string id; payload (and everything else) passes through unchecked.
  • pm-stack/aggregator/src/card-state.ts:75 — snooze.payload.until: payload: null (or a missing payload on a snooze) throws TypeError: null is not an object.
  • pm-stack/aggregator/src/card-state.ts:89-90 — the answer merge does a.payload.answers ?? [] and iterates entries as entry.questionId / entry.value, plus a.payload.optionId:
    • answers: [null] throws (entry.questionId on null).
    • answers: {…} (non-array object) throws ({} is not iterable).
    • answers: "ab" (string) does not throw — it iterates characters and writes a fabricated answer keyed undefined, silently corrupting the card's survey state.
  • Consumers: cardState is called per card from render.ts:1984, :2035, :2265, :2329, fed by ActionsStore.byObject() (actions.ts:471) in the board/attention render contexts (server.ts:266, :285, :546, :557) — a throw propagates out of the page render. persist() (actions.ts:449+) re-writes the record on every store write, so the poisoned record never ages out.

Verified this run with a laptop Bun probe driving the real ActionsStore + cardState (files byte-identical to main, md5 card-state.ts 99991e54…, actions.ts 6a43e179…), one malformed record per store file, valid id/createdAt so the record loads and sorts cleanly:

control            OK loaded 1 suppressed: "snoozed" answered: []
payload-null       THREW: TypeError: null is not an object (evaluating 'snooze.payload.until')
answers-null-entry THREW: TypeError: null is not an object (evaluating 'entry.questionId')
answers-object     THREW: TypeError: {} is not iterable
answers-string     OK loaded 1 suppressed: null answered: [[null,null]]   <- fabricated answer

Probe: ~/git/fleet/probe-2026-10-29-laneB-cardpayload/probe.ts (laptop).

Why it matters

The actions store is the dashboard's own write-ahead record of user intent (snoozes, dismissals, survey answers). A single malformed record — which the load path explicitly tolerates keeping — takes down every board/attention render that includes its object and keeps doing so across restarts, because the record is re-persisted verbatim. The string-answers shape is worse than a crash: it fabricates a survey answer that was never given.

Acceptance criteria

  • A stored action whose payload is null/missing/not an object, or whose payload.answers is not an array of {questionId, value} entries, cannot throw out of cardState() and cannot fabricate an answered entry.
  • Regression tests at the layer triage pins (load filter rejecting/normalizing the record, and/or cardState tolerating it): the four probe shapes above (null payload on a snooze; answers: [null]; answers as a plain object; answers as a string) each render a card without throwing and without a phantom answer.
  • Well-formed records behave exactly as today (the probe's control case: snooze suppresses, answers merge latest-wins).
  • Sibling of aggregator(comments+actions): a store record that passes the load filter but lacks a string createdAt crashes every comments/actions read — and persist() re-writes it forever #2347 (same load filter, createdAt field): fixing both in the load filter is welcome, but this issue is complete on the payload shapes alone.

Dedup

gh searches (open + closed) for cardState, payload answers: #1474 (closed — rejected-restore semantics in card-state, different defect), #1451 (closed — the multi-question feature itself). #2347 (open) covers the same load filter's createdAt sort crash in all()/CommentsStore, not payload dereference in cardState. No open issue covers payload shape at load or in card-state.

Activity

Next
  1. developing-today commented on Oct 29, 2026

    @developing-today
    developing-todayBot
    on Oct 29, 2026 – with developing.today
    Contributor
    More actions

    CODE-1247

  2. dezren39
    added
    kind/bugSomething isn't working (prefixed form of the classic bug label)
    priority/normalOrdinary priority (the default)
    queue/queuedHas a queued queue task
    source/creatorFiled by the new-issue-creator job
    task/triageQueue packet kind: verify, reproduce, and route this item
    status/needs-triageNot yet triaged; needs a first look
    app/aggregatorPackage/app: aggregator (pm-stack in this repo)
    effort/xsTrivial: expected under 30 minutes of work
    on Oct 29, 2026
  3. dezren39 commented on Oct 29, 2026

    @dezren39
    dezren39
    on Oct 29, 2026
    MemberAuthor
    More actions

    🤖 Agent note · filed

    • Agent: new-issue-creator-code-b
    • Session / ID: new-issue-creator-code-b cron run 2026-10-29 16:50 CDT
    • Found via: filed this run
    • Task: Filed aggregator(card-state): actions load filter never checks payload — a null/malformed payload crashes cardState on every render, a string answers fabricates a survey answer #2444 — the actions store load filter (actions.ts:438-443) checks only a string id, so a stored action with a null/malformed payload reaches cardState() (card-state.ts:75, :89-90), which dereferences it unguarded: null payload on a snooze, answers: [null], and answers as a plain object each throw out of every board/attention render for that object; answers as a string silently fabricates a survey answer. The record is re-persisted verbatim, so it never ages out. Verified with a laptop Bun probe driving the real ActionsStore + cardState (main 5a34fa7, files md5-matched to the laptop clone).
    • Expectation: effort xs; done when the four probe shapes render without throwing and without a phantom answer, with regression tests at the layer triage pins, and well-formed records unchanged. Sibling of aggregator(comments+actions): a store record that passes the load filter but lacks a string createdAt crashes every comments/actions read — and persist() re-writes it forever #2347 (same filter, createdAt field).
    • Links: aggregator(card-state): actions load filter never checks payload — a null/malformed payload crashes cardState on every render, a string answers fabricates a survey answer #2444 aggregator(card-state): actions load filter never checks payload — a null/malformed payload crashes cardState on every render, a string answers fabricates a survey answer #2444 · aggregator(comments+actions): a store record that passes the load filter but lacks a string createdAt crashes every comments/actions read — and persist() re-writes it forever #2347 aggregator(comments+actions): a store record that passes the load filter but lacks a string createdAt crashes every comments/actions read — and persist() re-writes it forever #2347
  4. github-actions
    assigned
    dezren39
    on Oct 30, 2026
  5. dezren39
    added
    queue/claimedQueue worker lifecycle state
    status/in-progressQueue worker lifecycle state
    on Nov 1, 2026
  6. dezren39 commented on Nov 1, 2026

    @dezren39
    dezren39
    on Nov 1, 2026
    MemberAuthor
    More actions

    🤖 Agent note · picked up (resume of parked task)

    • Agent: queue worker (repo-worker-code), lane A shift
    • Session / ID: queue task 5323 (resumed claim)
    • Found via: queue claim — PR 3433 already existed from the parking lane; resumed per protocol, did not restart the work.
    • Task: Verify PR 3433 (diff vs the pinned aggregator(card-state): actions load filter never checks payload — a null/malformed payload crashes cardState on every render, a string answers fabricates a survey answer #2444 layers, Codex findings, tests) and merge when verified.
    • Verification: diff = pinned scope exactly (doLoad isRecord payload filter; cardState defensive snooze/answers/optionId reads; regression test for the four malformed shapes + control). Codex: no findings. Laptop at PR head 517ab2c10: actions.test.ts 16/16; full aggregator suite 806 pass / 0 fail, exit 0 (log re-read).
    • Expectation: merge PR 3433, confirm aggregator(card-state): actions load filter never checks payload — a null/malformed payload crashes cardState on every render, a string answers fabricates a survey answer #2444 closure, complete task 5323.
  7. dezren39
    removed
    queue/parkedQueue task is parked (waiting on CI, time, or an event)
    on Nov 1, 2026
  8. 17 remaining items

  9. dezren39
    added
    work/assignedQueue worker lifecycle state
    queue/claimedQueue worker lifecycle state
    status/in-progressQueue worker lifecycle state
    task/small-fixQueue packet kind: bounded fix with reproduction and targeted tests
    and removed
    queue/claimedQueue worker lifecycle state
    work/assignedQueue worker lifecycle state
    task/triageQueue packet kind: verify, reproduce, and route this item
    queue/queuedHas a queued queue task
    on Nov 1, 2026
  10. dezren39 commented on Nov 1, 2026

    @dezren39
    dezren39
    on Nov 1, 2026
    MemberAuthor
    More actions

    🤖 Agent note · picked up

    • Agent: repo-worker-code (OpenChamber scheduled lane)
    • Session / ID: ses_e5e69bbfd8effeDHYftnI5Z27j
    • Task: queue task 5323 — small_fix aggregator(card-state): actions load filter never checks payload — a null/malformed payload crashes cardState on every render, a string answers fabricates a survey answer #2444
    • Next: Revalidate current main, implement the bounded store-load and cardState guards, add the four malformed-payload regression cases, then finish or park before the lane budget.
  11. developing-today
    added
    status:in-review
    on Nov 1, 2026
  12. dezren39
    added
    queue/parkedQueue task is parked (waiting on CI, time, or an event)
    status/parkedDeliberately paused with a recorded resume condition
    and removed
    status/in-progressQueue worker lifecycle state
    queue/claimedQueue worker lifecycle state
    on Nov 1, 2026
  13. dezren39 commented on Nov 1, 2026

    @dezren39
    dezren39
    on Nov 1, 2026
    MemberAuthor
    More actions

    🤖 Agent note · parked

    • Agent: repo-worker-code (OpenChamber scheduled lane)
    • Session / ID: ses_e5e69bbfd8effeDHYftnI5Z27j
    • Task: queue task 5323 — small_fix aggregator(card-state): actions load filter never checks payload — a null/malformed payload crashes cardState on every render, a string answers fabricates a survey answer #2444
    • PR: fix(aggregator): guard malformed action payloads (#2444) #3433 (commit 517ab2c10ae659622617aa88d88524abc46f915d)
    • Resume when: PR checks/status appear. Re-read CI and review state; merge only if checks are green, targeted tests remain valid, diff matches the packet, and no hold/user-owned restriction appears.
    • Verified: 74 focused tests pass; git diff --check passes. Typecheck unavailable because @types/bun is absent from this checkout.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @dezren39
    dezren39

Labels

app/aggregatorPackage/app: aggregator (pm-stack in this repo)effort/xsTrivial: expected under 30 minutes of workkind/bugSomething isn't working (prefixed form of the classic bug label)priority/normalOrdinary priority (the default)source/creatorFiled by the new-issue-creator 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

    You are visitor 01402775 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.