policy: one subject, one standing comment — by derivation, not dedup #77

Merged
larandar merged 1 commit from agent.teyla/Jostoph:tango/40-standing-comment-dedup into main 2026-08-13 06:38:31 +00:00
Contributor

status_effect was declared against every conclusion, on the theory that
identical effects collapse downstream. They do not: the reason column makes
each tuple distinct, so a subject with two findings was declared two
identical comments — an executor handed that posts twice, and the test that
says "every finding lands in ONE comment" has been red on main.

It cannot ride no conclusion either: resolve keeps only effects a real
conclusion asked for. So it rides exactly one — the agg-min reason, a single
deterministic witness — and which one does not matter, because the body
already carries them all.

Found this landing lar.ad/flake-ops#75 (Jostoph on bifrost): the package's
own postInstall/checkPhase runs the test suite, so a Nix build of the
steward failed on a pull request whose body was missing two required
sections — deterministically, not flakily, every run.

Cherry-picked verbatim from an already-written fix sitting on
tango/33-the-reconciler (commit e342667, part of the larger #37), landed
here on its own because it is a self-contained correctness fix unrelated to
that PR's reconciler feature — the estate answering-once law shouldn't wait
on review of a bigger, separate change.

In scope

  • src/policy.rs: status_effect now rides agg reason = min(reason) in conclusion(...) — one deterministic witness reason — instead of every
    conclusion's reason.

Out of scope

  • Everything else in tango/33-the-reconciler / #37.

Boundary

  • The comment's body is unchanged — it already aggregates every finding
    via standing. Only which conclusion row carries the (now singular)
    effect tuple changes.

Acceptance

  • cargo test: 62/62 pass, including
    policy::tests::every_finding_lands_in_one_comment, previously red on
    main.
  • cargo fmt --check / cargo clippy --all-targets -- -D warnings clean.
  • nix flake check passes.
`status_effect` was declared against every conclusion, on the theory that identical effects collapse downstream. They do not: the reason column makes each tuple distinct, so a subject with two findings was declared two identical comments — an executor handed that posts twice, and the test that says "every finding lands in ONE comment" has been red on `main`. It cannot ride no conclusion either: resolve keeps only effects a real conclusion asked for. So it rides exactly one — the agg-min reason, a single deterministic witness — and which one does not matter, because the body already carries them all. Found this landing `lar.ad/flake-ops#75` (Jostoph on bifrost): the package's own `postInstall`/checkPhase runs the test suite, so a Nix build of the steward failed on a pull request whose body was missing two required sections — deterministically, not flakily, every run. Cherry-picked verbatim from an already-written fix sitting on `tango/33-the-reconciler` (commit `e342667`, part of the larger #37), landed here on its own because it is a self-contained correctness fix unrelated to that PR's reconciler feature — the estate answering-once law shouldn't wait on review of a bigger, separate change. **In scope** - `src/policy.rs`: `status_effect` now rides `agg reason = min(reason) in conclusion(...)` — one deterministic witness reason — instead of every conclusion's reason. **Out of scope** - Everything else in `tango/33-the-reconciler` / #37. **Boundary** - The comment's *body* is unchanged — it already aggregates every finding via `standing`. Only which `conclusion` row carries the (now singular) effect tuple changes. **Acceptance** - `cargo test`: 62/62 pass, including `policy::tests::every_finding_lands_in_one_comment`, previously red on `main`. - `cargo fmt --check` / `cargo clippy --all-targets -- -D warnings` clean. - `nix flake check` passes.
`status_effect` was declared against every conclusion, on the theory that
identical effects collapse downstream. They do not: the reason column makes
each tuple distinct, so a subject with two findings was declared two
identical comments — an executor handed that posts twice, and the test that
says "every finding lands in ONE comment" has been red on main.

It cannot ride no conclusion either: resolve keeps only effects a real
conclusion asked for. So it rides exactly one — the agg-min reason, a single
deterministic witness — and which one does not matter, because the body
already carries them all.
larandar deleted branch tango/40-standing-comment-dedup 2026-08-13 06:38:31 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
Ting/Jostoph!77
No description provided.