proof-of-change 1.2.2 → 1.2.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "proof-of-change",
3
- "version": "1.2.2",
3
+ "version": "1.2.3",
4
4
  "description": "Proof of Change Protocol: risky changes carry proof that was run, tied to the exact code it tested.",
5
5
  "type": "module",
6
6
  "bin": { "pocp": "bin/pocp.js" },
@@ -337,7 +337,12 @@ export function createVerify({ opts, root, emit, hostName, hostRequirements, hos
337
337
  // The packet claimed a mechanical pass and it doesn't hold here.
338
338
  if (!res.passed && job.proof?.passed && !job.attestation && entry) {
339
339
  const problem = `test guard re-run failed: ${res.summary}`;
340
- const blocking = blocks('rerun_failed');
340
+ // In block mode the re-run's own verdict decides (test_change or test_inconclusive
341
+ // below, each with its own approval): this disagreement with the packet's recorded
342
+ // pass stays visible as a warning, not a second block no approval could clear. In
343
+ // attest mode it still blocks until attested. Required checks are re-run separately
344
+ // and still block when they fail.
345
+ const blocking = commitGuard.mode !== 'block' && blocks('rerun_failed');
341
346
  out.findings.push({ code: 'rerun_failed', detail: problem, blocking, packet: entry.id, unfinished: Boolean(res.unfinished) });
342
347
  if (blocking) {
343
348
  entry.ok = false;
package/src/init.js CHANGED
@@ -404,7 +404,7 @@ const PKG_ROOT = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '..'
404
404
  // The newest POCP release that has a tag on GitHub. A development or pre-release build (a
405
405
  // version like 1.1.0-dev.0, as on main between releases) has no tag of its own, so the
406
406
  // workflows it writes pin this instead of a ref that doesn't exist. Update it with each release.
407
- export const RELEASED_ACTION_REF = 'v1.2.2';
407
+ export const RELEASED_ACTION_REF = 'v1.2.3';
408
408
 
409
409
  /** The release tag the workflows pin by default: "v<version>" for a release, else RELEASED_ACTION_REF. */
410
410
  export function releaseRef() {
package/src/mutants.js CHANGED
@@ -18,6 +18,11 @@ export const DEFAULT_EVAL_EXCLUDE = Object.freeze([
18
18
  '**/test-utils/**', '**/test_utils/**', '**/testutils/**', '**/test-helpers/**', '**/test_helpers/**', '**/test-support/**', '**/test_support/**',
19
19
  // JavaScript / TypeScript (and anything else named this way): a.test.js, a.spec.ts, a_spec.js, a_test.js.
20
20
  '**/*.test.*', '**/*.spec.*', '**/*_spec.*', '**/*_test.*', '**/*.snap',
21
+ // Standalone Node/AVA tests, also inside packages. Share these with the guard so an
22
+ // unrecognised test cannot both escape restoration and enter the mutation sample.
23
+ ...['js', 'mjs', 'cjs', 'ts', 'mts', 'cts', 'jsx', 'tsx'].flatMap((ext) => [
24
+ `**/test.${ext}`, `**/test-*.${ext}`,
25
+ ]),
21
26
  // Python: test_a.py, a_test.py (above), Django's tests.py.
22
27
  '**/test_*.py', '**/tests.py',
23
28
  // Ruby: a_spec.rb, a_test.rb (above), test_a.rb.