Fix: the relay test suite did not compile on Linux, and CI was red #115

Merged
paulhitt merged 1 commits from fix/capacity-tests-linux-concurrency into main 2026-09-05 00:44:38 +00:00
paulhitt commented 2026-09-04 23:01:51 +00:00 (Migrated from gitlab.com)

I merged ~20 MRs today past a red pipeline. doc-pages and test
were failing on every one of them, main's pipelines were being cancelled
by merge churn, and I used immediate merge rather than
merge-when-pipeline-succeeds. The guard worked; I overrode it.

The doc-pages failure was real and is already fixed — it was the
api.leaf drift I later found by hand, which CI had been reporting the
whole time.

The test failure is this commit. Three problems, all mine, all invisible
on macOS:

1. Task { } captures did not compile on Linux. Swift 6.1 there treats
the closure as a sending parameter and refuses captures of the harness
and the test device. macOS's toolchain accepted them. RelayHarness is now
@unchecked Sendable with the reason written at the declaration — it wraps
a Vapor Application, which is built to serve concurrently and is never
mutated after boot. A test-harness claim, and it says so.

TestDevice needed it too, and NOT for the reason it looks: everything
in it is a value type, but swift-crypto on Linux does not declare
Curve25519.Signing.PrivateKey Sendable. I wrote "value types throughout,
so genuinely Sendable" first and Linux said no; the comment now records
that rather than the tidy version.

2 and 3. Two tests asserted nothing wherever the suite runs as root —
which CI's container does. Both established "unwritable" with
chmod 0o500, and root bypasses the permission check, so the store
correctly reported OK and the tests failed. The tests were wrong, not the
product.

Both now make the failure STRUCTURAL: a path whose parent is a regular
file cannot be created by anybody, because the kernel answers ENOTDIR
regardless of uid. Same failure for every user on every platform.

Verified in the actual CI image (swift:6.1-noble, as root) and on macOS:
659 tests pass on both.

Co-Authored-By: Claude Opus 5 noreply@anthropic.com

**I merged ~20 MRs today past a red pipeline.** `doc-pages` and `test` were failing on every one of them, `main`'s pipelines were being cancelled by merge churn, and I used immediate merge rather than merge-when-pipeline-succeeds. The guard worked; I overrode it. The `doc-pages` failure was real and is already fixed — it was the `api.leaf` drift I later found by hand, which CI had been reporting the whole time. The `test` failure is this commit. Three problems, all mine, all invisible on macOS: **1. `Task { }` captures did not compile on Linux.** Swift 6.1 there treats the closure as a `sending` parameter and refuses captures of the harness and the test device. macOS's toolchain accepted them. `RelayHarness` is now `@unchecked Sendable` with the reason written at the declaration — it wraps a Vapor `Application`, which is built to serve concurrently and is never mutated after boot. A test-harness claim, and it says so. `TestDevice` needed it too, and NOT for the reason it looks: everything in it is a value type, but swift-crypto on Linux does not declare `Curve25519.Signing.PrivateKey` Sendable. I wrote "value types throughout, so genuinely Sendable" first and Linux said no; the comment now records that rather than the tidy version. **2 and 3. Two tests asserted nothing wherever the suite runs as root** — which CI's container does. Both established "unwritable" with `chmod 0o500`, and root bypasses the permission check, so the store correctly reported OK and the tests failed. The tests were wrong, not the product. Both now make the failure STRUCTURAL: a path whose parent is a regular file cannot be created by anybody, because the kernel answers ENOTDIR regardless of uid. Same failure for every user on every platform. Verified in the actual CI image (`swift:6.1-noble`, as root) and on macOS: 659 tests pass on both. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
paulhitt commented 2026-09-04 23:01:51 +00:00 (Migrated from gitlab.com)

assigned to @paulhitt

assigned to @paulhitt
paulhitt (Migrated from gitlab.com) scheduled this pull request to auto merge when all checks succeed 2026-09-04 23:02:19 +00:00
paulhitt commented 2026-09-04 23:12:56 +00:00 (Migrated from gitlab.com)

mentioned in issue #6

mentioned in issue #6
paulhitt (Migrated from gitlab.com) merged commit ad95985589 into main 2026-09-05 00:44:38 +00:00
paulhitt commented 2026-09-05 00:44:45 +00:00 (Migrated from gitlab.com)

mentioned in commit ad95985589

mentioned in commit ad9598558972fd5a55e43c7ad17f715e3c24d9b3
paulhitt commented 2026-09-05 09:20:38 +00:00 (Migrated from gitlab.com)

mentioned in commit 49445bbb30

mentioned in commit 49445bbb30f26aac899851cfbd81c6614b2d1eb5
paulhitt commented 2026-09-05 09:20:39 +00:00 (Migrated from gitlab.com)

mentioned in merge request !59

mentioned in merge request !59
paulhitt commented 2026-09-05 09:21:30 +00:00 (Migrated from gitlab.com)

mentioned in issue #56

mentioned in issue #56
paulhitt commented 2026-09-09 18:58:58 +00:00 (Migrated from gitlab.com)

changed the description

changed the description
Sign in to join this conversation.