Make TestDSNFileMode independent of the process umask #220

Merged
weichen merged 1 commits from fix/nonblocking-followups into main 2026-10-19 14:31:22 +00:00
Owner

Make TestDSNFileMode independent of the process umask.

Why:

  • Under umask 0077, os.WriteFile(loose, ..., 0o644) creates a 0600 file, so ResolveDSN accepts it and the "0644 must be rejected" assertion fails locally (CI passes only because its umask is 0022). Recorded as a non-blocking item in the U8 task card.

Evidence:

  • Worker: agent-exec run 4453a2e5e5465aca56a8081251ccd9ca (cursor, attempt 1, success); applied as 965eda5.
  • Host replay (SELF): umask 0077 && go test ./pkg/identity -run ^TestDSNFileMode$ ok; umask 0022 && go test ./pkg/identity ok.

Impact:

  • Test-only: explicit os.Chmod after each write; no production code change.

Refs:

  • Dev task fix/nonblocking-followups
Make TestDSNFileMode independent of the process umask. Why: - Under umask 0077, `os.WriteFile(loose, ..., 0o644)` creates a 0600 file, so `ResolveDSN` accepts it and the "0644 must be rejected" assertion fails locally (CI passes only because its umask is 0022). Recorded as a non-blocking item in the U8 task card. Evidence: - Worker: agent-exec run 4453a2e5e5465aca56a8081251ccd9ca (cursor, attempt 1, success); applied as 965eda5. - Host replay (SELF): `umask 0077 && go test ./pkg/identity -run ^TestDSNFileMode$` ok; `umask 0022 && go test ./pkg/identity` ok. Impact: - Test-only: explicit `os.Chmod` after each write; no production code change. Refs: - Dev task `fix/nonblocking-followups`
weichen added 1 commit 2026-10-19 14:27:25 +00:00
agent-exec transport 4453a2e5e5465aca56a8081251ccd9ca/8b3678a73905
governance / governance (pull_request) Successful in 15s
ci / vet-and-test (pull_request) Successful in 1m10s
965eda5786
weichen merged commit b351fd5d08 into main 2026-10-19 14:31:22 +00:00
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: weichen/Agent-System-Backend#220