Skip to content

chore: sync main into staging - #156

Merged
suguanYang merged 34 commits into
stagingfrom
chore/wangbinqi/sync-main-into-staging-20260617
Jun 16, 2026
Merged

suguanYang merged 34 commits into
stagingfrom
chore/wangbinqi/sync-main-into-staging-20260617

Conversation

@suguanYang

Copy link
Copy Markdown
Contributor

Syncs staging to the current main tree through a merge commit because staging is protected and cannot be force-updated. The previous staging tip is backed up at chore/wangbinqi/staging-backup-20260617. Supersedes PR #155.

suguanYang and others added 30 commits May 19, 2026 17:20
Release staging to main - 2026-05-19
Route oversized PDF shards through S3 for MinerU
…t-s3-mineru

Revert "Route oversized PDF shards through S3 for MinerU"
…flow

Move production release flow to GitHub Releases
* feat(retrieval): enhance agentic navigation with scope tracking, outline collection, and fallback auto-collect (#125)

* feat: enhance navigation state with error handling, custom tool parameters, and improved workflow plan caching

* feat(retrieval): enhance agentic navigation with scope tracking, outline collection, and fallback auto-collect

- Replace scope_stack with flat current_scope for cleaner BACK/DRILL navigation
- Add structured exit_reason tracking across all navigation exit paths
- Implement fallback auto-collect when navigation interrupted by budget/latency/max_steps
- Fix outline collections to not exclude children from future navigation
- Add BACK target validation with path-parent fallback
- Fix evidence tree indentation for nested sections
- Fix pyright type errors in plan_service by using explicit kwargs
- Fix lint: remove extraneous f-string prefixes in asset tools

* Resolve Issue #126 (#127)

* feat: inject discovery signals as advisory hints into agent document selection prompts

* fix(agentic): resolve evidence tree orphan nesting, outline leakage, and enforce English agent reasoning

- Fix _build_outline_subtree to reparent existing children under newly
  created parent nodes, preventing orphan depth errors (Bug 1)
- Filter outline_items in _hydrate_collected to exclude ancestor/sibling
  context from load_child_sections, eliminating echo structures (Bug 1)
- Change render_evidence guard from has_content() to has_leaf_content(),
  skipping documents with outline-only trees when no chunks were
  collected (Bug 2)
- Add English language requirement to COLLECTOR_PROMPT and _PLANNER_PROMPT
  for agent-generated free-text fields like reason and reasoning_summary (Bug 3)
- Remove unused imports flagged by ruff lint

Closes #117

* refactor: remove inspect tool, update asset search with optional VLM, and improve navigation stop/fallback logic

* feat: implement H2-aware shard refinement logic to improve document splitting granularity and adherence to size constraints.

* test(contract): update discovery selection contract tests to match id_to_path signature

* chore(agentic): remove legacy topic_hints dead code after c0261eb refactor (#128)

- Remove image_topic_hints / table_topic_hints params from build_asset_tools_block
  (hints were never used in the new prompt format)
- Remove dead load_asset_topic_hints function from assets.py
- Remove hint-loading block and wasted DB queries from navigate_step in tools.py

* fix: route oversized pdf shards through s3

* feat(agentic): add discovery fallback, budget-aware prompts, and VLM model upgrade (#133)

- Add Phase 2.5 discovery fallback for unnavigated documents that have
  bottom-discovery hits but were missed by KG document selection
- Add adjust_budget_snapshot() to pre-adjust budget state shown to LLM
- Update prompt_service with model-specific formatting (DeepSeek/Qwen)
- Upgrade IMAGE_MODEL to qwen2.5-vl-72b-instruct for better VLM quality
- Remove unused DocTreeNode import (lint fix)
- Clean up navigation tools dead code

Closes #132

* feat(agentic): reconcile navigation asset search flow (#136)

* refactor: remove legacy retrieval routes and standardize agentic orchestration with enhanced decision tracing and token tracking

* feat: implement structured DecisionTraceStep tracking and refine agentic navigation prompt constraints

* feat(agentic): reconcile navigation asset search flow

---------

Co-authored-by: suguanYang <wangbinqi77@gmail.com>
* feat: unify PDF document profile routing

* feat: add TOC profiling support and upgrade Qwen models to 3.6-flash

* fix: update Qwen model references to version 3.6-flash in AGENTS.md and README.md

* test: stabilize worker contract imports
…king (#143)

* refactor: streamline TOC handling and remove deprecated settings

- Removed PDF_PROFILE_TOC_ENABLED from configuration and adjusted related logic in document profiling.
- Simplified TOC detection logic in PDF and Atlas parsers, ensuring consistent behavior across document types.
- Updated tests to reflect changes in TOC handling and ensure proper functionality without the deprecated flag.

* feat: add page memory parse track

* feat: add usage_task tracking to various document processing components

- Introduced usage_task parameter in LLM calls across multiple services including summary_builder, react_loop, planner, and various document agent tools.
- Enhanced token tracking and stage profiling in document ingestion processes to improve performance monitoring and cost estimation.
- Updated relevant functions to utilize new token and stage tracking methods, ensuring accurate resource usage reporting.

Cherry-picked from feat/wuchengke/2026-06-11 (d5d7d042)

* fix: add parse_track column to test document insert helpers

The page_memory migration added a NOT NULL parse_track column to the
documents table, but the contract test helpers (contract_database.py,
test_job_creation_contract.py, test_documents_contract.py) were still
inserting documents without it, causing all retrieval contract tests
to fail with NotNullViolationError.

* fix: move imports inside test functions to survive module cache eviction

The worker contract conftest clears shared.core.config and app.*
modules from sys.modules between tests.  Top-level imports of settings
and service functions become stale references pointing at evicted
module objects.  Moving all imports inside each test function body
ensures the monkeypatch target and the function under test share the
same settings instance.

Also fixes the parse_track NOT NULL test failures from the previous
commit (verified: 174 passed, 0 failed locally with the exact CI
test command).
* Add anonymous self-hosted telemetry client

* Fix LocalStack SNS subscription confirmation

* Fix telemetry shutdown task wait
if doc is not None:
try:
doc.close()
except Exception:
if self._profile_plan_row is not None:
self._db.expunge(self._profile_plan_row)
self._profile_plan_row = None
except Exception:
@suguanYang
suguanYang merged commit a5a2e6e into staging Jun 16, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants