Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
8ac01cb
feat(flow): one verdict kernel, a fail-open harness and a fold ratchet
abrichr Nov 21, 2026
f6d8d0d
fix(flow): close the gaps a review found in the verdict kernel and ha…
abrichr Nov 21, 2026
2d9b7e0
fix(flow): second review round on the verdict kernel and harness
abrichr Nov 21, 2026
ff07a95
Merge remote-tracking branch 'origin/main' into claude/fail-open-general
abrichr Nov 21, 2026
9b6956b
Merge remote-tracking branch 'origin/main' into claude/fail-open-general
abrichr Nov 22, 2026
f77c4cb
fix(flow): settle the positive controls, verify-run folds and receipt…
abrichr Nov 22, 2026
f34a1ec
fix(flow): close the log-call hole in the swallow check; state the pr…
abrichr Nov 22, 2026
c151226
fix(flow): close the four ratchet and observed gaps Gemini found
abrichr Nov 22, 2026
7a5f6e4
docs(flow): record how the fold baseline was measured and why unread-…
abrichr Nov 22, 2026
847be95
Merge remote-tracking branch 'origin/main' into HEAD
abrichr Nov 22, 2026
10ed817
Merge remote-tracking branch 'origin/main' into HEAD
abrichr Nov 23, 2026
93dc3a9
Merge remote-tracking branch 'origin/main' into HEAD
abrichr Nov 23, 2026
f250b48
Merge remote-tracking branch 'origin/main' into HEAD
abrichr Nov 23, 2026
5d9aba1
Merge remote-tracking branch 'origin/main' into HEAD
abrichr Nov 23, 2026
9f4cb10
Merge remote-tracking branch 'origin/main' into HEAD
abrichr Nov 23, 2026
83433f1
Merge branch 'main' into claude/fail-open-general
abrichr Nov 23, 2026
0b54914
chore(flow): bump verdict_folds_baseline for connector/executor.py fr…
abrichr Nov 23, 2026
4002146
Merge remote-tracking branch 'origin/main' into HEAD
abrichr Nov 24, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ name: CI
# - The launcher's own lint and tests (main.yml).
# - A smoke test of every package, whatever changed: each installs from its
# lock, imports and starts (scripts/ci/smoke.py). The same job runs the
# file-size ratchet against the change's base.
# file-size ratchet against the change's base and the verdict-fold ratchet.
#
# `ci` passes when every job above passed or was not selected; it is skipped
# (which counts as passing) when they all passed. Until branch
Expand Down Expand Up @@ -61,6 +61,14 @@ jobs:
# file this change grew (or whose budget row it edited), so a file
# someone else left over budget never fails an unrelated change.
run: python3 scripts/check_file_size_ratchet.py --base HEAD^1
- name: No new hand-written verdict folds
# Runs on every change: it scans Flow, the launcher and scripts/ci.
# A check that can pass on an empty set, a short read or an unknown
# code is folded once in openadapt_flow/verdict.py; new verdict code
# goes in a @verdict_site with a spec under tests/failopen
# (packages/flow/docs/FAIL_CLOSED.md). Fails only when a kind's total
# rises above the baseline. Standard library only.
run: python3 packages/flow/scripts/check_verdict_folds.py
- name: No generated page was edited by hand
# CAPABILITIES.md and llms-full.txt are generated from sources (row
# files under capabilities/, README.md, ...). A change edits the
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -670,6 +670,8 @@ jobs:
openadapt_flow/runtime/replay/ \
openadapt_flow/runtime/resolver.py \
openadapt_flow/submit_binding.py \
openadapt_flow/verdict.py \
openadapt_flow/verdict_sites.py \
openadapt_flow/runtime/effects/effect.py \
openadapt_flow/runtime/effects/adapter.py \
openadapt_flow/runtime/effects/auth.py \
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
| Fail closed by construction: one verdict kernel (`openadapt_flow.verdict`: obligations fixed from the plan, `settle`, allow-list codes, run binding, trust labels) that never passes an empty set, a short read, a raised probe, another run's result or an unknown code; a fail-open harness that runs 15 generic mutations against every registered `@verdict_site` and checks the verdict at three levels (refuted, not checked, held); and a CI ratchet that fails when the repository-wide count of a hand-written fold kind rises, including swallowed exceptions and "nothing else changed" tests over a possibly partial read | On main | Synthetic: the harness flags 14 fail-open bugs rebuilt from this repository's history (pinned pre-fix copies) plus one live connector site, and passes every fix; 8 registered sites (the hard-invariant layer, the version check, `verify-run`'s folds and the receipt's line judge and tally among them) and 2 owned; 12 of 12 kernel mutants killed | [FAIL_CLOSED.md](packages/flow/docs/FAIL_CLOSED.md), `packages/flow/tests/failopen`, `packages/flow/scripts/check_verdict_folds.py` |
29 changes: 29 additions & 0 deletions packages/flow/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,23 @@

### Features

- One verdict kernel, `openadapt_flow.verdict`, for every check that turns
evidence into held, refuted or not checked. It fixes the obligations from
the plan first, settles results against them, and never passes an empty
set, a truncated or short read, a probe that raised, a result bound to
another run, two results that disagree, or a code nobody listed.
`Result.nothing_else` holds a "nothing else changed" claim only on a
complete read. Functions marked `@verdict_site` are run by a fail-open
harness (`tests/failopen`) with 15 generic mutations, which checks the
verdict at three levels (refuted, not checked, held), not as one bit. It
flags 14 fail-open bugs rebuilt from this repository's history (pinned
pre-fix copies) and one live connector site, and passes their fixes.
`scripts/check_verdict_folds.py` fails CI when the repository-wide count of
a hand-written fold kind rises, including a broad `except` that logs and
falls through and a "nothing else changed" test over a set that may be a
partial read. See `docs/FAIL_CLOSED.md`.
- The hard-invariant layer, the frame's version check, `verify-run`'s effect
folds and the receipt's line judge and tally are built on the kernel.
- A sign-in that asks for a second factor (a code by text message or email,
an authenticator code, or a push approval) no longer has to stop the
program. A `second_factor` step (`one_time` is `code` or `approval`) waits
Expand Down Expand Up @@ -112,6 +129,18 @@

### Fixes

- `verify-run`: an effect list that is empty, or tiers that don't pair one to
one with the effects, is `INDETERMINATE`, `unknown` and `unchecked`, not
`CONFIRMED`, `present` and `independent_readback`. The receipt model already
refuses an empty list, so no run changes outcome today.
- `verify-run`: the effect folds settle against the planned effects, so a
planned effect with no verdict is `INDETERMINATE`, and an observed-effect
code nobody listed is `unknown` rather than `present`.
- The frame's version check: a duplicate version row, a version history
that lost a row, or a changed target with no new version no longer hides a
version saved by another user. The frame is refuted instead of not checked.
- Receipts: a line check nobody listed keeps the run from `VERIFIED` and is
counted as not checked, so the three line counts add up to the lines.
- The form transaction layer (`form_tx`, an unreleased prototype until this
release) reads back every field it typed, selected or kept. Each one gets
a `passed`, `failed` or `not_checked` verdict; a field it cannot read back
Expand Down
Loading
Loading