Repository navigation
Retain private connector refusal diagnostics and validate the deployment before polling - #2403
Conversation
Independent adversarial review: APPROVEFrom: Grok Stacked on the #2300 pilot at Pointer: openadapt-internal#211 |
Independent adversarial review: APPROVEFrom: Grok Delta re-review after my APPROVE at The only unique commit since that head is The test now asserts both Review only; I am not merging. |
Independent adversarial review: APPROVEFrom: Grok Integration review against my earlier APPROVE of this PR at The unique review diff versus #2409 still covers the same 18 paths. The merge touched three files ( A possible write with no settled result still halts: cancel after start without a validated same-substrate success or halt, a missing or unreadable report, or an exception at the run boundary all become Local diagnostics stay off the wire: I counted 77 cases in |
Independent adversarial review: APPROVEFrom: Claude (independent reviewer) I reviewed the full diff against What I checked:
Blockers: none. Non-blocking notes:
I did not run a Docker build, a live application or the Windows host. |
# Conflicts: # packages/flow/openadapt_flow/connector/executor.py # packages/flow/openadapt_flow/connector/windows_service.py # packages/flow/tests/test_connector.py
Independent adversarial review: APPROVEFrom: Gemini Independent cross-vendor review of What was verified
|
# Conflicts: # packages/flow/openadapt_flow/at_rest.py # packages/flow/tests/conftest.py
Independent adversarial review: APPROVEFrom: Claude This is a delta review of the merge resolution only. The last approved head is 2af6759 (Gemini APPROVE, 2026-11-22). The new head 35e0ba4 is a merge of origin/main at 2ea7480 into 2af6759 and has no other commits. 2af6759...35e0ba4 brings in 25 commits from main, #2423 among them. To separate Gemini's edits from main's content, I compared the PR's net diff over its main parent before the sync (c416c46...2af6759) with the net diff after it (2ea7480...35e0ba4). The approval depends on CI passing. Every check was still pending when I reviewed. Resolution vs. mainThe file list is the same as before the sync, except for one new entry,
|
Independent adversarial review: APPROVEFrom: Gemini Delta review versus previously Gemini-approved head |
#2476) * feat(flow): one verdict kernel, a fail-open harness and a fold ratchet 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. * fix(flow): close the gaps a review found in the verdict kernel and harness - 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 * fix(flow): second review round on the verdict kernel and harness - 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 * fix(flow): settle the positive controls, verify-run folds and receipt 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. * fix(flow): close the log-call hole in the swallow check; state the provenance 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. * fix(flow): close the four ratchet and observed gaps Gemini found 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. * docs(flow): record how the fold baseline was measured and why unread-first stays * chore(flow): bump verdict_folds_baseline for connector/executor.py from main (#2403)
Fixes #2376. Stacked on #2409 at
e7bc2183. That PR targets the #2300 pilot branch, which includes #2386 and #2399.A refused run leaves an owner-only diagnostic beside its expected report in the customer store. The operator can read it with
python -m openadapt_flow.connector.diagnostics <path>. It holds the local refusal detail and the last 32 KiB of combined child output. Known credentials are masked. The connector encrypts the sidecar with its local at-rest key unless the operator explicitly opts out and the plaintext ledger accepts the write. Unavailable storage, ACL checks or keys yield a closed local flag. Cloud callbacks and service logs receive no diagnostic text.An empty or unreadable report and a report missing its substrate get distinct closed codes and halt for reconciliation. An absent report creates no empty file, report path or digest for a Receipt. Only an explicit conflicting target gets
target_kind_mismatch. The child output pipe drains while the process runs, with a bound on retention and on draining after exit.The container flushes Python output and keeps the plaintext ledger in a private writable directory outside the job-addressable store. Its config and key locations remain operator-controlled. CLI and Windows-service startup check the deployment's explicit managed execution profile before polling. The governed child still verifies each dispatch against its exact authorization.
Generality
Verification — 105 tests passed on
b293d905across the core connector, pilot, deployment preflight and real-process suites, including the stored report digest and missing-report controls. The deployment contributor separately ran Windows-wrapper and at-rest regressions. Ruff, the scoped four-module mypy check and actionlint passed locally.On the merged stack at
40ebd01f, all 77 tests intests/test_connector.pyandtests/test_connector_diagnostic_process.pypassed. They cover cancellation before launch, after a possible write and after a settled result, as well as private child output and callback binding to stored report bytes.