Skip to content

Add managed snapshots and portable reports - #66

Merged
cocolato merged 2 commits into
mainfrom
feature/managed-snapshot-reports
Oct 20, 2026
Merged

cocolato merged 2 commits into
mainfrom
feature/managed-snapshot-reports

Conversation

@cocolato

@cocolato cocolato commented Oct 19, 2026 •

Copy link
Copy Markdown
Owner

Repeated failures now produce distinct snapshots, and DumpManager keeps a bounded directory ordered by file modification time. Automatic names are shortened by encoded byte length to leave room for atomic temporary files. Thread and asyncio hooks preserve previous handlers when saving fails, retain later third-party wrappers, and support restoration and reinstallation without duplicate captures.

Add capture metadata, optional embedded source for offline debugging, and --json, --info, and standalone --html reports. Refresh stale source caches, show stored source when local files are missing or changed, and retain unlimited and legacy exception details. HTML output escapes unencodable diagnostic text and completes rendering before opening the destination. Byte-budget reduction omits source before reducing captured variables.

Serialize through gzip directly into one atomic temporary file. Invalid destinations fail before capture, and commit failures do not retry serialization. PID capture sends only non-default options for compatibility with older targets. Split snapshot capture, hooks, and reporting into focused modules while retaining existing public imports; update the English and Chinese READMEs, API documentation, tutorial, changelog, and capture benchmark.

Closes #65

Validation

  • Full suite on macOS / CPython 3.13.15: 261 passed, 2 skipped, coverage 92.06% (required: 85%). The skipped tests require CPython 3.14+ native PID capture and Python 3.15 frozendict.
  • Real filesystem regressions passed: long ASCII and multibyte automatic filenames save and reload with the original source path; managed retention prunes correctly; failed serialization/replacement preserves prior dumps; HTML export handles lone surrogates and preserves an existing report on rendering failure; embedded source refreshes after file changes.
  • Ruff lint and format checks, git diff --check, and strict Sphinx HTML build passed.
  • Source distribution, wheel built from that source distribution, and strict Twine metadata checks passed locally.

The existing CI matrix validates Python 3.11–3.15 on Linux and Python 3.14 on Windows and macOS, plus documentation, quality, and distribution checks. No package publication or new release is included.

@cocolato
cocolato merged commit ed7ae81 into main Oct 20, 2026
10 checks 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.

Add managed dump retention and portable snapshot reports

1 participant