Skip to content

feat: python -m shard.stage + P0-#2 portability fixes#104

Merged
leyten merged 2 commits into
masterfrom
feat/shard-stage-cli
Jul 15, 2026
Merged

feat: python -m shard.stage + P0-#2 portability fixes#104
leyten merged 2 commits into
masterfrom
feat/shard-stage-cli

Conversation

@leyten

@leyten leyten commented Jul 15, 2026

Copy link
Copy Markdown
Owner

First engine seam of Leg 7 (NODE_DAEMON.md §4 / §8-2), plus the two portability landmines that broke the first residential join (LAUNCH.md P0-#2):

  • python -m shard.stage — the operator SSH launch string promoted into the CLI the node daemon execs: assignment as flags, engine env derived in-process, machine-readable stdout contract (SHARD_STAGE_OK / SHARD_STAGE_READY / SHARD_STAGE_FATAL + nonzero exit), --check preflight. Secrets stay env-only.
  • node_kv flat import transport → falls back to shard.transport (no hand-set PYTHONPATH off the flat vast layout).
  • /root/.hf_token hardcode → env HF_TOKEN~/.hf_token → huggingface_hub login chain.
  • Receipt node-key default is now ~-relative (identical on root boxes).

Tests: clean-env no-PYTHONPATH subprocess gate, stdout-contract pins, a frame through the real serve() loop on CPU, token-resolution order. Full suite 554 passed / 1 skipped.

leyten added 2 commits July 15, 2026 09:21
Both broke the first residential join (LAUNCH.md P0-#2):
- node_kv's flat `import transport` (the pushed-flat box layout) now falls
  back to shard.transport, so a repo checkout needs no hand-set PYTHONPATH.
- m25_pull_range read /root/.hf_token unconditionally and died on any
  non-vast box: now env HF_TOKEN wins, else ~/.hf_token, else huggingface_hub's
  own login chain (public/cached repos need none).

Pinned by tests/test_shard_stage.py (lands with the shard.stage entrypoint):
the clean-env no-PYTHONPATH subprocess gate + the token-resolution unit.
…emon

Promotes the operator SSH launch string (m25_scatter_pipe.stage_cmd) into
the CLI the Leg-7 node daemon execs (c0mpute NODE_DAEMON.md §4): the ring
assignment arrives as flags, the engine env is derived in-process, and the
stage speaks a machine-readable stdout contract a supervisor can wait on
(SHARD_STAGE_OK preflight / SHARD_STAGE_READY from serve() / SHARD_STAGE_FATAL
+ nonzero exit). Secrets stay env-only, never argv. --check gives the daemon
a no-network preflight (engine import + model-dir sanity). Also: the receipt
node-key default is ~-relative (identical on root boxes, works elsewhere).

tests/test_shard_stage.py: clean-env subprocess --check (PYTHONPATH stripped —
the P0-#2 regression gate), FATAL contract on bad dir/missing assignment, the
READY line + a frame flowing through the real serve() loop on CPU, HF-token
resolution order. Full suite 554 passed / 1 skipped.
@leyten
leyten merged commit 6826b60 into master Jul 15, 2026
2 checks passed
@leyten
leyten deleted the feat/shard-stage-cli branch July 15, 2026 09:27
leyten added a commit that referenced this pull request Jul 15, 2026
shard #103/#104 + c0mpute #27/#28 landed: shard.stage CLI (ready/fatal
contract), both P0-#2 landmines dead, auto-update removed (leyten call),
the --mode shard daemon skeleton merged. Next-ranked: forward-leg peer
addressing (the blocker), runtime artifact, challenge sketch, warm re-join.
leyten added a commit that referenced this pull request Jul 22, 2026
shard #103/#104 + c0mpute #27/#28 landed: shard.stage CLI (ready/fatal
contract), both P0-#2 landmines dead, auto-update removed (leyten call),
the --mode shard daemon skeleton merged. Next-ranked: forward-leg peer
addressing (the blocker), runtime artifact, challenge sketch, warm re-join.
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.

1 participant