test(registry): add failing regression for missing content fetch after registry resolve (#135) #137
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
2 participants
Notifications
Due date
No due date set.
Blocks
Reference
cleveragents/cleveractors-core!137
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "tdd/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
Companion TDD issue for #135. Adds a Behave scenario proving
PackageContentResolver._resolve_registry_async(src/cleveractors/registry/reference_resolver.py) never performs the Package Registry Standard §8.2.1GET /packages/{package_id}fetch for REGISTRY-scheme references — it returns the §8.2.2 resolve stub ({"package_id": ..., "type": "agent"}) directly as if it were the resolved package content, instead of the real package payload (type: llm, etc.) thatdocs/index.md§4.1.1 and ADR-2037 D-3 require.The new scenario mocks both the §8.2.2 resolve endpoint and the §8.2.1 get-package endpoint behind distinct request paths, resolves an
agentregistry reference throughPackageContentResolver.resolve(), and asserts the returned content'stypefield is"llm"(not"agent") and that the get-package endpoint was actually requested. Confirmed locally that both assertions fail withAssertionErrorwhen@tdd_expected_failis removed.Test plan
nox -s lintgreennox -s format -- --checkgreennox -s typecheckgreennox -s security_scangreennox -s dead_codegreennox -s unit_testsgreen (3084 scenarios, scenario passes via@tdd_expected_failinversion)nox -s integration_testsgreen (362 Robot tests, unaffected)nox -s coverage_reportgreen (96.9% >= 96.5% threshold)@tdd_expected_failmakes the scenario fail for realCloses #136
PackageContentResolver._resolve_registry_async (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, so a REGISTRY-scheme agents.<name> reference ends 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. Adds a new scenario to features/registry_http_client.feature (extending the existing shared registry_http_client_steps.py rather than a new step file) that mocks both the §8.2.2 resolve response and the §8.2.1 get-package response behind distinct paths, resolves an "agent" registry reference through PackageContentResolver.resolve(), and asserts the returned content's "type" field is "llm" (from the real package) and that the get_package endpoint was actually requested. Confirmed locally that both assertions fail with AssertionError when @tdd_expected_fail is removed, proving the bug is genuinely reproduced; with the tag present, the TDD policy inverts the failure so nox -s unit_tests stays green. ISSUES CLOSED: #136PR Review: !137 (Ticket #136)
Verdict: Approve
This PR adds a focused, well-structured TDD regression scenario that correctly captures the missing §8.2.1 content-fetch bug described in #135. The scenario mocks both the resolve endpoint and the get-package endpoint, asserts that
PackageContentResolver.resolve()returns the real package content (type: llm) rather than the §8.2.2 stub (type: agent), and verifies that the content endpoint is actually requested. The required tag combination@tdd_issue @tdd_issue_135 @tdd_expected_failis present, and the failing assertions raiseAssertionError, so the TDD expected-fail inversion policy will handle them correctly. No critical or major issues were found.Critical Issues
None
Major Issues
None
Minor Issues
None
Nits
None
Summary
The changes extend the existing
features/registry_http_client.featureandfeatures/steps/registry_http_client_steps.pyrather than duplicating them, the step definitions are clean and reuse existing mock helpers, and the test genuinely reproduces the bug on currentmaster. Approved.View 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.