Repository navigation
feat(opencode): wrap the cascade build in the consumer config - #5077
Merged
Merged
Conversation
The consumer takes exactly one opencode: services.opencode.package is the cascade build (openchamber's nested opencode input -- the derivation the module mkDefaults) with Drew's wrapper baked in as bin/opencode via symlinkJoin, so the systemd user service and the home profile share one derivation and bin/mcpx rides along in its tree. The wrapper script is unchanged except its exec target (the cascade build, not the root opencode input -- a second fork build); it leaves home.packages, where it collided with the cascade package on bin/opencode. Drew's ruling, 2026-11-03; code#5038, option A.
developing-today
Bot
requested review from
a team and
dezren39
as code owners
November 3, 2026 18:58
|
Important Review skippedBot user detected. To trigger a single review, invoke the
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implements Drew's ruling on the
bin/opencodecollision (option A, 2026-11-03). His constraint on the shape, from settling the cascade: "Just enable openchamber and take that one" — so the consumer config keepsservices.openchamber.enable = true;untouched and gains exactly one line,services.opencode.package = opencodeWrapped;. No fork changes, no new module options.Mechanism (home/common/default.nix only)
opencodeCascade(new let binding) =inputs.openchamber.inputs.opencode.packages.${system}.opencode— openchamber's nested opencode input, i.e. exactly the derivationservices.opencode.packagedefaults to (the fork's module wrapper mkDefaults the fork flake's ownpackages.<system>.opencode).opencodeWrapper= the formerhome.packagesentry (writeShellScriptBin "opencode"), moved verbatim — Cloudflare/Jules env top-ups, stamp-gatedsync-modelskick — with ONE change: it execs${opencodeCascade}/bin/opencodeinstead of the root input's build.opencodeWrapped=symlinkJoinover the cascade package,postBuildreplacingbin/opencodewith the wrapper. The rest of the tree rides along untouched — above allbin/mcpx, the symlink to the cascade mcpx that the home profile: bin/mcpx collision between fork opencode package and standalone mcpx blocks cascade deploy #5027 settlement relies on (theopencode2alias resolves throughbin/opencodeas it always did, so it now reaches the wrapper too).home.packagesentry is removed (a comment marks the spot). The fork module contributeshome.packages = [ cfg.package ], so the wrapped derivation is the profile's onebin/opencodeprovider.Base:
bca5683bf(main has since advanced by commits that touch nothing underhome/common/).Evidence (at this base; pins: openchamber e1e8bc3d, nested opencode 12acd9f2)
services.opencode.package=/nix/store/4n4b0zcik9bfy9xmw07ipja37m1f3rxs-opencode-2.0.30+12acd9f; the nested-input expression evaluates to the identical path.services.opencode.package=/nix/store/zmh369qk3sg65w0vb6nsb2rg0p1263zs-opencode-2.0.30+12acd9f-wrapped, and the unit's ExecStart is that path +serve --service --hostname 127.0.0.1 --port 13420.bin/opencodeis the wrapper script and its exec line is the cascade path above (the no-override default — equality, not approximation);bin/mcpx->/nix/store/bylp1b5dhw9jh7c1jmwif1gl90648yc0-mcpx-0.1.0/bin/mcpx.home.packagescensus, before -> after: 456 -> 455 entries; the set difference is exactly {-cascade package, -standalone wrapper, +wrapped}.home.activationPackagebuilds GREEN,home-manager-pathincluded; the built generation's profile linksbin/opencodeandbin/mcpxinto the wrapped package, and itsopencode.serviceExecStart is the wrapped path. At this base the chain'sservices.mcpx.addPackageToProfile = false(PR feat(mcpx): ride cascade pins up; laptop profile takes opencode bin/mcpx #5074) is already in, so this was the last collision in the profile — the generation that died in deploy rounds 1-2 now builds.Behavior deltas
JULES_API_KEYreaches the server process for the first time (server-spawnedmcp.juleschildren can resolve{env:JULES_API_KEY}); the Cloudflare block is a no-op there (the systemd manager env already sets the token, and the wrapper only fills when unset). The stamp-gated sync kick can likewise fire on a service start — same once-a-day stamp, detached and silenced, as CLI launches today; the dailysync-modelstimer is unchanged.Closes #5038.
Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.