Repository navigation
Mail a notice with compute access decisions - #2300
Merged
Merged
Conversation
📦 Package PreviewYour package is ready to test! bun install -g nemar-cli@PR2300Version: 🤖 Updated on each push. |
12 tasks done
This was referenced Nov 22, 2026
Merged
This branch was previously deployed
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.
The compute terms (nemarOrg/docs#105) promise that a suspension or an ending of compute access is mailed with the reason and how to ask for a review. Part of #2026.
The audit
reasonstays free text for the record and is never mailed. A separate, person-facingnoticeis added:noticesuspend,revokedenygrantCOMPUTE_ACCESS_NOTICE_RULE,computeAccessNoticeProblem(one rule for the Worker and the CLI), 1000 characters after trimming, control characters other than newline and tab refused; the schema stays open, the route closes it with.strict()invalid_bodynamingnoticewith the rule's word, never the valueREPLY_TO(the same value the mail's Reply-To carries;[email protected]on staging), falling back to [email protected] only when unset. The old "contact the administrators" sentences are replaced by it. The mail is HTML only (sendEmailhas no text part). Sentences stay inemail.tsnext to the other mail bodies:account-copy.tsis the copy the CLI and website render and mirror, and neither renders a mail--notice <text>onsuspend/revoke(required, checked before sending) anddeny(optional);granthas no such option; the notice is sent trimmed, as the website sends it4 * 1000UTF-16 units on the value as sent) carries the rule word, so a heavily padded notice is 400notice: notice_too_long, never a rawtoo_bigcompute-terms.tsdocblock: the counsel gate is gone; terms publish when compute opensFollow-up outside this repo: the website compute tab (
ComputeDecisionDialog) gains the notice field and the new mirrored copy keys, and it ships together with this Worker change: without it, its suspend and revoke buttons get 400notice_required. The admin runbookadmin/operations/compute-requests.mdgains--noticein nemarOrg/docs (lands with this PR).Release coordination: website staging first, then nemar-cli
dev; the twomainpromotions (website and nemar-cli) are a pair and go out together.Tests (targeted):
bun run typecheckclean; biome clean on changed files (only pre-existinganywarnings). Backend compute-access, hold-reaper, partner-credentials, lifecycle and email suites: 562 pass. Root compute-access CLI and notice unit tests, route inventory, export surface, contract schemas, compute contract, partner e2e, user e2e CLI: 880 pass, 2 fail inaccount-copy-parity(it compares against the sibling website checkout, and it also fails on adevcheckout;account-copy.tsis untouched here). Mutations checked: makingsuspendoptional and dropping the notice escaping each fail a route test. Fullbun testnot run (epic -> dev only).Review fixes (targeted): typecheck clean; biome clean on changed files (pre-existing
anywarnings only).compute-access-notice.unit+compute-access-cli: 40 pass.compute-access-decision-routes(70) plus every backend*email*suite: 290 pass. New tests: a route test with three padded or oversized notices (each 400notice_too_long, notoo_big, no value echoed, nobody mailed), a CLI test that a 1000-character notice plus 3001 spaces suspends and is mailed, and a route test that setsREPLY_TO(bare and mailbox form) and asserts the capturedreply_toand the address in the sentence. Mutations: reverting the trim and the guard message makes the CLI and route padding tests fail.