Use native Codex Cloud environment and remove Codex-specific launcher test - #3836
Use native Codex Cloud environment and remove Codex-specific launcher test#3836max-sixty wants to merge 1 commit into
Conversation
worktrunk-bot
left a comment
There was a problem hiding this comment.
Reviewing as a draft — flagging anything that looks worth a quick fix. Mark ready for a full review.
Two things, one of which I think blocks the environment doing its job.
Running the suite as root will fail three tests. Dropping the UID-1000 switch means the README's own validation command (cargo run -- hook pre-merge --yes) now runs as root, and three tests in tests/integration_tests/step_copy_ignored.rs derive their expected failure purely from a 0o555 directory, with no root guard: test_copy_ignored_error_includes_path_directory, test_copy_ignored_error_includes_path_file, and test_copy_ignored_error_nested_file_parent_creation. Each chmods the destination to 0o555, runs wt step copy-ignored, and asserts !output.status.success() — under CAP_DAC_OVERRIDE the copy succeeds and the assertion fires. The repo already treats this as a known shape elsewhere: test_configure_shell_fish_legacy_remove_failure_warns in tests/integration_tests/configure_shell.rs probes with a scratch write and bails out with eprintln!("Skipping - running with elevated privileges") when permissions don't restrict, and remove.rs, approval_pty.rs, and approval_save.rs carry the same guard. The three copy_ignored tests never needed it because the Cargo wrapper kept them off root — which is what the deleted README line about "the suite's permission and child-reaping assumptions" was pointing at. If native behavior is the goal, the same guard on those three (or a verified full-suite Cloud run) is the missing piece; #3810 validated with hook pre-merge --yes in Cloud, and the Testing section here covers one test plus task --list.
Related but not a failure: test_list_full_survives_read_only_object_database and test_list_statusline_survives_read_only_object_database in list.rs freeze .git/objects by stripping write bits, so as root they pass without ever reaching redirect_objects_if_read_only. The coverage doesn't break, it just stops existing in this environment.
The deleted digest test is the only thing enforcing a gate the README still depends on. See the inline comment.
On tini — the paragraph being removed cited child-reaping, and the PR body drops it without saying whether that was load-bearing (zombies actually observed under cargo nextest) or belt-and-braces. Worth stating either way, since it's the one removal with no direct replacement.
Last, a judgment call rather than a rule I can point at: these are two independent changes — the digest test removal doesn't depend on the environment simplification, and either could be reverted without the other — so they'd land more cleanly as separate PRs.
| } | ||
| } | ||
|
|
||
| #[test] |
There was a problem hiding this comment.
Removing this test leaves the digest gate documented but unenforced. scripts/codex-cloud/README.md still says "The hash prevents a task branch from changing code run as root. After a reviewed Taskfile change reaches the default branch, update both environment commands", and the weekly-maintenance entry in .claude/skills/running-tend/SKILL.md still instructs "copy the Taskfile's new digest into both README launchers" for the Codex Cloud tools. With the test gone, the next Taskfile edit that forgets the README produces a mismatch that surfaces only inside Codex Cloud, at sha256sum -c - before anything runs, with no CI signal at all — and the Testing section of this PR did that comparison by hand, which is precisely what the test automated.
The TASK_VERSION extraction is the part that couples this to Taskfile internals; the digest assertion alone doesn't. If the coupling is the objection, dropping the regex and keeping the sha256sum-equivalent check would keep the guard at a fraction of the surface. Worth having a reason to lose it entirely, given the failure it catches is invisible to every check that runs here.
Motivation
tinilogic.Description
tests/integration_tests/readme_sync.rsso README/Taskfile launcher checks no longer assert a repo-specific launcher string.scripts/codex-cloud/Taskfile.yamlto stop creating a UID-switchingcargowrapper, droptiniusage, and avoid enforcing theubuntuUID 1000 precondition; the Taskfile now prepares and runs Rustup,pre-commit, and Cargo directly using the native environment.ubuntuuser and replaced those with straightforward directory creation and nativerustup/pre-commitinvocations inprepare-codex.scripts/codex-cloud/README.mdto reflect the new Taskfile behavior and refreshed the documentedTASKFILE_SHAto match the updated Taskfile.Testing
cargo test --test integration test_taskfile_llm_commands_match_config_exampleand it passed (1 passed).task --taskfile scripts/codex-cloud/Taskfile.yaml --listand it succeeded.TASKFILE_SHAlines inscripts/codex-cloud/README.mdmatchsha256sum scripts/codex-cloud/Taskfile.yamland the checks passed.git diff --checkand basic repo hygiene checks and they passed; note thatpython3 -c 'import yaml'failed due toPyYAMLnot being installed in the environment, buttaskitself successfully parsed the YAML, so Taskfile syntax was validated.Codex Task