This document defines the deterministic packaging workflow for bead
asupersync-2b4jj.6.3.
asupersync --format json doctor package-cli \
--source-binary target/release/asupersync \
--out-dir target/e2e-results/doctor_cli_package/artifacts \
--binary-name doctor_asupersync \
--default-profile ci \
--smoke--source-binary is optional. When omitted, the running executable is used.
Required top-level fields:
schema_version(doctor-cli-package-v1)package_versionbinary_namesource_binarypackaged_binarypackaged_binary_size_bytespackaged_binary_sha256release_manifestdefault_profile(localorci)config_templates(non-empty deterministic array)install_smoke(present when--smokeis set)rerun_commandsstructured_logs
Required config_templates[*] fields:
profilepathcommand_preview
Required install_smoke fields:
install_rootinstalled_binarystartup_status(ok)command_status(ok)command_output_sha256observed_contract_version(doctor-core-report-v1)
Two templates are materialized per package run:
<binary>.local.json<binary>.ci.json
Each template is validated after serialization and must include:
schema_version(doctor-cli-package-config-v1)profile(localorci)binary_nameoutput_formatcolordoctor_command(report-contract)workspace_rootreport_out_dirstrict_moderch_binary
Validation fails closed on unsupported profile, unsupported output format, or missing/invalid required fields.
The manifest records:
- package identity + source/packaged binary metadata
- SHA-256 digest and deterministic config template references
- supported platform matrix
- compatibility expectations
- required upgrade path steps
structured_logs includes deterministic event records for:
- package start metadata
- template materialization
- manifest write completion
- install smoke completion (with remediation guidance)
- package completion
When validation or smoke steps fail, errors include remediation guidance in CLI error context for operator triage.
linux-x86_64linux-aarch64macos-x86_64macos-aarch64
- Build a new CLI binary via
rch exec -- cargo build --release --features cli --bin asupersync. - Re-run
doctor package-cliand comparepackaged_binary_sha256in release manifests. - Promote only when package smoke and e2e checks are deterministic and green.
- Config schema evolution is additive within
doctor-cli-package-config-v1. - Packaged smoke requires
doctor report-contractto emitdoctor-core-report-v1. - CI and operator workflows must route cargo-heavy checks through
rch exec -- ....
Deterministic end-to-end validation:
bash scripts/test_doctor_cli_packaging_e2e.shThe suite validates:
- package payload contract conformance
- template profile/command compatibility metadata
- packaged install/startup/command smoke behavior
- cross-run deterministic metadata and command-output digests
- structured log + remediation guidance coverage