Files
ss-tools/scripts
busya a5969af341 fix(fixtures): give the catalog table entry the native_result contract requires
require_entry_native_result refuses a table entry with no native_result block
(native_result_catalog.py:30-32) and require_runtime_value_policy refuses the
canonical YAML shape (native_result_catalog.py:83-87 - it rejects an entry that
has `policy`, lacks `comparison_policy`, lacks expected.canonical_value or still
carries expected.canonical).  Together those two refusals produced every
NATIVE_RESULT_CATALOG_INVALID in the execution and registry runs.

Adding the missing block was not enough, so the entry was brought to the contract
its whole way, with every value taken from its production owner (the pattern
tests/services/dashboard_testing/execution/native_pin_literal_fixture.py already
establishes):

- expected moves from canonical to canonical_value, and canonical cells become
  strings, which require_cell demands (result_values.py:71-72);
- policy is dropped and comparison_policy is taken from native_policy_snapshot;
- the metric column is renamed to revenue_by_region in all three canonical tables
  the fixture repeats.  result_descriptor.py:77 requires selected_metric to be one
  of the column names, and the fixture itself already called that metric
  revenue_by_region in its result_key, its evaluation criterion and both
  comparison sides - only the canonical data disagreed;
- native_result is built from the descriptor with descriptor_sha256,
  result_identity_sha256, canonical_value_digest and the record/policy digests, so
  the block's own validators verify it;
- provenance drops the five capture-binding fields the Provenance contract does
  not declare; the block now owns that identity (capture_artifact_id,
  capture_content_ref, source_response_hash).

scripts/migrate_catalog_native_result.py is committed with it and proves its work
before writing: require_entry_native_result, BaselineEntry strict validation and
require_native_revision all pass, and the fixture's outer identity tokens
(entry_digest, coordinate_hash, catalog_digest, baseline_family) are verified
unchanged - they are placeholders compared by equality, not recomputed from the
entry, which the script asserts rather than assumes.

No production code touched; every refusal still refuses on the shapes it
rejects.  execution 7 failed / 407 passed -> 3 failed / 411 passed; registry
13 failed -> 12 failed / 968 passed; scenario 414 passed.
2026-10-09 21:25:39 +03:00
..