Skip to content

Codex/trail repo context 0281 - #744

Merged
shhdwi merged 4 commits into
trailhq:mainfrom
sorensencc-dotcom:codex/trail-repo-context-0281
Nov 8, 2026
Merged

shhdwi merged 4 commits into
trailhq:mainfrom
sorensencc-dotcom:codex/trail-repo-context-0281

Conversation

@sorensencc-dotcom

Copy link
Copy Markdown
Contributor

No description provided.

Shrish Dwivedi and others added 2 commits October 30, 2026 02:12
The official MCP Registry accepts a server only when the npm package it
names carries mcpName. pack-trail.mjs now puts
mcpName io.github.trailhq/trail-code on @trailhq/trail-code alone, and
both packages get MCP keywords for npm search.

server.json is the registry entry (from mcp-publisher init, then fixed:
description under the 100-character limit, the trailhq/Trail-Code URL,
the `mcp` argument so npx starts the server rather than the CLI, and no
placeholder API key). .mcp.json at the root is how Cursor Directory and
others find the server.

The repo's package.json keeps the @nanonets/graft name: the registry
reads npm, not the repo, and tests assume this checkout runs as graft.
@trailhq-graft

trailhq-graft Bot commented Nov 1, 2026 •

Copy link
Copy Markdown

🌱 graft blast radius

Nothing outside this diff depends on it. 2 areas changed; no indexed dependents at depth 2.
Tests: no test reaches CLI Query Root; 1 area updated its tests.
Tag: @anirudhkumar-nanonets — Root Resolution, CLI Query Root

Who knows this code — 1 person across 2 areas
Area Who knows it
Root Resolution · changed @anirudhkumar-nanonets — 1 commit, last 3mo ago
CLI Query Root · changed @anirudhkumar-nanonets — 68 commits, last yesterday

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 ✓ · 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.

  • ✓ Root Resolution — 1 of 2 reached · 1 test file changed here: test/graph-root.test.ts
    • not reached: nearestGitRoot
  • ✗ CLI Query Root — 0 of 1 reached · no test file reaches it
    • not reached: queryRoot

graft blast · origin/main...HEAD · depth 2 · 3 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 Nov 1, 2026
@shhdwi

shhdwi commented Nov 7, 2026

Copy link
Copy Markdown
Collaborator

The root fix here is real. With a child checkout inside a built parent repo, ask childFn from the child returned parentFn on main and check said OK, both from the parent's map. With this PR you get no results and check: NO GRAPH, which is right.

The PR also bundles unrelated release work, though:

  • a version bump from 0.28.0 to 0.28.1
  • server.json and mcpName for the MCP Registry
  • a root .mcp.json that runs npx -y @trailhq/trail-code mcp for anyone who opens the repo

The registry work is being handled in #742/#761. Could you split out just the src/graph/root.ts fix and its tests into its own PR? Also, the notice it prints says it's answering from a child/graft that doesn't exist, so that line could use a fix.

Shrish Dwivedi and others added 2 commits November 8, 2026 16:10
The version bump, server.json, mcpName and the root .mcp.json are handled
in trailhq#742/trailhq#761. This PR keeps only the src/graph/root.ts fix and its test.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
When the walk stops at a Git checkout root that has no graph, the notice
named <checkout>/graft, which doesn't exist. Print it only when the root
it stopped at actually holds a graph.

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

shhdwi commented Nov 8, 2026

Copy link
Copy Markdown
Collaborator

Pushed two commits to your branch so this can go in on its own:

Checked with a built parent repo and an unbuilt child checkout inside it: from the child, ask childFn returns no results and check says NO GRAPH, with no misleading notice. From a plain subdirectory of the parent, the notice still appears. test/graph-*.test.ts passes.

github-actions Bot added a commit that referenced this pull request Nov 8, 2026
@shhdwi
shhdwi merged commit 22822e4 into trailhq:main Nov 8, 2026
8 checks passed
github-actions Bot added a commit that referenced this pull request Nov 8, 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.

2 participants