fix(agent): unify CLI probe pipeline with classified failures and adaptive slow-probe recheck#678
Merged
Merged
Conversation
added 4 commits
July 24, 2026 11:26
…ration Replace the stringly-typed probe error with ProbeFailure variants that separate command_not_found / version_probe_failed (exit != 0, corrupted install) / version_probe_timeout (slow load, not proof of corruption), and report the measured --version duration on success. Groundwork for adaptive slow-probe handling (#675).
- inline --version timeout no longer condemns an agent to Missing: the row stays installed (Unchecked), is queued, and a background recheck with a 30s budget settles it, persisting a startup snapshot with the measured duration so the next hydrate skips the inline probe for known-slow CLIs - a failing --version (exit != 0) now means corrupted-install: installed + Offline with version_probe_failed, instead of Missing - manual health check is never short-circuited by a stale availability verdict and always reaches its real probe; reload_one no longer re-runs --version on every cache refresh (it stomped fresher manual snapshots) - builtin claude/codex manual check runs PATH + --version (was PATH-only); commandless builtin fallback gets the same classified treatment and the PATH-only cli_detect side door is removed
kaizhou-lab
enabled auto-merge (squash)
July 24, 2026 06:03
kaizhou-lab
pushed a commit
that referenced
this pull request
Jul 24, 2026
…r delta table The mixed-scope agent_metadata catalog let one agent_id have a global template row plus per-user copy-on-write copies. Machine-level startup probes (unified in main #678) took the no-acting-user write path, which minted system_default_user copies on every AionPro boot — the catalog's single source of truth forked, and identity fields could drift out of sync across copies. - agent_metadata is now UNIQUE(agent_id): exactly one row per agent (builtin = user_id NULL; custom = creator's id as an ownership attribute). No copies. - New agent_user_state(user_id, agent_id) holds every per-user delta: enabled toggle, command/env overrides, session-scoped availability, handshake caches. Reads LEFT JOIN and overlay user-first; the availability snapshot is taken whole from the winning side so its fields never mix. - Startup probes UPDATE the catalog row in place (never insert); session outcomes / manual checks upsert the user's delta row. - AionPro startup no longer runs the default-user generated-assistant reconcile or ingests the legacy shared skill directory (unattributable files); each real user materializes generated assistants lazily. Channel default-assistant resolution triggers that lazy materialization via a composition-layer port so the bare fallback still resolves. - Gate e2e: after a full AionPro boot, no ownership column outside users holds a system_default_user row. Handshake/binding tests updated to the single-row model.
piorpua
pushed a commit
that referenced
this pull request
Jul 24, 2026
🤖 I have created a release *beep* *boop* --- ## [0.1.52](v0.1.51...v0.1.52) (2026-07-24) ### Features * **project:** wire project-bind side branch into owner creation ([#676](#676)) ([300c833](300c833)) ### Bug Fixes * **agent:** unify CLI probe pipeline with classified failures and adaptive slow-probe recheck ([#678](#678)) ([67945d2](67945d2)) * **channel:** quiet WeChat poll log noise with state-transition logging and exponential backoff ([#683](#683)) ([ea4da55](ea4da55)) * **process:** allow whitespace in workspace cwd segments ([#410](#410) parity) ([#674](#674)) ([c344b02](c344b02)) * **session:** restore codex slash commands + recover dead resume anchors on the direct-CLI path ([#679](#679)) ([7b60611](7b60611)) * **team:** converge system/lifecycle wakes into a team run ([#680](#680)) ([38facd7](38facd7)) --- 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>
ChristianLuciani
added a commit
to ChristianLuciani/AionCore
that referenced
this pull request
Jul 25, 2026
Bring feat/ollama-launch-acp up to date with upstream main. Conflict resolutions: - Keep both mcp_resolve (session-port) and ollama modules - Session-port still routes claude/codex by default; bypass to ACP when use_ollama && ollama_compatible so env injection can apply - Drop cli_detect.rs (removed upstream in iOfficeAI#678); ollama field only needed on remaining AgentMetadata test fixtures - Restore OLLAMA_COMPATIBLE_BACKENDS constants + tests on main layout
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Closes #675
Summary
cli_probe.rs):command_not_found/version_probe_failed(exit != 0 — corrupted install, fails fast) /version_probe_timeout(slow load — NOT proof of corruption), with the measured--versionduration reported on success and carried in every failure message.Unchecked(which the generated-assistant reconcile already materializes, so the agent stays visible in the assistant list), and is queued for a background recheck.registry.rs): afterhydrate(), pending agents are re-probed sequentially with a 30s budget off the readiness path; the outcome is persisted as a startup-kind snapshot with the measured latency.--version(exit != 0) now means corrupted-install: installed +Offlinewithversion_probe_failedand the stderr head, instead ofMissing("not installed") which sent users down the wrong path.available=falseverdict, always reaches its real probe, and a success restores the agent to online.reload_oneno longer re-runs--versionon every cache refresh (it double-probed every manual check and stomped fresher manual snapshots with a startup-kind verdict).--version(was PATH-only, so a corrupted install showed online). They do not speak ACP, so no session/new-style handshake is added —--versionintegrity is their deep check.cli_detectside door is removed; the fallback branch uses the same classified probe engine.initializehandshake with classifiedcommand_not_found/acp_init_failed/auth_required), Aion CLI provider-readiness check (no_provider), and theskip_version_probelock flag (still onlysigit; pi keeps its integrity probe).Background
Sentry feedback ELECTRON-3PN ("公司内网中pi链接不上"):
pi-acp's prerequisitepiCLI (~19,300 files installed) takes 5.6–6.8s to cold-load--versionon the affected Windows machine, so the fixed 5s probe always timed out and AionUi treated a correctly-installed agent as not installed, with no diagnosable error anywhere. The same user's db shows Claude Code manual-check latency at 3753ms — one AV scan away from the same cliff. See #675 for the full analysis and code map.Verification
cargo nextest run --workspace: 7431 passed, 0 failed (18 skipped)cargo clippy --workspace --all-targets: cleanjust migration-check: passed (no migrations touched)