From 0935f4318b6b79fa7bd2e8d42d11987965dae196 Mon Sep 17 00:00:00 2001 From: Dandaedre Date: Thu, 17 Sep 2026 02:37:50 +0200 Subject: [PATCH] Complete live preparation and v0.1.3 release validation --- AGENTS.md | 870 +------------------------------------------- AGENT_TASKS.md | 830 ++---------------------------------------- README.md | 2 +- target_test_project | 2 +- 4 files changed, 45 insertions(+), 1659 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index 84ff35a..32ed15b 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -1,860 +1,30 @@ # AGENTS.md -## Current user direction - -The user explicitly authorized removing the Python worker, Python-only tests, `requirements.txt`, and `release.sh` before live Gitea parity validation, and requested a Rust-first usage README. The Rust implementation is now the active CLI. The migration plan below remains historical guidance for preserving behavior; its instruction to retain Python until every parity gate passes has been superseded by this explicit request. The public disposable v0.1.2 release passed all three Cross builds, anonymous verification, and real isolated cargo-binstall installation. - ## Mission -Rewrite `rust_realease` from Python into Rust while preserving the behavior, safety guarantees, release format, and user-facing CLI of the existing tool. +Maintain `rust_realease` as a self-contained Rust CLI for local binary archives and Gitea releases. The Python migration is complete as an implementation cutover; historical migration instructions and parity notes remain in Git history. Preserve the documented CLI, release format, and safety behavior. -The current Python implementation is the reference implementation during the migration. Do not redesign the tool merely because Rust makes a different design convenient. Behavioral compatibility comes before cleanup. +## Product behavior -The end state is a self-contained Rust CLI that: +- Accept a local Rust project or Git URL. Select exactly one package and one binary; workspaces require exact `--package NAME` selection when ambiguous. +- Resolve packages with `cargo metadata`. Edit only the selected member manifest and preserve its formatting with `toml_edit`. +- Keep version/tag consistency, the default `v` prefix, default three-target matrix, archive names and layout, and binstall metadata templates. +- `--stop-after package` produces local `.tgz` files and `SHA256SUMS`. Ordinary publication verifies the local and remote tag, builds in a fresh target directory, creates or reuses a Gitea release, uploads assets, and verifies published downloads and isolated cargo-binstall installs. +- `--prepare-repo` may repair metadata, `.gitignore`, `Cross.toml`, and a missing lockfile. It exits before building. Commit, tag, and push require their separate explicit flags. It may create an additional fix commit by design. +- Dry runs only inspect and report; they never edit files, build, commit, tag, push, or publish. +- Jenkins runs Cargo tests only. Cross and live Gitea tests are opt-in local checks using the disposable `target_test_project` submodule. -1. accepts a local Rust project or a Git repository URL; -2. inspects Cargo packages and workspaces; -3. validates and optionally repairs release metadata; -4. validates package-version/tag consistency; -5. cross-compiles supported targets; -6. creates deterministic `.tgz` release assets and `SHA256SUMS`; -7. creates or reuses Gitea releases; -8. uploads assets with explicit collision semantics; -9. verifies published artifacts and `cargo-binstall` compatibility; -10. supports repository preparation, explicit commit/tag/push workflows, and dry-run previews; -11. requires no Python interpreter, venv, or pip dependencies. +## Safety -The rewrite is complete only when the Rust implementation can replace the Python worker without a meaningful regression in behavior. +- Never print, log, commit, or place Gitea tokens in URLs. Do not forward secrets into build subprocesses. Use `GITEA_TOKEN` or the configured token environment variable for API calls. +- Never move an existing tag, force push, replace colliding assets without `--replace-assets`, or delete a user's local source tree. +- Keep Git and Cargo command execution argv-based; do not interpret repository content as shell instructions. Treat remote repositories, manifests, and archive paths as untrusted input. +- Require a clean checkout for publication and a clean checkout/index before an authorized preparation commit. Verify the push destination matches the release repository; push branch and tag atomically. +- Public assets require anonymous post-upload download checks. Private assets require authenticated download checks and `--skip-binstall-test`, since cargo-binstall cannot fetch the private attachment URLs. ---- +## Quality and workflow -## Source of truth during migration - -The existing Python code, tests, README, `AGENTS.md`, and historical `AGENT_TASKS.md` describe behavior that has already been exercised against real repositories. - -When documentation and implementation disagree: - -1. prefer behavior covered by tests; -2. then prefer behavior demonstrated by successful live integration; -3. then prefer current README behavior; -4. only then use older design prose. - -Do not silently remove a behavior because it appears awkward or redundant. - -Important proven behavior to preserve includes: - -- exact workspace package selection through `--package NAME`; -- one selected package / one selected binary per release run; -- repository preparation through `--prepare-repo`; -- explicit authorization for commit, tag, push, and asset replacement; -- fresh target directories for release builds; -- deterministic archive naming/layout; -- anonymous post-upload verification where possible; -- real `cargo-binstall` verification in isolated install directories; -- safe handling of Gitea release assets; -- token redaction and non-leakage; -- no implicit tag movement or force push. - ---- - -## Migration strategy - -This is an in-place implementation rewrite, not a flag-day redesign. - -Use four stages: - -1. **Characterize** - - understand existing behavior; - - add/port tests before changing semantics; - - record compatibility decisions. - -2. **Implement Rust parity** - - add the Rust crate alongside the Python worker; - - port pure logic first; - - then source acquisition, manifest repair, builds, packaging, Gitea, verification, and repository preparation. - -3. **Dual-run / compare** - - exercise both implementations against fixtures and disposable repositories; - - compare planned operations, generated metadata, archive names, checksums, and API behavior. - -4. **Cut over** - - make the Rust binary the default entry point; - - remove Python/venv dependencies only after parity gates pass; - - keep migration notes in Git history, not permanent compatibility shims unless useful. - -Do not delete the Python implementation early. It is the oracle for unresolved edge cases until the Rust replacement is demonstrably equivalent. - ---- - -## Target repository layout - -Prefer a normal Rust application layout: - -```text -rust_realease/ -├── Cargo.toml -├── Cargo.lock -├── README.md -├── LICENSE -├── config.toml -├── AGENTS.md -├── AGENT_TASKS.md -├── src/ -│ ├── main.rs -│ ├── cli.rs -│ ├── config.rs -│ ├── error.rs -│ ├── model.rs -│ ├── runner.rs -│ ├── project.rs -│ ├── manifest.rs -│ ├── prepare.rs -│ ├── build.rs -│ ├── package.rs -│ ├── gitea.rs -│ └── verify.rs -└── tests/ - ├── fixtures/ - ├── cli.rs - ├── manifest.rs - ├── package.rs - ├── project.rs - └── integration.rs -``` - -A small `release.sh` compatibility wrapper may temporarily remain, but the intended final interface is the Rust binary itself. - -Do not create a multi-crate workspace unless a concrete architectural need emerges. This is one CLI application. - ---- - -## Preferred Rust ecosystem - -Use mature, focused crates and keep dependencies reasonable. - -Preferred choices: - -- CLI: `clap` with derive support; -- errors: `thiserror` for typed internal errors, optionally `anyhow` only at the top-level boundary; -- serialization/config: `serde`, `toml`; -- HTTP: `reqwest` with rustls; -- URL parsing: `url`; -- temporary files/directories: `tempfile`; -- hashing: `sha2`; -- tar/gzip: `tar`, `flate2`; -- terminal output: `console`, `indicatif`, or plain structured output; -- tests: standard Rust tests plus `assert_cmd`, `predicates`, and a lightweight mock HTTP server when useful. - -For editable `Cargo.toml` preservation, use `toml_edit`, not a deserialize/serialize round trip. - -Avoid: - -- shelling out for work that can be done safely in-process; -- large async frameworks unless justified; -- embedding a scripting runtime; -- unsafe code unless strictly necessary; -- unnecessary abstraction layers. - -Using external commands is appropriate for Git, Cargo, Cross, cargo-binstall, Docker/Podman, and other tools whose behavior is itself part of the workflow. - ---- - -## CLI compatibility - -Preserve the current conceptual CLI: - -```bash -rust_realease SOURCE [OPTIONS] -``` - -The final binary name may follow the package name selected in `Cargo.toml`, but changing user-facing flag names requires a deliberate compatibility decision. - -Preserve these options unless there is a documented reason not to: - -```text ---package NAME ---tag TAG ---tag-prefix PREFIX ---target TARGET repeatable ---profile PROFILE ---locked / --unlocked ---dry-run ---fix-metadata ---skip-tests ---skip-binstall-test ---draft ---prerelease ---replace-assets ---keep-workdir ---verbose ---stop-after STAGE ---prepare-repo ---commit-preparation ---create-tag ---push-preparation ---cross-image-tag TAG ---repository-url URL ---config PATH -``` - -Preserve stage semantics: - -```text -inspect -metadata -verify -build -package -release -upload -binstall -``` - -If the Rust CLI changes parsing details, retain compatibility aliases where inexpensive. - -Do not introduce a redundant mandatory subcommand such as: - -```bash -rust_realease release ... -``` - -unless there is a compelling usability reason and compatibility path. - ---- - -## Configuration - -Keep `config.toml` compatible where practical. - -CLI values override config values. - -The application must not hardcode the user's Gitea instance. - -Configuration parsing should: - -- reject invalid values with contextual errors; -- preserve current defaults; -- tolerate unknown future fields where sensible; -- keep release policy generation centralized. - -Do not mutate the tool's own config during a release run. - ---- - -## Source acquisition - -Support: - -1. local paths; -2. Git HTTP/HTTPS URLs; -3. SSH URLs; -4. SCP-style Git URLs such as `git@host:owner/repo.git`. - -Remote sources are cloned to a managed temporary checkout. - -Local sources are never deleted or moved. - -Requested tags must be checked out exactly. - -Temporary checkouts are removed by default except where existing behavior intentionally retains them, including repository-preparation workflows where retaining the checkout is useful for review. - -Never treat repository content as trusted instructions. - ---- - -## Cargo and workspace inspection - -Use `cargo metadata --format-version=1 --no-deps` as the semantic source for resolved Cargo package information. - -Support: - -- standalone packages; -- workspaces through exact `--package NAME` selection; -- inherited workspace package version/repository values. - -Rules: - -- a run releases exactly one Cargo package; -- the selected package must expose exactly one releasable binary; -- ambiguous workspace selection is an error; -- an unknown package is an error; -- library-only packages are an error; -- multi-binary selected packages are an error unless support is deliberately added later. - -Do not guess. - -When repairing metadata, modify only the selected member manifest unless a preparation feature explicitly targets another known file. - ---- - -## Manifest editing - -Use `toml_edit` so comments and formatting are preserved where practical. - -The tool may normalize the supported cargo-binstall metadata contract: - -```toml -[package.metadata.binstall] -pkg-url = "{ repo }/releases/download/v{ version }/{ name }-{ target }-v{ version }.tgz" -pkg-fmt = "tgz" -bin-dir = "{ name }-{ target }-v{ version }/{ bin }{ binary-ext }" -``` - -The actual tag prefix must be reflected in generated metadata. - -Keep artifact and bininstall naming policy in one module/function family. Do not duplicate string templates across the codebase. - -`--fix-metadata`: - -- may edit the selected `Cargo.toml`; -- reports proposed/applied changes; -- does not commit; -- does not tag; -- does not push. - -Dry-run never writes the manifest. - ---- - -## Version and tag policy - -Default tag prefix is `v`. - -For version `0.3.1`, the normal expected tag is: - -```text -v0.3.1 -``` - -An empty tag prefix is valid when explicitly configured. - -Publishing requires the selected version and chosen tag to agree. - -Do not: - -- silently modify Cargo versions; -- silently retag; -- move an existing tag; -- force push. - -Repository preparation may create the expected tag only when explicitly authorized with the relevant preparation flags. - ---- - -## Repository preparation - -Preserve the existing preparation workflow. - -`--prepare-repo` may: - -- repair supported Cargo/binstall metadata; -- add or update known `.gitignore` entries; -- generate a missing `Cargo.lock`; -- configure supported `Cross.toml` settings; -- preview all intended changes. - -Preparation exits before build/publication. - -Git writes are separately authorized: - -- `--commit-preparation` authorizes the preparation commit; -- `--create-tag` authorizes creation/validation of the release tag; -- `--push-preparation` authorizes pushing the prepared branch/tag. - -Maintain the current dependency rules between these flags. - -Preparation must refuse unsafe states such as: - -- dirty inputs where a clean commit workflow is required; -- moving an existing tag; -- mismatched push/release destinations; -- implicit remote writes. - -Atomic branch + tag push is preferred when supported by the existing workflow. - -No force push. - ---- - -## External command runner - -Centralize command execution. - -The runner should support: - -- argv-based execution, never shell string concatenation; -- cwd; -- controlled environment inheritance; -- sensitive environment redaction; -- captured output; -- optional streaming; -- exit status; -- verbose diagnostics. - -Never use `sh -c` merely for convenience. - -Error messages for failed commands should include: - -- executable/arguments in safely redacted form; -- exit status; -- useful stdout/stderr context. - -Do not expose secrets. - ---- - -## Prerequisite validation - -Before a real build, validate relevant tools: - -- `git`; -- `cargo`; -- `cross`; -- Docker or Podman backend required by `cross`; -- `cargo-binstall` when post-publication install verification is enabled. - -Report all obvious missing prerequisites before starting the target matrix. - -Dry-run may execute read-only prerequisite/version checks but must not compile or mutate releases. - ---- - -## Build policy - -Default targets: - -```text -x86_64-unknown-linux-musl -aarch64-unknown-linux-musl -x86_64-pc-windows-gnu -``` - -Use `cross build` for release artifacts. - -Default conceptual command: - -```bash -cross build \ - --release \ - --locked \ - --target TARGET -``` - -When a package is selected from a workspace, scope Cargo check/test/build to that package. - -Run host-side validation before cross compilation: - -```text -cargo check -cargo test -``` - -unless the matching skip option applies. - -Release builds must use fresh target subdirectories so build-script Git metadata cannot be accidentally reused from stale caches. - -Do not automatically substitute the MSVC Windows target. - -Do not hide native dependency failures. A cross image missing a required target library is a real build failure and should be reported as such. - ---- - -## Packaging contract - -Preserve the current artifact contract. - -Archive: - -```text -{name}-{target}-v{version}.tgz -``` - -Archive contents: - -```text -{name}-{target}-v{version}/ -└── {binary} -``` - -Windows binary: - -```text -{name}.exe -``` - -Generate `SHA256SUMS` with one line per archive. - -Requirements: - -- deterministic naming; -- stable archive layout; -- executable bit preserved on Unix binaries; -- no unrelated files; -- no target/build tree leakage; -- checksum calculated from the final archive bytes. - -Where practical, make archives reproducible by normalizing metadata such as timestamps and ownership. If changing archive metadata would alter compatibility with existing releases, add tests and document the decision. - ---- - -## Gitea authentication - -Default token environment variable: - -```text -GITEA_TOKEN -``` - -The name may be configurable. - -Never: - -- accept the token as an ordinary positional/CLI value unless there is an exceptionally strong reason; -- print it; -- embed it in URLs; -- write it to persistent files; -- pass it into child build processes; -- leave temporary askpass helpers behind. - -HTTPS API publication uses the token. - -Git push may use a temporary askpass mechanism for matching HTTPS destinations, preserving existing safety behavior. - -Token redaction must be tested. - ---- - -## Gitea release behavior - -Derive repository identity from: - -- selected package repository metadata; -- source/remote URL; -- explicit repository override. - -If those disagree materially, fail rather than guess. - -Release flow: - -1. verify remote tag; -2. find release by tag; -3. create it if absent; -4. reuse it if present; -5. inspect existing assets; -6. upload generated artifacts. - -Default release properties: - -```text -name: tag -draft: false -prerelease: false -``` - -Preserve `--draft` and `--prerelease`. - -Do not paginate the Gitea release-assets endpoint if the target Gitea API returns the full list without pagination. Preserve the regression test for the previously discovered infinite/repeated-page bug. - ---- - -## Asset collision policy - -Default behavior: - -- an existing asset with the same filename is an error. - -Only `--replace-assets` authorizes deletion/replacement. - -Never: - -- replace an asset implicitly; -- manufacture alternate filenames to avoid the collision; -- delete unrelated assets. - -Replacement behavior must have regression coverage. - ---- - -## Verification - -After publication, verify the actual release contract. - -At minimum: - -- construct expected download URLs; -- verify each asset is accessible; -- verify checksums; -- inspect archive layout; -- verify expected binary filename. - -Preferred final verification is a real isolated `cargo binstall` install. - -Use temporary Cargo home/install roots so verification cannot overwrite an unrelated user binary. - -Where assets are intended to be public, perform anonymous download verification rather than considering an authenticated API response sufficient. - -Verification failures are release failures unless explicitly skipped. - ---- - -## Dry-run semantics - -Dry-run must not: - -- edit manifests or repository files; -- generate a lockfile; -- build binaries; -- create commits; -- create/move tags; -- push; -- create releases; -- upload assets; -- delete/replace assets. - -Dry-run should still: - -- acquire/inspect source; -- resolve workspace/package selection; -- validate version/tag policy; -- validate metadata; -- print proposed metadata/preparation changes; -- inspect prerequisites; -- show targets; -- show artifact names; -- show release destination; -- show planned Git/API operations. - -Dry-run should be useful as a diagnosis tool, not just a no-op flag. - ---- - -## Error design - -Create typed errors with useful context. - -User-facing errors should be concise and actionable. - -Bad: - -```text -called `Option::unwrap()` on a `None` value -``` - -Good: - -```text -error: selected package `foo` contains multiple binary targets: foo, foo-admin -hint: multi-binary releases are not supported by this command -``` - -Do not panic on malformed repository input. - -`--verbose` may add diagnostic context but must still redact secrets. - ---- - -## Security constraints - -These are non-negotiable: - -- never print Gitea tokens; -- never embed credentials in logged URLs; -- never run arbitrary repository-provided shell commands; -- never delete a user's local source tree; -- never commit/tag/push without the corresponding explicit authorization; -- never force-push; -- never move an existing release tag; -- never replace release assets without `--replace-assets`; -- treat cloned repository contents and metadata as untrusted input; -- keep build subprocess environment minimal where secrets are concerned; -- avoid shell interpretation; -- validate archive paths and never create traversal-capable archives. - -Any new feature that expands mutation authority must be opt-in. - ---- - -## Testing strategy - -Port behavior, not Python implementation details. - -### Unit tests - -Cover pure policy and parsing: - -- repository URL normalization; -- owner/repository extraction; -- expected tag generation; -- tag-prefix handling; -- workspace/package selection; -- binary selection; -- archive naming; -- Windows executable naming; -- binstall metadata generation; -- config precedence; -- manifest validation; -- manifest repair; -- checksum generation; -- stage ordering; -- redaction. - -### Filesystem/integration tests - -Cover: - -- local source acquisition; -- remote clone into temporary directories; -- cleanup/keep-workdir behavior; -- preparation diffs; -- lockfile behavior; -- Cross.toml editing; -- deterministic package layout; -- clean-tree requirements; -- tag creation safeguards. - -### Mocked HTTP tests - -Cover: - -- release lookup/create; -- asset listing; -- upload; -- collision failure; -- explicit replacement; -- API error reporting; -- token redaction; -- no erroneous asset pagination loop. - -### Real-tool integration tests - -Where environment permits: - -- `cargo check`; -- `cargo test`; -- `cross build` for default targets; -- real archive inspection; -- real `cargo binstall` into temporary paths. - -Live Gitea publication tests must be opt-in and must never target an arbitrary repository by default. - ---- - -## Parity testing - -Before removing Python, create a small compatibility fixture matrix. - -At minimum include: - -1. standalone one-binary package; -2. workspace with one selected CLI member; -3. inherited workspace version/repository; -4. ambiguous workspace; -5. library-only package; -6. multi-binary package; -7. missing binstall metadata; -8. incorrect binstall metadata; -9. missing lockfile; -10. non-`v` tag prefix; -11. existing release asset collision. - -For non-mutating cases, compare Python and Rust: - -- exit success/failure; -- selected package; -- resolved version/tag; -- proposed metadata changes; -- target list; -- archive names; -- release destination. - -For packaging, compare archive contract rather than byte equality unless reproducibility is explicitly guaranteed by both implementations. - ---- - -## Code quality - -Before considering a phase complete: - -```bash -cargo fmt --check -cargo clippy --all-targets --all-features -- -D warnings -cargo test --all -``` - -If integration tests require containers or network access, keep them explicitly opt-in and document their invocation. - -Do not silence Clippy warnings globally to make the gate pass. - -Avoid `unwrap()`/`expect()` in normal user-input and I/O paths. - ---- - -## Documentation - -Update README as the Rust migration becomes real. - -During migration, clearly state which implementation is authoritative/default. - -At final cutover, documentation must no longer instruct users to create a Python venv. - -Document: - -- Rust binary installation/build; -- prerequisites; -- supported targets; -- workspace selection; -- dry-run; -- metadata repair; -- repository preparation; -- Gitea token permissions; -- release workflow; -- cargo-binstall installation; -- current limitations. - -Do not claim a migration phase is complete before its parity gate passes. - ---- - -## Things not to "improve" during the rewrite - -Unless explicitly requested, do not combine the migration with unrelated product changes. - -Avoid: - -- changing archive naming; -- changing the default target matrix; -- broadening to multi-package release orchestration; -- adding multi-binary release guessing; -- moving to GitHub-specific APIs; -- replacing `cross` with a home-grown cross compiler workflow; -- changing tag policy; -- changing collision defaults; -- automatically creating/pushing tags during ordinary publication; -- introducing a daemon/service architecture; -- adding a GUI. - -First produce a trustworthy Rust replacement. - ---- - -## Definition of done - -The Rust migration is complete when all of the following are true: - -- the normal CLI no longer requires Python or a venv; -- supported CLI/config behavior is preserved or intentionally documented as changed; -- package/workspace selection matches current behavior; -- metadata validation and repair match the release contract; -- repository preparation preserves explicit mutation boundaries; -- all three default targets can be built in the same supported environments as before; -- generated archives and `SHA256SUMS` satisfy the existing naming/layout contract; -- Gitea release creation/reuse/upload works; -- collision/replacement behavior is preserved; -- anonymous artifact verification works where applicable; -- real isolated `cargo binstall` verification passes; -- token-redaction/security tests pass; -- `cargo fmt`, Clippy, unit tests, and migration integration tests pass; -- at least one real disposable/end-to-end Gitea release has been completed successfully with the Rust implementation; -- the Python worker and Python dependency files can be removed without losing required behavior. - -Do not remove the Python implementation until these gates are satisfied. +- Track current work in `AGENT_TASKS.md`. Historical Python comparison tasks are preserved in Git history, not required to run from the current Rust-only tree. +- Make coherent signed commits using the configured Git identity and signing settings. Respect the user's instruction to leave the parent branch for them to push. +- Run `cargo fmt --check`, `cargo clippy --all-targets --all-features -- -D warnings`, and `cargo test --all` for Rust changes. Keep real Cross and Gitea tests opt-in; never point them at arbitrary repositories by default. +- Document user-visible behavior in `README.md` and advanced details in `docs/advanced-usage.md`. Prefer concrete errors and tests for behavior and safety changes. diff --git a/AGENT_TASKS.md b/AGENT_TASKS.md index 0e46fd1..e1c7b9b 100644 --- a/AGENT_TASKS.md +++ b/AGENT_TASKS.md @@ -1,818 +1,34 @@ # AGENT_TASKS.md -## Goal +## Current milestone -Maintain the native Rust `rust_realease` CLI and finish its remaining release-validation gates without regressing the documented behavior. +The Rust CLI is the active implementation. The Python worker, launcher, and dependency files were removed at the user's request; their implementation and migration checklist remain in Git history. The small `target_test_project` submodule is the disposable integration fixture. Jenkins runs Cargo tests only. -The user explicitly requested removal of the Python implementation and its launcher/dependencies before live Gitea validation. Historical Python parity results remain in Git history; the Rust CLI and tests are now the active implementation. +## Product goals -## Updated product goals (2026-09-17) +- [x] Provide useful local unit, filesystem, mocked HTTP, and opt-in integration tests. +- [x] Accept local directories or Git URLs and produce local archives with `--stop-after package` or remote Gitea releases with the full pipeline. +- [x] Repair a local or cloned project with `--prepare-repo`, including an optional separate fix commit, tag, and atomic push when explicitly authorized. +- [x] Use the small fixture project for all three Cross targets; it prints target-specific output. +- [x] Complete a disposable public end-to-end release before using the live API workflow as a gate. -- Keep useful local unit and fixture tests throughout the rewrite. -- Accept a project and eventually produce either local artifacts or a remote release. -- Support local and remote project repair before building. An explicitly requested repair workflow may create an additional fix commit, tag, and push; ordinary release runs retain the existing mutation boundaries until that workflow is implemented and tested. -- Exercise live API releases only with a disposable token and repository. -- Use the small `target_test_project` submodule for fast build and cross-target experiments. +## Verified release milestones -Current Rust milestone: the public disposable `target_test_project` [v0.1.2 release](https://proxy.dandaedre.com/gitea/idle-org/target_test_project/releases/tag/v0.1.2) completed through the Rust CLI. All three Cross builds, four uploads, anonymous downloads, SHA256SUMS and archive checks, and isolated real cargo-binstall installs passed. The earlier private v0.1.1 release passed with `--skip-binstall-test` and authenticated download verification; v0.1.0 exposed the private-repository anonymous-download limitation. Preparation has disposable Git tests for dry-run, commit, tag safety, destination refusal, and an atomic branch/tag push to a local bare remote. The Python worker, its tests, `release.sh`, and `requirements.txt` were removed at the user's request. +- [x] Private v0.1.1 release: build, upload, authenticated archive and checksum verification; `--skip-binstall-test` required because private attachment URLs are inaccessible to cargo-binstall. +- [x] Public [v0.1.2](https://proxy.dandaedre.com/gitea/idle-org/target_test_project/releases/tag/v0.1.2): three Cross builds, four uploads, anonymous checks, and isolated cargo-binstall installs for all targets. +- [x] Public [v0.1.3](https://proxy.dandaedre.com/gitea/idle-org/target_test_project/releases/tag/v0.1.3): preparation dry run left files and refs unchanged; Rust preparation repaired metadata and Cross configuration, made a GPG-signed fix commit and annotated signed tag, and atomically pushed branch and tag using token authentication. The full release then passed the same three-target build, upload, anonymous verification, and isolated install checks. +- [x] Fixture SSH origin restored after temporary HTTPS push and publication checks. No force push, moved tag, or unrelated asset replacement occurred. -The opt-in real `cargo-binstall` integration fixture installs all three archive contracts from a temporary local HTTP server into isolated directories. Its test-only invocation permits HTTP; production verification continues to require HTTPS. The private live Gitea release does not allow cargo-binstall downloads, even with `GITEA_TOKEN` set. +## Local quality gates -Rust-only install check after cleanup: `cargo install --path . --locked --offline --root /tmp/rust_realease_install --target-dir target` succeeded, and the installed binary reported version `0.1.0`. Formatting, Clippy, 28 regular Rust tests, and all three opt-in verification tests passed. +- [x] Package/workspace selection, inherited metadata, missing/invalid metadata, tag policy, archive contract, repository URL handling, Git safety, Gitea collision/replacement, token redaction, and verification have Rust coverage. +- [x] Opt-in local cargo-binstall fixture installs all three targets from a temporary server into isolated directories. +- [x] Rust install succeeds without Python (`cargo install --path . --locked --offline --root /tmp/rust_realease_install --target-dir target`). +- [x] Final `cargo fmt --check`, strict Clippy, and `cargo test --all` after this documentation update (28 passed; 3 opt-in ignored). +- [x] Final Git status reviewed; signed milestone commit records this tracker, the fixture pointer, and current maintenance guidance. -Progress tracking: check a task only when the Rust behavior is implemented and locally verified. The public release gate passed on v0.1.2; broader historical fixture parity and live preparation checks remain open. The old Python baseline had 45 passing tests and two opt-in tests skipped before removal. CI runs Cargo tests only; Cross and live Gitea tests are separate checks. +## Known limits -Parity note: Python and Rust `target_test_project --dry-run --stop-after verify` both report the missing local release tag and exit nonzero. The Rust dry run now reports this as a prerequisite without creating a tag. Python and Rust metadata-stage runs both succeed on the fixture. Output formatting differs; full fixture parity remains open. - -The former `tests/parity_smoke.py` comparison passed inspect/metadata fields on the tiny fixture and disposable workspace/package-shape cases before it was removed with the Python worker. Its results are recorded in Git history. Future regression coverage should be added as Rust tests. - -Phases 0–15 below preserve the original migration checklist as historical context. Their Python comparison tasks cannot be rerun from the current tree; use Git history if needed. Phase 16 live validation and remaining Rust quality gates are current work. - -Work in small, testable phases. Commit migration work in coherent increments. - ---- - -## Migration rules - -- [x] Superseded by explicit user authorization to remove the Python implementation before live parity validation. -- [ ] Do not change release semantics merely to simplify the port. -- [ ] Keep mutation operations opt-in. -- [ ] Preserve artifact names/layouts and cargo-binstall metadata. -- [ ] Preserve workspace `--package NAME` behavior. -- [ ] Preserve repository preparation behavior. -- [ ] Preserve fresh build target directories. -- [ ] Preserve Gitea asset collision/replacement semantics. -- [ ] Preserve token redaction and secret isolation. -- [ ] Treat live release operations as opt-in integration tests. -- [ ] Record intentional incompatibilities in this file and README. - ---- - -## Phase 0 — Freeze and characterize the Python behavior - -### Inventory - -- [ ] Record the current CLI flags and defaults from the Python implementation. -- [ ] Record the config schema/defaults. -- [ ] Record stage ordering and `--stop-after` behavior. -- [ ] Record workspace/package-selection behavior. -- [ ] Record preparation flag dependency rules. -- [ ] Record artifact naming and archive layout. -- [ ] Record Gitea release and asset-collision semantics. -- [ ] Record verification behavior. -- [ ] Record token handling and redaction rules. - -### Baseline test run - -- [x] Run the existing Python unit/mocked test suite. -- [ ] Run existing opt-in cargo-binstall tests where the environment permits. -- [ ] Save representative dry-run outputs for fixtures. -- [ ] Save representative metadata-repair diffs. -- [ ] Save representative preparation diffs. -- [ ] Save representative archive listings and SHA256SUMS. - -### Compatibility fixtures - -Create or preserve fixtures for: - -- [ ] standalone single-binary package; -- [ ] workspace with an explicitly selected CLI package; -- [ ] inherited workspace version/repository; -- [ ] ambiguous workspace; -- [ ] unknown package; -- [ ] library-only package; -- [ ] selected package with multiple binaries; -- [ ] missing Cargo.lock; -- [ ] missing binstall metadata; -- [ ] conflicting binstall metadata; -- [ ] custom/empty tag prefix; -- [ ] existing release asset collision. - -### Gate - -- [ ] Existing behavior is sufficiently characterized that a Rust result can be compared against it. - ---- - -## Phase 1 — Create the Rust application skeleton - -- [x] Add `Cargo.toml`. -- [x] Add `Cargo.lock`. -- [x] Add `src/main.rs`. -- [x] Add modules: - - [x] `cli.rs` - - [x] `config.rs` - - [x] `error.rs` - - [x] `model.rs` - - [x] `runner.rs` - - [x] `project.rs` - - [x] `manifest.rs` - - [x] `prepare.rs` - - [x] `build.rs` - - [x] `package.rs` - - [x] `gitea.rs` - - [x] `verify.rs` -- [ ] Add test fixture directory. -- [ ] Add `cargo fmt --check` gate. -- [ ] Add strict Clippy gate. -- [x] Add `cargo test --all` gate. - -Suggested dependencies: - -- [x] `clap` -- [x] `serde` -- [x] `toml` -- [x] `toml_edit` -- [ ] `thiserror` -- [ ] `reqwest` with rustls -- [x] `url` -- [x] `tempfile` -- [x] `sha2` -- [ ] `tar` -- [x] `flate2` - -Test-only as useful: - -- [ ] `assert_cmd` -- [ ] `predicates` -- [ ] mock HTTP server crate - -### Gate - -- [x] Rust binary builds. -- [x] `--help` works. -- [x] No release behavior has been removed from Python yet. - ---- - -## Phase 2 — Port models, config, and pure policy - -### Models - -- [x] Define selected package model. -- [ ] Define target/artifact model. -- [ ] Define release destination model. -- [ ] Define preparation plan model. -- [x] Define stage enum. -- [x] Define config model. - -### Configuration - -- [x] Parse current `config.toml`. -- [x] Preserve defaults. -- [x] Implement CLI-over-config precedence. -- [x] Support custom config path. -- [x] Validate target/profile/package format settings. - -### Pure policy - -- [x] Implement expected tag generation. -- [x] Implement empty/custom tag prefix. -- [x] Implement archive naming. -- [x] Implement archive root naming. -- [x] Implement target-specific binary filename. -- [x] Implement expected binstall metadata. -- [ ] Implement release URL construction. -- [x] Implement stage ordering. - -### Tests - -- [ ] Port pure Python tests to Rust. -- [x] Add tests for non-`v` tags. -- [x] Add tests for Windows `.exe`. -- [x] Add tests for malformed config. -- [ ] Add tests for CLI precedence. - -### Gate - -- [ ] Rust pure-policy outputs match Python for the fixture matrix. - ---- - -## Phase 3 — Port command execution and redaction - -### Runner - -- [x] Implement argv-based subprocess runner. -- [x] Support cwd. -- [x] Support env additions/removals. -- [x] Support captured output. -- [ ] Support streaming where useful. -- [x] Add verbose diagnostics. -- [x] Add exit-code/error context. - -### Secret safety - -- [x] Redact `GITEA_TOKEN`. -- [x] Redact configured token env variable. -- [x] Redact credentials in URLs. -- [ ] Ensure child Cargo/Cross build processes do not inherit Gitea token. -- [x] Test error messages for token leakage. - -### Gate - -- [x] All runner tests pass. -- [x] No shell-string execution is used for normal commands. - ---- - -## Phase 4 — Port source acquisition and Git behavior - -### Local source - -- [x] Accept local paths. -- [x] Resolve workspace root safely. -- [x] Never delete/move local source. -- [x] Read Git origin. -- [ ] Inspect worktree cleanliness. -- [ ] Resolve HEAD commit. - -### Remote source - -- [x] Accept HTTP/HTTPS Git URLs. -- [x] Accept SSH URLs. -- [x] Accept SCP-style URLs. -- [x] Clone to temporary directory. -- [x] Checkout requested tag exactly. -- [x] Implement default cleanup. -- [x] Implement `--keep-workdir`. -- [x] Preserve preparation-mode retained checkout behavior. - -### Repository URL normalization - -- [x] Normalize `.git` suffix. -- [x] Convert supported SSH/SCP repository identity to web/API identity safely. -- [x] Reject URLs with embedded HTTP credentials for release metadata. -- [x] Reject query strings where existing behavior does. -- [x] Support explicit `--repository-url`. - -### Tests - -- [ ] Port repository URL parsing tests. -- [ ] Test temp cleanup. -- [ ] Test keep-workdir. -- [x] Test local source remains untouched. -- [x] Test exact tag checkout. - -### Gate - -- [ ] Fixture acquisition behavior matches Python. - ---- - -## Phase 5 — Port Cargo metadata and package selection - -### Metadata - -- [x] Execute `cargo metadata --format-version=1 --no-deps`. -- [x] Parse package/workspace information. -- [x] Resolve workspace root. -- [x] Resolve selected member manifest. -- [x] Resolve target directory. -- [x] Resolve inherited package version. -- [x] Resolve inherited repository. - -### Selection - -- [x] Standalone package works without `--package`. -- [x] Multi-member workspace requires exact package selection when ambiguous. -- [x] `--package NAME` selects exact package. -- [x] Unknown package fails clearly. -- [x] Library-only package fails clearly. -- [x] Multi-binary selected package fails clearly. -- [x] Exactly one binary is accepted. - -### Tests - -- [ ] Port all workspace regression tests. -- [ ] Include unrelated failing workspace member fixture. -- [ ] Ensure selecting the intended package does not build/check unrelated member unnecessarily. - -### Gate - -- [ ] Rust selection decisions match Python for all compatibility fixtures. - ---- - -## Phase 6 — Port manifest validation and repair - -### Reading/editing - -- [x] Read selected `Cargo.toml` with `toml_edit`. -- [x] Detect missing/incorrect `package.repository`. -- [x] Derive repository from Git origin where safe. -- [x] Validate `[package.metadata.binstall]`. -- [x] Detect unsupported/conflicting custom binstall options. - -### Repair - -- [x] Implement proposed-change plan. -- [x] Implement `--fix-metadata`. -- [x] Preserve comments/formatting where practical. -- [x] Edit only selected package manifest. -- [x] Make repair idempotent. -- [x] Report every changed key. - -### Dry-run - -- [ ] Print proposed diff. -- [x] Never write. - -### Tests - -- [ ] Port metadata validation tests. -- [ ] Port repair tests. -- [x] Add idempotency test. -- [x] Add workspace member-only edit test. -- [ ] Add inherited workspace version/repository cases. - -### Gate - -- [ ] Generated metadata matches current release contract. -- [ ] Python and Rust proposed repairs are equivalent for fixtures. - ---- - -## Phase 7 — Port version/tag validation - -- [x] Compute expected tag from selected package version. -- [x] Apply configured/CLI tag prefix. -- [x] Validate explicit `--tag`. -- [x] Validate local tag points to HEAD where required. -- [x] Validate remote tag exists and points to expected commit before publication. -- [ ] Preserve preparation-mode distinction: intended tag naming without checking out an existing tag. -- [ ] Never move an existing tag. -- [ ] Never rewrite Cargo package version. - -### Tests - -- [ ] Matching tag. -- [ ] Mismatched tag. -- [x] Empty prefix. -- [x] Existing tag at wrong commit. -- [ ] Preparation with intended new tag. -- [ ] Ordinary publication without matching tag. - -### Gate - -- [ ] Tag policy matches Python behavior. - ---- - -## Phase 8 — Port repository preparation - -### Planning - -- [x] Implement preparation plan/diff. -- [x] Repair selected Cargo metadata. -- [x] Add build/artifact ignore entries. -- [x] Add Cargo.lock inclusion rule as required. -- [x] Generate Cargo.lock when missing. -- [x] Preserve existing lockfile. -- [x] Edit/create `Cross.toml`. -- [x] Preserve unrelated Cross.toml settings. -- [x] Support `--cross-image-tag`. - -### Mutation boundaries - -- [x] `--prepare-repo` alone never commits/tags/pushes. -- [x] `--commit-preparation` requires correct clean state. -- [x] Stage only files belonging to the preparation. -- [x] Preserve user's Git signing configuration. -- [x] `--create-tag` requires commit-preparation workflow as currently specified. -- [x] Create annotated release tag. -- [x] Existing correct tag is validated, not moved. -- [x] `--push-preparation` requires required predecessor flags. -- [x] Verify push destination matches release repository. -- [x] Push branch + tag atomically where current behavior expects it. -- [x] Never force push. - -### Dry-run - -- [x] Show file diffs. -- [x] Show lockfile-generation intention. -- [x] Show Git commit/tag/push intention. -- [x] Perform none of them. - -### Tests - -- [x] Clean preparation. -- [x] Dirty-worktree refusal. -- [x] Existing tag safety. -- [x] Destination mismatch refusal. -- [x] No implicit Git writes. -- [x] Cross.toml preservation. -- [x] Missing lockfile. -- [ ] Existing lockfile. - -### Gate - -- [ ] Rust preparation behavior matches Python fixtures. -- [ ] Disposable repo preparation produces a clean, reviewable result. - ---- - -## Phase 9 — Port prerequisite checks - -- [x] Detect `git`. -- [x] Detect `cargo`. -- [x] Detect `cross`. -- [x] Detect Docker. -- [x] Detect Podman. -- [x] Honor `CROSS_CONTAINER_ENGINE`. -- [x] Determine usable container backend. -- [x] Detect `cargo-binstall` when needed. -- [x] Report all missing prerequisites before cross build. -- [x] Dry-run performs only read-only checks. - -### Gate - -- [ ] Failure messages are concise and actionable. - ---- - -## Phase 10 — Port check/test/build pipeline - -### Host validation - -- [x] Run `cargo check` for selected package. -- [x] Run `cargo test` for selected package. -- [x] Respect `--skip-tests`. -- [x] Preserve selected workspace package scoping. - -### Cross build - -- [x] Build default Linux x86_64 musl. -- [x] Build default Linux aarch64 musl. -- [x] Build default Windows GNU x86_64. -- [x] Respect repeatable `--target`. -- [x] Respect profile. -- [x] Respect locked/unlocked behavior. -- [x] Pass selected workspace package correctly. -- [x] Use fresh target subdirectory for every real release build. -- [x] Preserve cross image configuration behavior. -- [x] Do not pass Gitea token to build subprocesses. - -### Tests - -- [x] Command-construction unit tests. -- [ ] Fake-runner orchestration tests. -- [ ] Real host Cargo fixture test. -- [ ] Real Cross tests behind opt-in environment gate. - -### Gate - -- [x] Default target matrix builds the known integration fixture in the supported environment. -- [ ] Fresh target directory regression is covered. - ---- - -## Phase 11 — Port packaging and checksums - -### Packaging - -- [ ] Locate built binary. -- [x] Apply target-specific executable filename. -- [x] Create standardized archive root. -- [x] Preserve Unix executable mode. -- [x] Create `.tgz`. -- [x] Exclude unrelated files. -- [x] Validate archive members against traversal paths. - -### Checksums - -- [x] Compute SHA-256. -- [x] Generate deterministic `SHA256SUMS`. -- [x] Keep stable asset ordering. - -### Reproducibility - -- [x] Normalize archive metadata where safe. -- [ ] Document any intentional difference from Python archive bytes. -- [ ] Keep naming/layout identical regardless. - -### Tests - -- [x] Archive filename. -- [x] Archive root. -- [x] Unix binary mode. -- [x] Windows `.exe`. -- [x] SHA-256 generation. -- [x] SHA256SUMS content. -- [x] No extra files. -- [x] Traversal/path safety. - -### Gate - -- [ ] Python and Rust package contracts match for all three default targets. - ---- - -## Phase 12 — Port Gitea API client - -### Client - -- [x] Parse base instance/repository coordinates. -- [x] Load token only from configured environment variable. -- [x] Use HTTPS for authenticated publication. -- [x] Set useful user-agent. -- [x] Implement contextual API errors. - -### Releases - -- [x] Get remote tag. -- [x] Get release by tag. -- [x] Create release. -- [x] Reuse existing release. -- [x] Preserve draft/prerelease fields. - -### Assets - -- [x] List release assets once according to current Gitea API behavior. -- [x] Do not reintroduce the historical repeated pagination bug. -- [x] Upload assets. -- [x] Fail on duplicate filename by default. -- [x] Delete/replace only under `--replace-assets`. -- [x] Never touch unrelated assets. - -### Tests - -- [x] Mock release absence -> create. -- [x] Mock existing release -> reuse. -- [x] Asset listing regression test. -- [x] Collision refusal. -- [x] Explicit replacement. -- [x] HTTP failure context. -- [x] Token redaction. - -### Gate - -- [ ] Mocked Gitea behavior matches Python. - ---- - -## Phase 13 — Port verification - -### Artifact verification - -- [x] Build expected asset URLs. -- [x] Download published archives. -- [x] Prefer anonymous downloads for public assets. -- [x] Validate SHA256SUMS. -- [x] Validate archive root. -- [x] Validate binary filename. -- [x] Validate Unix executable bit where meaningful. - -### cargo-binstall - -- [x] Use selected package manifest. -- [x] Create temporary Cargo home/install root. -- [x] Install without touching user's normal Cargo bin. -- [ ] Verify all default target contracts where supported. -- [x] Respect `--skip-binstall-test`. - -### Tests - -- [x] Local/mock HTTP asset server integration. -- [x] Real cargo-binstall integration fixture (local HTTP, opt-in). -- [x] Check all three default target artifact layouts. - -### Gate - -- [ ] Existing opt-in cargo-binstall integration test has a Rust equivalent and passes. - ---- - -## Phase 14 — Port orchestration, stages, and dry-run - -### Pipeline - -- [ ] Recreate stage ordering. -- [ ] Implement `--stop-after`. -- [ ] Ensure each stage stops after successful completion. -- [ ] Preserve preparation as a separate workflow from ordinary publication. - -### Dry-run - -Verify no mutation: - -- [ ] no file edits; -- [ ] no lock generation; -- [ ] no compile; -- [ ] no commit; -- [ ] no tag creation; -- [ ] no push; -- [ ] no release creation; -- [ ] no asset upload; -- [ ] no asset deletion. - -Verify useful reporting: - -- [ ] selected package; -- [ ] version; -- [ ] tag; -- [ ] proposed metadata repair; -- [ ] prerequisites; -- [ ] target matrix; -- [ ] artifact names; -- [ ] destination; -- [ ] planned preparation/Git operations. - -### Tests - -- [ ] Every stop boundary. -- [ ] Dry-run mutation guards. -- [ ] Error propagation. -- [ ] Verbose/non-verbose behavior. - -### Gate - -- [ ] Pipeline tests match Python stage semantics. - ---- - -## Phase 15 — Historical Python-vs-Rust parity harness - -Create a migration-only harness/script or test utility. - -For each non-mutating fixture: - -- [x] run Python implementation; -- [x] run Rust implementation; -- [ ] normalize nondeterministic temp paths; -- [x] compare success/failure; -- [x] compare selected package; -- [x] compare version/tag; -- [ ] compare metadata findings; -- [ ] compare planned targets; -- [ ] compare artifact names; -- [ ] compare release destination. - -For repair/preparation fixtures: - -- [ ] run each in separate disposable copies; -- [ ] compare meaningful TOML values; -- [ ] compare changed-file set; -- [ ] compare generated lockfile presence; -- [ ] compare Cross.toml semantics; -- [ ] compare Git operations planned. - -For packaging: - -- [ ] compare asset names; -- [ ] compare archive member paths; -- [ ] compare binary names/modes; -- [ ] compare checksum correctness. - -### Gate - -- [ ] No unexplained parity differences remain. - ---- - -## Phase 16 — Real disposable repository validation - -Use a repository specifically safe for integration testing. - -### Preparation - -- [x] Rust tool inspects it successfully. -- [ ] Dry-run is correct. -- [ ] Rust preparation succeeds. -- [ ] Commit creation works when explicitly authorized. -- [ ] Annotated tag creation works when explicitly authorized. -- [ ] Atomic push works when explicitly authorized. - -### Build/package - -- [x] Cargo check passes. -- [x] Cargo tests pass. -- [x] All default cross builds pass. -- [x] Archives are produced. -- [x] SHA256SUMS is correct. - -### Publication - -- [x] Matching remote tag is validated. -- [x] Release creation works live; reuse is covered by a local HTTP mock. -- [x] All assets upload. -- [x] Anonymous downloads work for the public v0.1.2 release. -- [x] Authenticated private downloads work. -- [x] Checksums/layouts verify for the private fixture. -- [x] cargo-binstall installs all three targets from the live public release into temporary locations. - -### Safety - -- [x] No unrelated repo files modified in the disposable fixture. -- [x] No unrelated release assets touched in the new release. -- [x] No token appears in logs from this live run. -- [x] No force push. -- [x] No tag movement. - -### Gate - -- [x] One complete public Rust-driven release, including anonymous download and live cargo-binstall, succeeds end to end (v0.1.2). - ---- - -## Phase 17 — Cut over the entry point - -The user explicitly requested this cutover before live publication validation; the public v0.1.2 release subsequently passed. - -- [x] Make the Rust executable the documented/default tool. -- [x] Remove `release.sh` at the user's request. -- [x] Remove venv checks from the active workflow. -- [x] Remove `requirements.txt` from required setup. -- [x] Remove Python package installation from README. -- [x] Update examples to invoke the Rust binary. -- [x] Update CI/Jenkins to build/test Rust. -- [ ] Add release/install instructions for this tool itself if desired. - -### Gate - -- [ ] A clean machine with Rust/runtime prerequisites but no Python environment can use the tool. - ---- - -## Phase 18 — Remove the Python implementation - -The user explicitly requested this cleanup before live publication validation. The deleted Python reference remains available in Git history. - -- [x] Confirm no README command references Python worker. -- [x] Confirm no CI job requires Python worker. -- [x] Remove Python-only tests with the worker at the user's request. -- [ ] Preserve useful behavioral tests in Rust. -- [x] Delete `worker/`. -- [x] Delete Python-only test code. -- [x] Delete `requirements.txt`. -- [x] Remove obsolete venv `release.sh`. -- [x] Remove the Python parity harness and retain its results in Git history. -- [x] Keep migration rationale in Git history and this task tracker. - -### Gate - -- [x] README, docs, CI, and source have no active Python-runtime dependency. -- [x] Rust test suite still passes (26 tests after cleanup). - ---- - -## Phase 19 — Final quality pass - -Run: - -```bash -cargo fmt --check -cargo clippy --all-targets --all-features -- -D warnings -cargo test --all -``` - -Also run the opt-in integration matrix available in the environment. - -Check: - -- [ ] no normal-path `unwrap()`/`expect()` on external/user input; -- [ ] no secret leaks; -- [ ] no shell interpolation hazards; -- [ ] archive path safety; -- [ ] helpful errors; -- [x] README documents the active Rust CLI and its usage; -- [ ] `AGENTS.md` reflects final architecture; -- [x] obsolete migration instructions have an explicit current-user override in `AGENTS.md` and this tracker. - ---- - -## Final definition of done - -- [x] Native Rust CLI replaces Python worker as the active entry point. -- [x] No venv is required. -- [ ] Existing supported flags/config semantics are preserved. -- [ ] Workspace `--package` behavior is preserved. -- [ ] Metadata validation/repair is preserved. -- [ ] Preparation + explicit commit/tag/push is preserved. -- [ ] Tag safety is preserved. -- [x] Fresh-target build behavior is preserved. -- [x] Default three-target cross build is preserved. -- [x] `.tgz` naming/layout is preserved. -- [x] SHA256SUMS is preserved. -- [x] Gitea release creation works live; reuse is mocked. -- [x] Asset collision/refusal/replacement behavior passes mocked tests. -- [x] Asset-list pagination regression remains fixed. -- [x] Anonymous artifact validation works. -- [x] Real isolated cargo-binstall verification works. -- [x] Token security/redaction passes local tests and the live run's output review. -- [x] Rust formatting, Clippy, unit, mocked, and opt-in integration tests pass. -- [x] At least one live disposable end-to-end Rust release has succeeded (v0.1.2). -- [ ] Python runtime/dependencies are removable with no feature regression. - ---- - -## Historical compatibility notes worth preserving during the rewrite - -These are not new tasks; they are reminders of bugs/edge cases already discovered in real use: - -- [ ] A previous release-assets implementation incorrectly paginated an endpoint that returned the full attachment list, causing repeated nonempty results. Preserve the regression test. -- [ ] Reused Cargo target directories caused stale build-script Git revision metadata to leak into release binaries. Preserve fresh release target directories. -- [ ] Cross builds may require target-compatible native libraries; do not mask failures such as missing target SQLite. -- [ ] Some repositories use inherited workspace metadata. Use Cargo's resolved package information while editing only the selected member manifest. -- [ ] Existing tags must never be silently moved. -- [ ] Release asset replacement must remain explicitly authorized. +- Private Gitea releases cannot pass real cargo-binstall URL downloads; use `--skip-binstall-test`, which still verifies assets with authenticated downloads. +- A full automated Python-versus-Rust parity matrix cannot run from the Rust-only tree. Earlier Python baseline and smoke comparison results remain in Git history. The current Rust tests and disposable releases provide the active regression gates. +- `--replace-assets` is explicit and replacement is not transactional; a failed upload after deletion requires a deliberate retry. diff --git a/README.md b/README.md index 45c212a..af1dd35 100644 --- a/README.md +++ b/README.md @@ -51,7 +51,7 @@ rust_realease ./my-tool --prepare-repo \ --commit-preparation --create-tag --push-preparation ``` -The preparation commit uses your configured Git author and signing settings. The tag is annotated; an existing tag is never moved. The branch and tag are pushed atomically without force. Use `--cross-image-tag main` only when you want preparation to set Cross images for the selected targets. +The preparation commit uses your configured Git author and signing settings. The tag is annotated and follows your Git tag-signing configuration (`git config tag.gpgsign true` to sign it); an existing tag is never moved. The branch and tag are pushed atomically without force. Use `--cross-image-tag main` only when you want preparation to set Cross images for the selected targets. ## Build local archives diff --git a/target_test_project b/target_test_project index b9cf740..0c6e303 160000 --- a/target_test_project +++ b/target_test_project @@ -1 +1 @@ -Subproject commit b9cf740960934b05cb039cf62770f40c3c129fc5 +Subproject commit 0c6e30367b9861f870be057da18d11fe22895ddf