Skip to content

fix(daemon): log host disk-full side-effect failures at warn level - #66

Merged
sagnik11 merged 3 commits into
mainfrom
posthog-self-driving/fixdaemon-stop-reporting-disk-full-side-1ed9e4
Oct 8, 2026
Merged

sagnik11 merged 3 commits into
mainfrom
posthog-self-driving/fixdaemon-stop-reporting-disk-full-side-1ed9e4

Conversation

@posthog

@posthog posthog Bot commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

Problem

  • A full disk on a user's machine becomes an Autter error-tracking issue. The team must triage it, but no Autter code failed.
  • ingest_trace_payload_fast and the command side-effect path log every side-effect failure with tracing::error!. SentryLayer turns each ERROR event into an AutterError exception.
  • The only skip, is_missing_working_dir_error, matches vanished temp repos. It does not match std::io::ErrorKind::StorageFull (ENOSPC on Unix, ERROR_DISK_FULL on Windows).

Changes

  • A new is_storage_full_error classifier selects host disk-full errors. At the two side-effect failure sites, these errors now log at warn level, and SentryLayer does not capture warn-level events.
  • The daemon still calls record_side_effect_error, so family state still shows the failure. Only the log level changes.
  • The warn messages have a separate name (...: host disk is full), so the logs show this environment cause clearly.
Site Before After (disk full)
async side-effect error ERROR → exception WARN, not reported
command side effect failed ERROR → exception WARN, not reported
Other errors at both sites ERROR → exception No change

Note

Out of scope: the async completion log write failed sites can also fail on a full disk, but this change does not touch them. Also, this change does not overlap #64, which widens is_missing_working_dir_error for missing git objects. The two changes edit different functions and can merge in any order.

Testing

  • cargo test --locked --lib -- storage_full_error missing_working_dir_error: 5 passed. This includes the new storage_full_error_detects_disk_full_io_errors test, which uses raw os error 28 on Unix.
  • cargo fmt --check: clean. cargo clippy --locked --lib: no new warnings. The existing warnings are on lines that this change does not touch.
  • Skipped: the full task test daemon-mode suite. CI runs it.

Agent context

  • The report names autter-monorepo, but the daemon code is in this repo.
  • Rejected option: skip disk-full failures in maybe_apply_side_effects_for_applied_command, as the code does for vanished directories. That would return Ok and hide a real side-effect failure from family state. A lower log level keeps the record and removes only the noise.

Created with PostHog Desktop from this inbox report.

🤖 Generated with Claude Code


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.

posthog Bot added 2 commits October 7, 2026 18:50
A full disk on the user's machine (io ErrorKind::StorageFull, ENOSPC) made the
side-effect failure sites log at ERROR level, so the SentryLayer reported it as
an AutterError exception. Add is_storage_full_error and log these failures at
warn level instead. The daemon still records the side-effect error.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

Generated-By: PostHog Desktop
Task-Id: 5ce83de7-5076-4c53-ba66-d8252b6f4349
Both side-effect failure sites had the same warn-or-error block. Move it into
log_side_effect_error. SentryLayer reads only the event level, so the change
does not affect error grouping.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

Generated-By: PostHog Desktop
Task-Id: 5ce83de7-5076-4c53-ba66-d8252b6f4349
…ssifiers

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@sagnik11
sagnik11 marked this pull request as ready for review October 8, 2026 22:11
@sagnik11
sagnik11 merged commit 6cead10 into main Oct 8, 2026
1 check passed
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