mirror of
https://github.com/bytedance/deer-flow.git
synced 2026-10-26 13:16:24 +00:00
* test: fix five Windows-host failures across sandbox, read_file, lark shim, and extension checks Windows dev hosts currently fail five backend test cases that CI (ubuntu) never exercises: - test_local_sandbox_command_timeout: the fixture forces a bare /bin/sh shell and the Windows dispatch spawns it directly (WinError 2), and make(1) is not a given on Windows. Stub both runners; the contract under test is the timeout marker assembly, not the runner. - test_local_sandbox_provider_mounts: the Popen-capture mock delegated to the real spawn, which cannot execute a POSIX shell path on Windows. Capture at the runner seam instead and assert the rewritten path shape-agnostically (the Windows runners pass the command string, not a [shell, -c, command] list). - test_read_file_tool_binary: text-mode write_text leaks CRLF into the fixture on Windows; write the mount fixture as bytes (#6042 follow-up). - test_lark_shim_atomic: skip the exact 0o755/0o644 assertions on Windows hosts, whose stat mode approximates POSIX bits (#6257 pattern). - test_extension_check_script: zipfile normalizes os.sep in entry names on Windows reads, so a writestr-built fixture can never carry a verbatim backslash entry there. Inject the hostile name into namelist unless the archive already stores it, pinning the guard contract identically. On a Windows 11 host these five files go from five failed cases to green (102 passed, ruff check/format clean). Two more Windows-host failures (skill-review NUL probe, jina shared-deadline classification) need deeper root-causing and are left for follow-ups. * test(skill-review): review the committed skill tree, not local residue The video-generation review test scans the live directory, so untracked build residue inside skills/public/video-generation fails it: once bytecode caching drops a scripts/__pycache__ directory into the tree (importing the skill script writes one), skillscan's package-undecodable-script finding is correct and the test can never pass again until the residue is deleted by hand. Reproduced on Windows: a planted scripts/__pycache__ pyc fails the test; deleting it makes it pass. - Materialize the tracked skill tree (git ls-files) into a temp dir and review that, so the test reviews exactly the committed package. - tests/skills/skill_loader.py disables bytecode caching around exec_module, so the root skill suite stops polluting the committed tree. Follows up on #6786 (item 6). * docs(test): state the argv-list contract on both sandbox runners The Windows dispatch also passes the resolved command as an argv list, so the string fallback was unreachable on every platform. --------- Co-authored-by: xiaodu55 <xiaodu55@users.noreply.github.com>