Skip to content

Studio: Windows — the answer file's owner, reparse and nonce checks (#936) #946

Backlog

Description

@danielrispler

Parent

#936

What to build

Answering Claude Code from the page works on Windows, and only an answer file the user (or Administrators) owns is accepted. Replaces 01's refusing arm.

  • The open uses FILE_FLAG_OPEN_REPARSE_POINT and refuses a reparse point (in place of O_NOFOLLOW).
  • The open handle's owner SID must be the token user's or BUILTIN\Administrators, whatever the hook's own elevation.
  • The nonce must match. No DACL check.
  • O_NONBLOCK, getuid and the mode check are cfg(unix). Deleting the file with its handle open works through std's delete sharing.

Acceptance criteria

  • Windows-job rows in hook/tests/answer.rs: a reparse point is refused; a file the user owns with the right nonce is accepted; a wrong nonce is refused; the file is deleted after reading.
  • The PR says how the foreign-owner case is checked, or why CI can't make one (a file owned by another account).
  • Each Windows-only test row is shown red (an assertion failure), then green, on Windows runs of this ticket's own pushed issue-* branch, x64 and arm64; Daniel approves the push when auto mode stops it (Spec: Windows Phase 1 — Claude Code recorded on native Windows, x64 and arm64 #936 breakdown, Q41; the rule is in docs/agents/issue-tracker.md once 01 lands). Both run links are in the PR.
  • npm run check and npm run check:windows pass.

Reading

Touches

  • Files: hook/src/answer.rs, hook/tests/answer.rs
  • Session: auto mode
  • Route: strong · effort high — the trust boundary, and an untested edge case: a file owned by another account

Metadata

Metadata

Assignees

No one assigned

    Labels

    ready-for-agentwindows

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions