feat(registry): implement local: namespace reference resolution with filesystem + canonicalization #46
Labels
No labels
auto/blocked-by-deps
auto/ci-timeout
auto/claimed-implementer
auto/claimed-merge
auto/claimed-reviewer
auto/driver-down
auto/invariant-violation
auto/last-attempt-tier-0
auto/last-attempt-tier-1
auto/last-attempt-tier-2
auto/last-attempt-tier-min
Automation Tracking
auto/needs-conflict-resolution
auto/needs-implementer
auto/postmortem
auto/ready-to-merge
auto/restart-throttled
auto/revert
auto/sentinel
auto/stale-inactivity
auto/unstable
Blocked
Bounty
$100
Bounty
$1000
Bounty
$10000
Bounty
$20
Bounty
$2000
Bounty
$250
Bounty
$50
Bounty
$500
Bounty
$5000
Bounty
$750
MoSCoW
Could have
MoSCoW
Must have
MoSCoW
Should have
Needs Feedback
Points
1
Points
13
Points
2
Points
21
Points
3
Points
34
Points
5
Points
55
Points
8
Points
88
Priority
Backlog
Priority
CI Blocker
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Signed-off: Owner
Signed-off: Scrum Master
Signed-off: Tech Lead
Spike
State
Completed
State
Duplicate
State
In Progress
State
In Review
State
Paused
State
Unverified
State
Verified
State
Wont Do
Type
Automation
Type
Bug
Type
Discussion
Type
Documentation
Type
Epic
Type
Feature
Type
Legendary
Type
Refactor
Type
Support
Type
Task
Type
Testing
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Blocks
Depends on
#22 Epic: Package Registry Client — Support Package Registry Standard v1.0.0
cleveragents/cleveractors-core
#47 feat(registry): implement local namespace reference resolution
cleveragents/cleveractors-core
Reference
cleveragents/cleveractors-core#46
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Metadata
Commit Message: feat(registry): implement local namespace reference resolution
Branch: feature/m1-local-reference-resolution
Background and context
The Package Registry Standard v1.0.0 (per
docs/actor-registry-standard.md) defines three reference schemes in §5.3:REGISTRY(server:ns/name@version),ID(ID:pkg_<type>_<40-hex-sha1>), andLOCAL(local:<path>). While parsing oflocal:references works (#26,PackageReference.from_string()), actual resolution is not implemented —ReferenceResolver.resolve()raises"not yet implemented"andPackageContentResolverreturns an empty placeholder dict. The template registries (TemplateRegistry/EnhancedTemplateRegistry) also do not routelocal:references through any resolver.This issue covers the full implementation: reading local YAML files, canonicalizing them per §6 to produce content-addressed
PackageIds, resolving nestedlocal:references recursively, and integrating this into both resolvers and the template system — while preserving the originallocal:<path>reference string in_original_reference.Current behavior
PackageReference.from_string("local:path/to/file.yaml")parses correctly with security validation (no.., no absolute paths)ReferenceResolver.resolve()for LOCAL raisesInvalidPackageReferenceError("Local package resolution is not yet implemented")PackageContentResolver.resolve()for LOCAL returns placeholder{"name": "...", "type": "local", "_original_reference": "..."}with no file I/O_try_parse_registry_ref()filter toReferenceType.REGISTRYonly, solocal:template names fall through to local template lookup and failExpected behavior
local:path/to/package.yamlresolves by reading the YAML file from a configurable base directory, canonicalizing it via the existingCanonicalizer, and computing aPackageId(SHA-1)_original_reference: "local:path/to/package.yaml"and_package_id: "pkg_<type>_<sha1>"local:references within local packages are recursively resolved during canonicalization (replaced withID:pkg_...strings before hashing)ReferenceResolver.resolve()returns the computedPackageIdfor LOCAL referencesPackageContentResolver.resolve()returns the resolved content dict (cached in existing LRU)local:template names, routing them through the same resolution path as REGISTRY references.yaml/.yml)Acceptance criteria
LocalPackageStoreclass exists insrc/cleveractors/registry/local_store.pywithresolve_package(relative_path) → LocalPackageLocalPackagedataclass carriespackage_id,content,file_path,original_referencePackageContentResolveracceptslocal_storevia constructor injection and resolves LOCAL refs to content dictsReferenceResolveracceptslocal_storevia constructor injection and resolves LOCAL refs toPackageIdsTemplateRegistryandEnhancedTemplateRegistryacceptlocal_storevia constructor injection and routelocal:names throughLocalPackageStore_try_parse_registry_ref()renamed to_try_parse_package_ref()and accepts both REGISTRY and LOCAL_resolve_registry_ref()renamed to_resolve_package_ref()inbase.py, acceptslocal_storeparameterlocal:references within local YAML files are recursively resolved_original_referenceis preserved through the entire resolution chainPackageContentResolverLRU (key:local:<path>:<type>)nox -s coverage_reportnoxfull suite passesSupporting information
docs/actor-registry-standard.md§§5.3, 6.1-6.3, 7.3LocalPackageStore), Strategy (three resolution types), Template Method (unified resolution flow), Adapter (filesystem → package interface), Proxy (caching layer), Dependency Injection, Guard Clause (path validation)src/cleveractors/registry/local_store.pyreference_resolver.py,resolver.py,canonical.py,base.py,registry.py,enhanced_registry.py,__init__.pySubtasks
LocalPackagefrozen dataclass andLocalPackageStoreclass with path validation guard clauseslocal:reference resolution (_walk_and_resolve)_detect_package_type()heuristic (inferPackageTypefrom content structure)Canonicalizer.resolve_references()to handlelocal:strings alongsideID:pkg_local_storeparameter toPackageContentResolver.__init__(), implement LOCAL resolution inresolve()andaresolve()local_storeparameter toReferenceResolver.__init__(), implement LOCAL resolution inresolve()_resolve_registry_ref→_resolve_package_refinbase.py, addlocal_storeparameterTemplateRegistry: rename_try_parse_registry_ref→_try_parse_package_ref, accept LOCAL + REGISTRY, injectlocal_storeEnhancedTemplateRegistryLocalPackage,LocalPackageStorefromregistry/__init__.pyfeatures/)robot/)nox -s coverage_reportnox(all default sessions), fix any errorsDefinition of Done
This issue is complete when:
noxfull suite passes (lint, typecheck, security, unit_tests, coverage_report).local:path/to/actor.yamlresolves correctly through the full chain.Child of Epic #22 — Package Registry Client.
Depends on:
local:parsing)Architecture plan elaborated in opencode session. New module:
src/cleveractors/registry/local_store.py. Modified:reference_resolver.py,resolver.py,canonical.py,base.py,registry.py,enhanced_registry.py,__init__.py.PR submitted: #47 —
feature/m1-local-reference-resolutionFull implementation of local namespace reference resolution with LocalPackageStore, nested resolution, and template registry integration.