Apply [bootstrap.packages] at provisioning time via a root package applier #276
No reviewers
Labels
No labels
Agent
Ignore
Agent
In Progress
Agent
Planned
Agent
Planning
Agent
Ready
Agent
Triage
Compat
Breaking
Kind
Bug
Kind
Documentation
Kind
Enhancement
Kind
Feature
Kind
Security
Kind
Testing
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Status
Abandoned
Status
Blocked
Status
Need More Info
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
lucas/omp-deck!276
Loading…
Reference in a new issue
No description provided.
Delete branch "agent/issue-274-bootstrap-packages"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes: #274
A workspace's mise config could declare
[bootstrap.packages]and nothing ever installed them —mise installapplies only[tools]and exits 0, so the workspace reportedokwhile the project's headers and.pcfiles were absent.What it does
packages/mise-apply(new workspace package) is the single place that builds the privileged mise command lines: inspect withbootstrap packages status --json/bootstrap files status --json, applyfilesthenpackages, then verify withbootstrap packages status --missing. Nothing declared → nothing runs. A failingfiles applystops before packages. Applies are serialised process-wide (the dpkg lock is machine-wide). Only those two parts are applied through their own subcommands — nevermise bootstrap --only …, which would also run the config's hooks and itsbootstraptask.apps/packages(new app) is the root-side applier:POST /applywith a workspace id on a unix socket (OMP_PACKAGES_SOCKET, default/run/omp-packages/packages.sock). The id is validated against^[A-Za-z0-9_-]{1,64}$before any path is derived; the scratch root is built here, never taken from the wire. It is the one process the entrypoint does not drop privileges for.apps/server/src/mise/packages-client.tsdials that socket and falls back to applying in-process when it is absent (bare metal, dev). A daemon that answered is never retried through the fallback.mise installand reports the outcome in a newMiseStatus.packages, absent when the config declares nothing. A package failure never fails or blocks the tools install.packages: <phase> · <keys>plus the error; docs indocs/configuration.mdanddocs/deployment.md;OMP_PACKAGES_SOCKETin the env schema;@omp-deck/mise-applybundled for the published package (prepack.mjsBUNDLED).Verification
bun run typecheckclean,bun test1710 pass / 0 fail (new tests:packages/mise-apply,apps/packages,apps/server/src/mise/system-context.test.ts).[tools]→{"declared":false,"ok":true,"applied":[]}, no apply command run;apt:libwireplumber-0.5-devplus a[bootstrap.files]entry →{"declared":true,"ok":false,"applied":["apt:libwireplumber-0.5-dev"],"error":"mise ERROR sudo not found. Re-run this mise command as root…"}— i.e. the unprivileged fallback path behaves as designed and the package keys parse out of the real JSON ({"<manager>":{"packages":[{"package":…}]}}).The plan's two "confirm first" assumptions are settled: the status JSON shape is as above, and
trusted_config_paths(set viaMISE_TRUSTED_CONFIG_PATHS, plusMISE_YES=1) is a global-only setting with no owner-uid check in mise's trust model, so root reading a config owned by the deck's UID needs no copy step.Not verified here, because it needs a built image and a root container: the end-to-end container run (a real apt install reaching
packages: ok, and re-application after--force-recreate).Deliberate property
The applier has no policy gate — it applies whatever the workspace's mise config declares, and an agent can write that config. A workspace config can therefore run code as root in the container (apt maintainer scripts,
[bootstrap.files]templates callingexec()), which makes the broker's UID separation advisory for an agent working in such a workspace. This is stated indocs/configuration.md,docs/deployment.md, the entrypoint header and the CHANGELOG.