Skip to content

server: compaction notes and the fact graph are written owner-only through a unique temporary - #3031

Merged
ashhart merged 2 commits into
mainfrom
security/private-state-files
Nov 13, 2026
Merged

ashhart merged 2 commits into
mainfrom
security/private-state-files

Conversation

@ashhart

@ashhart ashhart commented Nov 12, 2026

Copy link
Copy Markdown
Owner

What this changes

Before: compaction notes and the fact graph were written through a fixed .tmp name with default permissions, following links. After: both go through the atomic file helper, as an owner-only, uniquely named temporary that follows no link.

  • Issue: n/a. SECURITY.md asks for private reports, so there is no public issue.
  • Stacked on: main.
  • atc overlap --json: not run.

Checks on this head

  • Head commit: 4299a43c4fa63671211265c2d6385de192c539cf
  • Lean checker, python3 tools/zig/lean_check.py, on the base and on this head: 345 on the base, 345 on this head, 0 new.
  • Tests run, with the command and pass, fail and skip counts:
    • zig fmt --check on 5 files: passes
    • git diff --check: passes
    • zig build test-server-cpu: 5/5 steps succeeded; 1328/1335 tests passed (7 skipped)
    • zig build check-native-cuda-host compile-flashnext-mtp-parity-host compile-glm-native-open: 11/11 steps succeeded
    • zig build test-golden test-server-security test-pull-security: 76/76 steps succeeded; 37/37 tests passed
  • New tests:
    • security: a conversation note is owner-only and is not written through a planted link
    • security: a folder the note writer makes is the owner's alone
    • security: the fact graph is owner-only and is not written through a planted link
  • CI: runs on this push.
  • Not run, and why: Not run on Linux or Windows. The Linux server compiles. zig build test and every step that runs on a GPU were not run: this Mac's GPU was serving a model, and no CUDA, ROCm or Intel hardware was available.

Receipt

n/a. This change cannot reach inference: it is how two server state files are written.

Checklist

  • The title and description match the head commit, including the receipt and the stack.
  • New tests fail before the change, pass after it, and skip cleanly without their dependency. Main with only this branch's tests added, zig build test-server-cpu: exit 1. 1,325 of 1,335 tests passed, 3 failed: the three new tests.
  • Comments and docstrings are one line. No measurements or history in the source.
  • No personal data, machine names, internal hosts or local paths in the diff or its commits. No AI attribution lines.

Suggested changelog line

Server: compaction notes and the fact graph are written owner-only, through a unique temporary that follows no link.

…rough a unique temporary

Both were written through a fixed .tmp name with default permissions, following links. They now go
through the atomic file helper: an owner-only, uniquely named temporary that follows no link.
@ashhart
ashhart force-pushed the security/private-state-files branch from 4299a43 to 1b6d609 Compare November 13, 2026 00:02
@ashhart
ashhart merged commit 9c8c7bd into main Nov 13, 2026
2 of 10 checks passed
@ashhart
ashhart deleted the security/private-state-files branch November 13, 2026 00:02
Sign up for free to 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.

1 participant