Skip to content

SOW 2 week 2: fixes for 0.8.0-beta.2 (supported events, blanked start-up variables, wrapped lines, report references) - #38

Merged
dzakwannajmi merged 6 commits into
mainfrom
sow2/beta2-fixes
Nov 20, 2026
Merged

dzakwannajmi merged 6 commits into
mainfrom
sow2/beta2-fixes

Conversation

@dzakwannajmi

Copy link
Copy Markdown
Collaborator

Fixes for the next pre-release, 0.8.0-beta.2, on top of 0.8.0-beta.1 (38d8a86). Stacked on #30; it moves to main once #23 and #30 are merged.

The Action

  • Runs on pull_request, push, schedule, workflow_dispatch and merge_group only. Any other event (pull_request_target as before, now also issue_comment, workflow_run and the rest) stops the job with exit 2 in the step that checks the inputs: on those events a workflow can hand a pull request's code the base repository's token, and the service Wasit starts would be that code.
  • Every step sets BASH_ENV, ENV, LD_PRELOAD, LD_LIBRARY_PATH and LD_AUDIT empty, as it already did NODE_OPTIONS. The comments and the example workflow say what this does not cover: code that ran earlier in the job as the runner's user is kept from neither the payer key nor the job's token.
  • The YAML test also pins that "Finish the check run" runs only when a check run was started and uses only what the report step wrote.

The CLI

  • In the coloured output of wasit test, no wrapped line starts with ::name:: or ##[name].
  • The live wasit test is its own module (test-live.ts), with the stream, the environment and the checks passed in, and a test holds it to: only Wasit's own colour codes, no secret of the environment, no line that starts with a workflow command, the same exit code.

Core

  • A report file keeps a settlement reference only on a PASS, as wasit run writes it.
  • X402-11: a test at the exact limit of the authorization it sends (300 s plus 2 ledgers sent, one ledger more discarded unsent).
  • Two comments no longer say the payment is built through the checked RPC on Stellar (there the x402 client uses its own default RPC for the network).

Tests (local, 2026-11-21): build and type-check clean; cli 275, core 830, server 30, action 195, none failing. CHANGELOG: [Unreleased].

… how a step starts

The action refused pull_request_target because it hands a pull request's code
the base repository's token. issue_comment, workflow_run and other events can
do the same when a workflow checks out the pull request, and the service Wasit
starts would then be that code, in a job whose later steps hold the token. The
step that checks the inputs now allows pull_request, push, schedule,
workflow_dispatch and merge_group, and stops any other event with exit 2.

Every step also sets BASH_ENV, ENV, LD_PRELOAD, LD_LIBRARY_PATH and LD_AUDIT
empty, as it already did NODE_OPTIONS: a file the shell runs before a step, or a
library loaded into bash, node or gh, no longer reaches the steps that hold the
token or the payer key from the workflow's env. The comments and the example
workflow say what this does not cover: code that ran earlier in the job as the
runner's user, which can change PATH or files or leave a process running, and
which is kept from neither the key nor the token.

The YAML test now also pins that "Finish the check run" runs only when a check
run was started and uses only what the report step wrote.
…ow command

The sanitiser breaks "::" and "##[" at the start of a text, but the coloured
output of wasit test wraps text after that, so a word in the middle of a fix
could start a line that a GitHub job log reads as a workflow command (colour is
on in CI with FORCE_COLOR). wrap() now breaks every wrapped line the same way.

The live wasit test moves from index.ts to its own module, test-live.ts, with
the stream, the environment and the checks passed in, so a test can hold it to
what the plain output promises: only Wasit's own colour codes, no secret of the
environment, no line that starts with a command, the same exit code.

The comment before the RPC check in wasit run no longer says the payment is
built through that RPC on Stellar: there the x402 client builds it through its
own default RPC for the network.
wasit run writes a reference only on an X402-06 PASS whose settlement was read
back from the chain, and the payment proof links one only there. A report file
read back could still carry one on another status; it is now dropped when the
file is read, so the renderer's own PASS rule is not the only one. A test holds
both, for FAIL, ERROR and SKIP.

X402-11 gains a test at the exact limit of the authorization it sends: valid for
300 s plus 2 ledgers it is sent, one ledger more and it is discarded unsent.

The comment before the RPC check in the payment checks no longer says the
payment is built through that RPC on Stellar.
What changes on upgrade: the events the action runs on and the variables every
step sets empty. Fixed: the wrapped lines of the coloured output, and the
settlement reference in a report file.
@vercel

vercel Bot commented Nov 20, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated
wasit Ready Ready Preview Nov 20, 2026 10:40pm UTC

@dzakwannajmi
dzakwannajmi changed the base branch from sow2/s2-payment to main November 20, 2026 22:30
…n on a runner

The comment said that a step's env winning over an earlier step's GITHUB_ENV
for BASH_ENV and the other names was not yet seen on a runner. It was seen on a
GitHub-hosted runner on 2026-11-21: an earlier step set BASH_ENV through
GITHUB_ENV, a plain step after it ran the file, and each step of this action
showed BASH_ENV empty and did not run it.
@dzakwannajmi
dzakwannajmi marked this pull request as ready for review November 20, 2026 22:43
@dzakwannajmi
dzakwannajmi merged commit 202b067 into main Nov 20, 2026
5 checks passed
@dzakwannajmi
dzakwannajmi deleted the sow2/beta2-fixes branch November 21, 2026 09:55

This branch was successfully deployed

1 active deployment
Preview — 2333bad0 Deployed Nov 20, 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