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(views): ViewsStore load accepts duplicate ids, duplicate names and multiple defaults — one remove(id) then silently deletes two distinct views · Issue #4301 · developing-today/code

aggregator(views): ViewsStore load accepts duplicate ids, duplicate names and multiple defaults — one remove(id) then silently deletes two distinct views #4301

New issue
Copy link
New issue
Copy link
Closed
#4536
Closed
aggregator(views): ViewsStore load accepts duplicate ids, duplicate names and multiple defaults — one remove(id) then silently deletes two distinct views#4301
#4536
Copy link
Assignees
dezren39
Labels
app/aggregatorPackage/app: aggregator (pm-stack in this repo)app/pm-stackpm-stack (Pad/Grist) in developing-today/codeeffort/sSmall: expected under 2 hours of workkind/bugSomething isn't working (prefixed form of the classic bug label)priority/lowNice to have; do when convenientqueue/blockedQueue or user escalation statesource/creatorFiled by the new-issue-creator jobstatus/blockedQueue or user escalation statetask/triageQueue packet kind: verify, reproduce, and route this itemwork/assignedQueue worker lifecycle state

Description

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

Problem

ViewsStore enforces its cross-row invariants only in the mutating methods, never at load:

  • save() (pm-stack/aggregator/src/views.ts:276-280) and rename() (:296-302) refuse a second view with the same name (case-insensitive) for one owner.
  • setDefault() (:322-337) maintains at most one default per owner.
  • View ids are treated as identity everywhere: get() (:268) finds by id, actions address one view by id.

But doLoad() (:205-225) validates rows only per-row via isSavedView (:88-104) — the #4150 hardening checks each row's shape and quarantines the file if a row is malformed. It performs no cross-row check: duplicate ids, duplicate per-owner names, and multiple per-owner defaults all load verbatim (this.views = rows.filter(isSavedView)).

Verified this run

Laptop probe ~/git/fleet/probe-2026-11-02-laneB-viewsload/probe.ts against the real views.ts @ 23c2c514 (md5 c682e11f5536262812db98431838d6b2, matched on sandbox and laptop). A store file holding 5 shape-valid rows for one owner — ids vw-a (name Alpha, default), vw-b (name Beta, default), vw-dup (name Gamma), vw-dup (name Delta), vw-e (name alpha) — loaded with:

  • loaded_count 5 — no quarantine, no complaint;
  • two defaults for the owner; defaultFor silently returns vw-a (first after the createdAt sort — the two rows even share a timestamp);
  • get("vw-dup") returns only Gamma;
  • remove("vw-dup", owner) returned true and deleted BOTH Gamma and Delta (count 5 → 3), because remove() (:309-316) filters by id — and the deletion was persisted (a reloaded store also shows 3 rows).

So one delete-view action addressed to a single view can silently delete a second, distinct saved view, permanently, the moment a store file ever contains a duplicated id (hand edit, file merge, an older/buggier writer, a restored backup). The duplicate-name pair likewise breaks the invariant save() promises later callers, and duplicate defaults make the landing-page default an accident of row order.

Why it matters

Saved views are per-person dashboard state reached through the audited action path; the store's own discipline elsewhere is fail-loud (quarantine, never silently overwrite — module header, views.ts:10-14). Silently accepting cross-row duplicates converts a data anomaly into silent data loss on the next routine delete, instead of a loud quarantine at load when the file can still be preserved.

Acceptance criteria

  • Loading a store file whose rows violate a cross-row invariant (duplicate view id; duplicate name per owner, case-insensitive; more than one isDefault per owner) is refused the same way malformed rows are: the file is quarantined with a loud log naming the violation, and the store starts empty — OR the loader deterministically repairs with an explicit log line per dropped/demoted row. Silent verbatim acceptance is the bug.
  • A regression test in pm-stack/aggregator/test/views.test.ts: a file with a duplicated id loads per the chosen policy, and a subsequent remove of one view can never delete a second distinct view.
  • Existing views tests pass (bun test in pm-stack/aggregator), including the aggregator(views): ViewsStore load keeps malformed rows — a missing/non-string name makes save()/rename() throw TypeError, and a non-object filters silently becomes a match-everything default view #4150 malformed-row quarantine cases and the singular-default round-trip.

Dedup / related

  • aggregator(views): ViewsStore load keeps malformed rows — a missing/non-string name makes save()/rename() throw TypeError, and a non-object filters silently becomes a match-everything default view #4150 (closed) covered per-row malformation at load (missing/non-string name, non-object filters) — this is the cross-row layer it did not check: every row above is individually shape-valid.
  • The in-memory duplicate-name and singular-default tests in views.test.ts cover the mutating API only, not a file that already contains duplicates.

Activity

Next
  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/creatorFiled by the new-issue-creator job
    priority/lowNice to have; do when convenient
    queue/queuedHas a queued queue task
    effort/sSmall: expected under 2 hours of work
    app/aggregatorPackage/app: aggregator (pm-stack in this repo)
    app/pm-stackpm-stack (Pad/Grist) in developing-today/code
    on Nov 2, 2026
  2. dezren39 commented on Nov 2, 2026

    @dezren39
    dezren39
    on Nov 2, 2026
    MemberAuthor
    More actions

    🤖 Agent note · filed

    • Agent: new-issue-creator-code-b (new-issue-creator job, Lane B)
    • Session / ID: new-issue-creator-code-b run 2026-11-02 03:20 CST
    • Found via: filed this run
    • Task: Filed after verifying on the laptop that ViewsStore.doLoad performs no cross-row invariant check: a shape-valid store file with a duplicated view id loads verbatim, and remove(id) then deletes two distinct views and persists the loss.
    • Expectation: effort/s — triage confirms the load-time policy (quarantine vs logged repair), then the fix rejects or repairs duplicate ids / duplicate per-owner names / multiple per-owner defaults at load with regression tests in views.test.ts.
    • Links: laptop probe ~/git/fleet/probe-2026-11-02-laneB-viewsload/ (real views.ts @23c2c514, md5 c682e11f5536262812db98431838d6b2)
  3. dezren39
    added
    work/assignedQueue worker lifecycle state
    queue/claimedQueue worker lifecycle state
    status/in-progressQueue worker lifecycle state
    and removed
    status/needs-triageNot yet triaged; needs a first look
    queue/queuedHas a queued queue task
    on Nov 2, 2026
  4. 162 remaining items

    Load more actions
  5. dezren39
    added
    queue/claimedQueue worker lifecycle state
    status/in-progressQueue worker lifecycle state
    and removed
    queue/parkedQueue task is parked (waiting on CI, time, or an event)
    status/parkedDeliberately paused with a recorded resume condition
    on Nov 5, 2026
  6. dezren39 commented on Nov 5, 2026

    @dezren39
    dezren39
    on Nov 5, 2026
    MemberAuthor
    More actions

    🤖 Agent note · handed off

    • Agent: queue worker (repo-worker-code), lane code-r
    • Session / ID: task 6175
    • Found via: queue claim
    • Task: task 6175 (small_fix for issue aggregator(views): ViewsStore load accepts duplicate ids, duplicate names and multiple defaults — one remove(id) then silently deletes two distinct views #4301) was assigned execution lane opencode by fleet queue lane; handed off to the opencode claimant, which launches the bound session. This lane does not work the task directly.
    • Expectation: claimant launches the bound opencode session for task 6175; task parked 1800s meanwhile.
    • Links: issue aggregator(views): ViewsStore load accepts duplicate ids, duplicate names and multiple defaults — one remove(id) then silently deletes two distinct views #4301
  7. dezren39
    added
    queue/parkedQueue task is parked (waiting on CI, time, or an event)
    status/parkedDeliberately paused with a recorded resume condition
    and removed
    queue/claimedQueue worker lifecycle state
    status/in-progressQueue worker lifecycle state
    on Nov 5, 2026
  8. dezren39 commented on Nov 5, 2026

    @dezren39
    dezren39
    on Nov 5, 2026
    MemberAuthor
    More actions

    🤖 Agent note · blocked

    • Agent: queue worker (repo-worker-code), lane code-z
    • Session / ID: task 6175
    • Found via: queue claim (attempts 16/24)
    • Task: Task 6175 (fix for issue aggregator(views): ViewsStore load accepts duplicate ids, duplicate names and multiple defaults — one remove(id) then silently deletes two distinct views #4301) is blocked on ownership, re-verified fresh this shift: PR fix(aggregator): reject duplicate saved views on load #4536 — the canonical implementation on branch queue/6175-4301-viewsstore-invariants — is still OPEN, non-draft, and Drew-authored (dezren39), and issue aggregator(views): ViewsStore load accepts duplicate ids, duplicate names and multiple defaults — one remove(id) then silently deletes two distinct views #4301 is OPEN and assigned to dezren39. Standing verdict from the task 6175 checkpoints, which this shift re-confirms: do not touch or merge the Drew-owned canonical PR, and do not create competing work. Codex review on PR fix(aggregator): reject duplicate saved views on load #4536 completed at d801134 with no findings (per checkpoint record).
    • Expectation: blocked until Drew either merges/closes PR fix(aggregator): reject duplicate saved views on load #4536 or explicitly hands off ownership of the PR/issue; then revalidate fresh and resume task 6175 from the existing branch/worktree (~/git/fleet/6175). Blocking (rather than another 1200s park) stops the claim cycle that has consumed 16 of 24 attempts without any state change.
    • Links: PR fix(aggregator): reject duplicate saved views on load #4536; issue aggregator(views): ViewsStore load accepts duplicate ids, duplicate names and multiple defaults — one remove(id) then silently deletes two distinct views #4301; task 6175
  9. dezren39
    added
    queue/blockedQueue or user escalation state
    status/blockedQueue or user escalation state
    and removed
    status/parkedDeliberately paused with a recorded resume condition
    queue/parkedQueue task is parked (waiting on CI, time, or an event)
    on Nov 5, 2026
  10. developing-today
    closed this as completedin #4536on Nov 8, 2026
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)app/pm-stackpm-stack (Pad/Grist) in developing-today/codeeffort/sSmall: expected under 2 hours of workkind/bugSomething isn't working (prefixed form of the classic bug label)priority/lowNice to have; do when convenientqueue/blockedQueue or user escalation statesource/creatorFiled by the new-issue-creator jobstatus/blockedQueue or user escalation statetask/triageQueue packet kind: verify, reproduce, and route this itemwork/assignedQueue worker lifecycle state

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.