Skip to content

7.40.4, Windows: Doctor flags every hook as not executable (chmod +x), testing POSIX exec bits that NTFS never sets (Doctor.ts:632) #2288

Description

@jppattn-lgtm

Version

LifeOS 7.40.4 on Windows 11 (Git for Windows shell, bun).

What is broken

Doctor.ts checks each hook file's stat.mode & 0o111 and reports not executable (chmod +x) when the bits are clear. On Windows, Node's fs.stat reports no exec bits for ordinary files, so every hook shows red although the hooks fire normally: settings.json invokes them through bun, which never consults the mode. #1992 covered the PATH-separator half of Doctor's Windows false reds; this check is the other half and still fires.

Where (file:line)

LIFEOS/TOOLS/Doctor.ts:632: if (!(mode & 0o111)) { problems.push(\${name}: not executable (chmod +x)`); continue; }`

Repro on a clean tree

  1. Fresh 7.40.4 install on Windows.
  2. bun LIFEOS/TOOLS/Doctor.ts lists every hook as not executable (chmod +x).
  3. Start a session: the hooks fire (hook-injected context such as the Algorithm nudge and the drift reminder appears in the turn).

Negative control

bun hooks/<any>.hook.ts runs the file directly with exit 0 regardless of its mode, and the same hooks have been firing on this install since 2026-10-01 while Doctor reported them non-executable every run. The check is informative only where the file is launched as an executable, which the shipped settings.json never does.

Suggested fix

Skip the mode check when process.platform === 'win32' (the bit carries no information there), or test the interpreter line instead of the mode. Untested.

Before submitting

  • I searched open and closed issues for this defect.
  • The repro runs against a clean tree of the version above, not against my modified install.
  • I removed personal data from the pasted output — real names, absolute home paths, tokens, my own content.

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

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions