Skip to content

chore(deploy-action): arch-audit #351 — extract arg-assembly + DRY helpers + scheme fixture - #3

Merged
MichaelTaylor3d merged 2 commits into
mainfrom
loop/deploy-action-arch-audit/hardening-351
Jul 18, 2026
Merged

chore(deploy-action): arch-audit #351 — extract arg-assembly + DRY helpers + scheme fixture#3
MichaelTaylor3d merged 2 commits into
mainfrom
loop/deploy-action-arch-audit/hardening-351

Conversation

@MichaelTaylor3d

Copy link
Copy Markdown
Contributor

TLDR

Actions the deploy-action arch-audit (#351, health 86). Extract the untested inline-bash digstore arg-assembly in action.yml into a tested pure .mjs function (mirroring the repo's decideMode idiom), consolidate the duplicated emitOutput/envBool/writeSummary/prNumber helpers, and fix the stale dig:// smoke fixture to chia://.

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)

  1. [HIGH] idiom-driftaction.yml:285-308: extract the preview/real-deploy arg branching into a pure unit-tested buildDeployArgs-style fn (converges to "decision logic lives in a tested .mjs").
  2. [MED] DRY — unify the 3 emitOutput/$GITHUB_OUTPUT writers (mode.mjs/auth.mjs/report.mjs) on the heredoc-safe form.
  3. [MED] DRY — one shared envBool (dedupe 4 copies) + shared writeSummary (byte-identical in report/teardown).
  4. [LOW] DRY — converge prNumber() (report vs teardown divergent fallback chains).
  5. [LOW] scheme fixturesmoke.yml:153,158: dig://aaaa:bbbb/ → a chia:// example (SPEC §7.1: no bare dig:// open URL).
  6. Finding #6 (toOutputs json blob) = no change (justified design).

Bump

patch (behaviour-preserving refactor + doc fixture).


Generated by Claude Code

MichaelTaylor3d and others added 2 commits July 18, 2026 23:41
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>
@MichaelTaylor3d
MichaelTaylor3d marked this pull request as ready for review July 18, 2026 23:51
@MichaelTaylor3d
MichaelTaylor3d merged commit d0742f5 into main Jul 18, 2026
8 checks passed
@MichaelTaylor3d
MichaelTaylor3d deleted the loop/deploy-action-arch-audit/hardening-351 branch July 18, 2026 23:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant