micro--go-micro
666fc4b794
Rename the autonomous-loop workflows so the Actions list maps to the long-running-agent harness pattern (planner → generator → evaluator): architecture-review.yml -> loop-architect.yml "Loop: Architect (Planner)" continuous-improvement.yml -> loop-builder.yml "Loop: Builder (Generator)" devrel-review.yml -> loop-devrel.yml "Loop: DevRel" harness-triage.yml -> loop-triage.yml "Loop: Triage (Evaluator feedback)" harness.yml stays the shared Evaluator/CI gate (triage still matches it by the "Harness (E2E)" name). Document the pipeline + role mapping in CONTINUOUS_IMPROVEMENT.md, and point to it from CONTRIBUTING so the development process is discoverable. No behavior change — schedules, gates, and required checks are unaffected. Co-authored-by: Claude <noreply@anthropic.com>
60 行
3.9 KiB
YAML
60 行
3.9 KiB
YAML
name: "Loop: Triage (Evaluator feedback)"
|
|
|
|
# Closes the autonomous loop's feedback path: when the live provider-conformance
|
|
# harness fails, dispatch Codex to TRIAGE the failing run and file scoped, deduped
|
|
# issues that the hourly increment loop then fixes — no human in the middle. It
|
|
# only triages the scheduled/manual live run (not every push/PR mock run), dedupes
|
|
# against open issues so hourly repeats don't spam, ignores transient flakes, and
|
|
# ESCALATES anything needing a breaking/architectural change as needs-human rather
|
|
# than auto-building it.
|
|
#
|
|
# Gated on CODEX_TRIGGER_TOKEN like the rest of the loop (Codex ignores comments
|
|
# authored by the github-actions bot).
|
|
#
|
|
# Note: Codex is serial, so this competes with the hourly increment + architect
|
|
# dispatches for the single task slot. If it saturates, lower the harness cadence
|
|
# or gate this to a slower schedule.
|
|
|
|
on:
|
|
workflow_run:
|
|
workflows: ["Harness (E2E)"]
|
|
types: [completed]
|
|
|
|
permissions:
|
|
issues: write
|
|
|
|
concurrency:
|
|
group: harness-triage
|
|
cancel-in-progress: false
|
|
|
|
jobs:
|
|
triage:
|
|
runs-on: ubuntu-latest
|
|
# Only when the harness actually failed, and only for the scheduled or manual
|
|
# live run — never the per-push/PR mock run.
|
|
if: github.event.workflow_run.conclusion == 'failure' && (github.event.workflow_run.event == 'schedule' || github.event.workflow_run.event == 'workflow_dispatch')
|
|
steps:
|
|
- name: Open a triage issue and dispatch Codex
|
|
env:
|
|
GH_TOKEN: ${{ secrets.CODEX_TRIGGER_TOKEN || github.token }}
|
|
HAS_TRIGGER_TOKEN: ${{ secrets.CODEX_TRIGGER_TOKEN != '' }}
|
|
REPO: ${{ github.repository }}
|
|
RUN_ID: ${{ github.event.workflow_run.id }}
|
|
RUN_URL: ${{ github.event.workflow_run.html_url }}
|
|
run: |
|
|
if [ "$HAS_TRIGGER_TOKEN" != "true" ]; then
|
|
echo "CODEX_TRIGGER_TOKEN is not set — skipping (Codex ignores Actions-bot comments)."
|
|
exit 0
|
|
fi
|
|
# Ensure the escalation label exists (idempotent).
|
|
gh label create needs-human --repo "$REPO" --color FBCA04 \
|
|
--description "Requires a human/architect decision (breaking or architectural)" --force || true
|
|
|
|
ISSUE_URL=$(gh issue create --repo "$REPO" \
|
|
--title "Harness failure triage: run $RUN_ID" \
|
|
--body "Automated triage of a failed live provider-conformance harness run: $RUN_URL")
|
|
ISSUE_NUM="${ISSUE_URL##*/}"
|
|
echo "Opened triage issue #$ISSUE_NUM — dispatching Codex."
|
|
gh issue comment "$ISSUE_NUM" --repo "$REPO" --body \
|
|
"@codex Act as failure triage for the autonomous loop. The live provider-conformance harness failed: $RUN_URL (run id $RUN_ID). Do this, and do NOT change code or open a PR — triage only: (1) Read the failing logs (\`gh run view $RUN_ID --repo $REPO --log-failed\`) and the provider-conformance artifact/summary. (2) Root-cause each DISTINCT failure. (3) DEDUPE against existing work — list open issues (\`gh issue list --repo $REPO --label codex --state open --limit 100\`); if a matching issue already exists for a failure, add a one-line 'recurred in $RUN_URL' comment to it and do NOT open a duplicate. (4) For each genuine, self-contained, CI-verifiable defect that is NOT already tracked, open a scoped issue: \`gh issue create --repo $REPO --label codex --label enhancement --title \"<scoped task>\" --body \"<root cause, scope, acceptance criteria, and the failing run link>\"\` — the hourly increment loop will build it. (5) If a failure is transient/flaky and not a code defect (e.g. a live-model latency timeout or provider outage), note it in a comment and file NOTHING. (6) If a real fix would require a breaking public-API change or an architectural change, do NOT file it as an auto-buildable task — open an issue labeled \`needs-human\` describing it for the architect/human. When finished, close this triage issue (\`gh issue close $ISSUE_NUM\`)."
|