Repository navigation
fix(detector): read the non-resolving required check and the DIRTY half - #191
Conversation
The org's stalled-mergeability reader covered ONE measured shape (auto-merge armed + a BEHIND head, #175) and said so in its scope note. It now covers three, each measured on a live stall: - ARMED + DIRTY (#175 comment 6084457430): gh pr update-branch cannot resolve a conflict, so an armed conflicted PR waits forever with no signal (charly#432, ~30h); - THE REQUIRED CHECK NEVER RESOLVED (#186): a superseded validator run leaves validate / validate CANCELLED - arming lives INSIDE the cancelled run, so the PR sits BLOCKED with autoMergeRequest == null and reads as queued. Measured on this repo's own #185 (armed = Y, and cancelled). The third class reads EVERY run of the required context on the head, not only the newest: a branch protection rule requires all same-name runs to pass, so an older CANCELLED beside a newer SUCCESS keeps a PR blocked forever (POISON). FAILURE is deliberately excluded - a red required check is a verdict, and a red PR gets read. An unarmed BEHIND/DIRTY head and a head with no run of the required context at all (the fork case, #179) stay out of scope; under-reporting is the honest failure mode. report_stalled now emits the remedy per class, including the measured caveat that a REST re-run is a FRESH REVIEW replacing the verdict (charly#871 turned a PASS into a BLOCK). The self-test drives one fixture per class, the POISON pair, and six near-misses; driven with the same fixtures the old filter selects none of the three. scripts/governance-claims.tsv protects both the new claim and the retirement of the sentence that declared the cancelled shape out of coverage. Self-test and the repo's offline battery pass on this tree; the changed detector ran live against the org (exit 0, nothing silently parked). Closes #186. Assisted-by: dsh deepseek-v4.1-flash (analysed on a live system)
|
STATUS — the changed workflow executed live on this head with the App token. $ gh workflow run stalled-automerge-detector.yml --repo opencharly/.github --ref feat/stall-detector-nonresolving-checks
https://github.com/opencharly/.github/actions/runs/38311384599
$ gh run view 38311384599 --repo opencharly/.github --json conclusion,event,headBranch,jobs
{"conclusion":"success","event":"workflow_dispatch","headBranch":"feat/stall-detector-nonresolving-checks","jobs":[{"conclusion":"success","name":"detect"}]}
$ gh run view 38311384599 --repo opencharly/.github --log | grep -E 'check-stalled-automerge'
check-stalled-automerge: self-test ok
check-stalled-automerge: no armed+BEHIND, armed+DIRTY or non-resolving required-check PRs in opencharly — nothing is silently parkedA branch-ref run is the only way to execute a changed workflow: the org-required caller resolves its own definition from This is the live half of How tested. The static half — the fixtures that prove each class fires, the old filter failing on the same fixtures, and the repo's offline battery — is pasted in the body against head Agent: |
Review — BLOCKHead SHA: Blocks
Comment intakeNo comments to disposition (thread is empty). Verdict: BLOCK ollama-cloud/deepseek-v4.1-flash — action-review. |
|
STATUS — round 1 BLOCK addressed: the branch-ref run's output is now pasted in the body, not pointed at, and the body is re-keyed to the same head The finding, and its RCAA1 — "How tested defers required evidence to a comment that does not exist." The remedy is right and is applied: the changed workflow's live output is now inside the body's One correction to the finding's premise, because the record has to be right: the comment was not absent. Comment RCA (fresh, per R1).
Nothing else in the verdict stands unfixed, and the verdict raised nothing about the diff. Evidence, from the head this re-run will review ( $ gh run view 38311384599 --repo opencharly/.github --json conclusion,event,headBranch
{"conclusion":"success","event":"workflow_dispatch","headBranch":"feat/stall-detector-nonresolving-checks"}
$ gh run view 38311384599 --repo opencharly/.github --log | grep -E 'check-stalled-automerge'
check-stalled-automerge: self-test ok
check-stalled-automerge: no armed+BEHIND, armed+DIRTY or non-resolving required-check PRs in opencharly — nothing is silently parked
$ gh pr view 191 --repo opencharly/.github --json body --jq .body > /tmp/live.md
$ grep -c 38311384599 /tmp/live.md # the run pasted into How tested
3
$ tail -1 /tmp/live.md # the footer is the last line
*Assisted-by: dsh deepseek-v4.1-flash (analysed on a live system)*Agent: |
Review — PASSHead SHA: Security screen: PASS — observer-only detector change; strengthens detection, weakens no gate; no secrets/egress/new deps; author is a maintainer-set account ( Checklist: All applicable rules PASS or NA. (A1 body accounts for all 3 files and pastes the branch-ref run output in-body; A2/A3 gate+ Comment intake:
Verdict: PASS ollama-cloud/deepseek-v4.1-flash — action-review. |
Summary
The org's stalled-mergeability reader covered one measured shape and said so in its own scope note: auto-merge armed + a
BEHINDhead (opencharly/.github#175). Three shapes are measured now, each on a live stall:6084457430) — strictly worse and needing its own handling:gh pr update-branchCANNOT resolve a conflict, so an armed conflicted PR waits forever with no signal at all (measured oncharly#432, ~30 h).validate / validateCANCELLED. Arming happens inside the validator run — the run that was cancelled — so the PR sitsBLOCKEDwithautoMergeRequest == nulland reads as queued: nothing re-dispatches it and no check ever concludes. Measured on this repo's own#185(armed = Yand the required checkCANCELLED).Three properties of the third class are deliberate:
CANCELLEDbeside a newerSUCCESSkeeps a PR blocked forever (the POISON pair); a newest-only filter would miss exactly that.FAILUREis excluded. A red required check is a verdict, and a red PR gets read; this alarm exists for the quiet ones.report_stallednow prints the remedy per class, and for the third class it carries the caveat the issue itself measured: the REST re-run is a fresh review that replaces the verdict (charly#871: a re-run turned aPASSinto aBLOCKcarrying a finding the first run had not raised). The alarm line reads "Never re-dispatch a head you have not read and fixed."Scope, stated so nobody over-trusts it (the sentence declaring the cancelled shape out of coverage is deleted): an unarmed
BEHIND/DIRTYhead, and a head carrying no run of the required context at all — the fork case,#179, where no org gate applies — are not selected. Deciding those needs the ruleset scope derivation inscripts/lib-org.shdiscover_excludes, which this reader deliberately does not read. Under-reporting is the honest failure mode: a detector that cries wolf on ~16 forks is switched off, and then it detects nothing.scripts/governance-claims.tsvgains thestall_shapesclaim (4 rows): the canonical phraseREQUIRED CHECK NEVER RESOLVEDmust be present in both the rule's carrier (the script) and its alarm surface (the workflow), and the retired wording (not covered) must not return to either — that sentence is how shape 3 stayed invisible.This change does not touch the org gate, the ruleset, or the PR template; it strengthens the observer of the landing contract, relaxing nothing.
Closes #186.
How tested
Committed head
f52aba40413b7f288152b932796c3e7a4a2c4f46(git rev-parse HEAD, nothing else pushed from it).The changed selection rule, driven by its own fixtures (one per class + the POISON pair + six near-misses):
Coverage fails without the change — the old filter (
origin/main'sselect_stalled, extracted ata817054/7582234) driven with the new fixtures selects none of the three new classes:The changed path executed live against the real org (read-only GraphQL over all open PRs):
That quiet result is correct and checkable: of the 15 open PRs, none is armed, two are
DIRTY(charly#828,marketplace#447— unarmed, therefore out of class), and the single head with no run of the required context is the forkopenclaw-enterprise#1(#179's by-design case). The fixtures, not the live scan, are the proof that each class fires; the live scan is the proof that the alarm stays quiet when nothing is parked.The repo's own offline battery (the change-class gate for this repo) on the committed tree:
The changed workflow itself, executed live on this branch ref with the App token:
A branch-ref run is the only way to execute a changed workflow: the org-required caller resolves its own definition from
main, so the scheduled alarm onmainwould still be running the pre-change script. This run is also what confirms the widened read resolves under the App's declaredpull_requests: readgrant — the query now carriesstatusCheckRollup/CheckRun nodes, and the job finished green with the App token instead of failing closed (exit 2). The fixtures, not this run, are the proof that each class fires; this run is the proof that the changed file executes end to end on real data.This is not a claim that every rejection branch of the workflow was exercised.
Rulebook compliance
git-workflow,agents,repo-setup,strict-policyandroot-cause-analyzerloaded before the first tool call of this lane, plus this repo's ownAGENTS.md(which the worktree injected):.githubis PR-only and its gate/ruleset/template are self-modifying-security surfaces.a CANCELLED required check … is not covered), so the claim-keyed sweep corrected it in the same change and the retirement is now protected by aforbidrow. No finding is parked.REQUIRED_CHECK), the non-resolving vocabulary once (NON_RESOLVING), and the canonical phrase is stated once per surface and asserted by the governance manifest. No second copy of the stall rule is introduced.forbidrow makes its return a gate failure;grep -rn 'not covered' scripts/check-stalled-automerge.sh .github/workflows/stalled-automerge-detector.yml→ no matches (exit 1, expected).git statusclean before and after the commit; session worktree.worktrees/dsh-opencharly/dotgithubonfeat/stall-detector-nonresolving-checksoff freshorigin/main(7582234); no force-push, no direct push tomain, no hook bypass.gh) for policy scripts and are not offered as evidence of the detector's live behaviour.charlyruntime source changes; the change class here is workflow/script, whose gate is this repo's CI (workflow-checks.yml) plus the branch-ref execution of the changed workflow.Change classification
Hook/workflow infrastructure (an alerting reader); no
charlyruntime, deploy target or candy change. Gate:workflow-checks.yml(offline policy scripts + action-runtime pins) and the org-requiredcharly/pr-validator, with the changed workflow executed live on the branch ref. Attribution:analysed on a live system— the detector ran live against the org and the fixtures drive every class, without claiming that every rejection branch of the workflow was exercised.Filed issues
opencharly/marketplace#442(pr_state_watch.shreads aCANCELLEDcheck run as PASS), which is the same class in the marketplace watcher and remains open under its own claim.Agent:
dsh-opencharlyAssisted-by: dsh deepseek-v4.1-flash (analysed on a live system)