Skip to content

Vendor mindwalk as a reference repo #2

Description

@Dillpickleschmidt

Part of #1

Question

Register cosmtrek/mindwalk in scripts/lib/reference-repos.ts and sync it to .repos/mindwalk via vpr sync:repos, pinned to a specific ref.

.repos/ is tracked in git (12,961 files today) and AGENTS.md describes it as vendored read-only reference: "Prefer their patterns over invented ones. Never edit or import from them." That is exactly the relationship we want with mindwalk — we port from it by hand and diff against it forever to see what we changed and to pull upstream fixes.

Resolved when .repos/mindwalk exists, the sync config names a pinned ref, and the MIT notice (© 2026 Ricko Yu) is preserved. Record the pinned ref in the answer; later tickets cite line numbers against it.

Activity

  1. Dillpickleschmidt commented on Aug 1, 2026

    @Dillpickleschmidt
    OwnerAuthor

    Resolution

    .repos/mindwalk is vendored and pinned at v0.3.0 (upstream commit b9c12798d, squashed in as 4e371ae12). 104 files, MIT notice intact (.repos/mindwalk/LICENSE, © 2026 Ricko Yu).

    Branch chore/vendor-mindwalk-reference, two commits, unpushed:

    • 86e650e26 — chore(scripts): allow reference repos pinned to a fixed ref
    • 205e4778c — the git subtree add --squash

    The machinery needed a change first

    referenceRepos assumed every vendored checkout tracks an installed dependency: the ref is derived as versionTagPrefix + the version string at packageVersionPath inside versionSourcePath. Mindwalk is not a dependency, so there is no version to read.

    That mattered more than it looks. syncReferenceRepos loops sequentially and fails fast, so a repo that cannot resolve a version would have aborted a plain sync:repos for effect-smol and alchemy-effect as well.

    So the version source is now optional. A repo that omits it is pinned, and latestRef is the ref, regardless of --latest. Backwards compatible; the two existing entries are untouched.

    Verified with a full dry run:

    Syncing effect-smol from effect@4.0.0-beta.102 with git subtree pull.
    Syncing alchemy-effect from v2.0.0-beta.65 with git subtree pull.
    Syncing mindwalk from v0.3.0 with git subtree add.
    

    Why v0.3.0 and not main

    Upstream HEAD (e208b6b8) is exactly one commit ahead of the tag, and it is docs: update demo video. So the tag is functionally identical to HEAD, matches the released binary being used as the visual reference, and cannot drift underneath a port whose whole value is diffing against a fixed baseline. Bump deliberately, never with the workspace.

    Tests

    scripts/sync-reference-repos.test.ts: 11 passed, and tsc -p scripts/tsconfig.json is clean.

    Three pre-existing tests referenced versionSourcePath as a required string and needed narrowing. One asserted expectedRepoIds deep-equals a hardcoded ["effect-smol", "alchemy-effect"] — now derived from referenceRepos, so it will not break the next time a repo is added. Added one test covering the pinned path: a repo with no version source resolves to latestRef without touching the filesystem, with and without --latest.

    Line references confirmed against the pinned ref

    Counts cited during charting all hold at v0.3.0: CityScene.tsx 638, TreeScene.tsx 656, treeLayout.ts 169, sceneUtils.ts 144, dirLabels.ts 145, trail.ts 79, textures.ts 60, playback/ 251, types.ts 271, builder.go 520.

    Two refs quoted during charting had drifted and are now corrected in Port the citymap builder to the T3 server: the git ls-files call is builder.go:91 (not :88) and the weight string is builder.go:85 (not :82). Still accurate: target.Weak at builder.go:47, subagentsDir at claudecode/agents.go:41, fileFingerprint cache at server/server.go:59.

    Two incidental notes

    • This clone had no node_modules — the sync script imports @effect/platform-node, so nothing could run or typecheck. Ran vp i per AGENTS.md.
    • Removed the stale git worktree left by the research agent. It was being globbed into test runs as a phantom second copy of this very test file, failing for lack of its own node_modules. The research/tool-call-classification branch is unaffected.
  2. Dillpickleschmidt commented on Aug 1, 2026

    @Dillpickleschmidt
    OwnerAuthor

    Correction — config registration dropped

    Reworked after review. The previous resolution registered mindwalk in scripts/lib/reference-repos.ts, which required making the version source optional across two shared scripts. That divergence is now gone.

    Nothing validates .repos/ against that config — CI only excludes the directory from path filters — so the registration was optional. And registering it was actively counterproductive: mindwalk would then be pulled by every routine sync:repos run, dragging unrelated upstream changes into our history as merge commits at unpredictable times.

    Now: a plain git subtree add, no config entry, no script changes.

    f6d00d61e Merge commit '040f6ee03...' as '.repos/mindwalk'
    040f6ee03 Squashed '.repos/mindwalk/' content from commit b9c12798d
    a83fa5863 (main)
    

    Diff against main is 104 files, all additive under .repos/mindwalk/. Zero changes to shared files, so upstream merges from pingdotgg/t3code have nothing to conflict with. scripts/ is byte-identical to main; sync:repos --dry-run plans the same two repos as before; the 10 original tests pass unmodified.

    How to update mindwalk later

    One command, run deliberately, never automatically:

    git subtree pull --prefix=.repos/mindwalk https://github.com/cosmtrek/mindwalk.git <ref> --squash
    

    The snapshot is v0.3.0 (upstream b9c12798d), recorded in the squash commit message — git log --oneline -- .repos/mindwalk shows what we have and where it came from. There is no pin to maintain: nothing moves it until someone runs that command.

    MIT notice intact at .repos/mindwalk/LICENSE. All line references confirmed against this snapshot, as in the previous comment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions