Repository navigation
chore(flake-autopilot): sync the scripts and tests with loft-enterprise main after #9810 and #9848 - #429
Conversation
…se main after #9810 The ticket-mode guard now comes from the synced code, so the copy of it carried since #428 goes away. The leak-test and mount-only patches stay. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
|
/vcluster-review |
|
🔍 The agent swarm is reviewing PR #429. I'll post the results here when it's done. Admins can watch the run live |
loft-bot
left a comment
There was a problem hiding this comment.
Review run: first, head 0792531
Panel review: 0 blocking (QA: 0 need a test, 1 weak test, 0 no test, 0 product gap), 5 quality notes, 12 lanes. The weak-test count is a downgraded coverage gap held for a QA reviewer, not a merge blocker.
Checked: correctness, security, test-quality, operability, reuse, architecture, dead code, typos, QA coverage, QA product gaps, PR metadata, tech debt; 4 QA claims audited one by one. Skipped: e2e family and entry-point fidelity (no e2e files, no customer bug), infra (no workflow, Terraform, Helm or Dockerfile change), docs follow-up (internal CI tooling), layout (not a restructure). The four changed scripts match loft-enterprise main (4b35e83, #9810) byte for byte; 573 unit tests pass.
Needs a human
- Should a merged PR that changes only CI files but says "Fixes ENGQA-N" count as the ticket's fix? At this head it does:
ticket_group.py:147checks for a code change only on a spec-name match, while base checked both, and the tests assert the new behaviour on purpose. The PR body says a merged PR counts as a fix only when it changes code.
A QA reviewer decides these; they do not block on their own.
PR-level notes
- consider — Could we add acceptance criteria to ENGQA-2159 and re-run the review? Its "Done when" items are live rollout checks, so the panel could not tell which scenario in this diff needs a test.
Quality notes (non-blocking)
.github/actions/flake-autopilot/scripts/ticket_group.py:202— consider — Non blocking test coverage gap: Could we also add multi-spec ticket cases where an open PR names a quiet spec only in a quote, a~~~fence or a fixer PR's Verification section (plus one with> Fixes ENGQA-1), asserting the verdict staysquiet? Reverting this line to the base matching leaves all 573 tests green; only the one-spec path has these cases. This becomes blocking if a quoted or fenced mention must never cancel the quiet replay on multi-spec tickets..github/actions/flake-autopilot/scripts/select_groups.py:186— consider — Non blocking test coverage gap: Could we also add aselect()case and an in-flightverdict_ofcase where only the open PR's title names the spec? Reading the title is new here, and dropping it frompr_names_specleaves every test result unchanged..github/actions/flake-autopilot/scripts/ticket_group.py:89— consider — Non blocking test coverage gap: Could we also add a merged and an open PR titledfix: alpha (fixes ENGQA-1)whose body does not close the ticket, asserting it counts? Every test keeps the closing line in the body, so dropping the title frompr_closes_ticketstill passes..github/actions/flake-autopilot/scripts/select_groups.py:15— consider — Could we haveverify_fix.py,linear_ticket.pyandagent_result.pyimportBOT_LOGIN/BOT_BRANCH_PREFIXstraight fromselect_groupsand drop the copy atverify_fix.py:22? Two"flake-fixer/"definitions can now drift, andlinear_ticket.pyonly works throughagent_result's re-import (fix upstream first)..github/actions/flake-autopilot/scripts/select_groups.py:108— consider — Could we splitown_wordsinto named steps (fence, list item, quote continuation) with a comment per state flag, perhaps in its own module, or read GitHub's renderedbody_htmlinstead? This 58-line loop now decides in-flight and merged-fix verdicts, and its docstring says raw<pre>/<blockquote>still counts as the PR's own words (fix upstream first).
Reviewer routing
- Code-owner approval comes from @loft-sh/eng-merge-devops (CODEOWNERS
*); Piotr1215 is already requested, so please confirm he can give it. - Tech debt: these scripts live in two repos and every fix lands upstream, then re-syncs. Could the ENGQA-2159 owner record which repo is the source of truth and whether the two carried local patches move upstream? Change history was unavailable in this run.
- Docs: no follow-up needed (internal CI tooling).
|
@anvesh-loft ✅ Review finished for #429 |
|
Good one on the closes-ticket case: that is #9810's rule as merged in loft-enterprise, a PR that closes the ticket counts without a file check, and its tests assert it on purpose. The scripts here are that code byte for byte, so this PR keeps it; the body now says the rule as it is. Whether a CI-only PR that says |
Slack can start the bot from a release report there since #9848 merged today. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
|
Added loft-enterprise #9848 (merged 18:37Z today) to this sync: |
Piotr1215
left a comment
There was a problem hiding this comment.
Please include the latest Slack report change and its tests in this sync. It merged after this revision. Switching the caller now would restore the long per-spec release reports. Keep the shared workflow assertions when bringing over the tests. loft-enterprise#9893 Caller PR
573 pytest cases and 25 Bats cases passed locally.
| f = near and FENCE.match(rest) | ||
| f = f if f and not (f.group(1)[0] == "`" and "`" in f.group(2)) else None | ||
| quote, rule, heading = near and rest.startswith(">"), near and BREAK.match(rest), near and HEADING.match(rest) | ||
| note = near and rest.startswith("<!--") |
There was a problem hiding this comment.
A comment after visible text survives this filter. In a local ticket run, a CI-only PR whose description named the spec and contained the closing phrase only in an inline HTML comment changed the verdict from active on base to fixed here. The Linear answer then chose Ready for Release. Please strip inline HTML comments in the source parser and add a ticket-verdict regression case. The visible closing-line rule can stay as designed.
There was a problem hiding this comment.
Good catch. own_words now takes out a comment after visible text too, however many lines of its paragraph it runs on, so Adds the step. <!-- Fixes ENGQA-1 --> is no closing line. A comment that never closes in its paragraph stays text, as GitHub shows it, and the closing-line rule for visible text is unchanged. Cases: three hidden and two shown bodies in the closing-line test, a ticket-verdict case where a CI-only PR names the spec and closes the ticket only inside a comment and the verdict stays active, and two grouping cases. All of them fail against the script before the change. d8e2534.
| else: | ||
| posted = slack(token, "chat.postMessage", {"channel": channel, "text": text}, send) | ||
| if split and posted.get("ts"): | ||
| slack(token, "chat.postMessage", {"channel": channel, "thread_ts": posted["ts"], "text": follow}, send) |
There was a problem hiding this comment.
Could the retry after this reply fails send only the missing link? I simulated Slack accepting the parent and rejecting this reply. The same run then finds the parent without a dedup marker and posts a second full report. Please cover the partial-post case when updating this path.
There was a problem hiding this comment.
Yes. A re-run now posts only the link when the thread's first message is this run's own report: the nightly's report or stop note, posted after this autopilot run started (own_root, from the message's ts and the run's created_at), and no reply carries the run's link yet. A later run of the same nightly started after that message, so it still posts its whole report, and once the link is there a further re-run posts nothing. The new test walks the failed reply, the re-run, the further re-run, the later run and the stop note. d8e2534.
Brings over the one-line-per-feature release report and its tests. Scripts and tests are the loft-enterprise main copies again, with this action's path and workflow-input adaptations. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…-run adds only its missing link GitHub hides `<!-- Fixes ENGQA-1 -->` after visible text, so the PR-body parser takes such a comment out too, however many lines of its paragraph it runs on. A CI-only PR whose closing line sits in one no longer counts as the ticket's fix, with a ticket-verdict case and two grouping cases for it. A release run with no alert posts its report as its own message and the run's link as a reply. When that reply fails, a re-run of the step posts only the link under the report it recognises as its own, the nightly's report posted after this run started, instead of a second full report. A later run of the same nightly still posts its whole report. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
|
Agreed, #9893 is in: |
Piotr1215
left a comment
There was a problem hiding this comment.
The compact release report and shared workflow assertions are in. The HTML comment and same-run retry cases pass. One regression remains in the retry path. A queued release run can lose its own report. 573 pytest cases and 25 Bats cases passed locally.
…n in slack metadata A run queued for the same nightly can start before the first run posts its report, so the time of the message does not say whose it is. The report now carries the URL of its autopilot run as Slack metadata, which no reader sees and the text does not link, and a re-run posts only the missing link when that URL is its own. The queued run finds another URL and posts its whole report, and a report without metadata is nobody's. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Piotr1215
left a comment
There was a problem hiding this comment.
The queued-run case is fixed. The report now names its autopilot run in Slack metadata, so a queued run posts its whole report and a re-run adds only its own missing link. The new case fails when own_root stops comparing the run URL. 573 pytest cases and 25 Bats cases passed locally.
What this changes
One more sync of the flake autopilot scripts and tests from loft-enterprise main, now that loft-enterprise #9810, #9848 and #9893 have merged. #9848 lets Slack start the bot from a release report and #9893 makes a release report one short line per feature;
slack_thread.pyand its test come along, with the workflow-input assertions in the reusable form. That PR brings its own version of the ticket-mode guard: a merged PR counts as a ticket's fix when it closes the ticket, or when it names the spec and changes code. The patch this copy carried since #428 goes away and the guard comes from the synced code, byte for byte.Two fixes from the review of this PR, on top of the synced code:
done <!-- Fixes ENGQA-1 -->, so the PR-body parser takes it out too. A CI-only PR whose closing line sits in such a comment no longer counts as the ticket's fix. The closing-line rule for visible text stays as it is.The patches the copy carries on top of loft-enterprise main stay: the token-leak bats case that can fail, the test that both workflows mount the input only, and the two fixes above. loft-enterprise keeps its own copy until #9890 switches the callers to this tag.
How it was checked
Part of ENGQA-2159
🤖 Generated with Claude Code