checkwright 0.33.0 → 0.34.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 (25) 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/gate-sdk/gate-tests/native-git-hooks.test.sh +37 -4
  19. package/payload/lifecycle-kit/templates/lead.md +1 -1
  20. package/payload/lifecycle-kit/templates/stages/align.md +1 -1
  21. package/payload/lifecycle-kit/templates/stages/build.md +1 -1
  22. package/payload/lifecycle-kit/templates/stages/close.md +1 -1
  23. package/payload/lifecycle-kit/templates/stages/scope.md +1 -1
  24. package/payload/lifecycle-kit/templates/stages/spec.md +1 -1
  25. package/payload/lifecycle-kit/templates/stages/validate.md +1 -1
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "checkwright-pwsh": "bin/checkwright.ps1"
5
5
  },
6
6
  "checkwright": {
7
- "commit": "59de162e84d30cfc4364b1d528a378bd47351026",
7
+ "commit": "c3550419d1a42a5615b01205254de06dd6e02465",
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.0"
33
+ "version": "0.34.0"
34
34
  }
@@ -1 +1 @@
1
- daaa190bf8c530a57e13fe6b91f403939e0ff406b93a89f5c8f65bd80ec610c2 checkwright-gates
1
+ f00242a92d6b2ecd0c7211e3c2455f84b191eb6d3c5b5a2e24c3382082d332db checkwright-gates
@@ -1 +1 @@
1
- 3cbff73a684b04dce801f83aa472fc047f39c147a9888abab1f0338331ef867e *checkwright-gates.exe
1
+ 2aeefffd753bdfdaccfe6a0adbd8ab87f626a898353fb74beacca23244d50220 *checkwright-gates.exe
@@ -1 +1 @@
1
- 2fe31e6d0f04de6ad78c98895278b7ca2ca4e05cf2e9544a4fa20c3e71bce7a9 checkwright-gates
1
+ ac512d08d768d36605a2d549780c5ebb7102a1c9be75d852e03a775df7923e91 checkwright-gates
@@ -1 +1 @@
1
- 632267a0c41d9242ca07db16a28cea5fc9698db8fa51b082b8f479ef1d2d7521 checkwright-gates
1
+ 176e3a2bb98532b4d25fa346d743b338955233e5a199db9b73fbf483e649cc2e checkwright-gates
@@ -1 +1 @@
1
- 8e083efde6cafab256a633f8cb974f9da66764fbe544ee07bbd0029f8caa2056 checkwright-gates
1
+ ec23522797098b55d4f5bdd5cc025bab10f86143c3eb291951cf9f608eee81e9 checkwright-gates
@@ -1 +1 @@
1
- b977995fa5a941df7ed0b66475e69894cd8f6844ae485a7e8c80ab8687558c56 *checkwright-gates.exe
1
+ 2112ea1f1850527f5c78b07e64fa65c4c5cb92d28e1017a22bed2a430ce53b61 *checkwright-gates.exe
@@ -1 +1 @@
1
- b698d53a4632d4eacfddec26be927dc84e0201b86cfa85e5e7bae9e48f360cdd checkwright-gates
1
+ eae5bbc4463e228e6a520a41225e850e6bfbddd90ed431f4c8fe9362daaa8248 checkwright-gates
@@ -1 +1 @@
1
- f3c6b31411b8987daf9ed5fe4ad985204bae07223942eae2f7ef1e1a69923ab4 checkwright-gates
1
+ 1aab17f5978496aa238c3e957b819b98220668243ef7c2f6fce43dd17fc23838 checkwright-gates
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env bash
2
- # spec: gate-sdk/SPEC.md §git-hook — the binary under a served hook's name is that hook's launcher: git starts it with no interpreter, a clean commit lands on the summary line, a red member refuses the commit by gate name, a registry with no commit-msg member leaves that hook silent, a binary that cannot be started refuses naming the path and both remedies, a knob naming a hook's own name is refused at 2, a knob-file line naming any other knob is skipped unread while one setting the launcher's own knob as no scalar is refused at 2, and a registered member whose declaration resolves and cannot be read refuses either hook at 2
3
- # spec: gate-sdk/SPEC.md §install-hooks — the arm places both hooks untracked in gate-hooks under the common git directory with an absolute core.hooksPath, so a linked worktree runs them; a re-run replaces both; an absent binary refuses at 2 and places nothing; a failed core.hooksPath write refuses at 2 ahead of the receipt; a failed blame.ignoreRevsFile write is reported with the status unmoved; a hook left behind by a replaced binary starts the binary now installed; --refresh re-places both hooks of an opted-in clone from a replaced binary with no config write, and places nothing off the work-tree top or in a clone not opted in
2
+ # spec: gate-sdk/SPEC.md §git-hook — the binary under a served hook's name is that hook's launcher: git starts it with no interpreter, a clean commit lands on the summary line, a red member refuses the commit by gate name, a registry with no commit-msg member leaves that hook silent, a binary that cannot be started refuses naming the path and both remedies, a knob naming a hook's own name is refused at 2, a knob-file line naming any other knob is skipped unread while one setting the launcher's own knob as no scalar is refused at 2, a registered member whose declaration resolves and cannot be read refuses either hook at 2, and beside the chain record a placed hook runs the prior hook of its name first, a failing one ending the hook with the gates unrun, while a forwarding hook runs the prior hook of its own name
3
+ # spec: gate-sdk/SPEC.md §install-hooks — the arm places both hooks untracked in gate-hooks under the common git directory with an absolute core.hooksPath, so a linked worktree runs them; a re-run replaces both; an absent binary refuses at 2 and places nothing; a failed core.hooksPath write refuses at 2 ahead of the receipt; a failed blame.ignoreRevsFile write is reported with the status unmoved; a hook left behind by a replaced binary starts the binary now installed; --refresh re-places both hooks of an opted-in clone from a replaced binary with no config write, and places nothing off the work-tree top or in a clone not opted in; a clone already running hooks is chained, its live prior hooks named on stdout
4
4
  set -uo pipefail
5
5
  source "$(dirname "${BASH_SOURCE[0]}")/../../gate-sdk/lib/test-hermetic.sh"
6
6
 
@@ -152,7 +152,7 @@ out="$( cd "$repo" && "./$bin_rel" --install-hooks 2>&1 )"; rc=$?
152
152
  for h in pre-commit commit-msg; do
153
153
  cmp -s "$hooks/$h$sfx" "$repo/$bin_rel" || note "rerun-$h" "a re-run did not replace $h$sfx with the binary"
154
154
  done
155
- [[ "$(find "$hooks" -type f | wc -l | tr -d ' ')" -eq 2 ]] || note rerun-count "a re-run left other than the two hooks: $(ls "$hooks")"
155
+ [[ "$(find "$hooks" -type f ! -name chain | wc -l | tr -d ' ')" -eq 2 ]] || note rerun-count "a re-run left other than the two hooks beside the chain record: $(ls "$hooks")"
156
156
 
157
157
  # 11. a failed core.hooksPath write refuses the opt-in at 2, ahead of the receipt
158
158
  : >"$repo/.git/config.lock"
@@ -256,6 +256,39 @@ out="$( cd "$repo" && "./$bin_rel" --install-hooks --refresh 2>&1 )"; rc=$?
256
256
  out="$( cd "$repo" && "./$bin_rel" --install-hooks --refresh extra 2>&1 )"; rc=$?
257
257
  [[ "$rc" -eq 2 ]] || note refresh-operand "want exit 2 from --refresh with an operand, got $rc -- $out"
258
258
 
259
+ # 17. a clone already running hooks keeps them, each ahead of the gates where they share a hook, and a failing prior hook refuses the commit with the gates unrun; its hooks are sh scripts, so a host with an executable suffix skips it
260
+ if [[ -z "$sfx" ]]; then
261
+ chained="$SANDBOX/chained"
262
+ mkdir -p "$chained/gate-sdk" "$chained/scripts" "$chained/${bin_rel%/*}"
263
+ cp -R "$HERE/gate-sdk/bin" "$HERE/gate-sdk/lib" "$chained/gate-sdk/"
264
+ cp "$PINNED" "$chained/$bin_rel"
265
+ printf 'native/target/\n' >"$chained/.gitignore"
266
+ printf 'check-probe-word\n' >"$chained/scripts/gates.list"
267
+ cp "$repo/scripts/check-probe-word.sh" "$chained/scripts/"
268
+ git -C "$chained" init -q -b main
269
+ for h in pre-commit post-commit; do
270
+ printf '#!/bin/sh\necho %s >>"$(git rev-parse --git-dir)/chain-runs"\n' "$h" >"$chained/.git/hooks/$h"
271
+ chmod +x "$chained/.git/hooks/$h"
272
+ done
273
+ gc() { git -C "$chained" -c user.email=t@example.invalid -c user.name=t "$@"; }
274
+ out="$( cd "$chained" && "./$bin_rel" --install-hooks 2>/dev/null )"; rc=$?
275
+ [[ "$rc" -eq 0 ]] || note chain-install-status "want exit 0 from --install-hooks over live prior hooks, got $rc -- $out"
276
+ grep -qE '^install-hooks: this clone ran hooks from .* \(post-commit, pre-commit\); each now runs from ' <<<"$out" || note chain-line "the opt-in's stdout does not name the chained hooks: $out"
277
+ printf 'a note\n' >"$chained/a.txt"
278
+ gc add -A
279
+ out="$(gc commit -m 'docs: through the chain' 2>&1)"; rc=$?
280
+ [[ "$rc" -eq 0 ]] || note chain-clean-status "a clean commit through the chain was refused ($rc): $out"
281
+ grep -qF 'pre-commit: 1 gate(s) passed.' <<<"$out" || note chain-clean-summary "the gates did not run after the chained pre-commit: $out"
282
+ [[ "$(cat "$chained/.git/chain-runs" 2>/dev/null)" == $'pre-commit\npost-commit' ]] || note chain-runs "want the prior pre-commit then post-commit to run, got: $(cat "$chained/.git/chain-runs" 2>/dev/null)"
283
+ printf '#!/bin/sh\nexit 1\n' >"$chained/.git/hooks/pre-commit"
284
+ printf 'another note\n' >"$chained/b.txt"
285
+ gc add b.txt
286
+ out="$(gc commit -m 'docs: past a failing prior hook' 2>&1)"; rc=$?
287
+ [[ "$rc" -ne 0 ]] || note chain-red-status "a commit landed past a failing prior pre-commit: $out"
288
+ { grep -qF 'the chained hook' <<<"$out" && grep -qF 'the gates did not run' <<<"$out"; } || note chain-red-text "the refusal does not name the chained hook: $out"
289
+ grep -qF 'gate(s) passed.' <<<"$out" && note chain-red-gates "the gates ran past a failing prior hook: $out"
290
+ fi
291
+
259
292
  [[ "$fails" -eq 0 ]] || { echo "native-git-hooks.test: $fails assertion(s) failed"; exit 1; }
260
- echo "native-git-hooks.test: clean (--install-hooks places both hooks untracked under the common git directory, absolute in core.hooksPath, refusing with nothing placed when the binary is absent; git starts the placed binary as each hook with no interpreter: a clean commit lands on the summary line, a red member refuses by gate name from the main checkout and from a linked worktree, the commit-msg hook is silent until a member registers at its tier and reaches one with no re-install; a hook outliving a replaced binary starts the installed one, an unstartable binary refuses naming the path and both remedies, a knob naming a hook is refused at 2, a re-run replaces both, a knob-file line naming a knob the launcher does not know is left to the installed build, --refresh re-places an opted-in clone's hooks and nothing else, a failed core.hooksPath write refuses at 2 with no receipt, a failed blame.ignoreRevsFile write is reported at exit 0, and an unreadable resolved member refuses either hook at 2)"
293
+ echo "native-git-hooks.test: clean (--install-hooks places both hooks untracked under the common git directory, absolute in core.hooksPath, refusing with nothing placed when the binary is absent; git starts the placed binary as each hook with no interpreter: a clean commit lands on the summary line, a red member refuses by gate name from the main checkout and from a linked worktree, the commit-msg hook is silent until a member registers at its tier and reaches one with no re-install; a hook outliving a replaced binary starts the installed one, an unstartable binary refuses naming the path and both remedies, a knob naming a hook is refused at 2, a re-run replaces both, a knob-file line naming a knob the launcher does not know is left to the installed build, --refresh re-places an opted-in clone's hooks and nothing else, a failed core.hooksPath write refuses at 2 with no receipt, a failed blame.ignoreRevsFile write is reported at exit 0, an unreadable resolved member refuses either hook at 2, and a clone already running hooks keeps them, a prior pre-commit ahead of the gates and a prior post-commit through its forwarding hook, a failing prior hook refusing the commit with the gates unrun)"
261
294
  exit 0
@@ -23,7 +23,7 @@ Dispatch mechanics are delegation-kit's, unchanged: dispatch in the background w
23
23
 
24
24
  **Stage N+1 is dispatched on stage N's agent completion notification — never on its hand-back report, commit, stamp, a clean tree, a green battery, or a cleared `--simulate`.** Completion is a fact about a *session*, and none of those others distinguishes "finished" from "still writing". **Make one tool call before any turn you end to await that notification**, a read-only one serving, so a notification queued during the turn is delivered inside it (lifecycle-kit/SPEC.md §The stamp protocol, the honest limit on the lead's dispatch precondition).
25
25
 
26
- **When the notification does not arrive, no single read distinguishes a finished-but-unreported session from a live one.** Delivery can fail, and the rule above has no fallback, while the artifact reads a lead reaches for next are the same ones it just refused. What recovers it is two signals and a question: the session's absence from the harness's running-agent roster, a `DONE` marker in its journal, and — decisive whenever either is ambiguous — asking the session itself, which §A running session is asked, never instructed already sanctions as a question rather than a command. The `DONE` check is valid only as the journal's **last line**: an out-of-order append silently invalidates it and leaves the marker visible.
26
+ **When the notification does not arrive, no single read distinguishes a finished-but-unreported session from a live one.** Delivery can fail, and the rule above has no fallback, while the artifact reads a lead reaches for next are the same ones it just refused. What recovers it is two signals and a question: the session's absence from the harness's running-agent roster, a `DONE` marker in its journal, and — decisive whenever either is ambiguous — asking the session itself, which §A running session is asked, never instructed already sanctions as a question rather than a command. The `DONE` check is valid only as the journal's **last line**, which a resumed session's turn writes again (each stage template's last step), so it answers for the newest turn, the intent oracle's included. An out-of-order append silently invalidates it and leaves the marker visible.
27
27
 
28
28
  **The reverse case is inspected, never waited out: a session that reported and ended its journal with `DONE` yet still reads as active.** A background child of its own is holding it (a producerless waiter, say). Read the process table first, then its shells and worktrees, and report the holder. Two events owe that read: a completion notification saying background work is still running, and any answer to an operator asking whether something is stuck.
29
29
 
@@ -28,4 +28,4 @@ Trigger 3 is mechanized at build entry: `check-stage-entry` assertion C blocks t
28
28
 
29
29
  **Then read your successor's entry.** After your last commit, run `--enter-stage --simulate <stage>` for the build stage. It writes nothing (lifecycle-kit/SPEC.md §bin/enter-stage.sh). An exit of 1 relays a refusal: fix one your own work caused and run the read again, and carry any other into your report verbatim.
30
30
 
31
- **Last step — the resume journal.** This stage's exit artifact is the resume journal the `--enter-stage` arm named at the stamp; its path is a derivation (lifecycle-kit/SPEC.md §The state machine) and its contract is delegation-kit/SPEC.md §Resume journal — agent writes, scratch reset sweeps. Append `DONE` as the file's last line before you report.
31
+ **Last step — the resume journal.** This stage's exit artifact is the resume journal the `--enter-stage` arm named at the stamp; its path is a derivation (lifecycle-kit/SPEC.md §The state machine) and its contract is delegation-kit/SPEC.md §Resume journal — agent writes, scratch reset sweeps. Append `DONE` as the file's last line before you report, and again before the report of any later turn that appends to the file, as a resumed session answering a routed question does.
@@ -32,4 +32,4 @@ Build-time question triage — who rules, and where the ruling lives: a question
32
32
 
33
33
  **Then read your successor's entry.** After your last commit, run `--enter-stage --simulate <stage>` for the drain stage, when your batch's Done moves emptied the active sections — a batch that leaves work active skips the read, since that entry refuses on active work by design and the next batch re-enters this stage. It writes nothing (lifecycle-kit/SPEC.md §bin/enter-stage.sh). An exit of 1 relays a refusal: fix one your own work caused and run the read again, and carry any other into your report verbatim.
34
34
 
35
- **Last step — the resume journal.** This stage's exit artifact is the resume journal the `--enter-stage` arm named at the stamp; its path is a derivation (lifecycle-kit/SPEC.md §The state machine) and its contract is delegation-kit/SPEC.md §Resume journal — agent writes, scratch reset sweeps. Append `DONE` as the file's last line before you report.
35
+ **Last step — the resume journal.** This stage's exit artifact is the resume journal the `--enter-stage` arm named at the stamp; its path is a derivation (lifecycle-kit/SPEC.md §The state machine) and its contract is delegation-kit/SPEC.md §Resume journal — agent writes, scratch reset sweeps. Append `DONE` as the file's last line before you report, and again before the report of any later turn that appends to the file, as a resumed session answering a routed question does.
@@ -26,4 +26,4 @@ The `close` stage of an iteration. Harvest lessons, housekeep, optionally merge.
26
26
 
27
27
  **Then read your successor's entry.** After your last commit, run `--enter-stage --simulate <stage>` for the roster's first stage, whose iteration-boundary checks read what this close leaves. It writes nothing (lifecycle-kit/SPEC.md §bin/enter-stage.sh). An exit of 1 relays a refusal: fix one your own work caused and run the read again, and carry any other into your report verbatim.
28
28
 
29
- **Last step — the resume journal.** This stage's exit artifact is the resume journal the `--enter-stage` arm named at the stamp; its path is a derivation (lifecycle-kit/SPEC.md §The state machine) and its contract is delegation-kit/SPEC.md §Resume journal — agent writes, scratch reset sweeps. Append `DONE` as the file's last line before you report.
29
+ **Last step — the resume journal.** This stage's exit artifact is the resume journal the `--enter-stage` arm named at the stamp; its path is a derivation (lifecycle-kit/SPEC.md §The state machine) and its contract is delegation-kit/SPEC.md §Resume journal — agent writes, scratch reset sweeps. Append `DONE` as the file's last line before you report, and again before the report of any later turn that appends to the file, as a resumed session answering a routed question does.
@@ -46,4 +46,4 @@ With this stage's promotion commit landed (debt, plus the features only where sc
46
46
 
47
47
  **Then read your successor's entry.** After your last commit, run `--enter-stage --simulate <stage>` for the stage you recommended. It writes nothing (lifecycle-kit/SPEC.md §bin/enter-stage.sh). An exit of 1 relays a refusal: fix one your own work caused and run the read again, and carry any other into your report verbatim.
48
48
 
49
- **Last step — the resume journal.** This stage's exit artifact is the resume journal the `--enter-stage` arm named at the stamp; its path is a derivation (lifecycle-kit/SPEC.md §The state machine) and its contract is delegation-kit/SPEC.md §Resume journal — agent writes, scratch reset sweeps. Append `DONE` as the file's last line before you report.
49
+ **Last step — the resume journal.** This stage's exit artifact is the resume journal the `--enter-stage` arm named at the stamp; its path is a derivation (lifecycle-kit/SPEC.md §The state machine) and its contract is delegation-kit/SPEC.md §Resume journal — agent writes, scratch reset sweeps. Append `DONE` as the file's last line before you report, and again before the report of any later turn that appends to the file, as a resumed session answering a routed question does.
@@ -38,4 +38,4 @@ Close by **recommending the next stage**: the trigger-gated audit stage when one
38
38
 
39
39
  **Then read your successor's entry.** After your last commit, run `--enter-stage --simulate <stage>` for the stage you recommended. It writes nothing (lifecycle-kit/SPEC.md §bin/enter-stage.sh). An exit of 1 relays a refusal: fix one your own work caused and run the read again, and carry any other into your report verbatim.
40
40
 
41
- **Last step — the resume journal.** This stage's exit artifact is the resume journal the `--enter-stage` arm named at the stamp; its path is a derivation (lifecycle-kit/SPEC.md §The state machine) and its contract is delegation-kit/SPEC.md §Resume journal — agent writes, scratch reset sweeps. Append `DONE` as the file's last line before you report.
41
+ **Last step — the resume journal.** This stage's exit artifact is the resume journal the `--enter-stage` arm named at the stamp; its path is a derivation (lifecycle-kit/SPEC.md §The state machine) and its contract is delegation-kit/SPEC.md §Resume journal — agent writes, scratch reset sweeps. Append `DONE` as the file's last line before you report, and again before the report of any later turn that appends to the file, as a resumed session answering a routed question does.
@@ -24,4 +24,4 @@ Do not declare validate complete until the baseline diff is clean: no item that
24
24
 
25
25
  **Then read your successor's entry.** After your last commit, run `--enter-stage --simulate <stage>` for the close stage. It writes nothing (lifecycle-kit/SPEC.md §bin/enter-stage.sh). An exit of 1 relays a refusal: fix one your own work caused and run the read again, and carry any other into your report verbatim.
26
26
 
27
- **Last step — the resume journal.** This stage's exit artifact is the resume journal the `--enter-stage` arm named at the stamp; its path is a derivation (lifecycle-kit/SPEC.md §The state machine) and its contract is delegation-kit/SPEC.md §Resume journal — agent writes, scratch reset sweeps. Append `DONE` as the file's last line before you report.
27
+ **Last step — the resume journal.** This stage's exit artifact is the resume journal the `--enter-stage` arm named at the stamp; its path is a derivation (lifecycle-kit/SPEC.md §The state machine) and its contract is delegation-kit/SPEC.md §Resume journal — agent writes, scratch reset sweeps. Append `DONE` as the file's last line before you report, and again before the report of any later turn that appends to the file, as a resumed session answering a routed question does.