Commit 02c260c
Merge remote-tracking branch 'origin/main' into worktree-20260512-190648 (#112)
* fix(merge-to-main-pr): push version-bump commit to origin/main after PR merge (3024-d618)
_phase_version_bump in PR mode was using git commit --amend, creating a
divergent SHA that can't be fast-forward pushed. _phase_push was also
never called, so the version bump never reached origin/main.
Fix: set MERGE_TO_MAIN_PR_MODE=1 before calling _phase_version_bump so
it makes a new commit (not amend), then call _phase_push to push it.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* fix(merge-to-main-pr): guard MAIN_REPO branch + fix fetch refspec in test (coderabbit)
- Ensure MAIN_REPO is on 'main' before _phase_version_bump + _phase_push so
git push targets the correct ref (coderabbit PRRT_kwDORoc4TM6BoDBB)
- Change `git fetch origin main` to `git fetch origin main:refs/remotes/origin/main`
in t_pr_version_bump_pushed_to_origin to prevent stale tracking-ref flakiness
(coderabbit PRRT_kwDORoc4TM6BoDBH)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* fix(merge-to-main-pr): remove DSO_MECHANICAL_AMEND from new-commit path (coderabbit PRRT_kwDORoc4TM6BoET5)
DSO_MECHANICAL_AMEND=1 is documented and sentinel-guarded as amend-only.
The PR-mode new commit (chore: bump version) only stages plugin.json, which
is allowlisted in review-gate-allowlist.conf, so no bypass is needed.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* fix(merge-to-main-pr): address 4 coderabbit findings on version-bump path
BoKhK: avoid ${_vf} interpolation into python3 -c source — pass via _VF env var
BoLgH: fast-forward local main to origin/main after branch switch before push
BoLgc: randomize test branch name with $$ to prevent tmp-path collisions
BoIjn: add t_pr_version_bump_main_repo_not_on_main to cover branch-switch path
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* fix(merge-to-main-pr): address llm-review cycle-1 findings (PR #111)
Critical: add _vf non-empty guard + explicit file close in Python version
extraction one-liner; _vf is defined at line 598 of _phase_version_bump
(REVIEW-DEFENSE added for false-positive "undefined variable" claim)
Important: fail-loudly on MAIN_REPO checkout failure (was silently || true)
which could leave version bump running on wrong branch
Important: add commit-message assertions to t_pr_version_bump_* tests so
the "vunknown" fallback defect is caught by tests
REVIEW-DEFENSE: _phase_push called-twice finding is false positive —
merge-to-main-direct.sh sourced with MERGE_TO_MAIN_DIRECT_LIB=1,
skipping top-level lifecycle; _phase_push called exactly once
REVIEW-DEFENSE: RED marker removal for 0a63-754f is correct —
t_pr_version_bump_pushed_to_origin is the implementation the marker awaited
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* fix(batch-2): resolve 5 bugs across sprint, ticket-cli, review-gate, and onboarding
- d2e4-3db7: sprint Phase F now checks SPRINT_MODE and routes ci-pr to merge-to-main.sh instead of direct merge-story-branch.sh
- 277c-8f37: sprint-story-review.yml adds actionlint/shellcheck/lint-python gate jobs with needs: on the review job
- 493a-dfe5: ticket show resolves friendly aliases via full resolve_ticket_id pipeline (was using short-hex-only _ticketlib_resolve_short_id)
- 7ddc-1ae7: review-gate-allowlist.conf adds bootstrap/onboarding config artifact patterns so first commit doesn't require review
- 6b04-9b62: onboarding SKILL.md adds git add -A after git checkout - to re-stage files cleared by orphan branch checkout
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* fix(277c-8f37): replace deprecated fail_on_error with fail_level in actionlint step
reviewdog/action-actionlint@v1 deprecated fail_on_error; actionlint itself
flagged this during PR CI. Replacing with fail_level: error per current API.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* fix(7ddc-1ae7): restore clean .tickets-tracker/** pattern in allowlist
Inline # tickets-boundary-ok suffix broke _load_allowlist_patterns which
does not strip trailing comments — the full line became the glob, failing
to match .tickets-tracker/ paths. Fix: restore clean pattern and add
review-gate-allowlist.conf to check-tickets-boundary-allowlist.conf.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* fix(7ddc-1ae7): remove dso-config.conf from bootstrap allowlist
.claude/dso-config.conf was incorrectly added to review-gate-allowlist.conf
in the batch-2 commit. The classifier reads the same allowlist to identify
SCORING_FILES — adding dso-config.conf to the exempt list silently broke
the _has_config_file floor rule (dso-config.conf diffs landed in light tier
instead of standard/deep). Removing it restores the floor rule. The partial
bootstrap allowlist still covers .gitignore, CLAUDE.md, workflow, and script
scaffolding files.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* fix(7ddc-1ae7): remove CLAUDE.md from bootstrap allowlist
CLAUDE.md has a hardcoded safeguard floor rule in review-complexity-classifier.sh
(_has_safeguard_file iterates SCORING_FILES only). Adding it to the allowlist
puts it in EXEMPT_FILES, silently bypassing the floor rule and landing at light
tier. Removing it from the allowlist restores the standard-tier floor for CLAUDE.md
changes. Bootstrap scenario still benefits from .gitignore, .semgrep.yml,
.pre-commit-config.yaml, .github/workflows/**, .claude/scripts/**, and
.claude/project-understanding.md being allowlisted.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* fix(batch-2): address llm-review cycle-1 findings
Critical:
- onboarding: replace git add -A with targeted re-staging using saved
staged-file list; prevents application code from being staged into
the orphan .tickets-tracker branch
Important:
- sprint Phase F: export STORY_BRANCH STORY_ID before calling merge-to-main.sh
in ci-pr mode so subprocess can access orchestrator variables
- ticket_show: add declare -f guard to prevent repeated ticket-lib.sh sourcing
in batch contexts (shell cached function detection)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* fix(batch-2): address llm-review cycle-2 findings
Critical:
- allowlist: remove .github/workflows/** — workflow files carry semantic
significance and must be reviewed when modified
Important:
- ticket_show: add _TICKETLIB_DIR guard for clear diagnostic on missing
module variable; pass TRACKER_DIR as TICKETS_TRACKER_DIR to resolve_ticket_id
so custom tracker paths are honored by the resolution pipeline
- onboarding: fix unquoted $_STAGED_BEFORE expansion using while/read loop
to handle filenames with spaces safely
- sprint Phase F ci-pr: add exit code check on merge-to-main.sh call
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* fix(493a-dfe5): use non-circular alias derivation in test
Replace code-under-test alias retrieval (ticket show $id) with independent
derivation via ticket-alias-compute.py + wordlist, eliminating the circular
dependency flagged in llm-review cycle-2.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* fix(batch-2): address llm-review cycle-3 findings
- Add error handling to local mode merge path in sprint Phase F (was silently ignoring non-zero exit from merge-story-branch.sh)
- Clarify resolve_ticket_id contract in ticket-lib-api.sh comment (document source location and interface)
- Document merge-to-main.sh env-var contract in ci-pr path comment
- Fix misleading comment in onboarding SKILL.md (readarray → while/read)
- Fix terminology in review-gate-allowlist.conf comment (EXCLUDED → NOT listed here)
- Add JSON output validation and tmpdir cleanup to alias resolution test
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* fix(batch-2): skip alias scan for 4+ hyphen inputs in ticket show
Inputs with 4+ hyphens (e.g. test inputs like nonexistent-ticket-id-zzz9-yyyy)
cannot match any known ticket format (max is 3 hyphens for 16-hex IDs).
Previously, resolve_ticket_id would run the expensive O(N*K) alias scan
via ticket-alias-resolve.py against all 16K+ tickets, causing test
timeouts in CI when check-tag-guards.sh / check-reinvocation.sh used
such inputs.
Add format-discriminated resolution: hex patterns → fast path,
4+ hyphens → immediate fail, 0-3 hyphens non-hex → full alias pipeline.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* fix(batch-2): address llm-review cycle-4 findings
- Add _snapshot_fail to alias-resolution tests for correct test isolation
- Add tests for 4+-hyphen fast-reject and 8-hex short-ID resolution paths
- Switch sprint-story-review.yml lint-python to astral-sh/ruff-action@v3
(pre-built action with pinned version replaces pip install ruff)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* fix(batch-2): address llm-review cycle-5 findings
- Propagate resolve_ticket_id exit code explicitly; command substitution
silently loses the exit status, causing a generic "not found" message
to overwrite the real error from the alias-resolution path
- Add behavioral proof that ≥4-hyphen fast-path fires before alias scan:
unset _TICKETLIB_DIR in test so slow path would produce a distinct error;
assert that error contains no _TICKETLIB_DIR reference
- Guard ${ticket_id:0:9} slice with length check (>= 9) before use
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* fix(batch-2): address PR #112 review thread findings
- Add permissions block to sprint-story-review.yml (contents: read,
checks: write); fixes CodeQL/CodeRabbit/Copilot token-scope findings
- Pin ludeeus/action-shellcheck@master to @2.0.0 (supply-chain pinning)
- Replace tr+wc hyphen counting with pure bash arithmetic in ticket-lib-api.sh
- Fix JSON parsing in test to use stdin (not sys.argv) for robustness
- Fix misleading "skip" comment: alias unavailability is a hard fail
- Fix sprint SKILL.md: use BRANCH env var (not STORY_BRANCH) for
merge-to-main-pr.sh which defaults to the current git branch
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* fix(batch-2): address llm-review cycle-6 findings
- Fix hex regex: [a-z0-9] -> [0-9a-f] to reject non-hex alphanumeric
inputs (e.g., 'gggg-hhhh') that would have been routed to
_ticketlib_resolve_short_id expecting pure hex
- Remove fragile _TICKETLIB_DIR error-message assertion from fast-path
test; observable behavior (exit non-zero) is the correct assertion
- Add short_id format guard in 8-hex test: assert extracted prefix
matches [0-9a-f]{4}-[0-9a-f]{4} before proceeding
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
---------
Co-authored-by: Test <test@test.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>1 parent 2443c42 commit 02c260c
7 files changed
Lines changed: 225 additions & 3 deletions
File tree
- .claude/hooks/pre-commit
- .github/workflows
- plugins/dso
- hooks/lib
- scripts
- skills
- onboarding
- sprint
- tests/scripts
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
| 38 | + | |
38 | 39 | | |
39 | 40 | | |
40 | 41 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
8 | 12 | | |
9 | 13 | | |
10 | 14 | | |
11 | 15 | | |
12 | 16 | | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
13 | 51 | | |
14 | 52 | | |
| 53 | + | |
15 | 54 | | |
16 | 55 | | |
17 | 56 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
65 | 65 | | |
66 | 66 | | |
67 | 67 | | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
123 | 123 | | |
124 | 124 | | |
125 | 125 | | |
126 | | - | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
127 | 157 | | |
128 | 158 | | |
129 | 159 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1213 | 1213 | | |
1214 | 1214 | | |
1215 | 1215 | | |
| 1216 | + | |
| 1217 | + | |
1216 | 1218 | | |
1217 | 1219 | | |
1218 | 1220 | | |
1219 | 1221 | | |
1220 | 1222 | | |
1221 | 1223 | | |
1222 | 1224 | | |
| 1225 | + | |
| 1226 | + | |
| 1227 | + | |
| 1228 | + | |
| 1229 | + | |
| 1230 | + | |
| 1231 | + | |
| 1232 | + | |
1223 | 1233 | | |
1224 | 1234 | | |
1225 | 1235 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1996 | 1996 | | |
1997 | 1997 | | |
1998 | 1998 | | |
1999 | | - | |
| 1999 | + | |
| 2000 | + | |
| 2001 | + | |
2000 | 2002 | | |
2001 | 2003 | | |
2002 | 2004 | | |
2003 | 2005 | | |
2004 | 2006 | | |
2005 | 2007 | | |
2006 | 2008 | | |
2007 | | - | |
| 2009 | + | |
| 2010 | + | |
| 2011 | + | |
| 2012 | + | |
| 2013 | + | |
| 2014 | + | |
| 2015 | + | |
| 2016 | + | |
| 2017 | + | |
| 2018 | + | |
| 2019 | + | |
| 2020 | + | |
| 2021 | + | |
| 2022 | + | |
| 2023 | + | |
| 2024 | + | |
| 2025 | + | |
2008 | 2026 | | |
2009 | 2027 | | |
2010 | 2028 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
547 | 547 | | |
548 | 548 | | |
549 | 549 | | |
| 550 | + | |
| 551 | + | |
| 552 | + | |
| 553 | + | |
| 554 | + | |
| 555 | + | |
| 556 | + | |
| 557 | + | |
| 558 | + | |
| 559 | + | |
| 560 | + | |
| 561 | + | |
| 562 | + | |
| 563 | + | |
| 564 | + | |
| 565 | + | |
| 566 | + | |
| 567 | + | |
| 568 | + | |
| 569 | + | |
| 570 | + | |
| 571 | + | |
| 572 | + | |
| 573 | + | |
| 574 | + | |
| 575 | + | |
| 576 | + | |
| 577 | + | |
| 578 | + | |
| 579 | + | |
| 580 | + | |
| 581 | + | |
| 582 | + | |
| 583 | + | |
| 584 | + | |
| 585 | + | |
| 586 | + | |
| 587 | + | |
| 588 | + | |
| 589 | + | |
| 590 | + | |
| 591 | + | |
| 592 | + | |
| 593 | + | |
| 594 | + | |
| 595 | + | |
| 596 | + | |
| 597 | + | |
| 598 | + | |
| 599 | + | |
| 600 | + | |
| 601 | + | |
| 602 | + | |
| 603 | + | |
| 604 | + | |
| 605 | + | |
| 606 | + | |
| 607 | + | |
| 608 | + | |
| 609 | + | |
| 610 | + | |
| 611 | + | |
| 612 | + | |
| 613 | + | |
| 614 | + | |
| 615 | + | |
| 616 | + | |
| 617 | + | |
| 618 | + | |
| 619 | + | |
| 620 | + | |
| 621 | + | |
| 622 | + | |
| 623 | + | |
| 624 | + | |
| 625 | + | |
| 626 | + | |
| 627 | + | |
| 628 | + | |
| 629 | + | |
| 630 | + | |
| 631 | + | |
| 632 | + | |
| 633 | + | |
| 634 | + | |
| 635 | + | |
| 636 | + | |
| 637 | + | |
| 638 | + | |
| 639 | + | |
| 640 | + | |
| 641 | + | |
| 642 | + | |
| 643 | + | |
| 644 | + | |
| 645 | + | |
| 646 | + | |
| 647 | + | |
| 648 | + | |
| 649 | + | |
| 650 | + | |
| 651 | + | |
| 652 | + | |
| 653 | + | |
| 654 | + | |
| 655 | + | |
| 656 | + | |
| 657 | + | |
| 658 | + | |
| 659 | + | |
| 660 | + | |
| 661 | + | |
| 662 | + | |
550 | 663 | | |
0 commit comments