feat: resolve pixel-verify identity gate from deployment runtime config#179
Merged
Conversation
The pixel-compare identity tier's VERIFY branch was gated only by the module-default `PIXEL_VERIFY_ENABLED` (via `verify_pixel_identity`'s `enable_verify` argument). The engine now resolves that gate from the deployment's effective runtime posture instead of leaving it pinned to the module constant, with a SAFE DEFAULT (off = today's behavior). - Add `pixel_verify_enabled: bool = False` to `RuntimeSection` (deployment.yaml `runtime.pixel_verify_enabled`). - Thread it through `build_replayer` -> `Replayer(pixel_verify_enabled=...)` and the CLI/attended-service wiring, exactly as `durable` / `allow_model_grounding` are threaded. - The identity ladder's pixel tier now calls `verify_pixel_identity(..., enable_verify=self.pixel_verify_enabled)`. - Document the key in docs/deployment.example.yaml (off by default, evidence-gated; MISMATCH/ABSTAIN unaffected). MISMATCH and ABSTAIN are unchanged (they can only ever add a HALT), and every existing caller and the two tests that pin `PIXEL_VERIFY_ENABLED is False` keep passing. New tests cover the schema default, the load path, the gated VERIFY behavior, and that the resolved config reaches the Replayer. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NyCHrzA1psrKMFfroYbzaM
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.
What
The pixel-compare identity tier's VERIFY branch (identity ladder tier 2) is gated by
verify_pixel_identity(..., enable_verify=...), which defaults to the module constantPIXEL_VERIFY_ENABLED(False). The engine had no way to arm it from the deployment's effective runtime config — the gate was effectively pinned to the module default at every replay call site.This wires the gate to the resolved runtime posture, with a safe default (off = exactly today's behavior):
pixel_verify_enabled: bool = FalsetoRuntimeSection(deployment.yaml->runtime.pixel_verify_enabled).build_replayer(...)->Replayer(pixel_verify_enabled=...)and the CLI (_configured_replayer/_build_and_run_replayer/_replay_desktop) + attended-service wiring, the same waydurable/allow_model_groundingare already threaded.pixel_tiernow callsverify_pixel_identity(..., enable_verify=self.pixel_verify_enabled).docs/deployment.example.yaml(off by default, evidence-gated; MISMATCH/ABSTAIN unaffected).Safety / behavior
False, and the Replayer passes an explicitFalse, which matches the module default today. MISMATCH and ABSTAIN paths are untouched — they can only ever add a HALT, never grant a pass.verify_pixel_identity'senable_verifyparameter (added upstream in feat(identity): jitter-robust pixel identity VERIFY (config-gated, default off) #172) is unchanged; this PR only supplies it from config instead of leaving it at the module default.PIXEL_VERIFY_ENABLED is False(test_compile_identifier_crop.py,test_identity_ladder.py) still pass unchanged.Tests
New
tests/test_pixel_verify_config.py:RuntimeSection().pixel_verify_enabled is False(safe default).load_deploymentofruntime: {pixel_verify_enabled: true}-> True; absent -> False.Replayer.pixel_verify_enabled.python -m pytest tests/test_pixel_verify_config.py tests/test_identity_ladder.py tests/test_compile_identifier_crop.py tests/test_cli_deployment.py tests/test_attended_actions.py -q-> 94 passed.ruff checkclean on changed files;mypyclean on changed files (one pre-existing unrelated error inbenchmark/dom_arm.py, untouched here); claims validator passes.🤖 Generated with Claude Code
https://claude.ai/code/session_01NyCHrzA1psrKMFfroYbzaM