Skip to content

fix(dist): stage package assets onto a cleared destination - #1879

Open
ScriptedAlchemy wants to merge 7 commits into
masterfrom
fix/distribution-acceptance
Open

ScriptedAlchemy wants to merge 7 commits into
masterfrom
fix/distribution-acceptance

Conversation

@ScriptedAlchemy

Copy link
Copy Markdown
Owner

The first run of the distribution-acceptance workflow failed at "staged asset differs from its snapshot: tests/fixtures". The check stages the clean checkout into a tarball, copies eleven repository-root assets beside crates/tracedecay/Cargo.toml, and compares each copy's digest with the staged original, so no live edit can enter the archive. The copy used cp -a SRC DEST/, which merges a directory into an existing directory of the same name. crates/tracedecay/tests/fixtures gained crate-local content in 528c3f5969 (the impls_behavior fixture), so staging the root tests/fixtures onto it produced the union and the digests diverged. Nothing was leaking into the shipped archive; the whitelist names five fixture subpaths and that one is not among them.

Both copy loops now clear the destination before copying, which covers all twelve staged assets rather than the one that collided. The existing two-second harness scripts/test-check-distribution-snapshot.sh drives the real gate against a synthetic repository; seeding it with crate-local fixture content reproduces CI's exact failure line before the fix and passes after.

Verified with the real production binary built in the lane at this head: staging, packaging every workspace crate, the required-asset and dashboard-bundle checks, and the feature-wiring comparison all pass with the packaged runtime battery skipped. The full battery, a second cold release compile plus five nextest suites and the MCPB, LSP-bridge and MCP-stdio checks, is running locally and the workflow should be dispatched again on master after this merges.

🤖 Generated with Claude Code

ScriptedAlchemy and others added 2 commits September 20, 2026 03:57
The product crate owns `crates/tracedecay/tests/fixtures`, the same path
the root `tests/fixtures` asset is staged onto. The snapshot regression
fixture never carried crate-local content there, so it never exercised
that overlap and the gate's first real run failed instead.

Seed the collision and assert the staged asset carries the root entries
and nothing else.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
`cp -a` merges a directory into an existing directory of the same name,
so staging the root `tests/fixtures` asset beside the product manifest
left the package-local copy a superset of the root tree: the crate's own
`tests/fixtures/impls_behavior` survived alongside it. The snapshot
assertion then reported the staged asset differing from its snapshot and
the gate exited before packaging.

Clear each destination path before copying, in both the product and CLI
asset loops, so a staged asset is exactly the validated root snapshot no
matter what the package directory already holds.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@changeset-bot

changeset-bot Bot commented Sep 20, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 5d3b849

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-20T04:00:27.562073Z 1d7dee1 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

ScriptedAlchemy and others added 5 commits September 20, 2026 04:40
The step asked the extracted root package for its mcp_suite target, but
cargo package publishes no integration tests and the suite requires the
test-transport feature the production graph excludes, so the command
could never run. The step now runs the suite from the staged source
snapshot under the root-transport CI lens with the packaged CLI as the
binary the suite spawns.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
The acceptance script runs the packaged grammar, query, root, LSP and
MCP suites through nextest, and the workflow never installed it, so the
first run to get past staging died on `no such command: nextest`.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Asset staging rewrites package-local directories inside the staged tree
(crates/tracedecay/tests/fixtures becomes the root fixtures), so the
suite compiled from it could not find the package-local impls_behavior
fixture it include_str!s. Keep a second copy of the snapshot before
staging and run the suite from that.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
The structural-rewrite proof in mcp_suite shells out to the host
ast-grep CLI, which CI installs and this workflow did not, so the first
run to reach the suite stopped at that test with 476 tests unrun. Run
the suite without fail-fast so one run reports every gap.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
The library consumer and the test-API probe are fresh manifests, so
cargo resolves them from scratch, and offline resolution refuses a
version that has since been yanked (bisync 0.3.0 under gix-protocol)
even though the workspace lockfile pins it. Copy that lockfile in, as
the extracted packages already get, so they resolve what the product
resolves.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
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.

1 participant