feat(registry): implement reference resolution — parse refs, version aliases, local scheme #26

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

Metadata

Commit Message: feat(registry): implement ReferenceResolver with version alias resolution
Branch: feature/m1-registry-reference-resolver

Background and context

The Package Registry Standard v1.0.0 (§5.3, §4.2) defines three reference formats and a version resolution scheme with both immutable concrete versions and mutable aliases (latest, vx, vX.Y.x, vX.x). All three reserved schemes (ID:, registry:, local:) must be supported.

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

Current behavior

No reference parsing or version resolution exists. Templates use only simple name strings.

Expected behavior

  • ReferenceResolver.parse(ref_str: str) -> PackageReference handles all three schemes
  • registry.example.com:acme/search@v1.2.3 parses with all fields populated
  • ID:pkg_act_<40-hex> parses without server/namespace
  • local:./my-actor resolves to local package lookup
  • Missing @version defaults to latest
  • Version resolution resolves concrete and all alias types
  • original_reference preserved exactly as user typed

Acceptance criteria

  • All three reference schemes parse correctly
  • Version aliases resolve per §4.2 semantics
  • Invalid formats raise InvalidPackageReferenceError
  • original_reference survives round-trip through resolution

Subtasks

  • Create src/cleveractors/registry/resolver.py with ReferenceResolver class
  • Implement server:namespace/name@version parsing
  • Implement ID:pkg_xxx_<40-hex> parsing
  • Implement local: scheme parsing
  • Implement version resolution: concrete + all alias types
  • Integrate with RegistryClient for remote resolution
  • Tests (Behave): features/registry_reference_resolver.feature — all formats, edge cases, version matrices
  • 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): implement ReferenceResolver with version alias resolution Branch: feature/m1-registry-reference-resolver ## Background and context The Package Registry Standard v1.0.0 (§5.3, §4.2) defines three reference formats and a version resolution scheme with both immutable concrete versions and mutable aliases (`latest`, `vx`, `vX.Y.x`, `vX.x`). All three reserved schemes (`ID:`, `registry:`, `local:`) must be supported. Part of Epic: Package Registry Client — Support Package Registry Standard v1.0.0 ## Current behavior No reference parsing or version resolution exists. Templates use only simple name strings. ## Expected behavior - `ReferenceResolver.parse(ref_str: str) -> PackageReference` handles all three schemes - `registry.example.com:acme/search@v1.2.3` parses with all fields populated - `ID:pkg_act_<40-hex>` parses without server/namespace - `local:./my-actor` resolves to local package lookup - Missing @version defaults to `latest` - Version resolution resolves concrete and all alias types - `original_reference` preserved exactly as user typed ## Acceptance criteria - All three reference schemes parse correctly - Version aliases resolve per §4.2 semantics - Invalid formats raise `InvalidPackageReferenceError` - `original_reference` survives round-trip through resolution ## Subtasks - [ ] Create `src/cleveractors/registry/resolver.py` with `ReferenceResolver` class - [ ] Implement `server:namespace/name@version` parsing - [ ] Implement `ID:pkg_xxx_<40-hex>` parsing - [ ] Implement `local:` scheme parsing - [ ] Implement version resolution: concrete + all alias types - [ ] Integrate with `RegistryClient` for remote resolution - [ ] Tests (Behave): features/registry_reference_resolver.feature — all formats, edge cases, version matrices - [ ] 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:10 +00:00
CoreRasurae changed title from Reference resolution — parse references, version resolution, local scheme to feat(registry): implement reference resolution — parse refs, version aliases, local scheme 2026-06-05 17:47:28 +00:00
CoreRasurae added reference feature/m1-registry-reference-resolver 2026-06-07 22:29:30 +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#26
No description provided.