Skip to content

Commit 0bd1357

Browse files
feat(w21-24kl): batch 13 — RED tests for tk-to-ticket infrastructure migration
Write failing tests that assert post-migration state for infrastructure path references and hook behavioral guards (ticket transition, ticket create with parent). Tests are RED by design — they will turn GREEN when implementation tasks dso-1cje and dso-yv90 update the actual code. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent ef8bf74 commit 0bd1357

File tree

9 files changed

+510
-3
lines changed

9 files changed

+510
-3
lines changed

.test-index

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,10 @@ plugins/dso/docs/workflows/TEST-FAILURE-DISPATCH.md:plugins/dso/skills/sprint/pr
1919
plugins/dso/hooks/dispatchers/pre-bash.sh:tests/hooks/test-pre-bash-dispatcher.sh
2020
plugins/dso/hooks/dispatchers/pre-edit.sh:tests/hooks/test-pre-edit-write-dispatcher.sh
2121
plugins/dso/hooks/dispatchers/pre-write.sh:tests/hooks/test-pre-edit-write-dispatcher.sh
22-
plugins/dso/hooks/lib/review-gate-allowlist.conf:tests/hooks/test-review-gate-allowlist.sh
22+
plugins/dso/hooks/closed-parent-guard.sh:tests/hooks/test-pre-bash-functions-ticket-guards.sh [test_bug_close_guard_fires_on_ticket_transition_closed]
23+
plugins/dso/hooks/compute-diff-hash.sh:tests/hooks/test-compute-diff-hash-tickets-tracker.sh [test_allowlist_uses_tickets_tracker_path]
24+
plugins/dso/hooks/lib/pre-bash-functions.sh:tests/hooks/test-pre-bash-functions-ticket-guards.sh [test_bug_close_guard_fires_on_ticket_transition_closed]
25+
plugins/dso/hooks/lib/review-gate-allowlist.conf:tests/hooks/test-review-gate-allowlist.sh,tests/hooks/test-compute-diff-hash-tickets-tracker.sh [test_allowlist_uses_tickets_tracker_path]
2326
plugins/dso/scripts/check-local-env.sh:tests/scripts/test-check-local-env-portability.sh,tests/scripts/test-check-local-env-docker-skip.sh,tests/scripts/test-check-local-env-generic.sh
2427
plugins/dso/scripts/check-script-writes.py:tests/scripts/test-check-script-writes.sh
2528
plugins/dso/scripts/ci-generator.sh:tests/scripts/test-ci-generator.sh,tests/scripts/test-ci-generator-integration.sh

.tickets/.sync-state.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -449,8 +449,8 @@
449449
"last_synced": "2026-03-19T18:38:35Z",
450450
"local_hash": "14c516947a151a3db8bdec4010e2fd6e"
451451
},
452-
"last_pull_timestamp": "2026-03-23T06:54:56Z",
453-
"last_sync_commit": "7ddaa56794facea6c3314b3fa67f74721b7419ac",
452+
"last_pull_timestamp": "2026-03-23T15:44:58Z",
453+
"last_sync_commit": "ef8bf742e37513ef757843afacc84b13fadb5388",
454454
"w21-5cqr": {
455455
"jira_hash": "bce29d76f01c58613ee99cb1dd03920d",
456456
"jira_key": "DIG-61",

.tickets/dso-1cje.md

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
---
2+
id: dso-1cje
3+
status: open
4+
deps: [dso-5fbs]
5+
links: []
6+
created: 2026-03-23T15:19:45Z
7+
type: task
8+
priority: 1
9+
assignee: Joe Oakhart
10+
parent: w21-wbqz
11+
---
12+
# Update infrastructure path references (.tickets/ → .tickets-tracker/)
13+
14+
Update all storage path references from the old .tickets/ layout to the v3 .tickets-tracker/ layout in infrastructure files.
15+
16+
## Depends on
17+
dso-5fbs (RED test must exist before this task)
18+
19+
## Files to Edit
20+
21+
### plugins/dso/hooks/lib/review-gate-allowlist.conf
22+
- Change: .tickets/** → .tickets-tracker/**
23+
(This is the single source of truth for non-reviewable file patterns consumed by compute-diff-hash.sh and skip-review-check.sh)
24+
25+
### plugins/dso/hooks/compute-diff-hash.sh
26+
- Line 7 comment: '.tickets/ files' → '.tickets-tracker/ files'
27+
- Line 24 comment: "pathspecs like ':!app/.tickets/'" → "pathspecs like ':!app/.tickets-tracker/'"
28+
- Line 114 fallback array: ':!.tickets/**' → ':!.tickets-tracker/**'
29+
30+
### plugins/dso/scripts/merge-ticket-index.py
31+
- Module docstring line 3: 'merge-ticket-index.py — Custom Git merge driver for .tickets/.index.json' → '.tickets-tracker/.index.json'
32+
- Line 5: '.tickets/.index.json when two branches' → '.tickets-tracker/.index.json when two branches'
33+
- Line 23 MERGE_AUTO_RESOLVE: 'path=.tickets/.index.json' → 'path=.tickets-tracker/.index.json'
34+
- Line 35 .gitattributes example: '.tickets/.index.json merge=tickets-index-merge' → '.tickets-tracker/.index.json merge=tickets-index-merge'
35+
- Line 134 argparse help: 'Custom Git merge driver for .tickets/.index.json' → '.tickets-tracker/.index.json'
36+
- Line 170 log output: 'MERGE_AUTO_RESOLVE: path=.tickets/.index.json' → 'path=.tickets-tracker/.index.json'
37+
38+
### .gitattributes (CREATE new file at repo root)
39+
Content:
40+
# Ticket index auto-merge driver
41+
# Register per-clone: git config merge.tickets-index-merge.driver 'python3 plugins/dso/scripts/merge-ticket-index.py %O %A %B'
42+
.tickets-tracker/.index.json merge=tickets-index-merge
43+
44+
## Syntax Validation
45+
After editing, verify:
46+
bash -n plugins/dso/hooks/compute-diff-hash.sh
47+
python3 -m py_compile plugins/dso/scripts/merge-ticket-index.py
48+

.tickets/dso-5fbs.md

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
---
2+
id: dso-5fbs
3+
status: in_progress
4+
deps: []
5+
links: []
6+
created: 2026-03-23T15:19:28Z
7+
type: task
8+
priority: 1
9+
assignee: Joe Oakhart
10+
parent: w21-wbqz
11+
---
12+
# RED Test: write failing tests for tk→ticket infrastructure and hook guard updates
13+
14+
TDD RED task for story w21-wbqz. Write failing tests that assert the post-migration state BEFORE the implementation tasks run.
15+
16+
## TDD Requirement
17+
Tests must FAIL (RED) before T2/T3 changes are applied. They will become GREEN after T2 and T3 complete.
18+
19+
## Files to Create
20+
1. tests/hooks/test-compute-diff-hash-tickets-tracker.sh
21+
- test_allowlist_uses_tickets_tracker_path: assert review-gate-allowlist.conf contains .tickets-tracker/** (not .tickets/**)
22+
- test_compute_diff_hash_fallback_uses_tickets_tracker_path: assert compute-diff-hash.sh fallback pathspec contains :!.tickets-tracker/** (not :!.tickets/**)
23+
24+
2. tests/hooks/test-pre-bash-functions-ticket-guards.sh
25+
- test_bug_close_guard_fires_on_ticket_transition_closed: source pre-bash-functions.sh, call hook_bug_close_guard with JSON input {"tool_name":"Bash","tool_input":{"command":"ticket transition abc1-def2 open closed --reason=fixed"}} — assert exit code 2 (blocked) or non-zero output indicating the guard fires
26+
- test_bug_close_guard_no_false_positive_on_ticket_show: hook_bug_close_guard with command 'ticket show abc1-def2' — assert exit 0 (not blocked)
27+
- test_closed_parent_guard_fires_on_ticket_create_parent: invoke closed-parent-guard.sh directly via echo JSON | bash closed-parent-guard.sh — with command 'ticket create "title" --parent abc1-def2' where parent is closed — assert exit 2
28+
- test_closed_parent_guard_does_not_fire_on_tk_sync: command 'tk sync' — assert exit 0 (tk sync is still valid)
29+
30+
## Fuzzy-Match Verification
31+
- compute-diff-hash.sh normalized: computediffhashsh → test-compute-diff-hash-tickets-tracker.sh normalized: testcomputediffhashticketstracksh — 'computediffhash' is substring ✓
32+
- pre-bash-functions.sh normalized: prebashfunctionssh → test-pre-bash-functions-ticket-guards.sh normalized: testprebashfunctionsticketguardssh — 'prebashfunctions' is substring ✓
33+
34+
## Test Structure Pattern
35+
Follow the existing pattern in tests/hooks/test-check-validation-failures.sh:
36+
run_hook() { echo "$1" | bash "$HOOK" > /dev/null 2>/dev/null || exit_code=$?; echo $exit_code; }
37+
For hook_bug_close_guard tests, source pre-bash-functions.sh and call the function directly.
38+
For closed-parent-guard.sh tests, invoke as standalone script with JSON piped to stdin.
39+
40+
## ACCEPTANCE CRITERIA
41+
42+
- [ ] `tests/hooks/test-compute-diff-hash-tickets-tracker.sh` exists
43+
Verify: test -f tests/hooks/test-compute-diff-hash-tickets-tracker.sh
44+
- [ ] `tests/hooks/test-pre-bash-functions-ticket-guards.sh` exists
45+
Verify: test -f tests/hooks/test-pre-bash-functions-ticket-guards.sh
46+
- [ ] Test file 1 contains at least 2 test functions
47+
Verify: grep -c "^test_" tests/hooks/test-compute-diff-hash-tickets-tracker.sh | awk '{exit ($1 < 2)}'
48+
- [ ] Test file 2 contains at least 4 test functions
49+
Verify: grep -c "^test_" tests/hooks/test-pre-bash-functions-ticket-guards.sh | awk '{exit ($1 < 4)}'
50+
- [ ] Tests are RED (fail before T2/T3 implementation)
51+
Verify: bash tests/hooks/test-compute-diff-hash-tickets-tracker.sh 2>&1 | grep -q "FAIL\|fail"
52+
- [ ] .test-index entries added for both test files with RED markers
53+
Verify: grep -q "test-compute-diff-hash-tickets-tracker" .test-index && grep -q "test-pre-bash-functions-ticket-guards" .test-index
54+
55+
56+
## Notes
57+
58+
**2026-03-23T15:26:29Z**
59+
60+
CHECKPOINT 1/6: Task context loaded ✓
61+
62+
**2026-03-23T15:27:14Z**
63+
64+
CHECKPOINT 2/6: Code patterns understood ✓
65+
66+
**2026-03-23T15:29:17Z**
67+
68+
CHECKPOINT 3/6: Tests written ✓
69+
70+
**2026-03-23T15:31:15Z**
71+
72+
CHECKPOINT 4/6: Implementation complete ✓
73+
74+
**2026-03-23T15:35:48Z**
75+
76+
CHECKPOINT 5/6: Validation passed ✓ — both test files are syntactically valid bash, run cleanly, GREEN tests pass, RED tests fail as expected; all 6 AC criteria verified
77+
78+
**2026-03-23T15:35:52Z**
79+
80+
CHECKPOINT 6/6: Done ✓ — all 6 AC criteria pass: files exist, have correct test count, are RED, .test-index entries added with RED markers

.tickets/dso-hu14.md

Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
---
2+
id: dso-hu14
3+
status: open
4+
deps: [dso-1cje, dso-yv90]
5+
links: []
6+
created: 2026-03-23T15:20:45Z
7+
type: task
8+
priority: 1
9+
assignee: Joe Oakhart
10+
parent: w21-wbqz
11+
---
12+
# Update documentation and CLAUDE.md prose with ticket CLI references
13+
14+
Update all skill files, documentation files, and CLAUDE.md to use ticket CLI commands instead of tk commands where ticket equivalents exist. The tk wrapper remains for Jira sync and tk-only commands.
15+
16+
## test-exempt justification
17+
test-exempt: (1) no conditional logic — pure prose/text replacement; (2) any test written would be a change-detector test asserting strings exist in files, not behavioral tests; (3) documentation-boundary-only with no business logic.
18+
19+
## Depends on
20+
dso-1cje (infrastructure updates must be complete)
21+
dso-yv90 (hook behavioral guards must be finalized)
22+
23+
## Enumerated Replacement Patterns
24+
Apply these specific patterns (NOT blanket s/tk/ticket/g):
25+
26+
REPLACE:
27+
tk show <id> → ticket show <id>
28+
tk create → ticket create
29+
tk list → ticket list
30+
tk dep tree <id> → ticket deps <id>
31+
tk status <id> <s> → ticket transition <id> <current> <s>
32+
tk close <id> → ticket transition <id> open closed
33+
tk open <id> → ticket transition <id> closed open
34+
tk add-note <id> → ticket comment <id>
35+
tk comment <id> → ticket comment <id>
36+
tk transition <id> → ticket transition <id>
37+
38+
KEEP AS-IS (tk wrapper only):
39+
tk sync → tk sync (Jira bridge; no ticket equivalent)
40+
tk ready → tk ready (tk-wrapper query; no ticket equivalent)
41+
tk blocked → tk blocked (tk-wrapper query; no ticket equivalent)
42+
tk dep <child> <p> → (handled in T3 as closed-parent-guard context; in docs: ticket link)
43+
44+
## Files to Update
45+
46+
### CLAUDE.md (8 tk references)
47+
- Line 52 quick reference table: 'tk sync' — KEEP (Jira bridge)
48+
- Line 60 prose: 'the higher-level tk wrapper adds Jira sync' — KEEP (accurate description)
49+
- Line 61 prose: 'Epic closure enforcement: tk close <epic-id>' → 'ticket transition <epic-id> open closed'
50+
- Lines 127/128 Always Do These: 'tk sync', 'tk write commands' — KEEP (timeout guidance for tk sync)
51+
- Line 142 Plan Mode: 'Create tk epic' → 'Create ticket epic' (or just 'Create epic' — the command is 'tk create ... -t epic' currently; update to 'ticket create ...')
52+
- Line 160 Session close: 'not the tk Session Close Protocol' — KEEP if this refers to a known legacy doc
53+
54+
### plugins/dso/skills/ (45 files)
55+
Apply enumerated replacement patterns above. Key files:
56+
- plugins/dso/skills/sprint/SKILL.md: many tk show/create/status/close/ready/dep-tree refs
57+
- plugins/dso/skills/fix-bug/SKILL.md
58+
- plugins/dso/skills/implementation-plan/SKILL.md (already reviewed — apply patterns)
59+
- plugins/dso/skills/preplanning/SKILL.md
60+
- All other SKILL.md and prompt files with tk refs
61+
62+
### plugins/dso/docs/ (23 files)
63+
Apply enumerated replacement patterns. Key files:
64+
- plugins/dso/docs/workflows/COMMIT-WORKFLOW.md: 'tk add-note' → 'ticket comment'
65+
- plugins/dso/docs/workflows/REVIEW-WORKFLOW.md: same
66+
- plugins/dso/docs/ticket-cli-reference.md: update any tk show/create examples that should use ticket CLI
67+
- plugins/dso/docs/WORKTREE-GUIDE.md
68+
- plugins/dso/docs/INSTALL.md
69+
- plugins/dso/docs/SUB-AGENT-BOUNDARIES.md
70+
71+
## Post-Update Verification (required ACs — verification gate)
72+
After all documentation updates complete:
73+
74+
1. Enumerate-patterns grep (must return NO matches):
75+
grep -rn '\btk show\b\|\btk create\b\|\btk close\b\|\btk add-note\b\|\btk status\b\|\btk transition\b\|\btk dep tree\b' plugins/dso/skills/ plugins/dso/docs/ CLAUDE.md
76+
77+
2. Remaining tk refs grep (all surviving hits must be tk-wrapper-only commands):
78+
grep -rn '\btk\b' plugins/dso/skills/ plugins/dso/docs/ CLAUDE.md plugins/dso/hooks/
79+
Verify all hits are: tk sync, tk ready, tk blocked, tk dep (as legacy reference), or prose descriptions of the tk wrapper
80+
81+
3. Syntax validation on all modified .sh files:
82+
bash -n plugins/dso/hooks/lib/pre-bash-functions.sh
83+
bash -n plugins/dso/hooks/closed-parent-guard.sh
84+
bash -n plugins/dso/hooks/bug-close-guard.sh
85+
bash -n plugins/dso/hooks/compute-diff-hash.sh
86+
bash -n plugins/dso/scripts/merge-to-main.sh
87+
88+
4. Python syntax validation:
89+
python3 -m py_compile plugins/dso/scripts/merge-ticket-index.py
90+
91+
5. Test suite:
92+
bash tests/run-all.sh
93+

.tickets/dso-yv90.md

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
---
2+
id: dso-yv90
3+
status: open
4+
deps: [dso-5fbs]
5+
links: []
6+
created: 2026-03-23T15:20:14Z
7+
type: task
8+
priority: 1
9+
assignee: Joe Oakhart
10+
parent: w21-wbqz
11+
---
12+
# Update hook behavioral guards (tk → ticket command detection)
13+
14+
Update all hook files that contain behavioral guards detecting tk commands to detect ticket commands instead. The tk wrapper remains valid for Jira sync (tk sync).
15+
16+
## Depends on
17+
dso-5fbs (RED test must exist before this task)
18+
19+
## Files to Edit
20+
21+
### plugins/dso/hooks/lib/pre-bash-functions.sh
22+
- Line 152: ${CREATE_CMD:-tk create} → ${CREATE_CMD:-ticket create}
23+
- Line 277 error message: 'tk create "Fix <check> failure"' → 'ticket create "Fix <check> failure"'
24+
- Line 385 error message: 'tk commands work from any directory' → 'ticket commands work from any directory'
25+
- Lines 507-508 early-exit guard: if [[ "$INPUT" != *"tk"* ]] → if [[ "$INPUT" != *"ticket "* ]]
26+
(More specific than old guard; avoids false positives on unrelated commands containing 'ticket' as English word since we check for 'ticket ' with trailing space)
27+
- Lines 518-519 bug close only path: update comment 'Only act on `tk close` commands' → 'Only act on `ticket transition ... closed` commands'
28+
- Lines 518-519 regex: tk[[:space:]]+close[[:space:]]+ → ticket[[:space:]]+transition[[:space:]]+
29+
- Line 865 allowlist: keep "$FIRST_TOKEN" == "tk" (tk sync still valid); comment: 'ticket CLI patterns (ticket *, tk *)' — keep both
30+
- Line 821 comment: 'go through ticket CLI commands (ticket *, tk *)' — keep (tk still valid for Jira sync)
31+
- Line 830 comment: 'Allowlist: ticket CLI scripts (ticket, tk)' — keep
32+
33+
### plugins/dso/hooks/closed-parent-guard.sh
34+
- Line 6-7 comments: update 'tk create ... --parent <id>' → 'ticket create ... --parent <id>'
35+
- Line 33-34 usage examples: 'tk create' → 'ticket create', 'tk dep <child-id> <parent-id>' → 'ticket link <child-id> <parent-id> depends_on'
36+
- Line 37 regex: tk[[:space:]]+create[[:space:]].*--parent → ticket[[:space:]]+create[[:space:]].*--parent
37+
- Line 39 regex: tk[[:space:]]+dep[[:space:]]+ → ticket[[:space:]]+link[[:space:]]+
38+
Note: ticket CLI uses 'ticket link <id1> <id2> <relation>' not 'ticket dep'
39+
- Line 40 comment: 'For `tk dep <child-id> <parent-id>`' → 'For `ticket link <child-id> <parent-id>`'
40+
- Line 71 error message: 'tk status ${PARENT_ID} open' → 'ticket transition ${PARENT_ID} closed open'
41+
42+
### plugins/dso/hooks/bug-close-guard.sh
43+
- Comment line 9: 'Only fires on `tk close` commands' → 'Only fires on `ticket transition ... closed` commands'
44+
- Update any tk close detection in the script body
45+
46+
### plugins/dso/hooks/lib/deps.sh
47+
- Line 618 comment: '.tickets/ — ticket files managed by the tk CLI' → '.tickets-tracker/ — ticket files managed by the ticket CLI'
48+
49+
### plugins/dso/hooks/check-validation-failures.sh
50+
- Line 75 comment: 'TICKETS_DIR env var overrides ticket storage location (consistent with tk CLI)' → '(consistent with ticket CLI)'
51+
- Line 179 comment: 'Format: "Tracked: mypy (tk-789)"' — update tk-789 example ID if it refers to old tk system
52+
53+
### plugins/dso/scripts/merge-to-main.sh
54+
- Line 8 comment: 'tk (the issue tracker) uses file-per-issue storage under .tickets/' → update to reflect v3 system
55+
- Line 898 comment: 'Exclude the configured tickets directory — ticket files are created by tk' → 'created by ticket CLI'
56+
- Line 912 comment: 'tk commands (close, create, add-note) write .tickets/ files' → 'ticket commands write .tickets-tracker/ files'
57+
58+
## Syntax Validation
59+
After editing all files:
60+
bash -n plugins/dso/hooks/lib/pre-bash-functions.sh
61+
bash -n plugins/dso/hooks/closed-parent-guard.sh
62+
bash -n plugins/dso/hooks/bug-close-guard.sh
63+
bash -n plugins/dso/hooks/lib/deps.sh
64+
bash -n plugins/dso/hooks/check-validation-failures.sh
65+
bash -n plugins/dso/scripts/merge-to-main.sh
66+

.tickets/w21-wbqz.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,3 +46,7 @@ parent: w21-24kl
4646
[Adversarial review] Additional done definitions:
4747
- Enumerated patterns must include .tickets/ path references in review-gate-allowlist.conf and compute-diff-hash.sh (not just tk command references) — update to v3 storage paths or the review gate will block/miss v3 ticket writes
4848
- .gitattributes merge driver entry and merge-ticket-index.py must be updated or removed — stale merge infrastructure causes worktree workflow failures
49+
50+
**2026-03-23T15:07:51Z**
51+
52+
COMPLEXITY_CLASSIFICATION: COMPLEX
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
#!/usr/bin/env bash
2+
# tests/hooks/test-compute-diff-hash-tickets-tracker.sh
3+
# TDD RED tests for .tickets-tracker/ path migration.
4+
#
5+
# These tests assert the POST-MIGRATION state:
6+
# - review-gate-allowlist.conf should contain .tickets-tracker/** (not .tickets/**)
7+
# - compute-diff-hash.sh fallback pathspecs should use :!.tickets-tracker/** (not :!.tickets/**)
8+
#
9+
# These tests are expected to FAIL (RED) against the current pre-migration code.
10+
# They will become GREEN after dso-1cje updates the infrastructure path references.
11+
#
12+
# Tests:
13+
# test_allowlist_uses_tickets_tracker_path
14+
# test_compute_diff_hash_fallback_uses_tickets_tracker_path
15+
16+
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
17+
PLUGIN_ROOT="$(cd "$SCRIPT_DIR/../.." && pwd)"
18+
DSO_PLUGIN_DIR="$PLUGIN_ROOT/plugins/dso"
19+
20+
source "$PLUGIN_ROOT/tests/lib/assert.sh"
21+
22+
ALLOWLIST="$DSO_PLUGIN_DIR/hooks/lib/review-gate-allowlist.conf"
23+
COMPUTE_DIFF_HASH="$DSO_PLUGIN_DIR/hooks/compute-diff-hash.sh"
24+
25+
# ============================================================
26+
# test_allowlist_uses_tickets_tracker_path
27+
# review-gate-allowlist.conf must contain .tickets-tracker/**
28+
# (post-migration: old .tickets/** entry replaced with .tickets-tracker/**)
29+
# ============================================================
30+
test_allowlist_uses_tickets_tracker_path() {
31+
local match
32+
match=$(grep -c '\.tickets-tracker/\*\*' "$ALLOWLIST" 2>/dev/null || true)
33+
match="${match:-0}"
34+
assert_eq "test_allowlist_uses_tickets_tracker_path" "true" \
35+
"$( [[ "${match}" -ge 1 ]] && echo true || echo false )"
36+
}
37+
38+
# ============================================================
39+
# test_compute_diff_hash_fallback_uses_tickets_tracker_path
40+
# The fallback pathspecs in compute-diff-hash.sh must contain
41+
# ':!.tickets-tracker/**' (not the old ':!.tickets/**')
42+
# ============================================================
43+
test_compute_diff_hash_fallback_uses_tickets_tracker_path() {
44+
local match
45+
match=$(grep -c "':!\.tickets-tracker/\*\*'" "$COMPUTE_DIFF_HASH" 2>/dev/null || true)
46+
match="${match:-0}"
47+
assert_eq "test_compute_diff_hash_fallback_uses_tickets_tracker_path" "true" \
48+
"$( [[ "${match}" -ge 1 ]] && echo true || echo false )"
49+
}
50+
51+
# Run all tests
52+
test_allowlist_uses_tickets_tracker_path
53+
test_compute_diff_hash_fallback_uses_tickets_tracker_path
54+
55+
print_summary

0 commit comments

Comments
 (0)