Type
Feature request / release-workflow design
What are you trying to do?
Make multi-crate tenferro releases fast, deterministic, and safely resumable without discovering package-order failures during irreversible publication or repeatedly running unrelated workspace tests.
The release skill should prepare the complete human handoff, including a guarded executable shell script, after the tagged release has passed its required validation.
What makes it hard today?
The v0.3.0 publication exposed two versioned workspace dev-dependencies that pointed forward in the publication order:
tenferro-runtime -> (dev) tenferro-cpu, while tenferro-cpu -> tenferro-runtime is a normal dependency.
tenferro-xla -> (dev) tenferro-einsum, while tenferro-einsum follows XLA in the publication order.
Cargo resolves versioned dev-dependencies during cargo package, even with --no-verify. The first edge therefore formed a publish-time cycle, and the second caused another forward-reference failure. Publication needed release-helper-only bootstrap patches after the immutable tag had already been partially published.
Repeated helper corrections also risk triggering expensive CPU/GPU workspace validation even though tagged Rust source and manifests have not changed. Human handoff currently requires manually assembling the publication command or wrapper instead of having the release skill generate a reviewed, resumable script.
Proposed direction
1. Forbid publish cycles and forward dev-dependencies
Add an explicit rule to REPOSITORY_RULES.md:
- A publishable workspace crate must not have a versioned normal, build, or dev-dependency on a publishable crate that appears later in the canonical publication order.
- The complete graph including dev-dependencies must not contain a publication cycle.
- Tests that require a higher layer or both sides of a dependency boundary must live in a
publish = false workspace test crate, unless the canonical publication order can be changed without violating architecture.
- Published crates must remain packageable from their manifests without temporary local
[patch.crates-io] bootstrap configuration.
Resolve the existing runtime/CPU and XLA/einsum violations. Prefer moving cross-layer tests into the minimum number of non-publishable test crates rather than retaining inverted test dependencies in published manifests.
Enforce the rule in scripts/check-publish-layout.py and repository contract tests so a future release fails before tagging.
2. Generate the human publication script from the release skill
Extend the existing tenferro-release-publish skill and canonical release workflow to generate a guarded shell script that:
- pins the selected helper and clean immutable release checkout;
- includes only explicitly approved new-package arguments;
- is restart-safe and uses the helper's registry/provenance checks;
- requires one exact lowercase
y confirmation before irreversible publication;
- is written with mode
0700 and passes bash -n;
- never publishes when run by an agent; it is only a human-maintainer handoff artifact.
Do not create a second overlapping release skill.
3. Make release validation change-aware
Document and enforce a minimal validation matrix:
- Run full workspace, CPU/GPU, coverage, docs, and CI-parity validation once on the exact release commit before tagging.
- Treat successful required CI for that exact commit SHA as reusable canonical evidence. Do not rerun identical local or publication-time workspace tests when neither the commit nor required job configuration changed.
- Classify manifest-only changes before selecting validation:
- package/workspace version, internal version requirement, description, repository, documentation, keywords, categories, or other publication metadata changes require metadata, publish-layout, package/archive, and non-uploading dry-run checks, but not unrelated CPU/GPU or full workspace tests when exact-SHA CI already passed;
- dependency source/version, default feature, feature wiring, target configuration, build script, native library, or compiler-profile changes may alter compiled behavior and require affected tests plus the applicable CI tier;
- ambiguous manifest changes take the safer affected-test path, not an automatic full-workspace rerun.
- For post-tag helper/workflow-only corrections that do not modify tagged package source or manifests, run focused helper tests, Python compilation, publish-layout checks, and real non-uploading
cargo package / cargo publish --dry-run reproductions relevant to the failure.
- Do not rerun unrelated CPU/GPU or full workspace tests solely because the release helper, workflow documentation, generated shell handoff, or publication metadata changed.
- Any Rust source, dependency semantics, feature, backend, build configuration, or tagged-source change still requires the applicable normal validation and a new release commit/version as appropriate.
4. Move reusable policy into shared agent rules
Separate reusable release policy from tenferro-specific details:
- Move cross-repository rules for publication DAGs, forward versioned dev-dependencies, publish-cycle prevention, human-only publication, generated handoff scripts, restart safety, and change-aware validation into the appropriate common or Rust rule files in
tensor4all-agent-rules.
- Keep tenferro-specific crate names, canonical order, approval package names, commands, and test-crate placement in
REPOSITORY_RULES.md and the tenferro release workflow.
- Update tenferro references to consume the shared rules without vendoring or duplicating their normative text.
- Check sibling tensor4all repositories for compatible release guidance and avoid imposing tenferro-specific topology on them.
Relevant areas
REPOSITORY_RULES.md
scripts/check-publish-layout.py
scripts/release-publish.py
scripts/test-release-publish.py
ai/contribution-workflows/release-publish.md
- Existing
tenferro-release-publish skill and thin adapters
tensor4all-agent-rules common/Rust release and repository policy
crates/tenferro-runtime/Cargo.toml
crates/tenferro-xla/Cargo.toml
- New or existing
publish = false integration-test workspace package(s)
Dependency, backend, and API impact
- No public tensor API, backend behavior, AD semantics, feature flags, or external dependencies should change.
- Crate-boundary changes are limited to test ownership and non-publishable test crates.
- The safety boundary remains unchanged: agents validate and prepare; only a human maintainer may execute
cargo publish.
Non-goals
- Do not alter or replace immutable published v0.3.0 archives or tags.
- Do not weaken new-package approval, archive-content, crates.io visibility, provenance, or unyanked-state checks.
- Do not skip the full pre-tag release validation.
- Do not add permanent release-time manifest rewrites or compatibility shims.
Acceptance criteria
Verification
- Focused publish-layout fixtures for forward dev edges and mixed normal/dev cycles.
- Package all publishable crates in canonical order against an empty/local registry simulation or equivalent fixture that exposes unpublished forward dependencies.
- Exercise generated script cancellation and exact-
y continuation without upload.
- Exercise initial and resumed helper runs with non-uploading dry-runs.
- Run repository-rules review and the validation tier selected by the final diff.
- Validate shared agent rules against tenferro and at least one compatible sibling-repository fixture or documented review case.
Provenance and related context
This issue is based on observed tenferro v0.3.0 publication failures, not external prototype code. Related release work is recorded in:
No external code or licensing material is proposed for reuse.
Type
Feature request / release-workflow design
What are you trying to do?
Make multi-crate tenferro releases fast, deterministic, and safely resumable without discovering package-order failures during irreversible publication or repeatedly running unrelated workspace tests.
The release skill should prepare the complete human handoff, including a guarded executable shell script, after the tagged release has passed its required validation.
What makes it hard today?
The v0.3.0 publication exposed two versioned workspace dev-dependencies that pointed forward in the publication order:
tenferro-runtime -> (dev) tenferro-cpu, whiletenferro-cpu -> tenferro-runtimeis a normal dependency.tenferro-xla -> (dev) tenferro-einsum, whiletenferro-einsumfollows XLA in the publication order.Cargo resolves versioned dev-dependencies during
cargo package, even with--no-verify. The first edge therefore formed a publish-time cycle, and the second caused another forward-reference failure. Publication needed release-helper-only bootstrap patches after the immutable tag had already been partially published.Repeated helper corrections also risk triggering expensive CPU/GPU workspace validation even though tagged Rust source and manifests have not changed. Human handoff currently requires manually assembling the publication command or wrapper instead of having the release skill generate a reviewed, resumable script.
Proposed direction
1. Forbid publish cycles and forward dev-dependencies
Add an explicit rule to
REPOSITORY_RULES.md:publish = falseworkspace test crate, unless the canonical publication order can be changed without violating architecture.[patch.crates-io]bootstrap configuration.Resolve the existing runtime/CPU and XLA/einsum violations. Prefer moving cross-layer tests into the minimum number of non-publishable test crates rather than retaining inverted test dependencies in published manifests.
Enforce the rule in
scripts/check-publish-layout.pyand repository contract tests so a future release fails before tagging.2. Generate the human publication script from the release skill
Extend the existing
tenferro-release-publishskill and canonical release workflow to generate a guarded shell script that:yconfirmation before irreversible publication;0700and passesbash -n;Do not create a second overlapping release skill.
3. Make release validation change-aware
Document and enforce a minimal validation matrix:
cargo package/cargo publish --dry-runreproductions relevant to the failure.4. Move reusable policy into shared agent rules
Separate reusable release policy from tenferro-specific details:
tensor4all-agent-rules.REPOSITORY_RULES.mdand the tenferro release workflow.Relevant areas
REPOSITORY_RULES.mdscripts/check-publish-layout.pyscripts/release-publish.pyscripts/test-release-publish.pyai/contribution-workflows/release-publish.mdtenferro-release-publishskill and thin adapterstensor4all-agent-rulescommon/Rust release and repository policycrates/tenferro-runtime/Cargo.tomlcrates/tenferro-xla/Cargo.tomlpublish = falseintegration-test workspace package(s)Dependency, backend, and API impact
cargo publish.Non-goals
Acceptance criteria
REPOSITORY_RULES.mdexplicitly forbids publication cycles and forward versioned dev-dependencies among publishable crates.scripts/check-publish-layout.pyrejects both a normal/dev cycle and an acyclic forward dev-dependency, with focused RED/GREEN contract tests.tenferro-runtime -> (dev) tenferro-cpuandtenferro-xla -> (dev) tenferro-einsumviolations are removed from publishable manifests.publish = falseworkspace test crates, or the issue records why a safe publication-order change is preferable.cargo package --lockedin canonical order without temporary local crates.io patches.0700,bash -n-clean, restart-safe human publication script with one exact lowercaseyconfirmation.tensor4all-agent-rulescommon/Rust rules with focused validation.REPOSITORY_RULES.mdretains only tenferro-specific constraints and references the shared policy without normative duplication.Verification
ycontinuation without upload.Provenance and related context
This issue is based on observed tenferro v0.3.0 publication failures, not external prototype code. Related release work is recorded in:
docs/worklogs/2026-07-04-release-publish-workflow.mdNo external code or licensing material is proposed for reuse.