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 — fix(aggregator): actions/comments stores load duplicate-id rows silently — no cross-row check after #4151 · Issue #9580 · developing-today/code

fix(aggregator): actions/comments stores load duplicate-id rows silently — no cross-row check after #4151 #9580

New issue
Copy link
New issue
Copy link
Closed
#9583
Closed
fix(aggregator): actions/comments stores load duplicate-id rows silently — no cross-row check after #4151#9580
#9583
Copy link
Labels
app/aggregatorPackage/app: aggregator (pm-stack in this repo)effort/sSmall: expected under 2 hours of workkind/bugSomething isn't working (prefixed form of the classic bug label)priority/lowNice to have; do when convenientsource/pr-diff-reviewFiled by the pr-diff-review jobstatus:donetask/small-fixQueue packet kind: bounded fix with reproduction and targeted tests

Description

@dezren39
dezren39
opened on Nov 13, 2026
Issue body actions

Finding

PR #4151 added per-record load validation to the aggregator's ActionsStore and CommentsStore, but the validators are purely per-record: a store file carrying two individually valid rows with the same id loads silently — no quarantine, no diagnostics — and both rows stay in the active store. Every id-addressed consumer then sees only the first row (find), while counts include both. This is the same cross-row class the sibling ViewsStore was later found to have and had fixed as its own issue (#4301, fixed by PR #4536's crossRowInvariantError); the two stores #4151 touched never got the cross-row check.

Evidence

  • PR: fix(aggregator): quarantine malformed comments and actions records #4151 fix(aggregator): quarantine malformed comments and actions records #4151 (MERGED, head 46c5e6d330568c6400d094710d93884c8afda3f4, merge 15af52b2dbbb044a30a4ffd99cd8f5975799bef0, confirmed ancestor of main, compare behind=0)
  • Verified on main ef16105eebb6d865960cde9f6bc1094b355000ee:
    • pm-stack/aggregator/src/comments.ts: commentRecordProblem at :88 validates one record at a time; validated rows are assigned wholesale at :294 with no cross-row pass. markGithubResult at :397-399 resolves an id with this.comments.find((x) => x.id === id) — first match only.
    • pm-stack/aggregator/src/actions.ts: actionRecordProblem at :141, wholesale assignment at :653; markResultTransition at :791-796 likewise uses find.
    • Precedent in the same codebase: pm-stack/aggregator/src/views.ts:115 crossRowInvariantError rejects duplicate view ids (plus duplicate per-owner names and second defaults) on load.
  • Probe (current-main sources of both stores, run under bun in the review scratch dir): a comments file with two valid rows sharing id c-dup loaded 2 rows, counts() reported 2 for the object, and no .corrupt-* archive or diagnostics file was created; an actions file with two valid rows sharing id a-dup loaded 2 rows, with pendingCounts() counting the new copy while the applied copy is unreachable by id.
  • Dedupe: all-state searches for duplicate id aggregator, cross-row store, and duplicate actions store id returned only the views-specific aggregator(views): ViewsStore load accepts duplicate ids, duplicate names and multiple defaults — one remove(id) then silently deletes two distinct views #4301 (CLOSED) and its fix fix(aggregator): reject duplicate saved views on load #4536 — no issue covers the actions/comments stores.

Why it matters

These files are the dashboard's audit history. #4151's whole point was that a malformed row must not silently distort the store: it archives the original bytes and rewrites only validated rows. A duplicate id is a malformed store that survives that treatment untouched — one of the two records becomes permanently shadowed for every id-addressed operation (result marking, triage transitions) while still inflating per-object counts, and the next persist rewrites both rows as if nothing were wrong, so the corruption is preserved rather than quarantined.

Acceptance criteria

  • Loading an actions or comments file whose rows contain a duplicate id follows the fix(aggregator): quarantine malformed comments and actions records #4151 contract: the original bytes are archived with a diagnostics entry naming the duplicate row index/id, and the active store does not retain two rows under one id (whole-file quarantine or later-row rejection — either is acceptable if it matches the views precedent's spirit and is tested).
  • Regression tests in pm-stack/aggregator/test/store-corrupt.test.ts cover duplicate-id files for both stores, alongside the existing per-record malformed cases.
  • Valid files (unique ids) load exactly as today, including legacy rows without optional fields.

Filed by pr-diff-review-b (Lane B PR diff review, run 2026-11-13 09:18 CST) from review of PR #4151.

Activity

  1. dezren39
    added
    kind/bugSomething isn't working (prefixed form of the classic bug label)
    task/triageQueue packet kind: verify, reproduce, and route this item
    status/needs-triageNot yet triaged; needs a first look
    source/pr-diff-reviewFiled by the pr-diff-review job
    priority/lowNice to have; do when convenient
    queue/queuedHas a queued queue task
    on Nov 13, 2026
  2. developing-today commented on Nov 13, 2026

    @developing-today
    developing-todayBot
    on Nov 13, 2026 – with developing.today
    Contributor
    More actions

    CODE-3177

  3. dezren39
    added
    effort/sSmall: expected under 2 hours of work
    app/aggregatorPackage/app: aggregator (pm-stack in this repo)
    on Nov 13, 2026
  4. dezren39 commented on Nov 13, 2026

    @dezren39
    dezren39
    on Nov 13, 2026
    MemberAuthor
    More actions

    agent-note:v1
    Agent: pr-diff-review-b
    State: filed
    Repo: developing-today/code
    Source PR: #4151 (#4151, merged 15af52b)
    Finding: ActionsStore/CommentsStore load validators from #4151 are per-record only — two valid rows sharing one id load silently with no quarantine/diagnostics (comments.ts:88/:294, actions.ts:141/:653 on main); id consumers use find-first (comments.ts:399, actions.ts:796) while counts include both. ViewsStore got the cross-row fix as #4301/#4536 (views.ts:115); these two stores did not.
    Verified against main: ef16105 (contents reads + bun probe of current-main store sources: duplicate-id files load 2 rows, counts=2, no .corrupt-* created)
    Evidence: hidden_files/pr-review-b-2026-11-13-0918/issue-dup-store-ids-body.md + probe4151/probe2.ts + probe4151/probe2.out + diff-4151.patch

  5. dezren39
    added
    task/small-fixQueue packet kind: bounded fix with reproduction and targeted tests
    queue/claimedQueue worker lifecycle state
    work/assignedQueue worker lifecycle state
    status/in-progressQueue worker lifecycle state
    and removed
    task/triageQueue packet kind: verify, reproduce, and route this item
    status/needs-triageNot yet triaged; needs a first look
    queue/queuedHas a queued queue task
    on Nov 13, 2026
  6. dezren39 commented on Nov 13, 2026

    @dezren39
    dezren39
    on Nov 13, 2026
    MemberAuthor
    More actions

    agent-note:v1
    Agent: repo-worker-any-a (lane any-a, task 16123)
    State: triaged
    Repo: developing-today/code
    Issue: #9580

    Pickup + inline triage: claimed task 16123, lane assignment direct. Revalidated fresh: issue #9580 OPEN, no held / user/owned / do-not-merge / do-not-auto-edit labels, PR #4151 merged, no competing PR found in packet evidence.
    Triage decision: work kind small-fix (task/small-fix), priority/low (hand-edited/corrupt file required, but #4151 quarantine contract is violated), effort/s, kind/bug stands.
    First concrete step: add cross-row duplicate-id validation to ActionsStore and CommentsStore load paths, following the ViewsStore crossRowInvariantError precedent (views.ts), so a duplicate-id file follows the #4151 quarantine contract (archive + diagnostics, active store never retains two rows under one id).
    Acceptance check: bun test store-corrupt.test.ts passes including new duplicate-id cases for both stores; valid unique-id files load exactly as today.
    Fix proceeding in this same claim/session.

  7. developing-today
    added
    status:in-review
    on Nov 13, 2026
  8. dezren39
    closed this as completedin #9583on Nov 13, 2026
  9. developing-today
    added
    status:done
    and removed
    status:in-review
    on Nov 13, 2026
  10. dezren39 commented on Nov 13, 2026

    @dezren39
    dezren39
    on Nov 13, 2026
    MemberAuthor
    More actions

    agent-note:v1
    Agent: repo-worker-any-a (lane any-a, task 16123)
    State: done
    Repo: developing-today/code
    Issue: #9580

    Outcome: fixed_merged. Triaged inline (small-fix / priority-low / effort-s, note 6858820952) and fixed in the same claim.
    Fix: cross-row duplicate-id check in ActionsStore and CommentsStore load paths (pm-stack/aggregator/src/actions.ts, src/comments.ts), following the ViewsStore crossRowInvariantError precedent. A later row duplicating an earlier id is treated as an invalid record under the #4151 contract: original bytes archived, diagnostics entry naming the duplicate row index/id (duplicates id "<id>" (first occurrence at row <n>)), active store never retains two rows under one id, load-time persist rewrites the active file without the duplicate. Valid unique-id files load exactly as before.
    PR: #9583 MERGED, merge commit 70acfa4. Fix verified on origin/main (both stores).
    Tests: bun test test/store-corrupt.test.ts — 16/16 pass including 2 new duplicate-id cases (both stores). tsc --noEmit: 29 pre-existing errors on the base tree, none in touched files. Codex posted no review on PR #9583 (no reviews/comments at merge; nothing to disposition).
    Issue #9580 CLOSED by the merge.

  11. dezren39
    removed
    status/in-progressQueue worker lifecycle state
    queue/claimedQueue worker lifecycle state
    work/assignedQueue worker lifecycle state
    on Nov 13, 2026
  12. dezren39 commented on Nov 13, 2026

    @dezren39
    dezren39
    on Nov 13, 2026
    MemberAuthor
    More actions

    agent-note:v1
    Agent: repo-worker-any-a (lane any-a, task 16136)
    State: done (already_done)
    Repo: developing-today/code
    Issue: #9580

    This small_fix follow-on packet duplicates the fix completed under triage task 16123 in the same fleet pass: PR #9583 MERGED (70acfa4), issue #9580 CLOSED, and the duplicate-id cross-row check verified on origin/main in both pm-stack/aggregator/src/actions.ts and src/comments.ts (duplicates id diagnostics in the load loops), with duplicate-id regression cases for both stores in test/store-corrupt.test.ts (16/16 pass). No duplicate work performed.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    app/aggregatorPackage/app: aggregator (pm-stack in this repo)effort/sSmall: expected under 2 hours of workkind/bugSomething isn't working (prefixed form of the classic bug label)priority/lowNice to have; do when convenientsource/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

      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.