Skip to content

tools: vdf_xray hidden-block rule keys off slot-alignment noise; xray and Rust disagree on result set #500

Closed

Description

@bpowers

Problem

tools/vdf_xray.py's build_owner_record_blocks marks an owner record block hidden (and therefore drops it from the visible-result set) using a rule that depends on slot-table layout noise rather than on a decoded format rule. This makes the extracted result count for the same model depend on incidental slot-table layout differences, and it puts xray out of sync with the Rust VdfFile::to_results_via_records path.

tools/vdf_xray.py:1867-1871:

block.hidden = (
    bool(block.slot_refs)
    and len(block.hidden_slot_refs) == len(block.slot_refs)
    and all(slot_ref_counts.get(slot_ref, 0) == 1 for slot_ref in block.slot_refs)
)

hidden_slot_refs is populated from preferred_slot_name_alignment(...).hidden_slots, the exploratory display-only slot-name alignment heuristic. docs/design/vdf.md itself warns that this alignment "must not be used as evidence for on-disk refs." Using it to drive a structural hide-set means the result count changes with slot-table layout noise.

Concrete evidence

econ/base.vdf and econ/rk.vdf are simulations of the same model (same OT count = 78), but produce different result counts:

  • base hides 0 internal-SMOOTH blocks -> 78 results.
  • rk hides 2 (#SMOOTH(interest...)#, #SMOOTH(realinflationrate,3)#) -> 76 results.

The two runs differ only in slot-table layout, not in the model. Either the hide-set should be empty for both or non-empty for both; today it is layout-dependent.

Why it matters

  • The intent (hiding internal SMOOTH/DELAY state stocks because they aren't user-facing series) is documented and deliberate (vdf.md signal drag selection and bulk move/edit #9 / moving clouds #10). The mechanism should not be.
  • The Rust VdfFile::to_results_via_records path (src/simlin-engine/src/vdf.rs) does NOT hide these series -- it only drops f[6] == 0 records -- so xray and Rust currently disagree on the result set. Either decision is defensible, but they should agree, and the result count must not be a function of slot-layout noise.
  • The user-facing framing is "a list or set of element names -> time series, where an element is either a scalar variable or specific array variable element". Today xray and Rust disagree on what counts as an element.

Affected fixtures

Hide-set is non-empty (xray drops blocks Rust keeps): econ/base, econ/rk, econ/mark2, econ/policy, econ/risk, econ/risk2, model_editing/run_9, model_editing/run_10.

This is independent of record-span-overlap (risk.vdf, run_9, run_10 exhibit the hide and are still exact-by-xray; mark2/policy/risk2/rk also have the lookup-descriptor overlap and are not-proven).

Components affected

  • tools/vdf_xray.py (build_owner_record_blocks, preferred_slot_name_alignment dependency)
  • src/simlin-engine/src/vdf.rs (VdfFile::to_results_via_records) -- whichever direction is chosen, the two need to agree.

Possible approaches

  • Replace the slot-alignment-derived hide-set with a hide-set derived from the decoded #-signature-name classifier. The names that motivate the hide (#SMOOTH(...)#, #alias>FUNC>LV1#, etc.) are already classified by output_signatures / new_style_alias_signatures. Keying off the decoded name pattern is structurally stable and removes the dependency on the display-only slot alignment.
  • Or, simply emit the #...#-signature helper series under their decoded names and let consumers wanting a "user-facing" symbol table strip them. This matches the Rust path and the user's framing of the result set.

Either way, the gating predicate should be a property of the decoded record/name, not of slot-table layout.

Context

Identified during VDF xray vs. Rust parity diagnosis. See tools/vdf_xray_notes/corpus_and_versions.md (B.2) for the full diagnosis and per-fixture numbers.

Activity

  1. added a commit that references this issue on May 9, 2026
    479569e
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions