Skip to content

Consolidate CI helpers and give runtime setup one owner - #1608

Merged
max-sixty merged 1 commit into
mainfrom
codex/bounded-triage-batches
Oct 30, 2026
Merged

max-sixty merged 1 commit into
mainfrom
codex/bounded-triage-batches

Conversation

@max-sixty

Copy link
Copy Markdown
Owner

CI skills still invoked Python files by plugin path after the runtime extraction, maintaining a second GitHub transport and interpreter-selection path. Generated jobs also installed the runner package before early checks and again inside the harness. This change gives each mechanism one owner.

  • Move all 17 CI helpers into tend.runtime.ci with Click commands under tend runtime, sharing the runtime GitHub transport. Cut skills, landing action, and tests over together; remove the old script entry points, import-path hacks, and Codex's plugin-location export.
  • Make setup-runtime an explicit prerequisite at the same release ref for harness, landing, and refresh actions. It installs the runner once; harnesses install only the separate sandbox copy. Restore runner command precedence before sandbox installation can fail, preserving cleanup and reporting after consumer PATH changes.
  • Remove unused action bot_name, allowed_bots, and allowed_non_write_users inputs. Configuration bot_name still serves workflow filtering.

Generated workflows and candidate CI include setup. Tend's repo-local overlays run the checked-out package through uv run --package tend --no-dev, so they work independently of its currently pinned older action release. Hand-maintained workflows retain their published pins until release deployment; the canonical restamping procedure includes setup and input changes.

Validation: full wt test passed (1,650 Python tests, 32 Worker tests, typecheck, 6 eval capture tests), followed by targeted regression checks for final fixes. All pre-commit hooks pass. Independent reviews found no remaining issues. Regression coverage includes closed stdout leaving the reviewed-head pin unchanged, rejection of invalid evidence targets before writes, evidence-state diagnostics, and failed sandbox installation retaining the pinned runner CLI. Linux sandbox integration is exercised by CI.

This was written by Codex on behalf of max-sixty

@max-sixty
max-sixty merged commit 54fbddf into main Oct 30, 2026
13 checks passed
@max-sixty
max-sixty deleted the codex/bounded-triage-batches branch October 30, 2026 00:46
@max-sixty max-sixty mentioned this pull request Oct 30, 2026
max-sixty added a commit that referenced this pull request Oct 30, 2026
Prepare Tend 0.3.20 with bounded triage batches, delegated maintenance,
the isolated runtime CLI, consolidated action setup, and retirement of
legacy config migrations and shell staging. The changelog documents the
new manual triage input and migration requirements for direct action
callers and old configs.

Release target: 73d9ced, including #1603, #1607, #1608, #1609, and
#1610. Validation: full `wt test` (1,643 Python tests, 32 Worker tests,
typecheck, six eval-capture tests), all pre-commit hooks, package build,
Twine checks, and installed-wheel runtime help. Publication will require
the subscription Codex smoke on the exact release commit; workflow
deployment and live checks follow publication.

> _This was written by Codex on behalf of max-sixty_
max-sixty pushed a commit to max-sixty/worktrunk that referenced this pull request Nov 1, 2026
Update the Tend workflows from 0.3.15 through 0.3.22. The earlier
commits replace the dedicated CI fix path with one failure report and
let triage continue independent repairs when a case has several causes.
This regeneration moves early workflow logic into Tend's installed
runtime, adds bounded parallel issue triage, and gives issue workers
clearer guidance to continue actionable investigations and reconcile
resolved issues. The repository's restricted merge setting and explicit
model pin remain in place.

The new runtime setup step is a prerequisite for the generated jobs.
Triage now selects live issues before starting up to five issue jobs,
while mention, notification, reaction, and CI failure handling call the
pinned Tend runtime. See the [0.3.15–0.3.19
comparison](max-sixty/tend@0.3.15...0.3.19)
and [0.3.19–0.3.22
comparison](max-sixty/tend@0.3.19...0.3.22),
including max-sixty/tend#1603, max-sixty/tend#1608, and
max-sixty/tend#1618.

Verification: generated with `[email protected]`; `git diff --cached --check`
passed. The pinned `[email protected] check` reported no failures and skipped
`actions-event-policy` because this bot lacks the required admin
permission.

---------

Co-authored-by: worktrunk-bot <[email protected]>
max-sixty pushed a commit that referenced this pull request Nov 10, 2026
`install-uv.sh` downloaded the uv release archive with a single `curl
-fsSL` and no retry, so one transient `504` from GitHub's release CDN
failed `setup-runtime`. Since #1608, `setup-runtime` runs as its own
step ahead of `claude`/`codex`, so that failure skips the harness action
and its `Report failure` step: the run goes red and no `tend-outage` row
is filed. #1663 counts 14 such runs in `max-sixty/cargo-affected` on
2026-11-08/09, including a weekly run whose maintenance was lost. When
the retry stack was closed on #906, the remedy named for recurrence was
"the attempt count in the existing loop". That loop is gone from this
path, so this adds `--retry 5` to the one `curl`. curl's `--retry`
treats 408/429/500/502/503/504 and timeouts as transient and backs off
1, 2, 4, 8 and 16 s, about 31 s at most before the step fails as it did
before.

The same script also installs the sandbox's agent uv fallback inside the
harness actions, so that download gets the retry too.

Verified against a local server that returns `504` twice and then `200`.
Plain `curl -fsSL` exits 22 with `The requested URL returned error:
504`, the error in the report. With `--retry 5` it recovers on the third
request and exits 0. `test_repo_pins.py` and
`scripts/test_workflow_scripts.py` pass, and so does shellcheck.

This does not close the reporting gap: a `setup-runtime` failure that
outlasts the retries still skips `Report failure`. The issue weighs two
ways to close it, a runtime-independent `if: failure()` step emitted by
the generator or having review-runs treat `setup-runtime=failure` runs
as outage rows, and choosing between them is left to a maintainer.

Refs #1663 — automated triage

Co-authored-by: tend-agent <[email protected]>
max-sixty pushed a commit that referenced this pull request Nov 27, 2026
…1749)

When a step ahead of the harness action fails, such as `setup-runtime`,
checkout or a consumer `setup:` step, the run now files a `tend-outage`
row that names the failed step. Before this, the failure skipped the
harness and its `Report failure` step along with it, and nothing was
recorded. This restores #857's guarantee, which #1608 lost when
`setup-runtime` became its own step.

- **New action, `max-sixty/tend/report-failure`**
([`report-failure/action.yaml`](https://github.com/max-sixty/tend/blob/151ce3da6fd5cc300692ed7cec203377c9b80f41/report-failure/action.yaml)).
It runs the existing `report_failure` module from the action's own
source as `/usr/bin/python3 -I report-failure/report.py`. That needs no
uv and no installed runtime, so it still works when `setup-runtime` is
the step that failed. `report_failure` and its imports were already
stdlib-only apart from `tend.workflows.release`, which this moves into a
new stdlib-only module, `tend/releases.py`.
- **Generator:** every harness step now gets `id: harness` and is
followed by `report-failure` with `if: failure() &&
steps.harness.outcome == 'skipped'`. A harness that ran and failed still
reports through its own step, so the security-preflight exclusion holds
and the run gets no second row.
- **Naming the step:** with `name_failed_step=True`, the reporter reads
`runs/{id}/attempts/{n}/jobs`, takes the in-progress job whose
`runner_name` matches `RUNNER_NAME` (matrix siblings share the run id),
and adds ``Failed before the harness action ran, at `<step>`.`` below
the row. That read is best-effort: if it fails, the row is still filed.
I checked against this session's own run that the jobs API reports
completed step conclusions while the job is still running.

Tests: the full Python suite passes, apart from the two
`test_refresh_consumers` tests that need DNS. New tests cover the
generated step's placement and condition for both harnesses, the
step-naming read (including a matrix sibling and an earlier job on the
same runner), a failed jobs read that still files the row, and a probe
that the standalone entry point imports no third-party module.
Pre-commit is clean. Regtest snapshots are regenerated.

What this doesn't cover: jobs with no harness step, such as mention's
`verify` and triage's `select`. If `setup-runtime` fails there, the
agent job that depends on it is skipped, and nothing is reported. The
new step also makes a red notifications pre-check file a row on each
failing poll, as the request asked for any step ahead of the agent.

Closes #1663

---------

Co-authored-by: tend-agent <[email protected]>
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.

2 participants