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
46 changes: 46 additions & 0 deletions .github/workflows/pplns-parse-seedpin.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: PPLNS parse seed-pin guard

# Permanent regression guard for the PPLNS parse property suite.
#
# The random-seeded web-static job (build.yml) can pass even when a specific
# fast-check sequence still reproduces a bug, because it never replays that
# sequence. This job pins seed -1679627146 — the counterexample that found
# the non-finite legacy bare-number regression (input [Infinity] ->
# totalPrimary Infinity, fixed in PR #51) — so the exact failing path is
# re-exercised deterministically on every change to the parser or its tests.

on:
push:
branches: [master]
paths:
- "web-static/sharechain-explorer/**"
- ".github/workflows/pplns-parse-seedpin.yml"
pull_request:
branches: [master]
paths:
- "web-static/sharechain-explorer/**"
- ".github/workflows/pplns-parse-seedpin.yml"

jobs:
seedpin:
name: PPLNS parse seed-pin replay
runs-on: ubuntu-24.04
defaults:
run:
working-directory: web-static/sharechain-explorer
steps:
- uses: actions/checkout@v6

- uses: actions/setup-node@v5
with:
node-version: "22"
cache: npm
cache-dependency-path: web-static/sharechain-explorer/package-lock.json

- name: Install dependencies
run: npm ci

- name: Replay pinned seed -1679627146 against PPLNS parse property suite
run: |
node --import tsx --import ./.ci-seed-pin.mjs \
--test "tests/unit/pplns-parse-properties.test.ts"
12 changes: 12 additions & 0 deletions web-static/sharechain-explorer/.ci-seed-pin.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
// CI-only fast-check seed pin for the PPLNS parse property suite.
//
// Replays seed -1679627146 — the counterexample that surfaced the
// non-finite legacy bare-number regression (shrunk input [Infinity],
// totalPrimary -> Infinity). Fixed in PR #51 (parseLegacyShape now routes
// the bare-number branch through num()); this preload makes that exact
// path part of permanent CI, so a random-seeded run can never again pass
// while the pinned sequence still fails.
//
// Loaded via: node --import ./.ci-seed-pin.mjs (see pplns-parse-seedpin.yml)
import fc from "fast-check";
fc.configureGlobal({ ...fc.readConfigureGlobal(), seed: -1679627146 });
Loading