Repository navigation
π fix(advisory): re-pin digest past foreign-authored comment, warn once, skip unchanged edit - #16445
Conversation
β¦ce, skip unchanged edit When a human-authored digest comment sits newer than the App's own on the advisory issue, the scan warned on every ~5 min cycle and never settled. Resolve by never selecting a non-App comment, re-pinning to the App's own digest (or creating one) and persisting the anchor id, logging the foreign comment once per issue per process (Debug thereafter) with the action taken, and skipping the PATCH when the material fingerprint for the anchor is unchanged. Signed-off-by: Andrew Anderson <andy@clubanderson.com>
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
Hive status β updated in place; edits do not notify. Full history is in the Activity Monitor. @clubanderson this PR is held at Why:
Next: the hive does not push to your branch. Push a new head (or reply here); CI and the review swarm re-run automatically and the PR returns to the normal path. Evidence bundle `#16445fe1b87a` sha256:5f34753d9043307559b101dda57c28c5fb5ee0186c892dc4fc5bc45642e06efc β download from the dashboard or `hivectl review evidence #16445`. |
Open PR overlap checkBase branch: Conflicts are checked with every PR merged onto the current tip of
|
Signed-off-by: Andrew Anderson <andy@clubanderson.com>
There was a problem hiding this comment.
Read advisory.go, advisory_suppress.go and client.go at aba924ddc. The once-per-issue Warn (resolveDigestScan, advisory.go:800-829) and the per-anchor unchanged guard (:500-523) both do what the body says, and the guard is consistent with the existing #5507 rule β evaluateDigestSuppression already suppresses identical material indefinitely (advisory_suppress.go:137), so this adds no new bypass of a time cap. One gap worth fixing before merge:
advisoryDigestAnchors is write-only (low). It is populated at advisory.go:580-583 and asserted in advisory_foreign_anchor_test.go, but nothing reads it: PostAdvisoryDigest still takes commentID from findDigestCommentDetail every cycle (:497), and resolveDigestScan/scanDigestPage never consult it. The re-pin you observe in the tests comes from the scan continuing past the foreign comment to the next App-authored one β which scanDigestPage already did on v5 (continue after the old Warn). So the body's "the pin the digest returns to" and the client.go:514-517 field comment describe behaviour that is not implemented; only advisoryDigestAnchorHashes (keyed by the scan's commentID) carries weight. Either read the memoized anchor in the scan (e.g. prefer it when found on the page) or drop the map and the claim, so the next reader doesn't rely on a pin that isn't there.
Open question, not a defect: the body says the skipped PATCH "counts toward the write-through streak, which still forces a periodic real write". writeThrough only turns on when the full digestHash repeats (advisory.go:431), and the digest carries volatile text that materialDigestFingerprint has to strip. If the rendered digest differs every cycle, the streak increments but write-through never fires β on v5 as well, so pre-existing, but worth a glance since this PR leans on it.
Also: relative links and anchors resolve is red on this head; it may be the src/docs/scale-envelope.md client.go:5110-5120 citation shift β I did not confirm.
β hive: agent=reviewer backend=copilot model=claude-fable-5.1 copilot=1.0.88
|
merged by Hive trusted-author auto-merge: author @clubanderson holds role owner and GitHub permission admin on repo; CI green at fe1b87a. |
|
Thank you for your contribution! Your PR has been merged. We'd love to hear how your experience was: share feedback |
Fixes #16439
Problem
advisory.gologgedskipping advisory digest comment not authored by this Appon every digest cycle (~4β5 min) for the same human-authored comment (torch-spyre/spyre-inference#406, comment 5061265231) and never recovered: the comment stays on the issue forever, and the digest was still re-edited each cycle with materially identical content.Change (
src/pkg/github/advisory.go,client.go)owner/repo#issue(advisoryDigestAnchors, the same process-memory store the digest hashes use).advisoryForeignDigestWarned), Debug afterwards, and includesaction(re-pinned to App-authored digest comment <id>/creating a fresh App-authored digest comment).advisoryDigestAnchorHashes); when the pending digest's fingerprint matches, the PATCH is skipped (counts toward the [quality] Advisory digest comment is rewritten every ~60s even when byte-identical β ~1,440 unnecessary forge writes/dayΒ #4818 write-through streak, which still forces a periodic real write).Tests (
advisory_foreign_anchor_test.go, fake httptest transport, no sleeps)Also a changelog.d fragment.
gofmtadditionally reordered the pre-existing import block inadvisory.go.