Repository navigation
tools9p integration: the sibling-prefix probes test pathwithin(), not grantcovers() - #1054
Merged
Merged
Conversation
… grantcovers() The sibling-prefix probe looked as if a policy-root grant minted a descendant: the full script showed /tmp/veltro/ok granted to child 16, the same command run alone refused it. They were not the same command. 18c45e6 changed the probe's grant to -p /tmp/veltro/ok:rw; the merge of #549 kept that line, while d534517's copy of it (and the mixed probe beside it) still read -p /tmp/veltro:rw. The script asks for exactly its own grant, which is allowed; the copy asks under a policy root, which is refused. No earlier probe, lingering emu, cow overlay or timing is involved: each gives the same result alone, after a full run, and in the script. The cow line was missing because the overlay key is the granted path's (0-408d82fa is /tmp/veltro's), and only /tmp/veltro's overlay holds a staged scratch from earlier probes to set aside. Both probes had stopped testing anything. A grant of /tmp/veltro/ok was never a string prefix of /tmp/veltroevil, which did not exist; under /tmp/veltro every non-equal path is refused by the policy-root rule before the component check matters, and the mixed request's "good" path was refused on its own, so its atomicity check could not fail. With pathwithin() reduced to a string-prefix test, master's probes still pass. Now the grant is /tmp/veltro/ok and the sibling /tmp/veltro/okevil, both made by the probe, so only the component check refuses it; the mixed request names the grantable path first. A new probe pins the shape that looked like a hole: under -p /tmp/veltro:rw, after a refused write, /tmp/veltro/ok is refused. Checked by mutation: a string-prefix pathwithin() fails the two sibling probes, grantcovers() without its policy-root check fails the new one. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0195u6z6W3TbdAx7jg6RqhYy
Member
Author
|
Update: all three fixes for the failures that weren't this PR's have merged: #1052 ( iOS Build & Simulator Test failed again on 78e76c8. It isn't this PR's either: it fails on and off on master as well (86de120, 62ce2a6), in 5 of the last 30 CI runs.
#1057 handles it: a launch that has written nothing in 20 s is stopped and made again (up to 3 tries), and a failure prints the simulator's state. Generated by Claude Code |
#1053's comment above provision_covered_descendant and this branch's new provision_policy_root_descendant block both land just before that probe; both are kept. The whole tools9p integration script passes locally: 46 passed, 0 failed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0195u6z6W3TbdAx7jg6RqhYy
7 of 8 tasks
Brings in #1055, the fix for the sed_test race that was this PR's one red job (Linux AMD64 Build & Test, ShortScripts). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0195u6z6W3TbdAx7jg6RqhYy
6 of 7 tasks
Brings in #1057: the iOS verify step relaunches a simulator launch that started nothing, the one failure left on this branch (iOS Build & Simulator Test). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0195u6z6W3TbdAx7jg6RqhYy
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
provision_sibling_prefixlooked like a hole: a/tmp/veltro:rwgrant seemed to give child 16/tmp/veltro/ok. In the full script the grant succeeded. Alone it was refused. Neither is a hole. The two runs were different commands.-p /tmp/veltro/ok:rw, and the merge of test(veltro): align campaign readiness checks #549 (7c03b05) kept that line. The line is tab-indented, unlike the rest, which makes the change easy to miss. The child asks for exactly its parent's grant, an ordinary directory, so the grant is correct.provision_sibling_mixedprobe beside it, still read-p /tmp/veltro:rw. Under that grant/tmp/veltro/okis a policy root's descendant, andgrantcovers()correctly refuses it.No earlier probe, lingering emu,
$ROOT/tmp/veltro/cowstate or timing is involved. Thensconstruct: /tmp/veltro/cow/0-408d82fa is from an earlier sessionline was missing only because overlays are keyed by the granted path:408d82fais/tmp/veltro, andadd94451is/tmp/veltro/ok./tmp/veltro's overlay holds a stagedscratch/0from earlier probes, so only a probe granting/tmp/veltrohas anything to set aside.The probes had stopped testing anything
/tmp/veltro/okwas never a string prefix of/tmp/veltroevil./tmp/veltroevilalso didn't exist, andgrantcovers()refuses a path that doesn't exist before any component check./tmp/veltro). The policy-root rule refuses every path other than the grant itself, so the component check never decides anything. The "good" path,/tmp/veltro/ok, was also refused on its own, so the atomicity check could not fail.pathwithin()reduced to a plain string-prefix test, master's sibling probe still passes and still lists/tmp/veltro/ok rw.Changes
tests/host/tools9p_integration_test.shonly. No tools9p or nsconstruct change was needed.provision_sibling_prefix: grants/tmp/veltro/okand asks for the sibling/tmp/veltro/okevil, then for/tmp/veltro/ok. The probe creates both directories itself, so onlypathwithin()'s component check can refuse the sibling. It no longer depends on what earlier probes left behind.provision_sibling_mixed: the same grant, asking forpaths=/tmp/veltro/ok:rw,/tmp/veltro/okevil:rw. The grantable path comes first, so the probe fails if anything is provisioned before every path has been checked.provision_policy_root_descendant(new): the exact command from the investigation, under-p /tmp/veltro:rwwith the refused write before it./tmp/veltro/okexists and must be refused withdenied path /tmp/veltro/ok (outside ...).provision_covered_descendantis left alone; tools9p integration: the covered-descendant probe grants an ordinary directory #1053 fixes it.Testing
Linux AMD64, headless build (
./build-linux-amd64.sh headless, thenmk installin appl, appl/mpeg, appl/veltro and tests).tmp/: 3/3 pass.provision_covered_descendant(tools9p integration: the covered-descendant probe grants an ordinary directory #1053). The three probes pass in it.pathwithin()as a plain string-prefix test: both sibling probes fail. Master's sibling probe still passes under the same mutation.grantcovers()lacking its policy-root check:provision_policy_root_descendantfails with "a policy-root grant minted a descendant".validatepath()refuses a trailing/and//, andpolicyroot()lowercases, so no other spelling of a policy root escapes the rule./tests/runner.dis -vnot run. It is unaffected, since this changes one host-side shell test.Linux AMD64 Host Tests (1) still fails until #1053 (covered descendant) and #1052 (
devletters_test) land. This branch is based on master and doesn't touch #1053's probe, so the two don't conflict.Checklist
.disbuild artifacts committed fromappl/ortests/Generated by Claude Code