Repository navigation
Open
Labels
app/aggregatorPackage/app: aggregator (pm-stack in this repo)Package/app: aggregator (pm-stack in this repo)kind/enhancementpriority/normalOrdinary priority (the default)Ordinary priority (the default)queue/blockedQueue or user escalation stateQueue or user escalation statesource/design-architectFiled by the repo design architect jobFiled by the repo design architect jobstatus/blockedQueue or user escalation stateQueue or user escalation statetask/triageQueue packet kind: verify, reproduce, and route this itemQueue packet kind: verify, reproduce, and route this itemwork/assignedQueue worker lifecycle stateQueue worker lifecycle state
Description
Closing ref inventory — disposition every ref consumer and producer against the ref contract
Phase 4 of the aggregator ref-contract design (design issue #6242; design doc files/designs/code-aggregator-ref-contract.md in the keep-the-four-repos-healthy goal workspace). Gated on Phases 1–3 of #6242 (#6174 + #6195, #6210 + #6211, #6224).
The contract this phase closes out (from #6242): a ref is an annotation, not identity; validity is isValidRef only; an invalid ref is dropped at the consumption step beside its gate (the item survives, the drop is traced), producers mint only valid refs, and rendering/deriving reaches refUrl for stored/feed-derived refs only through the safe-link helper — never a throw.
Scope
- An inventory of every
refUrl(/parseRef(consumer inpm-stack/aggregator/src(25refUrlsites at the design audit HEAD, origin/main 955ed23) and every ref-carrying gate, scrape, derivation and store path inpm-stack/aggregator+pm-stack/projector, each dispositioned against the contract with file:line evidence: gate-dropped (rule 2) / producer-filtered (rule 3) / safe-helper (rule 4) / internal-constructed-safe (code-built refs,parseRefthrow retained) / fixed-in-this-phase. - The contract statement landed in
pm-stack/aggregator/src/model.tsbeside the pm-stack(aggregator): validateNewComment/validateNewAction accept ref keys parseRef rejects (GH_REF number unbounded) #4952isValidRefcomment, so the disposition rules live where the validity rule lives. - Required dispositions (name each explicitly on this issue, with the evidence or the follow-up issue if one is owed):
queue-view.ts:113,139— stored refs reachingrefUrlunguarded.sources/live.ts:368— the session-rowrow.url ?? refUrl(row.ref, …)fallback.comments.ts:494—githubCommentUrlagainst the post-pm-stack(aggregator): validateNewComment/validateNewAction accept ref keys parseRef rejects (GH_REF number unbounded) #4952 store-load gates: is every stored comment'sgithubRefnow guaranteed valid, or is a guard owed?render.ts:3574—ensure()'srefUrlfallback in the overview path (post-pm-stack(aggregator): overview front door throws on a lined-up task with a non-GitHub ref — reconciledInProgress reaches refUrl unguarded #6205 state), andrender.ts:6756.sessionRecordLine(render.ts:1912) — align its omit-the-link treatment with rule 4's plain-text treatment, or record why this surface differs.- A recount of stored
pmp_linksrows (projector registry) whose ref failsisValidRef: how many exist, and confirmation that Phase 2's consumption filtering disarms them (no hand-deletion required for safety). - Any raw
matchAllref scrape outsidetitleRefs/refsInText(rule 3) — the pm-stack(aggregator): overview front door throws on a lined-up task with a non-GitHub ref — reconciledInProgress reaches refUrl unguarded #6205 fix's second vector (a title re-scrape besiderefsInText) is the shape to grep for.
- Probe evidence: for each surface this phase changes, a bad-ref case (unsafe-integer and non-GitHub forms) rendering/deriving without a throw, with a valid-ref control unchanged.
Acceptance criteria
- The inventory is posted on this issue (or in the model.ts contract statement it lands) with a disposition per site and no site left unclassified.
- The contract statement is on main in
model.tsbeside the pm-stack(aggregator): validateNewComment/validateNewAction accept ref keys parseRef rejects (GH_REF number unbounded) #4952 comment. - All seven required dispositions are recorded with evidence or a linked follow-up issue.
- Any site fixed in this phase carries pinning tests in the aggregator suite; the
bun testaggregator suite passes (via CI per fleet policy). - The design issue A ref that cannot link is plain text — one ref contract for the aggregator (design) #6242 is commented with the closing state so its acceptance can be checked off.
Metadata
Metadata
Assignees
Labels
app/aggregatorPackage/app: aggregator (pm-stack in this repo)Package/app: aggregator (pm-stack in this repo)kind/enhancementpriority/normalOrdinary priority (the default)Ordinary priority (the default)queue/blockedQueue or user escalation stateQueue or user escalation statesource/design-architectFiled by the repo design architect jobFiled by the repo design architect jobstatus/blockedQueue or user escalation stateQueue or user escalation statetask/triageQueue packet kind: verify, reproduce, and route this itemQueue packet kind: verify, reproduce, and route this itemwork/assignedQueue worker lifecycle stateQueue worker lifecycle state
Activity
developing-today commentedon Nov 5, 2026
CODE-1826
dezren39 commentedon Nov 5, 2026
🤖 Agent note · design phase filed
files/designs/code-aggregator-ref-contract.md(keep-the-four-repos-healthy goal workspace).dezren39 commentedon Nov 5, 2026
🤖 Agent note · state: handed off
dezren39 commentedon Nov 5, 2026
Agent note - handed off
ses_e5e5390d1d9ffeElqscEdtvx39dezren39 commentedon Nov 5, 2026
Triage — scope confirmed; Phase 4 remains gated (2026-11-05)
I confirmed the scope against design #6242 and the current main ref at 00a294a. The design's audit HEAD 955ed23 and its 25 refUrl count are historical; the implementation follow-up must recount at its current HEAD. This triage does not start the inventory.
Phases 1–3 have not all landed:
So Phase 4 is still gated. I left this issue open and changed its labels to status/blocked + queue/blocked. The phase is independently implementable once unblocked; no rescope or split is justified now. The implementation follow-up packet is deferred until Phases 1–3 land, per the design gate; do not begin the inventory before then.
When the gate clears, enqueue/split the implementation with this issue's acceptance intact: inventory every aggregator refUrl and parseRef consumer and every ref-carrying gate/scrape/derivation/store path in aggregator + projector; land the contract beside #4952 in model.ts; explicitly disposition (1) queue-view.ts:113,139, (2) sources/live.ts:368, (3) comments.ts:494, (4) render.ts:3574 and :6756, (5) sessionRecordLine, (6) invalid stored pmp_links recount, and (7) raw matchAll ref scrapes; post the inventory here and closing state on #6242. Any owed follow-up must be linked. For changed surfaces, pin unsafe-integer and non-GitHub bad-ref cases with valid-ref controls; run bun test in pm-stack/aggregator via CI (and bun test in pm-stack/projector if changed), per the CI policy. No builds/tests are run for this triage.