Skip to content

fix: on-start/status honor the git-repo gate - #20

Merged
winjer merged 1 commit into
mainfrom
fix/on-start-git-gate
Aug 10, 2026
Merged

fix: on-start/status honor the git-repo gate#20
winjer merged 1 commit into
mainfrom
fix/on-start-git-gate

Conversation

@winjer

@winjer winjer commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

Problem

When CODE_TRACE_REQUIRE_GIT_REPO is on (the default), the Stop hook correctly refuses to trace outside a git repo. But the SessionStart reminder and code-trace status ignored the gate and still told the user "tracing ENABLED" — false reassurance in exactly the places the gate exists for.

Fix

  • on_start(): prints tracing inactive (not in a git repository) when the gate blocks tracing.
  • status(): same check, same wording.

Tests

  • on_start_reports_inactive_outside_git_repo
  • on_start_reports_enabled_inside_git_repo
  • Extended local TestEnv in cli_test.rs with with_env() so individual tests can re-enable the gate.

All 186 tests pass.

@winjer
winjer merged commit 1eaaaff into main Aug 10, 2026
2 checks passed
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