Skip to content

fix(studio): validate updates against target AgentKit CLI pin - #1125

Draft
zyn080302 wants to merge 1 commit into
volcengine:mainfrom
zyn080302:fix/studio-update-cli-contract-20260917
Draft

zyn080302 wants to merge 1 commit into
volcengine:mainfrom
zyn080302:fix/studio-update-cli-contract-20260917

Conversation

@zyn080302

Copy link
Copy Markdown
Contributor

Studio self-updates currently reject a valid release when its AgentKit CLI pin differs from the running Studio's pin, failing during bundle extraction with AgentKit CLI archive checksum is invalid. Thin bundles hit the same mismatch before falling back to a full bundle that also fails.

The updater now reads the target VeADK wheel's literal Linux/x64 CLI contract using bounded AST parsing, without importing downloaded code. It checks full archives and thin runtime manifests against that target pin after the existing release size/SHA verification. Publisher build calls retain their fixed source pin. Missing, dynamic, ambiguous, oversized, or mismatched target contracts fail closed.

Cross-version regressions cover two historical installed pins, both providers, full/thin updates, artifact-probe fallback, release digest/size failures, and target wheel/CLI mismatch. The regression file runs in both mandatory release gates; every workflow Python command remains pinned to the frozen environment.

Validation: the original main implementation fails 24 regression cases; all 204 related tests pass on Python 3.12, including 28 new cross-version and gate cases. Ruff, Pyright (zero errors), pre-commit with secret scanning, and workflow shell syntax checks pass. Existing installations need one control-plane deployment of the corrected updater before subsequent in-product updates can cross CLI versions. A Release Server-only rollout cannot replace an already installed validator. Online recovery has not been performed in this change.

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