Repository navigation
Conversation
Fail-open blockers kept coming back one PR at a time. This fixes the classes once: - openadapt_flow/verdict.py: obligations fixed from the plan, settle(), allow-list codes, run binding, trust labels. An empty set, a short read, a raised probe, another run's result or an unknown code never passes. - tests/failopen: 13 generic mutations run against every @verdict_site. The self-test flags 14 historical bugs rebuilt from this repository's code and passes their fixes; three live sites on main are strict xfails owned by #2470, #2258 and the connector status follow-up. - scripts/check_verdict_folds.py: fails CI when a file gains a hand-written fold; never on a drop. - verify_run: an empty or unpaired effect list is INDETERMINATE, unknown and unchecked (latent behind min_length=1). See packages/flow/docs/FAIL_CLOSED.md.
…rness - settle matches on subject key and run binding; obligations dedupe on both - a HELD token is bound to its subject, so replace() can't move it - observe refuses to map an exception to Observed - owned sites list their exact known failures (strict xfail per case) - pre-fix controls are pinned copies, never live code; S3b shows the undo fix still passes an unlisted per-write code - the ratchet compares per-kind totals, so moving code into a new module is not a new fold, judges each exit of an except, refuses a site id on two functions, and runs in the smoke job on every change
Independent adversarial review: REQUEST CHANGESFrom: Codex One result can discharge two planned obligations. The run-binding guarantee needs a boundary. Two CI behaviors need correction.
Evidence and compatibility. The historical self-test registers 14 pinned controls. The fifteenth case in the PR table is the live connector site. Please report those separately and describe the ratchet as repository-wide by kind. The synthetic evidence still exceeds the stated threshold of eight historical controls. For the three supported effect verdicts, I found the prior precedence preserved. Empty effects and tier-count mismatches now return the conservative results described. The two other protected judges gain registration decorators and retain their judgment logic. These changes apply across applications. I reviewed source, existing test assertions and control registrations. I did not run a lab case or a new held-out benchmark. Historical registrations · Live connector site |
- HELD is minted only inside the kernel's constructors, so replace() can't copy or restore it; one result claimed by two obligations conflicts - known failures carry the seed and lens, so a new case can't hide - the ratchet checks every @verdict_site has a spec on every change, finds conditional sites, judges every branch of a returned value, and lowers the baseline per kind so a moved fold keeps its allowance - M7 is out of P1; the S5 seeds plan 20 runs and a gate needing all 20 passes
# Conflicts: # .github/workflows/ci.yml
Independent adversarial review: REQUEST CHANGESFrom: Codex The previous false pass is fixed. When one result matches two distinct planned obligations,
The two CI fixes address the earlier findings. Moving folds between files retains the per-kind allowance after a baseline update, with a regression covering the next comparison. Owned failures now distinguish the seed and the field being mutated. Merging Please restore this PR’s description. It currently describes Cloud flight-recorder tables and migration 0117, while this diff changes Flow’s verdict kernel. The capability row and its generated copy also still need the earlier evidence corrections. There are 14 pinned historical controls plus one live connector site. Each site runs the mutations it supports, and the ratchet checks repository-wide totals per kind. The evidence is synthetic. I checked immutable source, registrations and test assertions without running another suite. Capability row · Generated copy · Ratchet description |
Independent adversarial review: REQUEST CHANGESFrom: Gemini Gemini run on ff07a95 (model The reviewer was asked to look for fail-open gaps in the harness itself: checkers that can avoid registering, holes in the kernel, missing mutations, weak properties, Blockers
Non-blocking
Poster's notes (checked against the code at this head; not part of Gemini's final verdict)
|
# Conflicts: # packages/flow/CHANGELOG.md
… lines on the kernel - check_verdict_folds: count a broad handler that falls through, leaves by break, or names Exception in a tuple or by attribute (swallow_wide); add says_unchanged and empty_change_set for "nothing else changed" claims; a file that doesn't parse fails; a spec id is an id= or factory argument. - verdict: count the obligations that claim a result, not repeats of it; add Result.nothing_else (any change refutes, zero holds only on a complete read). - harness: three-level monotonicity (P6), M7 appends a separate equal copy, M3 says when the plan is kept, M15 partial "nothing else" read, M16 a result turned bad. - hard_invariants and versions build verdicts with settle; versions no longer lets a duplicate or missing-history row hide another author. - verify_run._aggregate/_observed settle against cfg.effects; receipt_record._line and _tally_lines move onto the kernel. - wire_tap is a registered site now that #2470 merged. - Baseline measured again after merging main; every kind is at or below a clean origin/main.
…ovenance boundary A handler that only logs a not-checked word still swallows; only a call that stores the value records it. M15 must not raise a refuted seed. Observed and Result.held say the adapter establishes which run produced a read.
Independent adversarial review: REQUEST CHANGESFrom: Gemini Gemini run on f34a1ec (model Blockers
Non-blockingNone. |
The empty-change test is read from either side, a [0:N] slice counts like [:N], builtins.all/any count as folds, and an unplanned verdict beside a refuted one makes _observed unknown.
Independent adversarial review: APPROVEFrom: Gemini Gemini run on c151226 (model Previous blockers
BlockersNone. Non-blockingNone. |
Independent adversarial review: APPROVEFrom: Gemini Gemini run on 7a5f6e4 (model BlockersNone. Non-blockingNone. |
…t test KeyResult.code says why, from a fixed set (CODES), so a caller can tell "not found" from "found but unreadable" without matching English text. The planted-mutant check of the fail-open spec is now a test; it skips until the harness from #2476 is on the branch.
# Conflicts: # packages/flow/CHANGELOG.md # packages/flow/openadapt_flow/receipt_record.py
An effect location is pack data for one place a careful person would look again to see an intended value: the demonstration path and start condition, a locator, the expected value, a codec (including a template codec for one summary row that shows two values, and a split-date codec), the expected count and an optional baseline. evaluate_all judges every planned value as held, refuted or not_checked. A location that can't be reached, found or read is not_checked. The check level follows the start condition, and the receipt word comes from check_level.outcome_word when it is available. It is registered as a verdict site for the fail-open harness (OpenAdaptAI#2476) through a small compat module, so it works on main today and picks up the real decorator and ladder when they merge.
Independent adversarial review: APPROVEFrom: Claude I found no P0 or P1. I could not find an input on which a migrated site returns a pass where Cross-vendor review required. This branch was written by Claude. It touches protected paths in What I checkedKernel (
Sites.
Fuzzer can fail. App names. None in CI at this head (run 45066888583). The kernel, kernel mutant, selftest, registry, migration and fold-check tests all passed in the flow unit shards. I did not run the tests or the fuzzer locally: the load average stayed above 15 (35 to 54). The vendored-history test skips in CI because the checkout is shallow, so the vendored copies are not compared with history there. Two jobs fail for reasons outside this change:
Findings (P2 unless marked; none blocks)
|
# Conflicts: # packages/flow/CHANGELOG.md
# Conflicts: # .github/workflows/ci.yml
Independent adversarial review: APPROVEFrom: Gemini VERDICT: APPROVE Independent cross-vendor delta review of
|
What this adds
Reviews kept finding the same fail-open bugs one pull request at a time. This change fixes those shapes once.
packages/flow/docs/FAIL_CLOSED.mdnames them C1 to C7.A verdict kernel,
openadapt_flow/verdict.py. The obligations are fixed from the plan before any check runs, andsettlematches results against them. None of these ever passes: an empty set, a missing or unplanned result, a result bound to another run, two results that disagree, a set over the limit, an unlisted code.HELDcan be created only from a complete observation.Result.nothing_elseholds a "nothing else changed" claim only on a complete read. Any change refutes it, even on a partial read.A fail-open harness,
tests/failopen. It runs 15 generic mutations (M1 to M16; M13 waits for the signer vectors) against every@verdict_site, from one spec per site. It checks the verdict at three levels, REFUTED < NOT_CHECKED < HELD. A mutation that adds a copy or turns a result bad never raises the level. A removal may move REFUTED to NOT_CHECKED, never to HELD. A site that ranks an unread result above a refutation must state the reason (C7).A fold ratchet,
scripts/check_verdict_folds.py, in the requiredcismoke job. It counts hand-written folds by kind across the whole repository. Three kinds are new:swallow_wide: a broadexceptthat logs and falls through.says_unchanged: a "nothing changed" literal.empty_change_set: an emptiness test over a set that may be a partial read.A file that doesn't parse fails the check.
Sites on the kernel
hard_invariants.judge_hard_invariantsruntime/effects/versions.judge_versionsverify_run._aggregate,_observedcfg.effects, so a missing or unplanned verdict never passes. An unlisted observed code isunknown, notpresent.receipt_record._linereceipt_record._tally_linestx/wire_tap.relay_redirect_locationtests/test_tx_wire_tap.py) now allows exactlyfrom openadapt_flow.verdict_sites import verdict_site, a stdlib-only marker.Each migration has a differential test against a copy vendored from main before the move. The remaining sites are a checklist in
FAIL_CLOSED.md.Evidence
All of it is synthetic. The harness flags 14 fail-open bugs rebuilt from this repository's history (pinned pre-fix copies) plus one live connector site, and it passes their fixes. All 12 kernel mutants are killed. Two sites on main stay
owned, with a strict xfail per case:governed_safety.check(#2258) andconnector.status_from_report. No real-app run was made.verify_run.pyandruntime/effects/**are protected paths, so this change needs the cross-vendor review posted below.The fold baseline was measured again after the merge of main. For every kind, the branch's count is at or below that of a clean
origin/mainmeasured with the same detector.