Follow-up to #64.
cargo-athena/src/gitinfo.rs has parallel "derive a dev tag from git" paths: resolve() (build/publish, gated: --allow-dirty, off-branch prompt, --dev-tag slot logic), export_source_build_tag() (consumer source builds, ungated), and export_dev_tag() (added by the source-build tag fix). They share only git_state(), and resolve's slot chain is richer, so for the same tree they can pick different slots. The unsafe set_var trio is also written in more than one place.
Proposed:
- One
dev_outcome(git_state, dev_tag) -> BuildTag doing the slot/tag/prefix computation, called by all paths; layer the gates on top only for build/publish.
- One
bake_env(&BuildTag) (same helper as the BinSel side-effect follow-up).
- Optionally make
BuildTag.channel a method (api::munge::channel_of(&self.tag)) so tag and channel can't disagree.
Scope/risk: highest-churn area, entangled with the recent tag fix; redesign against the current three-function shape, guarded by smoke + e2e. Pairs with the BinSel side-effect follow-up.
Follow-up to #64.
cargo-athena/src/gitinfo.rshas parallel "derive a dev tag from git" paths:resolve()(build/publish, gated:--allow-dirty, off-branch prompt,--dev-tagslot logic),export_source_build_tag()(consumer source builds, ungated), andexport_dev_tag()(added by the source-build tag fix). They share onlygit_state(), andresolve's slot chain is richer, so for the same tree they can pick different slots. Theunsafe set_vartrio is also written in more than one place.Proposed:
dev_outcome(git_state, dev_tag) -> BuildTagdoing the slot/tag/prefix computation, called by all paths; layer the gates on top only for build/publish.bake_env(&BuildTag)(same helper as the BinSel side-effect follow-up).BuildTag.channela method (api::munge::channel_of(&self.tag)) so tag and channel can't disagree.Scope/risk: highest-churn area, entangled with the recent tag fix; redesign against the current three-function shape, guarded by smoke + e2e. Pairs with the BinSel side-effect follow-up.