Skip to content

docs(design): compass forks-reversal — externalize forks/ to shared RigelBuild repos (RIG-2336) - #434

Merged
mattwilkinsonn merged 2 commits into
mainfrom
compass-repo/rig-2336-forks-reversal-design
Aug 21, 2026
Merged

docs(design): compass forks-reversal — externalize forks/ to shared RigelBuild repos (RIG-2336)#434
mattwilkinsonn merged 2 commits into
mainfrom
compass-repo/rig-2336-forks-reversal-design

Conversation

@rigel-mintaka

Copy link
Copy Markdown
Contributor

Design record for reversing compass's forks/ vendoring: each of the three
vendored subtrees (devenv, nix2container, oh-my-pi) returns to its public
RigelBuild/* repo, and compass consumes it as a pinned github: nix flake input,
removing the subtrees (~7424 tracked files) and their carrying machinery.

Frozen decision (Matt, 2026-08-19): shared RigelBuild/{devenv,nix2container,
oh-my-pi} repos + combined patch work with orion's reversal (RIG-2213), not
compass-own forks. Coordinated the disjoint-patch-ownership contract with forge
(owns nix2container fix + scaffolding; compass owns devenv containers.nix patch).

Ships as its own PR per skill://design; freezes on merge; impl lanes (L0-L4)
are filed from the frozen record. Two load-bearing Open Questions for Matt:
oh-my-pi drop-vs-consume, and the raw-CLI pin shape (rev-literal vs one lockfile).

Refs RIG-2336

Co-authored-by: Matt Wilkinson matt@rigel.build

@linear-code

linear-code Bot commented Aug 19, 2026

Copy link
Copy Markdown

RIG-2336

@github-actions

github-actions Bot commented Aug 19, 2026

Copy link
Copy Markdown

Compass engineering docs preview: https://compass-repo-rig-2336-forks.compass-eng-docs.pages.dev

Deployed from compass-repo/rig-2336-forks-reversal-design at 3d93013.

Changed pages:

…igelBuild repos (RIG-2336)

Design record for reversing compass's forks/ vendoring: each of the three
vendored subtrees (devenv, nix2container, oh-my-pi) returns to its public
RigelBuild/* repo, and compass consumes it as a pinned github: nix flake input,
removing the subtrees (~7424 tracked files) and their carrying machinery.

Frozen decision (Matt, 2026-08-19): shared RigelBuild/{devenv,nix2container,
oh-my-pi} repos + combined patch work with orion's reversal (RIG-2213), not
compass-own forks. Coordinated the disjoint-patch-ownership contract with forge
(owns nix2container fix + scaffolding; compass owns devenv containers.nix patch).

Ships as its own PR per skill://design; freezes on merge; impl lanes (L0-L4)
are filed from the frozen record. Two load-bearing Open Questions for Matt:
oh-my-pi drop-vs-consume, and the raw-CLI pin shape (rev-literal vs one lockfile).

Refs RIG-2336

Co-authored-by: Matt Wilkinson <matt@rigel.build>
rigel-mintaka added a commit that referenced this pull request Aug 19, 2026
…nt main

Folds the PR #434 review findings into the RIG-2336 forks-reversal record:

- HIGH: add tools/agent-image-env-gate/ to the L1/L2 consumer inventory. It is a registered moon project that both globs /forks/{devenv,nix2container}/** for affected-detection and invokes the fork CLIs raw (index.ts:100,118), so a repoint that omits it leaves dead input globs (silently disabling the fail-closed gate) and dangling path:../forks/* CLI refs (reddening main). index.ts:118 is also an OQ2 divergence site.
- Re-ground planning-evidence base 7d77f50 -> 13a43ce (current main; #420/#429 landed). Correct drifted .moon/workspace.yml (78/79/80-83) and agent-image/moon.yml (69/70) citations.
- L3: the generated header at credential_keys_gen.go:3 comes from a hardcoded literal at gen_credential_keys.go:74, not from schemaRelPath:42 — add :74 to the edit list (regeneration alone re-emits the deleted path). Pin the npm schema path to the resolved packages/compass-agent/node_modules/ location (not top-level hoisted). Reword the byte-identity expectation: v17.1.8 vendored vs 16.5.2 npm is a major gap, so expect a denylist diff and re-review the TestCredentialKeysMatchSchema want set in the same PR.

Refs RIG-2336

Co-authored-by: Matt Wilkinson <matt@rigel.build>
@rigel-mintaka
rigel-mintaka force-pushed the compass-repo/rig-2336-forks-reversal-design branch from adf6e72 to ea32461 Compare August 19, 2026 22:32
rigel-mintaka added a commit that referenced this pull request Aug 19, 2026
…nt main

Folds the PR #434 review findings into the RIG-2336 forks-reversal record.

Round 1 (1 HIGH + 3 MEDIUM + 2 LOW):

- HIGH: add tools/agent-image-env-gate/ to the L1/L2 consumer inventory. It is a registered moon project that both globs /forks/{devenv,nix2container}/** for affected-detection and invokes the fork CLIs raw (index.ts:100,118), so a repoint that omits it leaves dead input globs (silently disabling the fail-closed gate) and dangling path:../forks/* CLI refs (reddening main). index.ts:118 is also an OQ2 divergence site.
- Re-ground planning-evidence base 7d77f50 -> 13a43ce (current main; #420/#429 landed). Correct drifted .moon/workspace.yml (78/79/80-83) and agent-image/moon.yml (69/70) citations.
- L3: the generated header at credential_keys_gen.go:3 comes from a hardcoded literal at gen_credential_keys.go:74, not from schemaRelPath:42 — add :74 to the edit list (regeneration alone re-emits the deleted path). Pin the npm schema path to the resolved packages/compass-agent/node_modules/ location (not top-level hoisted). Reword the byte-identity expectation: v17.1.8 vendored vs 16.5.2 npm is a major gap, so expect a denylist diff and re-review the TestCredentialKeysMatchSchema want set in the same PR.

Round 2 (2 LOW prose-accuracy folds):

- Narrow the "no Renovate" claim: the only renovate.json is upstream's inside forks/devenv/.github/ (no compass workflow runs it; L2 deletes it with the subtree) — not "none anywhere in this checkout".
- L4: delete the dangling shared fork-projects comment block .moon/workspace.yml:64-77 once all three -fork entries are gone; cover the markdownlint-cli2 rationale comment (:5-6) alongside the ignore entry (:23). Add agent-image/moon.yml:5,38 (path:../forks/devenv example + cwd-rationale comment) to the L2 comment sweep.

Refs RIG-2336

Co-authored-by: Matt Wilkinson <matt@rigel.build>
@rigel-mintaka
rigel-mintaka force-pushed the compass-repo/rig-2336-forks-reversal-design branch from ea32461 to 1d26828 Compare August 19, 2026 22:50
rigel-mintaka added a commit that referenced this pull request Aug 20, 2026
…nt main

Folds the PR #434 review findings into the RIG-2336 forks-reversal record.

Round 1 (1 HIGH + 3 MEDIUM + 2 LOW):

- HIGH: add tools/agent-image-env-gate/ to the L1/L2 consumer inventory. It is a registered moon project that both globs /forks/{devenv,nix2container}/** for affected-detection and invokes the fork CLIs raw (index.ts:100,118), so a repoint that omits it leaves dead input globs (silently disabling the fail-closed gate) and dangling path:../forks/* CLI refs (reddening main). index.ts:118 is also an OQ2 divergence site.
- Re-ground planning-evidence base 7d77f50 -> 13a43ce (current main; #420/#429 landed). Correct drifted .moon/workspace.yml (78/79/80-83) and agent-image/moon.yml (69/70) citations.
- L3: the generated header at credential_keys_gen.go:3 comes from a hardcoded literal at gen_credential_keys.go:74, not from schemaRelPath:42 — add :74 to the edit list (regeneration alone re-emits the deleted path). Pin the npm schema path to the resolved packages/compass-agent/node_modules/ location (not top-level hoisted). Reword the byte-identity expectation: v17.1.8 vendored vs 16.5.2 npm is a major gap, so expect a denylist diff and re-review the TestCredentialKeysMatchSchema want set in the same PR.

Round 2 (2 LOW prose-accuracy folds):

- Narrow the "no Renovate" claim: the only renovate.json is upstream's inside forks/devenv/.github/ (no compass workflow runs it; L2 deletes it with the subtree) — not "none anywhere in this checkout".
- L4: delete the dangling shared fork-projects comment block .moon/workspace.yml:64-77 once all three -fork entries are gone; cover the markdownlint-cli2 rationale comment (:5-6) alongside the ignore entry (:23). Add agent-image/moon.yml:5,38 (path:../forks/devenv example + cwd-rationale comment) to the L2 comment sweep.

Cross-lane (forge, verified against orion at source):

- OQ2 (rev-pin shape): narrow it. orion has frozen the nix-flake-input class as github:RigelBuild/<fork> pinned via lockfile (oss-fork-github-native-reversal.md:142-155 — the deliberate default + RIG-1860 whole-repo-narHash fix), so compass's one flake-input consumer (agent-image/devenv.lock) converges with no reason to diverge. The genuinely open half is compass-specific: the six raw-CLI sites that bypass devenv.lock (orion has no raw-CLI equivalent). Recommendation stays a compass-side re-export flake; the coherent alternative is orion's literal style + a CI rev-equality assert. Matt rules only the raw-CLI shape.
- L0a devenv base rev afed7bf3 confirmed matching orion (devenv.lock:33).

Refs RIG-2336

Co-authored-by: Matt Wilkinson <matt@rigel.build>
@rigel-mintaka
rigel-mintaka force-pushed the compass-repo/rig-2336-forks-reversal-design branch from 1d26828 to c29d0ad Compare August 20, 2026 00:36
rigel-mintaka added a commit that referenced this pull request Aug 20, 2026
…nt main

Folds the PR #434 review findings into the RIG-2336 forks-reversal record.

Round 1 (1 HIGH + 3 MEDIUM + 2 LOW):

- HIGH: add tools/agent-image-env-gate/ to the L1/L2 consumer inventory. It is a registered moon project that both globs /forks/{devenv,nix2container}/** for affected-detection and invokes the fork CLIs raw (index.ts:100,118), so a repoint that omits it leaves dead input globs (silently disabling the fail-closed gate) and dangling path:../forks/* CLI refs (reddening main). index.ts:118 is also an OQ2 divergence site.
- Re-ground planning-evidence base 7d77f50 -> 13a43ce (current main; #420/#429 landed). Correct drifted .moon/workspace.yml (78/79/80-83) and agent-image/moon.yml (69/70) citations.
- L3: the generated header at credential_keys_gen.go:3 comes from a hardcoded literal at gen_credential_keys.go:74, not from schemaRelPath:42 — add :74 to the edit list (regeneration alone re-emits the deleted path). Pin the npm schema path to the resolved packages/compass-agent/node_modules/ location (not top-level hoisted). Reword the byte-identity expectation: v17.1.8 vendored vs 16.5.2 npm is a major gap, so expect a denylist diff and re-review the TestCredentialKeysMatchSchema want set in the same PR.

Round 2 (2 LOW prose-accuracy folds):

- Narrow the "no Renovate" claim: the only renovate.json is upstream's inside forks/devenv/.github/ (no compass workflow runs it; L2 deletes it with the subtree) — not "none anywhere in this checkout".
- L4: delete the dangling shared fork-projects comment block .moon/workspace.yml:64-77 once all three -fork entries are gone; cover the markdownlint-cli2 rationale comment (:5-6) alongside the ignore entry (:23). Add agent-image/moon.yml:5,38 (path:../forks/devenv example + cwd-rationale comment) to the L2 comment sweep.

Cross-lane (forge, verified against orion at source):

- OQ2 (rev-pin shape): narrow it. orion's frozen class table (oss-fork-github-native-reversal.md:142-147) has four import classes (flake-input, standalone-executable, GHCR-image, no-consumer) but NO raw-CLI-bypass class, so its flake-input default (github:RigelBuild/<fork> pinned via lockfile, :142-155, +RIG-1860 narHash fix) settles compass's one flake input (agent-image/devenv.lock) but not the six raw-CLI sites that bypass devenv.lock. The still-open half is compass-specific. Recommendation stays a compass-side re-export flake (no orion analog); the coherent alternative — literals + a CI rev-equality assert — mirrors orion's terraform-provider release-pin pattern (:145,166-178: pinned non-flake consumption, committed sha256 verified at build time). Matt rules only the raw-CLI shape.
- L0a devenv base rev afed7bf3 confirmed matching orion (devenv.lock:33).

Refs RIG-2336

Co-authored-by: Matt Wilkinson <matt@rigel.build>
@rigel-mintaka
rigel-mintaka force-pushed the compass-repo/rig-2336-forks-reversal-design branch from c29d0ad to 798253b Compare August 20, 2026 00:40
…nt main

Folds the PR #434 review findings into the RIG-2336 forks-reversal record.

Round 1 (1 HIGH + 3 MEDIUM + 2 LOW):

- HIGH: add tools/agent-image-env-gate/ to the L1/L2 consumer inventory. It is a registered moon project that both globs /forks/{devenv,nix2container}/** for affected-detection and invokes the fork CLIs raw (index.ts:100,118), so a repoint that omits it leaves dead input globs (silently disabling the fail-closed gate) and dangling path:../forks/* CLI refs (reddening main). index.ts:118 is also an OQ2 divergence site.
- Re-ground planning-evidence base 7d77f50 -> 13a43ce (current main; #420/#429 landed). Correct drifted .moon/workspace.yml (78/79/80-83) and agent-image/moon.yml (69/70) citations.
- L3: the generated header at credential_keys_gen.go:3 comes from a hardcoded literal at gen_credential_keys.go:74, not from schemaRelPath:42 — add :74 to the edit list (regeneration alone re-emits the deleted path). Pin the npm schema path to the resolved packages/compass-agent/node_modules/ location (not top-level hoisted). Reword the byte-identity expectation: v17.1.8 vendored vs 16.5.2 npm is a major gap, so expect a denylist diff and re-review the TestCredentialKeysMatchSchema want set in the same PR.

Round 2 (2 LOW prose-accuracy folds):

- Narrow the "no Renovate" claim: the only renovate.json is upstream's inside forks/devenv/.github/ (no compass workflow runs it; L2 deletes it with the subtree) — not "none anywhere in this checkout".
- L4: delete the dangling shared fork-projects comment block .moon/workspace.yml:64-77 once all three -fork entries are gone; cover the markdownlint-cli2 rationale comment (:5-6) alongside the ignore entry (:23). Add agent-image/moon.yml:5,38 (path:../forks/devenv example + cwd-rationale comment) to the L2 comment sweep.

Cross-lane (forge, verified against orion at source):

- OQ2 (rev-pin shape): narrow it. orion's frozen class table (oss-fork-github-native-reversal.md:142-147) has four import classes (flake-input, standalone-executable, GHCR-image, no-consumer) but NO raw-CLI-bypass class, so its flake-input default (github:RigelBuild/<fork> pinned via lockfile, :142-155, +RIG-1860 narHash fix) settles compass's one flake input (agent-image/devenv.lock) but not the six raw-CLI sites that bypass devenv.lock. The still-open half is compass-specific. Recommendation stays a compass-side re-export flake (no orion analog); the coherent alternative — literals + a CI rev-equality assert — mirrors orion's terraform-provider release-pin pattern (:145,166-178: pinned non-flake consumption, committed sha256 verified at build time). Matt rules only the raw-CLI shape.
- L0a devenv base rev afed7bf3 confirmed matching orion (devenv.lock:33).
- nix2container prerequisite CLEARED (forge #1483-merge ping, re-verified at source): orion PR #1483 (RIG-2215) merged 2026-08-19 (mergeCommit f561bd97, via gh api); the canonical fork RigelBuild/nix2container main is at rev 8f4a6fd7b10abaeeddff6c4d8bb4908c5123c90c (git ls-remote, public) — upstream master plus the one relocated-copyToRoot-paths patch, the same nix-DB-drop fix compass carries at forks/nix2container/default.nix:386-395. Folded: L0b marked done with the concrete rev; L1 consume target pinned to 8f4a6fd7 (Matt's one-fork-per-upstream — consume the shared repo, no duplicate); the RIG-2332 arm64-builder block recorded as resolved; dependency/execution-order note updated (L1 no longer gated on an open-ended external block).

Refs RIG-2336

Co-authored-by: Matt Wilkinson <matt@rigel.build>
@rigel-mintaka
rigel-mintaka force-pushed the compass-repo/rig-2336-forks-reversal-design branch from 798253b to 3d93013 Compare August 20, 2026 04:27
@mattwilkinsonn
mattwilkinsonn merged commit 9d48f9a into main Aug 21, 2026
4 checks passed
@mattwilkinsonn
mattwilkinsonn deleted the compass-repo/rig-2336-forks-reversal-design branch August 21, 2026 04:17
rigel-mintaka added a commit that referenced this pull request Aug 21, 2026
The frozen forks-reversal record (PR #434, merged 9d48f9a) shipped with its two
load-bearing Open Questions unresolved — the pre-freeze ruling gate did not run
before merge. A frozen record is never edited in place (skill://design: no
folding-in after merge; a later change adds a new record), so this amendment
records the binding rulings that supersede the frozen record's OQ1 and OQ2.

- OQ1 (oh-my-pi): CONSUME a Rigel-tagged npm release — cut a Rigel-owned tagged
  npm release of the coding-agent package and repoint the credential-denylist
  generator to consume it. A third shape distinct from the frozen record's
  recommended "drop + upstream npm" and its "github: repo pin" fallback; the
  denylist tracks a Rigel-cut release. Shapes L3.
- OQ2 (raw nix run sites): INSTALL the fork tools, pinned. The six raw-CLI sites
  that bypass devenv.lock install the fork devenv + skopeo-nix2container from the
  lockfile-pinned github:RigelBuild/<fork> input and invoke by explicit name — no
  raw `nix run path:...` / `<rev>` literal remains. Pin lives in one place (the
  lockfile); dissolves the drift problem rather than gating it with a wrapper
  flake or a CI assert. Shapes L1/L2.

OQ3 (non-load-bearing) and L0a/L0b/L4 unchanged from the frozen record.

Refs RIG-2336

Co-authored-by: Matt Wilkinson <matt@rigel.build>
rigel-mintaka added a commit that referenced this pull request Aug 21, 2026
The frozen forks-reversal record (PR #434, merged 9d48f9a) shipped with its two
load-bearing Open Questions unresolved — the pre-freeze ruling gate did not run
before merge. A frozen record is never edited in place (skill://design: no
folding-in after merge; a later change adds a new record), so this amendment
records the binding rulings that supersede the frozen record's OQ1 and OQ2.

- OQ1 (oh-my-pi): CONSUME a Rigel-tagged npm release — cut a Rigel-owned tagged
  npm release of the coding-agent package and repoint the credential-denylist
  generator to consume it. A third shape distinct from the frozen record's
  recommended "drop + upstream npm" and its "github: repo pin" fallback; the
  denylist tracks a Rigel-cut release. Shapes L3.
- OQ2 (raw nix run sites): INSTALL the fork tools, pinned. The six raw-CLI sites
  that bypass devenv.lock install the fork devenv + skopeo-nix2container from the
  lockfile-pinned github:RigelBuild/<fork> input and invoke by explicit name — no
  raw `nix run path:...` / `<rev>` literal remains. Pin lives in one place (the
  lockfile); dissolves the drift problem rather than gating it with a wrapper
  flake or a CI assert. Shapes L1/L2.

OQ3 (non-load-bearing) and L0a/L0b/L4 unchanged from the frozen record.

Refs RIG-2336

Co-authored-by: Matt Wilkinson <matt@rigel.build>
mattwilkinsonn added a commit that referenced this pull request Aug 21, 2026
…450)

The frozen forks-reversal record (PR #434, merged 9d48f9a) shipped with its two
load-bearing Open Questions unresolved — the pre-freeze ruling gate did not run
before merge. A frozen record is never edited in place (skill://design: no
folding-in after merge; a later change adds a new record), so this amendment
records the binding rulings that supersede the frozen record's OQ1 and OQ2.

- OQ1 (oh-my-pi): CONSUME a Rigel-tagged npm release — cut a Rigel-owned tagged
  npm release of the coding-agent package and repoint the credential-denylist
  generator to consume it. A third shape distinct from the frozen record's
  recommended "drop + upstream npm" and its "github: repo pin" fallback; the
  denylist tracks a Rigel-cut release. Shapes L3.
- OQ2 (raw nix run sites): INSTALL the fork tools, pinned. The six raw-CLI sites
  that bypass devenv.lock install the fork devenv + skopeo-nix2container from the
  lockfile-pinned github:RigelBuild/<fork> input and invoke by explicit name — no
  raw `nix run path:...` / `<rev>` literal remains. Pin lives in one place (the
  lockfile); dissolves the drift problem rather than gating it with a wrapper
  flake or a CI assert. Shapes L1/L2.

OQ3 (non-load-bearing) and L0a/L0b/L4 unchanged from the frozen record.

Refs RIG-2336

Co-authored-by: Matt Wilkinson <matt@rigel.build>
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