Add native buffered file subscriber#60
Conversation
|
Choir: GitHub Actions rollup reports all checks successful on the latest head — re-check review/merge policy on GitHub (not an approval or merge signal by itself). |
There was a problem hiding this comment.
Pull request overview
Adds a new native-only buffered file subscriber package (brickfrog/moontrace/file) that provides a synchronous, non-blocking enqueue API and an app-owned async worker to drain events to disk with size-based rotation, retention cleanup, and optional gzip for rotated files.
Changes:
- Introduce
src/filepackage withFileSubscriber+FileSubscriberConfig, asyncrun/flush/shutdown, counters, rotation/retention, and gzip for rotated logs. - Add native async tests covering ordering, rotation/retention, gzip round-trip, bounded batching, overflow drops, and shutdown behavior.
- Add user documentation describing intended wiring (app-owned worker) and rotation semantics.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| src/file/pkg.generated.mbti | Exposes the new package API surface (subscriber constructor, lifecycle, counters, config). |
| src/file/moon.pkg | Declares async/fs/gzip/io dependencies for the new file subscriber package. |
| src/file/file_subscriber.mbt | Implements the native buffered file subscriber, worker drain loop, rotation/retention, gzip, and non-native stubs. |
| src/file/file_subscriber_test.mbt | Adds native tests validating ordering, rotation/retention, gzip, batching/overflow, and shutdown semantics. |
| docs/file.md | Documents how to wire the subscriber/worker and explains rotation + gzip behavior. |
|
Choir: comment-only review received — routed to |
|
Choir: GitHub Copilot issue-thread comment observed on PR — parent notified with updated gate snapshot (not merge approval). |
|
Choir: comment-only review received — routed to |
|
Choir: fixes pushed by |
|
Choir: GitHub Actions rollup reports all checks successful on the latest head — re-check review/merge policy on GitHub (not an approval or merge signal by itself). |
|
Choir: fixes pushed by |
|
Choir: GitHub Actions rollup reports all checks successful on the latest head — re-check review/merge policy on GitHub (not an approval or merge signal by itself). |
Summary
TDD
Verification
Verification
Generated by Choir from commands executed in the leaf workspace.
moon fmt --checkmoon test --target nativemoon build --target native --release