Skip to content

v0.0.10

Choose a tag to compare

@github-actions github-actions released this 14 Nov 04:51
· 24 commits to main since this release
8606f8e

Install on macOS or Linux:

curl -fsSL https://github.com/pedroknigge/pregate/releases/download/v0.0.10/install.sh | sh

Install on Windows PowerShell:

irm https://github.com/pedroknigge/pregate/releases/download/v0.0.10/install.ps1 | iex

Each archive and SHA256SUMS has a Sigstore bundle (.bundle) from cosign sign-blob (GitHub OIDC) and a GitHub artifact attestation. Verification steps are in docs/guides/installation.md.

Release 0.0.10

Pregate v0.0.10, core 0.0.1. macOS ARM64 stays the stable platform. Linux and Windows archives stay experimental until native validation is recorded.

Install 0.0.10, then review the project update it prepares (pregate update --project --preview) and approve that exact digest. A global update prepares that review for each enabled project whose lock still pins an older engine.

This release is a correctness pass on the engine you already have. No rule was removed or downgraded. Two gaps are closed: a lock that names a primitive the engine does not evaluate fails closed, instead of quietly skipping that rule, and the shell guard no longer treats a file path or an npm script whose name contains a hook word as a bypass.

A mistyped primitive fails closed

analyze used to skip a rule whose primitive was outside the seven it evaluates. A mistyped or hand-edited lock could make that rule vanish, with no finding and no error. Unknown primitives now throw.

Four primitives stay skipped there on purpose, because another part of the engine handles them: layer-edge and banned-import in the import checks, placement in placement(), and fitness in the fitness gate. The vocabulary lives in named constants (EVALUATED_PRIMITIVES, IMPORT_PRIMITIVES, NODE_PRIMITIVES) shared by the places that used to repeat the names.

A path is not a hook bypass

The shell guard's hook-word list adds generic disable and bypass flags: --no-hooks, --disable-hooks, --skip-hooks, --bypass-hooks, and the same words with a hyphen or an underscore. Each one matches a whole argument, including --flag=value, so a renamed bypass flag is still caught. The same stems without the leading dashes are a hook switch only when they are arguments of a harness command.

A path or an npm script whose name merely contains those words is an ordinary command again. src/disable-hooks.ts and npm run disable-hooks are not a bypass. The verbatim flags that were already denied stay denied.

A malformed hook flag is named

pregate hook accepts hook <event> and hook <event> --harness <id>. A --harness without a known harness, or an extra operand, is reported on stderr and evaluated with the default adapter. It is no longer a silent misroute to the wrong harness.

For people who build this tree

bun run clean removes dist/ and every *.bun-build scratch copy bun build --compile can leave in the working directory, including a hidden .name.bun-build and a bare .bun-build.

bun run test:unit and bun run test:e2e split the suite. Files named e2e.test.ts or *.e2e.test.ts are the compiled-binary half. Every other test file is the fast half.

bun test no longer writes user state into the real home when a test file forgets its own isolation. The preload gives every unset HOME, USERPROFILE, XDG_*_HOME, CODEX_HOME, GROK_HOME, and CLAUDE_CONFIG_DIR a throwaway directory. A test that sets one of those itself still wins.

The repository's own CI jobs read PREGATE_ACCEPT_CONTRACT from the repository variable, as the published CI template already does. A pull request still cannot set that digest.

src/inertia.ts is now src/admission.ts. The module holds the same admission constants. Only the import sites moved.

What this release does not establish

  • No rule was disabled, downgraded, or removed. Timeouts, thresholds, and the committed latency baselines are unchanged. The macOS latency gate still fails by runner noise at times.
  • The four primitives handled outside analyze are still skipped there on purpose. An unknown primitive fails the check. It does not become a finding of that rule.
  • A hook bypass that is neither a whole argument nor a bare stem on a harness command is outside this list. Refresh the list when a harness ships a new hooks flag.
  • The full suite does not run on macOS in CI. macOS runs the latency and release-build jobs there, and the suite on the maintainer's machine.

The changelog lists every change.