mirror of
https://github.com/kvcache-ai/AgentENV.git
synced 2026-11-05 01:17:36 +00:00
[PR #272] [MERGED] fix(sandbox): honor disabled Firecracker logging #308
Labels
No labels
bug
documentation
enhancement
enhancement
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
kvcache-ai/AgentENV#308
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/kvcache-ai/AgentENV/pull/272
Author: @yingdi-shan
Created: 9/10/2026
Status: ✅ Merged
Merged: 9/10/2026
Merged by: @yingdi-shan
Base:
main← Head:fix/firecracker-logging-default📝 Commits (1)
279ce5bfix(sandbox): honor disabled Firecracker logging📊 Changes
9 files changed (+215 additions, -55 deletions)
View changed files
📝
config/default.toml(+4 -3)📝
docs/src/configuration/reference.md(+2 -2)📝
docs/src/internals/persistence-artifact-inventory.md(+2 -2)📝
docs/src/internals/sandbox-testing.md(+13 -10)📝
src/cfg.rs(+3 -3)📝
src/sandbox/firecracker/config.rs(+10 -3)📝
src/sandbox/firecracker/pool.rs(+19 -12)📝
src/sandbox/firecracker/sandbox.rs(+161 -20)📝
tests/integration/snapshot_attached_drive.rs(+1 -0)📄 Description
What
Honor disabled Firecracker logging for stdout/stderr capture on fresh boots, snapshot restores, and warm process launches. With
firecracker.log_levelunset or empty, launches send stdout/stderr to/dev/nulland create no log files or per-sandbox serial directories.Why
The existing setting disables
firecracker.log, but stdout/stderr files are still opened unconditionally. Silent snapshot launches therefore leave empty persistent directories behind. Issue #260 reports declining sandbox-create throughput as this directory grows.Related issue
Closes #260.
Related proposals: #261 (directory sharding) and #265 (log retention).
Scope and non-goals
Covers logging defaults, cold and warm spawn paths, regression tests, and documentation. Does not add sharding, retention, or cleanup of existing logs.
Design and behavior changes
firecracker.log. Settingserial_diralone does not enable capture. Whitespace-only levels also disable logging.Compatibility and operations
firecracker.log_levelnow controls default serial capture as well as the internal logger. Set it toInfoto retain boot diagnostics and Firecracker logs.Validation
make fmtmake clippymake test-unitmake -C services test(required whenservices/changes)maketargetCommands and results:
The disabled-logging regression failed before the fix because spawning created a log directory. Coverage includes unset/empty/whitespace levels, persistent and work-directory destinations, cold and warm capture, enabled output and relocation, and explicit stream overrides. Builds and tests run as the non-root workspace user with isolated test state.
Skipped checks and reasons:
make test-unitand VM integration suites: validation is focused on Firecracker process output and filesystem behavior; VM boot and the modified volume integration test were not rerun.Risks and reviewer notes
Default startup errors no longer include captured stderr; enable logging when boot diagnostics are needed. Enabled persistent logs still require operator-managed retention, and existing directories are not pruned. Review the capture selection in
sandbox.rsand pool compatibility check inpool.rs.Checklist
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.