Skip to content

fix(sandbox-adapter): read file info without GNU stat - #383

Merged
eersnington merged 1 commit into
mainfrom
fix/sandbox-env-portable-stat
Nov 5, 2026
Merged

eersnington merged 1 commit into
mainfrom
fix/sandbox-env-portable-stat

Conversation

@eersnington

Copy link
Copy Markdown
Member

fileInfo ran stat -c, which BSD stat rejects. Pi's read and edit tools failed with stat: illegal option -- c.

The command now checks for -c on /, then selects the format:

if stat -c %s / >/dev/null 2>&1; then
  stat -c '%F|%s|%Y' -- <path>
else
  stat -f '%HT|%z|%m' -- <path>
fi
stat Flag File type output
GNU, BusyBox -c regular file
BSD -f Regular File (now lowercased)
  • The command does not retry after a failure. GNU stat -f reads the file system, so a retry would replace the path's real error.
  • Results and error codes for callers do not change. Sandboxes still need a stat binary.

@railway-app

railway-app Bot commented Nov 5, 2026

Copy link
Copy Markdown

This PR was not deployed automatically as @eersnington does not have access to the Railway project.

In order to get automatic PR deploys, please add @eersnington to your workspace on Railway.

@eersnington
eersnington merged commit 78e3dc9 into main Nov 5, 2026
9 checks passed
@eersnington
eersnington deleted the fix/sandbox-env-portable-stat branch November 5, 2026 09:05
@eersnington

Copy link
Copy Markdown
Member Author

skipping ci

@github-actions

github-actions Bot commented Nov 5, 2026

Copy link
Copy Markdown

📟 Pip-Boy · f4a832f

📦 Packages · fresh npm install resolve, no lockfile · this PR vs base

No notable install size, dependency, or entrypoint changes across 10 packages.

All 10 packages · linux-x64-gnu
package (linux-x64-gnu) @latest base this PR Δ vs base packages
@rivet-dev/pi 372.5 MB 372.5 MB 372.5 MB +721 B (+0.0%) 218 (0)
@rivet-dev/sandbox-adapter 113.8 KB 113.8 KB 114.5 KB +721 B (+0.6%) 1 (0)
@sandbox-agent/cli-shared 27.2 KB 27.2 KB 27.2 KB 0 1 (0)
@sandbox-agent/persist-indexeddb 12.4 KB 12.4 KB 12.4 KB 0 1 (0)
@sandbox-agent/persist-postgres 12.3 KB 12.3 KB 12.3 KB 0 1 (0)
@sandbox-agent/persist-rivet 12.2 KB 12.2 KB 12.2 KB 0 1 (0)
@sandbox-agent/persist-sqlite 12.3 KB 12.3 KB 12.3 KB 0 1 (0)
@sandbox-agent/react 41.6 MB 41.9 MB 41.9 MB 0 15 (0)
acp-http-client 6.7 MB 6.7 MB 6.7 MB 0 3 (0)
sandbox-agent 31.0 MB 31.0 MB 31.0 MB 0 8 (0)

🧹 Rust dependencies

Skipped: this PR doesn't change any Rust code or dependencies.

🦀 Binaries

Skipped: this PR doesn't change any Rust code.

⏱ Timing

job wall time slowest step
zizmor 15s checkout · 10s
changes 16s checkout · 13s
footprint 3m17s Run pnpm --dir sandbox-agent install --frozen-lockfile · 1m42s
⏭ native · ${{ matrix.platform }} — skipped
⏭ hygiene — skipped
⏭ self-test — skipped
report 22s checkout · 9s
🔭 Full CI trace for this commit

One OpenTelemetry trace of CI and Pip-Boy for f4a832f: every job and step, with the sizes above attached. Run after CI finishes.

pnpm install --frozen-lockfile --filter 'pipboy...'
pnpm --filter pipboy pipboy trace --sha f4a832f398518fccae7bba792e270c341fc60e35

Add --otlp <url> to send it to any OTLP/HTTP collector.

Agent instruction: From a rivet-dev/agents checkout, run the commands above, then read the trace file the last command prints. List the slowest jobs and steps and explain where CI time went.

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