Files
multica/server
Bowserandmultica-agent 254a02a795 MUL-5799: feat(daemon): allow relocating per-task temp dirs via MULTICA_AGENT_TEMP_BASE (#6481)
* feat(daemon): allow relocating per-task temp dirs via MULTICA_AGENT_TEMP_BASE (#6475)

On Linux/macOS the private per-task temp dir was always created under
/tmp and the daemon's own TMPDIR was ignored, so a self-hosted operator
could not move agent temp data to a larger disk.

When MULTICA_AGENT_TEMP_BASE is set, it must be an absolute path to an
existing directory and is used as the MkdirTemp base; invalid values
fail task startup with a clear error instead of silently falling back.
Unset keeps the previous platform default byte-for-byte. Random naming,
0700 permissions, TMPDIR/TMP/TEMP injection, the agent custom_env
blocklist, and task-exit cleanup are unchanged. Windows is untouched.

Co-authored-by: multica-agent <[email protected]>

* feat(daemon): validate MULTICA_AGENT_TEMP_BASE is writable (#6475)

An existing directory the daemon cannot write to still failed task
startup, but as a bare mkdir error from deeper in the run. Probe
writability while resolving the base so the failure names the variable
the operator set. The probe runs only when the variable is set, leaving
the default /tmp path byte-for-byte unchanged.

Cover the contract at the level operators experience it: an unusable
base fails runTask with a message naming the variable, and the agent
never starts. Also restore the environment in the unset subtest, which
previously called os.Unsetenv without a matching restore and could leak
into later tests in the package.

Co-authored-by: multica-agent <[email protected]>

* chore: remove accidentally committed commitmsg.txt (#6475)

A commit message draft was swept into the previous commit by git add -A. It is not part of the product surface and does not belong in the tree.

Co-authored-by: multica-agent <[email protected]>

* docs: scope the sun_path limit to Unix-socket platforms (#6475)

The 108/104 byte sun_path ceiling only constrains platforms that use Unix domain sockets; the previous phrasing read as a cross-platform rule.

Co-authored-by: multica-agent <[email protected]>

* fix(daemon): address temp base review feedback (#6475)

Keep MULTICA_AGENT_TEMP_BASE Unix-only, use the real task directory creation as the sole writability check, and wrap configured-base failures with the variable name. Remove the diagnostic probe and its possible residue path.

Add the missing localized documentation and pin private task directory permissions at 0700 in tests.

Co-authored-by: multica-agent <[email protected]>

---------

Co-authored-by: multica-agent <[email protected]>
2026-08-13 12:23:59 +08:00
..