feat(runtime): collect adapter compute inventory - #60
Draft
xbzz1018 wants to merge 3 commits into
Draft
Conversation
Signed-off-by: lovett55 <xbzz101800@163.com>
Signed-off-by: lovett55 <xbzz101800@163.com>
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.
Depends on #26
Closes #29
Run bounded background collection for Runtime Adapter Compute inventory.
Starts one serial collection loop for every enabled Runtime Adapter, performs
an immediate capabilities-first Compute read, persists only validated
observations through the Enterprise Ledger, and applies bounded exponential
backoff with deterministic per-adapter jitter after failures. A shared
four-permit semaphore bounds fleet-wide work while adapter failures remain
isolated.
Collection participates in graceful shutdown, stops starting new attempts after
draining begins, and waits for in-flight work for up to 10 seconds. Metrics and
logs expose only bounded error classes and configured adapter IDs. No
credentials, Authorization headers, upstream bodies, origins, admin routes,
Runtime Adapter mutations, GPU control, Provider routing, dashboard UI, or
provider-specific behavior are included.
Verified with
scripts/dev.sh check --backend, the Runtime Adapter unit andloopback tests, a disposable PostgreSQL collector integration test,
scripts/runtime-adapter-check.sh,node scripts/check-doc-links.mjs,cargo fmt --all -- --check, andcargo clippy --locked --all-targets --all-features -- -D warnings.The full
scripts/check-all.shLinux lifecycle gate remains for GitHub CI;the local Windows/MINGW environment does not provide the required Linux
/tmpand/bin/sleepsemantics. A separate compatibility smoke used 14explicitly authorized third-party relay generation calls across representative
OpenAI-compatible and Anthropic paths; those calls are regression evidence for
the unchanged Provider boundary, not Runtime Adapter acceptance evidence. No
credentials or response bodies are included.
Areas for careful review: