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.
- package/package.json +2 -2
- package/payload/artifact/aarch64-apple-darwin/checkwright-gates +0 -0
- package/payload/artifact/aarch64-apple-darwin/checkwright-gates.sha256 +1 -1
- package/payload/artifact/aarch64-pc-windows-msvc/checkwright-gates.exe +0 -0
- package/payload/artifact/aarch64-pc-windows-msvc/checkwright-gates.exe.sha256 +1 -1
- package/payload/artifact/aarch64-unknown-linux-gnu/checkwright-gates +0 -0
- package/payload/artifact/aarch64-unknown-linux-gnu/checkwright-gates.sha256 +1 -1
- package/payload/artifact/aarch64-unknown-linux-musl/checkwright-gates +0 -0
- package/payload/artifact/aarch64-unknown-linux-musl/checkwright-gates.sha256 +1 -1
- package/payload/artifact/x86_64-apple-darwin/checkwright-gates +0 -0
- package/payload/artifact/x86_64-apple-darwin/checkwright-gates.sha256 +1 -1
- package/payload/artifact/x86_64-pc-windows-msvc/checkwright-gates.exe +0 -0
- package/payload/artifact/x86_64-pc-windows-msvc/checkwright-gates.exe.sha256 +1 -1
- package/payload/artifact/x86_64-unknown-linux-gnu/checkwright-gates +0 -0
- package/payload/artifact/x86_64-unknown-linux-gnu/checkwright-gates.sha256 +1 -1
- package/payload/artifact/x86_64-unknown-linux-musl/checkwright-gates +0 -0
- package/payload/artifact/x86_64-unknown-linux-musl/checkwright-gates.sha256 +1 -1
- package/payload/evidence-kit/README.md +1 -1
- package/payload/gate-sdk/README.md +1 -0
- package/payload/gate-sdk/checks/check-rust-orphan-module.gate +4 -0
- package/payload/gate-sdk/gate-tests/check-rust-orphan-module/bad/Cargo.toml +8 -0
- package/payload/gate-sdk/gate-tests/check-rust-orphan-module/bad/expect.txt +6 -0
- package/payload/gate-sdk/gate-tests/check-rust-orphan-module/bad/notests/Cargo.toml +5 -0
- package/payload/gate-sdk/gate-tests/check-rust-orphan-module/bad/notests/src/lib.rs +1 -0
- package/payload/gate-sdk/gate-tests/check-rust-orphan-module/bad/notests/tests/t.rs +2 -0
- package/payload/gate-sdk/gate-tests/check-rust-orphan-module/bad/scripts/gate-sdk-config.knobs +1 -0
- package/payload/gate-sdk/gate-tests/check-rust-orphan-module/bad/src/bin/tool.rs +1 -0
- package/payload/gate-sdk/gate-tests/check-rust-orphan-module/bad/src/commented.rs +1 -0
- package/payload/gate-sdk/gate-tests/check-rust-orphan-module/bad/src/lib.rs +3 -0
- package/payload/gate-sdk/gate-tests/check-rust-orphan-module/bad/src/orphan.rs +2 -0
- package/payload/gate-sdk/gate-tests/check-rust-orphan-module/bad/src/stringed.rs +1 -0
- package/payload/gate-sdk/gate-tests/check-rust-orphan-module/bad/src/tool_main.rs +1 -0
- package/payload/gate-sdk/gate-tests/check-rust-orphan-module/bad/src/used.rs +1 -0
- package/payload/gate-sdk/gate-tests/check-rust-orphan-module/bad/tests/common/mod.rs +1 -0
- package/payload/gate-sdk/gate-tests/check-rust-orphan-module/bad/tests/common/never.rs +2 -0
- package/payload/gate-sdk/gate-tests/check-rust-orphan-module/bad/tests/it.rs +4 -0
- package/payload/gate-sdk/gate-tests/check-rust-orphan-module/good/Cargo.toml +4 -0
- package/payload/gate-sdk/gate-tests/check-rust-orphan-module/good/benches/b.rs +1 -0
- package/payload/gate-sdk/gate-tests/check-rust-orphan-module/good/build.rs +1 -0
- package/payload/gate-sdk/gate-tests/check-rust-orphan-module/good/examples/e.rs +1 -0
- package/payload/gate-sdk/gate-tests/check-rust-orphan-module/good/expect.txt +1 -0
- package/payload/gate-sdk/gate-tests/check-rust-orphan-module/good/scripts/gate-sdk-config.knobs +1 -0
- package/payload/gate-sdk/gate-tests/check-rust-orphan-module/good/src/bin/tool/main.rs +1 -0
- package/payload/gate-sdk/gate-tests/check-rust-orphan-module/good/src/child/grand.rs +1 -0
- package/payload/gate-sdk/gate-tests/check-rust-orphan-module/good/src/child.rs +1 -0
- package/payload/gate-sdk/gate-tests/check-rust-orphan-module/good/src/elsewhere/deep.rs +1 -0
- package/payload/gate-sdk/gate-tests/check-rust-orphan-module/good/src/escaped.rs +1 -0
- package/payload/gate-sdk/gate-tests/check-rust-orphan-module/good/src/from_include.rs +1 -0
- package/payload/gate-sdk/gate-tests/check-rust-orphan-module/good/src/gated.rs +2 -0
- package/payload/gate-sdk/gate-tests/check-rust-orphan-module/good/src/generated.rs +1 -0
- package/payload/gate-sdk/gate-tests/check-rust-orphan-module/good/src/inl/inner.rs +1 -0
- package/payload/gate-sdk/gate-tests/check-rust-orphan-module/good/src/lib.rs +22 -0
- package/payload/gate-sdk/gate-tests/check-rust-orphan-module/good/src/loaded/file.rs +1 -0
- package/payload/gate-sdk/gate-tests/check-rust-orphan-module/good/src/loaded/sub.rs +1 -0
- package/payload/gate-sdk/gate-tests/check-rust-orphan-module/good/src/naive.rs +1 -0
- package/payload/gate-sdk/gate-tests/check-rust-orphan-module/good/src/plat.rs +1 -0
- package/payload/gate-sdk/gate-tests/check-rust-orphan-module/good/src/trailing.rs +1 -0
- package/payload/gate-sdk/gate-tests/check-rust-orphan-module/good/src/unicode.rs +1 -0
- package/payload/gate-sdk/gate-tests/check-rust-orphan-module/good/src/unix_impl.rs +1 -0
- package/payload/gate-sdk/gate-tests/check-rust-orphan-module/good/tests/it.rs +2 -0
- package/payload/gate-sdk/gate-tests/check-rust-orphan-module/good/tests/ui/fail.rs +3 -0
- 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": "
|
|
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.
|
|
33
|
+
"version": "0.55.0"
|
|
34
34
|
}
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
c8229f5ef4f6db2ef70cd868b75591585fc1afd99d552a40cd3583aeda1ce54e checkwright-gates
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
9aeafad2082ed47f2734297494d4160c00be43213504fc405541ae1c20ba8b98 *checkwright-gates.exe
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
dcc251691b378a8f65a1cac2329825e7b0557bd8b31348d7450be72946c115f5 checkwright-gates
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
43194fa4544593f822e560f6b3c72406e13c92d650833e2d4ada01df59cfb8b1 checkwright-gates
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
64558b0a3062175c5815468401c97c801ea0a54df3bc54344b38d7337e3460ff checkwright-gates
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
b54ace62ab8beab29f622b237bd23ca81bd78340394a087b826f868a4af84fb1 *checkwright-gates.exe
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
6de4cdce0cc69f26be382183faec80d88aea878ec886147e4c82a32189869cf1 checkwright-gates
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
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)
|
|
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
|
|
|
@@ -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,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 @@
|
|
|
1
|
+
pub fn f() {}
|
package/payload/gate-sdk/gate-tests/check-rust-orphan-module/bad/scripts/gate-sdk-config.knobs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
GATE_SDK_RUST_ORPHAN_PATHS = .
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
fn main() {}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
pub fn c() {}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
pub fn s() {}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
fn main() {}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
pub fn used() {}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
pub fn helper() {}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
fn main() {}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
fn main() {}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
fn main() {}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
RUST-ORPHAN: clean (21 Rust file(s) reached across 1 crate(s))
|
package/payload/gate-sdk/gate-tests/check-rust-orphan-module/good/scripts/gate-sdk-config.knobs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
GATE_SDK_RUST_ORPHAN_PATHS = . :!tests/ui
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
fn main() {}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
pub fn g() {}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
pub mod grand;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
pub fn d() {}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
pub fn e() {}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
pub fn f() {}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
pub mod from_include;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
pub fn i() {}
|
|
@@ -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 @@
|
|
|
1
|
+
mod sub;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
pub fn s() {}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
pub fn n() {}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
pub fn p() {}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
pub fn t() {}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
pub fn u() {}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
pub fn p() {}
|
|
@@ -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
|