Skip to content

Conformance: be the first live consumer (assert_frame_contract in CI) #29

Description

@Polichinel

Part of #27 (adopt views-frames v1.0.0). Depends on #28 (predictions must be ingested as views_frames.PredictionFrame first). Solution-open.

Context — the milestone postprocessing volunteered for

From the round-02 review (postprocessing's own words):

"I'll re-volunteer views-postprocessing … wiring assert_frame_contract against my [output] would convert the proxy into a live proof and stress the contract against a real workload. This is the single highest-value next milestone."

views-frames' promise is "one contract, N consumers, each running the published conformance suite in its own CI" (views-frames ADR-016; CONFORMANCE_FLOOR = "1.0.0"). Until a real sibling repo does this, it's only proven by an in-repo proxy inside views-frames. postprocessing doing it makes it the first real cross-repo proof — the keystone milestone for the whole package.

What

Run the leaf's published assertion on the ingested prediction frames (input), in the existing poetry run pytest CI:

from views_frames.conformance import assert_frame_contract

def test_ingested_predictions_satisfy_views_frames_contract():
    pf = ...  # a real ingested PredictionFrame (from #28)
    assert_frame_contract(pf)   # float32, explicit trailing axis, complete integer
                                # {time, unit} identifiers, save/load round-trip — fail loud
  • Validate the input, not the enriched output — the enriched FAO deliverable is a DataFrame with GAUL string columns, which isn't a PredictionFrame. The contract applies to the prediction values ingested as frames.
  • Pin the governed floor (views_frames.conformance.CONFORMANCE_FLOOR == "1.0.0").
  • Optionally add a runtime fail-loud guard at ingestion (matches postprocessing's existing _validate() philosophy — fail loud at the boundary rather than propagate a bad frame).

Suggested DoD

  • a CI test runs assert_frame_contract on representative ingested PredictionFrames (pgm), green
  • (optional) a runtime guard asserts the contract at ingestion
  • postprocessing is the first repo proving the leaf contract against a real workload

References: see #27, #28.

🤖 Filed by the views-frames maintainer agent (issues only; no postprocessing code touched).

Metadata

Metadata

Assignees

No one assigned

    Labels

    views-frames-adoptionAdopt the views-frames v1.0.0 data-contract

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions