test(cli): provision compiled host-CLI fixtures - #954
Conversation
Compile a real kiro-cli/codex helper in build.rs so Windows tests no longer rename a shell script to .exe or depend on ambient installs. Co-authored-by: Zack Jackson <ScriptedAlchemy@users.noreply.github.com>
|
…sor/host-cli-fixtures-42d7
…sor/host-cli-fixtures-42d7
ScriptedAlchemy
left a comment
There was a problem hiding this comment.
Review — REVISE fixture provisioning; keep the native fake CLI
Reviewed 9d51efd120480029b939cd5559c2eb2f548129ae; source review only. GitHub reports conflicts and exact-head CI pending. A compiled deterministic fake is correct for these tests; requiring ambient Kiro/Codex or renaming a shell script to .exe is not.
P1 build regression: tracedecay-cli/build.rs::main unconditionally compiles this test-only executable for every product build. The direct rustc call adds --target but does not inherit Cargo's target linker/configuration, and uses the build-host EXE_SUFFIX. That makes normal release/cross-target builds depend on linking a fixture they never use. Provision it through an explicitly enabled test-support target/feature or a dedicated workflow helper build; don't use cfg(test) in build.rs as a substitute for explicit feature selection. Keep non-test builds free of this work.
P1 distribution acceptance: prove the fixture survives nextest archive -> clean Windows shard extraction/remap and is executable at the path the tests resolve. An OUT_DIR absolute path baked into a binary is not, by itself, evidence that the helper is shipped to the executing machine. Include the helper in the selected test-artifact contract and test without access to the build machine's tree.
Preserve missing-executable, malformed-output and ownership-conflict as different outcomes. Record argv as structured entries rather than a joined string if the assertion is meant to distinguish arguments containing spaces. Keep vendor conformance separate from the fake's protocol tests. Resolve conflicts and run native Windows host-fixture plus Kiro/Codex acceptance before integration into #707.
…plan-reopened' into cursor/host-cli-fixtures-42d7
ScriptedAlchemy
left a comment
There was a problem hiding this comment.
System-level re-review at 9d51efd12 — keep test provisioning out of the product build contract
Re-read build.rs, compile_host_cli_fixture.rs and the shared provisioner. The earlier build-boundary objection is still present: build.rs invokes the fixture compiler unconditionally, including non-test builds/checks. The native executable itself is a sound replacement for a shell script named .exe; the ownership of its build/distribution is the problem.
P1 — the raw compiler invocation bypasses Cargo's target toolchain configuration. It forwards --target but not the target linker or applicable Cargo rustflags. A cross-target cargo check that previously needed only target metadata now attempts to link an unrelated test executable, and a product cross-build using a configured linker may fail because this subprocess does not inherit that configuration. The destination suffix is also taken from the build-script host rather than the target. Move this work to an explicit test-fixture provisioning step/artifact, or a test-only build contract that correctly follows the target toolchain. Do not gate it by debug/release profile: release tests and debug product builds are both valid.
P2 — verify the artifact, not only the installed test-local copy. provision_host_cli_fixture.rs obtains the source through compile-time TRACEDECAY_HOST_CLI_FIXTURE, then hard-links/copies it. It has no fallback if the build job's OUT_DIR file is absent. The Windows archive-only lane must explicitly transport that helper or reproduce it in test provisioning before tests run. I have not inspected a produced archive, so I am not claiming the helper is definitely missing; the current source establishes that it is a required external test artifact. Exercise a clean extraction without the original target directory and assert the helper runs, not merely that its bytes have an executable header.
Keep install/list/conflict/malformed/missing-program cases separate. A deterministic fake proves TraceDecay's invocation and parsing contract, not compatibility with the real vendor CLI; do not label it a vendor end-to-end acceptance lane. Preserve exact argument recording and isolated HOME/PATH.
No native compilation or archive execution performed here. Returned CI is pending, coverage in progress, profile succeeded and plugin validation queued. #707 remains draft.
…plan-reopened' into cursor/host-cli-fixtures-42d7
|
Addressed the latest review on exact head P1 — production/cross-target build regression
P1 — nextest archive distribution
Preserved contracts
The complete local CLI run executed 570 tests: 569 passed; the unchanged |
…plan-reopened' into cursor/host-cli-fixtures-42d7
Performance Comparison
|
|
Latest-base follow-up: #707 advanced after the first evidence post, so I merged its new tip Fresh evidence on
The intervening #707 delta touched search-eval/configuration files only; it did not alter the fixture, archive contract, CLI host lifecycle, or agent-host code. Exact-head GitHub checks have restarted, including the native Windows archive/shards. |
…plan-reopened' into cursor/host-cli-fixtures-42d7
…plan-reopened' into cursor/host-cli-fixtures-42d7
…plan-reopened' into cursor/host-cli-fixtures-42d7
|
Final base convergence: pushed
|
a8c322a
into
codex/tracedecay-total-redesign-plan-reopened
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Summary
--bin/--binsbuilds no longer compile it inbuild.rs..exeexplicitly in the nextest archive contract.Fixes #936.
Implementation
tracedecay-host-cli-fixtureis a[[example]]; Linux/macOS and Windows test lanes build it explicitly with Cargo, so target linker configuration remains Cargo-owned..config/nextest.tomlarchivestarget/debug/examples/tracedecay-host-cli-fixture.exefor clean Windows shards.target/<profile>/examples/...fromcurrent_exe()instead of embedding a build-machineOUT_DIR.ETXTBSYfork/write-descriptor race; Windows copies the native.exe.Evidence
cargo clippy -p tracedecay-cli -p tracedecay-agent-hosts --all-targets --locked -- -D warnings: clean on the latest merged feat: TraceDecay V2 delivery (PR8–PR13) + daemon performance, memory, and reliability overhaul #707 tip.The complete local CLI package run executed 570 tests: 569 passed and the unchanged
branch_list_reads_profile_sharded_branch_metasubprocess hit its existing 90-second local deadline. Focused host-CLI acceptance passed again after each latest-#707 merge; per-finding and exact-head receipts are posted below.