feat(pit): pit.moshcode.sh — the clearnet way into the namespace - #70
Merged
Conversation
vu1nz Security Review0 finding(s) in PR #? No security issues found. |
PRD 0001 R11. The page a normal browser lands on: explains what the network is,
checks whether `.whatever` is free, and claims it — all over ordinary HTTPS.
It deliberately needs neither the extension nor a node. A bootstrap that
required the thing it bootstraps would not be a bootstrap, and the extension
does not exist yet; the copy says so rather than promising a resolver nobody
can install.
Availability is an unauthenticated GET, so the answer is the same signed in or
not. The sign-in wall belongs on the claim, not on finding out whether the name
you want is taken — and a 401 sends you back to /pit afterwards rather than to
a generic dashboard, because you came here for a specific name.
A malformed name (400) and a name that is real but unavailable (409/reserved)
render differently. They read very differently to someone typing.
Two fixes to the registry underneath, both surfaced by typechecking this page:
- RegisterResult was a discriminated union, which does not narrow here: this
project compiles with `strict: false`, and without strictNullChecks
TypeScript will not narrow on a boolean discriminant, so `if (!result.ok)
result.error` failed to compile. It is a flat shape now.
- the TLD name test was the repo's only .ts test, so tsconfig's **/*.ts glob
picked it up and could not resolve `bun:test`. Rewritten in the node:test
style the other tests use.
Verified: `tsc --noEmit` clean, `next build` succeeds with /pit in the output,
40 tests pass.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
ralyodio
force-pushed
the
feat/pit-bootstrap
branch
from
July 31, 2026 02:00
644b56c to
bb190db
Compare
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.
PRD
0001R11. The page a normal browser lands on: explains the network, checks whether.whateveris free, and claims it — over ordinary HTTPS.Stacked on #69 (the registry). Base is
feat/moshpit-tld-registry; it'll retarget tomasterautomatically once that merges.It needs neither the extension nor a node
A bootstrap that required the thing it bootstraps wouldn't be a bootstrap. The extension
doesn't exist yet, and the copy says so rather than promising a resolver nobody can
install.
Small things that matter
belongs on the claim, not on finding out whether your name is taken.
/pit, not a generic dashboard. You came for a specific name.read very differently to someone typing.
Two registry fixes this surfaced
Typechecking the page caught real bugs in #69:
RegisterResultwas a discriminated union that doesn't narrow here — this projectcompiles with
strict: false, and withoutstrictNullChecksTypeScript won't narrow ona boolean discriminant, so
if (!result.ok) result.errorfailed to compile. Flat shape now..tstest, so tsconfig's**/*.tsglob picked itup and couldn't resolve
bun:test. Rewritten in thenode:teststyle the rest use.Verified
tsc --noEmit— cleannext build— succeeds,/pitin the route tablebun test tests/— 40 pass, 0 fail🤖 Generated with Claude Code