Goal / Problem
The CALF/LegNav comparator added in #7357 assigns each paired trace to a fixed slot
(perfect_perception / sensor_limited) but never checks that the trace's own observed
observation contract matches the slot it was filed under.
robot_sf/benchmark/calf_legnav_comparator.py:
_observation_contract() derives condition from the trace's observed_observation.evidence_class
(ideal_state -> perfect_perception, perception_limited -> sensor_limited) and returns
status: "available" for either.
build_calf_legnav_comparator_report() then files perfect_trace under CONDITION_IDEAL and
sensor_trace under CONDITION_SENSOR without comparing the derived condition to the slot.
- The paired identity guard covers
candidate, scenario_id, seed — but not horizon.
robot_sf/benchmark/schemas/calf_legnav_comparator_config.v1.json allows noise/occlusion keys in
either condition, so a config edit can make both rows perception-limited.
Effect: a mislabelled or degenerate pair (for example both rows perception_limited) still reports
status: "available" at the top level. The mismatch is visible in the per-condition
observation_contract.condition field, but nothing fails closed. PR #7357's own body asserts "both
rows use the same candidate, scenario, seed, horizon, and config digest; only the observation
contract differs" — that invariant is currently asserted rather than enforced.
This is a fail-open in the exact property the PR is being domain-reviewed for. The committed smoke
config is correct today (verified: perfect_perception -> ideal_state / noise_profile: none;
sensor_limited -> perception_limited / bounded_gaussian); the gap is that an edit could break
the contrast silently.
Scope
Prepared implementation
A validated implementation is already pushed to branch
review/pr-7357-observation-binding-20260818, cherry-picked onto PR #7357's head
c680b6811b6b8d1b8f750ec9c1892c7d433d9901 (single commit 5949b7024).
It threads an expected_condition through _observation_contract() / _condition_report(), records
expected_condition and condition_binding (matched / unavailable / not_checked) plus a
reason in the report, sets the condition status to unavailable (and therefore the condition and
report status to blocked) on a mismatch, and adds horizon to identity_fields. The report schema
needs no change: condition.observation_contract is additionalProperties: true.
Validation on that branch:
pytest tests/benchmark/test_calf_legnav_comparator.py tests/dev/test_issue_7331_benchmark_namespace_inventory.py — 12 passed
(including three new tests: swapped contract fails closed, matched binding recorded, horizon mismatch rejected).
ruff check / ruff format --check on the changed files — passed.
- Live paired smoke on
configs/benchmarks/issue_7318_calf_legnav_comparator_smoke.yaml — still
status: available, both slots condition_binding: matched.
The work was parked rather than pushed to research/issue-7318-calf because the autonomous factory
pushed a base refresh to that branch minutes earlier and was mid-review; racing its exact-head verdict
was avoided deliberately.
Definition of Done
Validation / Testing
uv run pytest tests/benchmark/test_calf_legnav_comparator.py
uv run python scripts/benchmark/run_calf_legnav_comparator_issue_7318.py --config configs/benchmarks/issue_7318_calf_legnav_comparator_smoke.yaml --output-dir <tmp>
Project Metadata
- Priority: P4 — small, bounded, and it closes a fail-open in a diagnostic contract.
- Effort (h): 0.5 (implementation exists and is validated; needs review + landing).
Goal / Problem
The CALF/LegNav comparator added in #7357 assigns each paired trace to a fixed slot
(
perfect_perception/sensor_limited) but never checks that the trace's own observedobservation contract matches the slot it was filed under.
robot_sf/benchmark/calf_legnav_comparator.py:_observation_contract()derivesconditionfrom the trace'sobserved_observation.evidence_class(
ideal_state->perfect_perception,perception_limited->sensor_limited) and returnsstatus: "available"for either.build_calf_legnav_comparator_report()then filesperfect_traceunderCONDITION_IDEALandsensor_traceunderCONDITION_SENSORwithout comparing the derived condition to the slot.candidate,scenario_id,seed— but nothorizon.robot_sf/benchmark/schemas/calf_legnav_comparator_config.v1.jsonallows noise/occlusion keys ineither condition, so a config edit can make both rows perception-limited.
Effect: a mislabelled or degenerate pair (for example both rows
perception_limited) still reportsstatus: "available"at the top level. The mismatch is visible in the per-conditionobservation_contract.conditionfield, but nothing fails closed. PR #7357's own body asserts "bothrows use the same candidate, scenario, seed, horizon, and config digest; only the observation
contract differs" — that invariant is currently asserted rather than enforced.
This is a fail-open in the exact property the PR is being domain-reviewed for. The committed smoke
config is correct today (verified:
perfect_perception->ideal_state/noise_profile: none;sensor_limited->perception_limited/bounded_gaussian); the gap is that an edit could breakthe contrast silently.
Scope
add
horizonto the paired identity check; cover both with tests.follow-up in research: extend CALF/LegNav diagnostic to multi-seed sensor and embodiment study #7356.
Prepared implementation
A validated implementation is already pushed to branch
review/pr-7357-observation-binding-20260818, cherry-picked onto PR #7357's headc680b6811b6b8d1b8f750ec9c1892c7d433d9901(single commit5949b7024).It threads an
expected_conditionthrough_observation_contract()/_condition_report(), recordsexpected_conditionandcondition_binding(matched/unavailable/not_checked) plus areasonin the report, sets the conditionstatustounavailable(and therefore the condition andreport status to
blocked) on a mismatch, and addshorizontoidentity_fields. The report schemaneeds no change:
condition.observation_contractisadditionalProperties: true.Validation on that branch:
pytest tests/benchmark/test_calf_legnav_comparator.py tests/dev/test_issue_7331_benchmark_namespace_inventory.py— 12 passed(including three new tests: swapped contract fails closed, matched binding recorded, horizon mismatch rejected).
ruff check/ruff format --checkon the changed files — passed.configs/benchmarks/issue_7318_calf_legnav_comparator_smoke.yaml— stillstatus: available, both slotscondition_binding: matched.The work was parked rather than pushed to
research/issue-7318-calfbecause the autonomous factorypushed a base refresh to that branch minutes earlier and was mid-review; racing its exact-head verdict
was avoided deliberately.
Definition of Done
blocked, notavailable.horizonis rejected.availablereport with both slots matched.follow-up PR after feat(research): add CALF/LegNav comparator diagnostic #7357 merges.
Validation / Testing
uv run pytest tests/benchmark/test_calf_legnav_comparator.pyuv run python scripts/benchmark/run_calf_legnav_comparator_issue_7318.py --config configs/benchmarks/issue_7318_calf_legnav_comparator_smoke.yaml --output-dir <tmp>Project Metadata