Skip to content

fix(storage): report incomplete SQLite temp-spill census - #4730

Closed
ScriptedAlchemy wants to merge 1 commit into
masterfrom
fix/4152-sqlite-spill-census-coverage
Closed

ScriptedAlchemy wants to merge 1 commit into
masterfrom
fix/4152-sqlite-spill-census-coverage

Conversation

@ScriptedAlchemy

@ScriptedAlchemy ScriptedAlchemy commented Nov 3, 2026 •

Copy link
Copy Markdown
Owner

Root cause

Refs #4152 and #4099 (partial storage-footprint observability).

The existing Linux /proc/self/fd SQLite temp-spill census silently discarded directory-entry, symlink-target and metadata read failures, then returned unavailable_entry_count: 0. If an FD could not be inspected, the returned byte count was only a lower bound but Doctor could label that within-budget count HealthyCompleteCoverage. This is misleading precisely when unlinked etilqs_* files are being investigated.

Fix

  • Account for unreadable directory entries, non-NotFound FD-link inspection errors and non-NotFound metadata failures in the existing footprint's unavailable_entry_count; do not add a parallel census or bypass its typed finding authority.
  • Continue excluding FDs that close between enumeration and observation: NotFound is not an open-space leak.
  • Preserve the byte lower bound. The existing footprint_findings maps an incomplete within-budget census to Partial, while a lower bound already above budget remains Degraded.
  • Do not change budget values, file lifetime, pruning, admission, or retention.

Regression coverage

A Unix fixture passes a controlled FD directory through the production census and actual Doctor finding projection. One recognized unlinked SQLite temp file contributes 24 MiB, one unreadable FD entry makes coverage partial, and a vanished descriptor contributes neither space nor false unavailability. With a 1 MiB bound, the same incomplete census still reports Degraded. The existing complete-coverage and over-budget temp-spill tests remain intact.

Validation

Inspected the production census, Doctor caller, and typed bounded_finding mapping; verified this isolated one-file change against the current master base, including the published source blob and unchanged other paths. No Rust compilation, rustfmt, or regression execution was possible locally: this runner has no checkout or Bazel/Rust toolchain. Hosted CI should run //crates/tracedecay-maintenance:unit_test and the repository formatting gate on this PR's isolated head before merge. No live Linux temp-spill reproduction or performance/size improvement is claimed.

Remaining issue scope

This improves the truthfulness of Linux temp-spill census coverage, not SQLite TEMP memory corruption, source attribution of SQL spills, macOS unlinked-file measurement, cleanup, the 153 GB profile-retention incident, or the requested 24-hour bounded-growth acceptance. Both issues remain open. The independent PR repair/merge automation owns CI and merging.


Devin Review

@changeset-bot

changeset-bot Bot commented Nov 3, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 4929d75

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Devin Review

@ScriptedAlchemy

Copy link
Copy Markdown
Owner Author

Consolidated into #4742 (integrate/open-pull-requests) at the captured head shown in its description, as requested. Continue review and further fixes on #4742. This closure does not assert CI readiness; the replacement remains draft. Source branch retained.

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