Repository navigation
fix(pm-stack): drop unsafe-integer registry refs at projectorLinks and the POST /links gate (#6211) - #6244
Merged
developing-today[bot] merged 1 commit intoNov 5, 2026
Conversation
…d the POST /links gate (#6211)
developing-today
Bot
requested review from
a team and
dezren39
as code owners
November 5, 2026 14:23
|
Important Review skippedBot user detected. To trigger a single review, invoke the
|
developing-today
Bot
deleted the
queue/10561-6211-unsafe-integer-registry-refs
branch
November 5, 2026 14:28
5 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #6211 (queue task 10561).
What
Both layers from the issue's acceptance criteria, so a registry link whose ref
parseRefrejects can neither be stored nor reach a renderer:projectorLinks(pm-stack/aggregator/src/sources/live.ts) now filters rows through the sharedisValidRefrule (pm-stack(aggregator): validateNewComment/validateNewAction accept ref keys parseRef rejects (GH_REF number unbounded) #4952). Stored legacy/seeded rows bypass the POST gate entirely, so the drop happens here, with a[registry] WARNINGlog line naming the dropped ref and subject (provenance-visible, not silent).POST /links(pm-stack/projector/src/server.ts) now validates with the newisStorableLinkRef: the existing owner/repo#N shape check plusNumber.isSafeIntegeron the number — the same semantics asparseRef, closing the/^[\w.-]+\/[\w.-]+#\d+$/shape-regex gap the issue documents (model.ts:463-466 anti-pattern).Effect:
/searchand project-page roadmap rendering survive a board item / roadmap row whose registry rows contain an unsafe-integer ref or a non-GitHub-shaped ref — the bad link is omitted at ingest, sibling good links still render as links. Valid refs are unchanged.Oracle
Regression tests name their oracle explicitly: the shared
isValidRef/parseRefrule from #4952 is the decision procedure for which refs are usable, applied at both boundaries.pm-stack/aggregator/test/registry-ref-filter-6211.test.ts— board subject drops an unsafe-integer ref, roadmap subject drops a non-GitHub-shaped ref and an unsafe ref, good refs kept;/searchrenders both enriched entries with the good ref and neither bad ref.pm-stack/projector/test/links-ref-gate-6211.test.ts—isStorableLinkRefunit cases (incl. 9007199254740991 accepted / 9007199254740992 rejected) and POST /links end-to-end: unsafe-integer ref → 400 with nothing stored; boundary and ordinary refs → 201.Verification (laptop, branch base ffdd4f5)
search-view.test.ts— 6 pass.bunx tsc --noEmitclean.links-validation.test.ts— 14 pass.Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.