Skip to content

test(core): UTS-9 daemon-pull -zz goodbye flush regression coverage - #5619

Merged
oferchen merged 2 commits into
masterfrom
test/uts-9-daemon-gzip-download-goodbye
Jun 11, 2026
Merged

oferchen merged 2 commits into
masterfrom
test/uts-9-daemon-gzip-download-goodbye

Conversation

@oferchen

Copy link
Copy Markdown
Owner

Summary

  • Adds a regression test for UTS-9.REOPEN: an oc-rsync client pulling a deterministic ~700 KB file from an oc-rsync daemon with -zz (new-style compression) must complete with exit 0, no connection unexpectedly closed stderr signature, and a byte-for-byte match. The 612425-byte cutoff that the original capture surfaced sat inside the buffered window between the final NDX_DONE and the transport FIN.
  • Cites PR fix(daemon): strip batch flags + explicit goodbye flush + arg rejection error #5609 (UTS-15.c) as the originating fix: that PR added an explicit writer.flush() at the end of GeneratorContext::run() to mirror upstream main.c:983 do_server_sender() / main.c:1344 client_run(). Every daemon-sender role flows through the same run() return point, so the same flush closes both the UTS-15 batch-mode lineage and this UTS-9 daemon-pull -zz lineage. This change closes the verification gap for UTS-9 without duplicating the fix.
  • Documents the codepath analysis, the UTS-15.c cross-check, and the upstream io_flush(FULL_FLUSH) references in docs/audits/uts-9-daemon-gzip-download-goodbye.md.

Classification: test-only (verification gap closer).

Test plan

UTS-9.REOPEN reported a silent connection close at byte ~612425 when an
oc-rsync client pulled a file from an oc-rsync daemon with -zz
(new-style compression). The torn capture had no @error frame: the
trailing NDX_DONE raced the transport FIN.

The daemon-pull -zz codepath flows through
GeneratorContext::run() (crates/transfer/src/generator/transfer/
orchestrator.rs), which terminates after handle_goodbye(). PR #5609
(UTS-15.c) added an explicit writer.flush() at that exit point to
fix the upstream batch-mode interop suite; the same flush also closes
the UTS-9 lineage because every daemon-sender role flows through the
same return path. This change closes the verification gap.

The regression test in crates/core/tests/uts_9_daemon_gzip_download_
goodbye.rs spawns an oc-rsync daemon serving a deterministic ~700 KB
file (sized to clear the 612425-byte cutoff), pulls it with
`oc-rsync -azz`, and asserts:

- exit 0
- stderr does not contain "connection unexpectedly closed"
- destination matches source byte-for-byte

The audit doc at docs/audits/uts-9-daemon-gzip-download-goodbye.md
captures the codepath analysis, the cross-check vs UTS-15.c batch-mode,
and the upstream io_flush(FULL_FLUSH) references at main.c:983 / 1344.

Refs UTS-9.REOPEN, companions PR #5609 (UTS-15.c).
@github-actions github-actions Bot added the test label Jun 10, 2026
@oferchen
oferchen merged commit a1b5a64 into master Jun 11, 2026
15 of 16 checks passed
@oferchen
oferchen deleted the test/uts-9-daemon-gzip-download-goodbye branch June 11, 2026 03:10
oferchen added a commit that referenced this pull request Jun 19, 2026
UTS-NEXTEST-EDGE.e: native nextest port of upstream's
testsuite/daemon-gzip-download.test and daemon-gzip-upload.test, which
exercise the -zz (zlibx) per-block codec over a daemon transfer in both
directions. Asserts byte-identical round-trip, intact goodbye envelope
(no UTS-9 'connection unexpectedly closed' signature past the ~615KB
cutoff), and codec-engaged evidence via --stats. Adds a -z vs -zz
negotiation pin so silent codec collapse trips a regression.

Companion to PRs #5520, #5600, #5619 and the UTS-V3 cluster A drain;
the upstream tests run under continue-on-error in CI, so this nextest
port runs as a required check on every PR.
oferchen added a commit that referenced this pull request Jun 19, 2026
* test(uts): port daemon-gzip download/upload -zz to nextest

UTS-NEXTEST-EDGE.e: native nextest port of upstream's
testsuite/daemon-gzip-download.test and daemon-gzip-upload.test, which
exercise the -zz (zlibx) per-block codec over a daemon transfer in both
directions. Asserts byte-identical round-trip, intact goodbye envelope
(no UTS-9 'connection unexpectedly closed' signature past the ~615KB
cutoff), and codec-engaged evidence via --stats. Adds a -z vs -zz
negotiation pin so silent codec collapse trips a regression.

Companion to PRs #5520, #5600, #5619 and the UTS-V3 cluster A drain;
the upstream tests run under continue-on-error in CI, so this nextest
port runs as a required check on every PR.

* test: fix doc-lazy-continuation lint in daemon-gzip-zz module doc

Reword 'capability advertise + compress' to 'capability advertise and compress'
so clippy doesn't parse the wrapped '+' as a markdown list marker.
oferchen added a commit that referenced this pull request Jun 19, 2026
Adds the cross-binary upstream-compat harness primitives specified by
NXT-1 (`UpstreamVersion`, `locate_upstream_rsync`, `require_upstream_rsync`,
`upstream_compat_enabled`) and ports the upstream `daemon-gzip-download.test`
goodbye-flush invariant into nextest.

The test pairs an upstream rsync 3.4.4 client against an oc-rsync daemon
over TCP and pulls a ~1 MB `-zz`-compressed fixture sized to clear the
UTS-9 ~615 KB cutoff. The invariant pinned is that the daemon-sender
goodbye envelope reaches the upstream client without a premature
connection drop - the regression family fixed by PRs #5520 / #5600 /
#5619 / #5725.

Self-skips on three conditions: `OC_RSYNC_UPSTREAM_COMPAT` env var
unset (default for PR cells), upstream rsync 3.4.4 binary not present
at `target/interop/upstream-install/3.4.4/bin/rsync`, or the oc-rsync
binary cannot be located. Wall-time impact on the standard PR cell is
a single early-return.

NXT-1 calls out that the new `upstream-compat` CI cell is the wire-up
step that flips the env var on. That cell does not exist yet; this PR
ships the test and harness only, and a follow-up will add the matrix
entry to the existing nextest workflow.

Refs: docs/design/nxt-1-nextest-harness.md
oferchen added a commit that referenced this pull request Jun 19, 2026
…6002)

Adds the cross-binary upstream-compat harness primitives specified by
NXT-1 (`UpstreamVersion`, `locate_upstream_rsync`, `require_upstream_rsync`,
`upstream_compat_enabled`) and ports the upstream `daemon-gzip-download.test`
goodbye-flush invariant into nextest.

The test pairs an upstream rsync 3.4.4 client against an oc-rsync daemon
over TCP and pulls a ~1 MB `-zz`-compressed fixture sized to clear the
UTS-9 ~615 KB cutoff. The invariant pinned is that the daemon-sender
goodbye envelope reaches the upstream client without a premature
connection drop - the regression family fixed by PRs #5520 / #5600 /
#5619 / #5725.

Self-skips on three conditions: `OC_RSYNC_UPSTREAM_COMPAT` env var
unset (default for PR cells), upstream rsync 3.4.4 binary not present
at `target/interop/upstream-install/3.4.4/bin/rsync`, or the oc-rsync
binary cannot be located. Wall-time impact on the standard PR cell is
a single early-return.

NXT-1 calls out that the new `upstream-compat` CI cell is the wire-up
step that flips the env var on. That cell does not exist yet; this PR
ships the test and harness only, and a follow-up will add the matrix
entry to the existing nextest workflow.

Refs: docs/design/nxt-1-nextest-harness.md
oferchen added a commit that referenced this pull request Aug 24, 2026
…d-goodbye

test(core): UTS-9 daemon-pull -zz goodbye flush regression coverage
oferchen added a commit that referenced this pull request Aug 24, 2026
* test(uts): port daemon-gzip download/upload -zz to nextest

UTS-NEXTEST-EDGE.e: native nextest port of upstream's
testsuite/daemon-gzip-download.test and daemon-gzip-upload.test, which
exercise the -zz (zlibx) per-block codec over a daemon transfer in both
directions. Asserts byte-identical round-trip, intact goodbye envelope
(no UTS-9 'connection unexpectedly closed' signature past the ~615KB
cutoff), and codec-engaged evidence via --stats. Adds a -z vs -zz
negotiation pin so silent codec collapse trips a regression.

Companion to PRs #5520, #5600, #5619 and the UTS-V3 cluster A drain;
the upstream tests run under continue-on-error in CI, so this nextest
port runs as a required check on every PR.

* test: fix doc-lazy-continuation lint in daemon-gzip-zz module doc

Reword 'capability advertise + compress' to 'capability advertise and compress'
so clippy doesn't parse the wrapped '+' as a markdown list marker.
oferchen added a commit that referenced this pull request Aug 24, 2026
…6002)

Adds the cross-binary upstream-compat harness primitives specified by
NXT-1 (`UpstreamVersion`, `locate_upstream_rsync`, `require_upstream_rsync`,
`upstream_compat_enabled`) and ports the upstream `daemon-gzip-download.test`
goodbye-flush invariant into nextest.

The test pairs an upstream rsync 3.4.4 client against an oc-rsync daemon
over TCP and pulls a ~1 MB `-zz`-compressed fixture sized to clear the
UTS-9 ~615 KB cutoff. The invariant pinned is that the daemon-sender
goodbye envelope reaches the upstream client without a premature
connection drop - the regression family fixed by PRs #5520 / #5600 /
#5619 / #5725.

Self-skips on three conditions: `OC_RSYNC_UPSTREAM_COMPAT` env var
unset (default for PR cells), upstream rsync 3.4.4 binary not present
at `target/interop/upstream-install/3.4.4/bin/rsync`, or the oc-rsync
binary cannot be located. Wall-time impact on the standard PR cell is
a single early-return.

NXT-1 calls out that the new `upstream-compat` CI cell is the wire-up
step that flips the env var on. That cell does not exist yet; this PR
ships the test and harness only, and a follow-up will add the matrix
entry to the existing nextest workflow.

Refs: docs/design/nxt-1-nextest-harness.md
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant