You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 6dfe9da
Browse filesBrowse the repository at this point in the historyBrowse files
tests, docs: REV's follow-ups on the scratch series: the sink_fd rows name their real subject and cause, the capability row's cells are meaningful and disclosed, the predicate scan covers the signed spellings, the docs state the ENOTSUP exception
tests/test_run_json_sink_fd.py: the comment of the unjailed TMPDIR row now says the pre-series failure came from the native writer opening work/bad.sink in the mode-0555 work directory (sink_io), not from TMPDIR; new row test_native_fd_fsize_zero_path_sink_refused_in_read_only_work restores that subject (work 0555, TMPDIR 0755, report_sink_failed sink_io, nothing created); the TMPDIR-cause row runs without an arena, without PINEFORGE_COMMAND_SCRATCH_DIR and PINEFORGE_RUN_JSON_PROFILE, and proves DAC enforcement with an os.open probe first (visible pytest.skip with its reason otherwise). tests/test_default_scratch_effective_credentials.cpp nonroot_row() only (row() and main() unchanged): the setreuid outcome check can fail (EPERM or EINVAL accepted, credentials verified on both branches), the disclosure text is a pure fixture function pinned in test_scratch_capability_parse (every omitted cell "<cell> omitted (<reason>)", "missing, unreadable or malformed"), four more parser cases (0x80, -80, +80, space after the colon). tests/test_scratch_filesystem_predicate.py: the scan and its self-test also cover -2054924042(L) and 0xffffffff858458f6. docs/design/o1-report-contract.md and docs/pages/run-failure-codes.md: one paragraph each states the ENOTSUP exception (no probe, or a real errno 95 from stat/faccessat/statfs, keeps the default candidate as in 1.6.3 with no tmpfs claim and no note; /var/tmp selected without the rejected-candidate note when its probe answers ENOTSUP) and qualifies, with "except as described below", the sentences "A failed filesystem query stops default resolution with its syscall errno and names the failed candidate at every create wrapper; it never permits fallback." and "If creation in the selected `/var/tmp` fails, the detail names that directory, the rejected first candidate and `set TMPDIR to a disk-backed directory`." (o1-report-contract.md) and "A failed query stops resolution with its syscall errno and names the failed candidate." and "failures and all-memory refusals" (run-failure-codes.md); the other sentences keep their words and only their line wrapping changed (same number of lines in each block). No production code changed. Mutations m15 (setreuid EFAULT) and m16 (signed magic).
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Copy file name to clipboardExpand all lines: docs/design/o1-report-contract.md
+14-14Lines changed: 14 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -124,20 +124,20 @@ but no implementation must not be reported as supporting any new mode.
124
124
pages, formatting scratch, indexes and charged I/O windows may not.
125
125
Completion requires a validated complete sink receipt.
126
126
127
-
File-backed scratch for ordinary runs requires disk backing even when no sink
128
-
or scratch directory was configured. The default selector first checks that the
129
-
candidate is a searchable directory, then checks the filesystem type with `statfs`:
130
-
use nonempty `TMPDIR`if disk-backed; when `TMPDIR` is unset
131
-
or empty, retain disk-backed `/tmp` as the legacy first candidate. If that
132
-
candidate is proven tmpfs/ramfs, try `/var/tmp`, also only if disk-backed. A failed
133
-
filesystem query stops default resolution with its syscall errno and names the
134
-
failed candidate at every create wrapper; it never permits fallback. Directory
135
-
names never determine the medium, and tmpfs/ramfs is never silently selected.
136
-
Once a disk-backed candidate is selected, ordinary creation/write failures keep
137
-
their existing failure kinds and errno. Every create wrapper retains its established message prefix and
138
-
appends the directory-selection detail. If creation in the selected `/var/tmp`
139
-
fails, the detail names that directory, the rejected first candidate and
140
-
`set TMPDIR to a disk-backed directory`.
127
+
File-backed scratch for ordinary runs requires disk backing even when no sink or scratch directory was configured.
128
+
The default selector first checks that the candidate is a searchable directory, then checks the filesystem type with `statfs`:
129
+
use nonempty `TMPDIR` if disk-backed; when `TMPDIR` is unset or empty, retain disk-backed `/tmp` as the legacy first candidate.
130
+
If that candidate is proven tmpfs/ramfs, try `/var/tmp`, also only if disk-backed. A failed filesystem query stops default resolution
131
+
with its syscall errno and names the failed candidate at every create wrapper; it never permits fallback, except as described below.
132
+
Directory names never determine the medium, and tmpfs/ramfs is never silently selected. Once a disk-backed candidate is selected,
133
+
ordinary creation/write failures keep their existing failure kinds and errno. Every create wrapper retains its established message prefix
134
+
and appends the directory-selection detail. If creation in the selected `/var/tmp` fails, the detail names that directory, the rejected
135
+
first candidate and `set TMPDIR to a disk-backed directory`, except as described below.
136
+
137
+
An ENOTSUP probe gives no filesystem evidence: use the default candidate as in 1.6.3 (error 0, no tmpfs claim, no refusal note).
138
+
This covers hosts with no probe (neither Linux nor macOS) and real ENOTSUP from stat/faccessat/statfs; the test is by errno value,
139
+
so on Linux ENOTSUP and EOPNOTSUPP are both 95. A FUSE/9p/network mount answering 95 keeps its candidate; a later create failure
140
+
keeps the plain 1.6.3 text. If the first candidate is proven tmpfs/ramfs and /var/tmp answers ENOTSUP, select /var/tmp without the rejected-candidate note.
141
141
142
142
If both default candidates are proven tmpfs/ramfs, refuse with `ENODEV` and
143
143
`scratch requires disk backing`. The failure detail names every candidate tried
Copy file name to clipboardExpand all lines: docs/pages/run-failure-codes.md
+11-11Lines changed: 11 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -242,16 +242,16 @@ per-store arena share carries this same typed verdict, with needed bytes
242
242
computed as the arena size satisfying that store's required extent. A separate
243
243
command byte-budget refusal retains its status-only I/O behavior.
244
244
245
-
File-backed scratch must have disk backing. With no scratch directory configured,
246
-
the engine checks filesystem type with `statfs`, using nonempty`TMPDIR`if
247
-
disk-backed, or the legacy `/tmp` candidate when `TMPDIR` is unset or empty.
248
-
Only a successful query proving that first candidate is tmpfs/ramfs permits
249
-
trying `/var/tmp`, also checked by filesystem type. A failed query stops
250
-
resolution with its syscall errno and names the failed candidate. Directory
251
-
names are not a medium test; tmpfs/ramfs is never silently chosen. If both default
252
-
candidates are proven tmpfs/ramfs, the engine retains `ENODEV` /
253
-
`scratch requires disk backing`, names every candidate tried and its rejection
254
-
reason in the failure detail, and adds `set TMPDIR to a disk-backed directory`.
245
+
File-backed scratch must have disk backing. With no scratch directory configured, the engine checks filesystem type with `statfs`,
246
+
using nonempty `TMPDIR` if disk-backed, or the legacy `/tmp` candidate when`TMPDIR`is unset or empty. Only a successful query proving
247
+
that first candidate is tmpfs/ramfs permits trying `/var/tmp`, also checked by filesystem type. A failed query stops resolution with its
248
+
syscall errno and names the failed candidate, except as described below. Directory names are not a medium test; tmpfs/ramfs is never silently chosen.
249
+
If both default candidates are proven tmpfs/ramfs, the engine retains `ENODEV` / `scratch requires disk backing`, names every candidate tried and its rejection reason in the failure detail, and adds `set TMPDIR to a disk-backed directory`.
250
+
251
+
An ENOTSUP probe gives no filesystem evidence: use the default candidate as in 1.6.3 (error 0, no tmpfs claim, no refusal note).
252
+
This covers hosts with no probe (neither Linux nor macOS) and real ENOTSUP from stat/faccessat/statfs; the test is by errno value,
253
+
so on Linux ENOTSUP and EOPNOTSUPP are both 95. A FUSE/9p/network mount answering 95 keeps its candidate; a later create failure
254
+
keeps the plain 1.6.3 text. If the first candidate is proven tmpfs/ramfs and /var/tmp answers ENOTSUP, select /var/tmp without the rejected-candidate note.
255
255
256
256
An explicit scratch/spill directory is kept as supplied and never falls back;
257
257
explicit tmpfs/ramfs directories are now refused, including command scratch.
@@ -260,7 +260,7 @@ The explicit sink-path refusal
260
260
still requires a sealed arena and never creates a backing file or falls back to
261
261
`TMPDIR`, `/tmp` or `/var/tmp`. File-backed command scratch uses
262
262
`scratch_io_failed` (class `resource`), including default-directory query
263
-
failures and all-memory refusals. Native runs create command scratch at begin,
263
+
failures other than ENOTSUP and all-memory refusals. Native runs create command scratch at begin,
264
264
before strategy callbacks. Report scratch uses `report_sink_failed` with
265
265
`reason: scratch_io`; auxiliary tables use `scratch_io_failed`; sink-path I/O
0 commit comments