checkwright 0.53.0 → 0.54.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 (55) 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 +4 -0
  22. package/payload/gate-sdk/gate-tests/check-rust-orphan-module/bad/expect.txt +5 -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/commented.rs +1 -0
  28. package/payload/gate-sdk/gate-tests/check-rust-orphan-module/bad/src/lib.rs +3 -0
  29. package/payload/gate-sdk/gate-tests/check-rust-orphan-module/bad/src/orphan.rs +2 -0
  30. package/payload/gate-sdk/gate-tests/check-rust-orphan-module/bad/src/stringed.rs +1 -0
  31. package/payload/gate-sdk/gate-tests/check-rust-orphan-module/bad/src/used.rs +1 -0
  32. package/payload/gate-sdk/gate-tests/check-rust-orphan-module/bad/tests/common/mod.rs +1 -0
  33. package/payload/gate-sdk/gate-tests/check-rust-orphan-module/bad/tests/common/never.rs +2 -0
  34. package/payload/gate-sdk/gate-tests/check-rust-orphan-module/bad/tests/it.rs +4 -0
  35. package/payload/gate-sdk/gate-tests/check-rust-orphan-module/good/Cargo.toml +4 -0
  36. package/payload/gate-sdk/gate-tests/check-rust-orphan-module/good/benches/b.rs +1 -0
  37. package/payload/gate-sdk/gate-tests/check-rust-orphan-module/good/build.rs +1 -0
  38. package/payload/gate-sdk/gate-tests/check-rust-orphan-module/good/examples/e.rs +1 -0
  39. package/payload/gate-sdk/gate-tests/check-rust-orphan-module/good/expect.txt +1 -0
  40. package/payload/gate-sdk/gate-tests/check-rust-orphan-module/good/scripts/gate-sdk-config.knobs +1 -0
  41. package/payload/gate-sdk/gate-tests/check-rust-orphan-module/good/src/bin/tool/main.rs +1 -0
  42. package/payload/gate-sdk/gate-tests/check-rust-orphan-module/good/src/child/grand.rs +1 -0
  43. package/payload/gate-sdk/gate-tests/check-rust-orphan-module/good/src/child.rs +1 -0
  44. package/payload/gate-sdk/gate-tests/check-rust-orphan-module/good/src/from_include.rs +1 -0
  45. package/payload/gate-sdk/gate-tests/check-rust-orphan-module/good/src/gated.rs +2 -0
  46. package/payload/gate-sdk/gate-tests/check-rust-orphan-module/good/src/generated.rs +1 -0
  47. package/payload/gate-sdk/gate-tests/check-rust-orphan-module/good/src/inl/inner.rs +1 -0
  48. package/payload/gate-sdk/gate-tests/check-rust-orphan-module/good/src/lib.rs +11 -0
  49. package/payload/gate-sdk/gate-tests/check-rust-orphan-module/good/src/loaded/file.rs +1 -0
  50. package/payload/gate-sdk/gate-tests/check-rust-orphan-module/good/src/loaded/sub.rs +1 -0
  51. package/payload/gate-sdk/gate-tests/check-rust-orphan-module/good/src/plat.rs +1 -0
  52. package/payload/gate-sdk/gate-tests/check-rust-orphan-module/good/src/unix_impl.rs +1 -0
  53. package/payload/gate-sdk/gate-tests/check-rust-orphan-module/good/tests/it.rs +2 -0
  54. package/payload/gate-sdk/gate-tests/check-rust-orphan-module/good/tests/ui/fail.rs +3 -0
  55. package/payload/gate-sdk/gate-tests/check-rust-orphan-module.test.sh +74 -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": "298c27c36f3111bfd09e8b389b4851e669469c69",
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.54.0"
34
34
  }
@@ -1 +1 @@
1
- f79e0170201a3de12198b35ed4c2e1b43465cf73ac46ff7e3ff3a1e6cfd2d0a1 checkwright-gates
1
+ 637dcde3f66d48f6a5afddaa06823db13b9912168124e0bbe21c5efa3232250d checkwright-gates
@@ -1 +1 @@
1
- 0019879dd225480159834501540556f1502b1a93c69e70d85c0b19447967e595 *checkwright-gates.exe
1
+ c124a67288be81e231fb6b2eebaf4b85606f17377c4813f0310893591aa89b02 *checkwright-gates.exe
@@ -1 +1 @@
1
- fdfcf8c4cd55a82049ed3382826b7d223520d17f178fd57aae95b2005ef44733 checkwright-gates
1
+ feef790ab877d7383073113e52dee13c925b2a68e8577a780c30f2a3e2ff1496 checkwright-gates
@@ -1 +1 @@
1
- 1f0ad044368f400d8295d7b4fa29f3bff793629d76694ad9e0b172c9d27fd535 checkwright-gates
1
+ b5ffe51d015d84b7a17b997027110cab5d8d533c4042c07b43de6e2a8771c7ac checkwright-gates
@@ -1 +1 @@
1
- 1db84df21b141630e76ce0e5f1a51ace4a642a5bfadb7112cdace3dbb3dd7bbe checkwright-gates
1
+ 7baaa076cc81e0c55aeeb95fb485d65fe50ce20f6a670717c0518d4904a3c5b7 checkwright-gates
@@ -1 +1 @@
1
- 308aa693ceb999b84e2f7e6fee443aca86d6da261b1068f91cb1cecaf55e76db *checkwright-gates.exe
1
+ 3a68aaf145ed36f823fb32de0c40cd61fc3b092322326ffdd0069b8a61420280 *checkwright-gates.exe
@@ -1 +1 @@
1
- 6b595be4579d0b452b5311dbee1670928a49e47f653b2135dbf190dd3bed15bd checkwright-gates
1
+ 36c8b9757ad2f388372276ad0155bea1e63a4b812bbbeafc0690a02e2633c438 checkwright-gates
@@ -1 +1 @@
1
- 0445668807b9602f1615689d197947b004b58f0cac25feb19a69a9ba8472f31a checkwright-gates
1
+ 124cecf9636bc90a5de74a3c7cb2407f3faa9f731f7aa9bf4cb0e747dd6efd50 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,4 @@
1
+ [package]
2
+ name = "bad"
3
+ version = "0.1.0"
4
+ edition = "2021"
@@ -0,0 +1,5 @@
1
+ notests/tests/t.rs: [RUST-ORPHAN] no target of notests reaches it
2
+ src/commented.rs: [RUST-ORPHAN] no target of . reaches it
3
+ src/orphan.rs: [RUST-ORPHAN] no target of . reaches it
4
+ src/stringed.rs: [RUST-ORPHAN] no target of . reaches it
5
+ 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 (16 Rust file(s) reached across 1 crate(s))
@@ -0,0 +1 @@
1
+ GATE_SDK_RUST_ORPHAN_PATHS = . :!tests/ui
@@ -0,0 +1,11 @@
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.rs");
@@ -0,0 +1,3 @@
1
+ fn main() {
2
+ let x: u8 = "not a number";
3
+ }
@@ -0,0 +1,74 @@
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
+
69
+ if [[ "$fails" -gt 0 ]]; then
70
+ echo "check-rust-orphan-module.test.sh: $fails case(s) failed"
71
+ exit 1
72
+ fi
73
+ echo "check-rust-orphan-module.test.sh: clean (the exit-3 inputs and the refusals — $cases cases)"
74
+ exit 0