Repository navigation
test: allow the sandbox tool marker and linux-gate the window pin test - #15680
Conversation
Two tests on main fail in the macOS backend suite, each for its own reason. - test_terminal_commands.py::TestRunProbe:: test_the_environment_is_an_allowlist_not_a_filtered_inherit finds KIROCREW_SANDBOX_TOOL in the probe child's environment. #15528 stamps that marker on every tree spawned through sandboxed_spawn_argv on purpose, because the runtime reconciler reads it back from the child. So it joins the named sandbox_injected set, with a leaked- sentinel in the parent like GRADLE_OPTS has, which keeps the check honest: the chokepoint overwrites the name, and a parent value must never reach the child under it. The test runs only where a live sandbox backend exists. GitHub's Linux runners have none, so the Linux shards skip it. - test_sandbox_mount_pinned_target.py:: test_the_directory_loop_records_every_window_it_binds, added by #15564, drives the private-window walk. That walk opens each component with bare os.O_PATH, which only Linux has, so the test raised AttributeError on Darwin. It now carries the file's _LINUX_LINK_PIN skip marker, like the other cases that need O_PATH. Failing job (macOS shard 4 of the PR #15309 run): https://github.com/kirodotdev/KiroCrew/actions/runs/36798238474/job/110167010707
d73ade0 to
a3cf60c
Compare
|
Rebased: onto main 7460284 (#15633, the Windows alias-lock fix) so Windows and macOS run on a fixed base. The patch is unchanged ( The reds on the previous head d73ade0 were all infra, hit before any verdict was produced:
The old head's still-queued runs (CI, macOS on demand, CodeQL) were cancelled because the new push supersedes them. |
Design Review (Fable 5) — ✅ PASSDesign-level review of Design-Verdict: PASS Confirm this PR's [DESIGN-REVIEWED] a3cf60c Description read[DESCRIPTION-READ] c738d8fc726760c14d4da9af0eee4abcae522e40e4d56ce5b73ebdf50789cbcb That sha256 names everything this verdict read: the PR description, plus the 1 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with |
Opus 5 Review — ✅ no blocking findingsReviewed Verdict parsed from the review's SHA-scoped output markers for commit False positive or not applicable? A repository writer can comment: |
GPT 5.6 Review — ✅ human override acceptedHuman judgment by @bolichen97 overrides the GPT 5.6 finding for [GPT-OVERRIDE] a3cf60c This comment is updated in place on each push. The model was not re-run because an authorized human decision supersedes it. False positive or not applicable? A repository writer can comment: |
|
|
/ai-review override gpt a3cf60c: The skip fires only off Linux, where the launcher under test cannot execute at all (bare os.O_PATH at sandbox.py:9382 and :9387, and a /proc/self/fd bind source at sandbox.py:9448), so the exact-set window-binding invariant loses no reachable coverage and still runs on every Linux CI job. The gate is the file's existing _LINUX_LINK_PIN, already carried by the sibling tests at L679/L735/L810/L1212; this test was added by #15564 and never passed on Darwin. |
Human judgment recorded@bolichen97 marked the gpt AI finding as false positive, not applicable, or explicitly accepted for
This decision applies only to this commit. A new push requires a new judgment. |
iamwhatever
left a comment
There was a problem hiding this comment.
Reviewed. Test-only: the allowlist assertion gains KIROCREW_SANDBOX_TOOL (and a planted parent value proves the chokepoint overwrites it), and the O_PATH window-pin test is Linux-gated. These are the two macOS shard reds currently inherited by other PRs.
Problem / Motivation
Goal: Main's macOS backend suite goes green again by fixing two test-side gaps that recent main merges left behind.
The macOS backend suite fails two tests on main. Neither failure is caused by the PR it surfaced on (job, macOS shard 4 of the #15309 run):
test/test_terminal_commands.py::TestRunProbe::test_the_environment_is_an_allowlist_not_a_filtered_inheritfails withExtra items in the left set: 'KIROCREW_SANDBOX_TOOL'.test/test_sandbox_mount_pinned_target.py::test_the_directory_loop_records_every_window_it_bindsfails withAttributeError: module 'os' has no attribute 'O_PATH'.Why it matters
Every PR that runs the macOS suite (
ci:macos) is red for a cause it did not introduce. A red that everyone has learned to ignore also hides real macOS regressions.Not a goal
KIROCREW_SANDBOX_TOOL, and fix(sandbox): skip a leaf absent under a mask the launcher already placed #15564's window walk is Linux-only by design.What changed (motivation → approach → change)
test_the_environment_is_an_allowlist_not_a_filtered_inheritKIROCREW_SANDBOX_TOOL=1on every treesandboxed_spawn_argvspawns, so the runtime reconciler can read it back from the child. The test's named allowlist predates it.sandbox_injected, and plant aleaked-value for it in the parent, the wayGRADLE_OPTSalready has one.test_the_directory_loop_records_every_window_it_bindsos.O_PATH. Darwin has noO_PATH.@_LINUX_LINK_PINskip marker, which the other cases that needO_PATHalready carry.The allowlist test runs only where a live sandbox backend exists. GitHub's Linux runners have none, so the Linux shards skip it, and only macOS showed the failure. The
leaked-value keeps the check honest: the chokepoint overwrites the name with its own1, so a parent value reaching the child would mean the stamp turned into an inherit. The_LINUX_LINK_PINcomment now names the window case too.Backwards compatibility
Compatible: test-only change; no runtime behaviour, contract or default changes.
Tests
KIROCREW_SANDBOX_TOOLas an expected sandbox marker. Its newleaked-sentinel fails the test if the chokepoint ever copies a parent's value into the child under that name. Mutation check: when the stamp copies the parent's value, the test goes red onleaked-.Manual verification
On a Linux host with a live namespace backend:
test/test_terminal_commands.pypasses in full.sys.platformreadsdarwinat module import, andos.O_PATHis removed for the run.test_sandbox_mount_pinned_target.pythen gives 39 passed, 6 skipped, 0 failed, with the window test among the skips.os.O_PATHremoved on Linux, exactly the_LINUX_LINK_PINtests and the window test fail. So no other test in the file needs the marker.macOS itself is verified by this PR's
ci:macosrun.Related Issues
no linked issue: main-red fix for #15528 and #15564; no issue tracks it.
Open #14008 carries an equivalent fix for both tests inside its feature diff. Whichever lands second resolves the conflict on these lines.
Pattern harvest
Not generalizable: each failure is a missing entry next to a convention the file already follows. The allowlist names every injected marker, and each
O_PATHcase carries_LINUX_LINK_PIN. A new marker or a newO_PATHcase updates the list the way these two do.Checklist
feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)