PackageContentResolver never fetches package content for REGISTRY references — agents.<name>/skills:/routes.<name> get the §8.2.2 stub instead of real config #135
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
#136 TDD: PackageContentResolver never fetches package content for REGISTRY references — agents.<name>/skills:/routes.<name> get the §8.2.2 stub instead of real config
cleveragents/cleveractors-core
#138 fix(registry): fetch and parse package content for resolved registry references
cleveragents/cleveractors-core
Reference
cleveragents/cleveractors-core#135
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
fix(registry): fetch and parse package content for resolved registry referencesbugfix/m1-registry-content-fetchBackground and context
PackageContentResolver._resolve_registry_async(src/cleveractors/registry/reference_resolver.py) is the single shared resolution path behind every REGISTRY-scheme package reference in this project: bareagents.<name>references (ADR-2037 D-2/D-4),routes.<name>references (ADR-2037 D-7/D-8),skills:references (cleveractors.agents.skill_resolution.SkillReferenceResolver, which mirrors the same pattern per ADR-2037's Context), and template-driven package references (cleveractors.templates.base._resolve_package_ref).The Package Registry Standard (
docs/actor-registry-standard.md) defines package retrieval as two distinct endpoints:GET /{package_type}/{namespace}/{name}?version={version}— "Resolves a package reference to its concrete Package ID." Response:{"package_id": "pkg_...", "type": "<package_type>"}only.GET /packages/{package_id}— "Returns the raw package content for the specified package ID." Response:{"content": "<YAML string>"}.docs/index.md§4.1.1 (added by ADR-2037 D-1) normatively requires: "A compliant implementation MUST resolve the reference to anagent-type package ... and use that package'stype/configfields exactly as if they had been written inline under theagents.<name>mapping form." ADR-2037 D-3 explicitly assumes "the agent reference resolver returns the raw resolved package content dict unchanged" withtype/config"already sit[ting] at the top level."Current behavior
_resolve_registry_asynccalls onlyresolve_package()(RegistryClient.resolve_package/RegistryCache.resolve_package, both of which hit exactly §8.2.2 and return only{"package_id", "type"}) and merges that response directly into the dict it returns as if it were the resolved package content:It never calls
RegistryClient.get_package(package_id)/RegistryCache.get_package(§8.2.1) to fetch the actual package payload, and never parses the YAML string under that response'scontentkey. Confirmed by grep: no caller anywhere insrc/cleveractorsoutsideregistry/client.py/registry/cache.pythemselves invokesget_package/get_package_content.Repro:
agent-type package by a bare REGISTRY-scheme string, e.g.: where the referenced package (as published on the registry) is a realtype: llmagent (system_prompt,tools,provider,model, etc. — confirmed present in the equivalent local package,calculator-app-builder.yaml).python test_app.py test --graph <file>.yaml --prompt "..." --registry-key "<key>"against that registry.Error: Execution failed: Unknown agent type: agent.This happens because the dict
AgentFactory.acreate_agentreceives hastype=="agent"(the §8.2.2 stub's package-type field, echoed straight through), not"llm"(the real agent'stype, which lives in the §8.2.1contentpayload that was never fetched) — and none ofsystem_prompt/tools/provider/modelare present either, since none of the actual package content was ever retrieved.Expected behavior
PackageContentResolver.resolve()/aresolve(), for a REGISTRY reference, performs both required calls in sequence — §8.2.2 to obtainpackage_id, then §8.2.1 to fetch and parse that package's realcontent— and returns the parsed content (withtype/configat the top level, perdocs/index.md§4.1.1) merged with the existing_original_reference/_server/_namespace/_name/_version/package_idenrichment fields. Atype: llmagent referenced this way constructs successfully viaAgentFactory.acreate_agent/AgentFactory.create_agent, matching the behavior already correct forlocal:references (which read aLocalPackage's already-parsedcontentdirectly).Acceptance criteria
PackageContentResolver.resolve()/aresolve()for a REGISTRY reference callsget_package/get_package_contentwith thepackage_idobtained fromresolve_package(), and parses the returnedcontentYAML string into a dict.resolve()/aresolve()for a REGISTRY reference hastype/config(or whatever fields the real package defines) from the actual package payload — never the §8.2.2 stub's package-type-nametypefield.type: llmagent referenced via a bare REGISTRY-scheme string inagents.<name>(e.g.agents.worker: "host:ns/name") creates successfully throughAgentFactory.acreate_agent, instead of raisingAgentCreationError("Unknown agent type: <package_type>").PackageContentResolver.cache, keyed via_compute_cache_key) caches the fully resolved content (post-get_package), not the intermediate §8.2.2 stub.RegistryCachecontent tier (get_package) is used when available (mirroring the existingresolve_packagecache/no-cache branching already in_resolve_registry_async), falling back to the rawRegistryClient.get_packageotherwise.local:/ID:reference resolution, which is unaffected by this defect.Supporting information
src/cleveractors/registry/reference_resolver.py(_RegistryReferenceStrategy,PackageContentResolver._resolve_registry_async)src/cleveractors/registry/client.py(RegistryClient.get_package§8.2.1,RegistryClient.resolve_package§8.2.2)src/cleveractors/registry/cache.py(RegistryCache.get_package,RegistryCache.resolve_package)docs/actor-registry-standard.md§8.2.1, §8.2.2docs/index.md§4.1.1 (Agent Package References), §5.1.1 (Route Package References)docs/adr/ADR-2037-agent-and-route-package-reference-resolution.md(D-2, D-3, D-4, D-7, D-8 — this defect violates D-3's assumption that the resolved dict already hastype/configat the top level)docs/adr/ADR-2034-skill-package-support.md(theskills:resolution path this ADR mirrors shares the identical defect, via the samePackageContentResolver){package_type}segment (full type name vs. Package-ID prefix); it did not touch the missing §8.2.1 fetch this issue describes.Subtasks
_resolve_registry_async(src/cleveractors/registry/reference_resolver.py) to callget_package/get_package_contentwith the resolvedpackage_id, parse the returnedcontentYAML string, and merge that parsed content (not the §8.2.2 stub) into the dict returned byresolve()/aresolve().get_packagecall through the per-serverRegistryCachewhen available, mirroring the existingresolve_packagecache/no-cache branching in_resolve_registry_async._put_cache/self.cache) stores the fully-resolved (post-get_package) content, not the intermediate stub.features/registry_http_client.featurewith scenarios proving anagents.<name>(andskills:,routes.<name>) REGISTRY reference resolved throughPackageContentResolver.resolve()/aresolve()returns real package content (type/configfrom the package payload), not the resolve-endpoint stub.type: llmagent referenced via a REGISTRY-scheme string end-to-end against a registry test double.nox -s coverage_report.nox(all default sessions), fix any errors.Definition of Done
This issue is complete when:
master, reviewed, and merged.