Skip to content

feat: independent maintenance proxy policy with bounded jittered scheduling - #453

Open
qiantingwl wants to merge 1 commit into
aimod-cc:betafrom
qiantingwl:feat/maintenance-egress
Open

qiantingwl wants to merge 1 commit into
aimod-cc:betafrom
qiantingwl:feat/maintenance-egress

Conversation

@qiantingwl

Copy link
Copy Markdown

Summary

Implement opt-in, operation-specific proxy selection for account balance, check-in and rewards, independent of model/account proxy settings.

Host changes

  • Authenticated maintenance-policy API and web/desktop Network Proxies settings card.
  • Direct / automatic / fixed entrance selection, using the existing native proxy pool.
  • Current defaults inherited by newly registered/imported accounts without writing account proxy bindings.
  • Global/per-entrance concurrency, shared randomized launch spacing, bounded queue, per-account serialization, successful-balance cache and transport cooldown.
  • No direct fallback when a configured proxy is unavailable; no automatic replay of potentially committed reward/check-in mutations.
  • Versioned capability negotiation: unsupported plugins fail closed with an upgrade-required message.

Compatibility

Default-off. One compatible host upgrade is required; an old host cannot acquire the new management API solely through a plugin update. Afterwards additional providers can implement the same optional capability in plugin updates. The initial provider implementation covers Raccoon and Loomy.

An external HTTP/SOCKS5 aggregation service remains one native pool entrance; its internal downstream rotation is separate from host entrance rotation. No retired subscription subsystem is restored. No real subscription URLs, credentials, account exports, deployment addresses or logs are included.

Verification

  • Host production binary builds successfully.
  • Web/desktop islands TypeScript check and production build pass.
  • 8 tests execute the actual production scheduler module in a small harness (only persistence/proxy-pool adapters are stubbed).
  • 28 end-to-end checks run the real host + plugin in a loopback-only network namespace with synthetic accounts and upstream/proxy servers: authentication, validation, persistence across restart, all modes, balance/check-in/rewards, new-account inheritance, unchanged account.proxy, and disable-to-legacy behavior.
  • Companion plugin: 2 SDK tests and 48 real-process RPC fixture cases pass, including before/after model-plan comparison (excluding per-request trace IDs).
  • The upstream beta baseline's full host --lib test target does not compile: existing RequestQuery initializer fields in api/pipeline.rs and send_with_retry test arity in core/upstream/provider_loop/tests.rs. Reproduced on the unmodified baseline; not fixed in this feature PR. Production build and isolated tests are reported separately, not as a full-suite pass.

Boundaries

No live production deployment, real account claims, paid model requests or claims of real-provider availability. No dedicated mobile settings UI yet; use the web panel. No version bump, tag or release. See docs/maintenance-egress.md and the reproducible test scripts.

Companion provider PR: ProvidersPlugin/Agent2Providers#33

🤖 本条回复由 AI Agent 生成
Generated by an AI agent.

xiarunjie added a commit to xiarunjie/Agent2API that referenced this pull request Nov 4, 2026
…bounded jitter

来源 aimod-cc#453(相对 v3.4.0 基线 mergeable=true,逐文件取该 PR head 内容组装)。先在 audit 分支上过闸。
xiarunjie added a commit to xiarunjie/Agent2API that referenced this pull request Nov 4, 2026
合并 aimod-cc#305 / aimod-cc#434 时用的是「取 PR head 的整个文件」,而这两个 PR 的 base 分别是
`a55e1eb1` / `bd36938d`(比 3.4.0 早),整文件覆盖把基线里更新的实现一起退回了
旧版本,后果是库编译报错(`adapter.host()` / `leased()` / `deferred()` /
`error_policy_async` / 参数个数不符),warm-cache 在 Windows 上直接编译失败。

现在这 4 个文件改为三方合并的结果:
  ours  = 3.4.0 基线(094c6e1b)
  base  = 该 PR 自己声明的 base 提交
  theirs= 该 PR 的 head
对 rpc.rs 再做一次阶段二合并(base = 0add462,head = aimod-cc#453),把 aimod-cc#434 与 aimod-cc#453
两处增量都留住(实测合并无冲突)。

教训已记:跨基线的 PR 不能整文件搬,必须三方合并后再落。
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