Repository navigation
fix: release triage subjects select dropped, and read a same-second force-push as stale - #1724
Conversation
…orce-push as stale Closes #1723
|
@tend-agent The ownership release can happen before any triage matrix job appears. Restricted-mode consumers can add an independent job through Please require evidence from a
|
A consumer's workflow_extra.jobs can add a job that appears before the matrix; it is no evidence that select's output has expanded.
|
Done in a8293b1: the run-name subjects are now released only once |
|
@tend-agent The new Please use the exact
|
A consumer's numbered extra job (notify #4082) matched the generic #N matcher, so its completion released a batch issue before the matrix existed. Triage runs now add and release subjects through the exact triage #N matrix matcher; land runs keep the land matcher.
|
Fixed in a0e1b78. In a triage run, both adding and releasing subjects now go through the exact |
… bare 'no findings' (#1741) The review skill's check before submitting accepted "no findings" as the second pass's result. Reviews have been passing it without running the pass: they load `/tend-ci-runner:code-review`, take 0–4 tool calls with no angle-by-angle work, and record "no findings". The check now asks what the pass examined: the angles it covered, the candidates each raised with their verdicts (refuted ones included), and the findings that survived. A bare "no findings" no longer counts as running the pass. `code-review` already covers the defects these reviews missed. Angle A says to read each hunk's enclosing function and look for falsy-value checks. Angle C traces how changed code is called and what inputs it can see. Its Output section already tells the caller to report how the pass ran. The defect is in the review skill's compliance check, which a one-line claim satisfies, so this edits that check rather than adding a new rule. Validation: unvalidated by model evals so far. `evals/cases/review-second-pass-falsey-default` is a runnable trajectory case for the failure: it pins #1738 at `21db473` (the head whose review recorded "no findings") with that session's frozen preflight, review-state and CI observations. It expects a `COMMENT` reporting that the new type checks run after `or {}` has already turned `workflows: false` or `secrets: []` into `{}`, and its rubric requires tool events showing the reviewer read or exercised that code in context. `prepare.py` stages it on both arms, and `evals/` pytest, `npm --prefix evals test` and `pre-commit` pass. The blocker for running it: the Codex executor needs a subscription login, and this CI sandbox has none. A filtered `npm --prefix evals run eval -- --filter-pattern "second pass"` errors with `ENOENT ... /home/tend-sandbox/.codex/auth.json`. The Claude harness excludes trajectory cases. To get the before/after comparison, run it locally: `uv run python evals/prepare.py && npm --prefix evals run eval -- --filter-pattern "second pass"`. <details><summary>Evidence from this window's session logs</summary> Tool calls each review session made between loading `code-review` and its next step, from the JSONL logs: | Run | PR | Calls | Outcome | |---|---|---|---| | 45562114460 | #1738 at 21db473 | 0 | "The second review pass found nothing new". `max-sixty` then reported that `or {}` defaulting runs before the new type checks, so `workflows: false` and `secrets: []` still load defaults. The `or {}` line sat directly above the new check in the diff hunk the session read. | | 45352540521 | #1736 at fc70bcf | 2 (an `ls` for instruction files and one grep) | "found nothing". `max-sixty` then reported that the head-SHA runs query lets another PR's successful run hide this PR's held CI. | | 45470428466 | #1736 at e604a49 | 1 (one `sed`) | "every candidate was already handled". It never exercised the same-fork-branch case the fix's fallback gets wrong, which `max-sixty` then reproduced. | | 45473678051 | #1736 at 53ca32c | 4 | "Second pass done with no findings" | The earlier corrections on #1724 (44995176016: 2 calls) and #1730 (45126081051: 1 call) have the same shape. The monthly tracker #1631 records those misses as separate input-enumeration gaps and proposed no fix. This window's logs show they share a cause: the pass didn't run. None of these was a wrong outward action. Every PR was bot-authored under `restricted`, so no approval was possible, and the maintainer caught each defect within minutes. The same nominal pass on a human-authored PR would back an approval. </details> --------- Co-authored-by: tend-agent <[email protected]>
Two boundary cases in the runtime helpers that decide run ownership and approval staleness, both from #1723.
Triage batch ownership.
fetch_job_subjectsseeded atend-triagebatch's subjects from itstriage [..]run name and released a number only when atriage #Njob for it completed. A numbertriage-batch selectdropped (closed issue, PR, bookkeeping label) never gets a job, so the batch kept owning it until the whole run finished, andactive-subject-runs/idle-issuestreated it as owned. Once theselectjob has completed and the matrix has expanded, the subjects now come from thetriage #Njobs alone. Until then the run name still holds them, so a queued batch keeps its ownership.Same-second force-push.
after_rewriteusedsubmitted_at > last_force_push_atwhilestale_approval_idused<, so an approval with the same one-second timestamp as the force-push was neither fresh nor stale, anddismiss-staleleft it standing.stale_approval_idandforce_pushed_sinceare now defined asnot after_rewrite(...), so a tie counts as stale. That is the safer side: the review re-runs and the approval is dismissed, rather than an approval of uncertain provenance staying in place.New tests at each boundary (
test_batch_releases_issues_select_dropped,test_batch_keeps_run_name_issues_until_the_matrix_expands,test_an_approval_in_the_same_second_as_the_rewrite_is_stale). Both of the dropped-issue and tie tests fail on the old code and pass now. The full Python suite passes, except for the two network-dependenttest_refresh_consumers.pytests, which can't run in the sandbox.Closes #1723 — automated triage