Skip to content

feat(runtime): collect adapter compute inventory - #60

Draft
xbzz1018 wants to merge 3 commits into
tiammomo:mainfrom
xbzz1018:feat/issue-29-runtime-adapter-collector
Draft

feat(runtime): collect adapter compute inventory#60
xbzz1018 wants to merge 3 commits into
tiammomo:mainfrom
xbzz1018:feat/issue-29-runtime-adapter-collector

Conversation

@xbzz1018

@xbzz1018 xbzz1018 commented Sep 9, 2026

Copy link
Copy Markdown

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 and
loopback tests, a disposable PostgreSQL collector integration test,
scripts/runtime-adapter-check.sh, node scripts/check-doc-links.mjs,
cargo fmt --all -- --check, and cargo clippy --locked --all-targets --all-features -- -D warnings.

The full scripts/check-all.sh Linux lifecycle gate remains for GitHub CI;
the local Windows/MINGW environment does not provide the required Linux
/tmp and /bin/sleep semantics. A separate compatibility smoke used 14
explicitly 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:

  • the fixed fleet-wide concurrency bound and per-adapter non-overlap;
  • retry timing and deterministic jitter at the delay cap;
  • graceful-shutdown ordering, deadline handling, and task abort behavior;
  • snapshot validation and idempotency;
  • credential, endpoint, Authorization, and upstream-body redaction;
  • the temporary dependency on feat(runtime): persist compute inventory snapshots #26 until its snapshot storage is merged.

@xbzz1018 xbzz1018 closed this Sep 9, 2026
Signed-off-by: lovett55 <xbzz101800@163.com>
@xbzz1018 xbzz1018 reopened this Sep 9, 2026
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.

Run bounded background collection for Runtime Adapter Compute inventory

2 participants