feat(registry): implement BDD test features and compliance test vectors #30

Open
opened 2026-06-05 17:34:42 +00:00 by CoreRasurae · 0 comments
Member

Metadata

Commit Message: feat(registry): add BDD test features and compliance test vectors
Branch: feature/m1-registry-bdd-tests

Background and context

The Package Registry Standard v1.0.0 (§14) defines 8 classes of compliance test vectors. Combined with the 97% coverage threshold (hard merge gate), comprehensive Behave BDD scenarios must cover all registry modules: PackageId parsing, reference resolution, canonicalization matrices, HTTP client mock testing, caching behavior, error mapping, and template integration.

Part of Epic: Package Registry Client — Support Package Registry Standard v1.0.0

Current behavior

No registry test scenarios exist.

Expected behavior

  • Complete Behave feature files covering all src/cleveractors/registry/ modules
  • Mock HTTP server for RegistryClient testing
  • Test vectors from §14 reproduced as Gherkin scenarios
  • Coverage ≥ 97% on all new modules
  • nox -s unit_tests passes with all-green

Acceptance criteria

  • All 8 compliance test vector classes covered
  • Mock server handles all 8 error types correctly
  • PackageId parsing: valid/invalid formats, boundary cases
  • Canonicalization: test vectors for each package type, deterministic SHA-1
  • Version resolution: concrete + all alias types
  • 97%+ coverage on new registry/ modules
  • nox all-green

Subtasks

  • Create features/registry_core_types.feature — PackageId parsing, PackageReference, round-trip
  • Create features/registry_canonicalization.feature — test vectors, NFC, key sorting, lifecycle stripping
  • Create features/registry_reference_resolver.feature — all reference formats, version matrices
  • Create features/registry_http_client.feature — mock server for all 4 endpoints, error mapping
  • Create features/registry_cache.feature — hit/miss, TTL, tamper detection, LRU
  • Create features/registry_exceptions.feature — construction, HTTP mapping, str repr
  • Create features/registry_template_integration.feature — registry ref in template, local fallback
  • Create mock HTTP server fixture in features/mocks/
  • Verify coverage >=97% via nox -s coverage_report
  • Run nox (all default sessions), fix any errors

Definition of Done

This issue is complete when:

  • All subtasks above are completed and checked off.
  • A Git commit is created where the first line matches the Commit Message in Metadata exactly.
  • The commit is pushed to the branch matching the Branch in Metadata exactly.
  • The commit is submitted as a PR to master, reviewed, and merged.
## Metadata Commit Message: feat(registry): add BDD test features and compliance test vectors Branch: feature/m1-registry-bdd-tests ## Background and context The Package Registry Standard v1.0.0 (§14) defines 8 classes of compliance test vectors. Combined with the 97% coverage threshold (hard merge gate), comprehensive Behave BDD scenarios must cover all registry modules: PackageId parsing, reference resolution, canonicalization matrices, HTTP client mock testing, caching behavior, error mapping, and template integration. Part of Epic: Package Registry Client — Support Package Registry Standard v1.0.0 ## Current behavior No registry test scenarios exist. ## Expected behavior - Complete Behave feature files covering all `src/cleveractors/registry/` modules - Mock HTTP server for `RegistryClient` testing - Test vectors from §14 reproduced as Gherkin scenarios - Coverage ≥ 97% on all new modules - `nox -s unit_tests` passes with all-green ## Acceptance criteria - All 8 compliance test vector classes covered - Mock server handles all 8 error types correctly - PackageId parsing: valid/invalid formats, boundary cases - Canonicalization: test vectors for each package type, deterministic SHA-1 - Version resolution: concrete + all alias types - 97%+ coverage on new `registry/` modules - `nox` all-green ## Subtasks - [ ] Create `features/registry_core_types.feature` — PackageId parsing, PackageReference, round-trip - [ ] Create `features/registry_canonicalization.feature` — test vectors, NFC, key sorting, lifecycle stripping - [ ] Create `features/registry_reference_resolver.feature` — all reference formats, version matrices - [ ] Create `features/registry_http_client.feature` — mock server for all 4 endpoints, error mapping - [ ] Create `features/registry_cache.feature` — hit/miss, TTL, tamper detection, LRU - [ ] Create `features/registry_exceptions.feature` — construction, HTTP mapping, str repr - [ ] Create `features/registry_template_integration.feature` — registry ref in template, local fallback - [ ] Create mock HTTP server fixture in `features/mocks/` - [ ] Verify coverage >=97% via nox -s coverage_report - [ ] Run nox (all default sessions), fix any errors ## Definition of Done This issue is complete when: - All subtasks above are completed and checked off. - A Git commit is created where the first line matches the Commit Message in Metadata exactly. - The commit is pushed to the branch matching the Branch in Metadata exactly. - The commit is submitted as a PR to master, reviewed, and merged.
CoreRasurae added this to the v2.1.0 milestone 2026-06-05 17:34:42 +00:00
CoreRasurae changed title from BDD features and test vectors — canonicalization, parsing, mock registry to feat(registry): implement BDD test features and compliance test vectors 2026-06-05 17:48:12 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
cleveragents/cleveractors-core#30
No description provided.