IDKMesh

AVE-core Shadow Adapter

Status: stacked research adapter for N2/N3 dry-run evidence
Date: 2026-09-22
Depends on: Adaptive Policy Shadow Contract (PR #637 / issue #636)
Related research: AVE (PR #622 / issue #621), E025 learned verifier reliability

Purpose

The AVE-core shadow adapter is the first concrete consumer of the common adaptive-policy shadow contract.

It answers only:

Given one canonical WorkUnit, its already-owned EvaluatorPlan, and a point-in-time verifier observation pool, which verifier portfolio would AVE-core recommend in shadow mode?

It does not:

Inputs

WorkUnit v0.2

The adapter reuses:

Existing EvaluatorPlan

The adapter treats the current EvaluatorPlan as the named baseline.

It verifies:

The baseline remains visible even when AVE would not choose the same verifier.

That is necessary for a fair N3 comparison.

Verifier Observation Pool v0.1

Schema:

schemas/verifier-observation-pool-v0.1.schema.json

Each candidate includes:

The pool is point-in-time evidence, not a durable reputation ledger.

E025 constraint: no global verifier reputation

E025 showed an important failure mode:

Therefore AVE-core gives positive reliability weight only when all are true:

basis == live_outcomes
domain == current task domain
shift_warning == false
sample_count > 0
observed_at is not future-dated
age(observed_at, captured_at) <= reliability_max_age_days

Otherwise reliability is neutral:

mean_reliability = 0.5
positive_live_samples = 0

This includes:

Probe rule

Known-bad probes have asymmetric meaning.

Passing probes

Passing probes does not create positive verifier trust.

A verifier with:

99 / 99 known-bad probes handled correctly
0 live outcomes in the current domain

does not outrank a verifier merely because of those probe passes.

Breaching a known-bad probe

A known-bad breach is a strong diagnostic signal.

For AVE-core v0.1:

known_bad_probe_breaches > 0
 -> verifier remains visible in the frozen observation state
 -> current EvaluatorPlan baseline can still be named
 -> verifier is excluded from AVE shadow portfolio selection

This is intentionally asymmetric and should be revisited only with real representativeness evidence.

Hard gates

AVE never compensates for a failed hard gate.

The adapter records:

Any failure forces:

selected_choice_id = null

The plan still records the baseline and failure reasons for audit.

Risk-adaptive target

The shadow target is:

target =
  max(
    WorkUnit.minimum_independent_verifiers,
    risk floor
  )

risk floor:
  low      -> 1
  medium   -> 2
  high     -> 3
  critical -> 3

AVE-core v0.1 requires the recommended target-sized portfolio to use distinct declared verifier families.

This is not a claim that different family labels prove independence.

It is a research heuristic motivated by correlated-failure evidence. The shadow plan explicitly states that family labels are not statistical proof.

If the requested family-diverse portfolio is unavailable, AVE abstains rather than reducing the target.

Validator coverage

Portfolio validator coverage is computed as the union across selected verifiers.

A portfolio is viable only when it covers every validator that is required by:

AVE does not remove or downgrade required checks.

Lexicographic selection

Among viable portfolios, v0.1 uses an explicit lexicographic order:

  1. more distinct verifier families;
  2. fewer shared-model/shared-runtime correlation signals;
  3. more verifiers with fresh same-domain live-outcome evidence;
  4. more live-outcome samples;
  5. higher posterior mean reliability;
  6. fewer review units;
  7. lower queue load;
  8. deterministic verifier IDs.

There is intentionally no opaque global “trust score.”

Replay normalization

The verifier pool is canonicalized before shadow-plan hashing:

Equivalent pool orderings therefore produce the same shadow plan.

N3 evidence workflow

A real N3 capture should occur before verification outcome:

WorkUnit + EvaluatorPlan + current verifier pool
 -> AVE shadow adapter
 -> freeze adaptive-policy-plan
 -> real verification continues unchanged
 -> observed VerificationResult/outcome
 -> adaptive-policy outcome join
 -> cohort evaluator

The real EvaluatorPlan remains unchanged throughout the cohort.

Historical fixtures are compatibility tests, not N3 evidence

Existing repository records such as:

results/verification/node-e2e-replay-2026-08-30/

are useful to test canonical WorkUnit/EvaluatorPlan compatibility.

They cannot become N3 evidence by replaying AVE today because their verification outcomes are already known.

That would violate the anti-hindsight rule.

Promotion gate

This adapter should remain shadow-only until a real pre-outcome cohort shows:

N3 observational data remains descriptive and does not establish the causal effect of an unexecuted AVE portfolio.

CLI capture

Use tools/ave_shadow_adapter_cli.py to freeze a pre-outcome AVE plan:

python tools/ave_shadow_adapter_cli.py \
  --repository MSKazemi/idkmesh \
  --work-unit path/to/work-unit.json \
  --evaluator-plan path/to/evaluator-plan.json \
  --verifier-pool path/to/verifier-observation-pool.json \
  --maturity N3 \
  --input-ref work-unit:real-id \
  --output evidence/adaptive/plans/ave-real-id.json

The CLI refuses to overwrite an existing frozen plan. It writes evidence only; it does not execute or dispatch the recommended portfolio.

An illustrative pool shape is available at examples/verifier-observation-pool.example.json. It is synthetic and must not be cited as real verifier performance evidence.