Skip to content

feat(lane B): funded legs run their own worker image ([lane_b] pod_image) - #1041

Merged
tensorlink-dev merged 3 commits into
mainfrom
laneb-own-image
Dec 1, 2026
Merged

tensorlink-dev merged 3 commits into
mainfrom
laneb-own-image

Conversation

@tensorlink-dev

Copy link
Copy Markdown
Contributor

Owner decision 2026-12-01: "a code change so it uses a different image" — lane B funded legs run their OWN worker image, decoupled from lane A's seed-epoch pins.

Consensus analysis (done first)

No validator checks a lane B leg's image or contract digest.

  • ExpertEntry (cascade/shared/expert_manifest.py:70-74) records train_image_digest — "Recorded, never enforced"; the entry carries no training_contract_digest.
  • Validator lane B judging (cascade/validator/expert_lane.py:255-330 judge_entry) checks king pointer, leg length (check_leg_record against the throne contract from cascade/validator/lane_b.py:298-306 — the validator's own config, not the leg's image), targets, levers, scored_weights, selection, merge. No image or contract-digest field.
  • merge_identities (cascade/shared/lane_b.py:60-72) = (rebased_pointer, king_pointer, rows) — no image.
  • era_gate W-IMG / DEC-CA-0067 checks (cascade/validator/era_gate.py:103-140, _check_epoch_image 176-204) iterate TrainingManifest.entries (lane A settlement legs) only; lane B merges are checked at 320-350 by pointer/rows only.
  • No [lane_b] key feeds a consensus fingerprint; parse_lane_b reads with .get (no unknown-key refusal), so older validators/workers ignore the new keys.

But the pod forces the leg to DECLARE its image. The worker refuses a FINAL unless CASCADE_TRAIN_IMAGE_DIGEST (injected from the rented image, cascade/provision/core.py:507-510) equals the contract's train_image_digest (cascade/trainer/worker.py:333-346 → cascade/trainer/contract.py:114-155). So "keep the declared epoch image, change only the rented image" is impossible: the worker would refuse every leg. Therefore a lane B own-image leg declares the lane B image as its contract's runtime pin (train_image_digest, a DEC-CA-0067 runtime-only field — the numerics digest is unchanged), and the trainer pushes the pod a config that makes the worker derive the identical contract (receipt digest == expected). Lane A contracts, contract_digest, the W-IMG epoch image and all validator code are untouched.

Change

  • [lane_b] pod_image + worker_code_fingerprint (cascade/shared/config/lane_b.py, LaneBConfig): trainer-only, both-or-none, <repo>:<tag>@sha256:<64> + 64 hex; absent/"" = today byte for byte. Release-only (overlay refuses them, netconfig_bounds).
  • leg_pins: lane_b_leg_scope (set in _dispatch_funded only) → leg_round / leg_round_view return the lane B pins (rent image + codeprint gate); lane_b_leg_contract_image; render_lane_b_toml ([v2.training] train_image_digest, [round] pod/fingerprint, armed ops_continuation_image_digest, and the [v2] *_after trio when configured all → the lane B image; re-parse verified); dispatch hook checks code+runtime image against the lane B pins and pushes chain.deployed.laneb.toml; hook installed when the lane B image is set.
  • Never-the-wrong-image protections (retry cap, executor blame, worker-refusal handling) cover lane B own-image legs.
  • Qualification choice: the lane B image is checked by its own pin (digest ref + code fingerprint on every pod), never by the [v2] *_after qualification/override gate (DEC-CA-0067 bit-identity is a lane A king-vs-challenger rule; lane B checkpoints are judged by evaluation, and the entry records the image for audit).
  • Unchanged by design: lane B WB19 step-rate table stays keyed on the epoch image; [round] SKU-wall gate unchanged (unmeasured image ⇒ the same cap as today). Flip the keys only with no lane B leg in flight. Lane B operator-lane recovery only takes lanes on the lane B image.
  • chain.toml / chain.testnet.toml: documented, commented out (not set).

Tests

tests/unit/test_lane_b_pod_image.py (torch-free, 16): loader round trip + validation, overlay refusal, driver leg rents/code-checks/declares/records the lane B image while lane A/MarketCast keep theirs, empty keys = base, hook refusals, no after-qualification refusal, rendered config ⇒ worker contract digest == trainer's. 15/16 fail on base by assertion (the empty-keys test passes there by design). Also green: test_image_after_repin, test_marketcast_pod_image, test_lane_b_funded, test_worker_config_push, w_ov envelope, accept w_img / wb22 / wb27. Applies cleanly onto trainer-release-bench3 (98b273c).

🤖 Generated with Claude Code

https://claude.ai/code/session_01BMT4D7f8wd5dXsASyWUBwe

…age)

Owner 2026-12-01: "a code change so it uses a different image". New
trainer-only, release-only keys [lane_b] pod_image (digest-pinned ref) +
worker_code_fingerprint (64 hex), both or neither; absent/"" = today's
behaviour byte for byte.

Set, ONLY lane B funded legs (thread-scoped in _dispatch_funded) rent that
image, pass the pod code-fingerprint check / dispatch hook on its pins,
declare it as the leg contract's runtime pin (train_image_digest — the
pod's FINAL image check requires it; numerics digest unchanged) and get a
pushed chain.deployed.laneb.toml whose image pins all name it. Lane A,
king, lane C/MarketCast and bench legs keep their pins; lane A contracts,
contract_digest, W-IMG epoch image and validator code are untouched. No
validator checks a lane B leg's contract or image (expert entries record
train_image_digest, never enforce it). The lane B image is checked by its
own pin, never by the [v2] *_after qualification gate; overlays cannot set
the keys.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BMT4D7f8wd5dXsASyWUBwe
@vercel

vercel Bot commented Dec 1, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated
cascade Ignored Ignored Preview Dec 1, 2026 3:28am UTC

Request Review

@tensorlink-dev tensorlink-dev added the laned:W-IMG Lane D WP W-IMG (plan rev6.24 (e)): one worker image per seed epoch label Dec 1, 2026
tensorlink-dev and others added 2 commits December 1, 2026 03:12
…s trainer-rented sections

[lane_b] pod_image pods are rented by the trainer (no provisioner stage), and
checked against [lane_b] worker_code_fingerprint by leg_pins; the stage-gate
test now lists such sections with their trainer-side gate.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BMT4D7f8wd5dXsASyWUBwe
…0 docs test)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BMT4D7f8wd5dXsASyWUBwe
@tensorlink-dev
tensorlink-dev added this pull request to the merge queue Dec 1, 2026
Merged via the queue into main with commit 56e260b Dec 1, 2026
12 checks passed
tensorlink-dev added a commit that referenced this pull request Dec 1, 2026
…age) (#1041)

* feat(lane B): funded legs run their own worker image ([lane_b] pod_image)

Owner 2026-12-01: "a code change so it uses a different image". New
trainer-only, release-only keys [lane_b] pod_image (digest-pinned ref) +
worker_code_fingerprint (64 hex), both or neither; absent/"" = today's
behaviour byte for byte.

Set, ONLY lane B funded legs (thread-scoped in _dispatch_funded) rent that
image, pass the pod code-fingerprint check / dispatch hook on its pins,
declare it as the leg contract's runtime pin (train_image_digest — the
pod's FINAL image check requires it; numerics digest unchanged) and get a
pushed chain.deployed.laneb.toml whose image pins all name it. Lane A,
king, lane C/MarketCast and bench legs keep their pins; lane A contracts,
contract_digest, W-IMG epoch image and validator code are untouched. No
validator checks a lane B leg's contract or image (expert entries record
train_image_digest, never enforce it). The lane B image is checked by its
own pin, never by the [v2] *_after qualification gate; overlays cannot set
the keys.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BMT4D7f8wd5dXsASyWUBwe

* lane B own image: document the keys in MINER.md; stage-gate test knows trainer-rented sections

[lane_b] pod_image pods are rented by the trainer (no provisioner stage), and
checked against [lane_b] worker_code_fingerprint by leg_pins; the stage-gate
test now lists such sections with their trainer-side gate.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BMT4D7f8wd5dXsASyWUBwe

* MINER.md: lane B image keys with their defaults on one line each (WB20 docs test)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BMT4D7f8wd5dXsASyWUBwe

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
(cherry picked from commit 56e260b)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

laned:W-IMG Lane D WP W-IMG (plan rev6.24 (e)): one worker image per seed epoch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant