Uh oh!
There was an error while loading. Please reload this page.
') + ')', 'gi'); if (regex.test(text)) { found = true; var frag = document.createDocumentFragment(); var parts = text.split(regex); parts.forEach(function(part, i) { if (i % 2 === 0) { frag.appendChild(document.createTextNode(part)); } else { var span = document.createElement('span'); span.className = 'userscript-highlight'; span.textContent = part; frag.appendChild(span); } }); node.parentNode.replaceChild(frag, node); } }); } else if (node.nodeType === 1 && node.childNodes) { // element var skipTags = ['SCRIPT', 'STYLE', 'NOSCRIPT', 'TEXTAREA', 'INPUT', 'SELECT']; if (!skipTags.includes(node.tagName)) { Array.from(node.childNodes).forEach(highlight); } } } highlight(document.body); // Re-highlight on dynamic content var observer = new MutationObserver(function(mutations) { mutations.forEach(function(m) { m.addedNodes.forEach(function(node) { if (node.nodeType === 1 || node.nodeType === 3) highlight(node); }); }); }); observer.observe(document.body, { childList: true, subtree: true }); })(); } } catch(__e) { console.warn('[Userscript:Highlight Search Terms]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + ', 'i'); if (__m === '*' || __re.test(location.href)) { // Strip utm_, fbclid, gclid, etc. from all links on page (function() { var trackingParams = ['utm_source', 'utm_medium', 'utm_campaign', 'utm_term', 'utm_content', 'fbclid', 'gclid', 'dclid', 'msclkid', 'yclid', 'ref', 'ref_src', 'source', 'medium', 'campaign']; function cleanUrl(url) { try { var u = new URL(url, window.location.origin); var changed = false; trackingParams.forEach(function(p) { if (u.searchParams.has(p)) { u.searchParams.delete(p); changed = true; } }); return changed ? u.toString() : url; } catch (e) { return url; } } function cleanLinks() { document.querySelectorAll('a[href]').forEach(function(a) { var clean = cleanUrl(a.href); if (clean !== a.href) a.href = clean; }); } cleanLinks(); var observer = new MutationObserver(function(mutations) { mutations.forEach(function(m) { m.addedNodes.forEach(function(node) { if (node.nodeType === 1) { if (node.tagName === 'A') cleanLinks(); node.querySelectorAll('a[href]').forEach(function(a) { var clean = cleanUrl(a.href); if (clean !== a.href) a.href = clean; }); } }); }); }); observer.observe(document.body, { childList: true, subtree: true }); })(); } } catch(__e) { console.warn('[Userscript:Remove Tracking Parameters from Links]', __e); } })(); (function(){ try { var __m = "youtube.com"; var __re = new RegExp('^' + "youtube\\.com" + ', 'i'); if (__m === '*' || __re.test(location.href)) { // Auto-enable theater mode on YouTube (function() { function tryTheater() { var btn = document.querySelector('button[aria-label="Theater mode"], ytd-player #player button[title="Theater mode"]'); if (btn && !btn.classList.contains('activated')) { btn.click(); } } // Try immediately tryTheater(); // Try after navigation (SPA) var lastUrl = location.href; setInterval(function() { if (location.href !== lastUrl) { lastUrl = location.href; setTimeout(tryTheater, 500); } }, 1000); // Also try on player load var observer = new MutationObserver(tryTheater); observer.observe(document.body, { childList: true, subtree: true }); })(); } } catch(__e) { console.warn('[Userscript:YouTube Theater Mode Default]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + ', 'i'); if (__m === '*' || __re.test(location.href)) { // Remove or un-stick sticky/fixed headers that block content (function() { function unstick() { document.querySelectorAll('header, nav, [role="banner"], .header, .navbar, .sticky, .fixed-top, [style*="position: fixed"], [style*="position:sticky"]').forEach(function(el) { if (el.style.position === 'fixed' || el.style.position === 'sticky' || getComputedStyle(el).position === 'fixed' || getComputedStyle(el).position === 'sticky') { el.style.position = 'static'; el.style.top = 'auto'; el.style.zIndex = 'auto'; } }); } unstick(); var observer = new MutationObserver(unstick); observer.observe(document.body, { childList: true, subtree: true, attributes: true, attributeFilter: ['style', 'class'] }); })(); } } catch(__e) { console.warn('[Userscript:Kill Sticky Headers]', __e); } })(); })();
There was an error while loading. Please reload this page.
Found while re-verifying the platform-admin doc claims against merged code for #11976 (L7). Not a runtime defect on either site — both are comments — but both ship or steer, and both now describe a gate that #11974 (L4) retired.
1.
packages/types/src/email-verified.ts— the module docblock names a retired consumerThe docblock over
isEmailVerifiedUserRowstill says, verbatim:After L4 the walled arm of
bootstrapPlatformAdminwrites no grant row and performs no elevation — it reports. The predicate's real consumers now includematchesConfiguredPlatformAdmininpackages/core/src/security/platform-admin.ts(the derivation site) andresolvePlatformAdminStandinginplugin-security/src/platform-admin-service.ts(the audit surface).Why it is worth a card rather than a shrug: this docblock is exported prose — it reaches consumers in the package's type declarations — and it tells the next reader that the drift risk is between two named callers, when the real set is larger and includes the authorization derivation itself. The "two must answer identically or a boot warning forecasts a refusal the gate will not make" argument now under-describes the invariant.
2.
packages/plugins/plugin-auth/src/last-admin-guard.ts— theactivereasoning is grant-onlyThe comment above
PERMISSION_SET_STANDING_KEYSsays:That is true for the grant anchor only.
resolve-authz-context.ts§6b-config setshasPlatformAdminGrantfrom configuration and the caller's ownsys_userrow without consultingpsRowsorisRowActiveat all, and its capability envelope comes from the shippedADMIN_FULL_ACCESS_CAPABILITIESdeclaration rather than the stored set row. So deactivating the set does not un-make a configured, verified administrator.The guard's behaviour is unaffected and correct: keeping
activein the standing keys is an over-approximation, which fails in the safe direction, and the enumeration inresolveAdminUserIdsdoes have a config-derived arm. It is the stated reason that is now wrong, and it is the reason a future reader would use to decide whether the key can be dropped.Suggested shape
One comment-only change touching both files, no behaviour. Worth pairing with whichever leg next edits these files rather than a standalone PR.
Scope note
Deliberately not fixed inside #11976: that card is docs-body-prose only and declared no
packages/surface, so touching either file there would have been unrecorded scope creep.Context: #11663 (design), #11970 (L2), #11974 (L4).
Generated by Claude Code