micro--go-micro
666e1f765e
* fix: harden flow step execution against nil Run and cancellation A step with no Run function panicked the run; it now returns a clear configuration error. The retry loop also kept retrying after the run's context was canceled or its deadline passed — it now stops immediately and surfaces the context error, preserving cancellation/deadline semantics for durable workflow runs. Adds regression coverage for both. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CmdEY7pYmV5zzwCjNJ4ykL * ci: give each Codex dispatch a unique branch to avoid collisions Codex derives its PR branch name from the dispatch text. The hourly loop posted an identical generic prompt every run, so every increment resolved to the same branch name — the previous increment's branch (until auto- merged and deleted) blocked the next PR from opening. Include the run number in the prompt and explicitly request a fresh codex/improvement-<run_number> branch, so each increment is isolated. auto-merge-codex.yml still matches (codex/* prefix) and deletes on merge. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CmdEY7pYmV5zzwCjNJ4ykL --------- Co-authored-by: Claude <noreply@anthropic.com>
52 行
2.7 KiB
YAML
52 行
2.7 KiB
YAML
name: Continuous Improvement
|
|
|
|
# Durable backbone for the autonomous improvement loop
|
|
# (see internal/docs/CONTINUOUS_IMPROVEMENT.md).
|
|
#
|
|
# A Claude Max subscription provides no API key for CI, so the loop is driven by
|
|
# Codex rather than Claude Code: on a cadence this posts an @codex instruction on
|
|
# the tracker issue (#3024), and Codex runs one improvement increment + opens a PR.
|
|
#
|
|
# Codex does NOT respond to comments authored by the github-actions bot, so the
|
|
# dispatch is GATED on a CODEX_TRIGGER_TOKEN secret (a PAT for a user account Codex
|
|
# follows). Until that secret is set the workflow runs but no-ops — this avoids
|
|
# piling up @codex comments that Codex silently ignores. The moment the secret is
|
|
# added the loop activates with no further change.
|
|
#
|
|
# Each dispatch asks Codex for a UNIQUE branch (codex/improvement-<run_number>).
|
|
# Codex derives a branch name from the dispatch text, so an identical generic
|
|
# prompt every hour would collide on one branch name — the prior increment's
|
|
# branch (until auto-merged + deleted) blocks the next PR from opening. The
|
|
# per-run id keeps every increment on its own branch.
|
|
|
|
on:
|
|
workflow_dispatch: {}
|
|
schedule:
|
|
- cron: "29 * * * *" # hourly, off-minute (tune as needed)
|
|
|
|
permissions:
|
|
issues: write
|
|
|
|
concurrency:
|
|
group: continuous-improvement
|
|
cancel-in-progress: false
|
|
|
|
jobs:
|
|
dispatch:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Ask Codex to run one increment
|
|
env:
|
|
GH_TOKEN: ${{ secrets.CODEX_TRIGGER_TOKEN || github.token }}
|
|
HAS_TRIGGER_TOKEN: ${{ secrets.CODEX_TRIGGER_TOKEN != '' }}
|
|
run: |
|
|
if [ "$HAS_TRIGGER_TOKEN" != "true" ]; then
|
|
echo "CODEX_TRIGGER_TOKEN is not set — skipping dispatch."
|
|
echo "Codex ignores comments from the github-actions bot, so posting now"
|
|
echo "would only create noise. Add a CODEX_TRIGGER_TOKEN secret (a PAT for"
|
|
echo "a user account Codex follows) to activate the loop."
|
|
exit 0
|
|
fi
|
|
gh issue comment 3024 --repo "${{ github.repository }}" --body \
|
|
"@codex Run continuous-improvement increment #${{ github.run_number }} per internal/docs/CONTINUOUS_IMPROVEMENT.md, aligned to the North Star in internal/docs/THESIS.md (the holistic services → agents → workflows lifecycle). Pick the single highest-value roadmap/issue/improvement-radar item that advances that thesis, implement it, verify \`go build ./...\`, \`go test ./...\`, and \`golangci-lint run ./...\`, and open a PR against master from a NEW branch named \`codex/improvement-${{ github.run_number }}\` (do not reuse an existing branch). One concern per PR; stay out of brand/positioning copy and breaking public API."
|