Skip to content

Guard the released loader protocol against in-place changes - #5

Merged
DmitrL-dev merged 2 commits into
mainfrom
fix/bootstrap-protocol-guard
Sep 28, 2026
Merged

DmitrL-dev merged 2 commits into
mainfrom
fix/bootstrap-protocol-guard

Conversation

@DmitrL-dev

Copy link
Copy Markdown
Owner

Summary

Every SoL Codex release shares PLUGIN_DATA/runtime-v1/bootstrap.py. sol_bootstrap.py publishes itself there and raises runtime collision or corruption when the existing bytes differ. So if a release edits the loader and regenerates the pinned hook commands, all existing pin tests still pass, but every installed task then fails the loader and all hooks degrade silently. The only thing preventing this today is the docstring "Keep this file byte-for-byte".

  • test_released_runtime_directory_keeps_its_bootstrap_bytes pins the loader digest for the released runtime-v1 directory. It also checks that the hook launcher references the same directory and digest, and its failure message explains the fix.
  • test_changed_loader_needs_a_new_runtime_directory changes the loader after a released loader has run:
    • under the same runtime-v1 directory, it reproduces the collision;
    • moved to runtime-v2, the new loader works.

Tests only; no runtime change.

Verification

  • python -m unittest discover -s plugins/sol-codex/scripts -p 'test_hook_commands.py': 13 OK.
  • On a scratch copy, I appended a comment to sol_bootstrap.py and regenerated hooks.json with scripts/generate_hook_commands.py. Every existing test still passed; only the new guard failed, with the digest mismatch.

🤖 Generated with Claude Code

Every release shares PLUGIN_DATA/runtime-v1/bootstrap.py, and the loader's
publish() raises when those bytes differ. A release that edits
sol_bootstrap.py and regenerates the pinned hook commands therefore passes the
existing pin tests, then fails every installed task with "runtime collision or
corruption" and disables all hooks.

Freeze the bootstrap digest for the released runtime directory, and show that
the same change loads once it moves to a new runtime directory.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@DmitrL-dev
DmitrL-dev force-pushed the fix/bootstrap-protocol-guard branch from e7638ee to cb2a739 Compare September 28, 2026 03:42
…l-guard

# Conflicts:
#	plugins/sol-codex/scripts/test_hook_commands.py
@DmitrL-dev
DmitrL-dev merged commit 7293037 into main Sep 28, 2026
24 checks passed
@DmitrL-dev
DmitrL-dev deleted the fix/bootstrap-protocol-guard branch September 28, 2026 06:31
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