Skip to content

feat: multi-repo checks via origin-to-local-checkout mapping (--repo flag + [[repos]] config)#34

Open
laulauland wants to merge 3 commits into
mainfrom
lau/multi-repo-mapping
Open

feat: multi-repo checks via origin-to-local-checkout mapping (--repo flag + [[repos]] config)#34
laulauland wants to merge 3 commits into
mainfrom
lau/multi-repo-mapping

Conversation

@laulauland

Copy link
Copy Markdown
Member

What

Origin-qualified anchors (origin = "github:owner/repo") are currently always reported SKIP when they don't match the current repo. This stack lets a consumer repo map an origin to a local sibling checkout, so those anchors get checked for real: fingerprints recomputed against the neighbor's files, blame from the neighbor's git history.

drift check --repo github:fiberplane/drift=../drift

or persistently:

# .drift/config.toml
version = 1

[[repos]]
origin = "github:fiberplane/drift"
path = "../drift"

Stack (one commit per concern)

  1. feat(config): load .drift/config.toml — extracts the lockfile's TOML-subset machinery into src/toml.zig (behavior-preserving: existing lockfile tests unchanged) and adds src/Config.zig with strict parsing, line-numbered diagnostics, missing-file-is-default. No user-visible change.
  2. feat(check): --repo flagsrc/repo_map.zig (parseSpec/validate/immutable RepoMap), lint resolution at the origin-mismatch branch, blame against the mapped root, new mapped_repo_missing skip reason (a teammate without the sibling checkout degrades to SKIP, never an error). Integration tests run against two real temp git repos.
  3. feat(config): [[repos]] mapping — config entries validated by the same validate as flag specs, buildMerged with CLI-wins precedence; config paths resolve against the lockfile root (checkout-location independent), flag paths against cwd. DECISIONS.md §15 documents the precedence choice.

Each commit leaves zig build test green; the tip relinks drift.lock for the changed bound files (SKILL.md's origin section updated to document the mapping; CLI.md/DESIGN.md were updated within the stack).

Notes

Base automatically changed from lau/fix-zig-symbol-anchors to main June 10, 2026 12:37
@laulauland laulauland force-pushed the lau/multi-repo-mapping branch from 9e4ffa8 to 934387e Compare June 11, 2026 06:53
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.

1 participant