TDD: PackageContentResolver never fetches package content for REGISTRY references — agents.<name>/skills:/routes.<name> get the §8.2.2 stub instead of real config #136
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
#137 test(registry): add failing regression for missing content fetch after registry resolve (#135)
cleveragents/cleveractors-core
Reference
cleveragents/cleveractors-core#136
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
test(registry): add failing regression for missing content fetch after registry resolve (#135)tdd/m1-registry-content-fetchBackground and context
Companion TDD issue for #135 ("PackageContentResolver never fetches package content for REGISTRY references — agents./skills:/routes. get the §8.2.2 stub instead of real config"). Per this project's mandatory Bug Fix TDD workflow, a failing Behave scenario proving the bug exists must be written and merged to
masterbefore any fix is implemented on abugfix/branch for #135.The defect:
PackageContentResolver._resolve_registry_async(src/cleveractors/registry/reference_resolver.py) only performs the Package Registry Standard §8.2.2 "resolve" call (GET /{package_type}/{namespace}/{name}→{"package_id", "type"}) and returns that stub directly as if it were the resolved package content. It never performs the required §8.2.1 "get package by ID" call (GET /packages/{package_id}→{"content": "<YAML string>"}) to fetch and parse the actual package payload.Current behavior
No Behave scenario asserts that
PackageContentResolver.resolve()/aresolve()for a REGISTRY reference returns real package content. Nothing proves that a resolvedagent-type (orskill-type) package'stype/configfields — as opposed to the §8.2.2 stub's package-type-nametypefield — are present in the dict handed back to callers such asAgentFactory.acreate_agent.Expected behavior
A Behave scenario exists, tagged
@tdd_issue @tdd_issue_135 @tdd_expected_fail, that:GET /{package_type}/{ns}/{name}(§8.2.2) returns{"package_id": "pkg_agt_...", "type": "agent"}andGET /packages/{package_id}(§8.2.1) returns{"content": "name: worker\ntype: llm\nprovider: openai_compatible\n..."}.PackageContentResolver.resolve()(oraresolve()).typefield is"llm"(the real agent's type, from the §8.2.1 content) — not"agent"(the §8.2.2 stub's package-type field).type: "agent"is returned unchanged, andGET /packages/{package_id}is never even requested) — the scenario passes in CI only because the@tdd_expected_failtag inverts the result, per this project's TDD tag rules.AssertionErroronly — neverValueError,RuntimeError, or any other exception type — so the TDD CI hook inverts it correctly.Acceptance criteria
@tdd_issue,@tdd_issue_135,@tdd_expected_fail.AssertionErroronly.@tdd_expected_failremoved locally fails against currentmaster, confirming the bug is genuinely reproduced (the mock'sGET /packages/{package_id}endpoint is never hit).nox -s unit_testsis green (CI passes via the@tdd_expected_failinversion).nox -s coverage_report).mastervia its own PR before work begins on #135's fix.Supporting information
cleveractors.registry.reference_resolver(_RegistryReferenceStrategy,PackageContentResolver._resolve_registry_async),cleveractors.registry.client.RegistryClient.get_package/.resolve_package,cleveractors.registry.cache.RegistryCache.get_package/.resolve_package.features/registry_http_client.feature/features/steps/registry_http_client_steps.py— extend rather than duplicate.docs/actor-registry-standard.md§8.2.1/§8.2.2;docs/index.md§4.1.1;docs/adr/ADR-2037-agent-and-route-package-reference-resolution.mdD-3.Subtasks
features/registry_http_client.feature, alongside the existing registry-resolution coverage) that mocks both the §8.2.2 resolve response and the §8.2.1 get-package response, and asserts the resolved content reflects the §8.2.1 payload.features/steps/registry_http_client_steps.pyfile rather than creating a new one.@tdd_issue @tdd_issue_135 @tdd_expected_fail.@tdd_expected_failis removed locally (proving the bug), and passes CI with the tag in place.nox -s coverage_report.nox(all default sessions), fix any errors.Definition of Done
This issue is complete when:
master, reviewed, and merged.