Part of epic #105. Depends on S1.
Problem
The manager's inbound is legacy-only (LEGACY_FORECAST_FILTERS at unfao.py:121). The contract inbound — resolve the newest manifested run by contract type, wait for ALL configured targets (§4.2a), verify + assemble via track_a_source — does not exist. And track_a_source.frames_for_target discards headers, which the sink needs (provenance pass-through, §10.2 determinism).
Work
- Extend
unfao/track_a_source.py: frames_for_target returns (frame, headers) — smallest surface, one existing reader to update.
views_postprocessing/unfao/wire/source_selection.py: store passed as a port (any object with the get_latest_file_id/get_file_metadata/download surface — DIP, fake-able); selection filters pinned from pipeline-core's shipped publisher constants (type="sampled_forecast_manifest" etc., golden-string tested; re-verify their values at build); newest run wins; refuses loud when any configured product.TARGETS manifest is absent (await-all-targets); identity verified vs the launch declaration (reuse delivery/identity.assert_forecast_identity).
Acceptance criteria
- Dict-backed fake store serving the fixture Hop-A manifest +
.tap.zip: returns per-target (frame, headers); assembled frame equals the existing test_track_a_source result.
- Missing configured target → loud refusal naming the target.
- No real store/network anywhere in tests.
Tests: tests/test_wire_source_selection.py (+ test_track_a_source.py update). Oracle: fixture Hop-A artifacts via fake store.
🤖 Generated with Claude Code
Part of epic #105. Depends on S1.
Problem
The manager's inbound is legacy-only (
LEGACY_FORECAST_FILTERSatunfao.py:121). The contract inbound — resolve the newest manifested run by contracttype, wait for ALL configured targets (§4.2a), verify + assemble viatrack_a_source— does not exist. Andtrack_a_source.frames_for_targetdiscards headers, which the sink needs (provenance pass-through, §10.2 determinism).Work
unfao/track_a_source.py:frames_for_targetreturns (frame, headers) — smallest surface, one existing reader to update.views_postprocessing/unfao/wire/source_selection.py: store passed as a port (any object with theget_latest_file_id/get_file_metadata/downloadsurface — DIP, fake-able); selection filters pinned from pipeline-core's shipped publisher constants (type="sampled_forecast_manifest"etc., golden-string tested; re-verify their values at build); newest run wins; refuses loud when any configuredproduct.TARGETSmanifest is absent (await-all-targets); identity verified vs the launch declaration (reusedelivery/identity.assert_forecast_identity).Acceptance criteria
.tap.zip: returns per-target (frame, headers); assembled frame equals the existingtest_track_a_sourceresult.Tests:
tests/test_wire_source_selection.py(+test_track_a_source.pyupdate). Oracle: fixture Hop-A artifacts via fake store.🤖 Generated with Claude Code