Registry reference resolution builds /agt/… instead of /agent/…, failing with HTTP 404 on compliant registries #131
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.
Depends on
#132 TDD: Registry reference resolution builds /agt/… instead of /agent/…, failing with HTTP 404 on compliant registries
cleveragents/cleveractors-core
#134 fix(registry): use full package type names in registry resolve URL
cleveragents/cleveractors-core
Reference
cleveragents/cleveractors-core#131
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): use full package type names in registry resolve URLbugfix/m1-registry-resolve-full-type-namesBackground and context
The Package Registry Standard (
docs/actor-registry-standard.md§3.2) defines two distinct concepts per package type: the Type (agent,graph,skill,template, …) and the Prefix used only in Package IDs (pkg_agt_,pkg_grh_,pkg_skl_,pkg_tpl_, …). The §8.2.2 resolve endpoint isGET /{package_type}/{namespace}/{name}where{package_type}is the full type name — confirmed by the §8.2.2 response ("type": "actor") and the §8.4.2 discovery response (supported_typeslists full names).In
src/cleveractors/registry/reference_resolver.py,_RegistryReferenceStrategy(resolve→ line ~186,aresolve→ line ~219) applies_TEMPLATE_TYPE_TO_PACKAGE_TYPE, a TemplateType→Package-ID-prefix table, to the type sent on the wire, rewritingagent→agt,graph→grh,skill→skl, etc., beforeRegistryClient.resolve_package()builds the request. A compliant registry therefore receivesGET /agt/...— a path it does not route (full names only) — and answers404.This reaches every reference-resolver call site, because all of them correctly pass the full type name:
agents.<name>agent references:agents/agent_resolution.py(package_type="agent", ADR-2037 D-2;docs/index.md§4.1.1)agents/skill_resolution.py(package_type="skill", ADR-2034)route_resolution.py(package_type="graph", ADR-2037 D-7;docs/index.md§5.1.1)templates/base.pyInstantiationContext._resolve_package_reference(package_type=ref.ref_type, a full template type name)The mapping itself is not the bug and MUST be preserved: it is required to convert a template/system type name into the Package-type prefix that appears in Package IDs (
pkg_agt_...), cache keys (_compute_cache_key) and identity-map lookups. Only its application to the HTTP path segment is wrong.Current behavior
Resolving a bare agent reference against a compliant registry fails with
HTTP 404:Network evidence against the Caddy-fronted registry at
http://192.168.1.53(the graph'scalculator_builder: "192.168.1.53:luis-mendes/calculator-app-builder-b"):The server advertises full type names (
supported_types: ["actor","template","graph","stream","agent","skill","mcp","lsp"]) and only routes those. The control binaryclient/registry-cli.pypasses the type argument verbatim (resolve agent luis-mendes calculator-app-builder-b→GET /agent/...→200), proving the server is spec-compliant and the defect is in the library.Note: even after fixing redirect-following (see related #130), this still fails —
/agt/...redirects (308) to a trailing-slash variant that then 404s. The two are independent defects on the same repro host.Expected behavior
RegistryClient.resolve_package()is called with the full package type name (agent,graph,skill, …), so the request URL isGET /{name}/{namespace}/{name}with a routable type segment. Resolution of192.168.1.53:luis-mendes/calculator-app-builder-bsucceeds (HTTP 200) and the agent is created. The_TEMPLATE_TYPE_TO_PACKAGE_TYPEmapping continues to be applied wherever prefixes are actually needed (Package IDs, cache keys, template→package type conversion) and is untouched for those uses.Acceptance criteria
_RegistryReferenceStrategy.resolve/aresolvepass the full type name (e.g.agent) as{package_type}; no resolve URL ever carries a short prefix segment (agt,grh,skl,tpl, …).host:ns/nameagent reference against a spec-compliant registry returns HTTP 200 and the agent is created.InstantiationContext._resolve_package_reference) keep working, and_TEMPLATE_TYPE_TO_PACKAGE_TYPEis still applied for Package-ID / cache-key / prefix conversion (template→package mapping preserved)./skill/{ns}/{name}and route references request/graph/{ns}/{name}.registry-cli.py resolve agent <ns> <name>behaviour is unchanged (/agent/...).local:/ID:reference resolution.nox -s coverage_report).Supporting information
docs/actor-registry-standard.md§3.2 (Type vs Prefix), §8.2.2 (resolve endpoint), §8.4.2 (discoverysupported_types)docs/registry/client.md—resolve_package(package_type="actor" / "skill")usage with full type namespackage_type="agent") / D-7 (package_type="graph"); ADR-2034 (package_type="skill")docs/index.md§4.1.1, §5.1.1src/cleveractors/registry/reference_resolver.py(_TEMPLATE_TYPE_TO_PACKAGE_TYPE,_RegistryReferenceStrategy,_compute_cache_key); call sites inagents/agent_resolution.py,agents/skill_resolution.py,route_resolution.py,templates/base.pyhttp://192.168.1.53Subtasks
_RegistryReferenceStrategy.resolve/aresolveso the value passed toRegistryClient.resolve_packageis the full type name (drop only the transport-time application of_TEMPLATE_TYPE_TO_PACKAGE_TYPE; keep the mapping for_compute_cache_keyand Package-ID/prefix conversion)./agent/...,/skill/...,/graph/...) and that template→prefix mapping still applies to Package IDs/cache keys.nox -s coverage_report.nox(all default sessions), fix any errors.Definition of Done
This issue is complete when:
master, reviewed, and merged.