Skip to content

Classify resolved addresses at the pinned transport; model control-plane and audit boundaries - #390

Merged
0thernet merged 15 commits into
mainfrom
claude/fv-claims-control-auth
Sep 25, 2026
Merged

0thernet merged 15 commits into
mainfrom
claude/fv-claims-control-auth

Conversation

@0thernet

Copy link
Copy Markdown
Member

The web gateway's pinned transport trusted the resolver's own public/non-public classification; a resolver that under-reported (or that returned a public name for a private address) would let a retrieval URL reach a private target. The gateway now classifies every resolved address itself and refuses non-public ones, with golden vectors generated by the standard-library Python oracle. The lane also models the helper owner's live-owner and lost-race handling, connection shutdown, the web gateway's durable audit boundary, and the operation-authority sequencer over the production code.

Claims moved (8)

Claim Layer Evidence
public-address classification vectors verification/vectors/addresses.json (6,375 generated cases) compared against the TypeScript in scripts/verification-vectors.test.ts
helper-owner live-owner / lost-race stateful-model stateful schedule model over the production helper sequencer
connections shutdown stateful-model stateful model over Connections
web gateway durable audit boundary stateful-model model over the production audit store
operation authority stateful-model stateful model over the production sequencer
pinned-https resolver independence vectors + tests resolver classifier bypass pins
managed-confirm drift source mutant managed-confirm-keeps-drifted-plan
grant digest closure source mutant grant-digest-ignores-closure

Evidence and how the evidence fails when broken

  • Vectors. verification/vectors/generate.py (stdlib-only) emits every generated address family edge — documentation ranges, IPv6 forms, mapped/embed cases, malformed inputs — and scripts/verification-vectors.test.ts asserts the TypeScript agrees byte-for-byte.
  • Source mutants (13 added). pinned-https-trusts-resolver-classifier, public-address-admits-all-ipv6, helper-owner-ignores-live-owner, helper-owner-ignores-lost-race, web-gateway-dispatch-without-audit, web-gateway-output-despite-failed-audit, web-gateway-returns-redirect, activity-recovery-keeps-started, helper-shutdown-skips-settle, helper-shutdown-aborts-after-settle, connections-close-keeps-attempts, managed-confirm-keeps-drifted-plan, grant-digest-ignores-closure — each must fail exactly its named test on the seeded nightly run.
  • Stateful models. Each model generates bounded action/fault schedules over the production reducer or port (not a reimplementation) and asserts the safety and conditional-progress laws; failing seeds and shrink paths are recorded in verification/seeds/corpus.json.

Defects found

  • The pinned transport trusted the resolver's public/non-public answer — a resolver-level confusion could reach a private address. src/public-address.ts (new) now classifies resolved addresses itself and src/pinned-https.ts/src/runtime.ts refuse non-public targets; src/public-address.test.ts (+124) plus the generated vectors pin the boundary.

Package budget

src/public-address.ts and the pinned-https/runtime touch ship in the package; bun run verify:package on this head is the budget check. Verification vectors and models stay out of the package.

CI cost

The vectors test compares the full generated corpus each run; the stateful models are helper-heavy bounded schedules. The 13 new mutants run only in the nightly source-mutation job (outside Required).

Not covered

  • Classification covers the generated vector corpus and the documented edge families; novel address syntax outside the corpus is covered only by the strict parser's reject-by-default path.
  • Local validation on this host was partial under heavy load: typecheck and the claims render/check pass post-merge; helper-heavy stateful suites and the full mutant set are delegated to the Required/nightly CI runs on this head.

🤖 Generated with Claude Code

0thernet and others added 9 commits September 24, 2026 13:19
The kb resolver admits the IPv4-translated ::ffff:0:0:0/96 form of
loopback and private addresses, IPv6 outside 2000::/3, and 192.88.99.0/24.
pinnedHttpsFetch now checks every resolved answer with Ghostget's own
allowlist classifier before choosing a socket address.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
An independent Python generator restates the IANA special-purpose table
and writes verdicts for block edges, seeded random addresses, embedded
IPv4 forms, and several text forms. The TypeScript classifier must match
every vector, and the kb classifier, a table missing any row, and a
lenient text parser each miss vectors. Property tests cover text-form
invariance, embedded forms, and space outside 2000::/3.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…dent of planned claims

The owner model writes through the private state layer, so 30 runs need more
than the default 10-second interrupt budget. The register tests picked a
planned claim of each layer to re-evidence; once a layer has none left they
now take any claim at that layer.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
A fast-check command model sends requests through WebGateway and the real
ActivityStore with a scripted transport: success, HTTP error, redirect,
oversized bodies, revocation before and after dispatch, network error, a
denying rule, failed start and final audit writes, and a crash in flight
followed by recovery. Four source mutants, each killed by the model, remove
the durable start, swallow a failed final audit, return redirects, and skip
crash recovery.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…d Connections

Extract the helper's inline shutdown into settleHelperShutdown with the same
order, and model it and Connections.close with fc.commands. Evidence the
gateway audit and shutdown claims, with mutants for each.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Consume expired or drifted plans under managed permissions, extend the model
to realm and contract changes, and register the two authority mutants.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@vercel

vercel Bot commented Sep 25, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
ghostget Ready Ready Preview Sep 25, 2026 4:34am UTC

Request Review

The public-address classification, pinned HTTPS protections, helper
ownership and shutdown models, and permission changes measure 23,470,959
unpacked bytes on this branch across the unchanged 596-file inventory;
the Linux package job measured the same. Restores the reviewed allowance.
…rol-auth

# Conflicts:
#	docs/assurance.md
#	kb/plans/formal-verification-assurance.md
#	verification/mutants.json
The packed smoke caught that src/pinned-https.ts imports ./public-address
but the file was missing from the package file list, so every installed
CLI command that loads it failed. Add it to the files list; the package
now measures 23,477,699 unpacked bytes across the 597-file inventory.
The TUI smoke's CONTROL_DISCONNECTED was the same missing module killing
the packed helper.
…rol-auth

# Conflicts:
#	docs/assurance.md
#	scripts/npm-release-workflow.test.ts
#	scripts/package-budget.ts
…rol-auth

# Conflicts:
#	docs/assurance.md
#	scripts/verification-claims.test.ts
@0thernet
0thernet merged commit c6f6b79 into main Sep 25, 2026
27 checks passed
@0thernet
0thernet deleted the claude/fv-claims-control-auth branch September 25, 2026 05:04

This branch was successfully deployed

1 active deployment
Preview — 59c1de82 Deployed Sep 25, 2026 by vercel[bot]
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