Repository navigation
feat(pi): add optional repeated-read containment - #7834
Conversation
Add an off-by-default Linux Pi primary safeguard with bounded configurable limits, verified ownership, durable stopping, and deliberate user reset. Preserve ignored legacy guards and require explicit collision migration. Cover policy, SDK compatibility, installed RPC behavior, and test selection. Refs kunchenguid#7805.
…nd shard packing passed
|
Speaking as Kun's firstmate: thank you @kesslerio. This follows the shape we discussed on #7805 closely, and the off-by-default, primary-only ownership checks are exactly right. What I checked at head CI (run Contract-class: opt-in. That's my own read: the guard is off unless VISION:
Nothing is needed from you. If the rerun comes back green and the branch is clean, it's an opt-in merge on a later pass. |
[Medium impact] The PR appears safe to merge; no actionable defect was established. Reviews (1) · Last reviewed commit: "no-mistakes(test): Fixed locale-dependen..." · Reviewed by Greptile |
|
Speaking as Kun's firstmate: this is merged. Thank you @kesslerio — really appreciate you taking the time on this. |
Closes #7805
What Changed
Risk Assessment
✅ Low: The opt-in containment is bounded, enforces primary ownership, preserves durable stopping and deliberate reset, and introduces no substantiated material defect.
Testing
The installed Pi RPC guard stopped repeated reads, preserved its durable latch, denied operational resets, and allowed genuine user reset. The isolated installed-Pi collision check refused activation with migration guidance and left legacy files and config unchanged. Changed-file selection retained the affected suites and SDK check; coverage and runner/workflow checks passed in the private PID namespace. The initial runner/workflow attempt outside that namespace hit the known orphan-adoption prerequisite and passed when rerun in the supplied isolation.
--list-scheduledoutput includedfm-read-repetition.test.sh,fm-read-repetition-live.test.sh, andfm-pi-primary-types.test.sh;--check-coveragereported 295 covered suites and valid packing.tests/fm-read-repetition-live.test.shinstalled Pi RPC fixture reported 3 executions before stop, operational reset denied, user reset allowed, and durable notice; focused policy tests also exercise…Evidence: Installed Pi collision refusal
Evidence: Installed Pi RPC guard
Evidence: Coverage guard
Pipeline
Updates from git push no-mistakes
✅ **intent** - passed
✅ No issues found.
🔧 **Rebase** - 1 issue found → auto-fixed ✅
docs/fm-test-portable-shards.md- merge conflict rebasing onto origin/main🔧 Fix applied.
✅ Re-checked - no issues remain.
✅ **Review** - passed
✅ No issues found.
🔧 **Test** - 1 issue found → auto-fixed → no changes applied ✅
tests/fm-read-repetition.test.shand installed Pi RPC output fromtests/fm-read-repetition-live.test.shtests/fm-read-repetition.test.sh; installed Pi RPC default-off case intests/fm-pi-primary-types.test.shoutputexecutionsBeforeStop=3,requestsBeforeStop=4,operationalResetDenied=true,userResetAllowed=true,durableNotice=true; policy ownership/reset casesbash bin/fm-test-run.sh tests/fm-read-repetition.test.sh tests/fm-read-repetition-live.test.shbash tests/fm-pi-primary-types.test.sh(started; output confirmed Pi 1.1 and 1.2 SDK checks before the command ended)LC_ALL=C bash bin/fm-test-run.sh --check-coveragegit diff --check🔧 Fix applied.
2 warnings still open:
tests/fm-read-repetition-live.test.shbash bin/fm-test-run.sh tests/fm-read-repetition.test.sh tests/fm-read-repetition-live.test.shbash bin/fm-test-run.sh --check-coveragebash bin/fm-test-run.sh --changed --base 7da4c3621370534ff9689843d2b77f34158057fb --list-scheduled🔧 No changes applied.
✅ Re-checked - no issues remain.
--list-scheduledoutput includedfm-read-repetition.test.sh,fm-read-repetition-live.test.sh, andfm-pi-primary-types.test.sh;--check-coveragereported 295 covered suites and valid packing.tests/fm-read-repetition-live.test.shinstalled Pi RPC fixture reported 3 executions before stop, operational reset denied, user reset allowed, and durable notice; focused policy tests also exercise…bash bin/fm-test-run.sh --changed --base 7da4c3621370534ff9689843d2b77f34158057fb --list-scheduledbash bin/fm-test-run.sh --check-coveragebash bin/fm-test-run.sh tests/fm-read-repetition.test.sh tests/fm-read-repetition-live.test.shbash tests/fm-pi-primary-types.test.shDisposable HOME/FM_HOME: installedpi --mode rpc --no-extensions -e <managed-extension>with fake legacy guard/helper files and enabled config; compared SHA-256 hashes before and afterbwrap --unshare-user --unshare-pid --unshare-net --die-with-parent ... bash bin/fm-test-run.sh tests/fm-test-run.test.sh tests/fm-ci-workflow.test.shtests/fm-test-run.test.shoutside the private PID namespace, to confirm the orphan-adoption fixture requires that namespace✅ **Document** - passed
✅ No issues found.
✅ **Lint** - passed
✅ No issues found.
✅ **Push** - passed
✅ No issues found.