You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Summary\n- Harden jianyu search against anti-bot/API drift with a fallback chain (API -> DOM -> public index).\n- Add jianyu detail command for structured detail extraction.\n- Add retry handling for transient page-context failures and empty-result retries.\n- Scope procurement shared helpers under clis/jianyu/shared instead of clis/_shared.\n- Update Jianyu adapter docs with search/detail contract.\n\n## Why\nJianyu search often returns empty or unstable results under anti-verify conditions. This improves result continuity and provides a structured detail path for downstream workflows.\n\n## Validation\n- npm run test:adapter -- clis/jianyu/search.test.ts clis/jianyu/shared/procurement-contract.test.ts clis/jianyu/shared/procurement-detail.test.ts\n- npm run typecheck
One thing that looks risky in fetchJianyuApiRows() in clis/jianyu/search.ts: the per-type loop stops as soon as rows.length >= limit, but the real quality gate (filterNavigationRows() + dedupeCandidates()) only runs later in the command handler.
That means duplicates or navigation-ish rows from earlier fType / eType buckets can consume the budget and prevent later unique rows from ever being considered. In practice jianyu search --limit N can end up returning fewer than N results even when more unique matches exist in the later buckets.
The previous adapter kept the safer shape of dedupe first, slice last. I would collect all normalized API rows (or at least over-fetch per bucket), then run navigation filtering + dedupe + final slice(limit) once at the end.
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
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.
Summary\n- Harden jianyu search against anti-bot/API drift with a fallback chain (API -> DOM -> public index).\n- Add jianyu detail command for structured detail extraction.\n- Add retry handling for transient page-context failures and empty-result retries.\n- Scope procurement shared helpers under clis/jianyu/shared instead of clis/_shared.\n- Update Jianyu adapter docs with search/detail contract.\n\n## Why\nJianyu search often returns empty or unstable results under anti-verify conditions. This improves result continuity and provides a structured detail path for downstream workflows.\n\n## Validation\n- npm run test:adapter -- clis/jianyu/search.test.ts clis/jianyu/shared/procurement-contract.test.ts clis/jianyu/shared/procurement-detail.test.ts\n- npm run typecheck