Skip to content

feat: blob loader, model versioning, and runtime hot-swap#5

Merged
tbitcs merged 1 commit into
mainfrom
orchestrator/blob-version
Jun 2, 2026
Merged

feat: blob loader, model versioning, and runtime hot-swap#5
tbitcs merged 1 commit into
mainfrom
orchestrator/blob-version

Conversation

@tbitcs

@tbitcs tbitcs commented Jun 2, 2026

Copy link
Copy Markdown
Contributor

Blob loader completion, model versioning, and runtime hot-swap

Changes

Recreated python/arbiter/emit_blob.py

  • Full ZRMB binary blob emitter with section table format
  • 84-byte header with CRC-32 integrity verification
  • 7 section types: FACTS, RULES, CONDITIONS, EXPRESSIONS, ACTIONS, STRINGS, MODES
  • Model version encoded in header flags field

Recreated lib/arbiter_blob.c

  • Complete blob loader parsing all section types
  • Header validation (magic, version, lengths, CRC-32)
  • No dynamic allocation - static storage arrays
  • Uses __restrict, likely()/unlikely() per project conventions

Model versioning

  • schema/arb.schema.json: optional version field
  • arbiter_model.h: uint8_t version[3] in struct ARBITER_model
  • ARBITER_check_version() API with major.minor comparison

Hot-swap API

  • ARBITER_hot_swap() preserves fact values across model swaps
  • Gated by CONFIG_ARBITER_HOT_SWAP Kconfig option

Testing

All 63 existing Python tests pass.


Conversation: https://app.warp.dev/conversation/dae33027-0cd9-4091-987b-7b2a5f402233
Run: https://oz.warp.dev/runs/019e88c4-f765-7b19-a9d1-ab9f29aecda3
This PR was generated with Oz.

- Recreate python/arbiter/emit_blob.py: full ZRMB blob emitter with
  section table, CRC-32, and version encoding in flags field
- Recreate lib/arbiter_blob.c: complete blob loader with header
  validation, CRC-32 verification, section table parsing, and
  ARBITER_model reconstruction (no dynamic allocation)
- Add model versioning: optional version field in schema, uint8_t
  version[3] in ARBITER_model, ARBITER_check_version() API
- Add hot-swap API: ARBITER_hot_swap() preserves fact values across
  model swaps, gated by CONFIG_ARBITER_HOT_SWAP Kconfig option
- All 63 existing Python tests pass

Co-Authored-By: Oz <oz-agent@warp.dev>
@tbitcs tbitcs merged commit 57502b4 into main Jun 2, 2026
1 of 6 checks passed
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