Skip to content

docs(web): document Windows token-file permission behavior - #428

Merged
Jason Robert (jrob5756) merged 2 commits into
mainfrom
fix/425-windows-token-file-mode-test
Aug 13, 2026
Merged

docs(web): document Windows token-file permission behavior#428
Jason Robert (jrob5756) merged 2 commits into
mainfrom
fix/425-windows-token-file-mode-test

Conversation

@jrob5756

Copy link
Copy Markdown
Collaborator

Summary

Documents that the dashboard token file's 0600 mode and the MCP spill-directory chmod hardening are POSIX-only guarantees. On Windows, permission bits aren't honored — files inherit the user-profile NTFS ACL / read-only attribute toggle instead — so this is called out in comments/docs rather than special-cased behind a platform guard, which would also skip existing chmod-failure test coverage.

Closes#425

Jason Robertand others added 2 commits August 13, 2026 09:26
Clarify that the 0600 mode for dashboard token files and MCP spill-dir
chmod hardening are POSIX-only guarantees. On Windows, permission bits
are not honored (files inherit the user-profile ACL / read-only
attribute toggle instead), so this is documented rather than special-
cased with a platform guard, preserving existing chmod-failure test
coverage.
Fix factually-wrong and self-contradictory claims about Windows file-mode
behavior introduced in the previous commit:
- mcp/manager.py: the directory-hardening comment claimed Windows stat()
"always" reports 0o777 (false — a read-only directory reports 0o555 per
CPython's attributes_to_mode), called a chmod that toggles an attribute
a "no-op", and asserted an unconditional NTFS ACL guarantee that does not
hold for a user-configured spill_dir outside the temp root. Rewrote the
comment to be accurate, merged the three previously separate blocks into
one, made the cited test node id grep-able on a single line, and added a
note that a chmod failure on Windows is a genuine anomaly, not expected
noise.
- mcp/manager.py: qualified _spill_full_output's docstring, which pairs
the file mode with "may include secrets" without noting the POSIX-only
caveat the function body now documents.
- web/auth.py: qualified the module docstring's 0600 claim (previously
unqualified 70 lines above the function docstring that was fixed) and
hedged the ACL claim to name the actual dependency (rundir.runs_dir());
removed a duplicate, inconsistent inline comment restating the same
fact as the function docstring.
- docs/cli-reference.md: applied the same ACL hedge to the user-facing
wording.
- AGENTS.md: qualified the 0600 claim and trimmed an overlong parenthetical
naming rottable test details for a fact the test file already documents.
- CHANGELOG.md: qualified the unreleased #397 entry's 0600 claim.
- tests/test_web/test_request_guard.py: restored the
test_written_on_start_with_mode_0600 name dropped in the split, to
preserve continuity with issue #425 and prior CI failure references.
- tests/test_rundir_isolation.py: added a test pinning rundir.runs_dir()
to Path.home()/.conductor/runs, the fact the documented Windows ACL
posture rests on and which no existing test exercised directly.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@jrob5756
Jason Robert (jrob5756) marked this pull request as ready for review August 13, 2026 13:48
@jrob5756
Jason Robert (jrob5756) merged commit cd33903 into mainAug 13, 2026
11 checks passed
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Windows CI is red: token-file test asserts a 0600 mode that Windows cannot produce

1 participant

@jrob5756