Skip to content

fix(ci): compile every workspace package in CI Fast - #208

Merged
alongubkin merged 3 commits into
mainfrom
dan/alien-335-e2e-rust-compile
Jul 26, 2026
Merged

fix(ci): compile every workspace package in CI Fast#208
alongubkin merged 3 commits into
mainfrom
dan/alien-335-e2e-rust-compile

Conversation

@lilienblum

@lilienblum lilienblum commented Jul 26, 2026

Copy link
Copy Markdown
Contributor

Refs ALIEN-335

The break

tests/e2e/test-apps/comprehensive-rust (package alien-test-server) has not compiled since 2026-07-21.

2a6cd640 ("feat!: simplify commands and runtime bindings", #169) removed the redundant binding-name argument from BoundQueue::send/receive/ack — the handle already carries its own name:

pub struct BoundQueue {
    inner: Arc<dyn Queue>,
    name: Arc<str>,
}

pub async fn send(&self, message: MessagePayload) -> Result<()> {
    self.inner.send(&self.name, message).await
}

Four call sites in src/handlers/queue.rs were never updated, so the package fails with error[E0061]: this method takes 1 argument but 2 arguments were supplied. binding_name stays a live local at every site (it is still used for the binding lookup, the log line, and the response), so this is a pure argument drop with no dead bindings left behind.

alien-test-server is the default app input of the manual e2e-cloud workflow and is deployed to AWS, GCP and Azure. Cloud Rust e2e has therefore been broken for over a month. Nobody noticed because that workflow is workflow_dispatch-only.

Why CI Fast stayed green — the part that matters

CI Fast ran:

cargo nextest run --workspace \
  --exclude byocdb \
  --exclude endpoint-agent \
  --exclude alien-test-server \
  --filter-expr 'not (package(alien-bindings) and kind(test)) and ...'

--exclude removes a package from compilation, not just from the test run. Once a package is behind --exclude, nothing in CI Fast builds it, and it rots silently until something else happens to build it — which for an e2e-only app is "never, until someone dispatches the cloud workflow."

The filter-expr treatment already applied to alien-bindings in the same command — not (package(alien-bindings) and kind(test)) — is the correct pattern: the package still compiles, only the selected tests are skipped, so a break fails the job even though the tests never run.

All three --exclude flags are now gone. alien-test-server moves to a filter clause, and a comment on the step records why --exclude must not come back.

byocdb and endpoint-agent

Both were excluded for the same blunt reason — no rationale in the diff, and both flags date back to the initial import without ever being revisited. Verified locally that neither needs to be excluded at all, so they now compile and run:

$ cargo check -p byocdb --tests
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 51.26s

$ cargo check -p endpoint-agent --tests
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 12.41s

Their 9 unit tests are pure in-process checks — duration parsing, PII regexes, command-receiver env validation — with no network, credentials, or system dependencies:

$ cargo nextest run -p byocdb -p endpoint-agent
    Starting 9 tests across 2 binaries
        PASS [   0.022s] (1/9) byocdb::bin/byocdb tests::terminal_receiver_error_fails_the_service
        PASS [   0.025s] (2/9) byocdb::bin/byocdb tests::absent_command_environment_disables_receiver
        PASS [   0.025s] (3/9) endpoint-agent::bin/endpoint-agent pii::tests::test_ssn_detection
        PASS [   0.028s] (4/9) byocdb::bin/byocdb tests::invalid_command_environment_fails_startup
        PASS [   0.031s] (5/9) endpoint-agent::bin/endpoint-agent commands::tests::test_parse_duration
        PASS [   0.035s] (6/9) endpoint-agent::bin/endpoint-agent commands::tests::test_parse_duration_invalid
        PASS [   0.036s] (7/9) endpoint-agent::bin/endpoint-agent pii::tests::test_no_pii
        PASS [   0.039s] (8/9) byocdb::bin/byocdb tests::partial_command_environment_fails_startup
        PASS [   0.041s] (9/9) endpoint-agent::bin/endpoint-agent pii::tests::test_email_detection
────────────
     Summary [   0.043s] 9 tests run: 9 passed, 0 skipped

43 milliseconds of coverage that CI has been throwing away. Neither needs a filter clause.

alien-test-server keeps a filter clause rather than being left uncovered: it has no Rust unit tests today, and the clause stops any added later from silently starting to run in the fast job when they belong in e2e-cloud.

fmt sweep

cargo fmt --all -- --check was already failing on main across 7 files in alien-deploy-cli, alien-deployment, alien-preflights and alien-terraform. hk only rustfmt-checks changed files, so this drift was invisible day to day while masking any real formatting failure in those crates.

Ran cargo fmt --all. The diff is import reordering and line wrapping only — no semantic change.

Validation

Core proof — the package compiles again:

$ cargo check -p alien-test-server --tests
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 1m 18s

The exact CI Fast invocation with the edited flags, proving every included package builds:

$ cargo nextest run --workspace --filter-expr '<exactly as in the workflow>' --no-run
    Finished `test` profile [unoptimized + debuginfo] target(s) in 8m 31s
$ echo $status
0

No package other than alien-test-server was hiding a compile break.

Full run of the same command was also done locally, after pnpm install --frozen-lockfile. It is not a clean signal on this machine and I am not claiming it as one: terraform, helm and kubeconform are not installed here, and CI installs all three before this step. The generator does a best-effort terraform fmt pass and says so itself:

// Best-effort `terraform fmt` pass so output matches what
// `terraform fmt -check` expects. If terraform isn't installed we ship
// the hcl-rs output as-is — it parses identically; only attribute
// equals-sign alignment differs.
let _ = format_with_terraform(&mut module);

So every local failure is an alien-terraform insta snapshot or an alien-test assertion comparing against equals-sign-aligned HCL (e.g. rendered.contains("id = \"management\"")). Diffing one snapshot against its .new shows nothing but alignment:

$ diff generator__generator__helpers__gcp_kv_minimal.snap{,.new}
11c12
<       source  = "hashicorp/google"
---
>       source = "hashicorp/google"

None of these touch anything this PR changes, and the two alien-terraform files in the fmt sweep are import re-wrapping plus one file git diff reports as "No syntactic changes". The authoritative full-run signal is this PR's own CI Fast job, which has the toolchain installed — and it is green:

PR conventions:                completed success
TypeScript packages and CLIs:  completed success
Rust crates:                   completed success
All tests passed:              completed success

That is the real proof: the whole workspace — now including alien-test-server, byocdb and endpoint-agent — compiles and passes under the edited flags.

Formatting and whitespace:

$ cargo fmt --all -- --check && echo "FMT CLEAN"
FMT CLEAN

$ git diff --check && echo "DIFF CHECK CLEAN"
DIFF CHECK CLEAN

The workflow file was also parsed with a YAML loader to confirm the edited run block is intact, and cargo nextest list under the new filter confirms it selects the 9 byocdb/endpoint-agent tests and zero alien-test-server entries.

`tests/e2e/test-apps/comprehensive-rust` (`alien-test-server`) stopped
compiling when 2a6cd64 (#169) removed the redundant binding-name
argument from `BoundQueue::send/receive/ack`. The app is the default
target of the e2e-cloud workflow, so cloud Rust e2e has been broken
since 2026-07-21.

CI Fast missed it because the package was listed under `--exclude`,
which drops a package from compilation, not just from the test run.
Replace it with a `--filter-expr` clause: the package is built, only
its tests are skipped. `byocdb` and `endpoint-agent` were excluded the
same way for no reason — both compile and their 9 unit tests pass in
under a tenth of a second, so they now build and run normally.

Also sweep pre-existing `cargo fmt` drift across seven files, which was
masking real formatting failures because the pre-commit hook only
rustfmt-checks changed files.

Refs ALIEN-335
@lilienblum lilienblum self-assigned this Jul 26, 2026
@lilienblum
lilienblum requested a review from alongubkin July 26, 2026 00:31
@greptile-apps

greptile-apps Bot commented Jul 26, 2026

Copy link
Copy Markdown

Greptile Summary

Restores comprehensive Rust workspace compilation in CI Fast.

  • Replaces Cargo package exclusions with a nextest filter expression so alien-test-server compiles without running its cloud E2E tests.
  • Enables compilation and unit tests for byocdb and endpoint-agent.
  • Updates the comprehensive Rust E2E queue handlers for the bound-queue API.
  • Applies repository-wide rustfmt cleanup to the remaining changed Rust files.

Confidence Score: 5/5

The PR appears safe to merge.

No blocking failure remains.

Important Files Changed

Filename Overview
.github/workflows/ci-fast.yml Replaces workspace exclusions with test-level nextest filters while retaining the existing cloud and integration-suite exclusions.
tests/e2e/test-apps/comprehensive-rust/src/handlers/queue.rs Removes obsolete queue-name arguments from four BoundQueue operations, matching the queue handle’s bound-name contract.
crates/alien-deploy-cli/src/commands/register.rs Contains formatting-only changes.
crates/alien-deployment/src/pending.rs Contains formatting-only changes to imports, wrapping, and test fixtures.
crates/alien-deployment/tests/test_platform.rs Contains formatting-only changes.
crates/alien-preflights/src/compatibility/permission_profiles_unchanged.rs Contains formatting-only changes.
crates/alien-preflights/src/compile_time/resource_enabled_valid.rs Contains formatting-only changes.
crates/alien-terraform/src/emitters/gcp/kv.rs Contains formatting-only import and wrapping changes.
crates/alien-terraform/tests/generator/helpers.rs Contains formatting-only import changes.

Reviews (3): Last reviewed commit: "refactor(ci): split the fast-test filter..." | Re-trigger Greptile

The break landed in #169 (2026-07-21), not over a month ago.
The filterset is now load-bearing for compile coverage, but it was a
single ~600-character line holding roughly 15 clauses, so a wrong or
missing clause was undetectable in review. Same expression, one clause
per line, grouped by suite.
@alongubkin
alongubkin merged commit 543c383 into main Jul 26, 2026
17 checks passed
@alongubkin
alongubkin deleted the dan/alien-335-e2e-rust-compile branch July 26, 2026 06:23
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