fix(coordination): accept a sticky /tmp as the namespace parent - #46
Merged
rldyourmnd merged 1 commit intoAug 2, 2026
Merged
Conversation
install --apply could not succeed on any ordinary system:
[error] product coordination namespace parent must be owned by the current user
coordination_root() is Path("/tmp") / f"nddev-zcode-app-bootstrap-locks-{uid}",
and creating it opens /tmp and requires the current user to own it. /tmp is
root-owned everywhere, so the namespace could never be created and every
apply stopped before touching anything. Only a target whose namespace already
existed kept working, which is why this survived: the failure is invisible
until the first genuinely fresh install.
Ownership was the wrong proxy for trust here. A shared temporary root is
root-owned by design; what makes it safe to create a per-uid directory inside
is the sticky bit, which stops one user removing or replacing another's
entries. Accept exactly that shape -- root-owned and sticky -- and nothing
looser, at both the initial check and the re-validation held during the
transaction.
Everything else keeps demanding current-user ownership, including the
namespace directory itself, which stays 0700 and private.
Verified from a normal layout (HOME sandboxed, TMPDIR=/tmp):
install --setup nddev-builder --apply now reports
state=managed setup_id=nddev-builder posture=full-auto and populates the
target. validate_public_contracts.py, fast and platform/ubuntu lanes PASS.
Claude-Session: https://claude.ai/code/session_017fG88hR3mfP7YMFABzbKPB
rldyourmnd
deleted the
fix/accept-sticky-shared-temp-as-coordination-parent
branch
August 2, 2026 00:07
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.
Problem
install --applycould not succeed on any ordinary system:coordination_root()isPath("/tmp") / f"nddev-zcode-app-bootstrap-locks-{uid}", and creating it opens/tmpand requires the current user to own it./tmpis root-owned everywhere, so the namespace could never be created and every apply stopped before touching anything.Only a target whose namespace already existed kept working — which is why this survived. The failure is invisible until the first genuinely fresh install. Reproduced here with no
/tmp/nddev-zcode-app-bootstrap-locks-1000present.Why ownership was the wrong test
A shared temporary root is root-owned by design. What makes it safe to create a per-uid directory inside is the sticky bit, which stops one user removing or replacing another's entries.
The check now accepts exactly that shape — root-owned and sticky — and nothing looser, at both the initial validation and the re-validation held for the duration of the transaction (the second one produced the follow-on
must remain owned by the current userfailure).Everything else still demands current-user ownership, including the namespace directory itself, which stays
0700and private.Verification
From a normal layout — sandboxed
HOME,TMPDIR=/tmp, no pre-existing namespace:cli-tools/validate_public_contracts.py— PASSrun_harnesses.py --module nddev-zcode-app --lane fast— PASSrun_harnesses.py --module nddev-zcode-app --lane platform --platform ubuntu— PASSruff check/ruff format --checkcleanhttps://claude.ai/code/session_017fG88hR3mfP7YMFABzbKPB