Skip to content

chore: improve development workflow and git hooks#37

Merged
dreamlx merged 8 commits into
developfrom
feature/improve-workflow-hooks
Apr 13, 2026
Merged

chore: improve development workflow and git hooks#37
dreamlx merged 8 commits into
developfrom
feature/improve-workflow-hooks

Conversation

@dreamlx
Copy link
Copy Markdown
Owner

@dreamlx dreamlx commented Apr 13, 2026

Summary

  • P0: Clean up 5 stale files from .git/hooks/; redirect post-commit stderr to ~/.codeindex/hooks/post-commit.log instead of /dev/null
  • P1: Version-control hook-common.sh in scripts/hooks/; unify make install-hooks to delegate to codeindex hooks install --all
  • P2: Add --cov-fail-under=78 coverage gate in CI; change all hook shebangs from #!/bin/zsh to #!/usr/bin/env bash
  • P3: Replace ~50 lines of regex-based debug detection with ruff T201/T100 rules; add mypy as informational CI check

Test plan

  • All 1541 tests pass (13 skipped)
  • Pre-commit hook works with new bash shebang
  • Pre-push hook runs lint + tests successfully
  • ruff check src/ tests/ passes with new T rules
  • New test_install_hook_copies_hook_common test added and passing

Closes #36

🤖 Generated with Claude Code

DreamLinx and others added 8 commits April 13, 2026 13:53
Errors from post-commit hook were silently discarded, making debugging
impossible. Now writes to ~/.codeindex/hooks/post-commit.log.
Also cleaned up 5 stale files from .git/hooks/.

Closes #36 (P0)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Updated by post-commit hook.
Update level: current
…mon.sh

- Add scripts/hooks/hook-common.sh to version control
- HookManager._ensure_hook_common() copies it on install
- Makefile install-hooks now delegates to `codeindex hooks install --all`
- Add test for hook-common.sh copy behavior

Closes #36 (P1)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Updated by post-commit hook.
Update level: current
- CI: add --cov-fail-under=78 to prevent coverage regression
- Hooks: change all shebangs from #!/bin/zsh to #!/usr/bin/env bash
  for cross-platform portability (templates + scripts/hooks/)
- Fix zsh-only $= word splitting syntax in local pre-commit
- Update test assertions for shebang flexibility

Closes #36 (P2)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Updated by post-commit hook.
Update level: current
- Enable ruff T201 (print) and T100 (debugger) rules in pyproject.toml
- Add per-file-ignores for CLI/test files that legitimately use print()
- Remove ~50 lines of regex-based L2 debug detection from pre-commit template
- Add mypy to dev dependencies with baseline config
- CI: add mypy type check as informational (non-blocking) step
- Makefile: add `make typecheck` target

Closes #36 (P3)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Updated by post-commit hook.
Update level: affected
@dreamlx dreamlx merged commit af5649e into develop Apr 13, 2026
8 checks passed
@dreamlx dreamlx deleted the feature/improve-workflow-hooks branch April 13, 2026 11:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant