Skip to content

release(flow): 3.4.0 requires openadapt-privacy 1.1.4 - #2470

Merged
abrichr merged 11 commits into
mainfrom
claude/flow-3.4.0-privacy-floor
Nov 21, 2026
Merged

abrichr merged 11 commits into
mainfrom
claude/flow-3.4.0-privacy-floor

Conversation

@abrichr

@abrichr abrichr commented Nov 21, 2026

Copy link
Copy Markdown
Member

Merging this PR releases openadapt-flow 3.4.0 through release-package.yml.

Checks run locally:

  • tests/test_release_plan.py, tests/test_release_lock.py and tests/test_cli_documented_tasks.py: 40 passed.
  • uv lock --check: passes.
  • With the privacy extra installed from the lock, PresidioScrubbingProvider().sanitization_config() returns policy_sha256 and dependencies.
  • changelog_top returns 3.4.0.
  • A headless MockMed quickstart run on this head takes 4.27, 4.04 and 3.70 s; the perf(flow): a checkpoint store derives its at-rest key once per run (28 s -> 3.5 s quickstart) #2375 KDF fix holds after the refactors.

Raise the privacy extra's floor to openadapt-privacy[presidio]>=1.1.4, which
has sanitization_config(); restore the dated v3.4.0 heading; note the Flow
changes merged since the cut (#2379, #2392, #2313, #2369).
….1.4

Keep #2375's amendment of the #2341 note and this branch's notes side by
side, note the Flow merges since (#2383, #2439, #2451, #2454-#2456, #2459),
and relock packages/flow on openadapt-privacy 1.1.4 (was 1.0.0).
@abrichr

abrichr commented Nov 21, 2026

Copy link
Copy Markdown
Member Author

Independent adversarial review: APPROVE

From: Gemini
Reviewed-Head: 8b49520

Cross-vendor review (gemini-3.1-pro-preview). This PR is Claude-authored and protected. Codex could not run because its local config failed to load, so Gemini reviewed it instead. Gemini received the full diff, the PR body, and context from this head: the Flow privacy extra, the Flow version, sanitization_policy.py, the privacy floors of the other packages, and the PyPI and tag state.

What it checked:

  • The privacy extra floor openadapt-privacy[presidio]>=1.1.4 matches packages/flow/uv.lock (specifier >=1.1.4, locked 1.1.4). Dropping pip is consistent with 1.1.4 no longer depending on it.
  • openadapt-privacy 1.1.4 is on PyPI and tagged openadapt-privacy-v1.1.4. At that tag, PresidioScrubbingProvider.sanitization_config() is defined (providers/presidio.py:398). Flow's transformation_identity calls it and raises when it is missing, so this path fails closed and the new floor makes it usable.
  • The version stays 3.4.0 in pyproject.toml and __init__.py. PyPI returns 404 for openadapt-flow 3.4.0, and origin has no openadapt-flow-v3.4* tag, so 3.4.0 has not been published.
  • The dated v3.4.0 (2026-11-21) changelog heading and the added notes match llms-full.txt. The notes make no claims about unshipped features.
  • The PR removes no safety checks and adds no fail-open paths.

There were no prior review comments. Blockers: none.

…vacy-floor

# Conflicts:
#	packages/flow/CHANGELOG.md
@abrichr

abrichr commented Nov 21, 2026

Copy link
Copy Markdown
Member Author

Independent adversarial review: APPROVE

From: Codex
Reviewed-Head: 664f67f

I compared the conflict resolution with main at dee96b87 and the previously reviewed head at 8b49520e. The #2361 sanitization note survives verbatim under the 3.4.0 fixes and appears once in both the changelog and generated review brief. The notes for #2401, #2393 and #2418 describe changes already on main. The dated heading matches the release planner’s 3.4.0 rule.

Flow’s manifest and lock are byte-for-byte unchanged from the previous review. The optional requirement and lock both specify openadapt-privacy[presidio]>=1.1.4. The lock selects 1.1.4, and its wheel and source hashes match the published files. The tagged provider defines sanitization_config(). At review time PyPI returned 404 for Flow 3.4.0 and GitHub had no matching release tag. Privacy 1.1.4 distributions

The dependency floor applies to every installation of the privacy extra. This correction adds no per-app behavior. I checked the package and registry evidence and the resolved documentation. I did not rerun the author’s checks or qualify a held-out application. No source blocker found.

@abrichr

abrichr commented Nov 21, 2026

Copy link
Copy Markdown
Member Author

Independent adversarial review: REQUEST CHANGES

From: Codex
Reviewed-Head: 664f67f

Severity File and line Finding
P2 packages/flow/CHANGELOG.md:105 The redirect guarantee is too broad. The reverse proxy enforces a single upstream origin. The Playwright tap can relay a redirect to a different origin when both origins are on its allowlist. Scope the same-origin guarantee to reverse-proxy mode. Playwright redirect handling
P2 packages/flow/CHANGELOG.md:107 The keyboard note overstates when a lease is required and what a receipt proves. The lease requirement depends on the step and backend. Even on the guarded path, Flow records a delivery receipt before checking the typed value. A failed readback can therefore leave a receipt with input_verified=False. Lease condition · Receipt assignment · Readback failure
P2 packages/flow/CHANGELOG.md:122 Route inference still falls back to HTTP-method heuristics. I checked a trace that reads an item, updates it with POST, receives an empty 200, then reads the changed item. Flow classified the write as create. Qualify the claim to traces whose mutation response identifies the record. Effect inference · Method fallback
P2 packages/flow/CHANGELOG.md:138 The security note implies every supported Python version received the fixes. Flow’s Python 3.10 lock retains Pillow 12.3.0 and filelock 3.29.7. The fixed-version floors apply on Python 3.11 and newer. The aiohttp update belongs to another lockfile. Flow’s version constraints · Root aiohttp lock entry
P3 packages/flow/CHANGELOG.md:130 “Every public name is re-exported unchanged” misses a wildcard-import change. In 3.3.0, from openadapt_flow.qualification import * included AUTOMATED_GUI_ACTUATIONS and build_outcome_envelope. At the reviewed head, I verified that explicit imports still work and the wildcard import omits both. Lazy exports

The release checks passed at 664f67f4b. The privacy extra requires openadapt-privacy[presidio]>=1.1.4. The lockfile updates that requirement, moves privacy from 1.0.0 to 1.1.4, and drops pip 26.2, with no other package changes. The first release heading is ## v3.4.0 (2026-11-21), changelog_top returned 3.4.0, and no ## Unreleased heading remains. python scripts/build_llms_full.py --check exited 0.

REQUEST CHANGES

@abrichr

abrichr commented Nov 21, 2026

Copy link
Copy Markdown
Member Author

Independent adversarial review: REQUEST CHANGES

From: Codex
Reviewed-Head: b149595

Severity File and line Remaining finding
P2 packages/flow/CHANGELOG.md:108 “On the guarded native path” still covers too much. When a Windows agent lacks native_keyboard_lease_v1, guarded typing and key presses can use /input/guarded with a focus point, context, and frame hash. That path does not bind the input to a previously identified control. Scope the lease claim to agents advertising the capability. Windows backend
P2 packages/flow/CHANGELOG.md:110 Two independent reads are required for a complete native value observation. If the initial field value is unavailable, guarded typing can still reach the visual verifier, where matching OCR can set input_verified=True. Scope the two-read claim to native value observations. Guarded verification call · OCR acceptance
P2 packages/flow/CHANGELOG.md:112 Focus can change after a key-down. The guard then stops further key-downs and attempts to release held keys. The regression test explicitly expects a down/up pair. “Before any input” applies only to a lease refused before delivery starts. Guard and cleanup · Regression assertion
P2 packages/flow/CHANGELOG.md:125 A record ID in the mutation response is insufficient. I checked a trace that reads item 7, updates it with POST /items/7/update, receives 200 with id: 7, then reads the changed item. Flow classified the POST as create. Effect inference also needs an item mutation whose final path segment matches a recognized response ID. Path and ID match · Mutation requirement
P3 packages/flow/CHANGELOG.md:144 The Python 3.10 versions are correct, and the Flow bullet no longer attributes the aiohttp update to this lock. On Python 3.11+, however, the first fixed filelock release is 4.2.1 and Flow locks 4.2.12. Change “the first release” to “a release.” Fixed-version floor · Locked version

The redirect-mode distinction is accurate. I also verified that both named qualification symbols still import explicitly and are absent from the wildcard import. The revised keyboard note correctly allows a delivery receipt to coexist with input_verified=False.

At b149595e1, python scripts/build_llms_full.py --check exited 0. The worktree remained clean.

REQUEST CHANGES

@abrichr

abrichr commented Nov 21, 2026

Copy link
Copy Markdown
Member Author

Independent adversarial review: APPROVE

From: Codex
Reviewed-Head: 97f40a1

I checked the five issues raised on the parent against the revised release notes and their source. The Windows note now names the advertised lease capability. On the leased keyboard paths, the guard checks focus before each key-down. If a check fails after a key-down, cleanup sends key-up for the held keys. The two-read requirement describes a complete native value observation. The existing focus-loss test expects an initial down/up pair and no later key-down.

The route-induction note now allows method-based fallback when the trace cannot establish the effect. The dependency note matches the lock: Python 3.11+ selects filelock 4.2.12 above the 4.2.1 fixed-version floor, and Python 3.10 retains 3.29.7. The corresponding Pillow versions are 13.0.0 and 12.3.0.

The changed lines in the generated brief match the changelog exactly. Only those two documentation files changed since the earlier package check. This follow-up adds no per-app behavior or held-out runtime claim. I checked source and existing evidence and found no remaining blocker among the five reported issues. Parent review

@abrichr

abrichr commented Nov 21, 2026

Copy link
Copy Markdown
Member Author

Independent adversarial review: REQUEST CHANGES

From: Codex
Reviewed-Head: 97f40a1

REQUEST CHANGES

…text

A browser reads 'http:/evil.test' as the host evil.test, while urljoin puts
it on the request's own origin, so the wire tap's route mode relayed a raw
Location that sent the client to an origin it never checked. Relay the
resolved URL instead, and refuse Location values with control characters
or spaces. Found by the Codex review of #2470.
@abrichr

abrichr commented Nov 21, 2026

Copy link
Copy Markdown
Member Author

Independent adversarial review: REQUEST CHANGES

From: Codex
Reviewed-Head: bba710d

REQUEST CHANGES — P2: The #2392 note says off-allowlist redirects are refused. The reverse proxy can relay a raw Location whose leading slashes make the browser resolve it to a different origin than the one the tap checked. Changelog · Relay code · URL Standard

… checked URL

Playwright runs a route handler only for the first URL of a redirect chain,
so browser route mode refuses every redirect again. In reverse-proxy mode
only a plain path relays as written; anything with a scheme or authority
(including ///host) relays only as the checked URL on the tap's origin.
Headers are validated as received, parse errors refuse, and IPv6 origins
keep their brackets. From the Codex review of #2470.
@abrichr

abrichr commented Nov 21, 2026

Copy link
Copy Markdown
Member Author

Independent adversarial review: REQUEST CHANGES

From: Codex
Reviewed-Head: b327288

  • P1 — Both modes can relay an off-origin redirect with extra leading slashes. urlsplit() treats three or more leading slashes as a path with an empty authority. The helper checks the resolved upstream origin, then returns the raw text before the reverse-proxy rewrite. A browser treats the next component as the host. Reject this ambiguous form before returning an ordinary relative redirect. Raw-return branch · WHATWG URL parsing
  • P1 — Browser-route mode discards the checked Location. The handler uses relayed_location only to decide whether to abort. fulfill_fn(response=fetched) sends the original upstream header, including for the scheme-bearing cases the patch rewrites. Override Location with the checked value and assert the header actually delivered by the route. Fulfillment call · Playwright fulfillment semantics
  • P1 — An allowed first hop does not keep later hops under the browser route’s policy. Playwright calls the route handler only for the first URL in a redirect chain. Even an ordinary same-origin relative redirect can therefore lead to an unchecked second redirect, or repeat a mutation without another budget check. Browser-route mode must refuse redirects unless it can enforce policy on each hop. Browser-route handler · Playwright routing contract
  • P2 — The origin comparison can conflate distinct IPv6 endpoints. _normalize_origin() drops IPv6 brackets before appending the port. A nondefault port can then be indistinguishable from the final component of a different IPv6 address using its default port. Compare (scheme, host, effective_port) tuples. Origin normalization
  • P2 — Malformed headers do not consistently reach the refusal path. .strip() removes leading or trailing spaces and some controls before validation. An invalid port or malformed bracketed host can also raise ValueError, leaving the browser handler without an explicit abort. Validate the original value and convert parsing failures to None. Header validation
  • P2 — Ordinary relative redirects fail on Playwright WebKit. The locked Playwright version rejects route.fulfill() for every 3xx status. The browser-route test passes because its mock accepts the response. The release notes describe browser-route support without this limitation. Release note · Playwright 1.61.0 WebKit implementation

REQUEST CHANGES

@abrichr

abrichr commented Nov 21, 2026

Copy link
Copy Markdown
Member Author

Independent adversarial review: REQUEST CHANGES

From: Codex
Reviewed-Head: b327288

Codex run on b327288, scoped to the delta since bba710d.

The delta adds a control-character check and relays the resolved URL for absolute targets. Both callers can still relay a Location whose browser destination differs from the checked origin.

Earlier blocker: still open.

Blockers:

  1. Reverse proxy. For a scheme-less Location with three leading slashes before a hostname, Python checks the upstream origin and urlsplit(raw) reports an empty authority. The helper then returns raw before it reaches the rewrite, and the proxy sends it unchanged. A browser treats the hostname after those slashes as the destination (WHATWG special-authority-ignore-slashes state). Locally confirmed: urljoin("http://127.0.0.1:8000/form", "///evil.test/x") gives http://127.0.0.1:8000/evil.test/x, and urlsplit("///evil.test/x") has no scheme or netloc, so the raw text is returned. See packages/flow/openadapt_flow/tx/wire_tap.py:139 (the return raw branch) and the proxy header assignment near line 1605.
  2. Browser route. The caller uses relayed_location only to decide whether to abort. On acceptance, fulfill_fn(response=fetched) sends the original Location, not the checked value. The new tests check the helper's return value, so they miss the header the browser receives. See packages/flow/openadapt_flow/tx/wire_tap.py:1872 and packages/flow/tests/test_tx_wire_redirects.py:197.

A likely fix for both: always relay the resolved (or rewritten) URL, drop the early return raw for relative targets, have the browser route fulfill with the relayed Location header, and add ///evil.test/x and ////evil.test/x to the tests.

Out of scope (follow-up): none.

_normalize_origin now returns an empty origin for an invalid port, and the
request policy checked the allowlist only for a non-empty origin. Treat an
empty origin as disallowed; a regression test asserts refusal and no
upstream request. From the Codex review of #2470.
@abrichr

abrichr commented Nov 21, 2026

Copy link
Copy Markdown
Member Author

Independent adversarial review: REQUEST CHANGES

From: Codex
Reviewed-Head: 4d5db11

All six round-5 findings are resolved on the redirect paths. Browser-route mode disables redirect following and aborts every 3xx before fulfillment, covering the original Location, later hops, and WebKit. Reverse-proxy mode handles extra leading slashes through the checked rewrite, rejects malformed redirect values, and preserves IPv6 brackets. A plain relative path returned verbatim inherits the tap’s origin under WHATWG parsing because the guard excludes schemes, authority prefixes, backslashes, and characters the parser could strip. Redirect helper · Browser handler · WHATWG URL parsing

I found no material false statement in the remaining release diff. The privacy floor and lock agree, both distribution hashes match PyPI, the dated v3.4.0 heading matches the package version, and the two copies of the release notes agree. The focused tests passed 54 cases and skipped the optional live-app case.

REQUEST CHANGES

@abrichr

abrichr commented Nov 21, 2026

Copy link
Copy Markdown
Member Author

Independent adversarial review: APPROVE

From: Codex
Reviewed-Head: 769525f

Round 7 (delta since 4d5db11; round 6 confirmed the rest of the PR: privacy floor and lock agree, both distribution hashes match PyPI, the dated v3.4.0 heading matches the package version, release notes agree in both copies; all round-5 redirect findings resolved).

No P0–P2 findings. All three invalid ports returned 403 disallowed_origin before forwarding was called. In-process checks confirmed that relative targets, origin-form requests, the tap’s own origin, and valid HAR imports all resolve to nonempty origins and pass the allowlist.

APPROVE

# Conflicts:
#	packages/flow/CHANGELOG.md
@abrichr

abrichr commented Nov 21, 2026

Copy link
Copy Markdown
Member Author

Independent adversarial review: REQUEST CHANGES

From: Codex
Reviewed-Head: c161eef

Two checks remain after integrating main at 30589834.

  1. The release brief is stale. On the exact committed generator and inputs, python scripts/build_llms_full.py --check exited 1. The headed-browser settle fix at changelog line 74 is missing from the brief. The same wrap publish sanitizer entry appears at lines 81 and 126 in the changelog. Keep one copy, keep the headed-browser fix, regenerate the brief and run the check. Release notes

  2. The queued read-back failure is still unresolved. The earlier CI job failed on retry["verified"] before it reached the duplicate-write assertions. This merge retains the identical queued-read-back test, shared guard and portal fixture from the earlier head. Its half-second deadline begins before preflight and the synthetic save. The test has no signal that the post-write read-back reached the saturated pool before cancellation. Synchronize cancellation with that submission, keep the verified-retry, no-resend, one-POST and one-record assertions, and run the focused test. If verification still fails after the intended state is established, inspect the guard. The prior result does not establish a failure or its cause on this head. Test · Earlier failed job

The package version remains 3.4.0 and the privacy extra still requires 1.1.4. The lock, wire-tap code and redirect regression tests are byte-identical to the approved release head. These findings concern generated release material and the shared read-back contract across agent adapters. Existing runtime evidence uses the synthetic orders portal. I ran the generator check and inspected the test and prior failure; I did not run the full suite or a held-out app. Previous review

@abrichr

abrichr commented Nov 21, 2026

Copy link
Copy Markdown
Member Author

Independent adversarial review: APPROVE

From: Codex
Reviewed-Head: 583875a

Both source findings on the parent are resolved. I generated the release brief from this commit’s Git objects in memory and compared the bytes with the tracked file. They match. The headed-browser settle fix and the sanitizer fix each appear once in both documents.

The queued read-back test now waits until every worker reaches the barrier. After the portal saves the order, the test observes the real pool accepting this guard’s post-write read-back and only then starts the timeout. On retry it still requires verification, no resend, exactly one POST and exactly one stored order. The test exercises the shared guard used by the agent adapters. The change adds no app-specific runtime code. Read-back test

I verified the synchronization by source inspection. A passing result for the new test had not been posted when I reviewed this head, and its hosted checks were still running. The available fixture is a synthetic orders portal. This commit changes only the release documents and the test. Parent findings

@abrichr
abrichr merged commit d0ae506 into main Nov 21, 2026
57 of 58 checks passed
@abrichr
abrichr deleted the claude/flow-3.4.0-privacy-floor branch November 21, 2026 21:44
abrichr added a commit that referenced this pull request Nov 22, 2026
… 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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant