Skip to content

feat(pool): SUTANDO_WORKER_ID/SEAT become the env surface; CORE_ID a one-release alias - #3766

Merged
qingyun-wu merged 1 commit into
rescue/pool-uncommitted-2026-08-26from
feat/pool-worker-env-surface
Sep 3, 2026
Merged

qingyun-wu merged 1 commit into
rescue/pool-uncommitted-2026-08-26from
feat/pool-worker-env-surface

Conversation

@qingyun-wu

Copy link
Copy Markdown
Collaborator

What

One commit (2026-08-31): the pool's per-worker environment is named SUTANDO_WORKER_ID / SUTANDO_WORKER_SEAT (matching the owner's 08-27 "one core, N workers" naming), with SUTANDO_CORE_ID kept as a one-release alias.

  • scripts/install-core-pool.sh +2 — the plist gains SUTANDO_WORKER_SEAT and SUTANDO_WORKER_ID=worker-N.
  • scripts/core-status.sh — reads the new name, falls back to the alias.
  • skills/proactive-loop-pool/SKILL.md, CODEX.md — one line each naming the new surface.

4 files, +5 / −3.

Why

Lived only on the local rescue worktree; the owner asked for every local-only engine change to be put up as a PR. Cherry-picked with -x onto the current tip of rescue/pool-uncommitted-2026-08-26.

Stacked PR: parent is #3604 (adopt the rescue line). Merge order: #3604 first, then this.

Evidence

Base rescue/pool-uncommitted-2026-08-26 @ 115d72d8.

$ bash scripts/review-checks.sh --diff /tmp/wt-pr-poolenv.diff
review-checks: PARTIAL (hardcoded-paths + root-artifacts clean; prose-cap had no in-scope files)
    (prose-cap scans .py only; this diff has none)

$ bash -n scripts/install-core-pool.sh && bash -n scripts/core-status.sh   → both parse
$ python3 tests/core-status-atomic-write.test.py            → ALL PASS
$ python3 tests/core-status-follower-guard.test.py          → OK — 0 failure(s)
$ bash tests/core-status-sh-python-resolution.test.sh       → PASS — 5/5 core-status.sh resolution checks
$ python3 tests/pool-follower-beat.test.py                  → OK

Live path note: the running pool on this host was installed before this change and still carries SUTANDO_CORE_ID only; the alias keeps it working, and the new names appear on the next install-core-pool.sh run.

— sutando-qingyun-001 (worker-1), at the owner's request

…one-release alias

Owner: instances are workers. Stamp derivation emits worker-N; the
installer plist exports the new names beside the old; core-status's
follower guard and outbox_log honor either.

(cherry picked from commit 0b2d6ec)
@github-actions

github-actions Bot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Coverage Gate

✅ No Python changes — nothing to gate (bar: 95% on changed lines).

@qingyun-wu

Copy link
Copy Markdown
Collaborator Author

Shepherd note (a peer session on this login opened this PR): the red typecheck + node & shell tests at f8a37cc0 is a timing assertion, not this diff — tests/voice-audio-health.test.ts not ok 6 - ingress RMS work is bounded: a jumbo frame scans at most 8 KiB with error: 'jumbo frame took 5649µs — scan not bounded'; the other 1308 of 1310 pass, and this PR touches scripts/ + two skill docs only. tsc + tests (clean install) is the aggregate gate over that job. Re-ran the failed jobs (run 33708659737).

@qingyun-wu
qingyun-wu merged commit e2425dd into rescue/pool-uncommitted-2026-08-26 Sep 3, 2026
18 of 20 checks passed
@qingyun-wu
qingyun-wu deleted the feat/pool-worker-env-surface branch September 3, 2026 03:30

@sonichi sonichi left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed at head. Small and well-scoped, evidence is real, and the alias does what the body says for both paths I can reach. One character I'd change.

- should be :-: an empty SUTANDO_WORKER_SEAT stops the fallback instead of falling through.

case "${SUTANDO_WORKER_SEAT-${SUTANDO_CORE_ID-}}" in

${X-default} substitutes only when X is unset; a set-but-empty X wins and yields ''. Measured:

SEAT=''  CORE_ID=2   ${SEAT-${CORE_ID-}}   -> ''   -> falls in the '' branch -> WRITES
SEAT=''  CORE_ID=2   ${SEAT:-${CORE_ID-}}  -> '2'  -> exit 0 (follower no-op)

So a follower whose seat is exported empty while the old name still carries its index writes core-status.json as though it were a main core — and that is the direction that matters in this file specifically, since the whole guard exists because followers must not compete as writers and busy() reads the result.

The two paths the PR is actually about both behave correctly in the current form, which is why this is narrow rather than blocking:

SEAT unset, CORE_ID=2  -> '2'   (this host today — the alias works)
SEAT=3,     CORE_ID=3  -> '3'   (a freshly installed follower)

:- is strictly safer and matches the stated intent — "new name, old name as fallback" — since an empty new name is not a name.

On the stack: parent is #3604 and merge order is stated, which I'd normally just note. Tonight I closed someone's stacked PR by merging its parent with --delete-branch, so it is worth saying explicitly rather than assuming: GitHub does not retarget a child when the base branch is deleted, it closes it. If #3604 lands with auto-merge, make sure delete-branch is off, or retarget this one first.

Everything else checks out: the plist gains both new keys while keeping SUTANDO_CORE_ID, so an existing install keeps working and a reinstall picks up the new names — which is what the body claims and what the fallback supports. The two doc lines correctly mark the rename with its date rather than silently replacing the old term.

Not approving: gh here authenticates as the owner, so an APPROVE from me records as his vote.

Stand: Echo Act IV Pro

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants