fix(lint): nav-object-ungranted stops prescribing a gate it cannot honour - #16436
Conversation
…t honour The hint (and module doc-block) prescribed gating a nav entry with requiredPermissions/visible as a way to clear the finding. Neither key is read by the rule, so following that advice left the warning firing forever. Corrected to the two remedies the rule can prove: grant read on the object, or drop the entry. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Vbw3RPgdtqesx4azk9SbW8
📓 Docs Drift Check1 anchor(s) derived from 1 changed package(s); no hand-written page names any of them, so this run has nothing to list — not a clean bill of health. This check sees only pages that NAME a derived anchor: one that documents this change in prose, or enumerates it in an authoring dialect, names none and stays invisible to it on every run. What this run could not see
Coarse fallback — 5 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): Which tree this was computed onThis run read A worktree cut from an older # while this PR is open — GitHub drops the merge commit once it closes
git fetch origin 9e645514d80f298bbb55b6acb074ff532cb4cf14 && git checkout 9e645514d80f298bbb55b6acb074ff532cb4cf14
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin ac76425f0bc9df18031201bb01fa917f19f62944 3bd1d1b91cdca7ec57aa9adb7fcda210fe742f76 && git checkout -B drift-repro ac76425f0bc9df18031201bb01fa917f19f62944 && git merge --no-ff 3bd1d1b91cdca7ec57aa9adb7fcda210fe742f76
node scripts/docs-audit/affected-docs.mjs --json ac76425f0bc9df18031201bb01fa917f19f62944 |
|
Flip point read 2026-09-07T01:41Z (PM seat devx, session_01Vbw3RPgdtqesx4azk9SbW8) — every check-run row at head The flip itself is held by the channel, not by the PR: the seat's write channel for draft→ready and auto-merge ( Generated by Claude Code |
|
Queued 2026-09-07T02:22:36Z (PM seat devx, session_01Vbw3RPgdtqesx4azk9SbW8) — the channel hold recorded above cleared on the third attempt: Generated by Claude Code |
|
Queue reading 2026-09-07T03:13Z (PM seat devx, session_01Vbw3RPgdtqesx4azk9SbW8) — still queued, regroup count now 2, no
Each regroup restarts the shard-5 clock, which is the lap that runs closest to the 30-minute wall (#16173). Seat action: none — a regroup is not a removal, and the seat's one re-queue stays unspent. Next probe 03:40Z. Generated by Claude Code |
Fixes #16065
Ruling (director seat, decision batch #59; maintainer verbatim 「16063 c, 其他同意」 — this card adopted as recommended, option B):
What changed
packages/lint/src/validate-nav-access.ts: thenav-object-ungrantedhint no longer prescribes gating the entry withrequiredPermissions/visible— that never cleared the finding, because the rule never reads either key (grep confirmed each word appeared exactly once in the whole file, both inside the old hint string; the module doc-block did not separately restate the three-remedy prose). The hint now names only the two remedies the rule can prove — grant read on the object in a permission set (allowRead: trueorviewAllRecords), or drop the nav entry — plus one sentence on why gating doesn't count. The doc-block gained the same statement.validateNavAccessitself is unchanged: identical findings on identical inputs before and after this PR (proven by re-running the full existing suite unmodified, and by a red-first check that reverted only the source file and confirmed the new pin test fails against it while every other test still passes).packages/lint/src/validate-nav-access.test.ts: added a pin for the hint text (the retired "gate the entry" clause must not return, the two live remedies must be present) plus three regression controls — arequiredPermissions-gated ungranted object still fires, avisible: falseungranted object still fires, and a gated-AND-granted object stays silent (gating causes neither a false negative nor a false positive)..changeset/nav-object-ungranted-hint-drops-gating.md—@objectstack/lintpatch.Why
Card 16065: an author following the hint's third remedy (gate the entry) got no change in the rule's output — the warning kept firing — after spending an edit that also narrowed what the app actually serves to a real user.
requiredPermissions/visiblegate visibility, not the object grant, so a holder who clears the gate can still open the entry and hit permission-denied on the object itself.Related, not touched here
visibleis inert at runtime; unrelated defect, not addressed by this PR.🤖 Generated with Claude Code
https://claude.ai/code/session_01Vbw3RPgdtqesx4azk9SbW8
Generated by Claude Code