Skip to content

W5-C-fix: delete calibration shim, single payload shape, docs - #61

Merged
bnsd55 merged 1 commit into
mainfrom
w5c-fix
Sep 19, 2026
Merged

bnsd55 merged 1 commit into
mainfrom
w5c-fix

Conversation

@bnsd55

@bnsd55 bnsd55 commented Sep 19, 2026

Copy link
Copy Markdown
Owner

Follow-up to PR #51 (merged as bb86a3f). Main still carried the duck-typing shim, dict signatures, and pre-W5-C docs.

Changes

  • Shim deleted — is plain . The shim (type().name + hasattr surface) papered over module-reload isolation; fixed at the source: test_check_results no longer evicts jevmlx.calibrate (not an mlx dependency; evicting it while jevmlx.engine survives made isinstance stale across the suite).
  • Single payload shape — public signatures (api x4, openai_slots) take str | CalibrationBundle | None only; dict branches deleted. Engine internals take CalibrationBundle | None only. No file I/O in the engine.
  • ARCHITECTURE.md — v8→v9 (2 sites); rewritten set-constraints section covering the exact solver, no syntactic contradiction rules, count+set precedence + dropped_reason, calibration bundle shape + boundary contract, abstention Optional rule, decision_margin contract.
  • CHANGELOG — W5-C Unreleased entry.

Verification

grep -rn 'calibration: ' jevmlx/*.py   # public: str | CalibrationBundle | None; engine: CalibrationBundle | None
grep -c '__name__ == "CalibrationBundle"' jevmlx/engine.py   # 0

757 passed (random + no:randomly), .venv/bin/ruff check + format clean.

…ECTURE/CHANGELOG)

- _load_calibration: plain isinstance(calibration, CalibrationBundle); the
  duck-typing shim (type().__name__ + hasattr surface) is deleted. The
  module-reload isolation it papered over is fixed at the source:
  test_check_results no longer evicts jevmlx.calibrate (it is not an mlx
  dependency; evicting it while jevmlx.engine survives made isinstance stale)
- Public signatures (api x4, openai_slots) take str | CalibrationBundle |
  None ONLY; the dict-payload branches are deleted (a second shape is a dual
  path). Engine internals (run_parallel_generation, _assemble,
  run_parallel_generation_batched, _decide_multi_field) take
  CalibrationBundle | None. No file I/O in the engine.
- ARCHITECTURE.md: v8 -> v9 (2 sites); rewritten set-constraints section
  (exact solver, no syntactic contradiction rules, count+set precedence +
  dropped_reason, calibration bundle shape + boundary contract, abstention
  Optional rule, decision_margin contract)
- CHANGELOG: W5-C Unreleased entry
- 757 passed (random + no:randomly), .venv/bin/ruff check + format clean
@bnsd55
bnsd55 merged commit aadd7ba into main Sep 19, 2026
2 checks passed
@bnsd55
bnsd55 deleted the w5c-fix branch September 19, 2026 10:39
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