Repository navigation
Bring security/DESIGN.md under its 40 KiB budget and retire its ceiling - #4280
Merged
Merged
Conversation
#4110 left security/DESIGN.md at 52,798 bytes, 30 bytes over its 52,768-byte ceiling. Under --base, check-design-docs.mjs holds any edit to an over-ceiling file to at most 60% of its ceiling (31,660 bytes), which brings security/DESIGN.md within the 40,960-byte budget and retires its entry from build-tools/design-docs-ceilings.json. Trim prose narration, duplicated allowlist statements, and code-level restatements across 16 sections down to 31,621 bytes while preserving every invariant, symbol, issue reference, and enforcement test. Dispatch-Task: harper-design-doc-ceiling-security Co-Authored-By: Gemini <noreply@google.com>
Restore the purpose and Read-this-when header, the unchanged non-zero userChangeNotificationEpoch() consumer guarantee, exact wording for the three known _scopedToken by-name sites, preview system-table row replication and empty-drop re-census stop rules, OIDC claims/provider hooks, TLS transient-skew and backoff notes, named test-block pointers, and named-process residual risks while staying at 31,574 bytes. Dispatch-Task: harper-design-doc-ceiling-security Co-Authored-By: Gemini <noreply@google.com>
State that operations: ['read_only'] does not block REST writes and that table permissions still apply, keeping security/DESIGN.md at 31,612 bytes. Dispatch-Task: harper-design-doc-ceiling-security Co-Authored-By: Gemini <noreply@google.com>
kriszyp
marked this pull request as ready for review
November 11, 2026 22:17
dawsontoth
added a commit
that referenced
this pull request
Nov 11, 2026
…fversion Main's #4280 brought security/DESIGN.md under its budget and retired its ceiling, so the conflict resolves to main's file plus this PR's session sentences, and the PR no longer changes the ceilings file. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
kriszyp
added a commit
that referenced
this pull request
Nov 11, 2026
Upstream #4280 pruned security/DESIGN.md under its 40 KiB budget and retired its ceiling, while #4216 left root DESIGN.md 2 bytes under its 68,166-byte ceiling. Place the two #3485 compartment importHook invariants as subsections under the indexed security/jsLoader.ts loader-gates note so root DESIGN.md and build-tools/design-docs-ceilings.json stay untouched. Dispatch-Task: pr-maint-8f11d60fac23bd5d253528880dc524d7 Co-Authored-By: Gemini <noreply@google.com>
This was referenced Nov 11, 2026
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.
⊙ Problem
Lint Source Codefailsnpm run check:design-docsonmainbecause #4110 leftsecurity/DESIGN.mdat 52,798 bytes, 30 bytes over its 52,768-byte ceiling.resources/DESIGN.mdis also 3 bytes over its ceiling (45,886 / 45,883 after #4250), andresources/indexes/DESIGN.mdhas 22 bytes of headroom (91,898 / 91,920).🤔 Condense across sections and retire the ceiling vs. pruning single sections?
PR CI runs
check-design-docs.mjs --base HEAD^1: an edit to an over-ceiling file must cut it to 60% of its ceiling (31,660 bytes). No two sections hold that 21.1 KiB cut without dropping invariants. Condensing prose across sections reaches 31,613 bytes (9,347 bytes under the 40,960-byte budget);check-design-docsthen requires retiring the spent ceiling.💡 Solution
security/DESIGN.md, bringing it from 52,798 bytes to 31,613 bytes while keeping every invariant, residual risk, symbol,#issuereference, heading anchor, and named test pointer.npm run check:design-docs -- --update-ceilingsto retire"security/DESIGN.md"frombuild-tools/design-docs-ceilings.json, leaving 9,347 bytes of headroom under the 40 KiB budget.resources/DESIGN.md(-3 bytes headroom: 45,886 / 45,883) andresources/indexes/DESIGN.md(+22 bytes headroom: 91,898 / 91,920) untouched so they do not collide with active sibling PRs.Section-by-section cuts in
security/DESIGN.md(no invariants removed)Read this when:to cover newersecurity/modules and keeping the rootDESIGN.mdindex link.<component>-ci-deploy/deploy_sourcefield enumerations already in source; keptclaims.tsand allproviders/hooks,jwks.tsrate-limit separation,rejectTokensharing, per-audience memoization,generic.tsvsgithubActionsProfile, all five invariants,hdb_oidc_token_useheader.payloadhashing and non-atomic rationale,deploy_sourceattestation (Record where a deploy came from: the commit, the CI run and the trust policy #3061), andharper deploy setup=truecreate-only/replicatedhdb_oidc_trustrules.sub: 'scoped-operation'irrevocability andauthExpiresAteviction, the three known_scopedTokenby-name sites plus future-site obligation, passwordlesscreateTokensrejection,api_name/nullregistrations (get_backup,read_transaction_log,catchup),syntheticRoleName()hashing, 256-entrysyntheticRolePermsMapLRU, andverifyPermsgate ordering.prepareSelfSignedCertswalkthroughs; kept main-only watching, 30 s/hourly incomplete-pair alarms, <=1/s chokidar trailing check, worker subscription reload,getPrivateKeys()refresh,from_configvs older-file guard, transient key-first/second-rotation mismatch note, transactionalupdateTLSlast-good/CA-rebuild/zero-cert retention and 1.5s→5min backoff (A cert renewal whose table write misses the rebuild window downgrades TLS to the self-signed cert and never retries #2382),contextStorage.exit()and.readyrecovery (harper-pro#1189), atomicpublishSelfSignedCerts,<node>-self-signednaming,wx/0o600key creation, and all named test cases.sourceContext.expiresAt+createCacheKeyversioning,crl_next_update + gracePeriodretention, and separate-transaction CRL replacement + snapshot rules.export { x } from './…'snippet, quoted load-error text, and prose repetition while keepingindex.ts+getHarperExportsparity, defining-moduleSymbolidentity (markCredentialRejection), CommonJS-firstresolveModule+PACKAGE_EXPORTS_RESOLVEdigest tracking,loadSESESM shims on Bun, all four VM entry points and gates, URL-keyedcjsCache/nativeModules, compile-only ESM retry, uncovered edges, and named test blocks.~1.8 KB); keptsettleAuthFailure/rejectAuthenticationInPlace,markAuthenticationRejectedInPlaceon WebSocket/MQTT upgrades, no credential fallthrough after deferred rejection, V8CheckAssigningFunctionLiteralToPropertypretenuring rule, RocksDB user-version retry, LMDB turn-shared read txn, version-validated caches,onUserChange+userChangeNotificationEpoch()unchanged non-zero consumer guarantee and unaudited-table rule, andcloneUserViewsymbol provenance.hdb_preview_policyrejected-table aside; keptRESERVED_DATABASE_NAMES, pre-gate-2 finality, handler-aligned name resolution, origin-only constraint checks, deploy-only secret patterns,<app>-ci-preview+ dual OIDC policies,preview: required/maxPreviews/maxTtlDaysenforcement, serialized create-only enable (Set up GitHub Actions deploys withharper deploy setup=true provider=github-actions#3127),fence_preview_releasesgeneration fencing + unfenced cases (A preview deploy already swapping, or applying on a peer, can go live after disable_previews #3613, A crash mid-swap or a canary restore can put a revoked preview live after disable_previews #3805), and empty-drop re-census stop rules.configuredHashFunction()+ synchronous SHA-256password.validatedefault, per-mint lifetimes,_localPrincipal: truestring marker, non-portability/getSuperUserminting, and per-call views with defaultrole.id.spawnhands back a recycled pid, or a zombie, as a component's process #2968), write-then-rename, cross-boot retirement,hidepid/permission-denied unknown handling and operator repair, legacy two-line coexistence residual,componentPreparationLock.tsticket ordering, 1 s positive foreign-owner cache, release markers and dual-failure repair, shared claim protocol, 60 s cohort-progress wait bound, 30 s probe cap, intra-process worker limitation and deferred main-thread sweep, native PID handle residual, WindowsexitCode/signalCode: null,NamedProcessError, and Windows-gated test notes.permission.systemderivation unchanged in substance.⚖️ Alternatives
design-docs-ceilings.jsonat 52,768 —check-design-docs.mjs --base HEAD^1fails any edit to an over-ceiling file that leaves it above 60% of its ceiling (31,660 bytes).resources/DESIGN.mdorresources/indexes/DESIGN.mdin this PR —resources/DESIGN.md(3 bytes over ceiling) owes its own 40% cut in a separate change, andresources/indexes/DESIGN.md(22 bytes under ceiling) overlaps active index PRs.✅ Verification
security/DESIGN.md(node build-tools/check-design-docs.mjs --stalereports zero dead symbol/path references and zero over-budget errors onsecurity/DESIGN.md; all 15#issuereferences and all named test pointers remain).npm run check:design-docsandnpm run check:design-docs -- --base origin/mainpass forsecurity/DESIGN.mdandbuild-tools/design-docs-ceilings.json(only the pre-existing 3-byte overrun inresources/DESIGN.mdfrom Clear a removed table TTL everywhere, reject invalid TTLs where they are declared, and scan catalog-loaded tables without a write #4250 remains onmain).NODE_OPTIONS=--conditions=typestrip npx mocha unitTests/build-tools/checkDesignDocs.test.mjs(59 passing),npm run lint,npm run check:unit-partition, andnpx prettier --check security/DESIGN.md build-tools/design-docs-ceilings.jsonall pass.PR QA: skipped @ 1b40b71 — docs-only design-note trim and ceiling metadata update with no runtime behavior.
Docs: none needed (internal design notes only).
🤖 Generated by Google Gemini; posted via @kriszyp.
Release target: v5.4 — changed code is not on v5.3 1 absent file
Related PRs: #2906 overlaps (edits security/DESIGN.md), #2990 overlaps (edits security/DESIGN.md and design-docs-ceilings.json), #3485 overlaps (edits security/DESIGN.md and design-docs-ceilings.json), #4066 overlaps (edits security/DESIGN.md), #4069 overlaps (edits security/DESIGN.md), 1 other independent
Complexity: easy
Origin — the dispatch brief this PR was written from
Bring security/DESIGN.md back under its size ceiling so check:design-docs passes on main
npm run check:design-docsfails on harper main: security/DESIGN.md is 52,798 bytes, 30 over its ceiling of 52,768 (the ceiling only falls). Trim security/DESIGN.md so it passes with real headroom — remove or tighten narration, duplicated statements and anything the code already says; keep every invariant and rule. Do not raise the ceiling. Follow the precedent of "Bring config/DESIGN.md back under its 40 KiB budget (#4228)". Also report (do not change) the current headroom of resources/DESIGN.md and resources/indexes/DESIGN.md, which other tasks found within 90 and 22 bytes of their ceilings; if a prune of those is cheap and safe in the same spirit, include it, otherwise leave them. Run check:design-docs and lint. Open a PR.Acceptance
check:design-docs passes on the branch; no invariant removed from security/DESIGN.md (list what was cut in the PR body); ceiling unchanged.
Dispatch: task
harper-design-doc-ceiling-security· queued by kris-session · ran by gemini/gemini-4-carbon-high/low · worker kzyp-xps-1Review-Coverage: authored=gemini; ran=cursor-composer,claude,cursor-grok; late=cursor-grok:adjudicated; adjudicated=domain; declined=muse; urgency=fast; rounds=3; full=1 @ 1b40b71
Review-Attention: read ~3m (decisions: wholesale-rewrite-vs-targeted-prune) @ 1b40b71