Skip to content

feat(agent): add bounded background task repository - #166

Merged
yuluo-yx merged 2 commits into
agentic-ai-java:mainfrom
xiaowu0203:feat/118-bounded-task-repository
Oct 15, 2026
Merged

yuluo-yx merged 2 commits into
agentic-ai-java:mainfrom
xiaowu0203:feat/118-bounded-task-repository

Conversation

@xiaowu0203

Copy link
Copy Markdown
Contributor

Confirm: contributing to ARGI. Fixes #118.

Summary

Add an opt-in bounded local implementation alongside TaskRepository, enabled through the existing TaskToolsBuilder.taskRepository(...) injection point. Preserve DefaultTaskRepository and existing default behavior.

  • Configure execution slots, waiting capacity, retained result count and retention time; reject submissions before invoking the Supplier when capacity is full.
  • Reject duplicate task IDs atomically to prevent duplicate execution. Automatic cleanup only removes safely finished records; cancelling a handle does not release a running Supplier's ID or execution slot prematurely.
  • Make executor ownership explicit and support Spring bean destruction callbacks. Close repository-owned resources without shutting down caller-provided executors.
  • Add tests for admission limits, concurrent duplicate submissions, result retention, cancellation and shutdown, including compatibility checks for existing APIs and Task/TaskOutput formats.

Validation

  • Environment: Windows, JDK 21.0.8 and Maven 3.10.0, targeting Java 17 with --release 17. Tests were not run on a JDK 17 runtime.
  • All 57 task tests passed.
  • Independent neutral API consumer compilation passed.
  • Spotless, Checkstyle, Spring JavaFormat and changed-file license-header checks passed.
  • Module regression: 2017 tests, with 1786 passed, 218 skipped and 13 existing failures/errors. The failure set matches the unmodified baseline; no new failures were observed.

@yuluo-yx
yuluo-yx merged commit 3402f45 into agentic-ai-java:main Oct 15, 2026
7 checks passed
yuluo-yx pushed a commit that referenced this pull request Oct 17, 2026
* feat(agent): add bounded background task repository

Refs #118.

* chore(agent): exclude standalone bounded task guide

Refs #118.
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.

[P0][T01] 提供有界后台任务仓库与生命周期管理

2 participants