GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix(ima): route search folder-name hits away from document hydration by markjoin123 · Pull Request #2332 · HKUDS/DeepTutor

Conversation

@markjoin123

@markjoin123 markjoin123 commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

Description

search_knowledge returns folder-name matches inside info_list with a folder_ media_id and media_type 99, and no folder_id. parse_knowledge_page() only treated an entry as a folder when it had folder_id and no media_id, so these hits were parsed as documents.

Retrieval then tried to hydrate them with get_media_info, failed with ImaAPIError, spent the hydration budget, and returned content_unavailable even when real documents had matched.

Document-array entries with a folder_ media id or media_type 99 are now routed to the folder list and are never hydrated. A search that only hits folder names reports no_matches.

Related Issues

  • Fixes [Bug]: IMA folder-name matches are parsed as documents — folder-nested knowledge bases always return content_unavailable #2326

Module(s) Affected

  • services
  • tests

Checklist

  • This PR targets dev (not main).
  • I have read and followed the contribution guidelines.
  • My code follows the project's coding standards.
  • I have run pre-commit on the changed files and fixed any issues.
  • I have added relevant tests for my changes.
  • I have updated the documentation (if necessary).
  • My changes do not introduce any new security vulnerabilities.

Additional Notes

This change was AI-assisted and was reviewed and tested.

Parser regression: a live-shaped info_list entry (media_id folder_7359, media_type 99, empty highlight, no folder_id) is a folder, and a real document in the same page stays a document. The folder_ prefix and media_type 99 each suffice on their own. A media id of folder with media_type 1 stays a document.

Pipeline regression: four folder-name hits ahead of a title-only document do not call get_media_content for the folders; the document is hydrated and the result is ready. Folder-only results report no_matches with no media fetches.

python -m pytest tests/services/rag/test_ima_client_surface.py tests/services/rag/test_ima_pipeline.py tests/services/rag/test_ima_inventory.py -q
# 139 passed

python -m pytest tests/capabilities/test_ima_capability.py tests/services/rag/test_ima_inventory.py -q
# 52 passed

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@markjoin123
fix(ima): route search folder-name hits away from document hydration
db014f0
search_knowledge returns folder matches inside info_list with a folder_
media id and media_type 99, and no folder_id. Those were parsed as
documents, so retrieval spent the hydration budget on get_media_info
failures and reported content_unavailable.

Fixes HKUDS#2326
This was referenced Nov 2, 2026
[Bug]: Legacy Office formats (.doc/.xls/.ppt) pass upload validation but the extractor cannot parse them — uploads yield no text and IMA retrieval returns content_unavailable #2338
Closed
[Bug]: IMA folder-name matches are parsed as documents — folder-nested knowledge bases always return content_unavailable #2326
Closed
@pancacake pancacake mentioned this pull request Nov 5, 2026
Integrate reviewed community contributions since v1.7.1 #2466
Merged
@pancacake
pancacake merged commit d374d7e into HKUDS:dev Nov 5, 2026
23 checks passed

Uh oh!

There was an error while loading. Please reload this page.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@markjoin123 @pancacake
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.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.