Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
263 changes: 263 additions & 0 deletions docs/plans/pr-triage-2026-11.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,263 @@
# PR triage — 2026-11-30

Source: `gh pr list --repo treeol/wakil --state open` (this session) + `gh pr view`
per PR + `gh pr checks` per PR + `gh run list` / `gh run view` (this session).
All numbers from commands run this session.
Base for comparison: `origin/master` HEAD `5421ab2096bb` (Merge PR #34,
chromedp 0.21.0→0.24.0) at inventory time.

## Step 0 — what landed after gated commit 5007bd9 (v0.8.17)

`git log --oneline 5007bd9..v0.8.17` returns exactly two commits:

- `e73882b` — `docs: 0.8.17 section D — final gates at 5007bd9 (host-verify PASS 26 FAIL 0 SKIP 0)`
- `4d4aacd` — `Merge pull request #44 from treeol/work/0.8.17`

Finding: **nothing other than docs and the merge landed.** No code commits after
`5007bd9`. Both commits are ancestors of current `origin/master` (`5421ab2`).

`git log --oneline v0.8.17..origin/master` (this session) adds exactly:

- `4d96c6c` Merge PR #43 (cosign-installer 4.1.2→4.1.4) + `a065d80` bump commit
- `4dada6b` Merge PR #36 (x/term 0.47.0→0.48.0) + `b0fe77b` bump commit
- `5421ab2` Merge PR #34 (chromedp 0.21.0→0.24.0) + `b32128b` bump commit

All three are dependabot go.mod / workflow bumps merged by `treeol` via merge
commits (repo usual method: `gh pr merge --merge`; branch is **not protected** —
`gh api repos/treeol/wakil/branches/master/protection` → 404 "Branch not
protected"; rulesets list is empty. Failing checks are therefore procedural
guards, not branch-enforced).

## Verified inventory of every open PR (4 open at inventory time)

| # | Title | Author | Base | Files touched | CI status (per job) | Mergeable | Age (created) |
|---|-------|--------|------|---------------|---------------------|-----------|---------------|
| 30 | `ci: bump docker/login-action from 4.7.0 to 4.8.0` | app/dependabot | master | `.github/workflows/release.yml` | **all 12 checks PASS** (run 46321585358, 2026-11-29) | MERGEABLE / CLEAN | 2026-11-09 (21 d) |
| 39 | `ci: bump actions/setup-go from 7.0.0 to 7.1.0` | app/dependabot | master | `.github/workflows/ci.yml`, `.github/workflows/govulncheck.yml`, `.github/workflows/release.yml` | **all 12 checks PASS** (run 46474439799, 2026-11-30) | MERGEABLE / CLEAN | 2026-11-23 (7 d) |
| 35 | `deps: bump modernc.org/sqlite from 1.61.0 to 1.63.0` | app/dependabot | master | `go.mod`, `go.sum` | **test FAIL** (run 46476347911, job 142051437869); 12 other checks PASS | MERGEABLE / UNSTABLE | 2026-11-16 (14 d) |
| 37 | `deps: bump github.com/chromedp/cdproto from 0.160.1 to 0.160.12` | app/dependabot | master | `go.mod`, `go.sum` | **test FAIL** (run 46480059174, job 142064631645, 15m23s); 12 other checks PASS | MERGEABLE / UNSTABLE | 2026-11-16 (14 d) |

Check counts, verified this session (`gh pr checks <n> | wc -l`): #30 → 12,
#39 → 12, #35 → 13, #37 → 13. The go.mod PRs carry one extra `govulncheck`
check because `govulncheck.yml` triggers on `pull_request` with
`paths: [**.go, go.mod, go.sum]`; the workflow-only PRs do not touch those
paths, so govulncheck does not run for them. CI (`ci.yml`) itself has 12 jobs
(`test`, `lint`, `darwin-compile`, `goreleaser-snapshot`, `docker-build`,
`sandbox-image-multiarch`, `bench-harness`, `real-hisn integration`,
`installer` ×4) and does not consume `known_flaky.txt` (see below).

CI detail for the two red PRs (from `gh run view --log-failed` this session):

- **#37** — failure is `TestSelectionWheelMidDrag` in `internal/tui`
(`select_raw_test.go:650: wheel press: first visible content line = 54,
want 63 (pre-press)`) in the **`race detector`** step (step list from
`gh run view --json jobs`: all steps success except `race detector`).
This matches the master scheduled-run failure below. **Brief discrepancy
resolved:** the task brief said #37 was red on
`TestLSPProbe_GoplsPresentInSession`; no `TestLSPProbe_*` failure appears in
any run on the PR branch. Earlier attempts on the branch show other flakes
(`TestFrameCostRegression`, `TestSelectionRawMiddle` on run 46321597328)
but neither is `TestLSPProbe_GoplsPresentInSession`. The brief was stale.
- **#35** — failure is `TestE2EGrantSurvivesResume` in `cmd/wakil`
(`e2e_grant_more_test.go:178: timed out waiting for 1 events of kind
session_created (last read error: sqlstore: set pragma "PRAGMA journal_mode
= WAL": database is locked (5) (SQLITE_BUSY))`) in the **`test (with
coverage)`** step (non-race, 5m06s — the race step never ran). SQLITE_BUSY
under `modernc.org/sqlite` 1.63.0 (+ `modernc.org/libc` 1.79.0→1.80.1,
`cc/v4`, `ccgo/v4` bumps — full diff read this session) — needs local +
testbed reproduction per rule 4.

Master CI state at inventory time (this session, `gh run list --branch master --workflow ci`):

- Push run 46479623885 at `5421ab2` (2026-11-30T18:00:54Z) — **success**,
including `test (with coverage)` and `race detector` steps.
- Scheduled run 46488791649 at `5421ab2` (2026-11-30T18:51:00Z) — **failure**,
`race detector` step only, `TestSelectionWheelMidDrag`.
- State at HEAD is therefore **flaky, not red**: push green + scheduled red
at the same SHA. The flake is unrelated to cdproto/sqlite.
- `known_flaky.txt` is **testbed-harness only**: consumed by
`scripts/remote_test.sh` via `scripts/remote_test_lib.sh` (`grep -rn
known_flaky .github/workflows/` → no hits; `ci.yml` has no rerun step).
Listing a test does **not** turn CI green, does not make a red PR
mergeable, and does not satisfy any gate in this plan. It is a documented
rerun allowance for the remote test harness, granted only on
(a) a CI failure log line plus (b) a reproduction in this session
(`scripts/known_flaky.txt` header; `scripts/host_verify.sh:17-35`: a
clean 100 loaded runs is "not reproduced; left as-is", never a listing).

Already closed (brief listed them; verified via API this session):

- **#38** `deps: bump golang.org/x/sys from 0.49.0 to 0.50.0` — **CLOSED**
2026-11-30T17:42:32Z by dependabot ("Looks like golang.org/x/sys is
up-to-date now, so this is no longer needed"). No action.
- **#43** `ci: bump sigstore/cosign-installer from 4.1.2 to 4.1.4` — **MERGED**
2026-11-30T17:40:08Z, merged by `treeol` (the user), merge commit
`4d96c6c`. No action. This session did not merge it.

## Processing order (per task rule: green first, then red; oldest first in group)

1. **#30** (green, workflow-touching, oldest) — rule 2: hand to user.
2. **#39** (green, workflow-touching) — rule 2: hand to user.
3. **#37** (red, go.mod; created 2026-11-16T10:35:54Z) — **moved ahead of #35
by exception**: its failure is the master-scheduled-run flake
(`TestSelectionWheelMidDrag`), so the flake must be remediated (or
dispositioned) before any go.mod merge can be green. Name the exception
explicitly in the report; oldest-first is overridden for this one swap.
4. **#35** (red, go.mod; created 2026-11-16T10:35:41Z) — only after #37 has
a final state: merged, closed (superseded/not viable), or **formally
deferred** (left open, with the deferral reported to the user). A
deferred #37 counts as disposed for ordering purposes, but the
grouping PR below stays blocked while any red go.mod PR is deferred
without an ignore rule (see grouping gate).

Strictly one PR at a time: finish each PR completely before touching the
next. Never batch merges. Re-run `gh pr list --state open` at the start of
each PR step and reconcile against this table (snapshot drift like #38/#43
is already observed once).

The "confirm master CI green before touching the next" gate applies **after
each merge** (post-merge push run), not after hand-offs: #30/#39 are not
merged by this session, so no new master run exists to gate on. For every
CI run this session judges (post-merge push runs, fix-PR runs, and the
grouping PR), the stop rule is:

- A failing run whose **only** failing test is `TestSelectionWheelMidDrag`
(`internal/tui/select_raw_test.go`) gets **at most one** `gh run rerun
--failed` (failed steps only). If the rerun goes green on that SHA, the
run counts as green and triage proceeds; the flake is reported with both
run IDs. If the rerun fails **again on the same test at the same SHA**,
the flake is deterministic → **stop the session** and report.
- Any **other** failing test (including `TestFrameCostRegression`,
`TestSelectionRawMiddle`, `TestE2EGrantSurvivesResume`, or a data race,
panic, or build failure) is a new failure → **stop the session** and
report, on the first occurrence.
- No PR is ever merged while its own CI is red, with or without a rerun:
a rerun that passes is the only path from red to green. The
known-flake exemption above never merges a red PR; it only decides
whether a red run is reported-and-rerun or reported-and-stopped.

## Per-PR decision rule (as briefed, with ordering clarification)

1. Rebase first if behind master (dependabot: comment `@dependabot rebase`),
then wait for CI to finish (bounded ~30 min, backoff). **Exception for
workflow-touching PRs:** evaluate rule 2 before rule 1 — do not rebase
#30/#39; hand them off with their stale-base caveat (below) instead of
burning a CI cycle on a base that will stay behind until the user merges.
2. Touches `.github/workflows/*` → do not merge; hand to user with one-line
verdict and continue.
3. CI green + mergeable → merge with `gh pr merge --merge` (repo usual
method; branch unprotected, so this is procedural), then wait for master
push CI on the resulting commit. Judge that run by the stop rule above:
a single `TestSelectionWheelMidDrag` failure gets one rerun; a rerun
failure on the same test and SHA, or any other failing test, stops the
session per rule 3.
4. CI red → reproduce locally and on testbed with PR's go.mod/go.sum
(checkout of PR branch, `-count=20`, `-race` where the failing step was
`race detector`): #37 needs `-race`, #35 does not (it failed in
`test (with coverage)`). Compare with master at the same count.
Cite file:line. Acceptance: a `-count=20` pass does **not** refute a
low-rate CI flake; on a 20/20 pass, escalate to `-count=100` or stress
with `-cpu` variation before declaring flaky vs real. A 20/20 local pass
with the testbed reachable and 100/100 clean is "not reproduced; left
as-is" — see the flaky exit below.
- Real break → fix the code in a separate small PR (failing test first),
get it green, merge it, then rebase the dependabot PR and return to
step 1.
- Flaky, unrelated → fix the test deterministically in a separate small
PR (failing test first), get it green, merge it, then rebase the
dependabot PR and return to step 1. If a deterministic fix is not
feasible within this session, add the test to `scripts/known_flaky.txt`
with evidence **and** say so in the report — this grants the testbed
harness one rerun; it does not make the dependabot PR mergeable. The
PR is then handed to the user as "unmergeable until the flake is fixed"
and counts as disposed-by-deferral for ordering purposes (grouping
gate below still applies). The evidence threshold is exactly the file's
own: a CI failure log line plus a genuine reproduction in this session
(a clean 100 runs never qualifies).
- Not viable → close with comment; add ignore rule in `.github/dependabot.yml`
with reason comment.
- **Stop/defer if testbed is unreachable and local reproduction does not
reproduce:** do not merge, do not close, do not list as flaky. Defer the
PR, report to the user, and leave it open.
5. Superseded/obsolete → close with comment naming replacement.

Hand-off verdicts (rule 2) — accuracy caveats:

- #30 touches only `release.yml`. `release.yml` runs `on: push: tags: ["v*"]`
only, so its PR CI shows all 12 checks passing but the release workflow
itself has never executed the bumped `docker/login-action`. Verdict must
say: "green, safe to merge" **with caveat** that the bumped action has
not run in this PR.
- #30's green run (46321585358) predates the #43 merge and the #34/#36
merges; its base `21d03ea` is 3 merges behind head. "Green" is on a
stale base. The user should expect a rebase + fresh CI to be prudent
before merging, even though the PR is currently MERGEABLE/CLEAN.
#39 (46474439799) is also stale by the same measure; its base `4d4aacd`
predates #43/#36/#34. Both verdicts are stated as stale-base green.
- Both #30 and #39 edit `release.yml`. Merging one may conflict the other.
Suggested user merge order: #39 first (setup-go, touches `ci.yml` too),
then #30, or vice versa with a rebase + fresh CI on the second. State
this order in the handoff. Handing off is not user action: the grouping
PR stays gated until the user has actually merged or closed #30/#39.

## Red-PR hypotheses to verify (not assumed)

- #37 (`TestSelectionWheelMidDrag`, `internal/tui/select_raw_test.go:650`):
wheel-scroll off-by-one under race; master push run at the same SHA was
green and the scheduled run flaked, so the cdproto bump (0.160.1→0.160.12,
single-line go.mod diff read this session) is almost certainly unrelated.
Needs `-count=20` + `-race` on the PR branch vs master.
- #35 (`TestE2EGrantSurvivesResume`, `cmd/wakil/e2e_grant_more_test.go:178`):
`SQLITE_BUSY` on `PRAGMA journal_mode = WAL` with sqlite 1.63.0 / libc
1.80.1. Non-race step (`test (with coverage)`), so reproduce without
`-race` first; a separate `-race` run checks whether the race step would
also fail. Fixing SQLITE_BUSY may expose a second red — keep the full
`test` job green as the exit criterion.

## After all PRs — dependabot grouping

Final small PR changing `.github/dependabot.yml` (not a workflow file):
Go module minor+patch updates grouped into one weekly PR, GitHub Actions
updates into another weekly PR, majors stay separate. Keep ignore rules added
above. Judge its CI by the same stop rule: one rerun for a lone
`TestSelectionWheelMidDrag` failure; a rerun failure on the same test and
SHA, or any other failing test, blocks the merge.

**Grouping gate (blocking):** do not create/merge the grouping PR while
either of these holds:

1. #30 or #39 is still open — grouping may cause dependabot to close the
individual PRs it supersedes, which would decide workflow PRs this
session was told not to merge. Hand the grouping PR to the user unmerged
with an explicit "merge only after #30/#39 are resolved" note, or hold
it back entirely.
2. A red go.mod PR (#35 or #37) is deferred without an ignore rule — the
`go-minor-patch` group would bundle its bump into the first grouped PR
and make that PR red. The grouping PR is conditional on every deferred
red PR either being ignored in `.github/dependabot.yml` or the grouping
PR being deferred with it.

Current `.github/dependabot.yml` (read this session): two entries
(`gomod` weekly Monday, `github-actions` weekly Monday), no `groups:`, no
`ignore:`. The grouping change uses `groups:` (e.g. `go-minor-patch`,
`actions-updates`) with `patterns: ["*"]` and `update-types: ["minor",
"patch"]`; majors remain ungrouped (separate PRs). Exact syntax to be
validated against the dependabot docs before committing.

## Open risks

- **Testbed availability:** red-PR reproduction needs the testbed
(192.168.1.213) under `/home/valon/wakil` + `/tmp/wakwa-<id>` only, hisn
via `bin/hisn-0.6.7`. The full sha256 (`d438caaedbd5b56d0b7e7cc34614fa36d5ff1eecf6b3cabd644a67b7be17cb0e`)
must be captured via `sha256sum` at run time; the truncated form in some
briefs cannot verify the binary. If the testbed is unreachable, the
stop/defer rule above applies — no merge, close, or flaky listing.
- **Known flaky list is empty by design** (ships EMPTY at 0.8.17) and
testbed-only: a listing would need both a CI log line (scheduled run
46488791649 supplies one) and a genuine reproduction this session, and
even then it would not make a red PR mergeable (see rule 4).
- **Time budget:** each full CI run is ~15 min for the `test` job; the
bounded ~30 min wait per rebase needs backoff polling, not busy loops.
- **MERGEABLE/UNSTABLE is not a technical gate:** the branch is unprotected,
so GitHub would permit merging a red PR. The "never merge red CI" rule is
procedural and must be enforced by this session.
Loading