Skip to content

fix(statusline): detect RTK rewrite hook - #24

Merged
ousamabenyounes merged 1 commit into
mainfrom
fix/rtk-statusline-hook-detection
Sep 14, 2026
Merged

ousamabenyounes merged 1 commit into
mainfrom
fix/rtk-statusline-hook-detection

Conversation

@ousamabenyounes

@ousamabenyounes ousamabenyounes commented Sep 14, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • recognize the current RTK rtk-rewrite.sh PreToolUse hook in the Tokenwar status line
  • preserve recognition of the legacy rtk hook claude command form
  • add a regression test using a different user home path to keep detection user-independent

Why

status.sh correctly reported RTK as healthy, but the status-line renderer only
recognized the legacy command form. Installations wired through the generated
~/.claude/hooks/rtk-rewrite.sh script therefore showed a false red [rtk -]
badge even while RTK was active and recording savings.

Validation

  • GCP VM ora-agents, commit 899c51cba6610666031ea3d5d2f506c08de6d3d1
  • shellcheck -S warning scripts/*.sh scripts/lib/*.sh install.sh uninstall.sh
  • bats tests/ — 193/193 passed
  • real installed renderer on macOS — green [rtk 4.3M], exit 0
  • rtk --version — 0.30.0
  • rtk gain — 4.3M tokens saved, 60.4%

Estimate and actuals

  • Prior estimate: not recorded; the PR was requested after the local diagnosis and fix had started.
  • Retrospective estimate recorded 2026-09-14: 15–30 minutes, 5k–15k model tokens. Monetary estimate unavailable because attributable API billing telemetry is not exposed.
  • Actual active time: not instrumented.
  • Actual elapsed time: 104 minutes from the local source modification timestamp to CI success; includes user interaction and GCP/GitHub wait time, so it is not active-work time.
  • Actual tokens and monetary cost: unavailable at PR granularity; no values inferred from session-wide telemetry.

Documentation

No user-facing command or API behavior changes. The existing status-line comment remains the source of truth; the regression test documents both supported hook representations. This repository has no Ora /doc, /tests, or Swagger surfaces.

@ousamabenyounes
ousamabenyounes merged commit 06180bc into main Sep 14, 2026
1 check passed
@ousamabenyounes
ousamabenyounes deleted the fix/rtk-statusline-hook-detection branch September 14, 2026 08:33
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