Skip to content

MVP retained qualification resolution binding for deterministic repeat #37

Description

@mark-e-deyoung

Purpose

Implement the smallest retained-known-path mechanism required by Foundry #18's determinization ratchet and the frozen GO/NARROW/KILL gate.

We now have:

What is still missing is the deterministic retained association:

for this exact request and concrete target environment, this previously qualified subject is the known resolution.

Do not solve this with a database, catalog service, model recommender, or generalized planner.

Core design

After a successful qualification, retain a small resolution binding.

Stable resolution input:

  • canonical request_digest;
  • opaque target_profile_id;
  • exact semantic environment_digest.

Compute:

resolution_key = sha256(canonical {
  request_digest,
  target_profile_id,
  environment_digest
})

The binding points that stable known context to:

  • qualified subject_key;
  • qualification record_digest;
  • exact selected artifact observation digest/revision;
  • representation/variant/quantization;
  • runtime ID;
  • evidence/ref metadata as needed.

Wall clock, storage path, and evidence location must not affect resolution_key.

Retention authority

A binding may be created only from a qualified receipt whose:

  • subject request digest matches the request;
  • target profile/environment match the resolution context;
  • selected artifact/runtime/representation facts are copied from the qualified subject rather than supplied independently.

A rejected receipt cannot create a known-qualified resolution.

Deterministic lookup

Given the same canonical request + target profile + environment digest:

  • exact binding present and valid -> return a qualified model-plan result referencing the retained subject/record;
  • binding absent -> unknown with explicit no_retained_qualified_resolution reason;
  • malformed/tampered binding -> fail closed; do not silently fall through to unknown as if evidence never existed.

This is a retained fast path, not candidate generation.

Changed envelope behavior

Changing any one of:

  • request digest (including any material envelope constraint);
  • target profile ID;
  • environment digest;

must change resolution_key.

Therefore the old binding cannot be reused for the changed-envelope experiment. A separate existing binding for the changed key may produce a known qualified alternative; otherwise deterministic disposition is unknown.

Storage posture

For MVP, use ordinary files/directories:

<resolution-store>/<resolution_key>.json

No daemon, database, lock service, web API, global catalog, or cloud storage.

Use atomic file replacement for retention. Re-retaining the exact same binding is idempotent. Refuse conflicting content for an existing key unless an explicit future lifecycle/versioning policy is introduced.

The public repo contains only schemas/tools/fixtures. Real first-consumer bindings may remain private/local; public Foundry does not need to publish private target evidence.

Tests

Prove offline:

  • equivalent request/environment -> identical resolution key;
  • evidence ordering/time/ref changes do not affect key;
  • changed request -> different key;
  • changed environment -> different key;
  • changed target profile -> different key;
  • qualified receipt can create a binding;
  • rejected receipt cannot;
  • exact retained binding -> qualified result;
  • missing binding -> explicit unknown;
  • tampered/conflicting binding -> fail closed;
  • repeated identical retain is byte/idempotent;
  • no provider/network/model access.

Stack placement

Stack after reconciled qualification receipt PR #32 and before decision-gate PR #34.

After verification, ancestry-reconcile PR #34 onto this binding branch so the actual public critical path becomes:

PR #30 materialization -> PR #36 request/result -> PR #32 qualification receipt -> retained resolution binding -> PR #34 decision gate

Non-goals

  • no ranking among multiple new candidates;
  • no Generator–Validator implementation;
  • no provider/model discovery;
  • no global/shared database;
  • no automatic invalidation/expiry/requalification policy yet;
  • no fleet target inventory;
  • no private evidence publication;
  • no merge/release/deploy authorization.

R4

  • reproducible: canonical key/binding schemas;
  • repeatable: same request/environment resolves the same retained binding;
  • reversible: file-backed layer can be removed without changing model/runtime/provider state;
  • idempotent: identical retain produces identical bytes and does not create duplicate state.

Exit

Leave a verified public draft PR. Real proof remains downstream of first real qualification: retain one actual binding, rerun the equivalent request/environment and show a deterministic hit with no provider research or candidate generation, then change exactly one envelope/target fact and demonstrate a different key/known-alternative-or-unknown disposition.

Related: #18, #31, #33, #35; draft PRs #36/#32/#34; SemperSupra/desktop-ui-cv#40.

Activity

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