Skip to content

pm-stack(aggregator): board render throws on a lined-up task whose title carries an unsafe-integer ref in a non-first link — titleRefs mints refs parseRef rejects, inFlightBoardItems validates only the first #6210

Closed

Description

@dezren39

pm-stack(aggregator): board page render throws when a lined-up task's title carries an unsafe-integer ref in a non-first link — titleRefs mints refs parseRef rejects, inFlightBoardItems validates only the first

Summary

A lined-up (in-flight) task whose own ref is a valid GitHub ref but whose title mentions a ref with a number above Number.MAX_SAFE_INTEGER (e.g. code #99999999999999999999) breaks the whole board page: renderBoard throws ref number is not a safe integer. Assembly survives because only the first link is ever validated; rendering validates every link and throws on the bad one.

Evidence (verified this run, laptop primary @ 04f7869)

  • pm-stack/aggregator/src/model.ts — parseRef throws ref number is not a safe integer: <key> for non-safe-integer numbers, and the shared rule (pm-stack(aggregator): validateNewComment/validateNewAction accept ref keys parseRef rejects (GH_REF number unbounded) #4952, comment above isValidRef) is that producers must route through isValidRef; refsInText does (model.ts:480 guards every candidate with isValidRef).
  • pm-stack/aggregator/src/sources/live.ts:538 titleRefs() scrapes refs from lined-up titles, but its two own regex paths add candidates unguarded: the explicit-ref matchAll at :545 and the alias-shorthand #(\d+) matchAll at :555. Neither checks isValidRef.
  • pm-stack/aggregator/src/sources/live.ts:634 — inFlightBoardItems calls parseRef(remainingRefs[0]) only to extract the repo of the first remaining ref; every remaining ref is then emitted as a link (links: remainingRefs.map(...)) with no further validation.
  • pm-stack/aggregator/src/render.ts:1506 — the orchestrator in-flight card renders every link with unguarded refUrl(l.ref), which throws via parseRef.

Probe (real sources via bun, ~/git/fleet/probe-board-render-ref/probe.ts, run in pm-stack/aggregator):

isValidRef huge explicit: false
titleRefs explicit huge: [ "developing-today/code#99999999999999999999" ]
titleRefs alias huge:    [ "developing-today/code#99999999999999999999" ]
inFlightBoardItems OK, links: [[{"ref":"developing-today/code#123","relation":"tracks"},{"ref":"developing-today/code#99999999999999999999","relation":"tracks"}]]
renderBoard THREW: Error: ref number is not a safe integer: developing-today/code#99999999999999999999
control renderBoard OK, len 20262

The probe section task has ref: "developing-today/code#123" (valid) and title Fix the thing, follow-up code #99999999999999999999.

Why this is distinct from the sibling filings

Why it matters

Lined-up titles are free text republished by the orchestration pass every run; long digit strings (timestamps, snowflake-ish ids, exaggerated issue numbers in prose) are realistic title content. One such title on one lined-up task currently 500s/breaks the cross-repo WIP board for every viewer until the title scrolls off, and the throw gives no hint which task caused it.

Acceptance criteria

  • titleRefs never returns a ref parseRef rejects: both its explicit-ref and alias-shorthand paths filter through isValidRef (the pm-stack(aggregator): validateNewComment/validateNewAction accept ref keys parseRef rejects (GH_REF number unbounded) #4952 shared rule), with tests pinning the unsafe-integer forms.
  • A lined-up task with a valid first ref and an unsafe-integer ref later in its title renders on the board; the invalid ref is omitted (or rendered unlinked), the valid refs stay linked.
  • Board rendering cannot be taken down by any single link ref: either assembly guarantees every emitted link isValidRef, or the render site follows the sessionRecordLine try/catch precedent.
  • Regression tests in the aggregator suite (e.g. test/board-in-flight.test.ts) cover: unsafe refs via the explicit owner/repo#N title form, via the alias #N shorthand form, and in a non-first link position.

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
    source/creatorFiled by the new-issue-creator job
    priority/normalOrdinary priority (the default)
    on Nov 5, 2026
  2. developing-today commented on Nov 5, 2026

    @developing-today
    Contributor
  3. added
    queue/queuedHas a queued task in the Supabase agent queue
    app/pm-stackpm-stack (Pad/Grist) in developing-today/code
    on Nov 5, 2026
  4. dezren39 commented on Nov 5, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · filed

    • Agent: new-issue-creator job (lane B, new-issue-creator-code-b)
    • Session / ID: cron new-issue-creator-code-b run 2026-11-05 05:50 CST
    • Found via: filed this run
    • Task: Filed after verifying on the laptop (probe ~/git/fleet/probe-board-render-ref, real aggregator sources via bun @04f78696ab): titleRefs mints unsafe-integer refs unguarded, inFlightBoardItems validates only the first link, renderBoard throws on the non-first bad link.
    • Expectation: effort s — triage via the enqueued repo-task/v1 packet; fix filters titleRefs through isValidRef and/or guards the render site per the sessionRecordLine precedent.
    • Links: queue packet hidden_files/packet-6210-triage.json (goal workspace)
  5. dezren39 commented on Nov 5, 2026

    @dezren39
    MemberAuthor

    Queue note: the enqueue command was run twice while capturing its task id (the first call's output was truncated before the id field). The returned task is task 10027 with dedupe key repo-health:v1:triage:developing-today/code:issue:6210; if a second task with the same dedupe key exists, the duplicate should be superseded by its claimant — the packet is identical (hidden_files/packet-6210-triage.json).

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

  8. dezren39 commented on Nov 6, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · done (PR opened)

    • Agent: queue worker (repo-worker-code), OpenChamber scheduled lane 8ac61616-3815-4e7b-b33d-840a3829154a
    • Session / ID: task 10030
    • Outcome: titleRefs now filters every candidate with isValidRef; PR fix(aggregator): filter invalid title refs #6475 is open and the issue remains open pending merge.
    • Verification: targeted unsafe-ref tests pass (2); git diff --check passes. The board-in-flight suite has four unrelated failures on clean origin/main (stale openchamber alias expectations; 9 pass / 4 fail), reproduced on this branch.
    • CI: PR fix(aggregator): filter invalid title refs #6475 has no active CI checks; only CodeRabbit is reported and it skipped. .github/workflows/pm-aggregator-tests.yml is configured with only workflow_dispatch, despite its comments describing PR path filtering.
    • Expectation: merge PR fix(aggregator): filter invalid title refs #6475 after checks/review; CI trigger coverage gap needs separate follow-up.
    • Links: fix(aggregator): filter invalid title refs #6475
  9. dezren39 commented on Nov 8, 2026

    @dezren39
    MemberAuthor

    Partial verification — staying open (2026-11-07 done-task-only audit, tracking: #7016).

    Queue task(s) [10027, 10030] were marked done, and some work did land:

    No merged change closes this issue's full scope, so the done status is not treated as completion. Remainder re-queued as triage task 11764.

  10. dezren39 commented on Nov 8, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · picked up — triage verdict for task 12493

    Triage verdict — remainder is exactly one unmerged PR; every acceptance criterion is already covered

    Fresh checks this shift:

    Action: merging PR #6475 under the standing merge criteria (verified diff matching intent, Codex clean, mergeable clean, targeted tests passed). Its Closes #6210 closes this issue on merge; this triage task then completes as triaged with the merge as the landed evidence.

  11. developing-today commented on Nov 8, 2026

    @developing-today
    Contributor

    🤖 Agent note · done (triaged — remainder merged)

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

Metadata

Metadata

Assignees

Labels

app/pm-stackpm-stack (Pad/Grist) in developing-today/codekind/bugSomething isn't working (prefixed form of the classic bug label)priority/normalOrdinary priority (the default)source/creatorFiled by the new-issue-creator jobsource/design-architectFiled by the repo design architect 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