Documentation Runner
Runner
An automatic container tests the prototype on a timer. Each cycle it runs the test suites, plays one invented inspection from start to finish with a signed record, posts it, and publishes what happened. Its signer is a test wallet, not an inspector.
See its output on Test activity.
What is running today. The code in the repository plays 12 scenarios with signed records against its own registry v2 and vault. That code has run on a local chain only. The container that is running on Coston2 was built before the signed record. Until the owner rebuilds it, it plays ten scenarios with unsigned records against the runner's v1 pair. The test activity page draws both feeds.
The same flow in words
- A timer starts a cycle every two hours, while the computer the container lives on is awake.
- The runner runs nine of the repository’s test suites as they are.
- It plays the next of twelve scenarios: a whole invented inspection made with the inspector kit.
- Its test wallet signs the record digest the kit prints.
inspect signfiles the signature, andinspect verifymust pass with that wallet’s address before anything is posted. - It posts the record to its own registry, which checks the signature again before it stores anything. This does not pass through Flare Confidential Compute.
- It reads what its vault does with a draw, and compares that with what the scenario said should happen.
- It writes the feed and uploads it to its own Cloudflare Pages project.
- The test activity page reads that feed in your browser.
What one cycle does#
- Test suites. Nine suites kept in the repository beside the code, run as they are: the collector and inspector kit, the runner itself, the website rules, three Coston2 driver tests with stand-in tools, the contracts, the local end-to-end gate, and the multi-party testbed on a local chain. The container that is running was built before the testbed and runs the first eight. The Go tests of the extension are not run, because the image carries no Go.
- One scenario. A whole inspection made with the inspector kit: a job, a capture of each stand-in host, the report, the signature, the check. Only then is the record posted. Then the runner reads what the registry and the vault do with it. The scenarios take turns, one per cycle.
- A look at the owner's demo. It reads, and only reads, the owner's v1 demo registry and vault. Their addresses come from the project's facts file.
- The feed. It writes one file with the results and uploads it.
The scenarios#
There are 12, in this order, taken from the runner's scenario file.
| Scenario | What should happen |
|---|---|
| Clean inspection, draw allowed | PASS on chain; the draw goes through |
| A unit was swapped, draw refused | FAIL on chain; the draw is refused with ProofFailed |
| Swap explained as a warranty replacement | PASS_WITH_EXCEPTIONS on chain; the draw is refused with ProofHasExceptions |
| A capture made before the inspection | FAIL on chain although all serials match; the draw is refused with ProofFailed |
| A host was not read | FAIL on chain with 8 of 16 matched; the draw is refused with ProofFailed |
| A pass that goes stale by the clock | Draw allowed while fresh; after the valid-until time the vault refuses with ProofStale, with no transaction in between |
| An unsigned record is refused | The check before posting fails; the registry refuses the record with BadSignatureLength; nothing is stored |
| A field changed after signing | The registry refuses the changed record with SignerMismatch; nothing is stored |
| An older record after a newer one | The registry refuses it with NotNewerThanStored; the FAIL stands |
| A pass corrected to a fail the same day | The FAIL replaces the PASS; the draw that was allowed is now refused with ProofFailed |
| Evidence changed after the report | The check before posting fails and nothing is sent to the chain |
| The lender pauses the vault | While paused the draw is refused with VaultPaused; after the pause is lifted it is allowed again |
Each scenario states what should happen before it runs. The feed records what did happen and whether the two agree. A scenario that does not go as expected is shown as such. It is not hidden or retried.
When a scenario counts as "as expected"#
All of these must hold, not only the last one.
- The inspection gave its result for the reason the story tells. A clean inspection has no capture problem. The swapped unit is one serial missing and one found. The early capture has the wrong code and no other problem.
- After a record is posted, the registry holds that very record, by its digest, under the runner's signing address.
- A refusal carries the error the scenario names. A call that fails for another reason does not count.
Three records are never sent: the unsigned record, the changed record and the older PASS. They are offered to the registry in a simulated call, and the answer is the registry's refusal, read by its error name.
How a record is signed#
The kit signs nothing and holds no key. The runner does what an inspector would do by hand.
inspect build --issued-at <time>prints the record digest. The time is the chain's block time, never the container's clock.- The runner signs that digest through
cast. On Coston2 it uses its own test wallet's keystore. On the simulated chain it uses that chain's unlocked test account. inspect signchecks the signature against the digest and the wallet's address, and files it.inspect verify --require-signature --key-id <wallet>must end inSignature: VERIFIED.before the record is posted.- The registry recomputes the digest from the fields it is given and checks the signature again.
The runner's records carry the inspector id TEST-RUNNER-not-an-inspector and the invented facility id fac-runner-0001. A signature shows which key issued a record and that no field changed afterwards. It does not show that the record is true.
Two modes#
| Mode | When | Chain | Signs with |
|---|---|---|---|
| Coston2 | The runner's wallet exists | Flare's Coston2 testnet, chain id 114 | The runner's own throwaway test wallet |
| Simulated | No runner wallet | A chain inside the container, new every cycle | That chain's own unlocked test account |
In Coston2 mode the runner deploys, once, its own registry v2 and vault. The vault's lender, borrower and pinned inspector are all the runner's wallet. The vault pins the hash of the runner's invented schedule and requires procedure 6.2, the one procedure the kit records. This deployment has not happened yet: the runner's v2 addresses are on Addresses and reference once it has.
Limit. The runner posts its records directly. They do not pass through Flare Confidential Compute, and the vault's place for a second fact is left empty. One wallet is inspector, lender and borrower, so nothing here shows a separation of roles. The multi-party testbed runs the roles as separate programs with separate accounts, on a local chain only.
The runner's wallet#
This project's rule is that no key is stored and the owner sends every transaction himself. The runner is the one exception, chosen by the owner on 23 November 2026, and it is bounded:
- The wallet was made for the runner and is used for nothing else. It holds faucet test funds only.
- Its keystore and the keystore's password stay on the owner's computer, outside the repository, and reach the container read-only. The image holds neither.
- Since the change to signed records the same wallet also signs record digests. No new key was made for that.
- The code knows two chains, Coston2 and its own simulated chain, and refuses to start on any other.
- Below 3 C2FLR the runner stops sending, says so in the feed, and goes on running the test suites.
- The wallet has no rights over the owner's demo contracts.
Control#
./runner.sh start build the image and start the container (a cycle every 2 hours)
./runner.sh status is it running, in which mode, and its last lines
./runner.sh logs follow its output
./runner.sh once one cycle now, in a container of its own
./runner.sh stop stop it (its memory is kept)
./runner.sh setup-wallet make the runner's throwaway Coston2 test wallet (once)
./runner.sh feed print the feed it last wrote
The owner runs these. The container runs only while the computer it lives on is awake, so the run log has gaps. More on running it is on Operations.
The feed#
The feed is one public file. It holds the runner's settings and addresses, totals, the scenarios with their last result, the latest result of every suite, what the owner's demo contracts read, and the last 60 cycles with every step and transaction hash. It holds no key, password or token.
Three fields let a reader judge whether the runner is running at all:
| Field | Meaning |
|---|---|
lastRunAt | When the cycle that wrote this feed ended. If it is much older than the interval, the runner has stopped or the computer is asleep |
nextRunAt | When the loop planned its next cycle. A plan, not a fact. A time in the past means the runner is late or stopped |
imageCommit | The commit the running image was built from. Code changed after it is not in the container until it is rebuilt |
A feed written by an image from before these fields has none of them. That is the feed the running container writes today.
The feed is uploaded to its own hosting project, separate from the website's, so the runner can never replace or roll back a page of the site.
What the runner shows, and what it does not#
- It finds a regression. It does not show that the design is right: it tests the code against its author's own expectations.
- The hosts are stand-ins that answer with invented serial numbers. No real machine is read.
- The signer is an automated test wallet. It is not an inspector.
- In "a pass that goes stale by the clock" the record names a valid-until time 90 seconds away, or 12 seconds on the simulated chain, so the change shows within one cycle. That time is in the record when it is signed. A real record is valid for weeks.
- The signed-record runner has not run on Coston2. All 12 scenarios have run on the simulated chain only.