Repository navigation
test(nixos/home): deflake laptop-repo-keeper and oc-password-sync suites (#17813) - #17831
Merged
Merged
Conversation
…tes (#17813) laptop-repo-keeper: the suite predicted the keeper's rebuild branch name by repeating the keeper's hostname lookup — two independent calls, only the keeper's with a fallback, so under load the suite expected rebuild/-<hash> for a branch pushed under another name. The suite now discovers the pushed branch from the bare origin (exactly one rebuild/* branch, at the local HEAD) and the dirty case asserts its HEAD is on no rebuild branch. oc-password-sync: a fixed 0.2s sleep raced the stand-in process's exec; before exec its /proc environ is the shell's, so the script intermittently read an empty current password and reported a running OpenChamber as not running. The suite now polls until the stand-in's environ actually presents OPENCODE_PASSWORD, failing loudly if it never does.
|
Important Review skippedBot user detected. To trigger a single review, invoke the
|
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.
Refs #17813 (deflake half; the exception-removal half follows the venue workflow's landing — see below)
Root causes (both test-side)
laptop-repo-keeper — the suite predicted the keeper's rebuild branch name by repeating the keeper's hostname lookup:
rebuild/$(hostname -s)-<short>. The keeper's lookup has a fallback (|| printf 'host'); the suite's did not, and the two calls are independent — when the suite's call failed under load, it expectedrebuild/-<hash>for a branch the keeper had pushed under another name, andgit rev-parseechoed the unresolved name back as the "got" value. Reproduced deterministically below.oc-password-sync — scenarios 4/5 spawned the stand-in OpenChamber and slept a fixed 0.2s before the script read
/proc/<pid>/environ. Before the stand-in's exec completes, its environ is still the shell's (noOPENCODE_PASSWORD), so under load the script intermittently read an empty current password and reported a running OpenChamber as "not running".Fix
rebuild/*branch may exist and it must point at the local HEAD; the second-run and log-line checks use the discovered name. The diverged-dirty case now asserts its HEAD is on norebuild/*branch./proc/<pid>/environis readable and actually presentsOPENCODE_PASSWORD=— the exact condition the script observes — and fail loudly if it never materialises.No production script changes: both keepers' contracts are unchanged.
Verification (all firsthand)
hostnamestubbed to always fail): at main, run 46533804268 reproduces the issue's exact signature —FAIL: diverged case: local commits pushed to the rebuild branch — expected [61bb4a6a…], got [rebuild/-61bb4a6]plus the missing-push-line and both second-run failures. At this branch's head, run 46533758082:all laptop-repo-keeper tests passed/RK_HOSTILE_HOSTNAME_PASS.Remainder for #17813
The registered exceptions for these two checks live in
.github/workflows/laptop-backups-flake-checks.yml, which lands with PR #17777 (#17774, lane 0900-GL — still open at this writing; coordination note posted there, comment 7294762182). Once #17777 is on main, the two exceptions naming #17813 get removed in a small follow-up and #17813 closes; the manifest exception (#17789) is separate and stays.Lane 0900-HA (xaltha, wave 0900).
{ "direct_parent": null, "links": [], "lineage": { "design": null, "roadmap_item": null, "priority": null }, "pm_meta": 1, "provenance": { "queue_id": null, "scheduled_start": null, "picked_up_at": null, "work_started_at": null, "created_at": "2026-11-30T23:15:18Z", "session_id": null, "lane": null, "host": "htch-runtime", "worktree": "/home/hatch", "model": null, "lane_start_issues": [], "workspace_ref": { "kind": "worktree", "id": "/home/hatch", "repo": "developing-today/code", "branch": "main", "sha": "1afb80aa405c56b71c8a63176670cb22ba449a92" }, "auth_subject": "xaltha", "stamped_by": "fleet 0.1.0 (native)" } }Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.