Repository navigation
Keep the token-profile example's lock pin in step with the runtime lock - #167
Merged
ProfSynapse merged 2 commits intoOct 2, 2026
Merged
Conversation
The qwen35_4b_token_profile.yaml example pins expected_lock_sha256 to the digest of modal-runtime-v1.lock.json, so every reviewed lock refresh left the example stale and broke its test until someone recomputed the hash by hand. regenerate_modal_runtime_lock.py now treats that one line as part of the refresh. Check mode names every stale file (lock and/or example) and exits 3; --write replaces the lock first, then the example, atomically and with the same identity rechecks, and prints the changed paths. Only the expected_lock_sha256 value is rewritten; an example whose pin line is missing, duplicated or malformed fails closed before anything is written. The profiler is unchanged, so real configs still pin a literal digest and are still refused on mismatch. Tests run the tool against temp copies: lock refresh moves the example pin, a stale example alone is repaired without touching the lock, malformed examples abort the whole refresh, and the profiler accepts the refreshed pair while rejecting the old pin. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013etFNjLuo22CCoQmUGYqCT
Update the Modal and tokenizer-profiling references, AGENTS.md and the CI step name, and re-sync the generated skill mirrors. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013etFNjLuo22CCoQmUGYqCT
ProfSynapse
changed the base branch from
claude/ci-and-test-repair
to
feat/submodule-cloud-api-v1
October 2, 2026 23:29
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Stacked on #166.
.skills/fine-tuning/configs/qwen35_4b_token_profile.yamlpinsexpected_lock_sha256to the sha256 ofmodal-runtime-v1.lock.json. Every legitimate lock refresh left that pin stale, andtest_profile_tokenizer_lengthsthen failed until someone recomputed the hash by hand. This happened twice in one day.scripts/regenerate_modal_runtime_lock.pynow maintains that pin itself:--write: refreshes the lock, then rewrites only the example'sexpected_lock_sha256line. Both files are written atomically. If the run is interrupted between the two, a rerun finishes the job.EXAMPLE_PIN_INVALID, before anything is written.The profiler's guarantee is unchanged.
profile_tokenizer_lengths.pyis untouched, real configs still carry a literal digest, and a mismatch still raisesRUNTIME_LOCK_DIGEST_MISMATCH. I rejected the alternative of a "use the current lock" value for this reason: any real run could use it and skip the pin.Docs: AGENTS.md and the fine-tuning skill references now say the tool keeps the pin in step, and that
sync_skill_trees.pyshould be run after--write. The only workflow change is renaming the conformance check step.This script isn't part of any lock inventory, and no
--writewas run against the real repo.Test plan
ruff check .is clean.tests/scripts+tests/contract: 1083 passed, 4 failed. All 4 are the launcher-lock tests, which also fail on the base in this sandbox and pass on GitHub runners (see Add CI, lint and pre-commit, and repair the full test suite #166).🤖 Generated with Claude Code
https://claude.ai/code/session_013etFNjLuo22CCoQmUGYqCT
Generated by Claude Code