Skip to content

Issue #24: add deterministic Hugging Face identity observation - #25

Draft
mark-e-deyoung wants to merge 1 commit into
impl/issue-12-provider-fixturesfrom
impl/issue-24-hf-observation
Draft

Issue #24: add deterministic Hugging Face identity observation#25
mark-e-deyoung wants to merge 1 commit into
impl/issue-12-provider-fixturesfrom
impl/issue-24-hf-observation

Conversation

@mark-e-deyoung

Copy link
Copy Markdown
Contributor

Purpose

Implement issue #24: the minimum deterministic Hugging Face identity gate required by the first desktop-ui-cv consumer, without waiting for the entire #9 observatory.

This is a stacked draft PR on top of #23 (impl/issue-12-provider-fixtures). Retarget after the prerequisite stack lands.

Included

  • schemas/model-observation-v1.schema.json
    • versioned minimal observation contract;
    • provider fixed to Hugging Face for this increment;
    • separate upstream locator/requested revision, resolved source revision, explicit identity strength, access state, declared license metadata, sorted file evidence, and evidence references.
  • tools/normalize_hf_observation.py
    • stdlib-only offline fixture -> normalized observation transformer;
    • requires a full 40-hex repository revision and emits identity_strength: repository_commit;
    • preserves per-file Git blob/LFS SHA-256 evidence but does not invent a whole-model content digest;
    • takes observed_at from captured provenance rather than wall clock;
    • canonical sorted JSON output;
    • strips machine-specific checkout prefixes from evidence references.
  • tests/test_hf_observation.py
    • exact current-main and corrected-weight revision assertions;
    • sorted file evidence and LFS hash retention;
    • declared-license evidence remains metadata, not a legal conclusion;
    • source-revision movement is not collapsed into payload/file movement;
    • machine-independent evidence refs and byte-deterministic canonical output.
  • .github/workflows/issue-24-hf-observation.yml
    • unprivileged public CI;
    • exact-SHA-pinned checkout/setup-python actions;
    • offline tests only;
    • invokes the CLI twice and cmps byte output;
    • verifies repository-relative evidence refs and repository_commit strength.

Deliberate boundary

This increment does not add Civitai/Ollama/OpenRouter normalization, drift persistence, append-only events, experiment binding, standards export, database/service infrastructure, acquisition, or model bytes.

The point is to prove that the already-captured HF evidence can produce the exact immutable binding needed by the first consumer using small deterministic machinery.

Critical identity rule

The underlying #12 fixture pair proves:

  • source revision moved from fe7563292bb52ab6c235fc3c87157e6a14017479 to a3c224bdd97ed6de15baef3524eb590c480e0d78;
  • model/config/tokenizer evidence remained unchanged;
  • README evidence changed.

The normalized observation therefore keeps source_revision and file evidence independent rather than treating repository movement as a payload-digest change.

Pre-commit verification

A local isolated prototype using the exact projected #12 fixtures passed 7 tests before staging. The committed CI adds the repository-relative evidence-ref check and exact-head repeatability proof.

Related: #9, #12, #18, #19, #23, #24; SemperSupra/desktop-ui-cv#17/#19.

Copy link
Copy Markdown
Contributor Author

Exact-head verification checkpoint

PR head c1694296eeed81a9f5cd11f5dadb13cb945ec976 is verified.

  • issue-24-hf-observation run 33476469836: PASS;
    • offline observation tests passed;
    • canonical CLI output repeatability/path-independence proof passed.
  • legacy Faster Whisper PoC validation run 33476469791: PASS; publication job did not run on the PR. The unrelated trigger coupling is separately contained by draft PR Contain legacy Faster Whisper PoC CI trigger #26.

This is sufficient evidence for the bounded #24 gate: the reviewed HF fixture can be transformed deterministically into an exact repository-commit-strength observation without network access or model bytes. It does not authorize broader #9 implementation or native acquisition before the first consumer local-handle contract is known.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant