Skip to content

swm-macos-runner: deferred minor review findings from plan part 1 #294

Open

Description

@smartwatermelon-agent

Minor findings that the task and final reviews deferred while plan part 1 of the macOS Tart runner was built (dev-env#288). None was must-fix. Some may already be fixed by #289 to #293; check each one against main before working on it.

  • [Task 1] test label "key item override" not snake_case; key_item_default relies on earlier app_jwt call
  • [Task 2] "allowed" line goes to stdout (brief says stderr); no total-case-count assertion; no missing-head cases for workflow_run / pull_request_target
  • [Task 3] pf_fail defined inside if-block; empty-info branch repeats it
  • [Task 3] okseen probe covers only NOS ok file, not swm ok files
  • [Task 3] v6 warnings now log every 60 s (was 300 s) — check log rotation or log on state change
  • [Task 3] main-ruleset miss now exits before anchor loads, skipping rules-missing/cannot-load diagnostics for that run
  • [Task 4] set/rename reuse SWM_DELETE_LIMIT_S
  • [Task 4] ip --wait N inside bounded N races; give bounded a few s more
  • [Task 4] _swm_image_hash copies _nos_image_hash; add pointer comment
  • [Task 4] test gaps — run-before-ip order, leftover swm-build-tmp, first list failure, rename-failure deletes tmp
  • [Task 4] guest/ hash includes stray files like .DS_Store (same as NOS)
  • [Task 4] build-image.sh:81 comment 'run ... not bounded' now stale
  • [Task 5] readiness probe bounded at 60 s not time left; can overshoot 90 s
  • [Task 5] ip bounded at SWM_IP_LIMIT_S+10=190 vs constraint 180 (deliberate; document)
  • [Task 5] v4 and v6 failures share KIND pf dedupe
  • [Task 5] SIGTERM during build kill -9s build-image (skips EXIT trap; can orphan tart run swm-build-tmp); send TERM first
  • [Task 5] slot id= not validated ^[0-9]+$ before API path
  • [Task 5] teardown worst case ~300 s = Task 6 ExitTimeOut — carry to Task 6
  • [Task 5] SIGTERM trap kills own sleep with builtin kill, not KILL_BIN
  • [Task 5] SWM_RUN_LIMIT_S unused; comment in config.sh
  • [Task 5] guest job exiting 124 itself reads as SWM_JOB_MAX_S timeout (bounded uses 124)
  • [Task 5] timeouts never reset fails, so sparse start fails over days can reach 3 and alert (per ruling)
  • [Task 5] shellcheck clean only with --norc -x -P scripts/swm-macos-runner:scripts/nos-runner; plain run shows SC1091 + ~/.shellcheckrc SC2312
  • [Task 5] task-5-report.md Concerns item 4 stale (timeout counted as fail); Fix round 1 section supersedes
  • [Task 6] TART_HOME inherited from caller env via config.sh := default; renders into plist
  • [Task 6] test asserts SWM_IMAGE non-empty only, not equal to repo-side value
  • [Task 6] redundant /Volumes test check
  • [Task 6] image/*.sh glob skips future non-.sh files
  • [Task 6] job still loaded after 330 s → copies anyway, bootstrap fails
  • [Task 6] copy failure after bootout leaves runner unloaded until rerun
  • [Task 7] race between updater job= read and install.sh bootout (bounded by 300 s drain)
  • [Task 7] stale job=1 after supervisor death blocks updates until restart (restart clears SL_JOB)
  • [Task 7] update.sh calls cat/mkdir/date directly
  • [Task 7] updater plist change needs a hand install.sh run (documented)
  • [Task 7] running update.sh replaced in place relies on one-line main; exit 0 and install(1) new inode — unverified on macOS
  • [Task 7] hand install from non-clone checkout records wrong revision; updater reinstalls ~10 min later
  • [Final review] leftover update-pending with updater stopped → each pass waits 900 s (runbook line)
  • [Final review] knob regex accepts 0 → tight loop (use [1-9][0-9]*)
  • [Final review] repeated install.sh failure keeps update-pending → 900 s wait per pass, no alert
  • [Final review] "export SWM_" (2 spaces/tab) skipped silently, not refused
  • [Final review] runbook "SWM_JOB_MAX_S + 600 s" not a hard bound (failed pulls)

Advances #252

Activity

  1. smartwatermelon-agent commented on Nov 23, 2026

    @smartwatermelon-agent
    ContributorAuthor

    Part 1 follow-ups (#304, merged):

    Fixed: slot id validation (slot_load ignores and logs a non-numeric id=, test added); config.sh now documents that the IP bound (SWM_IP_LIMIT_S + 10 = 190) exceeds 180 on purpose; _swm_image_hash has an explicit pointer to _nos_image_hash.

    Already fixed on main: the stale "not bounded" comment in build-image.sh (no longer present).

    Deferred: TERM before KILL in abort_bounded (worst-case teardown is already about 300 s, equal to ExitTimeOut 300; +5 s does not fit); v6 warning rate (needs sudo for install-pf.sh); test-label naming; stdout vs stderr; the missing-head test cases; the pf_fail placement; the okseen probe; the delete-limit reuse; the ip --wait race; the readiness-probe overshoot; the shared pf dedupe.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions