fix(cli): unify teardown drain into a single bounded flush mode - #395
fix(cli): unify teardown drain into a single bounded flush mode#395khaliqgant wants to merge 1 commit into
Conversation
--flush-outbox-once is now the sole bounded teardown mode in both relayfile-mount and the relayfile CLI, replacing the --flush-outbox-once/--push-local-once split. File watcher observations are durably journaled before debounce under .relay/outbox/local-pending so a flush ingests only journaled paths with scan-free state saves (O(pending), never O(tree)), then force-flushes persisted outbox records. Generation-checked clearing prevents an in-flight upload from erasing a newer event. Fixes #305. Verified independently: - go build ./... - go test ./cmd/relayfile-cli/... -count=1 - go test ./cmd/relayfile-mount/... -count=1 - go test ./internal/mountsync/... -count=1
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Relayfile Eval ReviewRun: Passed: 4 | Needs human: 0 | Reviewable: 0 | Missing output: 0 | Failed: 0 | Skipped: 0 Human Review CasesNo reviewable human-review cases captured Relayfile output. |
Fixes #305.
--flush-outbox-onceis now the sole bounded teardown mode in bothrelayfile-mountand therelayfileCLI, replacing the--flush-outbox-once/--push-local-oncesplit. File watcher observations are durably journaled before debounce under.relay/outbox/local-pendingso a flush ingests only journaled paths with scan-free state saves (O(pending), never O(tree)), then force-flushes persisted outbox records. Generation-checked clearing prevents an in-flight upload from erasing a newer event.Test plan
go build ./...go test ./cmd/relayfile-cli/... -count=1go test ./cmd/relayfile-mount/... -count=1go test ./internal/mountsync/... -count=1Real watcher, mountsync, generation-race, and CLI end-to-end regression tests added.