Skip to content

Preserve project admission errors when cleanup fails #946

Description

@bcdonadio

Observed behavior: acquireProjectChild closes an acquired child inside its catch before rethrowing. If close itself throws, the original authentication/fchmod failure (including undefined) is replaced.

Expected behavior: Retain the causative failure while attempting descriptor cleanup. Continue closing acquired ancestors.

Root cause: src/daemon/project.ts acquireProjectChild existing-child and created-child catch blocks. The shared authenticateOpenPrivateDirectory close-on-error path in src/security-files.ts has the same preexisting shape.

How to reproduce / validate safely: Mock entry authentication/fchmod to reject and the acquired child close to reject independently; assert both remain recoverable and ancestor cleanup occurs. No operational filesystem race reproduction is necessary.

Evidence: Static review of Bug #828 candidate 01dd83b6a927db0355b8589c5e9fbd06a688dfb3 in fix/828-project-directory-topology. This candidate is not yet published; the eventual #828 PR will be linked here. Independent GLM/Grok review and Opus adjudication classified this as nonblocking P2. Recorded as a separate native Bug outside immutable S1; do not absorb into #828.

Environment:

Related remediation PR: #958 (Bug #828). This follow-up remains outside that PR.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Fields

    Priority

    Medium

    Effort

    None yet

    Projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions