Repository navigation
Conversation
|
|
Speaking as Kun's firstmate: triage complete for this PR. Contract-class: restore — concrete existing contributions-poll classification path was broken: signal-stopped reads (TERM/INT/HUP/kill bound) and unsupported-forge URLs were collapsing into forge-unavailable error/wake episodes. Restores the documented unmeasured contract (no false unavailable wakes) without new default-on surfaces. VISION (per rule):
Gates: attestation MATCH. Greptile SUCCESS (no P1s; confidence 5/5; appears safe to merge pending CI). MERGEABLE. Fork CI + Require no-mistakes approved this pass (CI run 37206427458; NM 37206965465 / duplicates). Waiting on CI (approved, running/pending) — not waiting on author. |
ff6b838 to
d3f32bf
Compare
…sured A contribution read that a bound stopped answered nothing, so it is unmeasured rather than a forge failure. forge() recognized only the 124 the timeout runner reports for its own cap, so a read ended by an external SIGKILL or by TERM, INT or HUP aimed at the read alone was recorded as "forge observation unavailable or changed during read" and woke supervision for a pull request that was open, mergeable and unchanged at the commit already on record. Nothing deduplicated the repeat, because every poll recorded the error afresh. observe() also reset its per-URL flags after the unsupported-forge and unsupported-kind returns, so a URL that was never read inherited the previous URL's result and could be reported as a failure. Resetting first also keeps an unsupported URL at the head of the rotation from reading an unset flag. A genuine forge failure, a client death outside the bound set, and a head change during the observation all still record an error and still wake; those are the cases the error exists for. The read-outcome contract is stated in full once, in the header usage() publishes, and read_cut_short() and forge() carry one-line pointers at it. Tests pin both directions in one table: a read stopped by its bound or by any of 137, 143, 130 and 129 records no error and raises no wake, while a forge failure, a SIGSEGV client crash and a head change each record one and wake. The unsupported-forge case runs with that URL both ahead of and behind a supported one, because only the trailing position can catch the inherited result and only the leading position covers the first iteration.
…asured A read stopped by a signal aimed at the read alone now stays unmeasured rather than being recorded as a forge failure. An unsupported-forge URL can no longer inherit the previous URL's result. It can also no longer abort the poll on its first iteration by reading an unset flag under set -u. A genuine forge failure, a client death outside the bound set, and a head change during the observation each still record an error and still wake. What produced the observation-unavailable wakes seen in the field is not yet established, and is tracked separately. This change does not fix those wakes. A read stopped at the runner's own five-second cap is not newly fixed here. Every timeout mechanism normalizes its own bound to 124, and that status was already treated as unmeasured before this change. This commit corrects the delivery prose only and changes no code or test behaviour.
d3f32bf to
1240f89
Compare
|
Speaking as Kun's firstmate: thank you @sgwoods — re-read tip Overlap: #7233 already keeps unsupported forge URLs unmeasured. Your rewrite correctly withdrew that half. What remains — Contract-class: restore. The contributions header already promised bound-stopped reads stay unmeasured; signal-stopped reads were mislabeled unavailable. VISION: all seven rules align (fewer false wakes; script owns classification; command-layer scope). This pass: fork CI approved. Blocker: the PR body no longer carries a |
…uid#7233 Upstream kunchenguid#7233 "keep unsupported contribution URLs unmeasured" fixed this independently and better, one layer up: it gates observation on supported_url and keeps unsupported URLs out of final settlement and the forge-read rotation entirely. Because observe() is therefore never called for an unsupported URL, the two guards this branch added inside it are unreachable, and the first-iteration unbound-variable abort they also fixed can no longer happen. So this commit removes that half and restores observe() to upstream's form, byte for byte. It also drops test_unsupported_forge_url_is_never_recorded_as_a_failure, which passes against upstream without this branch's changes and therefore proves nothing; a test that cannot fail is worse than no test, because it claims coverage it does not have. The earlier commits on this branch are kept rather than rewritten so the superseded work stays visible and reviewable. Anyone reading the branch should see why that half appears and then goes. What remains is the distinct defect upstream still has: a contribution read stopped by a signal aimed at the read alone is recorded as a forge failure rather than as unmeasured. read_cut_short, the unmeasured helper, test_read_outcome_classification and the corrected header prose all stay.
1240f89 to
986b840
Compare
|
Speaking as Kun's firstmate: thanks for the new push, @sgwoods — I re-read head Still useful: main's Contract-class: restore (my own read). The script header on main already says a read killed at the bound is budget refusal, never a forge failure, and that only a genuine forge failure, structural refusal or head change records an error. The code just doesn't do that yet. VISION: all seven rules align. It cuts false wakes, the script owns the classification, and the scope stays in the contributions poll. What's in the way right now:
When you have a moment, could you rebase onto current |
|
Superseded by #7332, which is the same change raised on a clean branch with a bound attestation. Why it moved: the validation attestation could not be bound to this branch. It had been force-pushed by Thank you for the two reviews here — they shaped what #7332 contains rather than merely approving it. Closing this in favour of #7332. |
Intent
The symptom is real. A supervisor polling its own contributions was woken with
contributions: observation unavailable for <pr-url>six times in one afternoon, every time on a pullrequest that was open, cleanly mergeable, and unchanged at the commit already on record. Running the
same generated check by hand succeeded and cleared the record's
errortoNonewith a completeobservation, head and checks included, so the pull request was not the variable.
This change fixes one real defect found while investigating that symptom. A read stopped by a
signal aimed at the read alone reached
forge()unnormalized and was recorded aserror: "forge observation unavailable or changed during read". That means 137 from an external kill,or TERM's 143, INT's 130 and HUP's 129 delivered to the read rather than to the poll. Such a read
answered nothing, so it is unmeasured, not a forge failure.
Two things this change deliberately does not claim.
normalizes its own bound to 124 (
fm_run_external_timeoutcollapses its own124|137, the perlwatchdog exits 124 from its handler, the bash fallback returns 124 when its deadline fired), and
forge()already treated 124 as unmeasured. On a host using the perl mechanism,fm_run_timed 1 sleep 3returns 124.observation on
supported_urland keeping unsupported URLs out of final settlement and theforge-read rotation — which also removes the first-iteration unbound-variable abort. An earlier
revision of this branch carried its own fix for that behaviour. It is withdrawn here as redundant,
together with its test, because that test passes against upstream without this change and so
demonstrates nothing. A test that cannot fail is worse than no test, since it claims coverage it
does not have.
The cause of the observed wakes remains unidentified and is tracked separately. Candidates
consistent with the evidence include
ghexiting nonzero — for example a secondary rate limit from thesix concurrent paginated reads in a pull observation — or the observation's
jq/valid_recordchecksfailing. None can be confirmed today, because each read's stderr is discarded when the poll cleans up.
The documented contract was already right. The header states that a read the budget refuses
"remains bounded and may be unmeasured, rather than being mislabeled unavailable". Where behaviour and
that contract disagreed, the contract was correct and the code was changed to match it.
Prior context: this supersedes #6493, which was closed. Nothing from that pull request's argument is
repeated here; this stands on its own merits.
What Changed
bin/fm-contributions.shaddsread_cut_short, which asksfm-timeout-lib.shwhich statuses reportits own bound (124, and 137) and adds the three signal statuses 129, 130 and 143. A read matching any
of them is recorded through a new
unmeasuredhelper, whichforge()also uses on its existingbudget-refusal path. Before this change only 124 was recognized, so a read ended by one of the other
statuses was recorded as a failure.
or a head change during the observation records an error. The header's error-condition sentence is
corrected to say so, because it previously named only a forge failure or head change.
usage()publishes;read_cut_shortandforge()carry one-line cross-references rather than theirown copies.
tests/fm-contributions.test.shaddstest_read_outcome_classification, which drives one read toeach distinct end and asserts opposite outcomes in the same test: the bound and signal statuses stay
unmeasured, silent, and leave the prior record byte-identical, while a forge failure, a SIGSEGV
client crash and a head change during the observation each record an error and wake. One existing
passmessage is reworded from "budget refusal" to "unmeasured" to match the corrected contract.No other file is touched, and no other part of the observer's contract changes.
Risk Assessment
answered nothing" and changes nothing else. The failure edges are asserted in the same test as the
silent ones, so the change cannot be mistaken for silencing errors generally. The residual risk is that
this does not resolve the originally reported wakes, whose cause is still unidentified and tracked
separately; that is stated above rather than implied.
Testing
Verified against this head, rebased onto current
main:bash tests/fm-contributions.test.sh— 52 of 52 pass, exit 0. Run serially; two of the file'swall-clock assertions (
test_unmeasured_url_does_not_starve_the_tail,test_shared_url_observed_once) fail under heavy parallel load on a contended machine and pass inisolation, which is worth knowing for a busy runner.
bin/fm-lint.sh— exit 0, with the pinned ShellCheck 0.11.0 and actionlint 1.7.12, 3 workflow filesvalid.
shellcheck -x -S styleis clean on both changed files.test_read_outcome_classificationplaced on theuntouched upstream tree fails on the 137 case
(
an unmeasured read (cut-kill) printed an unavailable wake) and passes with this change. That iswhat establishes the defect is real and still present upstream.
against a real open pull request in a disposable lab home, with the read stopped by real SIGTERM,
SIGKILL, SIGHUP and SIGINT rather than simulated
exit 13xstatuses, each compared against the basecommit, where the base woke and the change stayed silent. A SIGSEGV client death and an HTTP 502
forge failure still woke. That classification code is unchanged since those runs.
head to move mid-read would require pushing to a forge.
🤖 Generated with Claude Code