Skip to content

Implement Adapter Contract & Conformance Suite v0.1 — capabilities, provenance, failures, and receipts #10

Description

@hummbl-dev

Parents

Status

APPROVED EXECUTABLE FIRST SLICE — CLOSEABLE — CANDIDATE UNTIL REVIEWED AND MERGED

Mission

Implement the smallest complete adapter contract and deterministic conformance suite needed to govern the twelve-adapter reference wave.

Before choosing paths, languages, or dependencies, inspect and follow this repository's existing conventions. Reuse existing schemas and receipt patterns where compatible; do not create parallel abstractions merely for naming consistency.

Required implementation

1. Adapter contract

Specify the semantics of:

discover(query)
resolve(identifier_or_uri)
retrieve(record)
snapshot(record)
normalize(record)
verify(record)
cite(record)
refresh(record)
delete_or_invalidate(record)

For every operation, define:

  • inputs and outputs;
  • supported, unsupported, restricted, and authorization-gated states;
  • completeness posture;
  • retry, pagination, and rate-limit behavior;
  • provenance requirements;
  • deterministic failure representation.

2. Capability declaration

Create a machine-readable adapter manifest covering:

  • adapter and source-registry identity;
  • supported operations;
  • access mode;
  • public/private data-plane class;
  • authentication requirements;
  • snapshot versus external-reference behavior;
  • version and checksum support;
  • exact-locator support;
  • known limitations;
  • conformance status and receipt link.

3. Result and provenance envelope

Every result must preserve, where applicable:

  • canonical source URI;
  • stable source-specific identifier;
  • collection, item, and version identity;
  • retrieval timestamp;
  • publication/modification date;
  • content type;
  • checksum or explicit checksum-unavailable posture;
  • license and privacy posture reference;
  • exact source locator;
  • acquisition method;
  • transformation parent/child relationships;
  • completeness and partial-result state.

4. Error taxonomy

Model at least:

  • not found;
  • ambiguous identity;
  • unauthorized or permission denied;
  • rate limited;
  • partial pagination;
  • unsupported operation;
  • restricted content;
  • stale or superseded record;
  • checksum mismatch;
  • malformed upstream metadata;
  • source correction or deletion;
  • transient upstream failure;
  • policy-blocked operation.

5. Conformance suite

Create deterministic fixtures and tests for at least five structural patterns:

  1. scholarly metadata API;
  2. versioned code repository;
  3. archive or historical item;
  4. timestamped multimedia item;
  5. private or authorization-gated connector abstraction.

Tests must include positive, negative, and adversarial cases.

6. Receipt

Define and emit adapter_conformance_receipt.v0.1, aligned with execution-receipts, containing exact commands, fixture versions, results, failures, environment facts that are locally observed, and unresolved limitations.

Acceptance criteria

  • The contract distinguishes unsupported, restricted, unavailable, and failed operations.
  • Partial results cannot appear as complete success.
  • Source-specific semantics and exact locators survive normalization.
  • Public/private posture is mandatory and preserved.
  • The suite runs without live production credentials.
  • At least five reference adapter fixtures pass the positive path.
  • Negative fixtures fail for the intended reason.
  • Receipt output is deterministic and reviewable.
  • The implementation documents how real adapters bind to the contract without claiming that those adapters already exist.

Execution order

  1. inspect repository and cross-repo conventions;
  2. draft invariants and capability states;
  3. create adversarial fixtures;
  4. implement schema/validator and minimal harness;
  5. implement five structural reference fixtures;
  6. run conformance and claim-honesty review;
  7. open a governed draft PR with exact receipts.

Dependencies

Explicit non-goals

  • live credentials or production deployment;
  • provider-specific optimization;
  • bulk crawling;
  • hiding provider restrictions behind a uniform success response.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions