Conversation
This was referenced Sep 17, 2026
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.
Add
ods/tests/test_pixel_model_contract.pycoveringbin/pixel_model_contract.py, the pure contract layer behind the Pixel model coordinator. This module decides what the generation path advertises — the bound model id, context window, output budget, reasoning flag, and the compaction reserves derived from them — so its validation and projection semantics deserve direct pinning.Why this matters
projection()computeslimits(contextTokens, maxOutputTokens, pluginContext, compaction reserves) that downstream runtime checks and the runtime session overlay consume;plan()rewrites the managed OpenClaw config for a proposed target and self-verifies viaprojection(). The tests pin several subtle semantics that a regression could silently change:maxTokens→max_completion_tokens→max_tokens), but a declared-but-never-valid set raisesinvalid-model-limits.binding()requires exactly onepixelagent, a uniquely matching provider row, and the exact naming convention (ODS Local <id>/ODS Current (<model>)); amodelRouteFingerprintis legal only on theods-gatewayprovider.plan()drops conflicting output-token aliases, derivestoolResultMaxChars, lean bootstrap sizes and compaction reserves, and never mutates its input config.Behavioral invariant: invalid targets/routes fail with
invalid-model-contract/model-route-not-managed/invalid-model-limitsbefore any config rewrite, andplan()output re-projects to exactly the proposed contract.Overlap check
Searched open and closed PRs for
pixel_model_contract, "model contract", and "token limits". #5606 (open) fixes float-coercion insideprojection()'s limits resolver and addstest_pixel_model_contract_limits.py; it is a behavioral fix with limits-focused tests. This file deliberately does not pin float-parameter semantics (pending #5606's resolution) and covers the complementary surface:checksum/targetvalidation,binding()route rules, layer/alias resolution order, compaction bounds, andplan()rewrites.test_pixel_model_transition.pyexercises the coordinator's journal, not this module.Production/test paths:
ods/bin/pixel_model_contract.py(production callers:pixel_model_coordinator.py,host_install_lib.py),ods/tests/test_pixel_model_contract.py(new). Branched frompublic-betaat4fa6ad17059a2ff7df1dd92105b87ed84b801e70.Regression and validation
pytest tests/test_pixel_model_contract.py: 66 passed (Python 3.12, Linux/WSL).Compatibility and review
Test-only; nothing to roll back. Fails loudly if route binding, alias precedence, or plan-derived budgets drift.
Implementation and relevant local checks are complete, so this PR is Ready for review immediately. Independent review remains outstanding.