HOMELAB-2682: fix(sbx-gits): generate the daemon idle settings E0R applied by hand #868
No reviewers
Labels
No labels
operator-review
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Homelab/infra-core!868
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "plane/HOMELAB-2682-gradle-daemon-gen"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What
gits-sbx-android-install.shgenerates$GRADLE_USER_HOME/gradle.properties(
/home/ld/work/.gradle/gradle.properties) and rewrites it on everyinstallandevery
doctor. E0R's daemon fix lives in that file as a local edit, so the nextinstall/doctor loses it. This PR moves both settings into the generator.
From gits-hypervisor:
The two settings, exactly as E0R's live edit has them
-Dkotlin.daemon.options=autoshutdownIdleSeconds=300merged into the existingorg.gradle.jvmargsvalue (appended — the line already existed):org.gradle.daemon.idletimeout=300000as its own property, in the same place E0R'sedit sits — after the three existing pins:
Nothing else in the writer changed: same heredoc, same
$PROG, same "write temp,cmp,mv" idempotence, same callers (installanddoctor). Thekustomization.yaml,statefulset.yaml, the smoke, the proof tool, the lock and the queue are untouched.Verification
Generated vs the live file in the pod (
kubectl exec -n sbx-gits sbx-gits-0 -c sandbox -- cat /home/ld/work/.gradle/gradle.properties, read-only), property lines only:diff <(grep -v '^#' live) <(grep -v '^#' generated)→ empty: the four propertylines are byte-identical and in the same order. Placement matches too — in both files
org.gradle.daemon.idletimeoutis the last property line, immediately after the threememory pins (line 11 live / line 12 generated; the one-line offset is the generator's
own truthful comment, since E0R's comment says "LOCAL OVERRIDE (not in the installer
template)", which is no longer true).
Generation was run for real, not grepped: the writer was extracted with the
casestripped and
WORKpointed at a throwaway tree (the technique 10c already uses), then asecond run proved the no-op path (
ya al dia) and a byte-identical file.Harness (
scripts/gits-sbx-epic-test.sh, solo run):10cnow pins the combined jvmargs line (whole line,grep -qxF, not a prefix —an option pasted or lost changes the jvmargs value without changing the prefix), adds
org.gradle.daemon.idletimeout=300000, and gains three mutations that bite:drop the idle line, change its value, drop the Kotlin autoshutdown.
SBX_GITS_DIFF_SETre-measured againstorigin/live=9119eb2b: the anchor branch(#859) is already in live, so this branch's set is exactly
M tools/gits-sbx-android-install.sh.T7[diff]and17[R159] (d)are green, andtheir "the set bites" mutations are green.
bash -nclean on both files.Rollout
No hold needed: this rides the next ConfigMap refresh exactly like every other change to
tools/(same auto-sync as everything else). The generated file keeps the values E0Ralready set by hand, so the refresh is a no-op on the live content — until someone runs
install/doctor, which is precisely the case this fixes.Not in this PR
docs/gits-sbx/t7-android-install.mdstill says "los tres límites" (the doc check in 10conly greps for the three memory values, so it stays green). Left untouched on purpose —
say the word and it rides a follow-up.
2e8ef24d(post-revert #866)Head is now
ab079b21— live moved under the branch (revert #866), so it was merged inliveadvanced from9119eb2bto2e8ef24d(revert #866, "pre-#859 proof tool delivery")while this PR was open. That revert changes
tools/gits-sbx-emu-proof.shonly, but theharness measures its pinned change set against
origin/live, so an unmerged base wouldhave turned
T7[diff]red for the wrong reason: my branch lacked a file live had changed.Fixed the way the set is meant to be fixed — merged
origin/liveinto the branch(
54adacd5, no rebase, no force-push) and re-measured the pinned set against2e8ef24d(
ab079b21, comment in the harness updated to say so).Diff versus the new
liveis still exactly two files:CI on
ab079b21: green (shellcheck, yaml-lint, terraform-validate, helm-validate,runner-manifest-test, cockpit-*, dispatcher-test, record-sql-test, alert/receiver — both runs).
Harness on the merged head, and what the 53 reds are
bash scripts/gits-sbx-epic-test.shsolo onab079b21: 53 red / 650 checks.The same harness, same machine, on a clean
2e8ef24dcheckout: 53 red / 649 checks,and the two red lists are identical label-for-label (
common both lists → empty inboth directions). So this PR adds zero reds.
Those 53 are live's own post-revert inconsistency, and they are not about this PR: every one
is
ERROR argumento desconocido en check: '--tree'in the proof-tool suites(
22[R176b],24[HOMELAB-2682],25[HOMELAB-2682]) —livenow ships the pre-#859tools/gits-sbx-emu-proof.sh, while the harness inlivestill asserts the post-#859contract. Whoever owns the re-land declares them (the revert message says "pending
gits-proof-suite").
The three checks that are genuinely about this branch are green, including their
"the set bites" mutations:
Re-ran the generation on the merged head and read the pod's live file again: the four
property lines are still byte-identical and in the same order (
diffof the non-commentlines is empty).
Verdict of record — ld-reviewer — head
ab079b218c: APPROVEmodel: deepseek-flash
session: 01a1af28-68b8-757a-b84d-27db4468c5fe
Blockers
None.
Concerns
C1 (minor, harness) — the static predicate
f96_propsmatches withgrep -qF(substring, not whole-line) against the installer, and the writer's own comment block repeatsorg.gradle.daemon.idletimeout=300000and-Dkotlin.daemon.options=autoshutdownIdleSeconds=300verbatim. I built the sharp mutant the committed mutations miss — delete only the heredoc line, keep the comment — and the static predicate stays GREEN on it. It is not a hole in 10c as a whole: the behavioural leg (run the writer,grep -qxFon the generated file) goes RED on that same mutant, so the case still bites. Worth a whole-line match on the installer later, not a blocker.C2 (minor, description drift) — the PR body says
SBX_GITS_DIFF_SETwas re-measured againstorigin/live=9119eb2b; the committed inline comment inscripts/gits-sbx-epic-test.shsays2e8ef24d, which is the realorigin/livehead and this PR's base. The inline comment is the correct one; the body is stale.C3 (declared, follow-up owed) —
docs/gits-sbx/t7-android-install.mdstill says "los tres límites" and lists only the three memory pins, and 10c's doc leg still greps only those three, so the doc check stays green on a generator that now writes four properties. Declared under "Not in this PR" and accepted there; it should ride a follow-up rather than be forgotten.C4 (context, not this PR's doing) — the harness solo run is 53 red of 650 on this head, but the same suite on
origin/live(2e8ef24d) is 55 red of 652. Zero head-only failures; the head's red set is a strict subset of the baseline's, and two baseline reds are actually fixed here (17[R159] (d)and its mutation). The dominant cluster (check: '--tree') is the mounted proof tool being older than the harness, plus manifest/live-drift checks — all pre-existing and outside this diff.What I checked
git diff --name-status origin/live...ab079b21is exactly two files:core/manifests/apps/sbx-gits/tools/gits-sbx-android-install.shandscripts/gits-sbx-epic-test.sh. Undercore/manifests/apps/sbx-gitsit is exactly one file,M tools/gits-sbx-android-install.sh, which is precisely the branch's pinnedSBX_GITS_DIFF_SET.kustomization.yaml,statefulset.yaml, the smoke, the proof tool, the lock and the queue are untouched; no file added undertools/.casestripped,WORKpointed at a throwaway tree, ran it. Property lines diffed againstkubectl exec -n sbx-gits sbx-gits-0 -c sandbox -- cat /home/ld/work/.gradle/gradle.properties(read-only) is empty — the same four lines in the same order,org.gradle.jvmargs=-Xmx3g -Dkotlin.daemon.options=autoshutdownIdleSeconds=300andorg.gradle.daemon.idletimeout=300000included. Placement matches (idle timeout last, after the three memory pins).sha1 f70d52d0f6dd…both times,cmpclean) and takes theya al diano-op path. Drift is still corrected back to the pinned jvmargs value.install+doctor= 3, which is exactly what the predicate's>= 3requires.f96_propsagainst all six mutations from the head:mut-sin-workers,mut-kotlin,mut-sin-llamada,mut-sin-idle,mut-idle-cambiado,mut-sin-autoshutdown— every one RED, baseline GREEN. The new pair is pinned as whole lines viagrep -qxFon the generated file, so an option pasted or lost changes the value and is caught.bash -nclean on both files;T7[diff]PASS plus its "the set bites" mutation PASS;10cPASS;17[R159] (d)PASS plus its mutation PASS.Not merging anything and not touching the branch: this is the review seat only.
Verdict of record — ld-reviewer — head
50911dd094: APPROVEmodel: deepseek-flash
session: 01a1af56-b89e-757a-b84d-27e37f76f98b
Delta re-check after the prior APPROVE (comment 22524, head
ab079b21). New head50911dd0has parentsab079b21+093b86d2(origin/live, i.e. #869), so the base is right and the branch merged live rather than being rebased. The generator change is unchanged, and the three resolved harness hunks kept both sides. Nothing is smuggled and no live case was dropped.Blockers
None.
Concerns
C1 — the harness is 52 red, not 5, at this head; 47 of those are pre-existing on
live, not this delta. Solo run in a clean worktree at the head:Two distinct classes:
probe uses an EMPTY pre-existing --dir,manifest[2] memoria requests 6Gi/10Gi,manifest[3] imagenes,manifest[3b] bump de imagen H5,T7 emulador dentro del pod (18/21Gi, cpu 24). Live-manifest snapshot drift; this PR touches no manifest.ERROR argumento desconocido en check: '--tree'(the tool'scheckverb has no--tree; onlyrundoes), plus25[…] (a) … el ancla (falla: la-ruta-canonica-de-la-herramienta-no-es-la-que-este-test-cree)— the tool defines noEMU_PROOF_SMOKE_RELPATH. These are not caused by this PR:git diff 093b86d2..50911dd0 -- core/manifests/apps/sbx-gits/tools/gits-sbx-emu-proof.shis empty (byte-identical toorigin/live), and the §24/§25 case code is the same on both refs (4824[HOMELAB-2682]and 14125[HOMELAB-2682]occurrences on093b86d2and on the head; same anchor grep). A solo harness run atorigin/livetherefore goes red the same way. The prior round's 5-red log suggests that run exercised a proof-tool copy that supportedcheck --tree; the honest solo baseline at this head is 5 + 47. Worth its own ticket (live's harness cannot pass standalone), but it is not a merge blocker for a change that touches neither the tool nor those cases.C2 — the PR's own case does pass, and that is the one this delta could have broken.
PASS T7+R96[10c] …(four exact lines in the generatedgradle.properties, second run no-op, drift-Xmx16gre-pinned, and each of the five values — three memory, both idle halves — turning the predicate red when removed/changed). NoFAILline matchesR96/96[.What I verified for this delta
git diff 093b86d2..50911dd0 -- core/manifests/apps/sbx-gits/tools/gits-sbx-android-install.sh(38 lines, 1 file) is only the daemon pair:org.gradle.jvmargsgains-Dkotlin.daemon.options=autoshutdownIdleSeconds=300, neworg.gradle.daemon.idletimeout=300000, plus the comment block and the twoinfo/okcmessage strings. Whole-PR diff is two files: that installer andscripts/gits-sbx-epic-test.sh.live(12suite_relpathhits intact — the forward-compat resolution did not pick one side and drop the other). The harness keeps #869's §25/§26 anchor cases and the R96[10c] daemon cases: pass/fail case lines atlive943 = at head 943, andcomm -23 live head(cases present on live but gone at head) is empty. The mergedT7[diff]expectation now allows exactlyM tools/gits-sbx-android-install.sh, and the merged prose block names bothsuite_relpathand the idle pair, so neither side's invariant was silently widened.bash -nclean on the install script and on the harness at the head (bothOK).kubectl exec -n sbx-gits sbx-gits-0 -c sandbox -- cat /home/ld/work/.gradle/gradle.properties(read-only) returns the four expected lines verbatim —org.gradle.jvmargs=-Xmx3g -Dkotlin.daemon.options=autoshutdownIdleSeconds=300,kotlin.daemon.jvmargs=-Xmx1536m,org.gradle.workers.max=4,org.gradle.daemon.idletimeout=300000— and the last one still carries the# LOCAL OVERRIDE (not in the installer template; installer/doctor overwrite it)comment, which is precisely the hand edit E0R left in the generated file that this PR moves into the generator.ab079b21(the previously approved head) +093b86d2(origin/live); the three harness hunks resolved additive-to-both-sides, verified by the empty case-set difference in (2) rather than by the resolution's own comment.Verdict of record — ld-reviewer — head
16b20059c2: APPROVEmodel: deepseek-flash
session: 147ecd2c-f8d1-42da-8957-63ae82848025
Delta re-check after the prior APPROVE (comment 22534, head
50911dd0). New head16b20059has parents50911dd0+3311b562(origin/live: #870 tools pin, #867 volume floors), so it is a real merge of live, not a rebase and not a force-push. The generator change is unchanged and the three resolved harness hunks kept both sides. Nothing smuggled, no live content dropped.Blockers
None.
Concerns
live; this delta is comment-and-prose only, so that profile is unchanged and is not a finding against this PR. This round I did not re-run the 14k-line harness — I verified statically that the delta touches no code (only comment lines and twopass "..."message strings), so a re-run could not move the count. The recorded C1 from comment 22534 stands as the open concern.kubectl exec -n sbx-gits sbx-gits-0 -c sandbox -- cat /home/ld/work/.gradle/gradle.propertiesstill shows E0R's hand-edit marker (# LOCAL OVERRIDE (not in the installer template; installer/doctor overwrite it)), because the new installer has not run yet. The values match the generator template byte for byte (org.gradle.jvmargs=-Xmx3g -Dkotlin.daemon.options=autoshutdownIdleSeconds=300,kotlin.daemon.jvmargs=-Xmx1536m,org.gradle.workers.max=4,org.gradle.daemon.idletimeout=300000); only that# LOCAL OVERRIDE ...comment line differs and will disappear on the nextinstall/doctor. The post-merge proof should show the# An idle daemon pair must not outlive ~5 min ...comment in the pod file as the completion signal.What I verified (exact commands, this head)
git diff 50911dd0..16b20059 -- core/manifests/apps/sbx-gits/tools/gits-sbx-android-install.sh-> 0 bytes. No smuggled tool edits; the installer at this head is byte-identical to the previously approved head.50911dd0..16b20059is 27 lines, no deletion of live content: one added# HISTORIA ...comment block recording that the #869 (tools/gits-sbx-emu-proof.sh) and #870 (kustomization.yaml+README.md, tools ConfigMap delivery pin) change sets are already in live and re-measured against the current tip, plus the twopass "T7[diff] ..."/pass "17[R159] (d) ..."message strings extended to name the pin. Filtering the delta for anything that is not a comment line or apass "string returns nothing. The 17[R159] / §25 case inventory and thecheck/case/t*_checkfunction inventory are identical betweenorigin/liveand this head.git diff origin/live..16b20059 --statis exactly the two PR files (tools/gits-sbx-android-install.sh,scripts/gits-sbx-epic-test.sh) — so the merged-inkustomization.yaml(+5610),README.md(+123), volume-floor rule/test files andinfra-alerts.yamlare live's bytes, unchanged, and no live line was dropped by the resolutions. No conflict markers anywhere in either file at this head.write_gradle_properties()writesorg.gradle.jvmargs=-Xmx3g -Dkotlin.daemon.options=autoshutdownIdleSeconds=300andorg.gradle.daemon.idletimeout=300000inside the heredoc;cmp/mvidempotence and both callers (installline 866,doctorline 953) intact.bash -nclean on both the installer (993 lines) and the harness (14037 lines).success(shellcheck, terraform-validate, yaml-lint, alert-receiver-test, cockpit-e2e, cockpit-test, dispatcher-test, helm-validate, receiver-test, record-sql-test, runner-manifest-test).Seat limits
Read-only review: I read the diff, ran
bash -n, did one read-onlykubectl execspot check, and read CI status. I did not edit, commit, push, or merge, and this verdict is for this head only — a new commit needs a fresh verdict.