chore(deploy-action): arch-audit #351 — extract arg-assembly + DRY helpers + scheme fixture - #3
Merged
MichaelTaylor3d merged 2 commits intoJul 18, 2026
Conversation
Salvage-anchor stub: extract action.yml arg-assembly into a tested pure fn, DRY emitOutput/envBool/writeSummary/prNumber helpers, fix stale dig:// smoke fixture -> chia://. Refs #351 Co-Authored-By: Claude <noreply@anthropic.com>
…Actions IO helpers Actions the arch-audit findings in DIG-Network/dig_ecosystem#351: - Extract the preview-vs-real-deploy `digstore deploy` arg mapping out of untested inline bash (action.yml's "Deploy to DIG" step) into a pure, unit-tested `buildDeployArgs()` (src/deploy-args.mjs) + a thin print-deploy-args.mjs entrypoint the bash step loads via a NUL-safe `mapfile`. Emitted argv is unchanged for every branch (preview / if-changed / store-id / remote / message / build-command / wait-timeout). - Converge the three divergent `emitOutput`/GITHUB_OUTPUT writers (mode.mjs/auth.mjs/report.mjs) on one heredoc-safe helper (src/actions-io.mjs), plus the duplicated `envBool`, `writeSummary`, and `prNumber` (teardown.mjs now uses report.mjs's superset PR-number fallback chain — safe since teardown only runs on pull_request events). - Fix the smoke-test scheme fixture: `content_address` is a `chia://` content-open address per SPEC (dig:// is reserved for the urn:dig: / §21-remote namespace), not `dig://`. Behaviour-preserving: mode.mjs's local-dev (no $GITHUB_OUTPUT) console-log fallback is unchanged; smoke.yml's mode.mjs assertions are updated to match the (now heredoc-safe) on-disk step-output format GitHub Actions itself already parses identically either way. Closes #351 Co-Authored-By: Claude <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
TLDR
Actions the deploy-action arch-audit (#351, health 86). Extract the untested inline-bash digstore arg-assembly in
action.ymlinto a tested pure.mjsfunction (mirroring the repo'sdecideModeidiom), consolidate the duplicatedemitOutput/envBool/writeSummary/prNumberhelpers, and fix the staledig://smoke fixture tochia://.Closes #351.
Status
🚧 Draft — salvage-anchor stub pushed; hardening in progress by the autonomous loop (cold-repo lane, deploy-action 146h idle).
Planned (from the audit)
action.yml:285-308: extract the preview/real-deploy arg branching into a pure unit-testedbuildDeployArgs-style fn (converges to "decision logic lives in a tested .mjs").emitOutput/$GITHUB_OUTPUTwriters (mode.mjs/auth.mjs/report.mjs) on the heredoc-safe form.envBool(dedupe 4 copies) + sharedwriteSummary(byte-identical in report/teardown).prNumber()(report vs teardown divergent fallback chains).smoke.yml:153,158:dig://aaaa:bbbb/→ achia://example (SPEC §7.1: no baredig://open URL).Bump
patch (behaviour-preserving refactor + doc fixture).
Generated by Claude Code