Repository navigation
fix: start DynamicUser receivers from private home checkouts - #595
Conversation
|
FAIL What I investigatedReviewed #595 at 2690c10 against #362 and the supplied pithead#3400 requirements. The apply fix has passing regression and integration evidence, but the required regression through documented stock-host setup is missing.
Reviewed head: What are the gaps
|
|
PASS What I investigatedRe-review of PR #595 (closes #362) at head b50bc7e. The earlier reviewed head 2690c10 is in this clone. Since then the worker added two test-only commits, 4cadfaa and b50bc7e. They touch only tests/, tests/README.md and ci.yml. Product code (rigforge.sh, systemd templates, docs/operations.md) is byte-identical to c7c2868. The round-1 finding is fixed. tests/test-stock-home.sh now runs the documented
Reviewed head: |
Owner brief for
|
What's the problem
Closes #362
A DynamicUser cannot open the sister API or control receiver entrypoint beneath a 0750 home checkout. The sister API can remain unavailable while apply reports success. This supplies the RigForge regression required by p2pool-starter-stack/pithead#3400.
How I fixed it
Load each Python entrypoint through systemd credentials alongside its config, preserving the unprivileged service sandbox and home permissions. Return sister-API rendering, startup, refresh and bounded listener failures from apply while completing later reconciles.
The stock-home regression now invokes real
sudo ./rigforge.sh setupbefore any apply (tests/test-stock-home.sh:59). It starts without a worker build or miner unit, installs dependencies and compiles pinned XMRig, verifies the real binary and unit (:62), and requires authenticated port 8081 while HOME remains 0750 (:89). A closed loopback pool and donation zero supply no mining jobs. The real miner is stopped after setup, and real CLI uninstall runs on exit. The current case retains missing-entrypoint apply failure and recovery checks.The control harness now uses the existing bounded unauthenticated readiness probe before its first POST (
tests/e2e-pithead-control.sh:41), replacing a fixed three-second sleep. Delayed and unavailable listener cases assert that no POST occurs before readiness and that failed setup restores the config (tests/test-refresh-window-control.sh:22).Historical and current setup cases run on separate fresh Ubuntu 24.04 hosted runners (
.github/workflows/ci.yml:128). Keep the hardware-harness placement preflight, the focused failure regressions and bounded control-startup diagnostics; correct the testing documentation.Here is the proof
Head:
b50bc7eddab80ceb72cf0ecf350e77848c74643c. All ten exact-head GitHub checks pass, including the real setup historical/current matrix, coverage and Docker e2e. Exact-head control job 3025 passes. This PR remains draft for independent reviewer handoff.Review RETURN addressed: the empty-build/fake-unit apply fixture was replaced by ordinary documented setup, with authenticated listener assertions before apply (
tests/test-stock-home.sh:59,:62,:89; registered at.github/workflows/ci.yml:128). Both cases passed again in exact-head run 40400405850:timeout 1800 bash tests/test-stock-home.sh b2d4c3d9ca1da74d0e6d5ccce772d401acc8be03 broken(job log):stock-home setup historical RED: real setup completed but the sister entrypoint was denied and port 8081 unavailable.timeout 1800 bash tests/test-stock-home.sh HEAD working(job log):stock-home setup GREEN: real setup built XMRig, installed its unit, and served authenticated port 8081 beneath a 0750 HOME, followed bystock-home apply GREEN: failed reconcile rejected, service recovered, HOME remains 0750.These runs install dependencies, build XMRig and install real units on fresh Ubuntu 24.04 as a normal user, without stubs, a prebuilt worker or appliance mode. Both quoted results are from the current PR head; the earlier 4cadfaa matrix also passed. Reboot persistence, live mining and hardware performance are outside the hosted setup test.
Job 3024 failed with initial control HTTP 000 after the three-second sleep; its raw log and control artifact show both units active but do not prove listener readiness or the underlying startup cause. The delayed-listener regression failed against the pre-change control harness at 4cadfaa (exit 1,
delayed control listener was not awaited before POST) and passes after reusing the readiness probe. The unavailable-listener case requires no POST and config restoration. No authenticated write is retried. The completed 3025 log recordsaccess-token-readiness: service=control stage=setup elapsed_s=8before the first POST was accepted and the control round trip completed. This confirms readiness can exceed the old three-second sleep. Job 3019's earlier HTTP 000 remains undiagnosed; the passing jobs do not establish the precise startup cause of either earlier failure.Local checks passed:
timeout 120 bash tests/test-refresh-window-control.sh,timeout 120 bash tests/test-access-token-readiness.sh,bash tests/test-sister-reconcile.sh,timeout 120 bash tests/test-appliance-pool-control.sh,shellcheck --severity=warning tests/e2e-pithead-control.sh tests/test-refresh-window-control.sh, pinned shfmt 3.14.1-i 4 -don those two files,make lint-md,FILE_BUDGET_REQUIRE_BASE=1 bash scripts/lint-file-budget.sh, andgit diff --check. No ceiling raised. Earlier setup-change checks also passed shellcheck/shfmt fortests/test-stock-home.shandmake lint-actions. No local Docker or hardware tests ran.Verifier and security review are clean for both the full-setup correction and readiness change. Ponytail review retained the required setup regression, CLI uninstall cleanup and existing readiness helper; no additional product mechanism was needed.
bench-ci job 3019@c7c2868a690eab5b28c6024f4ad748f0bfff2134 · rigforge · tier4-e2e
Generated by
bench-ci evidence 3019@c7c2868a690eab5b28c6024f4ad748f0bfff2134; re-run it to check.bench-ci job 3023@2690c10f56ee501ee304471036bacd21205b18db · rigforge · tier4-e2e
Generated by
bench-ci evidence 3023@2690c10f56ee501ee304471036bacd21205b18db; re-run it to check.bench-ci job 3024@4cadfaafd97beb7740708067f4edfa0fe329ced1 · rigforge · tier4-e2e
Generated by
bench-ci evidence 3024@4cadfaafd97beb7740708067f4edfa0fe329ced1; re-run it to check.bench-ci job 3025@b50bc7eddab80ceb72cf0ecf350e77848c74643c · rigforge · tier4-e2e
Generated by
bench-ci evidence 3025@b50bc7eddab80ceb72cf0ecf350e77848c74643c; re-run it to check.