Repository navigation
fix: restore green main - #2533
Conversation
- Flow: printed next steps for handoff, ledger and wrap-dispatch use cli_hints.command(), so they follow the launcher spelling. - Flow: openadapt_flow.txplan.__main__ runs only as a script, so importing it alone no longer parses pytest's argv and exits. - Desktop: exception cards are checked on Windows too. A link or other reparse point is refused before opening, the opened file must be the one checked, and the owner and DACL are read from the open handle (only this user, SYSTEM and Administrators). Answers are written only where they come out private. Card and answer files are opened in binary mode.
|
From: Claude |
Independent adversarial review: APPROVEFrom: Claude Nothing blocking. The pull-request tier runs Desktop tests on Linux only ( Each failure
Windows safety: no fail-open found
Not blocking
|
# Conflicts: # packages/flow/openadapt_flow/cli_deferred.py # packages/flow/openadapt_flow/run_ledger/cli.py # packages/flow/openadapt_flow/wrap/dispatch_cli.py
Independent adversarial review: APPROVEFrom: Gemini Independent cross-vendor adversarial review of Findings & fail-closed verification
Generality gate
|
|
From: Claude |
Independent adversarial review: APPROVEFrom: Claude (Review done after the merge as 7afc296.) Nothing blocking. The exception-queue tests pass on macOS (42 passed, 1 skipped). At this head, Packages run 45027541702 shows the Desktop Python engine tests green on Windows py3.11 and py3.12. Fail-closed on Windows
Trusted SIDs
Bytes: Answer write: refused unless the new file comes out private. The Tests and release:
Not blocking
|
Fixes the failures that have kept
mainred since 2092fc0 (#2484).Failures, causes and fixes
The two Flow failures (
test_cli_hintsandtest_every_module_imports_alone) were fixed on main by #2530 and #2519. This branch merged main and no longer changes Flow.Desktop Windows engine tests, py3.11 and py3.12 (
tests/test_engine/test_stop_queue_exceptions.py)Cause: the card reader's safety checks were POSIX-only. On Windows,
O_NOFOLLOWis 0, there is nogetuid, and the mode-bit check runs only whenos.name == "posix". So on Windows a linked card was followed and read (test_a_linked_card_is_not_read), and a card any user could read was shown. The checks failed open there.test_the_window_signs_and_writes_the_runs_answer(438 == 384) compares mode bits, not byte counts: 438 is 0o666 and 384 is 0o600. Windows reports 0o666 for any writable file.test_a_card_other_users_can_read_is_not_shownusedchmod(0o644). On Windows that only clears the read-only flag, so it never made the card readable by others.Fix (fail closed, the Windows way): in
openadapt_desktop/exception_queue.py:lstatthe card and refuse a symlink or any reparse point (FILE_ATTRIBUTE_REPARSE_POINT, which covers junctions). The run folder gets the same check.fstat's(st_dev, st_ino)must match the checked file and must be nonzero.GetSecurityInfothroughmsvcrt.get_osfhandle, added as ahandle=option to the existing ctypes readerapprover_anchor._windows_security). The owner must be this process's user, or the owner its token gives new files. Only this user, SYSTEM and Administrators may hold rights, which matches the default ACL of a user's profile folder. OWNER RIGHTS (S-1-3-4) is allowed too: it grants rights only to the owner, who must already be this user. An elevated process's temp files carry it, as the Windows CI runner showed.registry_unwritable.O_BINARY, so Windows doesn't translate newlines or treat Ctrl-Z as end of file.Tests: the POSIX assertions are unchanged. On Windows they now exercise the real condition:
icacls *S-1-1-0).Desktop is bumped to 0.31.1 as
desktop-release-intentrequires.Rust locked dependencies
Cause: a new advisory, RUSTSEC-2026-0592, covers
url2.5.8 insrc-tauri/Cargo.lock.Fix:
cargo update -p url --precise 2.5.9, which also movesform_urlencodedto 1.2.3.cargo auditfinds no vulnerabilities.Earlier red checks on this PR
Flow core unit shard 1/4 failed on this branch's own
dispatch_cliimport ofcli_hints, an upward import. That change is gone after the merge. The launcherrun-cijob failed only because the packages job failed.Other jobs on main
The latest finished Packages runs on main (45013930658, 45010820726, 45010093446, 45007372801, 45007074484) fail only in the jobs above (plus
packages-gate, which reports them). No other workflow on main failed in the last 60 runs. The Windows native row census failure in #2484 comes from the 11-21 nightly. It passes on the push runs above.Verification
tests/test_engine/test_stop_queue_exceptions.pypasses, 42 passed and 1 skipped.workflow_dispatch.