@ccoalm/ccl-skills 0.13.0 → 0.15.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/dist/assets/marketplace/plugins/ccl-skills/skills/code-review/SKILL.md +19 -24
- package/dist/assets/marketplace/plugins/ccl-skills/skills/code-review/references/client-routing.md +32 -32
- package/dist/assets/marketplace/plugins/ccl-skills/skills/code-review/references/manual-invocation-and-prompts.md +16 -14
- package/dist/assets/marketplace/plugins/ccl-skills/skills/code-review/references/staged-review-contract.md +24 -26
- package/dist/assets/marketplace/plugins/ccl-skills/skills/code-review/scripts/AGENTS.md +11 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/code-review/scripts/claude_review.sh +60 -209
- package/dist/assets/marketplace/plugins/ccl-skills/skills/code-review/scripts/init_policy_matrix.py +114 -367
- package/dist/assets/marketplace/plugins/ccl-skills/skills/code-review/scripts/parse_probe_result.py +52 -672
- package/dist/assets/marketplace/plugins/ccl-skills/skills/code-review/scripts/review_gate.py +10 -2
- package/dist/assets/marketplace/plugins/ccl-skills/skills/code-review/scripts/runtime-surface-verification-design.md +4 -2
- package/dist/assets/marketplace/plugins/ccl-skills/skills/code-review/scripts/test_claude_review_probe.sh +77 -444
- package/dist/assets/marketplace/plugins/ccl-skills/skills/code-review/scripts/test_init_policy_matrix.sh +33 -98
- package/dist/assets/marketplace/plugins/ccl-skills/skills/code-review/scripts/test_parse_probe_result.sh +57 -173
- package/dist/assets/marketplace/plugins/ccl-skills/skills/defect-diagnosis/SKILL.md +1 -1
- package/dist/assets/marketplace/plugins/ccl-skills/skills/grill-me/SKILL.md +1 -1
- package/dist/assets/marketplace/plugins/ccl-skills/skills/miniapp-product-dev/SKILL.md +1 -1
- package/dist/assets/marketplace/plugins/ccl-skills/skills/platform-observability/SKILL.md +1 -1
- package/dist/assets/marketplace/plugins/ccl-skills/skills/platform-release-engineering/SKILL.md +1 -1
- package/dist/assets/marketplace/plugins/ccl-skills/skills/product-rd-workflow/SKILL.md +2 -2
- package/dist/assets/marketplace/plugins/ccl-skills/skills/product-rd-workflow/references/rd-standards-doc-family-checklist.md +2 -2
- package/dist/assets/marketplace/plugins/ccl-skills/skills/requirement-baseline/SKILL.md +1 -1
- package/dist/assets/marketplace/plugins/ccl-skills/skills/requirement-doc-writer/SKILL.md +1 -1
- package/dist/assets/marketplace/plugins/ccl-skills/skills/requirement-scope/SKILL.md +1 -1
- package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/SKILL.md +14 -41
- package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/references/attention-budget-ratchet.md +11 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/references/correction-routing-map.md +22 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/references/coverage-exhaustion-traps.md +7 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/references/description-authoring.md +26 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/references/dual-track-review-gate.md +2 -2
- package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/references/eval-routing.md +8 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/references/external-practice-controls.md +7 -1
- package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/references/extraction-quickstart.md +4 -2
- package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/references/harness-patterns-and-eval.md +8 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/references/incident-postmortem-extraction.md +8 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/references/rule-consolidation.md +1 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/references/source-register.md +73 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/references/uiux-judgment-extraction.md +11 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/references/validation-and-landing.md +11 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/scripts/entrypoint_form_census.py +169 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/scripts/eval-routing-bank.rb +62 -3
- package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/scripts/impact-chain-gate.rb +114 -10
- package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/scripts/reference-access-census.sh +157 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/scripts/review_ledger_binding.py +483 -109
- package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/scripts/test_check_ccl_impact_chain_refscripts.sh +188 -14
- package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/scripts/test_check_ccl_regressions.sh +10 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/scripts/test_entrypoint_form_census.sh +174 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/scripts/test_eval_routing_bank_resolution.sh +253 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/scripts/test_impact_chain_gate_verdict_differential.sh +49 -25
- package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/scripts/test_reference_access_census.sh +209 -0
- package/dist/assets/marketplace/plugins/ccl-skills/skills/skill-extraction-workflow/scripts/test_review_ledger_binding.sh +394 -5
- package/dist/assets/release.json +77 -47
- package/package.json +1 -1
|
@@ -108,6 +108,15 @@ run_gate() {
|
|
|
108
108
|
rc=$?
|
|
109
109
|
set -e
|
|
110
110
|
}
|
|
111
|
+
# Same gate, explicit base: for fixtures whose claim is about WHICH base the
|
|
112
|
+
# verdict was taken against, pinning it beats inferring it from the upstream.
|
|
113
|
+
run_gate_with_base() { # <base ref>
|
|
114
|
+
gate_runs=$((gate_runs + 1))
|
|
115
|
+
set +e
|
|
116
|
+
out="$(env -u ALIAS_AUDIT_CMD CCL_SKILL_BASE_REF="$1" ruby "$GATE_SCRIPT" "$REPO" 2>&1)"
|
|
117
|
+
rc=$?
|
|
118
|
+
set -e
|
|
119
|
+
}
|
|
111
120
|
|
|
112
121
|
# Case 1: an upstream owner's REFERENCE changed with NO impact-chain row -> block.
|
|
113
122
|
new_case case-ref-no-row
|
|
@@ -1194,12 +1203,13 @@ run_gate
|
|
|
1194
1203
|
assert_rc "$rc" 1 "a duplicated-then-dropped row must not vouch for new owner bytes"
|
|
1195
1204
|
assert_contains "impact_chain_gate_missing" "$out" "the net-zero ledger leaves the owner undeclared"
|
|
1196
1205
|
|
|
1197
|
-
# Round scoping 6: the partition's central claim is that
|
|
1198
|
-
#
|
|
1199
|
-
# so a linear-only fixture set proves nothing about the shape
|
|
1200
|
-
# on.
|
|
1201
|
-
#
|
|
1202
|
-
# cases pin that behaviour instead of asserting
|
|
1206
|
+
# Round scoping 6: the partition's central claim is that a MERGED worktree round is
|
|
1207
|
+
# judged exactly as its branch was — and this repo's integration branch is nothing
|
|
1208
|
+
# but merge commits, so a linear-only fixture set proves nothing about the shape
|
|
1209
|
+
# the gate actually runs on. A merge git rebuilds from its parents is expanded
|
|
1210
|
+
# into the branch's own rounds; work committed on the integration line after it
|
|
1211
|
+
# is a round of its own. These two cases pin that behaviour instead of asserting
|
|
1212
|
+
# it in a comment.
|
|
1203
1213
|
new_case case-round-scope-merged-worktree-round
|
|
1204
1214
|
git -C "$REPO" switch -q -c feature-round-merged
|
|
1205
1215
|
printf '\n- Never skip the fixture merged-round rule for this gate.\n' >> "$REPO/skills/platform-observability/SKILL.md"
|
|
@@ -1270,24 +1280,188 @@ run_gate
|
|
|
1270
1280
|
assert_rc "$rc" 0 "a pre-rename round declared against its own round head must pass"
|
|
1271
1281
|
assert_not_contains "impact_chain_evidence_missing_file" "$out" "a row citing the name that existed at its round head is valid evidence"
|
|
1272
1282
|
|
|
1273
|
-
# Round scoping 8: the
|
|
1274
|
-
# append lands BEFORE the owner work
|
|
1275
|
-
#
|
|
1276
|
-
#
|
|
1277
|
-
#
|
|
1278
|
-
#
|
|
1283
|
+
# Round scoping 8: the merged view IS the branch view. On the branch the ledger
|
|
1284
|
+
# append lands BEFORE the owner work, so as a pull request the branch is refused:
|
|
1285
|
+
# the work sits in a rowless later round. Collapsing the merged branch to one
|
|
1286
|
+
# boundary used to accept the same bytes — what a pull request could not land,
|
|
1287
|
+
# its merge could, and the verdict moved after it landed. A merge git rebuilds
|
|
1288
|
+
# from its parents is now expanded into the branch's own rounds, so the two views
|
|
1289
|
+
# agree; both are run on the same fixture so the equality is a checked fact.
|
|
1279
1290
|
new_case case-round-scope-merged-row-before-work
|
|
1280
1291
|
git -C "$REPO" switch -q -c feature-round-row-first
|
|
1292
|
+
git -C "$REPO" branch --set-upstream-to=fixture-base feature-round-row-first >/dev/null 2>&1
|
|
1281
1293
|
printf '| Fixture row-first merged round | `downstream-executor` | behavioral-evidence: RED-baseline; observed-failure: yes; result-class: failure; bank-evidence: downscoped:REFSCRIPTS-FIXTURE-NO-BANK; firing-path: file:skills/platform-observability/SKILL.md#Never skip the fixture row-first rule | `updated` | `platform-observability/SKILL.md` merged round |\n' >> "$REGISTER"
|
|
1282
1294
|
routing_surface_downscope
|
|
1283
1295
|
commit_case "worktree round: ledger append first"
|
|
1284
1296
|
printf '\n- Never skip the fixture row-first rule for this gate.\n' >> "$REPO/skills/platform-observability/SKILL.md"
|
|
1285
1297
|
routing_surface_downscope
|
|
1286
1298
|
commit_case "worktree round: owner work after the append"
|
|
1299
|
+
run_gate
|
|
1300
|
+
branch_rc="$rc"
|
|
1301
|
+
assert_rc "$rc" 1 "as a pull request, owner work after the ledger append sits in a rowless round"
|
|
1302
|
+
assert_contains "impact_chain_gate_missing" "$out" "the branch view names the undeclared work"
|
|
1287
1303
|
git -C "$REPO" switch -q case-round-scope-merged-row-before-work
|
|
1288
1304
|
git -C "$REPO" merge -q --no-ff -m "Merge branch 'feature-round-row-first': one worktree round" feature-round-row-first
|
|
1289
1305
|
run_gate
|
|
1290
|
-
assert_rc "$rc"
|
|
1306
|
+
assert_rc "$rc" "$branch_rc" "the merge of that branch is judged exactly as the branch was"
|
|
1307
|
+
assert_contains "impact_chain_gate_missing" "$out" "the merged view names the same undeclared work"
|
|
1308
|
+
|
|
1309
|
+
# Round scoping 13: the observed failure. On the branch, round 1 adds a body rule
|
|
1310
|
+
# with its row and round 2 changes ONLY the description with a `#description`
|
|
1311
|
+
# row — as a pull request that is round scoping 2 and passes. Collapsed to one
|
|
1312
|
+
# boundary the owner's merged diff is body plus description, the routing-surface
|
|
1313
|
+
# class refuses the anchor, and a row that was valid when it landed reads
|
|
1314
|
+
# `impact_chain_firing_path_missing` on every post-merge evaluation (observed on
|
|
1315
|
+
# the integration branch's push build and on the promotion pull request, with
|
|
1316
|
+
# nothing about the row changed). Expanded, round 2 is judged on its own bytes.
|
|
1317
|
+
new_case case-round-scope-merged-description-round
|
|
1318
|
+
git -C "$REPO" switch -q -c feature-round-description
|
|
1319
|
+
git -C "$REPO" branch --set-upstream-to=fixture-base feature-round-description >/dev/null 2>&1
|
|
1320
|
+
printf '\n- Never skip the fixture merged-description body rule for this gate.\n' >> "$REPO/skills/product-rd-workflow/SKILL.md"
|
|
1321
|
+
printf '| Fixture merged body round | `downstream-executor` | behavioral-evidence: RED-baseline; observed-failure: yes; result-class: failure; bank-evidence: downscoped:REFSCRIPTS-FIXTURE-NO-BANK; firing-path: file:skills/product-rd-workflow/SKILL.md#Never skip the fixture merged-description body rule | `updated` | `product-rd-workflow/SKILL.md` body round |\n' >> "$REGISTER"
|
|
1322
|
+
routing_surface_downscope
|
|
1323
|
+
commit_case "worktree round 1: body rule added to the entrypoint"
|
|
1324
|
+
perl -0pi -e 's/^(description: .+)$/$1 Fixture merged round-scope routing clause./m' "$REPO/skills/product-rd-workflow/SKILL.md"
|
|
1325
|
+
printf '| Fixture merged description round | `downstream-executor` | behavioral-evidence: RED-baseline; observed-failure: yes; result-class: failure; bank-evidence: downscoped:REFSCRIPTS-FIXTURE-NO-BANK; firing-path: file:skills/product-rd-workflow/SKILL.md#description | `updated` | `product-rd-workflow/SKILL.md` description-only round |\n' >> "$REGISTER"
|
|
1326
|
+
routing_surface_downscope
|
|
1327
|
+
commit_case "worktree round 2: description-only edit to the same owner"
|
|
1328
|
+
run_gate
|
|
1329
|
+
branch_rc="$rc"
|
|
1330
|
+
assert_rc "$rc" 0 "as a pull request, the description-only round keeps its locator after the body round"
|
|
1331
|
+
git -C "$REPO" switch -q case-round-scope-merged-description-round
|
|
1332
|
+
git -C "$REPO" merge -q --no-ff -m "Merge branch 'feature-round-description': two worktree rounds" feature-round-description
|
|
1333
|
+
run_gate
|
|
1334
|
+
assert_rc "$rc" "$branch_rc" "the merge of that branch is judged exactly as the branch was"
|
|
1335
|
+
assert_not_contains "impact_chain_firing_path_missing" "$out" "the description anchor binds in its own round after the merge too"
|
|
1336
|
+
|
|
1337
|
+
# Round scoping 14: expansion is bounded by what git can rebuild. A merge whose
|
|
1338
|
+
# tree is not the automatic merge of its parents carries content that came from
|
|
1339
|
+
# neither branch; expanding it would leave that content in no round, so such a
|
|
1340
|
+
# merge keeps the single boundary at the merge. The row-before-work branch from
|
|
1341
|
+
# round scoping 8, merged with an extra owner edit inside the merge commit, is
|
|
1342
|
+
# therefore judged as one span — which accepts it, as it always did, because that
|
|
1343
|
+
# span holds both the row and the work. The review-ledger binder refuses a
|
|
1344
|
+
# non-automatic merge on a promotion chain, so the hand-carried content is still
|
|
1345
|
+
# caught where promotion is decided; this fixture pins only that the expansion
|
|
1346
|
+
# does not silently widen past git's own reconstruction.
|
|
1347
|
+
new_case case-round-scope-hand-resolved-merge
|
|
1348
|
+
git -C "$REPO" switch -q -c feature-round-hand-resolved
|
|
1349
|
+
printf '| Fixture hand-resolved merged round | `downstream-executor` | behavioral-evidence: RED-baseline; observed-failure: yes; result-class: failure; bank-evidence: downscoped:REFSCRIPTS-FIXTURE-NO-BANK; firing-path: file:skills/platform-observability/SKILL.md#Never skip the fixture hand-resolved rule | `updated` | `platform-observability/SKILL.md` merged round |\n' >> "$REGISTER"
|
|
1350
|
+
routing_surface_downscope
|
|
1351
|
+
commit_case "worktree round: ledger append first"
|
|
1352
|
+
printf '\n- Never skip the fixture hand-resolved rule for this gate.\n' >> "$REPO/skills/platform-observability/SKILL.md"
|
|
1353
|
+
routing_surface_downscope
|
|
1354
|
+
commit_case "worktree round: owner work after the append"
|
|
1355
|
+
git -C "$REPO" switch -q case-round-scope-hand-resolved-merge
|
|
1356
|
+
git -C "$REPO" merge -q --no-ff --no-commit feature-round-hand-resolved >/dev/null 2>&1
|
|
1357
|
+
printf '\nFixture line carried by the merge commit itself.\n' >> "$REPO/skills/platform-observability/references/platform-observability-playbook.md"
|
|
1358
|
+
commit_case "Merge branch 'feature-round-hand-resolved' with a hand-carried edit"
|
|
1359
|
+
run_gate
|
|
1360
|
+
assert_rc "$rc" 0 "a merge git cannot rebuild from its parents keeps one boundary and is not expanded"
|
|
1361
|
+
|
|
1362
|
+
# Round scoping 15: the depth bound fails closed. Nine nested worktree rounds —
|
|
1363
|
+
# each branch cut from the previous one and merged back in turn, every merge the
|
|
1364
|
+
# automatic one — nest expansions past ROUND_WALK_MAX_DEPTH. The walk must stop
|
|
1365
|
+
# with its own diagnostic rather than fall back to a collapsed span, because a
|
|
1366
|
+
# fallback here would be the lenient verdict on exactly the history an author
|
|
1367
|
+
# could construct to reach it.
|
|
1368
|
+
new_case case-round-scope-nesting-depth
|
|
1369
|
+
prev=case-round-scope-nesting-depth
|
|
1370
|
+
for level in 1 2 3 4 5 6 7 8 9; do
|
|
1371
|
+
git -C "$REPO" switch -q -c "feature-nest-$level" "$prev"
|
|
1372
|
+
prev="feature-nest-$level"
|
|
1373
|
+
done
|
|
1374
|
+
printf '\n- Never skip the fixture nested rule for this gate.\n' >> "$REPO/skills/platform-observability/SKILL.md"
|
|
1375
|
+
printf '| Fixture nested round | `downstream-executor` | behavioral-evidence: RED-baseline; observed-failure: yes; result-class: failure; bank-evidence: downscoped:REFSCRIPTS-FIXTURE-NO-BANK; firing-path: file:skills/platform-observability/SKILL.md#Never skip the fixture nested rule | `updated` | `platform-observability/SKILL.md` nested round |\n' >> "$REGISTER"
|
|
1376
|
+
routing_surface_downscope
|
|
1377
|
+
commit_case "deepest worktree round: owner work with its row"
|
|
1378
|
+
for level in 9 8 7 6 5 4 3 2 1; do
|
|
1379
|
+
if [ "$level" -gt 1 ]; then outer="feature-nest-$((level - 1))"; else outer=case-round-scope-nesting-depth; fi
|
|
1380
|
+
git -C "$REPO" switch -q "$outer"
|
|
1381
|
+
git -C "$REPO" merge -q --no-ff -m "Merge branch 'feature-nest-$level'" "feature-nest-$level"
|
|
1382
|
+
done
|
|
1383
|
+
run_gate
|
|
1384
|
+
assert_rc "$rc" 1 "merges nested past the depth bound must fail closed, not fall back to a collapsed span"
|
|
1385
|
+
assert_contains "impact_chain_round_walk_too_deep" "$out" "the depth refusal names itself"
|
|
1386
|
+
|
|
1387
|
+
# Round scoping 16 and 17: git failures inside the expansion decision fail closed.
|
|
1388
|
+
# A `git` shim on PATH delegates everything to the real git except the one
|
|
1389
|
+
# subcommand under test, which it makes fail with an operational status. If the
|
|
1390
|
+
# gate swallowed that status it would silently take the collapsed-span path — the
|
|
1391
|
+
# lenient verdict — so both lookups must abort with impact_chain_git_failed.
|
|
1392
|
+
GIT_REAL="$(command -v git)"
|
|
1393
|
+
SHIM_DIR="$(mktemp -d "${TMPDIR:-/tmp}/icshim.XXXXXX")"
|
|
1394
|
+
make_git_shim() { # <subcommand-to-break> <exit-status>
|
|
1395
|
+
cat > "$SHIM_DIR/git" <<SHIM
|
|
1396
|
+
#!/usr/bin/env bash
|
|
1397
|
+
real="$GIT_REAL"
|
|
1398
|
+
args=("\$@")
|
|
1399
|
+
sub=""
|
|
1400
|
+
i=0
|
|
1401
|
+
while [ \$i -lt \${#args[@]} ]; do
|
|
1402
|
+
case "\${args[\$i]}" in
|
|
1403
|
+
-C) i=\$((i + 2)); continue ;;
|
|
1404
|
+
-*) i=\$((i + 1)); continue ;;
|
|
1405
|
+
*) sub="\${args[\$i]}"; break ;;
|
|
1406
|
+
esac
|
|
1407
|
+
done
|
|
1408
|
+
if [ "\$sub" = "$1" ]; then
|
|
1409
|
+
case "$1" in
|
|
1410
|
+
merge-base) case " \${args[*]} " in *" --is-ancestor "*|*" HEAD "*) exec "\$real" "\$@" ;; esac ;;
|
|
1411
|
+
esac
|
|
1412
|
+
echo "shim: $1 unavailable" >&2
|
|
1413
|
+
exit $2
|
|
1414
|
+
fi
|
|
1415
|
+
exec "\$real" "\$@"
|
|
1416
|
+
SHIM
|
|
1417
|
+
chmod +x "$SHIM_DIR/git"
|
|
1418
|
+
}
|
|
1419
|
+
git -C "$REPO" switch -q case-round-scope-merged-description-round
|
|
1420
|
+
make_git_shim merge-tree 129
|
|
1421
|
+
PATH="$SHIM_DIR:$PATH" run_gate
|
|
1422
|
+
assert_rc "$rc" 1 "an unavailable merge-tree must abort the walk, not skip the expansion"
|
|
1423
|
+
assert_contains "impact_chain_git_failed: git merge-tree --write-tree" "$out" "the refusal names the merge-tree lookup"
|
|
1424
|
+
assert_contains "exited 129" "$out" "the refusal carries the shim status, so it is this lookup and not another git read"
|
|
1425
|
+
make_git_shim merge-base 128
|
|
1426
|
+
PATH="$SHIM_DIR:$PATH" run_gate
|
|
1427
|
+
assert_rc "$rc" 1 "a failing fork-point lookup must abort the walk, not skip the expansion"
|
|
1428
|
+
assert_contains "impact_chain_git_failed: git merge-base" "$out" "the refusal names the fork-point lookup"
|
|
1429
|
+
assert_contains "exited 128" "$out" "the refusal carries the shim status, so it is this lookup (the only two-commit merge-base in the gate) and not the base resolution, which passes HEAD"
|
|
1430
|
+
rm -rf "$SHIM_DIR"
|
|
1431
|
+
|
|
1432
|
+
# Round scoping 18: a sync of the TARGET inside a branch is a sync on that
|
|
1433
|
+
# branch's own line. The target advances under a feature that already carries
|
|
1434
|
+
# owner work; the feature merges the target (automatically) and only then
|
|
1435
|
+
# appends its row. As a pull request the branch passes: the sync brings nothing
|
|
1436
|
+
# new and work plus row share a round. Promoted and judged against the older
|
|
1437
|
+
# base, that sync's second parent is not below the outer base — expanding it
|
|
1438
|
+
# would cut the branch at the sync and strand the work in a rowless span, so the
|
|
1439
|
+
# sync test is made against the line being walked, not the outer base alone.
|
|
1440
|
+
new_case case-round-scope-branch-synced-target
|
|
1441
|
+
git -C "$REPO" switch -q -c feature-synced-target
|
|
1442
|
+
git -C "$REPO" branch --set-upstream-to=case-round-scope-branch-synced-target feature-synced-target >/dev/null 2>&1
|
|
1443
|
+
git -C "$REPO" switch -q case-round-scope-branch-synced-target
|
|
1444
|
+
mkdir -p "$REPO/specs/fixture-refscripts"
|
|
1445
|
+
printf 'Fixture target note unrelated to any owner.\n' >> "$REPO/specs/fixture-refscripts/target-note.md"
|
|
1446
|
+
commit_case "target advances with an unrelated change"
|
|
1447
|
+
SYNC_TARGET_T="$(git -C "$REPO" rev-parse HEAD)"
|
|
1448
|
+
SYNC_TARGET_O="$(git -C "$REPO" rev-parse fixture-base)"
|
|
1449
|
+
git -C "$REPO" switch -q feature-synced-target
|
|
1450
|
+
printf '\n- Never skip the fixture synced-target rule for this gate.\n' >> "$REPO/skills/platform-observability/SKILL.md"
|
|
1451
|
+
routing_surface_downscope
|
|
1452
|
+
commit_case "worktree round: owner work before the sync"
|
|
1453
|
+
git -C "$REPO" merge -q --no-ff -m "Merge branch 'case-round-scope-branch-synced-target' into feature-synced-target" case-round-scope-branch-synced-target
|
|
1454
|
+
printf '| Fixture synced-target round | `downstream-executor` | behavioral-evidence: RED-baseline; observed-failure: yes; result-class: failure; bank-evidence: downscoped:REFSCRIPTS-FIXTURE-NO-BANK; firing-path: file:skills/platform-observability/SKILL.md#Never skip the fixture synced-target rule | `updated` | `platform-observability/SKILL.md` synced round |\n' >> "$REGISTER"
|
|
1455
|
+
routing_surface_downscope
|
|
1456
|
+
commit_case "worktree round: its ledger append after the sync"
|
|
1457
|
+
run_gate_with_base "$SYNC_TARGET_T"
|
|
1458
|
+
branch_rc="$rc"
|
|
1459
|
+
assert_rc "$rc" 0 "as a pull request (base: the advanced target), a branch that synced the target keeps its work and row in one round"
|
|
1460
|
+
git -C "$REPO" switch -q case-round-scope-branch-synced-target
|
|
1461
|
+
git -C "$REPO" merge -q --no-ff -m "Merge branch 'feature-synced-target': one worktree round" feature-synced-target
|
|
1462
|
+
run_gate_with_base "$SYNC_TARGET_O"
|
|
1463
|
+
assert_rc "$rc" "$branch_rc" "promoted against the older base (pinned: the commit the target advanced from), the target sync inside the branch is still a sync and the verdict is the branch's"
|
|
1464
|
+
assert_not_contains "impact_chain_gate_missing" "$out" "the branch's pre-sync work is not stranded by expanding the target sync"
|
|
1291
1465
|
|
|
1292
1466
|
# Round scoping 9: a TRANSIENT intermediate rename hop must not launder work.
|
|
1293
1467
|
# X renames to Y (declared), a later round substantively changes Y with no row,
|
|
@@ -1409,6 +1583,6 @@ assert_rc "$rc" 1 "a directory masquerading as SKILL.md must not read as a prese
|
|
|
1409
1583
|
assert_contains "platform-observability/SKILL.md" "$out" "the masqueraded owner must be named"
|
|
1410
1584
|
|
|
1411
1585
|
assert_rc "$full_check_runs" 1 "fixture suite must retain exactly one full checker wiring case"
|
|
1412
|
-
assert_rc "$gate_runs"
|
|
1586
|
+
assert_rc "$gate_runs" 97 "all remaining impact-chain fixtures must run the standalone gate"
|
|
1413
1587
|
|
|
1414
1588
|
echo "test_check_ccl_impact_chain_refscripts: ok"
|
|
@@ -24,6 +24,7 @@
|
|
|
24
24
|
# - test_check_ccl_register_pending_exclusion.sh
|
|
25
25
|
# - test_eval_routing_bank_grader_diagnostics.sh
|
|
26
26
|
# - test_eval_routing_bank_surface_binding.sh
|
|
27
|
+
# - test_eval_routing_bank_resolution.sh
|
|
27
28
|
# - test_eval_routing_prose_target.sh
|
|
28
29
|
# - test_validate_skill_credential_cwd.sh
|
|
29
30
|
# - test_validate_skill_root_depth.sh
|
|
@@ -31,6 +32,7 @@
|
|
|
31
32
|
# - test_uiux_delivery_contract.sh
|
|
32
33
|
# - test_uiux_loading_budget.sh
|
|
33
34
|
# - test_obligation_ledger.sh
|
|
35
|
+
# - test_reference_access_census.sh
|
|
34
36
|
# --full runs --fast plus the heavy full-checker regressions:
|
|
35
37
|
# - test_check_ccl_r0_status.sh
|
|
36
38
|
# - test_check_ccl_source_register_lifecycle.sh
|
|
@@ -107,6 +109,13 @@ fast_tests=(
|
|
|
107
109
|
# applied deletion mutation in a throwaway copy (spec 031 review disposition).
|
|
108
110
|
test_controlled_escalation_pins.sh
|
|
109
111
|
test_check_ccl_size_budget.sh
|
|
112
|
+
# Entrypoint guidance-form census (what counts as one rule, a prohibition, a
|
|
113
|
+
# named baseline failure): synthetic fixtures plus the shipped entrypoint,
|
|
114
|
+
# seconds. Pins the definitions, never any round's figures.
|
|
115
|
+
test_entrypoint_form_census.sh
|
|
116
|
+
# Usage census over synthetic transcripts (counts, privacy contract,
|
|
117
|
+
# unevaluated sentinel, ARG_MAX batching): no host logs, seconds.
|
|
118
|
+
test_reference_access_census.sh
|
|
110
119
|
test_check_ccl_skill_catalog.sh
|
|
111
120
|
test_check_ccl_parallel_stack_parity.sh
|
|
112
121
|
test_check_mr_target_freshness.sh
|
|
@@ -137,6 +146,7 @@ fast_tests=(
|
|
|
137
146
|
test_impact_chain_round_attribution.sh
|
|
138
147
|
test_eval_routing_bank_grader_diagnostics.sh
|
|
139
148
|
test_eval_routing_bank_surface_binding.sh
|
|
149
|
+
test_eval_routing_bank_resolution.sh
|
|
140
150
|
test_eval_routing_prose_target.sh
|
|
141
151
|
test_validate_skill_credential_cwd.sh
|
|
142
152
|
test_validate_skill_root_depth.sh
|
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# Regression for the entrypoint form census. The census is an instrument whose
|
|
3
|
+
# only value is that a later round recomputes the same quantity, so the cases
|
|
4
|
+
# below pin the definitions the script documents -- what counts as one rule,
|
|
5
|
+
# what counts as a prohibition, and what counts as a named baseline failure --
|
|
6
|
+
# rather than the figures of any particular entrypoint, which move every round.
|
|
7
|
+
set -uo pipefail
|
|
8
|
+
|
|
9
|
+
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd -P)"
|
|
10
|
+
CENSUS="$DIR/entrypoint_form_census.py"
|
|
11
|
+
WORK="$(mktemp -d "${TMPDIR:-/tmp}/entrypoint-form-census.XXXXXX")"
|
|
12
|
+
trap 'rm -rf "$WORK"' EXIT
|
|
13
|
+
|
|
14
|
+
fails=0
|
|
15
|
+
check() { if eval "$2"; then echo "ok - $1"; else echo "FAIL - $1"; fails=$((fails+1)); fi; }
|
|
16
|
+
|
|
17
|
+
[ -f "$CENSUS" ] || { echo "FAIL: census missing: $CENSUS" >&2; exit 1; }
|
|
18
|
+
|
|
19
|
+
field() { printf '%s\n' "$1" | sed -n "s/^$2=//p"; }
|
|
20
|
+
|
|
21
|
+
# One rule per top-level bullet: the sub-bullet and the continuation line belong
|
|
22
|
+
# to the rule above them, and the blank line between them does not close it.
|
|
23
|
+
# Getting this wrong inflates every per-rule figure the census reports.
|
|
24
|
+
# The prohibitions are placed in the continuation and the sub-bullet, never in
|
|
25
|
+
# the bullet's own first line: a rule COUNT cannot detect a parser that drops
|
|
26
|
+
# continuations, because a dropped continuation is still not a new top-level
|
|
27
|
+
# bullet. The token total is the quantity that moves when the defect is present,
|
|
28
|
+
# so that is what the case asserts.
|
|
29
|
+
cat >"$WORK/one-rule.md" <<'MD'
|
|
30
|
+
# Entry
|
|
31
|
+
|
|
32
|
+
## Core Rules
|
|
33
|
+
|
|
34
|
+
### A group
|
|
35
|
+
|
|
36
|
+
- A rule head with no imperative of its own.
|
|
37
|
+
|
|
38
|
+
A continuation line that must hold.
|
|
39
|
+
|
|
40
|
+
- A sub-bullet that must also hold.
|
|
41
|
+
|
|
42
|
+
## After
|
|
43
|
+
|
|
44
|
+
- A bullet outside Core Rules that must not be counted.
|
|
45
|
+
MD
|
|
46
|
+
out="$(python3 "$CENSUS" "$WORK/one-rule.md")"; rc=$?
|
|
47
|
+
check "sub-bullets and continuations separated by blank lines stay inside one rule" \
|
|
48
|
+
'[ "$rc" = 0 ] && [ "$(field "$out" rules)" = 1 ] && [ "$(field "$out" prohibitive_tokens)" = 2 ]'
|
|
49
|
+
# This case owns the section boundary alone: a parser that ran past `## After`
|
|
50
|
+
# would report two rules, so the rule count is the quantity that moves here.
|
|
51
|
+
check "the census stops at the next same-level heading" \
|
|
52
|
+
'[ "$(field "$out" rules)" = 1 ]'
|
|
53
|
+
|
|
54
|
+
# A prohibition with no named baseline failure is the diagnostic set; the same
|
|
55
|
+
# rule with its failure named must leave that set. The pair is the control: if
|
|
56
|
+
# the failure-shape vocabulary stopped matching, the first case would still pass
|
|
57
|
+
# and only the second would fail, which is what makes the pair informative.
|
|
58
|
+
cat >"$WORK/unanchored.md" <<'MD'
|
|
59
|
+
# Entry
|
|
60
|
+
|
|
61
|
+
## Core Rules
|
|
62
|
+
|
|
63
|
+
### A group
|
|
64
|
+
|
|
65
|
+
- A rule that must never be skipped.
|
|
66
|
+
MD
|
|
67
|
+
out="$(python3 "$CENSUS" "$WORK/unanchored.md")"
|
|
68
|
+
check "a prohibition with no named baseline failure is reported unanchored" \
|
|
69
|
+
'[ "$(field "$out" unanchored_prohibition_rules)" = 1 ] && [ "$(field "$out" rules_naming_baseline_failure)" = 0 ]'
|
|
70
|
+
|
|
71
|
+
cat >"$WORK/anchored.md" <<'MD'
|
|
72
|
+
# Entry
|
|
73
|
+
|
|
74
|
+
## Core Rules
|
|
75
|
+
|
|
76
|
+
### A group
|
|
77
|
+
|
|
78
|
+
- A rule that must never be skipped. Failure shape: the step is skipped under time pressure.
|
|
79
|
+
MD
|
|
80
|
+
out="$(python3 "$CENSUS" "$WORK/anchored.md")"
|
|
81
|
+
check "the same prohibition with its baseline failure named leaves the unanchored set" \
|
|
82
|
+
'[ "$(field "$out" unanchored_prohibition_rules)" = 0 ] && [ "$(field "$out" rules_naming_baseline_failure)" = 1 ]'
|
|
83
|
+
|
|
84
|
+
# A rule with no prohibitive token is not in the diagnostic set whether or not it
|
|
85
|
+
# names a failure: the set is prohibitions the form table has something to say
|
|
86
|
+
# about, not every rule that omits a rationale.
|
|
87
|
+
cat >"$WORK/no-prohibition.md" <<'MD'
|
|
88
|
+
# Entry
|
|
89
|
+
|
|
90
|
+
## Core Rules
|
|
91
|
+
|
|
92
|
+
### A group
|
|
93
|
+
|
|
94
|
+
- State the artifact's parts, in order.
|
|
95
|
+
MD
|
|
96
|
+
out="$(python3 "$CENSUS" "$WORK/no-prohibition.md")"
|
|
97
|
+
check "a rule carrying no prohibitive token is outside the diagnostic set" \
|
|
98
|
+
'[ "$(field "$out" prohibitive_tokens)" = 0 ] && [ "$(field "$out" unanchored_prohibition_rules)" = 0 ]'
|
|
99
|
+
|
|
100
|
+
# The capitalised spellings are emphasis in this package and are counted; a word
|
|
101
|
+
# that merely contains one of them is not a token.
|
|
102
|
+
cat >"$WORK/tokens.md" <<'MD'
|
|
103
|
+
# Entry
|
|
104
|
+
|
|
105
|
+
## Core Rules
|
|
106
|
+
|
|
107
|
+
### A group
|
|
108
|
+
|
|
109
|
+
- This MUST hold and NEVER lapses, and the mustard and nevertheless here are not tokens.
|
|
110
|
+
MD
|
|
111
|
+
out="$(python3 "$CENSUS" "$WORK/tokens.md")"
|
|
112
|
+
check "capitalised emphasis counts as prohibitive and a word merely containing one does not" \
|
|
113
|
+
'[ "$(field "$out" prohibitive_tokens)" = 2 ]'
|
|
114
|
+
|
|
115
|
+
# The alternation is leftmost and non-overlapping, so a phrase absorbs the words
|
|
116
|
+
# inside it. Two independent review lenses read the previous comment as promising
|
|
117
|
+
# the opposite, which is exactly the failure this case now pins: the documented
|
|
118
|
+
# counting rule and the reported figure have to be the same ruler.
|
|
119
|
+
cat >"$WORK/overlap.md" <<'MD'
|
|
120
|
+
# Entry
|
|
121
|
+
|
|
122
|
+
## Core Rules
|
|
123
|
+
|
|
124
|
+
### A group
|
|
125
|
+
|
|
126
|
+
- This must not be counted twice, and this cannot be either.
|
|
127
|
+
MD
|
|
128
|
+
out="$(python3 "$CENSUS" "$WORK/overlap.md")"
|
|
129
|
+
check "a phrase absorbs the word inside it: 'must not' is one token, not two" \
|
|
130
|
+
'[ "$(field "$out" prohibitive_tokens)" = 2 ]'
|
|
131
|
+
|
|
132
|
+
# An existing but empty Core Rules section is an error, not a zero-rule census:
|
|
133
|
+
# a section that lost its rules must not report as a clean sheet either.
|
|
134
|
+
cat >"$WORK/empty-core.md" <<'MD'
|
|
135
|
+
# Entry
|
|
136
|
+
|
|
137
|
+
## Core Rules
|
|
138
|
+
|
|
139
|
+
### A group
|
|
140
|
+
|
|
141
|
+
Prose with no top-level bullet.
|
|
142
|
+
|
|
143
|
+
## After
|
|
144
|
+
|
|
145
|
+
- A bullet outside Core Rules.
|
|
146
|
+
MD
|
|
147
|
+
out="$(python3 "$CENSUS" "$WORK/empty-core.md" 2>&1)"; rc=$?
|
|
148
|
+
check "an existing but empty Core Rules section is an error, never a zero-rule census" \
|
|
149
|
+
'[ "$rc" != 0 ] && case "$out" in *entrypoint_form_census_error*) true;; *) false;; esac'
|
|
150
|
+
|
|
151
|
+
# An entrypoint with no Core Rules section is an error, not a zero: reporting
|
|
152
|
+
# zero rules would let a renamed or moved section read as a clean sheet.
|
|
153
|
+
cat >"$WORK/no-core.md" <<'MD'
|
|
154
|
+
# Entry
|
|
155
|
+
|
|
156
|
+
## Something Else
|
|
157
|
+
|
|
158
|
+
- A bullet.
|
|
159
|
+
MD
|
|
160
|
+
out="$(python3 "$CENSUS" "$WORK/no-core.md" 2>&1)"; rc=$?
|
|
161
|
+
check "a file with no Core Rules heading is an error, never an empty census" \
|
|
162
|
+
'[ "$rc" != 0 ] && case "$out" in *entrypoint_form_census_error*) true;; *) false;; esac'
|
|
163
|
+
|
|
164
|
+
# The shipped entrypoint must parse, or the instrument silently stops measuring
|
|
165
|
+
# the only file it exists for.
|
|
166
|
+
out="$(python3 "$CENSUS" "$DIR/../SKILL.md")"; rc=$?
|
|
167
|
+
check "the shipped entrypoint parses and reports a non-zero rule count" \
|
|
168
|
+
'[ "$rc" = 0 ] && [ "$(field "$out" rules)" -gt 0 ] && case "$out" in *entrypoint_form_census_ok*) true;; *) false;; esac'
|
|
169
|
+
|
|
170
|
+
if [ "$fails" -ne 0 ]; then
|
|
171
|
+
echo "test_entrypoint_form_census: $fails failing case(s)"
|
|
172
|
+
exit 1
|
|
173
|
+
fi
|
|
174
|
+
echo "test_entrypoint_form_census: ok"
|