Repository navigation
Remove the App's brain build for assign - #613
Conversation
🌱 graft blast radius1 area changed → 1 area can be affected. 3 dependent symbols, depth 2. flowchart TB
A0(("Review Process<br/>3 symbols"))
classDef reached fill:#D9EDF3,stroke:#3AA7C9,stroke-width:1.5px,color:#0E313C;
class A0 reached;
Who knows this code — 1 person across 2 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 3 dependent symbols, grouped by areaReview Process — 3 symbols in 3 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.
4 test suites also reference this code7 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. This is cleanup: trail no longer depends on the assign repo or its Agents platform (decided 15 Oct), and this route was the last code that did.
What changes
The GitHub App server had a second job: reading a repository into a Trail brain for assign's "paste a repo URL" onboarding.
POST /brain/accesssaid whether the App could see a repo, andPOST /brain/buildcloned it, built a digest of commits, PR discussion and symbols, and posted it to the Agents platform (agents.nanonets.comby default). Both are removed, along with everything only they used:src/app/brain-build.ts,brain-build-process.ts,brain-build-worker.ts,history.tsandsources.tsserver.ts: the two routes, their test seams, the bearer-secret check, and thebrainBuildSecret,brainBaseUrl,publicTokenandpublicOwnerconfigmain.ts: theGRAFT_BRAIN_BUILD_SECRET,GRAFT_BRAIN_URL,GRAFT_PUBLIC_GITHUB_TOKENandGRAFT_PUBLIC_INSTALLATION_OWNERsettingsidentity.ts:installationFor,publicReadInstallation,repoAccessGapandghHeaderscheckout.ts:checkoutRepository, the plain-repo clone. The pull-request checkout is untouched.docs/github-app.md: the "Reading a repository into a Trail brain" section, its settings table, and the security note about itPR review, the review pages and
/healthzdon't change. The trail CLI isn't touched: it already talks to nothing in assign.GRAFT_BRAIN_URLis still read by the CLI'ssrc/cloud/workspace.ts, as an old alias forTRAIL_URL, which is a separate setting from the App's.Deploying
Nothing changes on the running App until it's redeployed. After a redeploy,
/brain/buildand/brain/accessanswer 404, so anything in assign that still calls them gets a 404 instead of a digest. The four settings above can then come out of the box's environment. No other config change is needed.Tests
app-brain-build-processandapp-sources-context, which only covered the removed code.🤖 Generated with Claude Code