fix(report-failure): name the trigger a stranded outage row points at - #823
Merged
Conversation
This was referenced Aug 4, 2026
fix(report-failure): reconcile duplicate outage issues by primary-key probe, not a lagging list
#836
Merged
max-sixty
pushed a commit
to max-sixty/worktrunk
that referenced
this pull request
Aug 7, 2026
Automated nightly regeneration of tend's workflow files. **tend version:** 0.1.13 → 0.1.14 ## Notable changes - **Jobs now name the `tend` environment with `deployment: false`** (max-sixty/tend#852), so GitHub stops filing a deployment record per run and posting it on the pull request. This is what the current `tend check` flags as `environment-deployments` (#3729) — regenerating clears it, and max-sixty/tend#853 makes `check` refuse the old shape going forward. - **`id-token: write` dropped from every tend job** — a side effect of removing the claude-smoke workflow and its `tend-manual` environment (max-sixty/tend#820). None of the remaining jobs use OIDC, so the permission was unused. - **`tend-mention` counts bot engagement outside `jq`** (max-sixty/tend#840). `gh api --paginate` applies `--jq` once per page, so `| length` emitted one count per page; past 100 comments the shell variable held `100\n7`, the numeric test errored, and the bot fell through to `should_run=false` — going quiet on exactly its most-engaged threads. - **Review and triage skill fixes** — the review-record guards now ignore synthetic reply containers (max-sixty/tend#835), `/code-review` is ported into a tend-owned skill (max-sixty/tend#819), and triage substitutes the real issue number into its PR-body templates instead of leaving a placeholder (max-sixty/tend#844). - **Outage reporting is more robust** — a stranded outage row now names the trigger it points at (max-sixty/tend#823), and marking a notification read tolerates a transient run-metadata fetch failure (max-sixty/tend#843). Full compare: max-sixty/tend@0.1.13...0.1.14 Co-authored-by: worktrunk-bot <254187624+worktrunk-bot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The
Triggercolumn of atend-outagerow is the only pointer back to the work a failed run stranded. It goes blank for the one trigger where that pointer matters most, and prints#nullwhen a field is missing.repository_dispatchis unhandled.tend-mentionrelays review events through a secretless job that re-posts them as arepository_dispatch, so the handle job runs on that event and the PR number arrives asclient_payload.prrather than in apull_requestobject. Theif/elifchain has no branch for it, so every failure on the relay path recordsTrigger: N/A— and a relayed review is exactly the case a maintainer can't recover from the run alone, sincetend-reviewfires only onpull_request_targetand never retries. This path is in constant use:gh api "repos/max-sixty/tend/actions/runs?event=repository_dispatch"returns a steady stream oftend-mentionruns.workflow_runnames no run. The ci-fix path hardcodesREF="CI fix for workflow run", discardingworkflow_run.id— the id of the CI failure the job was dispatched to fix.Missing fields render as
null.jq -r '.issue.number'prints the literal stringnullwhen the field is absent, so the cell reads#nullrather than falling back toN/A.Solution
Add a
repository_dispatchbranch readingclient_payload.pr, link the upstream run id in theworkflow_runbranch, and give every extraction// emptyplus a${VAR:+…}guard so an absent field leaves the cell blank (rendered asN/Aby the existing${REF:-N/A}) instead of#null.Testing
shared/steps/has no shell test harness — shellcheck via pre-commit is the only automated gate, and it passes on the changed file. So the block was exercised directly: the REF logic was sliced out of the script (between the# Build a one-line referencecomment andTIMESTAMP=) and sourced under craftedGITHUB_EVENT_PATHpayloads, before and after.Before, on
origin/main:After:
Adding a real harness for
shared/steps/is worth considering separately — three of the recent outage-path fixes have all landed in scripts nothing can test — but that is a bigger change than this fix warrants, so it is not bundled here.Scope
Separate from the other two open changes on this path, and textually disjoint from both. #818 names the cause of a failure (in
claude/action.yaml); #809 dedups rows across matrix legs (in theEXISTINGbranch of this same script, lines 49+). This one fixes what the row points at, in the REF block at lines 19–29.