checkwright 0.20.0 → 0.22.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/README.md +385 -19
- package/lib/common/digest.sh +18 -0
- package/lib/common/lock.sh +11 -0
- package/lib/common/recipe.sh +8 -11
- package/lib/doctor.sh +49 -0
- package/lib/init.sh +152 -29
- package/package.json +2 -2
- package/payload/artifact/targets.list +30 -0
- package/payload/artifact/x86_64-unknown-linux-gnu/checkwright-gates +0 -0
- package/payload/artifact/x86_64-unknown-linux-gnu/checkwright-gates.sha256 +1 -0
- package/payload/canon-kit/README.md +1 -0
- package/payload/canon-kit/SPEC.md +281 -26
- package/payload/canon-kit/checks/check-comment-tier.sh +7 -2
- package/payload/canon-kit/checks/check-docs-link-convention.sh +11 -4
- package/payload/canon-kit/checks/check-md-refs.sh +22 -9
- package/payload/canon-kit/checks/check-payload-claim.sh +133 -0
- package/payload/canon-kit/checks/check-prose-enum.sh +1 -1
- package/payload/canon-kit/checks/check-spec-pointer.sh +15 -4
- package/payload/canon-kit/gate-tests/check-comment-tier/good/good.sh +3 -0
- package/payload/canon-kit/gate-tests/check-comment-tier.test.sh +26 -3
- package/payload/canon-kit/gate-tests/check-docs-link-convention/bad/OUTSIDE.md +4 -0
- package/payload/canon-kit/gate-tests/check-docs-link-convention/bad/docs/index.md +3 -0
- package/payload/canon-kit/gate-tests/check-docs-link-convention/good/OUTSIDE.md +4 -0
- package/payload/canon-kit/gate-tests/check-docs-link-convention/good/docs/methodology.md +8 -0
- package/payload/canon-kit/gate-tests/check-docs-link-convention.test.sh +94 -0
- package/payload/canon-kit/gate-tests/check-manifest-count.test.sh +5 -3
- package/payload/canon-kit/gate-tests/check-payload-claim/bad/README.md +15 -0
- package/payload/canon-kit/gate-tests/check-payload-claim/bad/expect.txt +2 -0
- package/payload/canon-kit/gate-tests/check-payload-claim/bad/install.md +19 -0
- package/payload/canon-kit/gate-tests/check-payload-claim/bad/posts/note.md +6 -0
- package/payload/canon-kit/gate-tests/check-payload-claim/bad/scripts/canon-config.sh +8 -0
- package/payload/canon-kit/gate-tests/check-payload-claim/bad/scripts/payload-claims.sh +7 -0
- package/payload/canon-kit/gate-tests/check-payload-claim/good/README.md +15 -0
- package/payload/canon-kit/gate-tests/check-payload-claim/good/expect.txt +2 -0
- package/payload/canon-kit/gate-tests/check-payload-claim/good/install.md +20 -0
- package/payload/canon-kit/gate-tests/check-payload-claim/good/posts/note.md +6 -0
- package/payload/canon-kit/gate-tests/check-payload-claim/good/scripts/canon-config.sh +8 -0
- package/payload/canon-kit/gate-tests/check-payload-claim/good/scripts/payload-claims.sh +7 -0
- package/payload/canon-kit/gate-tests/check-prose-enum.test.sh +24 -1
- package/payload/canon-kit/gate-tests/check-spec-pointer/bad/expect.txt +1 -0
- package/payload/canon-kit/gate-tests/check-spec-pointer/bad/widget.sh +1 -0
- package/payload/canon-kit/gate-tests/check-spec-pointer/good/widget.sh +1 -0
- package/payload/canon-kit/lib/spec.sh +22 -12
- package/payload/canon-kit/smoke/install.sh +20 -1
- package/payload/canon-kit/templates/SPEC-amendment.md +5 -1
- package/payload/context-kit/SPEC.md +38 -7
- package/payload/context-kit/lib/toolfloor.sh +1 -1
- package/payload/context-kit/smoke/install.sh +3 -1
- package/payload/delegation-kit/README.md +2 -1
- package/payload/delegation-kit/SPEC.md +590 -48
- package/payload/delegation-kit/bin/run-dispatch-guard-tests.sh +97 -0
- package/payload/delegation-kit/checks/check-agent-tier-explicit.sh +61 -0
- package/payload/delegation-kit/checks/check-gate-tamper.sh +1 -1
- package/payload/delegation-kit/gate-tests/check-agent-tier-explicit/bad/agents/silent.md +7 -0
- package/payload/delegation-kit/gate-tests/check-agent-tier-explicit/bad/args +1 -0
- package/payload/delegation-kit/gate-tests/check-agent-tier-explicit/bad/expect.txt +1 -0
- package/payload/delegation-kit/gate-tests/check-agent-tier-explicit/good/agents/explicit-cheap.md +7 -0
- package/payload/delegation-kit/gate-tests/check-agent-tier-explicit/good/agents/explicit-inherit.md +8 -0
- package/payload/delegation-kit/gate-tests/check-agent-tier-explicit/good/args +1 -0
- package/payload/delegation-kit/gate-tests/check-agent-tier-explicit/good/expect.txt +1 -0
- package/payload/delegation-kit/lib/delegation.sh +3 -0
- package/payload/delegation-kit/smoke/install.sh +3 -1
- package/payload/delegation-kit/templates/agent-dispatch-guard.sh +61 -0
- package/payload/delegation-kit/templates/agent-execution.md +171 -15
- package/payload/delegation-kit/templates/delegation-config.sh +4 -0
- package/payload/delegation-kit/templates/dispatch-checklists.md +1 -1
- package/payload/delegation-kit/usage-tests/dispatch-guard-cases.tsv +30 -0
- package/payload/doctrine-kit/DOCTRINE.md +27 -0
- package/payload/doctrine-kit/README.md +5 -0
- package/payload/doctrine-kit/SPEC.md +62 -3
- package/payload/doctrine-kit/bin/install-doctrine.sh +84 -4
- package/payload/doctrine-kit/smoke/install.sh +77 -1
- package/payload/drift-kit/README.md +3 -2
- package/payload/drift-kit/SPEC.md +253 -20
- package/payload/drift-kit/bin/stage-economics.sh +157 -3
- package/payload/drift-kit/kpis/kpi-incident-recurrence.sh +42 -0
- package/payload/drift-kit/smoke/install.sh +155 -1
- package/payload/drift-kit/templates/economics.md +9 -0
- package/payload/drift-kit/templates/kpis.list +6 -1
- package/payload/evidence-kit/README.md +20 -6
- package/payload/evidence-kit/SPEC.md +355 -17
- package/payload/evidence-kit/bin/run-validate.sh +51 -9
- package/payload/evidence-kit/checks/check-battery-roster.sh +86 -0
- package/payload/evidence-kit/checks/check-producer-liveness.sh +34 -0
- package/payload/evidence-kit/gate-tests/check-battery-roster/bad/args +1 -0
- package/payload/evidence-kit/gate-tests/check-battery-roster/bad/expect.txt +1 -0
- package/payload/evidence-kit/gate-tests/check-battery-roster/bad/runner.md +14 -0
- package/payload/evidence-kit/gate-tests/check-battery-roster/bad/scripts/evidence-config.sh +7 -0
- package/payload/evidence-kit/gate-tests/check-battery-roster/good/args +1 -0
- package/payload/evidence-kit/gate-tests/check-battery-roster/good/expect.txt +1 -0
- package/payload/evidence-kit/gate-tests/check-battery-roster/good/runner.md +14 -0
- package/payload/evidence-kit/gate-tests/check-battery-roster/good/scripts/evidence-config.sh +7 -0
- package/payload/evidence-kit/gate-tests/check-battery-roster.test.sh +68 -0
- package/payload/evidence-kit/gate-tests/check-producer-liveness/bad/args +1 -0
- package/payload/evidence-kit/gate-tests/check-producer-liveness/bad/expect.txt +1 -0
- package/payload/evidence-kit/gate-tests/check-producer-liveness/bad/run-validate.lock +1 -0
- package/payload/evidence-kit/gate-tests/check-producer-liveness/good/args +1 -0
- package/payload/evidence-kit/gate-tests/check-producer-liveness/good/expect.txt +2 -0
- package/payload/evidence-kit/gate-tests/check-producer-liveness/good/run-validate.lock +1 -0
- package/payload/evidence-kit/gate-tests/producer-lock.test.sh +109 -0
- package/payload/evidence-kit/lib/evidence.sh +18 -0
- package/payload/evidence-kit/smoke/install.sh +17 -3
- package/payload/gate-sdk/README.md +4 -1
- package/payload/gate-sdk/SPEC.md +1955 -79
- package/payload/gate-sdk/bin/gen-pre-commit.sh +13 -3
- package/payload/gate-sdk/bin/run-consumer-smoke.sh +121 -1
- package/payload/gate-sdk/bin/run-gate-tests.sh +40 -9
- package/payload/gate-sdk/bin/run-gates.sh +32 -3
- package/payload/gate-sdk/bin/upgrade-smoke.sh +3 -3
- package/payload/gate-sdk/checks/check-action-gh-repo.gate +2 -0
- package/payload/gate-sdk/checks/check-action-pinning.gate +2 -0
- package/payload/gate-sdk/checks/check-action-run-shell.sh +3 -1
- package/payload/gate-sdk/checks/check-core-files.sh +27 -4
- package/payload/gate-sdk/checks/check-exec-bit.sh +20 -1
- package/payload/gate-sdk/checks/check-gate-binary-fresh.sh +106 -0
- package/payload/gate-sdk/checks/check-gate-exemption-tasks.sh +6 -7
- package/payload/gate-sdk/checks/check-gate-output.sh +9 -1
- package/payload/gate-sdk/checks/check-gate-substrate-parity.sh +302 -0
- package/payload/gate-sdk/checks/check-graph.sh +7 -8
- package/payload/gate-sdk/checks/check-readme-roster.sh +5 -0
- package/payload/gate-sdk/checks/check-reads-couples.sh +73 -22
- package/payload/gate-sdk/checks/check-template-registry-parity.sh +81 -0
- package/payload/gate-sdk/checks/check-tree-terms.sh +11 -7
- package/payload/gate-sdk/gate-tests/check-action-run-shell.test.sh +16 -1
- package/payload/gate-sdk/gate-tests/check-core-files.test.sh +64 -0
- package/payload/gate-sdk/gate-tests/check-gate-binary-fresh/bad/args +2 -0
- package/payload/gate-sdk/gate-tests/check-gate-binary-fresh/bad/expect.txt +5 -0
- package/payload/gate-sdk/gate-tests/check-gate-binary-fresh/bad/kitroot/checks/check-vendored.gate +2 -0
- package/payload/gate-sdk/gate-tests/check-gate-binary-fresh/bad/scripts/check-ported.gate +2 -0
- package/payload/gate-sdk/gate-tests/check-gate-binary-fresh/bad/scripts/gate-sdk-config.sh +2 -0
- package/payload/gate-sdk/gate-tests/check-gate-binary-fresh/bad/scripts/gates.list +4 -0
- package/payload/gate-sdk/gate-tests/check-gate-binary-fresh/bad/stamp.txt +1 -0
- package/payload/gate-sdk/gate-tests/check-gate-binary-fresh/bad/stub-bin +6 -0
- package/payload/gate-sdk/gate-tests/check-gate-binary-fresh/good/args +2 -0
- package/payload/gate-sdk/gate-tests/check-gate-binary-fresh/good/expect.txt +5 -0
- package/payload/gate-sdk/gate-tests/check-gate-binary-fresh/good/kitroot/checks/check-vendored.gate +2 -0
- package/payload/gate-sdk/gate-tests/check-gate-binary-fresh/good/scripts/check-ported.gate +2 -0
- package/payload/gate-sdk/gate-tests/check-gate-binary-fresh/good/scripts/gate-sdk-config.sh +2 -0
- package/payload/gate-sdk/gate-tests/check-gate-binary-fresh/good/scripts/gates.list +4 -0
- package/payload/gate-sdk/gate-tests/check-gate-binary-fresh/good/stamp.txt +1 -0
- package/payload/gate-sdk/gate-tests/check-gate-binary-fresh/good/stub-bin +5 -0
- package/payload/gate-sdk/gate-tests/check-gate-binary-fresh.test.sh +81 -0
- package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks/bad/TASK-QUEUE.md +3 -1
- package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks/bad/expect.txt +3 -1
- package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks/bad/gates/check-sample.sh +3 -1
- package/payload/gate-sdk/gate-tests/check-gate-exemption-tasks/good/expect.txt +1 -0
- package/payload/gate-sdk/gate-tests/check-gate-output/bad/check-sample.sh +1 -0
- package/payload/gate-sdk/gate-tests/check-gate-output/good/check-sample.sh +1 -0
- package/payload/gate-sdk/gate-tests/check-gate-output/good/expect.txt +1 -0
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/args +2 -0
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/conservation.md +7 -0
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/expect.txt +12 -0
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/impl/gate.rs +2 -0
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/kitroot/check-orphan.rs +3 -0
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/publish.yml +15 -0
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/scripts/check-alpha.sh +3 -0
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/scripts/check-dup.gate +1 -0
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/scripts/check-dup.sh +3 -0
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/scripts/check-orphan.gate +1 -0
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/scripts/gate-sdk-config.sh +6 -0
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/scripts/gates.list +3 -0
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/stub-bin +3 -0
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/bad/targets.list +3 -0
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/args +2 -0
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/conservation.md +8 -0
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/expect.txt +7 -0
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/impl/gate.rs +2 -0
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/kitroot/check-other.rs +3 -0
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/publish.yml +15 -0
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/scripts/check-alpha.sh +3 -0
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/scripts/check-ported.gate +2 -0
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/scripts/gate-sdk-config.sh +6 -0
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/scripts/gates.list +2 -0
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/stub-bin +3 -0
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity/good/targets.list +2 -0
- package/payload/gate-sdk/gate-tests/check-gate-substrate-parity.test.sh +123 -0
- package/payload/gate-sdk/gate-tests/check-reads-couples.test.sh +139 -0
- package/payload/gate-sdk/gate-tests/check-template-registry-parity/bad/alpha-kit/templates/widgets.list +4 -0
- package/payload/gate-sdk/gate-tests/check-template-registry-parity/bad/alpha-kit/widgets/widget-one.sh +3 -0
- package/payload/gate-sdk/gate-tests/check-template-registry-parity/bad/alpha-kit/widgets/widget-two.sh +3 -0
- package/payload/gate-sdk/gate-tests/check-template-registry-parity/bad/args +4 -0
- package/payload/gate-sdk/gate-tests/check-template-registry-parity/bad/expect.txt +1 -0
- package/payload/gate-sdk/gate-tests/check-template-registry-parity/bad/scripts/gate-sdk-config.sh +5 -0
- package/payload/gate-sdk/gate-tests/check-template-registry-parity/good/alpha-kit/templates/widgets.list +4 -0
- package/payload/gate-sdk/gate-tests/check-template-registry-parity/good/alpha-kit/widgets/widget-one.sh +3 -0
- package/payload/gate-sdk/gate-tests/check-template-registry-parity/good/alpha-kit/widgets/widget-two.sh +3 -0
- package/payload/gate-sdk/gate-tests/check-template-registry-parity/good/args +8 -0
- package/payload/gate-sdk/gate-tests/check-template-registry-parity/good/beta-kit/templates/rules.list +5 -0
- package/payload/gate-sdk/gate-tests/check-template-registry-parity/good/beta-kit/templates/table.tsv +4 -0
- package/payload/gate-sdk/gate-tests/check-template-registry-parity/good/expect.txt +1 -0
- package/payload/gate-sdk/gate-tests/check-template-registry-parity/good/scripts/gate-sdk-config.sh +5 -0
- package/payload/gate-sdk/gate-tests/lib-declaration.test.sh +4 -4
- package/payload/gate-sdk/gate-tests/lib-gate.test.sh +41 -1
- package/payload/gate-sdk/gate-tests/run-gate-tests.test.sh +144 -0
- package/payload/gate-sdk/lib/consumer-smoke.sh +26 -1
- package/payload/gate-sdk/lib/gate.sh +104 -13
- package/payload/gate-sdk/lib/inject.sh +21 -1
- package/payload/gate-sdk/smoke/install.sh +19 -1
- package/payload/guard-kit/README.md +4 -3
- package/payload/guard-kit/SPEC.md +88 -10
- package/payload/guard-kit/bin/compare-settings-allow.sh +40 -7
- package/payload/guard-kit/gate-tests/compare-settings-allow.test.sh +64 -0
- package/payload/guard-kit/lib/guard.sh +1 -0
- package/payload/guard-kit/templates/close-triage.md +35 -7
- package/payload/guard-kit/templates/guard-config.sh +3 -0
- package/payload/lifecycle-kit/README.md +1 -0
- package/payload/lifecycle-kit/SPEC.md +589 -33
- package/payload/lifecycle-kit/bin/enter-stage.sh +13 -3
- package/payload/lifecycle-kit/bin/file-gap.sh +42 -1
- package/payload/lifecycle-kit/bin/file-survey.sh +50 -0
- package/payload/lifecycle-kit/checks/check-merge-attrs.sh +1 -1
- package/payload/lifecycle-kit/checks/check-skill-binding.sh +1 -1
- package/payload/lifecycle-kit/checks/check-survey-record.sh +102 -0
- package/payload/lifecycle-kit/gate-tests/check-merge-attrs/bad/.gitattributes +1 -0
- package/payload/lifecycle-kit/gate-tests/check-merge-attrs/good/.gitattributes +1 -0
- package/payload/lifecycle-kit/gate-tests/check-merge-attrs.test.sh +1 -0
- package/payload/lifecycle-kit/gate-tests/check-survey-record/bad/args +2 -0
- package/payload/lifecycle-kit/gate-tests/check-survey-record/bad/expect.txt +4 -0
- package/payload/lifecycle-kit/gate-tests/check-survey-record/bad/record.md +18 -0
- package/payload/lifecycle-kit/gate-tests/check-survey-record/good/args +2 -0
- package/payload/lifecycle-kit/gate-tests/check-survey-record/good/expect.txt +1 -0
- package/payload/lifecycle-kit/gate-tests/check-survey-record/good/record.md +13 -0
- package/payload/lifecycle-kit/gate-tests/check-survey-record.test.sh +84 -0
- package/payload/lifecycle-kit/gate-tests/file-gap-recurrence.test.sh +94 -0
- package/payload/lifecycle-kit/gate-tests/survey-record-entry.test.sh +102 -0
- package/payload/lifecycle-kit/lib/stages.sh +8 -2
- package/payload/lifecycle-kit/smoke/install.sh +17 -1
- package/payload/lifecycle-kit/templates/consult.md +73 -0
- package/payload/lifecycle-kit/templates/lead.md +141 -10
- package/payload/lifecycle-kit/templates/stages/align.md +12 -0
- package/payload/lifecycle-kit/templates/stages/build.md +8 -0
- package/payload/lifecycle-kit/templates/stages/close.md +25 -4
- package/payload/lifecycle-kit/templates/stages/scope.md +34 -0
- package/payload/lifecycle-kit/templates/stages/spec.md +8 -0
- package/payload/lifecycle-kit/templates/stages/validate.md +8 -0
- package/payload/queue-kit/README.md +4 -1
- package/payload/queue-kit/SPEC.md +230 -6
- package/payload/queue-kit/bin/queue-edges.sh +78 -0
- package/payload/queue-kit/checks/check-queue-entry-budget.sh +5 -3
- package/payload/queue-kit/gate-tests/check-queue-hygiene/good/TASK-QUEUE.md +5 -0
- package/payload/queue-kit/gate-tests/queue-edges.test.sh +130 -0
- package/payload/queue-kit/smoke/install.sh +4 -1
- package/payload/queue-kit/templates/TASK-QUEUE.md +3 -0
- package/payload/site-kit/SPEC.md +135 -29
- package/payload/site-kit/checks/check-docs-render-fidelity.sh +100 -27
- package/payload/site-kit/gate-tests/check-docs-render-fidelity-batch.test.sh +158 -0
- package/payload/site-kit/lib/site.sh +16 -2
- package/payload/site-kit/smoke/install.sh +9 -1
- package/payload/gate-sdk/checks/check-action-gh-repo.sh +0 -321
- package/payload/gate-sdk/checks/check-action-pinning.sh +0 -55
|
@@ -46,13 +46,38 @@ grep -q '^--- Lag' <<<"$out" || fail "missing Lag section header"
|
|
|
46
46
|
grep -q 'Read trend across sessions' <<<"$out" || fail "missing footer"
|
|
47
47
|
|
|
48
48
|
total_rows="$(awk '/^--- Lead/{f=1} /^Read trend/{f=0} f && /^ [^ ]/{c++} END{print c+0}' <<<"$out")"
|
|
49
|
-
[[ "$total_rows" -
|
|
49
|
+
[[ "$total_rows" -ge "$registered" ]] || fail "expected at least one row per registered KPI ($registered), got $total_rows"
|
|
50
50
|
|
|
51
51
|
grep -q 'kpi-does-not-exist.*n/a' <<<"$out" || fail "missing plugin did not yield a visible n/a row"
|
|
52
52
|
|
|
53
53
|
awk '/^--- Lag/{f=1;next} /^Read trend/{f=0} f' <<<"$out" | grep -q 'knowledge friction.*n/a' \
|
|
54
54
|
|| fail "kpi-knowledge-friction did not render an n/a row under the Lag section (log absent in the throwaway consumer)"
|
|
55
55
|
|
|
56
|
+
# spec: drift-kit/SPEC.md §Testing — the per-plugin contribution probe: the report masks a silent
|
|
57
|
+
# plugin with its own 'n/a (plugin failed)' row, so the floor above cannot see one; a name
|
|
58
|
+
# resolving to no plugin is skipped.
|
|
59
|
+
plugin() {
|
|
60
|
+
DRIFT_KIT_KPIS_FILE="$work/kpis.list" \
|
|
61
|
+
DRIFT_KIT_QUEUE_FILE="$work/TASK-QUEUE.md" \
|
|
62
|
+
DRIFT_KIT_TMP_DIR="$work" \
|
|
63
|
+
DRIFT_KIT_TIMINGS_FILE="$work/no-such-timings.txt" \
|
|
64
|
+
bash "$1"
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
probed=0
|
|
68
|
+
while IFS= read -r kname; do
|
|
69
|
+
[[ -n "$kname" ]] || continue
|
|
70
|
+
kpath="$SMOKE_KIT_ROOT/kpis/$kname.sh"
|
|
71
|
+
[[ -f "$kpath" ]] || continue
|
|
72
|
+
set +e
|
|
73
|
+
pout="$(plugin "$kpath")"; prc=$?
|
|
74
|
+
set -e
|
|
75
|
+
[[ "$prc" -eq 0 ]] || fail "$kname exited $prc standalone — the report would mask it as 'n/a (plugin failed)'"
|
|
76
|
+
[[ -n "$pout" ]] || fail "$kname emitted no row standalone — the report would mask it as 'n/a (plugin failed)', so the row-count floor cannot see it"
|
|
77
|
+
probed=$((probed + 1))
|
|
78
|
+
done < <(grep -Ev '^[[:space:]]*(#|$)' "$work/kpis.list")
|
|
79
|
+
[[ "$probed" -gt 0 ]] || fail "no registered name resolved to a bundled plugin — the per-plugin probe asserted nothing"
|
|
80
|
+
|
|
56
81
|
set +e
|
|
57
82
|
trend="$(report --trend)"; trc=$?
|
|
58
83
|
set -e
|
|
@@ -202,6 +227,38 @@ ptmiss="$(ptkpi "$work/no-such-price-table.tsv")"
|
|
|
202
227
|
[[ "$(grep -c '^lead' <<<"$ptmiss")" -eq 1 ]] || fail "with no table the KPI emits one row, not an expiry row for a table that is not there: $ptmiss"
|
|
203
228
|
grep -q 'n/a (no price table)' <<<"$ptmiss" || fail "absent price table must degrade fail-visibly: $ptmiss"
|
|
204
229
|
|
|
230
|
+
# spec: drift-kit/SPEC.md §Testing — kpi-incident-recurrence over purpose-built queues:
|
|
231
|
+
# the sum across declarations, the highest-count slug, the trend fragment, and the two
|
|
232
|
+
# degradations. Fixture-stable, like kpi-price-table-age: it reads a file the fixture writes.
|
|
233
|
+
irkpi() { DRIFT_KIT_QUEUE_FILE="$1" bash "$SMOKE_KIT_ROOT/kpis/kpi-incident-recurrence.sh" "${2:-}"; }
|
|
234
|
+
|
|
235
|
+
ir_q="$work/recurrence-queue.md"
|
|
236
|
+
cat > "$ir_q" <<'EOF'
|
|
237
|
+
# TASK-QUEUE.md
|
|
238
|
+
## Iteration: smoke
|
|
239
|
+
## Deferred
|
|
240
|
+
- **thrice** [design-pending] — a finding re-filed three times.
|
|
241
|
+
recurrence: thrice 2026-08-01 2026-08-02 2026-08-04
|
|
242
|
+
- **once** [design-pending] — a finding re-filed once.
|
|
243
|
+
recurrence: once 2026-08-04
|
|
244
|
+
## Done
|
|
245
|
+
EOF
|
|
246
|
+
set +e
|
|
247
|
+
irout="$(irkpi "$ir_q")"; irrc=$?
|
|
248
|
+
set -e
|
|
249
|
+
[[ "$irrc" -eq 0 ]] || fail "kpi-incident-recurrence exited $irrc (advisory plugins always exit 0)"
|
|
250
|
+
[[ "$(grep -c '^lag' <<<"$irout")" -eq 1 ]] || fail "kpi-incident-recurrence must emit exactly one lag row: $irout"
|
|
251
|
+
grep -q '4 re-filing(s) recorded' <<<"$irout" || fail "the count must sum dates across every declaration, not count declarations: $irout"
|
|
252
|
+
grep -q 'highest thrice at 3' <<<"$irout" || fail "the highest-count slug row is missing or wrong: $irout"
|
|
253
|
+
[[ "$(irkpi "$ir_q" --trend)" == 'recur 4' ]] || fail "kpi-incident-recurrence --trend not 'recur 4': $(irkpi "$ir_q" --trend)"
|
|
254
|
+
|
|
255
|
+
irnone="$(irkpi "$work/TASK-QUEUE.md")"
|
|
256
|
+
grep -q 'n/a (no recurrence declaration in the queue)' <<<"$irnone" \
|
|
257
|
+
|| fail "a queue with no declaration must degrade fail-visibly rather than reporting 0: $irnone"
|
|
258
|
+
[[ -z "$(irkpi "$work/TASK-QUEUE.md" --trend)" ]] || fail "--trend must emit nothing when no declaration exists"
|
|
259
|
+
grep -q 'n/a (no queue file)' <<<"$(irkpi "$work/no-such-queue.md")" \
|
|
260
|
+
|| fail "an absent queue file must degrade fail-visibly"
|
|
261
|
+
|
|
205
262
|
# spec: drift-kit/SPEC.md §Testing — the stage-economics join over a synthetic fixture set:
|
|
206
263
|
# a WORKFLOW-STATE stamp file, a transcript whose basename normalizes to the stamped
|
|
207
264
|
# session8, and a placeholder price table. Known tokens in, known trend line out.
|
|
@@ -345,4 +402,101 @@ EOF
|
|
|
345
402
|
|| fail "a stamp naming the label did not raise the collision notice"
|
|
346
403
|
[[ "$(grep -c ' supiter supervision ' "$suplog")" -eq 0 ]] \
|
|
347
404
|
|| fail "the collision did not suppress the supervision row"
|
|
405
|
+
|
|
406
|
+
# spec: drift-kit/SPEC.md §Testing — the fan-out fixture: a three-level tree flat in one subagents dir,
|
|
407
|
+
# whose grandchild is what makes the walk testable. Its own dir/state/log, same reason as above.
|
|
408
|
+
fodir="$work/fo-sessions"; mkdir -p "$fodir/folead0001dead/subagents"
|
|
409
|
+
fosub="$fodir/folead0001dead/subagents"
|
|
410
|
+
cat > "$fodir/folead0001dead.jsonl" <<'EOF'
|
|
411
|
+
{"type":"assistant","message":{"id":"L1","model":"test-model","usage":{"input_tokens":2,"output_tokens":3,"cache_read_input_tokens":4,"cache_creation_input_tokens":5}}}
|
|
412
|
+
EOF
|
|
413
|
+
cat > "$fosub/agent-fostage1feed.jsonl" <<'EOF'
|
|
414
|
+
{"type":"assistant","message":{"id":"S1","model":"test-model","usage":{"input_tokens":10,"output_tokens":20,"cache_read_input_tokens":30,"cache_creation_input_tokens":40}}}
|
|
415
|
+
EOF
|
|
416
|
+
cat > "$fosub/agent-fochild2feed.jsonl" <<'EOF'
|
|
417
|
+
{"type":"assistant","message":{"id":"C1","model":"test-model","usage":{"input_tokens":1,"output_tokens":2,"cache_read_input_tokens":3,"cache_creation_input_tokens":4}}}
|
|
418
|
+
EOF
|
|
419
|
+
cat > "$fosub/agent-fogrand3feed.jsonl" <<'EOF'
|
|
420
|
+
{"type":"assistant","message":{"id":"G1","model":"test-model","usage":{"input_tokens":100,"output_tokens":200,"cache_read_input_tokens":300,"cache_creation_input_tokens":400}}}
|
|
421
|
+
EOF
|
|
422
|
+
# spec: drift-kit/SPEC.md §Testing — the fixture's second same-stage session: no usage of its own, so
|
|
423
|
+
# it anchors without emitting a row and its child must fold rather than replace the first anchor's.
|
|
424
|
+
printf '{"type":"user","message":{"role":"user","content":"no usage here"}}\n' > "$fosub/agent-fostage4feed.jsonl"
|
|
425
|
+
cat > "$fosub/agent-fochild5feed.jsonl" <<'EOF'
|
|
426
|
+
{"type":"assistant","message":{"id":"C5","model":"test-model","usage":{"input_tokens":1000,"output_tokens":2000,"cache_read_input_tokens":3000,"cache_creation_input_tokens":4000}}}
|
|
427
|
+
EOF
|
|
428
|
+
printf '{"agentType":"stage-session","spawnDepth":1}\n' > "$fosub/agent-fostage1feed.meta.json"
|
|
429
|
+
printf '{"agentType":"Explore","parentAgentId":"fostage1feed","spawnDepth":2}\n' > "$fosub/agent-fochild2feed.meta.json"
|
|
430
|
+
printf '{"agentType":"fork","isFork":true,"parentAgentId":"fochild2feed","spawnDepth":3}\n' > "$fosub/agent-fogrand3feed.meta.json"
|
|
431
|
+
printf '{"agentType":"stage-session","spawnDepth":1}\n' > "$fosub/agent-fostage4feed.meta.json"
|
|
432
|
+
printf '{"agentType":"Explore","parentAgentId":"fostage4feed","spawnDepth":2}\n' > "$fosub/agent-fochild5feed.meta.json"
|
|
433
|
+
printf 'foiter build fostage1 2025-01-01\nfoiter build fostage4 2025-01-01\n' > "$work/fo-state.txt"
|
|
434
|
+
folog="$work/fo-log.txt"
|
|
435
|
+
fan() { # $1 = fan-out suffix
|
|
436
|
+
DRIFT_KIT_STATE_FILE="$work/fo-state.txt" \
|
|
437
|
+
DRIFT_KIT_SESSIONS_DIR="$fodir" \
|
|
438
|
+
DRIFT_KIT_PRICE_TABLE="$work/se-prices.tsv" \
|
|
439
|
+
DRIFT_KIT_STAGE_ECONOMICS_LOG="$folog" \
|
|
440
|
+
DRIFT_KIT_FANOUT_SUFFIX="$1" \
|
|
441
|
+
bash "$SMOKE_KIT_ROOT/bin/stage-economics.sh" 2>&1
|
|
442
|
+
}
|
|
443
|
+
set +e
|
|
444
|
+
foout="$(fan '+fanout')"; forc=$?
|
|
445
|
+
set -e
|
|
446
|
+
[[ "$forc" -eq 0 ]] || fail "stage-economics over the fan-out fixture exited $forc"
|
|
447
|
+
[[ "$(grep -c ' foiter build+fanout test-model ' "$folog")" -eq 1 ]] \
|
|
448
|
+
|| fail "the three-level fixture did not yield exactly one fan-out row: $foout"
|
|
449
|
+
grep -qE ' foiter build\+fanout test-model in=1101 out=2202 cr=3303 cw=4404 cost=33030\.[0-9]+$' "$folog" \
|
|
450
|
+
|| fail "the fan-out row is not the sum over the whole subtree — a walk that stopped at depth 2, or two anchors racing under the dedup key instead of folding: $(cat "$folog")"
|
|
451
|
+
grep -q ' foiter build+fanout 2 anchors ' <<<"$foout" \
|
|
452
|
+
|| fail "two anchors sharing one (iteration, stage) did not fold into one row: $foout"
|
|
453
|
+
grep -qE ' foiter build test-model in=10 out=20 cr=30 cw=40 cost=300\.[0-9]+$' "$folog" \
|
|
454
|
+
|| fail "the stage row lost its own usage to the subtree (the fold this row exists to refuse): $(cat "$folog")"
|
|
455
|
+
grep -q 'resolved no anchor' <<<"$foout" \
|
|
456
|
+
&& fail "an intact meta layer must resolve every dispatched transcript: $foout"
|
|
457
|
+
grep -q 'match no stamp and resolved no anchor' <<<"$foout" \
|
|
458
|
+
&& fail "the unstamped bound still counts transcripts the fan-out pass attributed: $foout"
|
|
459
|
+
|
|
460
|
+
: > "$folog"
|
|
461
|
+
fan '-subtree' >/dev/null
|
|
462
|
+
grep -q ' foiter build-subtree test-model ' "$folog" \
|
|
463
|
+
|| fail "DRIFT_KIT_FANOUT_SUFFIX did not name the row (the suffix is not a literal)"
|
|
464
|
+
|
|
465
|
+
: > "$folog"
|
|
466
|
+
printf 'foiter build fostage1 2025-01-01\nfoiter build fostage4 2025-01-01\nfoiter build+fanout nostage1 2025-01-01\n' > "$work/fo-state.txt"
|
|
467
|
+
focol="$(fan '+fanout')"
|
|
468
|
+
grep -q 'colliding with DRIFT_KIT_FANOUT_SUFFIX' <<<"$focol" \
|
|
469
|
+
|| fail "a stamp whose stage ends in the suffix did not raise the collision notice"
|
|
470
|
+
[[ "$(grep -c 'build+fanout test-model' "$folog")" -eq 0 ]] \
|
|
471
|
+
|| fail "the collision did not suppress the fan-out row"
|
|
472
|
+
printf 'foiter build fostage1 2025-01-01\nfoiter build fostage4 2025-01-01\n' > "$work/fo-state.txt"
|
|
473
|
+
|
|
474
|
+
# spec: drift-kit/SPEC.md §Testing — the fan-out fixture's two degradation assertions, neither of
|
|
475
|
+
# which may be dropped for brevity: they are what make the coupling's bound testable, not asserted.
|
|
476
|
+
: > "$folog"; fan '+fanout' >/dev/null
|
|
477
|
+
grep -v 'build+fanout' "$folog" | sort > "$work/fo-intact.txt"
|
|
478
|
+
rm -f "$fosub/agent-fogrand3feed.meta.json"
|
|
479
|
+
: > "$folog"
|
|
480
|
+
fodeg="$(fan '+fanout')"
|
|
481
|
+
grep -q '1 dispatched transcript(s) resolved no anchor' <<<"$fodeg" \
|
|
482
|
+
|| fail "a missing meta record must raise the counted unresolved notice: $fodeg"
|
|
483
|
+
grep -q '1 transcript(s) in the sessions dir match no stamp and resolved no anchor' <<<"$fodeg" \
|
|
484
|
+
|| fail "an unresolved transcript must fall back into the unstamped bound: $fodeg"
|
|
485
|
+
grep -qE ' foiter build\+fanout test-model in=1001 out=2002 cr=3003 cw=4004 ' "$folog" \
|
|
486
|
+
|| fail "the degraded run must still price every resolvable transcript, never guess the unresolved one: $(cat "$folog")"
|
|
487
|
+
grep -v 'build+fanout' "$folog" | sort > "$work/fo-degraded.txt"
|
|
488
|
+
diff -q "$work/fo-intact.txt" "$work/fo-degraded.txt" >/dev/null \
|
|
489
|
+
|| fail "a degraded fan-out pass changed a row it does not own: $(diff "$work/fo-intact.txt" "$work/fo-degraded.txt")"
|
|
490
|
+
|
|
491
|
+
# spec: drift-kit/SPEC.md §Testing — the second arm: the whole meta layer gone.
|
|
492
|
+
rm -f "$fosub"/*.meta.json
|
|
493
|
+
: > "$folog"
|
|
494
|
+
fonone="$(fan '+fanout')"
|
|
495
|
+
grep -q 'no dispatch-attribution records beside the transcripts' <<<"$fonone" \
|
|
496
|
+
|| fail "an absent meta layer must emit its single notice: $fonone"
|
|
497
|
+
[[ "$(grep -c 'build+fanout' "$folog")" -eq 0 ]] \
|
|
498
|
+
|| fail "an absent meta layer must emit no fan-out row at all"
|
|
499
|
+
sort "$folog" > "$work/fo-nometa.txt"
|
|
500
|
+
diff -q "$work/fo-intact.txt" "$work/fo-nometa.txt" >/dev/null \
|
|
501
|
+
|| fail "losing the meta layer changed a row it does not own: $(diff "$work/fo-intact.txt" "$work/fo-nometa.txt")"
|
|
348
502
|
fi
|
|
@@ -31,6 +31,15 @@ Compose the narrative from those two surfaces:
|
|
|
31
31
|
bullets — never folded into them — and say plainly that per-stage figures
|
|
32
32
|
exclude it. If the run's caveat named an apportionment key (one lead spanning
|
|
33
33
|
several iterations), repeat the key so the reader can discount the row.
|
|
34
|
+
- **Fan-out.** A stage that dispatched agents pays for their whole subtree, and
|
|
35
|
+
that subtree bills to its own suffixed row rather than into the stage's own
|
|
36
|
+
(drift-kit/SPEC.md §The stage-economics meter, the fan-out row). Report it as a
|
|
37
|
+
named line item beside that stage's figure — never folded into it — and say
|
|
38
|
+
plainly that a per-stage figure excludes its own fan-out. Where the run's notice
|
|
39
|
+
named an apportionment key or a count of transcripts that resolved no anchor,
|
|
40
|
+
repeat it so the reader can discount the row. Read the row as an **aggregate**:
|
|
41
|
+
it carries no dispatch-type dimension, so a fork's spend and a typed dispatch's
|
|
42
|
+
spend are one total in it — do not report it as the cost of forking.
|
|
34
43
|
- **Overhead share.** From the overhead meter, state what fraction of the
|
|
35
44
|
closing session was governance versus task work — the methodology's own cost.
|
|
36
45
|
- **Posture verdict.** Weigh *<posture: the model posture this iteration ran —
|
|
@@ -15,8 +15,13 @@ kpi-settings-local
|
|
|
15
15
|
kpi-gate-runtime
|
|
16
16
|
kpi-overhead
|
|
17
17
|
kpi-price-table-age
|
|
18
|
+
kpi-queue-net-delta
|
|
18
19
|
|
|
19
20
|
# Lag — weighted low; undercounts by construction. kpi-knowledge-friction reads
|
|
20
21
|
# drift-kit's knowledge-friction loop (its capture convention + close triage); it
|
|
21
|
-
# shows n/a until the log exists.
|
|
22
|
+
# shows n/a until the log exists. kpi-incident-recurrence reads the queue's
|
|
23
|
+
# recurrence: declarations (queue-kit's grammar, stamped by close's gap-inbox
|
|
24
|
+
# drain); it shows n/a until one exists.
|
|
25
|
+
# A consumer with a structured lag source adds its own.
|
|
22
26
|
kpi-knowledge-friction
|
|
27
|
+
kpi-incident-recurrence
|
|
@@ -7,11 +7,13 @@ contract (`# contract: evidence-manifest v1`) an external verifier can consume,
|
|
|
7
7
|
so the kit is adoptable with or without an iteration lifecycle.
|
|
8
8
|
|
|
9
9
|
The gates: `check-evidence-baseline` (baseline grammar, blocking-slug liveness,
|
|
10
|
-
scenario coverage)
|
|
11
|
-
lifecycle drives the tree, close-entry green block + validate-stamp coupling)
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
10
|
+
scenario coverage), `check-evidence-manifest` (manifest grammar and, where
|
|
11
|
+
lifecycle drives the tree, close-entry green block + validate-stamp coupling),
|
|
12
|
+
`check-battery-roster` (the runner doc's battery block against the suite roster)
|
|
13
|
+
and `check-producer-liveness` (no stage entry while the producer is still
|
|
14
|
+
running). The `bin/` tools that drive it: `run-validate.sh` (the codified spine
|
|
15
|
+
that runs the suites and records evidence) and `diff-baseline.sh` (the
|
|
16
|
+
situational runtime diff). See [SPEC.md](SPEC.md) for the full contracts.
|
|
15
17
|
|
|
16
18
|
## Install
|
|
17
19
|
|
|
@@ -23,6 +25,8 @@ Vendor the kit beside [gate-sdk](../gate-sdk/) (required), then:
|
|
|
23
25
|
```
|
|
24
26
|
check-evidence-baseline
|
|
25
27
|
check-evidence-manifest
|
|
28
|
+
check-battery-roster
|
|
29
|
+
check-producer-liveness # entry hook only — never gates.list, see step 6
|
|
26
30
|
```
|
|
27
31
|
<!-- gate-roster:end -->
|
|
28
32
|
|
|
@@ -46,12 +50,22 @@ Vendor the kit beside [gate-sdk](../gate-sdk/) (required), then:
|
|
|
46
50
|
`libtest` for per-test result logs, or your own log-parsing command).
|
|
47
51
|
|
|
48
52
|
4. Record evidence at validate — run `bash evidence-kit/bin/run-validate.sh`; it
|
|
49
|
-
runs each suite, diffs the baseline, and
|
|
53
|
+
runs each suite, diffs the baseline, and records one evidence line per suite —
|
|
54
|
+
written to the manifest in a single fold once the whole roster has run, so a
|
|
55
|
+
suite needing a clean worktree may sit anywhere in it.
|
|
50
56
|
|
|
51
57
|
5. Optional lifecycle integration — set `LIFECYCLE_KIT_BOUNDARY_TRUNCATE` to the
|
|
52
58
|
evidence manifest so a new iteration starts from the contract header, and the
|
|
53
59
|
manifest gate's close-entry and stamp-coupling assertions arm automatically.
|
|
54
60
|
|
|
61
|
+
6. Wire `check-producer-liveness` on `LIFECYCLE_KIT_ENTRY_PREFLIGHT` rather than
|
|
62
|
+
in `gates.list`, its command naming the lock file
|
|
63
|
+
(`<stage>=evidence-kit/checks/check-producer-liveness.sh <lock-file>`),
|
|
64
|
+
at whichever stage entries must not begin while `run-validate`
|
|
65
|
+
is still running. It asks whether a producer is in flight, not whether the
|
|
66
|
+
tree is consistent, so a battery that `run-validate` itself invokes would red
|
|
67
|
+
every run against that run's own lock. See SPEC.md §check-producer-liveness.
|
|
68
|
+
|
|
55
69
|
## Test
|
|
56
70
|
|
|
57
71
|
```bash
|