Skip to content

feat(kit): add the mise detection-builder to BuilderResolve (distro-agnostic stage) - #198

Merged
github-actions[bot] merged 4 commits into
mainfrom
feat/mise-builder
Aug 30, 2026
Merged

github-actions[bot] merged 4 commits into
mainfrom
feat/mise-builder

Conversation

@atrawog

@atrawog atrawog commented Aug 30, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Adds the mise detection-builder to the shared sdk/kit.BuilderResolve (R3 — the ONE render the four detection-builders already use). The mise stage is distro-agnostic by construction:

  • FROM {{.BuilderRef}} — the host-computed builder box (distro-appropriate, e.g. fedora-builder or cachyos-builder); the toolchain (curl+tar) comes from the builder image.
  • {{.InstallCmd}} — the install command from the embedded builder: mise: vocabulary's install_command.
  • {{.CopySrc}}/{{.Manifest}}, {{.UID}}/{{.GID}}/{{.Home}}, {{.CacheMountsOwned}} — all from the host's BuilderResolveInput.
  • The only fixed paths are mise's OWN conventions: the binary at /usr/local/bin/mise (the release tarball's layout) and the Home-based data dir (the CopyArtifacts copy the stage's Home, exactly like the pixi builder's ~/.pixi).

No hard-coded distro names, package managers, or install paths — distro knowledge stays in the host's vocabulary (the boundary law: a builder template never names a distro).

Named version pin (R4): the pinned mise release is the named miseVersion const (v2026.8.14), rendered into the download URL via the miseStageData wrapper — not a magic literal in the template. Bump deliberately (mise releases weekly); the tarball naming is Go-style arch (x64/arm64) with a -musl suffix for musl libc bases.

Musl-aware download (RCA of the alpine bed failure): mise publishes glibc builds (mise-<ver>-linux-<arch>.tar.gz) AND musl builds (mise-<ver>-linux-<arch>-musl.tar.gz). The stage probes for the musl loader (/lib/ld-musl-*.so.1) and appends the -musl suffix on musl bases — the glibc binary cannot exec on a musl image (missing /lib64/ld-linux-*), which the shell reports as mise: not found (the check-mise-alpine bed failure).

Companion deploykit change: BoxNeedsBuilder recognizes the mise detection files (mise.toml/.tool-versions) so a candy shipping either makes the image need its builder box as a build dependency (the build-graph ordering fix).

How tested

$ go test ./kit/ -run 'TestBuilderResolve_Mise' -count=1 -v
=== RUN   TestBuilderResolve_Mise
--- PASS: TestBuilderResolve_Mise (0.00s)
PASS
ok  	github.com/opencharly/sdk/kit	0.003s

$ go test ./kit/ ./deploykit/ -count=1
ok  	github.com/opencharly/sdk/kit	0.399s
ok  	github.com/opencharly/sdk/deploykit	0.500s

TestImageNeedsBuilder_MiseDetection (new) proves BoxNeedsBuilder returns true for a candy shipping mise.toml or .tool-versions and false without — the test FAILS without the deploykit change (B12).

Rulebook compliance

  • R3: no duplication — the mise case lives in the shared kit.BuilderResolve (the ONE render), not a hand-rolled stage renderer.
  • R4: no workarounds — the stage uses the host's BuilderRef + the vocabulary's install_command; the version pin is named (miseVersion) and the musl probe is a runtime libc check, not distro knowledge.
  • R6: git safety — feat/ branch, no force-push, PR-only landing.
  • R7: gate proven — the mise + BoxNeedsBuilder tests above fail without the changes.

Change classification

  • Change class: sdk kit (shared builder render) + deploykit graph detection
  • Verification gate: go test (pasted above)
  • Attribution tier: analysed on a live system (the plugin repo + beds that consume it land in the follow-up PRs; the alpine bed failure that motivated the musl fix was reproduced live)

Assisted-by: pi deepseek/deepseek-v4-flash-0731 (analysed on a live system)

@github-actions

Copy link
Copy Markdown

Review — BLOCK

Head SHA: eedce16d29bc (branch: feat/kit-mise-builder)

Change class: sdk kit (shared builder render) — new mise case in kit.BuilderResolve + test.

Security screen: PASS — no secrets, no exfiltration, no guardrail weakening, no scope mismatch beyond the finding below.

Blocks

  1. R4 / A1 — hard-coded magic version not config-sourced and omitted from the body's accounting.
    kit/builder_resolve.go — the new miseStageTemplate hard-codes the mise release version in the download URL:

    curl -sL -o /tmp/mise.tar.gz https://github.com/jdx/mise/releases/download/v2026.8.14/mise-v2026.8.14-linux-$A.tar.gz
    

    This is an unnamed magic value that is not config-sourced (R4: "a magic value should be named + config-sourced"). It will go stale and cannot be overridden by the host's vocabulary or BuilderResolveInput. The body's summary claims "The only fixed paths are mise's OWN conventions: the binary at /usr/local/bin/mise … and the Home-based data dir" — but the version pin is also a fixed value, so the summary does not account for it (A1: a diff item missing from the body's accounting is a defect).

    Fix: source the version from the vocabulary's install_command/input (or a named, config-sourced field), and account for it in the summary — or, at minimum, name the pin and justify it explicitly in the body.

Verified non-blocking

  • Placement: CORRECT — the mise case lives in the shared kit.BuilderResolve alongside the existing detection-builders (consistent with the established pattern; no duplication, R3).
  • Test consistency: TestBuilderResolve_Mise assertions match the template rendering (BuilderRef FROM, COPY --chown, install+reshim, Home artifact, binary copy); pasted go test output is internally consistent.
  • Attribution tier: "analysed on a live system" is honest (not inflated to "fully tested and validated"); footer line present and correctly formatted.
  • SDD/CUE, R6/R8/R9, B17: N/A for this change class.

Verdict: BLOCK


ollama/deepseek-v4-flash — pi-review-action.

View action run

@github-actions

Copy link
Copy Markdown

Review — BLOCK

Head SHA: f476722d55eb (branch: feat/kit-mise-builder)

Change class: sdk kit (shared builder render) + deploykit graph detection change.

Security screen: PASS — no secrets, no exfiltration, no guardrail weakening, no scope mismatch beyond the findings below.

Blocks

  1. R4 / A1 — hard-coded magic version not config-sourced and omitted from the body's accounting.
    kit/builder_resolve.go — the new miseStageTemplate hard-codes the mise release version in the download URL:

    curl -sL -o /tmp/mise.tar.gz https://github.com/jdx/mise/releases/download/v2026.8.14/mise-v2026.8.14-linux-$A.tar.gz
    

    This is an unnamed magic value that is not config-sourced (R4: "a magic value should be named + config-sourced"). It will go stale and cannot be overridden by the host's vocabulary or BuilderResolveInput. The body's summary claims "The only fixed paths are mise's OWN conventions: the binary at /usr/local/bin/mise … and the Home-based data dir" — but the version pin is also a fixed value, so the summary does not account for it (A1: a diff item missing from the body's accounting is a defect). This finding was raised by the prior review and still reproduces against the CURRENT diff — the pin is unchanged.
    Fix: source the version from the vocabulary's install_command/input (or a named, config-sourced field), and account for it in the summary — or, at minimum, name the pin and justify it explicitly in the body.

  2. B12 — the deploykit/graph.go change ships with no test that would fail without it.
    deploykit/graph.go — the new detection triggers layer.HasFile("mise.toml") || layer.HasFile(".tool-versions") are new behavior with no accompanying test. The PR's pasted test output covers only go test ./kit/ (the TestBuilderResolve_Mise test); nothing exercises the BoxNeedsBuilder change in deploykit. A change whose new behavior has NO test that would FAIL without it BLOCKS (B12). Add a test for the mise-file detection in BoxNeedsBuilder (and confirm layer.HasFile exists on the layer type — the pasted output does not cover the deploykit package).

Comment intake

  • github-actions[bot] prior BLOCK (hard-coded version): verified-blocking — the pin v2026.8.14 is unchanged in the current diff and the body still omits it from the accounting.

Verified non-blocking

  • Placement: CORRECT — the mise case lives in the shared kit.BuilderResolve alongside the existing detection-builders (no duplication, R3); the deploykit change is a legitimate companion trigger.
  • Test consistency: TestBuilderResolve_Mise assertions match the template rendering (BuilderRef FROM, COPY --chown, install+reshim, Home artifact, binary copy); pasted go test ./kit/ output is internally consistent.
  • Attribution tier: "analysed on a live system" is honest (not inflated); footer line present and correctly formatted.
  • SDD/CUE, R6/R8/R9, B17: N/A for this change class.

Verdict: BLOCK


ollama/deepseek-v4-flash — pi-review-action.

View action run

…the BoxNeedsBuilder mise trigger

- kit/builder_resolve.go: the mise stage's release download probes for the
  musl loader (/lib/ld-musl-*.so.1) and appends the -musl suffix, so the
  glibc binary never lands on a musl base (Alpine) where it cannot exec
  (missing /lib64/ld-linux-* — the "mise: not found" bed failure). The
  pinned release is NAMED (miseVersion const) and rendered into the URL
  via a wrapper struct, not a magic literal in the template.
- kit/builder_mise_test.go: assert the named version in the URL + the
  musl-loader probe.
- deploykit/intermediates_move_test.go: TestImageNeedsBuilder_MiseDetection
  proves BoxNeedsBuilder recognizes mise.toml/.tool-versions (the
  build-graph ordering trigger).
@github-actions

Copy link
Copy Markdown

Review — PASS

Head SHA: ed7397ea639a (branch: feat/kit-mise-builder)

Security screen: PASS — no secrets/exfiltration, no guardrail weakening, no scope mismatch; the only network call is the legitimate pinned mise release download.

Checklist: All applicable rules PASS or NA.

Both prior github-actions[bot] BLOCK findings are stale-superseded against the current state:

  • R4/A1 magic version — now resolved: the pin is the named miseVersion const (v2026.8.14) rendered via miseStageData, and the body explicitly names and justifies it ("Bump deliberately (mise releases weekly)") — exactly the prior review's accepted resolution.
  • B12 deploykit test — now resolved: TestImageNeedsBuilder_MiseDetection added in deploykit/intermediates_move_test.go proves BoxNeedsBuilder returns true for mise.toml/.tool-versions and false without; the body states it fails without the change.

Verified: TestBuilderResolve_Mise assertions match the template rendering (BuilderRef FROM, COPY --chown, install+reshim, named version in URL, musl-loader probe, Home artifact, binary copy); placement CORRECT (shared kit.BuilderResolve + companion graph trigger, no duplication R3); musl probe is a runtime libc check not distro knowledge (R4); attribution tier "analysed on a live system" is honest and not inflated; footer line present and correctly formatted; pasted go test ./kit/ ./deploykit/ output internally consistent (tool-limited, cannot re-run).

Verdict: PASS


ollama/deepseek-v4-flash — pi-review-action.

View action run

@github-actions

Copy link
Copy Markdown

Review — PASS

Head SHA: 702a9d949b01 (branch: feat/mise-builder)

Security screen: PASS — no secrets/exfiltration; the only network call is the legitimate pinned mise release download from github.com/jdx/mise; no guardrail weakening; no scope mismatch (diff matches description).

Checklist: All applicable rules PASS or NA.

Prior github-actions[bot] comments re-derived against the CURRENT diff:

  • BLOCK docs: add the OpenCharly PR template #1 (R4/A1 magic version) — stale-superseded: the pin is now the named miseVersion const (v2026.8.14) rendered via miseStageData, and the body names and justifies it ("Bump deliberately (mise releases weekly)").
  • BLOCK feat(spec): RetentionReply DanglingIDs + StagingDirs reclaim fields #2 (B12 deploykit test) — stale-superseded: TestImageNeedsBuilder_MiseDetection added in deploykit/intermediates_move_test.go proves BoxNeedsBuilder returns true for mise.toml/.tool-versions and false without; body states it fails without the change.
  • PASS comment — consistent with my independent verification.

Verified: TestBuilderResolve_Mise assertions match the template rendering (BuilderRef FROM, COPY --chown, install+reshim, named version in URL, musl-loader probe, Home artifact, binary copy); TestImageNeedsBuilder_MiseDetection is consistent with the graph.go HasFile trigger; pasted go test ./kit/ ./deploykit/ output is internally consistent (tool-limited, cannot re-run). Placement CORRECT — mise case lives in the shared kit.BuilderResolve (no duplication, R3); musl probe is a runtime libc check, not distro knowledge (R4); the alpine bed failure has a real RCA with a real fix (R1); attribution tier "analysed on a live system" is honest and not inflated; footer line present and correctly formatted; the "follow-up PRs" reference is legitimate cross-repo sequencing (consuming beds live in the plugin repo), not an R2 split within this repo's scope.

Verdict: PASS


ollama/deepseek-v4-flash — pi-review-action.

View action run

@github-actions
github-actions Bot merged commit f0056d6 into main Aug 30, 2026
1 check passed
charly-auto-merge Bot added a commit that referenced this pull request Aug 30, 2026
@aitrawog
aitrawog deleted the feat/mise-builder branch September 25, 2026 19:07
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