Skip to content

feat(pit): pit.moshcode.sh — the clearnet way into the namespace - #70

Merged
ralyodio merged 1 commit into
masterfrom
feat/pit-bootstrap
Jul 31, 2026
Merged

feat(pit): pit.moshcode.sh — the clearnet way into the namespace#70
ralyodio merged 1 commit into
masterfrom
feat/pit-bootstrap

Conversation

@ralyodio

Copy link
Copy Markdown
Collaborator

PRD 0001 R11. The page a normal browser lands on: explains the network, checks whether
.whatever is free, and claims it — over ordinary HTTPS.

Stacked on #69 (the registry). Base is feat/moshpit-tld-registry; it'll retarget to
master automatically 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

  • Availability is unauthenticated. Same answer signed in or not — the sign-in wall
    belongs on the claim, not on finding out whether your name is taken.
  • A 401 returns you to /pit, not a generic dashboard. You came for a specific name.
  • Malformed vs unavailable render differently. "that isn't a TLD" and "someone owns it"
    read very differently to someone typing.

Two registry fixes this surfaced

Typechecking the page caught real bugs in #69:

  1. RegisterResult was a discriminated union that doesn't narrow here — this project
    compiles with strict: false, and without strictNullChecks TypeScript won't narrow on
    a boolean discriminant, so if (!result.ok) result.error failed to compile. Flat shape now.
  2. The TLD name test was the repo's only .ts test, so tsconfig's **/*.ts glob picked it
    up and couldn't resolve bun:test. Rewritten in the node:test style the rest use.

Verified

  • tsc --noEmit — clean
  • next build — succeeds, /pit in the route table
  • bun test tests/40 pass, 0 fail

🤖 Generated with Claude Code

@github-actions

Copy link
Copy Markdown

vu1nz Security Review

0 finding(s) in PR #?

No security issues found.

@ralyodio
ralyodio deleted the branch master July 31, 2026 01:58
@ralyodio ralyodio closed this Jul 31, 2026
@ralyodio ralyodio reopened this Jul 31, 2026
@ralyodio
ralyodio changed the base branch from feat/moshpit-tld-registry to master July 31, 2026 01:59
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
ralyodio force-pushed the feat/pit-bootstrap branch from 644b56c to bb190db Compare July 31, 2026 02:00
@ralyodio
ralyodio merged commit 1085d2f into master Jul 31, 2026
2 checks passed
@ralyodio
ralyodio deleted the feat/pit-bootstrap branch July 31, 2026 02:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant