Skip to content

fix: write qdocco outputs atomically - #43

Merged
tiye merged 2 commits into
feat/program-fingerprintfrom
fix/qdocco-atomic-output
Aug 23, 2026
Merged

fix: write qdocco outputs atomically#43
tiye merged 2 commits into
feat/program-fingerprintfrom
fix/qdocco-atomic-output

Conversation

@tiye

@tiye tiye commented Aug 22, 2026

Copy link
Copy Markdown
Member

Summary

  • add RFC 0101 for qdocco atomic document output
  • write generated documents through an exclusive same-directory temporary file
  • preserve existing output and reserved temporary files on write collisions

Validation

  • make check
  • git diff --check

This PR is intentionally stacked on PR #42 and should not be merged independently of the chain.

Copilot AI lite review requested due to automatic review settings August 22, 2026 15:23

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR updates qdocco to write generated HTML/Markdown outputs via an exclusive same-directory temporary file and a final rename step, aiming to avoid leaving partial documents on interruptions, and documents the contract in a new RFC.

Changes:

  • Add RFC 0101 specifying qdocco’s atomic output contract (temp file + sync + rename, collision handling).
  • Implement write_output() in qdocco to write via an exclusive temp file and rename into place, replacing fs::write.
  • Add a unit test for collision behavior and update project/RFC range references in docs.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.

File Description
src/bin/qdocco.rs Implements atomic-ish output writing via exclusive temp file + sync + rename, and adds a collision test.
RFCs/0101-qdocco-atomic-output.md Defines the new atomic output contract for qdocco.
RFCs/0000-project-scope.md Updates the documented RFC coverage range to include RFC 0101.
README.md Updates the README’s referenced RFC range to include RFC 0101.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread src/bin/qdocco.rs
Comment thread src/bin/qdocco.rs Outdated
Comment thread src/bin/qdocco.rs Outdated
@tiye
tiye force-pushed the fix/lexer-comment-heredoc-boundary branch from 86a7131 to 8feb547 Compare August 23, 2026 04:56
Base automatically changed from fix/lexer-comment-heredoc-boundary to feat/program-fingerprint August 23, 2026 04:57
@tiye
tiye force-pushed the fix/qdocco-atomic-output branch from 2e28e70 to 7f60b2e Compare August 23, 2026 05:00
@tiye
tiye merged commit 8995035 into feat/program-fingerprint Aug 23, 2026
2 checks passed
@tiye
tiye deleted the fix/qdocco-atomic-output branch August 23, 2026 05:02
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.

2 participants