Skip to content

test: CLARIN consumer-contract suite + main-tailored differential CI - #23

Open
jr-rk wants to merge 1 commit into
dtqfrom
test/clarin-usage-coverage
Open

test: CLARIN consumer-contract suite + main-tailored differential CI#23
jr-rk wants to merge 1 commit into
dtqfrom
test/clarin-usage-coverage

Conversation

@jr-rk

@jr-rk jr-rk commented Aug 20, 2026

Copy link
Copy Markdown

Purpose

Testing infrastructure only. Adds CI + characterization tests tailor-made for
main's usage surface — how the three main-lineage consumers
(dspace-import-clarin, dspace-rest-test, dspace-item-importer) actually
call this library. No dspace_rest_client/ changes. Targets dtq and
proposes nothing for main.

Shared-surface fixes the tests would otherwise pin are split into a stacked PR
(fix/clarin-shared-surface-hardening) so this one stays scoped to test/CI.

What's here

  • CLARIN counterpart to test_repo_usage_contract.py: per-method and
    whole-chain characterization tests, only the HTTP transport mocked (the real
    client builds URLs and parses responses).
  • _helpers.py CLARIN builders, pytest.ini markers, requirements-test.txt.
  • .github/workflows/tests.yml: branch-aware triggers plus a
    differential-contract job that runs the shared CLARIN contract against
    both the dtq and the main implementation. The main leg checks
    origin/main's client into the CI runner to test against it — read-only,
    nothing is written back to main. A contract green on both is what a future
    merge would need to preserve.

Markers

  • clarin — shared contract, must hold on both main and dtq.
  • dtq_only — existing dtq-only surface/behaviour, deselected on the main leg.

Verified locally

  • Leg A (full suite, dtq impl): 123 pass.
  • Leg B (shared contract, main impl): 44 pass, 3 dtq_only deselected.

Add characterization tests that replay how the three main-lineage consumers
(dspace-import-clarin, dspace-rest-test, dspace-item-importer) actually call
this library, plus a branch-differential CI job that runs the shared CLARIN
contract against BOTH the dtq and main implementations. Only the HTTP
transport is mocked; the real client builds URLs and parses responses.

This PR is test + CI infrastructure only - no dspace_rest_client/ changes.
The shared-surface fixes and dtq behaviour deltas that the tests would
otherwise pin live in a separate, stacked PR, so this one stays scoped to
validating main's usage surface and proposes nothing for main.

Markers (pytest.ini):
  clarin    - shared contract, must hold on both main and dtq
  dtq_only  - existing dtq-only surface/behaviour, deselected on the main leg

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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