M-L1-T3b: fetch-ai adapter GET → POST + JSON body (RED spec)#125
Merged
Conversation
PR #120 merged real fetch-ai adapter using GET /v1/search/agents?offset=&limit=. PR #124 fixed wiring so adapter receives a working httpClient. Production smoke 2026-05-02 22:36 UTC: adapter ran (durationMs:101) but produced zero agents. Direct curl of real API: GET https://agentverse.ai/v1/search/agents?offset=0&limit=10 → HTTP 405 {"detail":"Method Not Allowed"} POST https://agentverse.ai/v1/search/agents Content-Type: application/json {"search_text":"","filters":{},"sort":"relevancy","direction":"asc", "offset":0,"limit":10} → HTTP 200 {"agents":[{"address":"agent1...",...},...]} T-3 spec used a stale/incorrect contract; T-3b corrects. Changes: - Un-skip behavior describe block (was TD-34 placeholder) - Update first test 'GETs ...' → 'POSTs ... with offset+limit in JSON body' - Assert method=POST, no query params, Content-Type: application/json header, body shape {search_text, filters, sort, direction, offset, limit} - Other behavior tests (yields, paginates, 401, 429, 5xx) inherit POST contract — they pass any req shape since fakeHttp ignores it Vitest output (RED): 5 fail, 4 pass (factory tests + 2 not-yet-targeted). Slim spec for registry-dev included in milestone doc.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
7 Skipped Deployments
|
Contributor
Author
Phase 0 SPEC APPROVED (architect self-call)Reviewer ran Phase 0 spec-review per Summary:
→ 🤖 Phase 0 reviewer (sub-agent self-call by architect) |
Real Agentverse API requires POST /v1/search/agents with JSON body
{search_text, filters, sort, direction, offset, limit}; previous GET
with query params returned 405. Adapter's defensive catch swallowed
the 405 → silent processed:0 in production despite wiring fix (PR #124).
fetchAgents: bare URL + POST with JSON body (offset/limit moved to body).
SAFETY_MAX_PAGES, 429 Retry-After, 5xx single retry — preserved.
Capability inference, toCanonical, DID derivation — unchanged.
Tests: 9/9 GREEN (factory + 8 behaviour, 2 toCanonical skipped per TD-34).
Full baseline: 70 files, 1437 passed.
NOTE: validAgent fixture (registeredAt: ISO string → ms number) and
'paginates offset += limit' pageSize=1 fix needed in test file — see
scope-violation-request in session log.
… for pagination
Two fixture-level corrections to the architect-authored RED spec, applied
by architect after registry-dev escalated SCOPE VIOLATION REQUEST during
T-3b impl. Both changes are contract evolution, not test-weakening:
1. validAgent.registeredAt: '2026-04-20T10:00:00.000Z' (ISO string) → 1714000000000
(Unix epoch ms). ZodFetchAiAgent.registeredAt is z.number().int().nonnegative()
per packages/types/src/sources/fetch-ai.ts. ISO string failed Zod validation
silently → toCanonical projection.ok=false → adapter yielded zero records.
Also added missing required schema fields:
profileUrl: z.string().url() — required
tags: z.array(...).default([]) — explicit value
isOnline: z.boolean().default(false) — explicit value
reputationScore: z.number().nullable() — explicit null
2. 'paginates offset += limit until empty' test: createFetchAiAdapter call
now passes { httpClient, pageSize: 1 }. With default pageSize=100 and
1 agent per response, adapter sees received < pageSize and terminates
after page 1 (correct behaviour — short page means end). pageSize=1
makes each response a "full page" so pagination advances through
3 pages as the test asserts (count===3).
Verified: 9/9 fetch-ai tests GREEN with registry-dev's impl (4b20c30).
Full baseline: 1437 passed | 18 skipped | 5 todo. Typecheck clean.
a3ka
pushed a commit
that referenced
this pull request
May 3, 2026
Phase N: scope clean, tests integrity, 9/9 GREEN, standards walk PASS. No new tech debt. Ready for architect gate-1 merge. (architect-applied via patch from reviewer's worktree 1af8c14 — reviewer session has no GitHub credentials per scope-guard.md narrow push exception; chore content authored by reviewer agent, applied verbatim.)
…ure checks scripts/verify_M-L1-T3b-fetch-post.sh — 9-step / 18-check verification: 1. Adapter sends method: 'POST' (not GET) + no GET fetch calls left 2. Content-Type: application/json header 3. All 6 Agentverse body fields (search_text, filters, sort, direction, offset, limit) 4. URL bare /v1/search/agents (no query string) 5. ZodFetchAiAgent.registeredAt is z.number().int().nonnegative() 6. Test fixture validAgent.registeredAt is Unix epoch ms (number) 7. Test fixture has all required schema fields (profileUrl, tags, isOnline, reputationScore) 8. Pagination test overrides pageSize: 1 9. Vitest target file 9/9 GREEN Local run: PASS=18 FAIL=0. Unblocks scripts/quality-gate.sh M-L1-T3b-fetch-post step 6/6 (test-runner reported missing acceptance — M-Q27 fallback regex `-T[0-9]+([._-][[:alnum:]]+)*$` doesn't match T<num><letter> styles like T3b). NB: M-Q27 regex extension to handle T3b-style suffixes is separate concern, will file as TD if becomes recurring (currently 1st T<num><letter> task).
This was referenced May 3, 2026
a3ka
pushed a commit
that referenced
this pull request
May 3, 2026
…* packages Pre-existing infrastructure debt: packages/types/src/index.ts uses .js extension imports (TS NodeNext). Next.js webpack does NOT transpile workspace packages by default — fails to resolve './agent-category.js' (actual file: agent-category.ts). Broke at M-L1-taxonomy merge (commit 120988e, ~April 30). Last successful landing CI: f4cefcf (April 30). Path-filtered landing CI didn't trigger on backend PRs (#118-#125) → silent for 3 days. PR #99 (M-L10.7.3) is first PR touching landing since → CI red → exposes baseline. Affects all 8 frontend apps' production builds + likely silently breaks their Vercel deploys. Acceptance script verifies (17 checks): 1. all 8 apps' next.config.ts have transpilePackages field (8 checks) 2. transpilePackages includes @paxio/types (8 checks) 3. landing-app build succeeds (1 smoke check) Currently RED 0/17 (no transpilePackages in any config; landing-app build fails on .js resolution). Fix is frontend-dev scope — slim spec in docs/sprints/TD-FE-transpile.md.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
PR #120 merged real fetch-ai adapter using
GET /v1/search/agents?offset=&limit=. PR #124 fixed wiring so adapter actually receives a working httpClient. Production smoke 2026-05-02 22:36 UTC:```
gh workflow run "Scheduled · Crawl MCP" -f source=fetch-ai
→ {processed:0, upserted:0, sourceErrors:0, durationMs:101, stoppedReason:'completed'}
```
Adapter ran (durationMs:101 vs 0 before wiring fix), but yielded zero agents. Direct curl of real Agentverse API:
```bash
curl -X GET "https://agentverse.ai/v1/search/agents?offset=0&limit=10\"
→ HTTP 405 {"detail":"Method Not Allowed"}
curl -X POST "https://agentverse.ai/v1/search/agents\" \
-H "Content-Type: application/json" \
-d '{"search_text":"","filters":{},"sort":"relevancy","direction":"asc","offset":0,"limit":10}'
→ HTTP 200 {"agents":[...]}
```
Adapter's defensive `try{...} catch { return; }` swallows the 405 → silent zero. T-3 spec used stale API contract; T-3b corrects.
What this PR adds
Готово когда
Vitest output now (RED, expected)
```
Test Files 1 failed (1)
Tests 5 failed | 4 passed | 2 skipped
```
5 failures cover the body-shape contract (method=POST, no query params, Content-Type header, body fields with valid types).
Next step
Merge → registry-dev session implements adapter fix per slim spec → reviewer Phase N → architect autonomous merge → re-trigger fetch-ai crawl, verify ~2M agents.
🤖 Generated with Claude Code