Skip to content

fix(agent): avoid full availability refresh on reads#566

Merged
kaizhou-lab merged 7 commits into
mainfrom
fix/agent-management-avoid-full-probe
Jul 3, 2026
Merged

fix(agent): avoid full availability refresh on reads#566
kaizhou-lab merged 7 commits into
mainfrom
fix/agent-management-avoid-full-probe

Conversation

@kaizhou-lab

@kaizhou-lab kaizhou-lab commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Remove the legacy full-agent availability refresh path from normal reads, startup hydration, custom-agent mutations, and the unused /api/agents/refresh endpoint.
  • Keep agent availability state cache-backed: manual health checks only update the requested agent, and agents without a probe result are surfaced as Unchecked instead of being assumed available.
  • Add API status support for Unchecked so the frontend can display unknown/unprobed availability accurately.
  • Fix backend daily log rotation so cross-day writes go to the matching YYYY/MM/DD/YYYY-MM-DD.{aioncore,aionrs}.log directory instead of writing the new date under the previous day directory.

Why

Opening or refreshing the Agents page was triggering repeated full availability probes for all agents. That produced thousands of repeated node runtime probe decided / agent available / agent unavailable log lines and unnecessary path/runtime checks. After removing the full refresh, unchecked historical rows need to remain visibly unknown rather than silently becoming available.

A separate log-rotation issue also made cross-day debugging confusing: files such as 2026-07-03.aioncore.log could appear under 2026/07/02/.

Notable Changes

  • Management and assistant list reads now reuse stored availability snapshots instead of probing all built-in agents.
  • Explicit single-agent health checks no longer invalidate and rehydrate the entire registry.
  • The dead /api/agents/refresh endpoint was removed.
  • Availability DTOs now include Unchecked for rows that have not been probed.
  • Daily log writers compute the local date on each write and reopen the file when the day changes.

Verification

  • cargo fmt --all -- --check
  • cargo test -p aionui-app bootstrap::tracing_init::tests
  • cargo test -p aionui-ai-agent
  • cargo clippy -p aionui-app -p aionui-ai-agent -- -D warnings

@kaizhou-lab kaizhou-lab merged commit 1ffb7aa into main Jul 3, 2026
5 of 6 checks passed
@kaizhou-lab kaizhou-lab deleted the fix/agent-management-avoid-full-probe branch July 3, 2026 04:02
piorpua pushed a commit that referenced this pull request Jul 3, 2026
🤖 I have created a release *beep* *boop*
---


##
[0.1.42](v0.1.41...v0.1.42)
(2026-07-03)


### Features

* **assistant:** 官方助手默认关闭 + 固定顺序 + 一次性重置迁移
([#567](#567))
([3e30b02](3e30b02))


### Bug Fixes

* **agent:** align unchecked availability with team runtime selection
([#571](#571))
([f80b0ce](f80b0ce))
* **agent:** avoid full availability refresh on reads
([#566](#566))
([1ffb7aa](1ffb7aa))
* **cron:** preserve existing conversation jobs across lifecycle changes
([#572](#572))
([fa4217a](fa4217a))
* **mcp:** support aionrs config path subcommand with legacy fallback
([#568](#568))
([72cfba1](72cfba1))
* preserve ACP config catalogs on resume
([#570](#570))
([a9c1955](a9c1955))
* preserve Linux GLIBC baselines
([#573](#573))
([ab6e227](ab6e227))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
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