fix(registry): fetch and parse package content for resolved registry references #138
No reviewers
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
Reference
cleveragents/cleveractors-core!138
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "bugfix/m1-registry-content-fetch"
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?
Summary
Fixes #135:
PackageContentResolver._resolve_registry_asynconly performed the Package Registry Standard §8.2.2 "resolve" call and returned that stub directly as package content, never performing the required §8.2.1get_packagefetch. Atype: llmagent referenced via a bare REGISTRY-scheme string inagents.<name>therefore failedAgentFactory.acreate_agentwithAgentCreationError("Unknown agent type: agent")._resolve_registry_asyncnow follows upresolve_packagewithget_package/get_package_content, parses the returned YAMLcontent, and merges the real package content over the resolve stub (routed through the per-serverRegistryCachewhen available). The resolution cache now stores the fully-resolved content. A malformed/missingcontentresponse raisesValidationErrorinstead of silently propagating the stub.Also fixes
robot/fake_registry_server.py's/packages/{id}handler, which was returning raw fields instead of the spec-compliant{"content": "<yaml>"}envelope for actor/skill packages -- this was previously masking the same defect inrobot/skill_registry_auth.robot's real end-to-end skill-download flow and inrobot/registry_full_cache_integration.robot.Stacking note: This PR is based on
tdd/m1-registry-content-fetch(PR #137, not yet merged) rather thanmaster, since the regression test this fix turns green lives there. Please merge #137 first; this PR's diff againstmasterwill shrink to just the fix once that happens.Closes #135
Test plan
nox -s unit_tests-- full Behave suite green (3084 scenarios)nox -s coverage_report-- 96.8% (>= 96.5% threshold)nox -s typecheck-- 0 errorsnox -s lint/nox -s format -- --check-- cleannox -s security_scan/nox -s dead_code-- cleannox -s integration_tests-- full Robot suite green (363 tests), including new REGISTRY-backedtype: llmagent scenario inagent_package_references.robot@tdd_expected_failfrom the@tdd_issue_135scenario now that the fix landsPackageContentResolver._resolve_registry_async only performed the Package Registry Standard §8.2.2 "resolve" call (GET /{package_type}/{namespace}/{name} -> {"package_id", "type"}) and returned that stub directly as if it were the resolved package content. It never performed the required §8.2.1 "get package by ID" call (GET /packages/{package_id} -> {"content": "<YAML string>"}) to fetch and parse the real package payload, so a REGISTRY-scheme agents.<name> (and routes.<name>/skills:) reference ended up with type: "agent" (the resolve stub's package-type field) instead of the real package's type: "llm", per docs/index.md §4.1.1 and ADR-2037 D-3. _resolve_registry_async now follows up resolve_package with get_package/ get_package_content for the returned package_id, parses the YAML content string via a new _parse_package_content helper, and merges the parsed content over the resolve stub so the real type/config win. The fetch routes through the per-server RegistryCache when available, mirroring the existing resolve_package cache/no-cache branching, and the resolution cache now stores the fully-resolved content instead of the intermediate stub. A malformed or missing content response now raises ValidationError (a RegistryError subclass) instead of silently propagating the stub. Removed @tdd_expected_fail from the issue #135 regression scenario in features/registry_http_client.feature now that the fix lands. Updated existing mocks that only modeled the single §8.2.2 call (registry_http_client_steps.py, registry_reference_resolver_coverage_steps.py, cache_coverage_steps.py/.feature) to also serve a valid §8.2.1 response, and fixed robot/fake_registry_server.py's /packages/{id} handler to wrap known package content in the spec-compliant {"content": "<yaml>"} envelope instead of returning raw fields at the top level -- both registry_full_cache_integration.robot (updated miss-count assertions, now 2 misses per fetch instead of 1) and skill_registry_auth.robot's real end-to-end skill-download flow depend on this shape and were previously silently red. Added a new Robot scenario in agent_package_references.robot proving a type: llm agent referenced via a bare REGISTRY-scheme string constructs successfully through AgentFactory.acreate_agent against a real fake registry server. ISSUES CLOSED: #135View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.