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 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 · Issue #4150 · developing-today/code

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

New issue
Copy link
New issue
Copy link
Closed
Closed
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
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/creatorFiled by the new-issue-creator jobtask/small-fixQueue packet kind: bounded fix with reproduction and targeted tests

Description

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

Problem

pm-stack/aggregator saved views (#1276): ViewsStore.doLoad promises in the module header that "an unparseable or wrongly-shaped file is quarantined … never silently overwritten" (views.ts:11-14), but the row-level check only requires each row to be an object with a string id (views.ts:198-200). Malformed-but-parseable rows are neither quarantined nor dropped, and they break the store in two verified ways:

  1. A row whose name is missing or not a string makes every later save() (views.ts:257, v.name.toLowerCase()) and rename() for that owner throw a TypeError — the owner can never save or rename a view again while that row is in the file, and nothing tells them why.
  2. A row whose filters is not an object (e.g. the string "repo:x/y") is served as-is: defaultFor() returns it, and itemMatchesView reads filters.repo etc. as undefined, so every filter dimension is skipped and the "filtered" default view silently matches every item. viewQuery likewise encodes none of its filters.

Evidence (verified this run, main c8a21912)

  • pm-stack/aggregator/src/views.ts:198-200 — doLoad filter: (v) => typeof v === "object" && v !== null && typeof v.id === "string"; no check of name, owner, filters, isDefault, or createdAt.
  • pm-stack/aggregator/src/views.ts:255-258 — save() duplicate-name scan calls v.name.toLowerCase() on every same-owner row.
  • Laptop probe (verbatim views.ts from main c8a21912, md5 dfe51cfc329ba111f8603f112f5787eb; stub model.ts type only; probe ~/git/fleet/probe-2026-11-01-laneA-views/ on the laptop, bun):
    • File with one good-shaped row except name omitted → no quarantine file created; all()/forOwner()/defaultFor() return the row; save({owner:"gh:1", …}) → TypeError: undefined is not an object (evaluating 'v.name.toLowerCase').
    • Same with name: 42 → save() → TypeError: v.name.toLowerCase is not a function.
    • File with filters: "repo:x/y" on an isDefault: true row → defaultFor("gh:1") returns it with filters still the string; applyView([{repo:"a/b",…},{repo:"x/y",…}], filters) returns both items — the repo filter is silently not applied.
    • Control: a fully well-formed row loads, saves, and defaults normally.

Why it matters

The store's stated discipline (comments-store #906 pattern) is that a wrongly-shaped file is quarantined loudly rather than half-trusted. Today one hand-edited, partially migrated, or foreign-written row in PM_AGG_VIEWS_FILE (a) wedges that owner's view mutations with an unhandled TypeError on the mediated action path, and (b) can silently widen a person's default landing view from a narrow filter to the whole board — the exact failure a saved view exists to prevent, with no log line naming the bad row. Distinct from #4140 (CoverageSnapshotStore) and #2347 (comments/actions store): this is the new views store from #1276/#4013, whose only corrupt-file test covers unparseable JSON, not parseable-but-malformed rows.

Acceptance criteria

  • ViewsStore load validates each row's full shape (id/name/owner strings, filters passing validateViewFilters or an equivalent row check, boolean isDefault, string timestamps): a file with a malformed row is either quarantined per the header contract or the malformed rows are dropped with a loud log naming the row — behaviour pinned by a test; well-formed rows in the same file are not silently lost without that quarantine/log trail.
  • With a malformed row present in the on-disk file, save() and rename() for the affected owner no longer throw TypeError.
  • A malformed filters value can never reach defaultFor()/applyView as a match-everything view.
  • Existing views tests pass, including the corrupt-file quarantine test.

Activity

Next
  1. dezren39
    added
    kind/bugSomething isn't working (prefixed form of the classic bug label)
    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
    priority/lowNice to have; do when convenient
    app/aggregatorPackage/app: aggregator (pm-stack in this repo)
    effort/sSmall: expected under 2 hours of work
    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 job (lane A, new-issue-creator-code-a)
    • Session / ID: cron run 2026-11-01 21:05 CST (2026-11-02T03:05Z)
    • Found via: filed this run
    • Task: Filed issue 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 — ViewsStore.doLoad (pm-stack/aggregator/src/views.ts:198-200) keeps any row with a string id, despite the header's quarantine promise for wrongly-shaped files (views.ts:11-14): a missing/non-string name makes save()/rename() throw TypeError at views.ts:257, and a non-object filters is returned by defaultFor() and silently matches every item in itemMatchesView/applyView. Verified this run on the laptop with verbatim views.ts from main c8a21912 (md5 dfe51cfc329ba111f8603f112f5787eb): name omitted → save TypeError, no quarantine; name: 42 → same; filters: "repo:x/y" on a default row → applyView returned both a matching and a non-matching repo item; well-formed control row normal.
    • Expectation: effort/s — load validates each row's full shape (malformed rows quarantined with the file or dropped with a loud log, per the header contract, pinned by a test); malformed filters can never become a match-everything default; existing views tests pass.
    • Links: probe ~/git/fleet/probe-2026-11-01-laneA-views/ (laptop); queue packet enqueued this run (repo-health-code-pilot).
  3. dezren39 commented on Nov 2, 2026

    @dezren39
    dezren39
    on Nov 2, 2026
    MemberAuthor
    More actions

    🤖 Agent note · picked up

    • Agent: OpenChamber scheduled lane (repo-worker-code)
    • Session / ID: ses_e5e65ccdc6affeiMOr0x4bWPkf; queue task 6050
    • Found via: atomic queue claim
    • Task: Revalidate 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 and search for competing PRs before confirming the ViewsStore malformed-row behavior.
    • Links: 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
  4. 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
  5. 38 remaining items

  6. 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 2, 2026
  7. dezren39 commented on Nov 2, 2026

    @dezren39
    dezren39
    on Nov 2, 2026
    MemberAuthor
    More actions

    agent-note:v1 — state: parked at=2026-11-02T04:41:32Z (OpenChamber scheduled lane)

    • Agent: repo-worker-code
    • Session / ID: OpenCode session ses_e5e65715cecffe82LpYRJ8aPI0; queue task 6053
    • Finding: Fresh issue read confirms 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 is OPEN and links PR fix(aggregator): validate saved view rows on load (#4150) #4157, which is OPEN. The issue timeline records fix(aggregator): validate saved view rows on load (#4150) #4157 as Drew-authored and explicitly prohibits inspecting or touching it while Drew-owned; CI was not rechecked due that hard stop.
    • Disposition: Parked task 6053 for 20 minutes. No code, PR, branch, or worktree inspected or changed. Issue labels are synchronized to parked; work/assigned remains.
    • Resume condition: After 2026-11-02T05:01:23Z, revalidate ownership, CI, and reviews fresh; do not inspect/touch PR while Drew-authored.
    • Links: 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 ; fix(aggregator): validate saved view rows on load (#4150) #4157
  8. dezren39
    added
    queue/claimedQueue worker lifecycle state
    status/in-progressQueue worker lifecycle 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 2, 2026
  9. dezren39
    added a commit that references this issue on Nov 2, 2026

    Merge pull request #4157 from developing-today/queue/6053-4150-saved-…

    199a7d2
  10. dezren39 commented on Nov 2, 2026

    @dezren39
    dezren39
    on Nov 2, 2026
    MemberAuthor
    More actions

    agent-note:v1 — state: done at=2026-11-02T05:05Z (Lane D queue worker)

    • Agent: repo-worker-code
    • Finding: PR fix(aggregator): validate saved view rows on load (#4150) #4157 merged (merge commit 199a7d2). ViewsStore load now validates persisted rows against the complete SavedView shape (including validateViewFilters) and quarantines malformed rows with a loud row-specific warning; well-formed rows preserved.
    • Verification: laptop bun test test/views.test.ts — 14 pass / 0 fail, including both new regressions ("well-formed JSON with a row missing its name is quarantined before later saves", "malformed default filters are quarantined instead of becoming a match-all view"). Codex gate clear (no review threads). The pm-aggregator CI run stayed QUEUED ~1h40m in the fleet runner backlog, so the merge proceeded on the local verification per the standing merge directive; CI on main will confirm.
    • Disposition: closing this issue as fixed. Task 6053 complete.
    • Links: 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 · PR fix(aggregator): validate saved view rows on load (#4150) #4157 · task 6053
  11. dezren39
    closed this as completedon Nov 2, 2026
  12. dezren39
    removed
    status/in-progressQueue worker lifecycle state
    queue/claimedQueue worker lifecycle state
    work/assignedQueue worker lifecycle state
    on Nov 2, 2026
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/creatorFiled by the new-issue-creator jobtask/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.