Repository navigation
fix(trail): shared hook reads single-quoted learning titles - #626
anirudhkumar-nanonets wants to merge 1 commit into
Conversation
🌱 graft blast radius1 area changed → 3 areas can be affected. 10 dependent symbols, depth 2. flowchart TB
A0(("Host Integration<br/>6 symbols"))
A1(("CLI Entry Point<br/>2 symbols"))
A2(("Claude Setup<br/>2 symbols"))
classDef reached fill:#D9EDF3,stroke:#3AA7C9,stroke-width:1.5px,color:#0E313C;
class A0,A1,A2 reached;
Who knows this code — 1 person across 4 areas
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 All 10 dependent symbols, grouped by areaHost Integration — 6 symbols in 6 files
CLI Entry Point — 2 symbols in 2 files
Claude Setup — 2 symbols in 2 files
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.
13 test suites also reference this code13 symbols, kept out of the diagram and the table so they cannot crowd out the areas a reviewer has to look at.
Open the interactive graph → — click an area to see its dependent symbols at file:line. |
Moves: none of the project's metrics directly. It keeps the learnings list clean for a teammate without trail in a repo that runs Prettier, which is what NanoNets/assign#3372 rolls out.
learnings_committedis the closest metric (PostHog query indaily/project.md). I didn't check its value, because this session has no Metabase access.Why
Without trail installed, the shared hook lists
.trail/learnings/by reading each file'stitle:line. It stripped only double quotes. trail writes titles with JSON's double quotes, but a repo with Prettier'ssingleQuote: true(assign) rewrites them to single quotes. The list then showed- 'assign: one PR into dev…'with the quotes left in. NanoWarden flagged it on NanoNets/assign#3372.What changes
src/claude/shim-template.ts:field()reads a single-quoted value (and its''escape) and a double-quoted one (throughJSON.parse, matching howscalar()insrc/notes/notes.tswrites it). Bare values are unchanged.test/claude-shim-resolve.test.ts: one test with a single-quoted title, a double-quoted title with an escaped", and a bare one.A repo's committed
.trail/hook.cjspicks this up on the nexttrail init.How I checked
tscpasses.npm test: 1441 of 1445 pass here. The 3 failures (graft-to-trail move tests ingraft-to-trail,hosts-trailandupkeep-hooks) fail the same way on cleanorigin/mainon this machine, so they come from the local setup, not this change.🤖 Generated with Claude Code