Skip to content

Optimize Explorer#531

Open
pan-x-c wants to merge 11 commits intoagentscope-ai:mainfrom
pan-x-c:feature/optmize_explorer
Open

Optimize Explorer#531
pan-x-c wants to merge 11 commits intoagentscope-ai:mainfrom
pan-x-c:feature/optmize_explorer

Conversation

@pan-x-c
Copy link
Copy Markdown
Collaborator

@pan-x-c pan-x-c commented Apr 25, 2026

Description

This pull request introduces several improvements and new features to the Trinity explorer's dynamic timeout mechanism and task result handling pipeline. The main changes include adding a warmup step threshold for dynamic timeout activation, implementing staged task payload management in the experience pipeline, and updating the explorer and scheduler to support event-driven task completion and payload cleanup. The documentation and tests have also been updated accordingly.

Dynamic timeout improvements:

  • Added a warmup_min_steps parameter to the dynamic timeout configuration, ensuring that dynamic timeout is only enabled after a minimum number of fully observed steps. This prevents premature timeout adjustments based on insufficient data. [1] [2] [3] [4] [5]
  • Updated the documentation (both English and Chinese) to describe the new warmup_min_steps option and clarify the dynamic timeout mechanism. [1] [2]

Experience pipeline enhancements:

  • Introduced methods in experience_pipeline.py to stage, finalize, drain, and abort task payloads for each batch, enabling more flexible and reliable management of experience data before processing. [1] [2]

Explorer and scheduler integration:

  • Updated the explorer to use event-driven task completion and buffer task results per step using the new ExploreStepBuffer dataclass. This allows for more precise control over when and how task results are processed and finalized. [1] [2] [3] [4] [5] [6]
  • Modified the scheduler and its tests to support and verify the new staged payload management and event-driven completion logic, including proper cleanup and compatibility with existing result retrieval methods. [1] [2] [3] [4] [5]

Testing:

  • Added comprehensive tests for dynamic timeout warmup, staged payload handling, event-driven task completion, and cleanup of orphaned payloads to ensure robustness and backward compatibility.

These changes collectively improve the reliability, flexibility, and transparency of the explorer's task scheduling and experience data processing pipeline.

Checklist

Please check the following items before code is ready to be reviewed.

  • Code has passed all tests
  • Docstrings have been added/updated in Google Style
  • Documentation has been updated
  • Code is ready for review

@pan-x-c
Copy link
Copy Markdown
Collaborator Author

pan-x-c commented Apr 25, 2026

/unittest-diff

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.

1 participant