refactor(workflow): auto-publish in mktsk and commit when standalone#450
refactor(workflow): auto-publish in mktsk and commit when standalone#450RyderFreeman4Logos merged 3 commits intomainfrom
Conversation
Add CSA_SKIP_PUBLISH env var protocol so mktsk and commit complete the full pipeline (push → PR → pr-codex-bot → merge) when used standalone, while skipping publish when called from a parent workflow like dev2merge. Changes: - mktsk: add Step 6 (Publish Transaction) and Step 7 (Post-Merge Sync) with CSA_SKIP_PUBLISH gate - commit: replace IS_MILESTONE condition on Steps 21/22 with !(SKIP_PUBLISH), initialized from CSA_SKIP_PUBLISH env var - dev2merge: pass CSA_SKIP_PUBLISH=true when invoking mktsk in Step 9 - Update SKILL.md and PATTERN.md for both patterns This ensures no workflow path creates a PR without continuing to pr-codex-bot, eliminating the manual intervention gap.
- mktsk: replace `|| true` on cumulative review with hard gate that exits non-zero on review failure (P1: prevents pushing unreviewed code) - commit: resolve BRANCH from git when unset in standalone mode (P1: prevents `git push -u origin ""` failure) - commit: sync PATTERN.md with workflow.toml — replace IS_MILESTONE with SKIP_PUBLISH condition (P2: pattern/workflow sync) - commit: remove stale `milestone=true` example from SKILL.md
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9f8baf4ae5
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| ```''' | ||
| on_fail = "abort" | ||
| condition = "${IS_MILESTONE}" | ||
| condition = "!(${SKIP_PUBLISH})" |
There was a problem hiding this comment.
Keep
/sa from auto-publishing every successful commit
Changing the commit publish gate to !(${SKIP_PUBLISH}) makes auto-push/PR the default for any caller that does not explicitly export CSA_SKIP_PUBLISH=true. I checked patterns/sa/workflow.toml:241-253, and /sa still includes commit whenever REVIEW_IS_CLEAN without setting that variable, so a clean /sa run now pushes the branch, opens/reuses a PR, and triggers pr-codex-bot even when the user only wanted a local commit. Before this change /sa relied on the old milestone gate, so this is a behavioral regression for an existing parent workflow.
Useful? React with 👍 / 👎.
| BRANCH="$(git branch --show-current)" | ||
| git push -u origin "${BRANCH}" --force-with-lease |
There was a problem hiding this comment.
Block standalone
mktsk from pushing protected branches
The new standalone publish path never validates that BRANCH is a feature branch before pushing. Unlike /commit and scripts/hooks/post-pr-create.sh, Step 6 goes straight to git push -u origin "${BRANCH}" --force-with-lease; if someone runs /mktsk from main or dev, a workflow that previously stopped at local verification now attempts a direct push to that protected branch before PR creation even starts. The skill docs already say mktsk must run on a feature branch, but this step does not enforce it.
Useful? React with 👍 / 👎.
- sa: set CSA_SKIP_PUBLISH=true before including commit workflow, preventing /sa from auto-pushing on every clean commit (P1) - mktsk: add branch safety check in Step 6 — refuse to push protected branches (main/dev) in standalone mode (P1)
|
Bot review findings addressed in commit 951c5b2:
Both findings from @codex review at 2026-03-21T14:57:30Z were confirmed real issues and resolved. |
|
To use Codex here, create an environment for this repo. |
Summary
CSA_SKIP_PUBLISHenv var protocol somktskandcommitcomplete the full pipeline (push → PR → pr-codex-bot → merge) when used standalone/pr-codex-botinvocationChanges
CSA_SKIP_PUBLISHgateIS_MILESTONEcondition on Steps 21/22 with!(SKIP_PUBLISH), initialized fromCSA_SKIP_PUBLISHenv var; resolveBRANCHfrom git in standalone modeCSA_SKIP_PUBLISH=truewhen invoking mktsk in Step 9Control flow
/commit/mktsktruetrueTest plan
weave compile-allpasses (17/17 OK)🤖 Generated with Claude Code