Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .planning/instawards/sow2/00-read-only-action.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@ No payment is made and nothing is signed in this tier.

## What shipped

- **`wasit.config.json`, version 1.** One file read the same way by the command line and the Action. It is strict: an unknown key is an error, and a secret, a secret's variable name, the mainnet opt-in, a flag that enables MPP-13 and a per-payment cap have no place in it. Code: [`config.ts`](https://github.com/wasit-dev/Wasit/blob/sow2/s1-action/packages/core/src/config.ts).
- **`wasit run --read-only`.** Runs the checks for every endpoint of the config and writes one report (`--json`, `--out`). It can start the service itself (`--start`, `--start-if-local`) and compare with the report of the default branch (`--baseline`). Code: [`run.ts`](https://github.com/wasit-dev/Wasit/blob/sow2/s1-action/packages/cli/src/run.ts).
- **`wasit.config.json`, version 1.** One file read the same way by the command line and the Action. It is strict: an unknown key is an error, and a secret, a secret's variable name, the mainnet opt-in, a flag that enables MPP-13 and a per-payment cap have no place in it. Code: [`config.ts`](https://github.com/wasit-dev/Wasit/blob/main/packages/core/src/config.ts).
- **`wasit run --read-only`.** Runs the checks for every endpoint of the config and writes one report (`--json`, `--out`). It can start the service itself (`--start`, `--start-if-local`) and compare with the report of the default branch (`--baseline`). Code: [`run.ts`](https://github.com/wasit-dev/Wasit/blob/main/packages/cli/src/run.ts).
- **The run report and the exit rules.** Each endpoint is `conformant`, `non-conformant`, `unsupported` or `no verdict`. Exit 0: every graded endpoint conforms. Exit 1: an endpoint does not conform, or one graded on `main` is not graded now. Exit 2: nothing could be graded, a check could not run, or the config or service could not be used.
- **`wasit ci-report`.** Renders the pull request comment and the job summary from a report. One sanitiser covers everything a service sent, so a hostile answer cannot inject text, links, mentions or workflow commands into the comment or the log. Code: [`ci-report.ts`](https://github.com/wasit-dev/Wasit/blob/sow2/s1-action/packages/core/src/ci-report.ts).
- **The Action.** A composite action for Linux runners with Node 22: [`action/action.yml`](https://github.com/wasit-dev/Wasit/blob/sow2/s1-action/action/action.yml). The baseline comes from the last successful run on the default branch; the comment is found by a marker and updated; a pull request from a fork is handled (it gets a read-only token, so the comment is skipped with a message). Its own third-party references are pinned to commit SHAs. The template for a builder's repository: [`action/examples/wasit.yml`](https://github.com/wasit-dev/Wasit/blob/sow2/s1-action/action/examples/wasit.yml).
- **`wasit ci-report`.** Renders the pull request comment and the job summary from a report. One sanitiser covers everything a service sent, so a hostile answer cannot inject text, links, mentions or workflow commands into the comment or the log. Code: [`ci-report.ts`](https://github.com/wasit-dev/Wasit/blob/main/packages/core/src/ci-report.ts).
- **The Action.** A composite action for Linux runners with Node 22: [`action/action.yml`](https://github.com/wasit-dev/Wasit/blob/main/action/action.yml). The baseline comes from the last successful run on the default branch; the comment is found by a marker and updated; a pull request from a fork is handled (it gets a read-only token, so the comment is skipped with a message). Its own third-party references are pinned to commit SHAs. The template for a builder's repository: [`action/examples/wasit.yml`](https://github.com/wasit-dev/Wasit/blob/main/action/examples/wasit.yml).
- **A step in CI that tests the Action.**

Tests, offline: command line 175, core 620, server 10, Action 152, none failing (maintainer's machine, last commit). CI on the draft pull request passes: [run](https://github.com/wasit-dev/Wasit/actions/runs/43706023137).
Expand Down
10 changes: 5 additions & 5 deletions .planning/instawards/sow2/02-guard-and-payment-tier.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ command line, without the opt-in, goes to beta testers at the end of the week.

## What shipped (first layer)

- **A fixed table of networks.** Each network is a test network, a mainnet that needs the opt-in, or unknown. Unknown is refused. Code: [`networks.ts`](https://github.com/wasit-dev/Wasit/blob/sow2/s1-action/packages/core/src/guard/networks.ts).
- **A fixed table of networks.** Each network is a test network, a mainnet that needs the opt-in, or unknown. Unknown is refused. Code: [`networks.ts`](https://github.com/wasit-dev/Wasit/blob/main/packages/core/src/guard/networks.ts).
- **The check sits in every entry point that signs,** before a key is read: the x402 payment checks, MPP charge, every MPP channel check including the one that closes a channel. Commit: [`45834e1`](https://github.com/wasit-dev/Wasit/commit/45834e1).
- **A channel commitment is signed only when it names the run's channel, amount and network.** Test: [`channel-commitment-binding.test.ts`](https://github.com/wasit-dev/Wasit/blob/sow2/s1-action/packages/core/test/unit/channel-commitment-binding.test.ts).
- **A channel commitment is signed only when it names the run's channel, amount and network.** Test: [`channel-commitment-binding.test.ts`](https://github.com/wasit-dev/Wasit/blob/main/packages/core/test/unit/channel-commitment-binding.test.ts).
- **`stellar-sdk` 16.4.1.** The test network is on protocol 30, which the previous version cannot read.

## What shipped (payment tier, 2026-11-16)
Expand All @@ -41,22 +41,22 @@ command line, without the opt-in, goes to beta testers at the end of the week.
- **The payment tier of `wasit run` and of the Action,** on test networks only. In GitHub Actions it pays only on a push to the default branch, a schedule and a run started by hand. On a pull request the read-only checks run and the comment says why; a payer key given to a pull request run is refused before the service starts.
- **The service runs as its own user** on a GitHub-hosted runner when a payer key is set, so it cannot read the key from Wasit's process. Code that ran earlier in the job as the runner's user is not kept from it; the guide will say so.
- **"Changed since main"** compares with the last green run on `main` and names it; the recent-failures line counts every finished run on `main`.
- Code: [draft pull request 30](https://github.com/wasit-dev/Wasit/pull/30), stacked on pull request 23.
- Code: [pull request 30](https://github.com/wasit-dev/Wasit/pull/30), merged into `main` on 2026-11-21.

## What shipped (the new check, 2026-11-16)

- **`X402-11`, "Rejected Request Not Settled".** For an endpoint whose entry in `wasit.config.json` names a request the service must refuse (`reject`), Wasit signs a payment for the advertised terms, through the same plan, pin and caps as the other payment checks, and sends it with that request.
- **It reads the chain, not the service's word.** Once a ledger it asks the Stellar RPC whether the nonce of that payment's authorization was used, in the same call as the nonce of `X402-06`'s payment, which was used and must be found. The payer's balance and the token's transfer events are second readings; when they disagree, there is no verdict.
- **Verdicts.** Refused, and still unused after its expiration ledger: pass. Refused, and used: fail, with the transaction that took it. Served: fail.
- **The wait.** A payment that stays valid for at most 300 seconds is waited out, with a hard stop 360 seconds after it was sent; a longer one is not signed, and the check is skipped.
- Code: [draft pull request 30](https://github.com/wasit-dev/Wasit/pull/30); the check's entry in [`docs/CHECKS.md`](https://github.com/wasit-dev/Wasit/blob/sow2/s2-payment/docs/CHECKS.md) on that branch.
- Code: [pull request 30](https://github.com/wasit-dev/Wasit/pull/30), merged into `main` on 2026-11-21; the check's entry in [`docs/CHECKS.md`](https://github.com/wasit-dev/Wasit/blob/main/docs/CHECKS.md) on that branch.

## What shipped (mainnet refused, 2026-11-16)

- **The three switches of the opt-in, refusing.** `wasit run --mainnet` stops before the config is read; the Action's `mainnet` input stops the job in the step that checks the inputs, before Wasit is installed, and the job summary says so; the MCP server does not start with `WASIT_MAINNET_OPT_IN`, `WASIT_MAINNET_CONFIG` or `--mainnet`. Each says "the mainnet opt-in is not part of this version" and exits 2. On any GitHub event but a run started by hand, the message also says that the switch is refused on that event.
- **No allow path.** A property test drives random combinations of flags, key variables, start-up variables, GitHub events and config values for a payment on `stellar:pubnet`, against a stand-in chain that opens every gate but Wasit's own: no paid request and no signature, ever. A control run on the test network shows the stand-in does record a signature when one is made.
- **The MCP server's RPC.** `WASIT_RPC_URL`, set when the server starts, fixes the RPC of every tool call, and a call that names another RPC is refused before anything is sent. A result that reads the chain names its RPC by origin, and says when it is not Wasit's default.
- Code: [draft pull request 30](https://github.com/wasit-dev/Wasit/pull/30).
- Code: [pull request 30](https://github.com/wasit-dev/Wasit/pull/30), merged into `main` on 2026-11-21.

## Proof

Expand Down
8 changes: 4 additions & 4 deletions .planning/instawards/sow2/07-evidence-submission.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ Further proofs of D1 (not SOW rows):
| On a pull request: "Wasit is running", then the result in the same comment | ✅ | [Pull request 7](https://github.com/dzakwannajmi/x402-example-paywall/pull/7) · [run](https://github.com/dzakwannajmi/x402-example-paywall/actions/runs/44644150278) · [first version of the comment](week-2/copies/pr-7-comment-running.md) · [the result](week-2/copies/pr-7-comment.md) · [copy of the log](week-2/copies/run-pr7-running-comment.log.txt): the comment's edit history on GitHub shows "⏳ Wasit is running" with a link to the run at 00:14:18 UTC, replaced by the result six seconds later; GitHub shows the result with two tables and the details folded in one block; the check "Wasit conformance" on the pull request completed as "✅ conformant · 5 passed, 6 skipped" |
| A pull request from a fork: no running comment and no check run | ✅ | [Pull request 8](https://github.com/dzakwannajmi/x402-example-paywall/pull/8), from a fork made from a second account of the maintainer · [run](https://github.com/dzakwannajmi/x402-example-paywall/actions/runs/44647438871) · [copy of the log](week-2/copies/run-pr8-fork-no-check-run.log.txt): "Wasit: this pull request is from a fork, so the token is read-only: no check run and no running comment."; no comment was posted, and the only check on the pull request is the job's own, "Wasit", which passed |
| `NODE_OPTIONS` in the workflow's settings does not reach the Action's steps or the service | ✅ | [Run of pull request 7](https://github.com/dzakwannajmi/x402-example-paywall/actions/runs/44644486275) · [copy of the log](week-2/copies/run-pr7-node-options.log.txt): the pull request (never merged) sets `NODE_OPTIONS` to load a small probe file; a plain step with that setting printed the probe's line, and no step of the Action and not the service printed it. The earlier run of the same pull request ([44644150278](https://github.com/dzakwannajmi/x402-example-paywall/actions/runs/44644150278)) shows GitHub's runner refusing to set `NODE_OPTIONS` through `GITHUB_ENV` |
| The code, offered for review, with passing automated checks | ✅ | [Draft pull request 23](https://github.com/wasit-dev/Wasit/pull/23) · [CI run](https://github.com/wasit-dev/Wasit/actions/runs/43706023137) |
| The code, offered for review, with passing automated checks | ✅ | [Pull request 23](https://github.com/wasit-dev/Wasit/pull/23) (merged into `main` on 2026-11-21) · [its CI run](https://github.com/wasit-dev/Wasit/actions/runs/44828387631) · [CI on `main`](https://github.com/wasit-dev/Wasit/actions/runs/44831312060) |

## Deliverable 2 — Payment checks in CI, a new check, and MPP (weeks 2 and 3)

Expand All @@ -53,13 +53,13 @@ Further proofs of D1 (not SOW rows):
| MPP charge and channel runs | ⬜ | Week 3 (job 03) |
| A run on a pull request from a fork showing the payment checks were not run | ✅ | [Pull request 5](https://github.com/dzakwannajmi/x402-example-paywall/pull/5) · [run](https://github.com/dzakwannajmi/x402-example-paywall/actions/runs/43819805398) · [copy of the log](week-2/copies/run-pr5-fork-payment-tier.log.txt): the workflow asks for `tier: payment`; on this pull request from a fork X402-01 to X402-05 passed and X402-06 to X402-10 were skipped with "payment checks not run: pull request"; nothing was signed |
| The new check's entry in `docs/CHECKS.md` | ✅ | [`docs/CHECKS.md` at the pre-release tag](https://github.com/wasit-dev/Wasit/blob/v0.8.0-beta.1/docs/CHECKS.md), row `X402-11`; the file ships in the MCP server's package on npm. It reaches `main` with the merge of the code |
| A paying run without the opt-in refusing `stellar:pubnet` before anything is signed | ✅ | [Run on `main` of the example project](https://github.com/dzakwannajmi/x402-example-paywall/actions/runs/43882304954) · [copy of the log](week-2/copies/run-pubnet-payment-refused.log.txt): the payment tier, started by hand on `main` (an event that may pay), on a config that names `stellar:pubnet`; Wasit stopped with exit 2 before the service started, saying the mainnet opt-in is not part of this version and that nothing was sent or signed, and wrote no report. The run was given no payer key; the refusal comes before any key is read. A step after it requires that refusal, so the job is green only when it happens. Also offline: [`runners.test.ts`](https://github.com/wasit-dev/Wasit/blob/sow2/s1-action/packages/cli/test/unit/runners.test.ts) (the MPP commands) and the property test [`no-allow-path.test.ts`](https://github.com/wasit-dev/Wasit/blob/sow2/s2-payment/packages/cli/test/unit/no-allow-path.test.ts) |
| A paying run without the opt-in refusing `stellar:pubnet` before anything is signed | ✅ | [Run on `main` of the example project](https://github.com/dzakwannajmi/x402-example-paywall/actions/runs/43882304954) · [copy of the log](week-2/copies/run-pubnet-payment-refused.log.txt): the payment tier, started by hand on `main` (an event that may pay), on a config that names `stellar:pubnet`; Wasit stopped with exit 2 before the service started, saying the mainnet opt-in is not part of this version and that nothing was sent or signed, and wrote no report. The run was given no payer key; the refusal comes before any key is read. A step after it requires that refusal, so the job is green only when it happens. Also offline: [`runners.test.ts`](https://github.com/wasit-dev/Wasit/blob/main/packages/cli/test/unit/runners.test.ts) (the MPP commands) and the property test [`no-allow-path.test.ts`](https://github.com/wasit-dev/Wasit/blob/main/packages/cli/test/unit/no-allow-path.test.ts) |
| The read-only checks passing on a challenge that names `stellar:pubnet` | ✅ | [Pull request 6](https://github.com/dzakwannajmi/x402-example-paywall/pull/6) · [run](https://github.com/dzakwannajmi/x402-example-paywall/actions/runs/43724229283) · [copy of the comment](week-2/copies/pr-6-comment.md) · [copy of the log](week-2/copies/run-pr6-pubnet.log.txt): in the Action, against a local seller whose payment request names `stellar:pubnet`; five checks passed, no payment, nothing signed. A deployed mainnet service was not read |
| A paid run with the opt-in on Stellar mainnet, capped, with a Stellar Expert link and the settlement read back from the chain | ⬜ | Week 3, after the validation (job 03) |
| A payment above the per-payment cap refused before anything is signed | ⬜ | Week 3 (job 03) |
| A run whose possible spend exceeds the per-run cap refused before it starts | ⬜ | Week 3 (job 03) |
| An Action run on a push or schedule with the opt-in set, refusing mainnet | ✅ | [Run on a push](https://github.com/dzakwannajmi/x402-example-paywall/actions/runs/43882283916) · [copy of the log](week-2/copies/run-mainnet-input-refused.log.txt): on a branch of the example project that is never merged, the Action with `mainnet: true` stopped with exit 2 in the step that checks the inputs: "the mainnet opt-in is not part of this version", and the input is also refused on every event but a run started by hand; the install, the run and the report steps were skipped. In this pre-release the input is always refused |
| An MCP tool call asking for mainnet, refused | 🟡 | Offline tests that start the server as an MCP client does: [`network-guard.test.ts`](https://github.com/wasit-dev/Wasit/blob/sow2/s1-action/packages/server/test/unit/network-guard.test.ts) (a tool call with `stellar:pubnet` sends nothing) and [`mainnet-and-rpc-lock.test.ts`](https://github.com/wasit-dev/Wasit/blob/sow2/s2-payment/packages/server/test/unit/mainnet-and-rpc-lock.test.ts) (the start-up settings that ask for mainnet stop the server; the tool list has no mainnet tool). A recorded call comes with the pre-release |
| An MCP tool call asking for mainnet, refused | 🟡 | Offline tests that start the server as an MCP client does: [`network-guard.test.ts`](https://github.com/wasit-dev/Wasit/blob/main/packages/server/test/unit/network-guard.test.ts) (a tool call with `stellar:pubnet` sends nothing) and [`mainnet-and-rpc-lock.test.ts`](https://github.com/wasit-dev/Wasit/blob/main/packages/server/test/unit/mainnet-and-rpc-lock.test.ts) (the start-up settings that ask for mainnet stop the server; the tool list has no mainnet tool). A recorded call comes with the pre-release |
| The written findings of the mainnet validation (or, if the opt-in is not offered, the reason) | ⬜ | Week 3 (job 03) |
| A run comment showing the line with recent failure counts | ⬜ | Week 3 (job 03) |
| A run against a single-use test paywall showing the "resource consumed" result | ⬜ | Week 3 (job 03) |
Expand All @@ -80,7 +80,7 @@ Further proofs of D1 (not SOW rows):
| --- | --- | --- |
| The pre-release tag, without the mainnet opt-in | ✅ | [Release `0.8.0-beta.1` on GitHub](https://github.com/wasit-dev/Wasit/releases/tag/v0.8.0-beta.1) (tag `v0.8.0-beta.1`, published 2026-11-20) · [the CLI on npm](https://www.npmjs.com/package/@wasit-dev/cli/v/0.8.0-beta.1) under the `beta` tag · the mainnet switches refuse in it (job 02) · [the Action at the pre-release, on `main` of the example project](https://github.com/dzakwannajmi/x402-example-paywall/actions/runs/44748831548) |
| The release on GitHub (and on npm for any package that changes) | ⬜ | Week 4 (job 06) |
| Green CI with the test counts | 🟡 | CI of the draft pull request passes: [run](https://github.com/wasit-dev/Wasit/actions/runs/43706023137). Final counts at the release |
| Green CI with the test counts | 🟡 | [CI on `main`](https://github.com/wasit-dev/Wasit/actions/runs/44831312060) passes (2026-11-21): command line 275, core 830, server 30, Action 195, none failing. Final counts at the release |
| A short video of the Action on a pull request | ⬜ | Week 4 (job 06) |
| A final report with the evidence link for each deliverable | ⬜ | Week 4 (job 06) |

Expand Down
Loading
Loading