Repository navigation
fix: preserve callflow HTML on staging failure - #4571
manthanut27 wants to merge 1 commit into
Conversation
|
Thanks for the pull request, @manthanut27. A maintainer will review it soon. Want to talk it through while it is in review? Come join us on our Discord server. For longer-form discussion there is also GitHub Discussions. A couple of things that speed up review: make sure the test suite passes on Python 3.10 and 3.13, and that the change keeps extraction deterministic. |
There was a problem hiding this comment.
Graphify reviewed this change.
No issues found by static checks — no coupling regressions or blocking issues in the code graph. That is not the same as safe to merge: see what was not checked.
Not checked: tests were not run; formal verification proved 0 of 1 changed function(s) (1 not verified).
Formal verification. PR-changed functions: 0/1 verified (0 proven, 0 may-equivalent, 0 distinguished) · 1 not verified (1 vacuous).
Not verified on this run: write\_callflow\_html (vacuous: never exercised).
Graphify review — findings
Makes write_callflow_html write the report through write_text_atomic, so a failure while staging or closing the temp file leaves any existing callflow.html untouched and no temp files behind. Adds tests for staging-write failure, staging-close failure, and a successful atomic replace of an existing report.
No blocking issues surfaced.
Analysis details — impact, health, verification
Impact & health
Graphify review
Impact — 583 functions depend on the 168 functions this change touches.
Health — this change adds coupling hotspots:
- worse:
write_callflow_html()— 10 callers, 26 callees
Verification — 583 functions in the blast radius were not formally verified this run (proofs are advisory here).
Gate & verification
graphify gate
PASS — objectively clean (no health regressions, tests not run — proofs not run this pass (advisory)). Grounded, not self-assessed.
Advisory (not blocking):
- verification_scope: 343 function(s) in the blast radius were not formally verified this run
Test selection
Test selection
1 of 432 test file(s) selected (0%) via static blast radius.
tests/test_callflow_html.py— impact, changed-test
Selection is safe under the controlled-regression assumption; always-run tests + a periodic full run are the backstops. Advisory — it never changes the check verdict.
Docs that may be stale (advisory)
CHANGELOG.md§ 0.9.43 (2026-08-14) (lines 726-734): references changed symbolswriteCHANGELOG.md§ 0.9.29 (2026-07-28) (lines 877-887): references changed symbolswriteCHANGELOG.md§ 0.9.17 (2026-07-16) (lines 1013-1042): references changed symbolswriteCHANGELOG.md§ 0.8.15 (2026-05-22) (lines 1679-1688): references changed symbolswritedocs/superpowers/plans/2026-05-04-incremental-updates-dedup.md§ Task 4: Incremental updates — semantic cache + manifest in __main__.py (lines 603-911): references changed symbolswritedocs/superpowers/specs/2026-05-04-incremental-updates-dedup-design.md§ Pipeline (every graphify extract run) (lines 17-38): references changed symbolswritegraphify/skill-agents.md§ Usage (lines 10-44): references changed symbolswritegraphify/skill-agents.md§ Step 1 - Ensure graphify is installed (lines 65-112): references changed symbolswritegraphify/skill-agents.md§ Part B - Semantic extraction (parallel subagents) (lines 207-370): references changed symbolswritegraphify/skill-agents.md§ Step 4 - Build graph, cluster, analyze, generate outputs (lines 417-479): references changed symbolswrite
…and 10 more.
Formal verification
Could not verify: Could not verify write\_callflow\_html.
The verifier did not have enough to check write\_callflow\_html, so it is saying so rather than guessing. No false assurance is the whole point.
Guarantee: No guarantee either way, this is an honest abstention, not a pass.
Note: Reason: no capturable inputs from the test suite; property tier: not verifiable: all 51 sampled inputs raised on both versions — the function never executed, so 'no divergence' would be vacuous (mostly FileNotFoundError — names the real obstacle, not a sampling gap)
· 1 more finding(s) on lines outside this diff (see the check run).
What does this PR do?
Fixes #4562.
This PR ensures that an existing callflow HTML report is preserved if writing a replacement fails.
write_text_atomic()to write the generated HTML safely.Type of change
Verification & Invariants
CONTRIBUTING.mdguide.Invariant protected: If writing a replacement callflow HTML report fails before replacement completes, the previously generated report must remain unchanged, and temporary files must be cleaned up.
How was this tested?
Graphify-specific checklist