Skip to content

kind: derive the host build's test-hooks features instead of listing them - #1509

Merged
ac-pplx merged 1 commit into
mainfrom
ac/kind-test-hooks-derived
Nov 5, 2026
Merged

ac-pplx merged 1 commit into
mainfrom
ac/kind-test-hooks-derived

Conversation

@ac-pplx

@ac-pplx ac-pplx commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

Summary

The Kind image turns on every crate's test-hooks feature (test-only env
overrides and fault points the Kind smoke uses; release images never have
them). Until now docker/Dockerfile.rust-build-kind listed them by hand in
SPACE_KIND_TEST_HOOK_FEATURES: a crate that gains a test-hooks feature was
missing from the Kind build until someone edited the list, and one that drops it
broke the build.

Merging replaces the list with a helper,
infra/space/kind/scripts/test-hook-features.sh: for the test-hooks lane it
prints <pkg>/test-hooks for every workspace member that defines the feature
(cargo metadata --no-deps), for release nothing, and it fails if it finds
none. The Dockerfile's cook and build stages and build-rust-artifacts.sh's
incremental mode use it, keyed off SPACE_KIND_RUST_BUILD, so the release lane
no longer has a host list to empty. The guest build keeps its one entry, which
the release lane still empties. Tilt watches the helper with the other Rust
build inputs.

The derived list has 18 entries: today's 17 plus
pplx-space-spaced-guest-execution, which pplx-space-spaced-guest-server
already turned on.

Validation

  • cargo build --unit-graph for the host build's exact flags and 24 binaries:
    the hand list and the derived list give the same 918 units with the same
    features (21 carry test-hooks). The release lane gives the same 919 units
    before and after, none with test-hooks.
  • The Kind artifact image built in both lanes, Docker and incremental mode;
    scripts/tests/test-kind-rust-*.sh pass; shellcheck is clean;
    cargo arch passes.
  • Pull CI's Kind smoke on this head. It builds in Docker mode: this change
    edits inputs of the saved incremental build state, so none restores.
    Incremental mode is covered by the runs above, and after merge by main's
    saved-state build.

Severity and risk

Severity: does not apply; the Kind build gets the same features.

Risk: low. Only the Kind build changes; release images still build without
test hooks. Roll back by reverting.

AI assistance: Claude Code made the change and drafted this description.

@coderabbitai

coderabbitai Bot commented Nov 5, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The Kind Rust build now derives host test-hooks features from workspace package metadata. The Docker planner, Docker build stage, and incremental build use the generated host feature list. Guest builds use a separate guest feature list. Release handling leaves the host and guest lists empty. The helper script is a Rust artifact build dependency, and the README describes the updated feature selection.

Possibly related PRs

  • perplexityai/SPACE#1471: Renames a workspace package referenced by the Kind Docker feature configuration; this change derives feature names from Cargo metadata instead of a manual host list.
Merge Risk: Low · up to 595a5

Kind builds now discover test-hook features automatically. The change is mergeable with the Kind smoke passing.

Architecture risk: Low · up to 595a5

The change affects 3 systems.

Changed systems: infra, docker, Tiltfile

Architecture concerns
No architecture-level concerns identified.

Review details

Systems and components

  • observed — infra (service) was modified; 3 changed files map to changed impact.
  • observed — docker (service) was modified; 1 changed file maps to changed impact.
  • observed — Tiltfile (service) was modified; 1 changed file maps to changed impact.

Before / after behavior

  • observed — Modified behavior in Tiltfile: Adds test-hook-features.sh to the Rust artifact build dependencies.
  • observed — Modified behavior in infra/space/kind/README.md: The build description now says test-hooks is enabled for every workspace member and that scripts/test-hook-features.sh derives the list, replacing the specific pplx-space-common-core/test-hooks reference.
  • observed — Modified behavior in infra/space/kind/README.md: The release-build description now states that the host feature-list script prints none and the guest feature list in the Dockerfile is emptied, replacing the statement that both Dockerfile feature lists are empty.
  • observed — Modified behavior in infra/space/kind/scripts/build-rust-artifacts.sh: rust_build_args no longer passes an empty SPACE_KIND_TEST_HOOK_FEATURES argument for release builds; it still clears the guest feature list and passes the package exclusion.
Pre-merge checks: Passed 5

Check name Status Explanation
Title check Passed The title "kind: derive the host build's test-hooks features instead of listing them" starts with the lowercase area "kind:" followed by a lowercase summary word, matching the required format. It name…
Description Follows The Pr Template Passed The PR description includes all required template items: a substantive "## Summary" section, a "## Validation" section naming commands and results, a "## Severity and risk" section with severity and r…
Bug Fixes Name A Regression Test Passed PASS: The pull request does not modify application behavior under crates/, shim/, or ui/. The diff changes Tiltfile, Kind Docker/build scripts, README text, and a helper script, so the regress…
Weakened Safeguards Are Justified Passed The diff changes feature-list derivation and adds a helper. It does not remove, disable, or weaken a test, assertion, lint, CI check, or repository guard. The helper adds validation for invalid modes …
Public-Safe Content Passed The title, description, and reviewed diff contain no credentials, tokens, private keys, internal URLs or hostnames, cloud account IDs, resource ARNs, personal workstation paths, production logs or mea…
Full details: Title check

Explanation

The title "kind: derive the host build's test-hooks features instead of listing them" starts with the lowercase area "kind:" followed by a lowercase summary word, matching the required format. It names the main change: the host test-hooks feature list is now derived by the helper script instead of being hardcoded, which matches the raw summary and PR objectives. It has no trailing period, ticket ID, or internal link.

Full details: Description Follows The Pr Template

Explanation

The PR description includes all required template items: a substantive "## Summary" section, a "## Validation" section naming commands and results, a "## Severity and risk" section with severity and risk, and an "AI assistance:" line identifying Claude Code and stating that it made the change and drafted the description.

Full details: Bug Fixes Name A Regression Test

Explanation

PASS: The pull request does not modify application behavior under crates/, shim/, or ui/. The diff changes Tiltfile, Kind Docker/build scripts, README text, and a helper script, so the regression-test requirement does not apply.

Full details: Weakened Safeguards Are Justified

Explanation

The diff changes feature-list derivation and adds a helper. It does not remove, disable, or weaken a test, assertion, lint, CI check, or repository guard. The helper adds validation for invalid modes and for zero matching features, and no CI or test configuration files change.

Full details: Public-Safe Content

Explanation

The title, description, and reviewed diff contain no credentials, tokens, private keys, internal URLs or hostnames, cloud account IDs, resource ARNs, personal workstation paths, production logs or measurements, incident details, or undisclosed vulnerability details. The diff contains only repository-relative paths, build identifiers, package names, and feature-selection logic.

Recent review info

Automatic approval policy

Commit: 595a59be059e.

Setting Effective value Source
Automatic approvals Enabled Global configuration
Merge risk Low Override 2
Security risk Not set Global configuration

Matching overrides (numbered as in the resolved configuration):

  • Override 2 — any author; paths: **, !ui/**; merge risk: Low.

Any matching disabled override withholds approval, regardless of risk. Otherwise, the strictest explicitly set limit wins for each score. Limits omitted by all matching overrides inherit the global configuration.

Not set means no limit was configured after inheritance. Use @coderabbitai configuration to inspect the resolved settings and their sources.

Run configuration

  • Source mode: Auto
  • Repository: perplexityai/SPACE
  • Branch: main
  • File: .coderabbit.yaml
  • Commit: 88f9f3e
  • Layers: Repository YAML; Enforced overrides: Organization
  • Review profile: CHILL
  • Plan: Enterprise
  • Run ID: d08e3a49-6764-427c-a410-0514774c37cc
Commits

Reviewing files that changed from the base of the PR and between b54babf and 595a59b.

Files selected for processing: 1

  • docker/Dockerfile.rust-build-kind

Included review availability: This review used your included allowance. Your plan provides up to 12 included reviews per hour; 10 remain after this review.

@github-actions github-actions Bot added the triage:pending Waiting for a maintainer to triage label Nov 5, 2026
@github-actions

github-actions Bot commented Nov 5, 2026

Copy link
Copy Markdown

Thanks for opening this pull request! A SPACE maintainer will take a look.

CONTRIBUTING.md explains how we review outside contributions.

@ac-pplx
ac-pplx force-pushed the ac/kind-test-hooks-derived branch from 29d5fed to b54babf Compare November 5, 2026 16:31
@ac-pplx
ac-pplx marked this pull request as ready for review November 5, 2026 16:31
coderabbitai[bot]
coderabbitai Bot previously approved these changes Nov 5, 2026
…them

docker/Dockerfile.rust-build-kind hand-listed `<pkg>/test-hooks` for the
Kind host build in SPACE_KIND_TEST_HOOK_FEATURES. A crate that gained a
`test-hooks` feature was silently left out of the Kind build until someone
edited the list, and a crate that dropped one broke the build.

infra/space/kind/scripts/test-hook-features.sh now prints the list: every
workspace member whose manifest defines `test-hooks` (cargo metadata
--no-deps). The host build selects every workspace member, so cargo accepts
each entry, including pplx-space-spaced-guest-execution, which the old list
omitted but which was already on through pplx-space-spaced-guest-server.
Keyed off SPACE_KIND_RUST_BUILD, it prints nothing for the release lane, so
that lane no longer empties a host list ARG. The Dockerfile runs it in the
planner stage for the cook and again in the build stage, and
build-rust-artifacts.sh's incremental mode runs it inside the builder image
on the synced sources instead of scraping the ARG default. The guest's own
one-entry SPACE_KIND_GUEST_TEST_HOOK_FEATURES stays as it is.

Evidence: `cargo build --unit-graph` for the host build's exact selection
(the build stage's literal -F arguments and its 24 --bin targets) with the
old 17-entry list and with the derived 18-entry list gives the same 918
units with the same features (identical sha256 of the sorted
package/target/mode/profile/features rows; 21 units carry test-hooks). The
release lane's selection (--workspace --exclude
pplx-space-db-test-fixtures, no test-hook features, with or without the
build stage's `-F ""`) gives 919 units, none with test-hooks, the same as
before. Docker planner stage output: the 18-entry list for test-hooks, an
empty file for release.
@ac-pplx
ac-pplx force-pushed the ac/kind-test-hooks-derived branch from b54babf to 595a59b Compare November 5, 2026 16:40
@github-actions
github-actions Bot dismissed coderabbitai[bot]’s stale review November 5, 2026 16:40

The pull request changed after this approval. CodeRabbit approves again after it reviews the current head.

@ac-pplx
ac-pplx added this pull request to the merge queue Nov 5, 2026
Merged via the queue into main with commit 2a73a31 Nov 5, 2026
44 checks passed
@ac-pplx
ac-pplx deleted the ac/kind-test-hooks-derived branch November 5, 2026 17:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

triage:pending Waiting for a maintainer to triage

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant