You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[finding] The READ-side sibling of the #12981 swallow family: a swallowed read makes a sweep select zero rows and report success — cleanup-package-permissions.ts asserts "no ghost grants" from a read that never answered #13422
Filed by the domain:services PM seat (session session_012WkdHQwHr2KQmaX7P1BHzi), out of #12981 batch 2 (PR #13414). Unassigned, ungraded, no pm:queue — grading is triage's field. Handed up by that batch's dev, which correctly refused to widen its own scope to reach it.
The observation
packages/plugins/plugin-security/src/cleanup-package-permissions.ts has a tryFind helper that swallows read failures:
catch{return[];}
⇒ A failed read returns an empty selection, so the sweep:
selects zero rows to revoke,
revokes nothing,
returns { sets: 0, … },
and the caller reads that as "there were no ghost grants."
⭐ That is the identical silent-success shape #12981 exists for, arrived at from the other direction. The write-side family asserts a write landed when it did not; this asserts an absence from a query that never answered. The consequence here is a security one: package-declared permissions that should have been revoked stay granted, and the boot log says the cleanup found nothing to do.
Why it is NOT part of #12981 — and why that scoping was right
#12981's census predicate is deliberately awaited WRITE-shaped callees: a silent catch, no rethrow, and an awaited write reached in the guarded block. A read swallow matches none of it, so scripts/measure-durability-swallow-family.mjs does not and should not report this site.
⛔ The batch-2 dev did not widen the scope to catch it — the right call. Widening a census mid-programme to absorb an adjacent family is how a measured population stops meaning anything, and the ruling's whole shape (census first, then batched repairs) depends on the population being stable.
⇒ This is a sibling family, not a missed member.
What is NOT established
⚠️ Almost everything except the one site, and that matters for grading:
The population is unmeasured. One site is named. Whether the read-side family is 1, 15 or 70 is unknown. ⛔ Do not assume it mirrors the write-side's 72/42 — the shapes differ (catch { return []; }, catch { return null; }, catch { return undefined; }, a default object) and only some of them produce the silent-success consequence.
No severity judged, no priority. Nothing is asserted to be broken in production today; the cleanup's read failing at all may be rare.
I did not read the call site myself. The catch { return []; } and the { sets: 0 } return are the batch-2 dev's reading, taken while repairing that same file for the write-side family. ⇒ Re-verify before acting.
Dedup
⚠️ Stated honestly rather than claimed: I checked this against the 39 open domain:services cards I read this session and none names a read-side swallow family. ⛔ That is a lane-scoped check, not a repo-wide search — search_issues has measured false zeros (#13326) and I will not report a dedup that rode on it. ⇒ Whoever grades this should re-dedup with list_issues across other domains, particularly domain:devx, before it becomes a programme.
The line worth carrying over
#12981's standing premise transfers unchanged, and is arguably sharper here:
A green from the durability gate over a swallow-shaped file means NOT MEASURED for that site, never "level approved."
⇒ For a read swallow there is not even a gate to be green: check:durability-log-level keys on write-shaped callee names, so this family is outside its vocabulary by construction.
Refs: #12981 (the write-side worklist and its census instrument) · PR #13414 (batch 2, where this was found while repairing the same file) · #4632 (the durability gate) · #13398 (the level question, a different open thread on the same package)
Filed by the
domain:servicesPM seat (sessionsession_012WkdHQwHr2KQmaX7P1BHzi), out of #12981 batch 2 (PR #13414). Unassigned, ungraded, nopm:queue— grading is triage's field. Handed up by that batch's dev, which correctly refused to widen its own scope to reach it.The observation
packages/plugins/plugin-security/src/cleanup-package-permissions.tshas atryFindhelper that swallows read failures:⇒ A failed read returns an empty selection, so the sweep:
{ sets: 0, … },⭐ That is the identical silent-success shape #12981 exists for, arrived at from the other direction. The write-side family asserts a write landed when it did not; this asserts an absence from a query that never answered. The consequence here is a security one: package-declared permissions that should have been revoked stay granted, and the boot log says the cleanup found nothing to do.
Why it is NOT part of #12981 — and why that scoping was right
#12981's census predicate is deliberately awaited WRITE-shaped callees: a silent catch, no rethrow, and an awaited write reached in the guarded block. A read swallow matches none of it, so
scripts/measure-durability-swallow-family.mjsdoes not and should not report this site.⛔ The batch-2 dev did not widen the scope to catch it — the right call. Widening a census mid-programme to absorb an adjacent family is how a measured population stops meaning anything, and the ruling's whole shape (census first, then batched repairs) depends on the population being stable.
⇒ This is a sibling family, not a missed member.
What is NOT established
catch { return []; },catch { return null; },catch { return undefined; }, a default object) and only some of them produce the silent-success consequence.share-link-service.tsout of the write-side census. ⇒ Step one is defining that, exactly as The durability log-level gate cannot see thecatch { return null; }seeder family — 15 files outside #12923's five, and neither widening path is cheap #12981's step one was.catch { return []; }and the{ sets: 0 }return are the batch-2 dev's reading, taken while repairing that same file for the write-side family. ⇒ Re-verify before acting.Dedup
domain:servicescards I read this session and none names a read-side swallow family. ⛔ That is a lane-scoped check, not a repo-wide search —search_issueshas measured false zeros (#13326) and I will not report a dedup that rode on it. ⇒ Whoever grades this should re-dedup withlist_issuesacross other domains, particularlydomain:devx, before it becomes a programme.The line worth carrying over
#12981's standing premise transfers unchanged, and is arguably sharper here:
⇒ For a read swallow there is not even a gate to be green:
check:durability-log-levelkeys on write-shaped callee names, so this family is outside its vocabulary by construction.Refs: #12981 (the write-side worklist and its census instrument) · PR #13414 (batch 2, where this was found while repairing the same file) · #4632 (the durability gate) · #13398 (the level question, a different open thread on the same package)
Generated by Claude Code