Skip to content

fix(init): finish rebrand on all user-facing print output - #3

Merged
thehoff merged 1 commit into
developfrom
fix/init-output-rebrand
May 14, 2026
Merged

thehoff merged 1 commit into
developfrom
fix/init-output-rebrand

Conversation

@thehoff

@thehoff thehoff commented May 14, 2026

Copy link
Copy Markdown
Owner

Summary

PR #1 caught the load-bearing hook-rewrite emit prefix, but `init.rs` itself still printed dozens of `RTK …` strings in success / status / help / uninstall output. Empirically surfaced by a fresh Framework install — `contextcrawler init -g` reported:

```
RTK hook registered (global).
RTK.md: /home/.../CONTEXTCRAWLER.md ← label says RTK.md, path is CONTEXTCRAWLER.md
CLAUDE.md: @RTK.md reference added ← actual ref written is @CONTEXTCRAWLER.md
```

What changed

  • User-visible `RTK …` print/eprintln literals → `ContextCrawler …` (status, uninstall, codex config, agent hooks for cline / windsurf / kilocode / antigravity).
  • Hardcoded `RTK.md` / `@RTK.md` strings → interpolation of the existing `RTK_MD` / `RTK_MD_REF` constants (which already evaluate to `CONTEXTCRAWLER.md` / `@CONTEXTCRAWLER.md`). Keeps label and path consistent; centralizes future renames.
  • `init -g` usage help text updated to match.
  • `verify` self-check and Codex configuration listing both route through the constants now.

Out of scope (intentionally untouched)

  • Doc comments and source-level identifier names (`RTK_MD`, `RTK_BLOCK_START`, etc.) — kept for upstream-rebase friction.
  • `LEGACY_RTK_MD` / `LEGACY_RTK_MD_REF` references — point at the legacy filename so the install path can clean up post-upstream-rtk installs.
  • `RTK_INSTRUCTIONS` legacy claude-md block — preserved for the `--claude-md` migration code.
  • `gain.rs` / `cc_economics.rs` strings — already addressed in PR fix(hook): emit contextcrawler as rewrite prefix; finish rtk rebrand on UI strings #1.

Test plan

  • `cargo test` — 1784 passed / 0 failed / 6 ignored
  • Devel-test on Framework: after install, `contextcrawler init -g` should print "ContextCrawler hook registered" + "CONTEXTCRAWLER.md:" + "@CONTEXTCRAWLER.md reference added".

Independence

Branched off `develop`, touches only init.rs print statements. No conflicts expected with PR #1 or PR #2.

🤖 Generated with Claude Code

PR #1 caught the load-bearing hook-rewrite emit prefix, but `init.rs`
itself still printed dozens of `RTK …` strings in success/status/help
output. Empirically surfaced by a fresh Framework install — `contextcrawler
init -g` reported:

  RTK hook registered (global).
    RTK.md:    /home/.../CONTEXTCRAWLER.md       (label/path mismatch)
    CLAUDE.md: @RTK.md reference added           (the actual ref written
                                                  to CLAUDE.md is now
                                                  @CONTEXTCRAWLER.md
                                                  via RTK_MD_REF)

Scope of this PR:

* Replace user-visible `RTK …` print/eprintln literals with
  `ContextCrawler …` (status messages, uninstall messages, codex
  config, agent hooks for cline / windsurf / kilocode / antigravity).
* Replace hardcoded `RTK.md` / `@RTK.md` strings with interpolation of
  the existing `RTK_MD` / `RTK_MD_REF` constants (which already evaluate
  to `CONTEXTCRAWLER.md` / `@CONTEXTCRAWLER.md`). This keeps the label
  and the path consistent and centralizes future renames.
* Updated the `init -g` usage help text to match.
* `verify` self-check messages and Codex configuration listing both go
  through the same constants now.

Out of scope (intentionally untouched):

* Doc comments and source-level `RTK_MD` / `RTK_BLOCK_START` etc.
  identifier names — kept for upstream-rebase friction.
* `LEGACY_RTK_MD` / `LEGACY_RTK_MD_REF` references — these specifically
  point at the legacy filename and must NOT be renamed; they exist so
  the install path can clean up post-upstream-rtk installs.
* `RTK_INSTRUCTIONS` legacy claude-md block content — already replaced
  by `RTK_SLIM` for the active install path, but the legacy constant
  is preserved as-is for the `--claude-md` migration code.
* gain.rs / cc_economics.rs strings — already addressed in PR #1.

Verified: `cargo test` → 1784 passed / 0 failed / 6 ignored.

Independence from PR #1 / PR #2: branched off develop, touches only
init.rs print statements. No conflicts expected with either pending PR.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@thehoff
thehoff merged commit 19048f0 into develop May 14, 2026
4 checks passed
@thehoff
thehoff deleted the fix/init-output-rebrand branch May 14, 2026 13:03
noogalabs pushed a commit to noogalabs/contextcrawler that referenced this pull request Jun 4, 2026
…e tests

Addresses Codex round-2 review findings on the exec_capture hardening
branch:

Truncation contract (Codex finding thehoff#3):
- Add truncated_stdout / truncated_stderr bools to CaptureResult.
  Silent truncation was a real API ambiguity — callers parsing JSON
  on a capped prefix would treat parse failures as real errors.
- New drain_with_cap helper reads at most `max` bytes then peeks one
  byte to detect whether the stream had more pending. Detection is
  exact: a stream that ends precisely at the cap reports
  truncated=false (no false positives at exact-EOF boundary).
- exec_capture_with_limits propagates both flags through.

Edge cases (Codex finding thehoff#6):
- truncated flag set/clear at boundary (3 tests including exact-EOF
  no-false-positive)
- very-short deadline race (1ms) — either Ok or Err is acceptable,
  no panic/hang/orphan
- cap-of-0 pathological config — child still runs, output empty,
  flag set if child wrote anything
- stderr-only flood completes without stdout-drain deadlock
  (validates the threaded-drain design holds when one stream is dead)
- kill-on-already-exited-child does not surface as error (back-to-back
  short calls confirm no leftover state from unused timeout-error path)
- drain_with_cap helper unit tests for the truncation peek logic

Suite: 1848 → 1856 passing.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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