Repository navigation
Conversation
…adable; trim docs to what ran
Independent adversarial review: REQUEST CHANGESFrom: Grok First review of this PR. Author is GitHub Fail-closed absence is implemented as claimed, and the tests cover it: a missing file is The typed sources are closed and have no command string. Please refuse non-regular files before reading. The
I am not merging. |
…d budgets Review blocker (fail-open class: unbounded-read-as-evidence): a file source that is a FIFO, a device or a link to one could block the open or never reach EOF and hang the run. A file source is now read only when it is a regular file: it is checked before the open, opened with O_NONBLOCK, and fstat-checked after. Anything else is unreadable, as is a file over 256 MiB (also while it grows during the read). Tests cover a FIFO, a link to it, /dev/null and the size cap. CI: deployment imported up into runtime.effects.local_state, and the eager runtime.effects export loaded one more module for ir and receipt than their budgets allow. The typed source models move to openadapt_flow/local_state_sources.py (policy layer, and added to the protected-path manifest beside runtime/effects/**). The verifier is a lazy export of openadapt_flow.runtime, like Replayer. local_state reads sys.platform without binding the sys namespace, so the lazy export is no new import-layer debt site. No budget or debt row changed. The deployment schema snapshot is regenerated on Pydantic 2.13.4 for the new effects.local_state field (#2424).
Independent adversarial review: APPROVEFrom: Gemini Gemini cross-vendor review of the protected delta (it addresses the earlier reviewer's request to refuse non-regular files) and of the full PR diff vs main. The summary below is from Gemini's own output; it reported no findings.
|
Independent adversarial review: APPROVEFrom: Grok Review only. I am not merging this PR. This is a delta stamp versus Gemini's APPROVE at The new unique work on top of the
The local-state verifier wiring itself is unchanged from the previously approved head. I approve this head. I am not merging it. |
Gemini independent review: APPROVEFrom: Gemini Independent diff audit of
CI blocker (not merge-ready yet): CI is red on stale CLI help snapshots ( |
Independent adversarial review: APPROVEFrom: Gemini Delta review versus previously approved head |
Why
Desktop examples like "turn off Night Shift" don't work today. The released runnable example is a sample web app in a hidden browser. A desktop task also needs a check after the run, and an OS setting or a saved file has no app record to read back. Without that check, a replay ends
COMPLETED_UNVERIFIED; the Notepad lab runs below show exactly that.What
A new record-check kind,
effects.kind: local-state, for state that lives on this computer rather than in an app's database. It reads typed, closed sources through the operating system's own read-only interfaces:file: contents (UTF-8, up to 1 MiB) and SHA-256, through read-only file I/O;macos_defaults: one preference key, through/usr/bin/defaults export <domain> -(goes throughcfprefsd);windows_registry: one value underHKCUorHKLM, throughwinregwithKEY_READ.There is no free-form command source: a source with any other
typeor an extra key is refused when the config loads. A missing file, key or value is a readable state (present: False), so "Light Mode" (noAppleInterfaceStyle) can be expected. Any other failed read (wrong OS, permission denied,defaultsfailing, a missing folder) makes the read unreadable, and the verdict isINDETERMINATE. The tier isindependent-system(tier 1): the read goes to the store the state lives in, not the screen.Examples are data in
packages/flow/examples/local_state/(notepad-save,windows-dark-mode).scripts/desktop/qualify_local_state.pyis the lab harness. Docs:docs/LOCAL_STATE_CHECKS.md,EFFECT_KIT.md, and a CAPABILITIES row.One finding for anyone writing a
verify.yaml:verify-runalso checks that nothing else in the read changed (the frame). A save movessha256andsizealong withtext, so a file example must list them inframe.target_fields, or the receipt saysreconciliation_required. The examples do; a test pins the behavior.Evidence
Windows 11 Notepad, end to end, on the zenbook. Each trial: record the demonstration with the desktop recorder (
record_desktop_demoover the lab's win_agent backend; the recorder types through the agent, as in the other Windows lab harnesses), compile, reset, take the checker's baseline, replay with a new note, then runopenadapt-flow verify-runinside the guest, where the file lives.Per-trial evidence (receipts, replay reports, recordings and frames for 7, 8, 10) is in openadapt-internal
qualification/local-state-checks-20261121/(branchclaude/local-state-check-evidence).Each accepted trial also has a skipped-replay control that comes back
REFUTEDand an unreadable path (missing folder) that comes backINDETERMINATE. Replay on its own reportsCOMPLETED_UNVERIFIED;verify-runturns that intoverified(tier 1,independent_readback).What it took to get there (lab setup, not engine changes):
Windows dark mode: check only. On the zenbook's real registry,
verify-runwithexamples/local_state/windows-dark-mode/verify.yamlreturnsverified; the same contract expecting light returnsREFUTED. The lab Windows is not activated, and Settings shows "You need to activate Windows before you can personalize your PC", with the mode control disabled. So it can't be demonstrated there, and there's no end-to-end run.Not built, and why (also in the doc): Night Shift (CoreBrightness is private; no supported read of the current state), Notes (AppleScript or Shortcuts only, plus a consent prompt; the database is private), Calendar (EventKit is supported but needs a permission prompt and PyObjC, which isn't shipped today).
Tests:
tests/test_local_state_verifier.py(stand-ins fordefaultsandwinreg, so it runs on any OS and never reads this machine's settings), plustest_cli_deployment.py,test_effect_kit_config.py,test_verify_run.py,test_engine_generality_check.py,test_execution_profiles.py: 234 passed on the WSL test host at the merged head. The engine generality check passes.Generality
local_state.pynames OS interfaces (file, preferences domain, registry), never an app or a setting. Apps and settings appear only inexamples/data and the lab harness.judge_records, replaces a per-example checker. Files, preferences and registry values are three typed sources of one read.HKCU\\Control Panel\\International\\sShortDate,CONFIRMED) and an absent value under an existing key (present: False,CONFIRMED). The file source was shown only on the Notepad example that motivated it. The macOS source has no real-OS run yet.Not in this PR
notepad-saveis lab-qualified with a scripted demonstration through the lab agent, and the user path (openadapt-flow record --backend windows, a person typing) is untested.openadapt quickstart --own(feat(quickstart): openadapt quickstart --own, your own task from recording to a tool #2396) is a draft owned by the quickstart agent; an--examplehook is proposed to them separately.defaults exportprints for a domain that doesn't exist) are unreadable, not absent. Unit-tested; no trial depended on either.macos_defaultssource is unit-tested only.