Problem
tool.write can create files with mode 0600 under strict umask environments (for example umask 077), even though tests and behavior expect 0644.
Why this matters
The project expects deterministic write permissions for files created by write paths. Under hardened environments this drift causes test failures and inconsistent behavior.
Reproduction
- Set a strict umask (e.g.
umask 077).
- Run
packages/opencode tests.
- Observe failure in
test/tool/write.test.ts (Expected 0644, Received 0600).
Expected behavior
Files written by tool.write should end up with mode 0644 regardless of process umask.
Problem
tool.writecan create files with mode0600under strict umask environments (for exampleumask 077), even though tests and behavior expect0644.Why this matters
The project expects deterministic write permissions for files created by write paths. Under hardened environments this drift causes test failures and inconsistent behavior.
Reproduction
umask 077).packages/opencodetests.test/tool/write.test.ts(Expected 0644, Received 0600).Expected behavior
Files written by
tool.writeshould end up with mode0644regardless of process umask.