engine_v2/ is the canonical production control plane for NiakVIO. Since the ARCHI2 cutover, it is no longer an isolated experiment: publication, provider catalog preservation, runtime repair planning, evidence and device-contract validation are coordinated around this architecture.
3 upstreams + published LKG
|
v
provider discovery / sibling selection
|
hubs / DNS / public address discovery / LKG
|
v
canonical ProviderSpec + staged provider bundles
|
v
NiakVIO Brain
classify cause -> choose bounded skill -> probe -> validate -> learn/defer
|
v
strict identity + media validation
|
v
Mobile / Desktop / TV evidence
|
v
canonical provider catalog -> general + VF manifests
|
v
atomic versions / integrity / LKG publication
no_streams, blocked, unavailable, provider_unreachable and runtime errors are observations, not terminal repair decisions. Quarantine remains reserved for positive safety/identity evidence.
The Brain is the repair orchestrator. It is intentionally separated from the validators: it may propose/create/adapt repair skills, but it cannot relax the rules that decide whether a result is safe and playable.
- classify the first causal gap rather than patching from a global status;
- prefer a healthy sibling when it already proves the canonical provider;
- reuse a learned skill when compatible;
- otherwise select a targeted built-in skill;
- allow validated production discoveries to become learned skills immediately;
- promote a skill to cross-provider auto-application only after repeated success and enough provider diversity;
- keep Quick bounded and give unresolved providers another chance on the next cron;
- LKG is a safe fallback after the repair budget, never a fake diagnosis or a blind upstream/default-provider shortcut.
The Brain must stop and emit deferred_retry when it detects a loop, exceeds its mutation/time/generated-code budget, or would need to rewrite its own core during production. A later cron can retry with new evidence.
The production Brain can evolve skills and provider-facing primitives. Core invariants (classification contract, validation boundary, budgets, fail-closed publication) are proposal-only from production so a difficult provider cannot teach the Brain to weaken its own tests.
A daily bounded Learning Lab runs separately from publication. It can explore failed patterns, compose candidate skills, propose primitive improvements and suggest core changes. Its outputs are artifacts and, when useful, a reviewable PR. It cannot publish manifests/providers or mutate production state.
The Learning Lab intentionally persists only generalized technical knowledge. Raw URLs/tokens/header values, private notes and source spreadsheet/prompt text are excluded from proposals.
The Brain distinguishes at least:
not_invokeddns_unreachabletransport_blockedsearch_gapidentity_mismatchdetail_gapepisode_gapplayer_gapmedia_extraction_gapplayback_context_gapmedia_validation_gapruntime_contract_driftunknown_failurehealthy
A provider that has no usable API can still be repaired through the HTML/player path: catalogue/search -> detail -> embed/player -> scripts/XHR/JSON -> final HLS/DASH/direct media, while preserving Referer/Origin/cookies when required.
Known hubs, redirects, Telegram public pages, direct candidates and historical LKG routes are tried first. If those routes fail, the bounded search fallback can discover a provider address source through a public search engine; a Telegram result is opened, the latest relevant message id is preferred, and the announced terminal is validated before it can update routing state.
The Native corpus Device Lab remains the real Mobile/Desktop/TV proof. A visual sub-lab renders its sanitized logs into JSON/HTML timelines so invocation -> provider result -> transport can be inspected quickly. Internal catalogue/detail/player stages are shown only when actually observed; the visualizer never invents missing hops or persists raw stream URLs/tokens/header values.
- Published LKG remains authoritative when a candidate is not demonstrably better.
- Upstreams are knowledge sources, not automatically trusted final bundles.
- Domain discovery precedes structural provider mutation.
- Broken providers are repair inputs; safety quarantine requires positive evidence.
- A healthy sibling is a useful canonical source, not an excuse to stack endless patches.
- Every accepted repair requires real playable evidence and no positive identity/duration contradiction.
- File extension alone is never final-media proof.
- Movie, TV and anime are first-class regression dimensions; Breaking Bad remains a mandatory TV fixture.
- Mobile/Desktop/TV contracts are separate evidence dimensions around one canonical request/result model.
- Versions/cache identifiers are finalized atomically with publication so changed provider bytes cannot keep stale Nuvio identifiers.