Skip to content

Trail-code 0.23.0, and init no longer leaves a graft/ folder - #623

Merged
shhdwi merged 2 commits into
mainfrom
release/0.23.0
Oct 15, 2026
Merged

shhdwi merged 2 commits into
mainfrom
release/0.23.0

Conversation

@shhdwi

@shhdwi shhdwi commented Oct 15, 2026

Copy link
Copy Markdown
Collaborator

Bumps both packages to 0.23.0 for #617, #619 and #620, with one fix found while testing the release.

The fix

On a fresh trail init with telemetry on (the default for npm installs), an untracked graft/ folder showed up in git status, holding graft/.cache/telemetry-repo-id.json. The past-session read sends its first event before init creates .trail/learnings/, so the repo didn't count as on trail yet and its repo id went to graft/. Since #619, nothing ignores graft/. A git add -A would have committed the id, and every clone would then report the same repo id.

init now makes .trail/learnings/ before the two reads start, so the id lands in .trail/cache/. A new test runs trail init with telemetry on and checks that no graft/ is left.

Checked on the packed tarballs

  • 1444 tests pass.
  • Both tarballs carry the same telemetry key as 0.22.1.
  • Upgrade from 0.22.1, in a real Claude Code session (pallets/click, set up and committed with 0.22.1): the session start moved the repo over. The old shims, the repo skill and .mcp.json went, and .trail/hook.cjs plus the one SessionStart line came in. The map moved from graft/ to .trail/cache/ without a rebuild (same inode and mtime).
  • Fresh trail init: git status shows only .claude/, .trail/ and .github/.
  • Teammate without trail: a clone with no trail or graft reachable gets the learning list, the credit line and the one-time install offer from .trail/hook.cjs.
  • Teammate still on 0.22.1 who pulls the new layout: their session start doesn't rewrite the committed files.

Known, not fixed here

  • The first prompt of the first session after upgrading shows one hook error, "Cannot find module .claude/helpers/trail-hooks.cjs". Claude Code loaded the old settings before the session start removed that file, and it reloads them after that prompt.
  • A teammate still on 0.22.1 gets the session-start context twice, once from ~/.claude and once from .trail/hook.cjs, because only 0.23.0 knows to stand the repo hook down. It goes away when they upgrade.
  • .claude/settings.local.json still sets footerLinksRegexes to graft/…, so footer links don't match cards in .trail/cache/.

🤖 Generated with Claude Code

Shrish Dwivedi and others added 2 commits October 15, 2026 19:59
The past-session read sends cold_start before init wired anything, so
the repo didn't count as on trail yet and the event's repo id went to
graft/.cache/. Since #619 nothing ignores graft/, so every fresh init
with telemetry on left an untracked graft/ folder in git status.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@trailhq-graft

trailhq-graft Bot commented Oct 15, 2026 •

Copy link
Copy Markdown

🌱 graft blast radius

Nothing outside this diff depends on it. 1 area changed; no indexed dependents at depth 2.
Tests: no test reaches CLI Initialization.
Tag: @anirudhkumar-nanonets — CLI Initialization

Who knows this code — 1 person across 1 area
Area Who knows it
CLI Initialization · changed @anirudhkumar-nanonets — 58 commits, last today

Ownership is git history over each area's own files, weighted towards recent work (120-day half-life). Merge commits and bots are dropped, and you are dropped from your own PR. A name with no @ has no GitHub handle in its commit email — tag them by hand, or add a .mailmap entry. A suggestion from history, not a CODEOWNERS rule.

Test signal per changed area — 1 ✗

Reached = a node under a test path has a resolved edge into the changed symbol. It undercounts anything called indirectly — through a CLI, a spawned process or a dynamic import — so read a low ratio as “look here”, never as a coverage gate.

  • ✗ CLI Initialization — 0 of 1 reached · no test file reaches it
    • not reached: runInitCommand

⚠️ 3 changed files not in the graph (CHANGELOG.md, package-lock.json, package.json) — no parser claims the extension, or the index predates the file.

graft blast · origin/main...HEAD · depth 2 · 5 changed files

Open the interactive graph → — click an area to see its dependent symbols at file:line.

github-actions Bot added a commit that referenced this pull request Oct 15, 2026
@shhdwi
shhdwi merged commit ead585b into main Oct 15, 2026
8 checks passed
@shhdwi
shhdwi deleted the release/0.23.0 branch October 15, 2026 14:39
github-actions Bot added a commit that referenced this pull request Oct 15, 2026
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