Skip to content

rl-identity-tiering: semantic hash, run code pack, island contract v3 - #264

Draft
michaellchung wants to merge 11 commits into
s24-pr2-offpolicyfrom
s24-pr4-identity
Draft

michaellchung wants to merge 11 commits into
s24-pr2-offpolicyfrom
s24-pr4-identity

Conversation

@michaellchung

Copy link
Copy Markdown
Contributor

Stacked on PR-2 (lands before PR-3, because PR-3's phase 2 commits use the run flags and contract v3). Implements openspec change rl-identity-tiering (spec as the last commit).

  • L9.1/L9.2: dual write semantic_sha256 and code_pack_digest; plugin hash mismatch is a warning (tolerant PluginRef).
  • L9.3–L9.6: the launcher builds and uses the run code pack (yeto/codepack.py, yeto/launch/code_pack.py); the Modal Volume is created when the pack is stored.
  • L9.7: island contract v3 binds the semantic hash and the code pack digest (yeto-rl-island-contract-v3).
  • L9.8–L9.10: run flags, backend identity, release image (docker/yeto-release/, scripts/build_yeto_release_image.sh); golden samples no longer carry code hashes.
  • --rl-code-pack defaults to auto (packs runs with a URI checkpoint store).
  • hash-migration.md: phase 2 version boundary entry (L6b + contract v3 + golden without code hashes).

🤖 Generated with Claude Code

chowhsu and others added 11 commits October 15, 2026 15:44
…ginRef

- AlgorithmSpec.semantic_sha256(): v2 spec with plugin refs reduced to path.
- Run manifest and rl_driver_start dual-write semantic_sha256 and
  code_pack_digest (transition: attested source tree hash, mode source-tree).
- PluginRef.sha256 is optional; a stale hash is a warning event
  (rl_plugin_source_mismatch), no longer a reject (also grpo_knobs).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
(cherry picked from commit 17b98c3)
…ode)

Deterministic tar of commit + dirty tree (untracked included), sha256
digest, pluggable pack stores, checked unpack, run-level resolve that
reuses the manifest pack, and the explicit upgrade rule (L9.6).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
(cherry picked from commit 98d88d1)
--rl-code-pack git-patch makes the pack at the first start, stores it in
the checkpoint store and records it in the run manifest (code_pack_mode
git-patch). Later starts of the run take the manifest pack; its unpacked
tree is the sky workdir and the Modal add_local_dir. Islands get
--code-pack-digest and refuse to start when the tree differs.
--rl-code-pack-upgrade REASON switches packs only with an unchanged
semantic hash and records old -> new in the manifest.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
(cherry picked from commit 50cb213)
The launcher stores the run code pack before the island creates the
checkpoint volume, so a first launch with --rl-code-pack git-patch on a
new modal-volume:// store failed with NotFoundError (found on GPU, L6.10).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
(cherry picked from commit 06d617b)
rl-identity-tiering D3/D6. The island contract (HELLO session contract
and elastic JOIN identity) now binds AlgorithmSpec.semantic_sha256() and
the run code pack digest (else the attested source tree hash) under the
domain yeto-rl-island-contract-v3. The Rust syncer admits only identical
contracts, so it refuses a JOIN with another code pack and a JOIN from a
v2 island; the frames are unchanged. With a run code pack the island's
pack digest check replaces the source tree check. Full-parameter and SAO
sync contracts keep the spec hash.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
(cherry picked from commit 1fef97c9530aa3ca9501d7244929619482c1d273)
rl-identity-tiering migration step 4 with the rule in SESSION24 GOAL §6:
a new cut records the canonical spec and its semantic hash; verify_cut
recomputes the hash from the recorded spec and compares it with the run,
so a plugin source change alone does not refuse a resume. A cut written
before the change holds hashes only and keeps the whole-identity rule;
its manifest bytes are unchanged. The E2 GPU harness negative cases now
change the semantic hash and the runtime attrs hash.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
(cherry picked from commit 777593e8842a4c75e551a967b5ac08367ff6e36b)
rl-identity-tiering D5. The golden generator no longer records plugin
source hashes, ports_runtime_fingerprint or the engine commit, masks the
code-derived hashes in runtime_attrs, and records the semantic hash. The
seq_adv_maxrl sample references its plugins by path only. Golden samples
are regenerated once for the L6b / L9.7 version boundary, with one final
hash-migration.md entry; a plugin-only change now needs no re-record.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
(cherry picked from commit 4702dfbeecead7f38b80875c0cf2bfe899e088cc)
rl-identity-tiering L9.12, preparation only: scripts/build_yeto_release_image.sh
appends one layer (git archive of a clean commit at /opt/yeto/src plus a
release manifest) to the pinned miles-ports image with crane, and writes a
build record. The layer bytes depend only on the commit. Nothing is built or
pushed; docker/yeto-release/README.md lists the launcher release mode that is
still to implement.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
(cherry picked from commit de96d63c57e8c1d35b00ba9d4a211a89e6c16cb3)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
(cherry picked from commit 1087a000c7317d448cd3b57fd8374f6f4323f9d6)
auto (the new default) resolves to git-patch when --rl-checkpoint-store
is a scheme:// URI (bucket, modal-volume://), where the launcher can
store the pack, and to off otherwise: a path store is often visible on
the islands only. off and git-patch keep their meaning.

Checked on a real sky island: Nebius eu-north1 1xH100, s3:// store,
Qwen3-0.6B LoRA, 3 rounds (s24-tsky-cp-20261015d, rc=0). The launcher
stored code_packs/<digest>.tar in the bucket, sky shipped the unpacked
tree as the workdir, the island reported code_pack_mode git-patch with
that digest, and three cuts landed in the store.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
(cherry picked from commit 675a8386c9b7d4b63dc16b66c2a4f770e3706314)
Spec for openspec change rl-identity-tiering, taken from s24-sampler-spec 7bd416e2 (PR #258).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.

2 participants