checkwright 0.53.0 → 0.55.0

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.
Files changed (62) hide show
  1. package/package.json +2 -2
  2. package/payload/artifact/aarch64-apple-darwin/checkwright-gates +0 -0
  3. package/payload/artifact/aarch64-apple-darwin/checkwright-gates.sha256 +1 -1
  4. package/payload/artifact/aarch64-pc-windows-msvc/checkwright-gates.exe +0 -0
  5. package/payload/artifact/aarch64-pc-windows-msvc/checkwright-gates.exe.sha256 +1 -1
  6. package/payload/artifact/aarch64-unknown-linux-gnu/checkwright-gates +0 -0
  7. package/payload/artifact/aarch64-unknown-linux-gnu/checkwright-gates.sha256 +1 -1
  8. package/payload/artifact/aarch64-unknown-linux-musl/checkwright-gates +0 -0
  9. package/payload/artifact/aarch64-unknown-linux-musl/checkwright-gates.sha256 +1 -1
  10. package/payload/artifact/x86_64-apple-darwin/checkwright-gates +0 -0
  11. package/payload/artifact/x86_64-apple-darwin/checkwright-gates.sha256 +1 -1
  12. package/payload/artifact/x86_64-pc-windows-msvc/checkwright-gates.exe +0 -0
  13. package/payload/artifact/x86_64-pc-windows-msvc/checkwright-gates.exe.sha256 +1 -1
  14. package/payload/artifact/x86_64-unknown-linux-gnu/checkwright-gates +0 -0
  15. package/payload/artifact/x86_64-unknown-linux-gnu/checkwright-gates.sha256 +1 -1
  16. package/payload/artifact/x86_64-unknown-linux-musl/checkwright-gates +0 -0
  17. package/payload/artifact/x86_64-unknown-linux-musl/checkwright-gates.sha256 +1 -1
  18. package/payload/evidence-kit/README.md +1 -1
  19. package/payload/gate-sdk/README.md +1 -0
  20. package/payload/gate-sdk/checks/check-rust-orphan-module.gate +4 -0
  21. package/payload/gate-sdk/gate-tests/check-rust-orphan-module/bad/Cargo.toml +8 -0
  22. package/payload/gate-sdk/gate-tests/check-rust-orphan-module/bad/expect.txt +6 -0
  23. package/payload/gate-sdk/gate-tests/check-rust-orphan-module/bad/notests/Cargo.toml +5 -0
  24. package/payload/gate-sdk/gate-tests/check-rust-orphan-module/bad/notests/src/lib.rs +1 -0
  25. package/payload/gate-sdk/gate-tests/check-rust-orphan-module/bad/notests/tests/t.rs +2 -0
  26. package/payload/gate-sdk/gate-tests/check-rust-orphan-module/bad/scripts/gate-sdk-config.knobs +1 -0
  27. package/payload/gate-sdk/gate-tests/check-rust-orphan-module/bad/src/bin/tool.rs +1 -0
  28. package/payload/gate-sdk/gate-tests/check-rust-orphan-module/bad/src/commented.rs +1 -0
  29. package/payload/gate-sdk/gate-tests/check-rust-orphan-module/bad/src/lib.rs +3 -0
  30. package/payload/gate-sdk/gate-tests/check-rust-orphan-module/bad/src/orphan.rs +2 -0
  31. package/payload/gate-sdk/gate-tests/check-rust-orphan-module/bad/src/stringed.rs +1 -0
  32. package/payload/gate-sdk/gate-tests/check-rust-orphan-module/bad/src/tool_main.rs +1 -0
  33. package/payload/gate-sdk/gate-tests/check-rust-orphan-module/bad/src/used.rs +1 -0
  34. package/payload/gate-sdk/gate-tests/check-rust-orphan-module/bad/tests/common/mod.rs +1 -0
  35. package/payload/gate-sdk/gate-tests/check-rust-orphan-module/bad/tests/common/never.rs +2 -0
  36. package/payload/gate-sdk/gate-tests/check-rust-orphan-module/bad/tests/it.rs +4 -0
  37. package/payload/gate-sdk/gate-tests/check-rust-orphan-module/good/Cargo.toml +4 -0
  38. package/payload/gate-sdk/gate-tests/check-rust-orphan-module/good/benches/b.rs +1 -0
  39. package/payload/gate-sdk/gate-tests/check-rust-orphan-module/good/build.rs +1 -0
  40. package/payload/gate-sdk/gate-tests/check-rust-orphan-module/good/examples/e.rs +1 -0
  41. package/payload/gate-sdk/gate-tests/check-rust-orphan-module/good/expect.txt +1 -0
  42. package/payload/gate-sdk/gate-tests/check-rust-orphan-module/good/scripts/gate-sdk-config.knobs +1 -0
  43. package/payload/gate-sdk/gate-tests/check-rust-orphan-module/good/src/bin/tool/main.rs +1 -0
  44. package/payload/gate-sdk/gate-tests/check-rust-orphan-module/good/src/child/grand.rs +1 -0
  45. package/payload/gate-sdk/gate-tests/check-rust-orphan-module/good/src/child.rs +1 -0
  46. package/payload/gate-sdk/gate-tests/check-rust-orphan-module/good/src/elsewhere/deep.rs +1 -0
  47. package/payload/gate-sdk/gate-tests/check-rust-orphan-module/good/src/escaped.rs +1 -0
  48. package/payload/gate-sdk/gate-tests/check-rust-orphan-module/good/src/from_include.rs +1 -0
  49. package/payload/gate-sdk/gate-tests/check-rust-orphan-module/good/src/gated.rs +2 -0
  50. package/payload/gate-sdk/gate-tests/check-rust-orphan-module/good/src/generated.rs +1 -0
  51. package/payload/gate-sdk/gate-tests/check-rust-orphan-module/good/src/inl/inner.rs +1 -0
  52. package/payload/gate-sdk/gate-tests/check-rust-orphan-module/good/src/lib.rs +22 -0
  53. package/payload/gate-sdk/gate-tests/check-rust-orphan-module/good/src/loaded/file.rs +1 -0
  54. package/payload/gate-sdk/gate-tests/check-rust-orphan-module/good/src/loaded/sub.rs +1 -0
  55. package/payload/gate-sdk/gate-tests/check-rust-orphan-module/good/src/naive.rs +1 -0
  56. package/payload/gate-sdk/gate-tests/check-rust-orphan-module/good/src/plat.rs +1 -0
  57. package/payload/gate-sdk/gate-tests/check-rust-orphan-module/good/src/trailing.rs +1 -0
  58. package/payload/gate-sdk/gate-tests/check-rust-orphan-module/good/src/unicode.rs +1 -0
  59. package/payload/gate-sdk/gate-tests/check-rust-orphan-module/good/src/unix_impl.rs +1 -0
  60. package/payload/gate-sdk/gate-tests/check-rust-orphan-module/good/tests/it.rs +2 -0
  61. package/payload/gate-sdk/gate-tests/check-rust-orphan-module/good/tests/ui/fail.rs +3 -0
  62. package/payload/gate-sdk/gate-tests/check-rust-orphan-module.test.sh +77 -0
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "checkwright-pwsh": "bin/checkwright.ps1"
5
5
  },
6
6
  "checkwright": {
7
- "commit": "dd969311203a6161f7cc8bb0e0d2fb2ea213b20b",
7
+ "commit": "a55f0ac6ee3acdebb57ef98a44664999e28c59a3",
8
8
  "spec_base_url": "https://checkwright.dev"
9
9
  },
10
10
  "description": "Reproducible checks that catch unsupported claims in coding-agent delivery before merge: a task marked done with no recorded test run, a skipped lifecycle stage, a spec naming a file the tree lacks. They prove the evidence a claim rests on exists, not that the code is correct.",
@@ -30,5 +30,5 @@
30
30
  "type": "git",
31
31
  "url": "git+https://github.com/checkwright/checkwright.git"
32
32
  },
33
- "version": "0.53.0"
33
+ "version": "0.55.0"
34
34
  }
@@ -1 +1 @@
1
- f79e0170201a3de12198b35ed4c2e1b43465cf73ac46ff7e3ff3a1e6cfd2d0a1 checkwright-gates
1
+ c8229f5ef4f6db2ef70cd868b75591585fc1afd99d552a40cd3583aeda1ce54e checkwright-gates
@@ -1 +1 @@
1
- 0019879dd225480159834501540556f1502b1a93c69e70d85c0b19447967e595 *checkwright-gates.exe
1
+ 9aeafad2082ed47f2734297494d4160c00be43213504fc405541ae1c20ba8b98 *checkwright-gates.exe
@@ -1 +1 @@
1
- fdfcf8c4cd55a82049ed3382826b7d223520d17f178fd57aae95b2005ef44733 checkwright-gates
1
+ dcc251691b378a8f65a1cac2329825e7b0557bd8b31348d7450be72946c115f5 checkwright-gates
@@ -1 +1 @@
1
- 1f0ad044368f400d8295d7b4fa29f3bff793629d76694ad9e0b172c9d27fd535 checkwright-gates
1
+ 43194fa4544593f822e560f6b3c72406e13c92d650833e2d4ada01df59cfb8b1 checkwright-gates
@@ -1 +1 @@
1
- 1db84df21b141630e76ce0e5f1a51ace4a642a5bfadb7112cdace3dbb3dd7bbe checkwright-gates
1
+ 64558b0a3062175c5815468401c97c801ea0a54df3bc54344b38d7337e3460ff checkwright-gates
@@ -1 +1 @@
1
- 308aa693ceb999b84e2f7e6fee443aca86d6da261b1068f91cb1cecaf55e76db *checkwright-gates.exe
1
+ b54ace62ab8beab29f622b237bd23ca81bd78340394a087b826f868a4af84fb1 *checkwright-gates.exe
@@ -1 +1 @@
1
- 6b595be4579d0b452b5311dbee1670928a49e47f653b2135dbf190dd3bed15bd checkwright-gates
1
+ 6de4cdce0cc69f26be382183faec80d88aea878ec886147e4c82a32189869cf1 checkwright-gates
@@ -1 +1 @@
1
- 0445668807b9602f1615689d197947b004b58f0cac25feb19a69a9ba8472f31a checkwright-gates
1
+ ffa588c301cffda10d5a323f56cee85085d58fe24cf04419d8c09cd36f9be9cd checkwright-gates
@@ -2,7 +2,7 @@
2
2
 
3
3
  A held-constant test baseline and a committed per-run evidence manifest for the validate stage: a stage stamp proves a stage was *invoked*, evidence-kit proves it produced its green result. The manifest is a versioned, hashable record (`# contract: evidence-manifest v2`), and a run can publish it as an in-toto Statement an attestation verifier reads, written to a file or handed to `EVIDENCE_KIT_STATEMENT_WRITE_CMD` to store outside the tree (a git-notes pair is documented in [SPEC.md §bin/run-validate.sh](https://checkwright.dev/evidence-kit/SPEC#binrun-validatesh)), so the kit is adoptable with or without an iteration lifecycle.
4
4
 
5
- The gates: `check-evidence-baseline` (baseline grammar, blocking-slug liveness, scenario coverage, flip causation), `check-evidence-manifest` (manifest grammar and, where lifecycle drives the tree, close-entry green block + validate-stamp coupling), `check-battery-roster` (the runner doc's battery block against the suite roster), `check-test-control` (every newly baselined test names a declared control, and every control was witnessed red before close) and `check-producer-liveness` (no stage entry while the producer is still running). The tools that drive it are non-gate arms of the gate binary, reached through gate-sdk's front end: `--run-validate` (the codified spine that runs the suites, re-runs each under its declared test controls, and records evidence), `--diff-baseline` (the situational runtime diff), `--verify-gate-run` and `--import-gate-run` (judge a gate-run Statement against the tree, the first in a versioned JSON document under `--json`, with `EVIDENCE_KIT_VERIFY_REQUIRE` selecting a merge predicate's run-of-`HEAD` and every-suite-clean requirements, and record a verified one produced elsewhere) and `--emit baseline-claims` (each baseline row as a `measured:` oracle line, for prose that quotes one). See [SPEC.md](https://checkwright.dev/evidence-kit/SPEC) for the full contracts.
5
+ The gates: `check-evidence-baseline` (baseline grammar, blocking-slug liveness, scenario coverage, flip causation), `check-evidence-manifest` (manifest grammar and, where lifecycle drives the tree, close-entry green block + validate-stamp coupling), `check-battery-roster` (the runner doc's battery block against the suite roster), `check-test-control` (every newly baselined test names a declared control, and every control was witnessed red before close) and `check-producer-liveness` (no stage entry while the producer is still running). The tools that drive it are non-gate arms of the gate binary, reached through gate-sdk's front end: `--run-validate` (the codified spine that runs the suites, re-runs each under its declared test controls, and records evidence), `--diff-baseline` (the situational runtime diff), `--verify-gate-run` and `--import-gate-run` (judge a gate-run Statement against the tree, the first in a versioned JSON document under `--json`, with `EVIDENCE_KIT_VERIFY_REQUIRE` selecting a merge predicate's run-of-`HEAD` and every-suite-clean requirements, and record a verified one produced elsewhere) `--emit baseline-claims` (each baseline row as a `measured:` oracle line, for prose that quotes one) and `--emit test-scope-plan` (a branch's tests ordered, the changed and dependent packages before the full suite, from a fed `cargo metadata` document). See [SPEC.md](https://checkwright.dev/evidence-kit/SPEC) for the full contracts.
6
6
 
7
7
  This file ships in the installer payload; what that payload withholds, and where this page's `SPEC.md` links then resolve, is [gate-sdk/SPEC.md §Consumer payload](https://checkwright.dev/gate-sdk/SPEC#consumer-payload).
8
8
 
@@ -106,6 +106,7 @@ check-script-preflight
106
106
  check-site-count
107
107
  check-migration-guard
108
108
  check-exec-write
109
+ check-rust-orphan-module
109
110
  check-portability-floor
110
111
  check-projection-roster
111
112
  check-template-copy-parity
@@ -0,0 +1,4 @@
1
+ # graph: couples=*.rs,Cargo.toml dir=one valve=none tier=precommit trigger=*
2
+ # install: on-surface
3
+ # armed-by: GATE_SDK_RUST_ORPHAN_PATHS
4
+ # spec: gate-sdk/SPEC.md §check-rust-orphan-module — every tracked Rust file in a crate is reached from one of the crate's targets (the record names the file and the crate no target of reaches it)
@@ -0,0 +1,8 @@
1
+ [package]
2
+ name = "bad"
3
+ version = "0.1.0"
4
+ edition = "2021"
5
+
6
+ [[bin]]
7
+ name = "tool"
8
+ path = "src/tool_main.rs"
@@ -0,0 +1,6 @@
1
+ notests/tests/t.rs: [RUST-ORPHAN] no target of notests reaches it
2
+ src/bin/tool.rs: [RUST-ORPHAN] no target of . reaches it
3
+ src/commented.rs: [RUST-ORPHAN] no target of . reaches it
4
+ src/orphan.rs: [RUST-ORPHAN] no target of . reaches it
5
+ src/stringed.rs: [RUST-ORPHAN] no target of . reaches it
6
+ tests/common/never.rs: [RUST-ORPHAN] no target of . reaches it
@@ -0,0 +1,5 @@
1
+ [package]
2
+ name = "notests"
3
+ version = "0.1.0"
4
+ edition = "2021"
5
+ autotests = false
@@ -0,0 +1,2 @@
1
+ #[test]
2
+ fn undiscovered() {}
@@ -0,0 +1,3 @@
1
+ mod used;
2
+ // mod commented;
3
+ const S: &str = "mod stringed;";
@@ -0,0 +1,2 @@
1
+ #[test]
2
+ fn never_compiled() {}
@@ -0,0 +1,4 @@
1
+ mod common;
2
+
3
+ #[test]
4
+ fn it() {}
@@ -0,0 +1,4 @@
1
+ [package]
2
+ name = "good"
3
+ version = "0.1.0"
4
+ edition = "2021"
@@ -0,0 +1 @@
1
+ RUST-ORPHAN: clean (21 Rust file(s) reached across 1 crate(s))
@@ -0,0 +1 @@
1
+ GATE_SDK_RUST_ORPHAN_PATHS = . :!tests/ui
@@ -0,0 +1,22 @@
1
+ pub mod child;
2
+ mod inl {
3
+ pub mod inner;
4
+ }
5
+ #[path = "loaded/file.rs"]
6
+ mod loaded;
7
+ #[cfg(test)]
8
+ mod gated;
9
+ #[cfg_attr(unix, path = "unix_impl.rs")]
10
+ mod plat;
11
+ include!(/* generated */ "generated.rs");
12
+ #[path = /* decoded */ "\x65scaped.rs"]
13
+ mod esc;
14
+ #[path = "\u{75}nicode.rs"]
15
+ mod uni;
16
+ #[path = "elsewhere"]
17
+ mod carved {
18
+ pub mod deep;
19
+ }
20
+ #[path = "naive.rs"]
21
+ mod naïve;
22
+ include!("trailing.rs",);
@@ -0,0 +1,3 @@
1
+ fn main() {
2
+ let x: u8 = "not a number";
3
+ }
@@ -0,0 +1,77 @@
1
+ #!/usr/bin/env bash
2
+ # Behavioral test of check-rust-orphan-module's exit-3 inputs and refusals, which a good/+bad/ pair
3
+ # cannot hold: a pair case exits 0 or 1. Each case runs in a sandbox repository.
4
+ #
5
+ # Run by the --run-gate-tests arm (any <tests-dir>/*.test.sh; must exit 0).
6
+ set -uo pipefail
7
+ source "$(dirname "${BASH_SOURCE[0]}")/../../gate-sdk/lib/test-hermetic.sh"
8
+
9
+ DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)" # gate-sdk/
10
+ CHECKS="$DIR/checks"
11
+ SANDBOX="$(mktemp -d)"
12
+ trap 'rm -rf "$SANDBOX"' EXIT
13
+
14
+ fails=0
15
+ cases=0
16
+
17
+ expect() { # expect <label> <want-rc> <substring> <got-rc> <output>
18
+ cases=$((cases + 1))
19
+ if [[ "$4" -ne "$2" ]]; then
20
+ echo " FAIL [$1]: want exit $2, got $4 -- $5"; fails=$((fails + 1))
21
+ elif ! grep -qF -- "$3" <<<"$5"; then
22
+ echo " FAIL [$1]: exit $2 but output lacks '$3': $5"; fails=$((fails + 1))
23
+ fi
24
+ }
25
+
26
+ repo="$SANDBOX/repo"
27
+ mkdir -p "$repo/src"
28
+ git -C "$repo" init -q
29
+ printf '[package]\nname = "t"\n' > "$repo/Cargo.toml"
30
+ printf 'mod a;\n' > "$repo/src/lib.rs"
31
+ printf 'pub fn a() {}\n' > "$repo/src/a.rs"
32
+ git -C "$repo" add -A
33
+
34
+ guard() { # guard [gate args…] — the gate in the sandbox over the whole tree
35
+ ( cd "$repo" && gate_env GATE_SDK_RUST_ORPHAN_PATHS=. && gate_run check-rust-orphan-module "$CHECKS" "$@" 2>&1 )
36
+ }
37
+
38
+ # --- the paths knob empty: clean, not applicable; armed: clean; an operand: refused at 2.
39
+ out="$( cd "$repo" && gate_run check-rust-orphan-module "$CHECKS" 2>&1 )"; rc=$?
40
+ expect not-applicable 0 'not applicable: no Rust path configured' "$rc" "$out"
41
+ out="$(guard)"; rc=$?
42
+ expect clean 0 'clean (2 Rust file(s) reached across 1 crate(s))' "$rc" "$out"
43
+ out="$(guard src/lib.rs)"; rc=$?
44
+ expect usage 2 'takes no arguments' "$rc" "$out"
45
+
46
+ # --- a reached file that does not parse is a [LINT-PARSE] record at 3.
47
+ printf 'pub fn a() {\n let s = r#"open";\n}\n' > "$repo/src/a.rs"
48
+ out="$(guard)"; rc=$?
49
+ expect reached-unparseable 3 'src/a.rs:2: [LINT-PARSE] unparseable span' "$rc" "$out"
50
+ printf 'pub fn a() {}\n' > "$repo/src/a.rs"
51
+
52
+ # --- a corpus file that is not UTF-8 is exit 3.
53
+ printf 'pub fn a() {}\n// \xff\n' > "$repo/src/a.rs"
54
+ out="$(guard)"; rc=$?
55
+ expect not-utf8 3 'src/a.rs is not UTF-8' "$rc" "$out"
56
+ printf 'pub fn a() {}\n' > "$repo/src/a.rs"
57
+
58
+ # --- a target key the line reader cannot see refuses at 3 naming the line.
59
+ printf 'bin = [{ name = "x", path = "src/x.rs" }]\n[package]\nname = "t"\n' > "$repo/Cargo.toml"
60
+ out="$(guard)"; rc=$?
61
+ expect inline-target-array 3 'Cargo.toml:1:' "$rc" "$out"
62
+ printf 'lib.path = "src/lib.rs"\n[package]\nname = "t"\n' > "$repo/Cargo.toml"
63
+ out="$(guard)"; rc=$?
64
+ expect dotted-key 3 'Cargo.toml:1:' "$rc" "$out"
65
+ printf '[package]\nname = "t"\n[lib]\npath = """\nsrc/lib.rs"""\n' > "$repo/Cargo.toml"
66
+ out="$(guard)"; rc=$?
67
+ expect multi-line-string 3 'Cargo.toml:4:' "$rc" "$out"
68
+ printf 'package.name = "t"\n' > "$repo/Cargo.toml"
69
+ out="$(guard)"; rc=$?
70
+ expect dotted-root-package 3 'Cargo.toml:1:' "$rc" "$out"
71
+
72
+ if [[ "$fails" -gt 0 ]]; then
73
+ echo "check-rust-orphan-module.test.sh: $fails case(s) failed"
74
+ exit 1
75
+ fi
76
+ echo "check-rust-orphan-module.test.sh: clean (the exit-3 inputs and the refusals — $cases cases)"
77
+ exit 0