Files
stack/packages
code-be-01 34c3744796
ci/woodpecker/pr/ci Pipeline was successful
fix(fleet): resolve-then-validate symlink guard + framework helper resolution (#1380)
M1 guard: secure-file's openFileBeneathRoot no longer refuses every
symlink component. The lexical path must still name the managed root;
symlinks are then resolved hop-by-hop, each hop validated (containment
under the root or a caller-sanctioned additional root such as the brain
home on split-home layouts, current-user ownership, no group/world-write
mode, bounded chain depth), and the O_NOFOLLOW descriptor traversal
walks the symlink-free real path — substitution races after resolution
still refuse. Framework-created layouts that now pass: the roster
symlink config->brain, and rebound-HOME config roots. Escaping,
foreign-owned, loose-mode, and over-deep targets still refuse.

M2 resolver: resolveFleetIdentity no longer hardcodes
<mosaicHome>/tools/tmux/agent-send.sh. The helper is probed across the
framework install homes (mosaicHome, MOSAIC_HOME, default config home),
so a brain-shaped mosaicHome (~/.mosaic, no tools tree) resolves the
helper from the framework config home.

M5a: error text no longer recommends the forbidden
'mosaic update --repair-tools' remedy; guidance names the actual
recovery shape.

Verification unblock: parseFleetRosterV1 tolerates the roster-v2
envelope the fleet's own mutation tooling writes (version 2, top-level
generation fence, defaults.runtime, agent model/reasoning and
lifecycle/launch sub-objects) — validated, opaque to comms semantics.
Without this the #1380 member-positive-control cannot pass on the live
roster.

Tests: resolve-then-validate arms (valid in-root symlink ancestor and
file, split-home sanctioned root, escaping refusal, group-writable
refusal, foreign-ownership refusal via the afterStat race hook, race
substitution arms unchanged green); resolver arms positional with nonce
and no-name controls per the #1380 protocol, helper-not-found names
every searched home; v2-envelope arms; reseed refusal diagnostics
updated. 405 fleet/reseed tests green; typecheck, lint, format clean.
Host-layout verification (read-only, local): 7/7 protocol arms green —
orch-01 member positive control through the roster symlink under both
homes, nonce/no-name controls, jarvis non-member names membership, and
the launcher resolver entry composes the contract.
2026-08-24 14:12:05 -05:00
..