pioracle

package
v0.5.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 23, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Package pioracle runs the compiled Pi modules vendored for the Node extension runtime against Go test inputs, so a test compares Pig with Pi itself rather than with a transcription of Pi's behavior.

Index

Constants

View Source
const StampFile = ".pig-pi-oracle.json"

StampFile is the build stamp automation/pin/oracle.py writes beside an oracle's node_modules.

Variables

This section is empty.

Functions

func Bin

func Bin(t testing.TB) string

Bin returns the Pi executable a test compares Pig with: PIG_PARITY_PI_BIN, else the oracle `make parity-deps` built from source at the pinned commit and linked into extensions/sdk-ts. The test is skipped when it is absent and fails when it is not the pinned build.

func CheckBin

func CheckBin(bin string) error

CheckBin reports why bin is not the Pi built from the pinned commit. The version string alone cannot tell two commits of one package version apart, so the build stamp must name the pinned commit.

func CheckDurable

func CheckDurable(modules string) error

CheckDurable reports why modules, a node_modules directory such as durable/interop's, does not hold the pinned Pi Durable. A release pin installs the published package (`make durable-interop-deps` runs npm-locked.py), so its version is enough. A commit pin shares that package version with the release, so the tree must be the build of the pinned commit that `pin.py install-oracle` stamps.

func Root

func Root(t testing.TB) string

Root returns the absolute path of the vendored Pi distribution.

func Run

func Run(t testing.TB, body string, input, output any, env ...string)

Run executes an ES module body in Node with the Pi distribution root in `root`, the decoded `input` in scope, and returns the JSON the body passes to `emit`. The body is the async function body of the check. Environment extra entries (KEY=value) are added to the child environment. A missing Node is a failure: the Pig test suite requires it.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL