66# During the sprint implementing the two-layer review gate (epic gju5), we
77# repeatedly hit a failure pattern (bug 50is):
88# 1. Developer makes code changes and gets a valid review
9- # 2. A git merge main is run, creating conflicts in .tickets-tracker/ticket-data .json
9+ # 2. A git merge main is run, creating conflicts in .tickets-tracker/test-abc1/001-create .json
1010# 3. Developer resolves the conflict and stages only .tickets/ files
1111# 4. The pre-commit hook BLOCKS with "diff hash mismatch" because
1212# the review-status diff_hash was stale (computed before the merge)
@@ -85,12 +85,12 @@ make_two_branch_repo() {
8585 git -C " $tmpdir " config user.name " Test"
8686
8787 # Create initial commit on main
88- mkdir -p " $tmpdir /.tickets-tracker"
88+ mkdir -p " $tmpdir /.tickets-tracker/test-abc1 "
8989 cat > " $tmpdir /mycode.py" << 'PYEOF '
9090def compute(x):
9191 return x * 2
9292PYEOF
93- cat > " $tmpdir /.tickets-tracker/ticket-data .json" << 'JSONEOF '
93+ cat > " $tmpdir /.tickets-tracker/test-abc1/001-create .json" << 'JSONEOF '
9494{"version": 1, "tickets": []}
9595JSONEOF
9696
@@ -112,12 +112,12 @@ PYEOF
112112 git -C " $tmpdir " add " mycode.py"
113113 git -C " $tmpdir " commit -q -m " feat: add new_feature"
114114
115- # Go back to main and make a conflicting change to .tickets-tracker/ticket-data .json
115+ # Go back to main and make a conflicting change to .tickets-tracker/test-abc1/001-create .json
116116 git -C " $tmpdir " checkout -q main
117- cat > " $tmpdir /.tickets-tracker/ticket-data .json" << 'JSONEOF '
117+ cat > " $tmpdir /.tickets-tracker/test-abc1/001-create .json" << 'JSONEOF '
118118{"version": 1, "tickets": ["lockpick-abc1"]}
119119JSONEOF
120- git -C " $tmpdir " add " .tickets-tracker/ticket-data .json"
120+ git -C " $tmpdir " add " .tickets-tracker/test-abc1/001-create .json"
121121 git -C " $tmpdir " commit -q -m " chore: update ticket index on main"
122122
123123 # Return to feature branch (the branch the developer is working on)
@@ -191,9 +191,9 @@ write_valid_review_status() {
191191# 1. Developer stages code changes (mycode.py) on feature branch
192192# 2. A valid review is recorded for that staged diff hash
193193# 3. git merge main --no-commit creates MERGE_HEAD (merge in progress)
194- # The conflict is ONLY in .tickets-tracker/ticket-data .json (allowlisted file)
194+ # The conflict is ONLY in .tickets-tracker/test-abc1/001-create .json (allowlisted file)
195195# 4. Developer resolves by accepting the main version of the index
196- # 5. Developer stages ONLY the resolved .tickets-tracker/ticket-data .json
196+ # 5. Developer stages ONLY the resolved .tickets-tracker/test-abc1/001-create .json
197197# 6. pre-commit hook runs: ALL staged files are allowlisted (.tickets/)
198198# → Should exit 0 WITHOUT checking the (now-stale) diff hash
199199#
@@ -222,17 +222,17 @@ test_ticket_only_merge_conflict_commit_passes() {
222222 #
223223 # Simulate git merge --no-commit (which would be interrupted by conflict):
224224 # Manually create MERGE_HEAD (pointing to main's HEAD) and stage the
225- # conflict resolution of .tickets-tracker/ticket-data .json only.
225+ # conflict resolution of .tickets-tracker/test-abc1/001-create .json only.
226226 local main_sha
227227 main_sha=$( git -C " $_repo " rev-parse main)
228228 echo " $main_sha " > " $_repo /.git/MERGE_HEAD"
229229
230230 # Step 4: Resolve the conflict — stage ONLY the ticket index (allowlisted)
231231 # Write the resolved version of the conflicted file
232- cat > " $_repo /.tickets-tracker/ticket-data .json" << 'JSONEOF '
232+ cat > " $_repo /.tickets-tracker/test-abc1/001-create .json" << 'JSONEOF '
233233{"version": 1, "tickets": ["lockpick-abc1"]}
234234JSONEOF
235- git -C " $_repo " add " .tickets-tracker/ticket-data .json"
235+ git -C " $_repo " add " .tickets-tracker/test-abc1/001-create .json"
236236
237237 # Sanity check: MERGE_HEAD is present (in-progress merge state)
238238 local merge_head_present=0
@@ -302,11 +302,11 @@ def another_from_main(z):
302302PYEOF
303303 git -C " $_repo " add " mycode.py"
304304
305- # - .tickets-tracker/ticket-data .json: merge resolution (ticket metadata)
306- cat > " $_repo /.tickets-tracker/ticket-data .json" << 'JSONEOF '
305+ # - .tickets-tracker/test-abc1/001-create .json: merge resolution (ticket metadata)
306+ cat > " $_repo /.tickets-tracker/test-abc1/001-create .json" << 'JSONEOF '
307307{"version": 1, "tickets": ["lockpick-abc1", "lockpick-abc2"]}
308308JSONEOF
309- git -C " $_repo " add " .tickets-tracker/ticket-data .json"
309+ git -C " $_repo " add " .tickets-tracker/test-abc1/001-create .json"
310310
311311 # Sanity check: both code and ticket files are staged
312312 local staged_files
@@ -364,11 +364,11 @@ test_multiple_sequential_merge_conflicts_pass() {
364364 main_sha=$( git -C " $_repo " rev-parse main)
365365 echo " $main_sha " > " $_repo /.git/MERGE_HEAD"
366366
367- # Resolve: update .tickets-tracker/ticket-data .json (allowlisted)
368- cat > " $_repo /.tickets-tracker/ticket-data .json" << 'JSONEOF '
367+ # Resolve: update .tickets-tracker/test-abc1/001-create .json (allowlisted)
368+ cat > " $_repo /.tickets-tracker/test-abc1/001-create .json" << 'JSONEOF '
369369{"version": 1, "tickets": ["lockpick-abc1"]}
370370JSONEOF
371- git -C " $_repo " add " .tickets-tracker/ticket-data .json"
371+ git -C " $_repo " add " .tickets-tracker/test-abc1/001-create .json"
372372
373373 # First commit after merge conflict: should pass (ticket-only staged)
374374 local exit_code_1
@@ -387,10 +387,10 @@ JSONEOF
387387 echo " $main_sha_2 " > " $_repo /.git/MERGE_HEAD"
388388
389389 # Resolve: another ticket index update (allowlisted)
390- cat > " $_repo /.tickets-tracker/ticket-data .json" << 'JSONEOF '
390+ cat > " $_repo /.tickets-tracker/test-abc1/001-create .json" << 'JSONEOF '
391391{"version": 1, "tickets": ["lockpick-abc1", "lockpick-abc2"]}
392392JSONEOF
393- git -C " $_repo " add " .tickets-tracker/ticket-data .json"
393+ git -C " $_repo " add " .tickets-tracker/test-abc1/001-create .json"
394394
395395 # Second commit after merge conflict: should also pass (ticket-only staged)
396396 local exit_code_2
@@ -436,10 +436,10 @@ test_allowlist_gate_fires_before_stale_hash_check() {
436436 echo " $main_sha " > " $_repo /.git/MERGE_HEAD"
437437
438438 # Stage ONLY an allowlisted file (the merge conflict resolution for tickets)
439- cat > " $_repo /.tickets-tracker/ticket-data .json" << 'JSONEOF '
439+ cat > " $_repo /.tickets-tracker/test-abc1/001-create .json" << 'JSONEOF '
440440{"version": 1, "tickets": ["lockpick-abc1"]}
441441JSONEOF
442- git -C " $_repo " add " .tickets-tracker/ticket-data .json"
442+ git -C " $_repo " add " .tickets-tracker/test-abc1/001-create .json"
443443
444444 # Sanity check: the stale hash is definitely different from the current hash
445445 local current_hash
0 commit comments