Skip to content

Codex/trail repo context 0281 - #744

Open
sorensencc-dotcom wants to merge 2 commits into
trailhq:mainfrom
sorensencc-dotcom:codex/trail-repo-context-0281
Open

sorensencc-dotcom wants to merge 2 commits into
trailhq:mainfrom
sorensencc-dotcom:codex/trail-repo-context-0281

Conversation

@sorensencc-dotcom

Copy link
Copy Markdown

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

2 areas changed → 1 area can be affected. 4 dependent symbols, depth 2.
Tests: 1 area updated its tests.
Tag: @anirudhkumar-nanonets — 3 of 3 areas

flowchart TB
  A0(("CLI Commands<br/>4 symbols"))
  classDef reached fill:#D9EDF3,stroke:#3AA7C9,stroke-width:1.5px,color:#0E313C;
  class A0 reached;
Loading
Can be affected Symbols Nearest hop Reached from
CLI Commands 4 src/cli.ts:L240-L245 queryRoot — calls, depth 1 Root Detection
Who knows this code — 1 person across 3 areas
Area Who knows it
Root Detection · changed @anirudhkumar-nanonets — 1 commit, last 3mo ago
Build Packaging · changed @anirudhkumar-nanonets — 1 commit, last 19d ago
CLI Commands · affected @anirudhkumar-nanonets — 63 commits, last 3d ago

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.

All 4 dependent symbols, grouped by area

CLI Commands — 4 symbols in 1 file

  • src/cli.ts:L240-L245 — queryRoot (calls, depth 1)
    242: const { root, levels } = nearestGraftRoot(process.cwd(), program.opts<GlobalOpts>().dir);
  • src/cli.ts:L1-L2844 — cli.ts (calls, depth 2)
    38: import { hasGraftIndex, nearestGraftRoot } from "./graph/root.js";
  • src/cli.ts:L869-L907 — runCheckCommand (calls, depth 2)
  • src/cli.ts:L2734-L2795 — statusCommand (calls, depth 2)
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 Detection — 1 of 2 reached · 1 test file changed here: test/graph-root.test.ts
    • not reached: nearestGitRoot
  • – Build Packaging — no function, method or class changed here

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

graft blast · origin/main...HEAD · depth 2 · 6 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.

This branch has not been deployed

No deployments
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