DAN-855: the front door — a demo you can run, and four claims that were not true - #12
Open
Danny-Devs wants to merge 1 commit into
Open
DAN-855: the front door — a demo you can run, and four claims that were not true#12Danny-Devs wants to merge 1 commit into
Danny-Devs wants to merge 1 commit into
Conversation
…re not true The engineering here was already sound and already verified. The front door was not. A grant reviewer opens this repo first, and until now the entire runnable surface of a 389-line README was `npm install` and two `ls` commands. `pnpm demo` now exists. Sixty seconds, no wallet, no keys, no network: a server encodes a 402 into one HTTP header, a client decodes it with no shared code, an x402 V1 body is absorbed through the compat layer, and the 167 published conformance vectors run against the code in your clone. It reports how many malformed headers were refused AND how many leaked through. The second number is the one that means anything — a suite that only ever watches things pass cannot tell a working validator from one that returns true unconditionally. That counter was verified the only way it can be: by poisoning a vector with a valid header falsely marked shouldReject, and confirming the run names it, counts it, and exits non-zero. Four claims were false, and the first would stop a reader cold: `s402/compat` is not an exported subpath. The README used it four times. Copying the compat example produced ERR_PACKAGE_PATH_NOT_EXPORTED. The real path is `s402/compat/x402`, and it exports all five documented functions. The sub-path table was also missing six real entries. `@sweefi/sui` was described as "coming soon" while it is published on npm — and the same README described that implementation in the present tense two paragraphs earlier, so one fact appeared in two tenses. This is the shape DAN-588 already cost 33 days to: a hedge nobody re-read after its condition lifted. An under-claim is not the safe direction. `GET /api/catalog` reported the protocol version as "0.3" while S402_VERSION is "1" — a reviewer curling the catalog to see what the protocol advertises got a number contradicting every payload the same server emits. The gas table stated modelled estimates as flat facts and dropped the case the project's own whitepaper is careful to name: x402 on Solana is cheaper than s402 Exact on Sui for one-shot calls. The README now marks the numbers as modelled, links the method, and says where a competitor wins. The whitepaper was more honest than the front page, which is backwards. Added the two sections the README convention requires and this repo had neither of: What Is True Today (shipped / published / partial / not-runnable, per component) and Receipts (a command for every claim the README makes about itself). Those were missing structurally, which is why the four false claims had nowhere to be correct. demo-api/ is reachable again. It was absent from pnpm-workspace.yaml, had no README, and pinned a published s402@^0.6.0 while this repo ships 0.9.0 — so it was neither wired to the workspace nor documented. It is now a workspace package on workspace:*, typechecks against current source, and documents the verified route: /api/joke, not /api/data, which is what the first draft of its README claimed until curl said 404. Verified on this branch: pnpm typecheck clean, 1108/1108 tests across 29 files, build 23 files, pnpm demo exit 0, demo-api's documented curl pipeline run against a freshly started process. Findings: DAN-855, and the workspace knowledge file cited there. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01N7ufynvh6FC65iyC9YHNzb
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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.
Why
s402 is the repo a grant reviewer opens first. The engineering behind it was already sound and already verified — what failed was the front door. Until this PR, the entire runnable surface of a 389-line README was
npm installand twolscommands.This came out of the first grant-ready §7 pass ever run against this repo, measured on an unauthenticated HTTPS clone of
mainrather than a local checkout.The demo
Sixty seconds. No wallet, no keys, no network, no faucet. It encodes a 402 into one HTTP header, decodes it from the client side, absorbs an x402 V1 body through the compat layer, and runs the 167 published conformance vectors against the code in your clone.
It reports how many malformed headers were refused and how many leaked through. The second number is the one that means anything: a suite that only ever watches things pass cannot distinguish a working validator from one that returns
trueunconditionally.That counter was verified the only way a gate can be — by poisoning a vector (a valid header falsely marked
shouldReject) and confirming the run names it, counts it, and exits non-zero.Four claims that were not true
s402/compatis not an exported subpathERR_PACKAGE_PATH_NOT_EXPORTED. The real path iss402/compat/x402, which exports all five documented functions. The sub-path table was also missing six real entries.@sweefi/suidescribed as "coming soon"GET /api/catalogreported version"0.3"S402_VERSIONis"1". Anyone curling the catalog to see what the protocol advertises got a number contradicting every payload the same server emits.$0.25/1K) is cheaper than s402 Exact on Sui ($7.00) for one-shot calls. The whitepaper was more honest than the front page, which is backwards.Two sections that did not exist
What Is True Today — shipped / published / partial / not-runnable, per component, in the honest tense.
Receipts — a command for every claim the README makes about itself.
These were missing structurally, which is why the four false claims had nowhere to be correct.
demo-api/is reachable againIt was absent from
pnpm-workspace.yaml, had no README, and pinned a publisheds402@^0.6.0while this repo ships0.9.0— neither wired to the workspace nor documented anywhere. Now a workspace package onworkspace:*, typechecking against current source, with a README documenting the verified route:/api/joke, not/api/data, which is what its first draft claimed untilcurlsaid 404.Verification — observed, not assumed
pnpm typecheck— cleanpnpm vitest run— 1108 passed, 29 filespnpm build— 23 files, 268 kBpnpm demo— exit 0; negative control proven by deliberate poisoningdemo-api— documentedcurlpipeline run against a freshly started process (the first attempt read a stale one still holding the port; that reading was discarded)Not in scope
Merging #3 or #4. The Unlock/SEAL work.
mcp-demo's gRPC migration — it still cannot reach the network, its README says so first, and this PR does not pretend otherwise.🤖 Generated with Claude Code
https://claude.ai/code/session_01N7ufynvh6FC65iyC9YHNzb