Repository navigation
Carried approvals: a rebased branch isn't asked to review identical content twice; approved_elsewhere finds the branch's own (DocSpring PR #1487) - #289
Conversation
VisualCIdocspring/visualci · build #1424 · 6 changed, 572 unchanged · approved by visualci coordinator agent (MCP) for Nathan Broadbent
This PR vs base: 25 changed, 5 added since #1225, across 5 builds
docspring/visualci · journeys · build #1420 · 3 removed, 53 unchanged · approved by visualci coordinator agent (MCP) for Nathan Broadbent
This PR vs base: 53 added, 50 removed since #1220, across 6 builds Removed: Updated as builds change. Agents can review with VisualCI's MCP tools. |
… carries - Still the branch's newest approved version: a later baseline row on the branch with other content stops it, so A to B, B to A, A to B again waits for review (main too). - An open comment thread on the branch keeps a snapshot from carrying, as it blocks review. - A carried row stands only while its original review's row does (withdrawn through the copy). - Any later rejection on the branch stops it, even from a build newer than the carrying one. - A build with a failed snapshot carries nothing. - The check says "N changes approved earlier on this branch by X (build #N)." - Tests: both regressions, open thread, withdrawal through a carried copy, a late build, a failure, a pending visualci.yml item, a partial carry, another environment; the changed carry now uses a re-encoded file with the same pixels.
…it was made; the original-review lookup uses baselines_by_name - The rejection-after-approval check compares the rejecting review's created_at with the approval row's, not build ids: rejecting an older pending build after a newer one was approved stops the carry (and the approved_elsewhere hint). - The original-review lookup filters by project, suite, name, platform, environment and branch as well as review_id. - Test: a_rejection_on_an_older_build_made_after_the_approval_stops_it.
0b4eb45 to
330e477
Compare
…proval of identical content; approved_elsewhere finds the branch's own (DocSpring PR #1487) Added snapshots never found an earlier approval on their own branch: approved_elsewhere excluded the build's own branch (bl.branch <> b.branch), and after a rebase the anchor is main's newer build, so the branch's older approval rows no longer count as baselines. Changed pages passed only through compare's exact-image check, which needs a base. - approved_elsewhere: any other build of the suite, this branch included; an approval a later build of its branch rejected for the same content is no longer shown. - domain::carried_approvals: in the conclusion's transaction, a CI build carries an earlier approval on the same branch, suite and environment for added snapshots with the same fingerprint, and changed ones with the same head and base fingerprints. Rows have approval 'carried' with the original approver and review id. Rejections, withdrawn approvals and approvals superseded by a later rejection don't carry. - conclude: a build whose every change carried concludes approved. - Docs (agents.md, design.md), changelog, skill regenerated, plugin 0.1.73.
…provals both decide the review; the changelog line is an entry file; no plugin version
…ied approvals; the test helpers keep main's jest and missing-file builds beside start/finish
330e477 to
c6f1058
Compare
DocSpring PR #1487: after a rebase, pdf build 202 showed 13 added snapshots waiting for review. Their files were byte-identical to 13 added snapshots already approved on the same branch's build 177, and
approved_elsewherewas null on all 13.Part 1: why added snapshots found nothing
approved_elsewherejoined only baselines withbl.branch <> b.branch, so it never looked at the build's own branch. Build 177 is on the same branch as 202.baselines::resolvecounts the branch's approval rows only when they're newer than the anchor (by id, or by a commit in the build's history). Build 177's rows are older and its commit was rewritten, so they stopped being baselines.The fix:
approved_elsewherenow matches any other build of the suite, the same branch included (bl.build_id <> b.id). It also skips an approval that a later build of its branch rejected for the same content.Part 2: carried approvals (
domain::carried_approvals::apply)One helper, called in the conclusion's transaction just before
conclude, plus one arm inconclude. It runs on CI builds only, and matches the same project, suite, branch and environment, against earlier builds only:record(..., approval = "carried")writes a baseline row with the originalapproved_byandreview_id, following howmergedrows copy those. The snapshot'sreviewbecomesapproved.concludesetsreview_state = approved, and the check succeeds.s2.review = 'approved'plus arevieworcarriedrow;approved_elsewherestays a hint.Unchanged existing behaviour, noted in design.md: compare's exact-image pass still passes a changed page whose image is the branch's newest approved one, whatever its base. So the "same head, different base" rule only applies where the branch has since approved another version.
No migration:
baselines.approvalis free text.Tests (app/tests/baselines.rs)
Each was checked to fail with its part of the fix reverted:
a_rebased_branch_carries_its_approval_of_an_identical_added_snapshot: carried, attributed to the reviewer and review, build approved.approved_elsewhere_finds_an_added_snapshots_approval_earlier_on_its_branch(Part 1).a_rebased_branch_carries_its_approval_of_an_identical_change.a_change_over_a_different_base_waits_with_the_earlier_approval_as_a_hint.another_branchs_approval_of_the_same_content_is_only_a_hint.an_approval_a_later_rejection_superseded_doesnt_carry: also checks that the rejection isn't carried and that no hint is shown.a_withdrawn_approval_doesnt_carry.Full suite: 426 passed in
--test app, plus the other binaries and unit tests.cargo clippy --all-targets -- -D warningsis clean.Docs: agents.md (the review loop) and the regenerated visualci-review skill, plugin 0.1.74, design.md, the MCP
get_builddescription and its golden files, and the changelog.Interplay with #279 and #280: the change is self-contained, one call in processing's conclusion transaction and one match arm in
conclude.Review of #289 (d6f1fbf)
Only an approval that still stands carries:
comments::open_on) keeps a snapshot pending.carriedrow counts only while its original review'sreviewrow exists.New tests: both regressions, the open thread, a withdrawal through a carried copy, a late-concluding build, a failure, a pending visualci.yml item, a partial carry, and another environment. Each fails with its fix reverted.
--test apppasses all 435, and clippy-D warningsand fmt are clean.Second review (7dc08a5)
reviews.created_at > baselines.created_at), whichever build it's in. Rejecting an older pending build after a newer one was approved now blocks the carry.approved_elsewhereuses the same rule. New test:a_rejection_on_an_older_build_made_after_the_approval_stops_it.baselines_by_nameinstead of scanning a large review's rows.--test apppasses all 436, and clippy-D warningsand fmt are clean.