Repository navigation
chore(branding): finish rtk→contextcrawler print-string sweep + branding-lint test - #25
Merged
Merged
Conversation
…dd branding-lint test (#20 #23) Combined fix for #20 (~30 hardcoded `RTK.md`/`@RTK.md` labels in print strings + doc comments) and #23 ([rtk] warning/error prefix), plus the "never do it again" insurance the user asked for. **Print-string sweep (47 + ~15 sites):** - `[rtk]` → `[contextcrawler]` (bulk sed across src/) - `[rtk:toml]` → `[contextcrawler:toml]` - `[rtk: <msg>]` → `[contextcrawler: <msg>]` (the colon-variant from run_fallback's command-spawn error path) - `RTK.md` → `CONTEXTCRAWLER.md` (matches the on-disk filename written by the actual code path) - `@RTK.md` → `@CONTEXTCRAWLER.md` (the @-reference users see in AGENTS.md / CLAUDE.md success messages) Intentional legacy references preserved with restoration sed: - `LEGACY_RTK_MD_FILES` constant body - Regression-history comments mentioning the prior name + commit bcddd06 **Branding-lint test (`tests/branding_lint.rs`):** Scans every `.rs` file under `src/` for the four forbidden upstream literals (`[rtk]`, `[rtk:`, `RTK.md`, `@RTK.md`). On failure, prints each offending file:line + the offending substring + a fix hint pointing back to the issue numbers and the per-line `// branding-lint: allow legacy` marker / `ALLOWED_FUNCTION_PREFIXES` exit hatches. Two exit hatches for intentional legacy usage: - Per-line `// branding-lint: allow legacy` marker — for one-off history comments - `ALLOWED_FUNCTION_PREFIXES` — function bodies whose entire scope is legacy-focused (legacy-cleanup tests etc.). Lint detects function boundaries via brace-depth tracking from the `fn` declaration line. `STRUCTURAL_ALLOW_NEEDLES` also exempts short structural references (`LEGACY_RTK_MD_FILES`, "issue #19" history mentions, "bcddd06" commit-hash references) without needing per-line markers. A second test (`branding_lint_canonical_name_present_in_init`) asserts that `CONTEXTCRAWLER.md` and `@CONTEXTCRAWLER.md` still appear in src/hooks/init.rs — catches the inverse mistake (ripping out canonical references without re-adding via the constant). **Net effect:** any future upstream rebase that re-introduces an `[rtk]` prefix or `RTK.md` literal in production source fails `cargo test --test branding_lint` with a clear error pointing at the exact line + the relevant issue number. No more silent rebrand drift. Tests: 2027 bin pass + 2 branding-lint pass. No existing tests broke. Closes #20 Closes #23 Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
noogalabs
pushed a commit
to noogalabs/contextcrawler
that referenced
this pull request
Jun 4, 2026
… branding-lint extension **Version bump 0.39.0 → 0.1.7.** The upstream rebase pulled in rtk's `0.39.0` version; restoring the downstream `0.1.x` numbering line per the maintainer's call. `.release-please-manifest.json` updated to match. Last downstream tag was `v0.1.6` (2026-05-15); this is the next in the sequence. **release-please-config.json `package-name: "rtk"` → "contextcrawler".** Caught by manual audit during release prep. Same regression-family as thehoff#19 / thehoff#20 / thehoff#22: a rebrand gap the prior branding-lint (src/-scoped) didn't catch because release-please-config.json lives at repo root. Without this fix, release-please would have produced `rtk-vX.Y.Z` tags and release-PR titles. **Cargo.toml `extended-description` rebrand.** Line 77 still read "rtk filters and compresses..." — same upstream-leak family. Fixed. **Extended `tests/branding_lint.rs`** with a third test — `branding_lint_config_files_pin_canonical_package_name` — that: - Parses Cargo.toml and asserts `[package].name == "contextcrawler"` - Parses release-please-config.json and asserts `packages["."]["package-name"] == "contextcrawler"` This closes the gap that let release-please-config.json silently drift to `"rtk"` post-rebase. Any future rebase that re-introduces an upstream package-name fails `cargo test --test branding_lint` with an explicit error pointing at issues thehoff#19/thehoff#20/thehoff#22 history. **CHANGELOG.md** entry for v0.1.7 added, summarizing all PRs merged today (thehoff#10 thehoff#15 thehoff#16 thehoff#21 thehoff#24 thehoff#25 thehoff#30) plus the deferred follow-ups (thehoff#26 thehoff#27 thehoff#28 thehoff#29). Tests: 2027 bin + 3 branding-lint (1 new) + 1 harness = all pass. Verified: `contextcrawler --version` now prints `contextcrawler 0.1.7`. Refs thehoff#19 thehoff#20 thehoff#22 thehoff#29
noogalabs
pushed a commit
to noogalabs/contextcrawler
that referenced
this pull request
Jun 4, 2026
…n user-visible strings User reported `contextcrawler init --global --claude-md` printing "Added rtk instructions to existing ..." -- a branding leak that escaped the rebrand sweep (PR thehoff#25) and the pinning lint (tests/branding_lint.rs added in PRs thehoff#20/thehoff#23). The pinning lint covered `[rtk]`, `[rtk:`, `RTK.md`, `@RTK.md` literals but not other user-visible "rtk" phrases. ## Fixes (production source) - `src/hooks/init.rs` -- 8x "rtk instructions" -> "contextcrawler instructions" (the reported leak) - `src/main.rs` -- doc comment "Initialize rtk instructions" + two `eprintln!("rtk: ...")` error prefixes - `src/core/telemetry_cmd.rs` -- "rtk telemetry disable" command reference in user prompt + 2x "rtk: " error prefixes - `src/discover/registry.rs` -- 2x "rtk: " error prefixes - `src/core/utils.rs` -- 2x "rtk: " error prefixes - `src/cmds/system/read.rs` -- "rtk: " error prefix - `src/cmds/cloud/aws_cmd.rs` -- "rtk: " error prefix - `src/hooks/integrity.rs` -- 2x "rtk: " error prefixes Total: 19 production-source replacements across 8 files. ## Branding lint extended (issue thehoff#20/thehoff#23 lineage) `tests/branding_lint.rs::FORBIDDEN_TOKENS` now also catches: - `"rtk instructions"` -- the reported leak - `"\"rtk: "` -- error prefix in unstructured stderr (note the leading `"` so it only matches the start of a string literal, avoiding false positives on `"my-rtk: x"` substrings) - `"rtk telemetry"` -- CLI command reference in user-facing text The expanded lint immediately caught the 10 other "rtk: " leaks that the user hadn't reported yet -- fixed in the same PR. ## Out of scope (separate scope question) `src/core/telemetry_cmd.rs` still attributes the data controller as "RTK AI Labs" with the upstream rtk-ai/rtk TELEMETRY.md link. That's a factual statement about who operates the upstream collector -- not a branding leak. Whether the downstream fork should: (a) disable telemetry entirely, (b) re-attribute, or (c) keep upstream attribution requires a decision separately. ## Verified - cargo build clean - cargo test --bin contextcrawler: 2156 pass / 0 fail - All 9 integration suites green - Empirical: `contextcrawler init --global --claude-md --dry-run` now prints "Added contextcrawler instructions ..." Reported in-session via user testing of the deployed binary.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes both #20 (~30 hardcoded
RTK.mdlabels in print strings) and #23 ([rtk]warning/error prefix). Adds a branding-lint test so the rebrand-regression family can't re-introduce itself silently during future upstream rebases.Print-string sweep
[rtk]→[contextcrawler](+[rtk:toml]and[rtk: <msg>]colon variants)RTK.md/@RTK.mduser-facing labels → canonical names (matches what the code actually writes)Branding-lint test (
tests/branding_lint.rs).rsinsrc/for forbidden upstream literals ([rtk],[rtk:,RTK.md,@RTK.md)// branding-lint: allow legacy)ALLOWED_FUNCTION_PREFIXES+ brace-depth tracking (for legacy-cleanup tests)STRUCTURAL_ALLOW_NEEDLESexempts short structural references (LEGACY_RTK_MD_FILES, "issue bug: regression —init --codexwrites RTK.md instead of CONTEXTCRAWLER.md (incomplete rebrand) #19" history)CONTEXTCRAWLER.mdreferences actually exist in init.rs (catches the inverse mistake)Codex review
Clean. Quote: "The change set is limited to branding/wording updates plus a new source-lint test, and I did not find any functional regressions or broken code paths in the modified logic. The added lint appears internally consistent with the existing legacy-allowlist scheme."
Test plan
cargo test --test branding_lint— 2 passcargo test --bin contextcrawler— 2027 passCloses #20
Closes #23