Skip to content

Fix the release dry-run publish cycle and preserve leaf-only DAG imports#2931

Merged
huitseeker merged 6 commits intonextfrom
fix/release-dry-run-cycle-and-dag-snapshots
Apr 2, 2026
Merged

Fix the release dry-run publish cycle and preserve leaf-only DAG imports#2931
huitseeker merged 6 commits intonextfrom
fix/release-dry-run-cycle-and-dag-snapshots

Conversation

@huitseeker
Copy link
Copy Markdown
Contributor

@huitseeker huitseeker commented Mar 28, 2026

The release dry-run job runs cargo publish --workspace --dry-run. It failed after the merge of #2869 because miden-air now depends on miden-ace-codegen, while miden-ace-codegen still had test-only code that depended on miden-air. That made a publish cycle that normal builds did not show.

This PR moves the ProcessorAir ACE checks into miden-air, removes the back edge from miden-ace-codegen.

The follow-on DAG work keeps leaf-only DAG imports safe. DagBuilder::from_nodes() can recover source ids when the nodes already carry them, but leaf-only DAGs do not. This PR adds an explicit snapshot type for exported DAGs and seals that snapshot so the saved provenance stays tied to its nodes.

A small cleanup deletes the stale scripts/publish-release.sh backup script. FIxes #2917

@huitseeker huitseeker marked this pull request as ready for review March 28, 2026 11:31
@huitseeker huitseeker force-pushed the fix/release-dry-run-cycle-and-dag-snapshots branch 2 times, most recently from d071ac2 to d0c2be5 Compare March 30, 2026 15:37
@0xMiden 0xMiden deleted a comment from github-actions bot Mar 30, 2026
Copy link
Copy Markdown
Contributor

@Al-Kindi-0 Al-Kindi-0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks for fixing!

The release dry-run job runs `cargo publish --workspace --dry-run` so we catch packaging and publish-order problems before a real release. This failure came from a publish cycle that normal builds did not show.

`miden-air` now depends on `miden-ace-codegen`, but `miden-ace-codegen` still had test-only code that depended on `miden-air`. That made the dry-run stop when it tried to package the workspace for release.

Move the `ProcessorAir` ACE checks into `miden-air`, remove the back edge from `miden-ace-codegen`, and keep the fallback publish order aligned with the real dependency order.
The follow-on work here keeps the public DAG import path safe after the release fix.

`DagBuilder::from_nodes()` can recover source ids when the nodes already carry them, but leaf-only DAGs do not. Add an explicit snapshot type for exported DAGs, use that path when a caller needs to keep the old root, and seal the snapshot so its saved provenance cannot drift from its nodes.
Issue #2917 pointed out that `scripts/publish-release.sh` was an old backup copy that no longer matched the real release flow. Delete it so the repo keeps one clear path for release work.

This cleanup is separate from the release dry-run fix above.
Remove redundant resolve_node call in const_value, flatten
ImportedDag from a single-variant enum to a struct, remove the
unused AceDag::snapshot() and DagSnapshot::nodes() methods, and
drop a tautological assertion in the synthetic OOD test.

Move shared test evaluation helpers (fill_inputs, eval_periodic_values,
eval_base_expr, eval_ext_expr, eval_folded_constraints, eval_quotient,
zps_for_chunk, eval_dag) into a new testing module gated on
cfg(any(test, feature = "testing")), so both ace-codegen internal tests
and air integration tests use the same code. This removes ~250 lines
of duplicated helpers from air/tests/ace_codegen.rs and trims the
now-unused #[cfg(test)] eval_quotient and FieldOps from quotient.rs.
@huitseeker huitseeker force-pushed the fix/release-dry-run-cycle-and-dag-snapshots branch from d0c2be5 to f242c9d Compare April 1, 2026 16:43
@huitseeker huitseeker requested review from Nashtare and removed request for bobbinth April 1, 2026 16:44
@huitseeker huitseeker merged commit c30aeb9 into next Apr 2, 2026
17 checks passed
@huitseeker huitseeker deleted the fix/release-dry-run-cycle-and-dag-snapshots branch April 2, 2026 11: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.

scripts/publish-release.sh looks stale relative to the release workflow

3 participants