fix(a2a): mark deployedBeforeCancel on pipeline cancel after deploy activity - #204
Open
ruanzhengxin-zhuxing wants to merge 1 commit into
Open
fix(a2a): mark deployedBeforeCancel on pipeline cancel after deploy activity#204ruanzhengxin-zhuxing wants to merge 1 commit into
ruanzhengxin-zhuxing wants to merge 1 commit into
Conversation
…ctivity pipeline_canceled could fire right after a successful deploy while pendingNormalHandoff only recorded outcome=canceled, leaving no signal to reconcile already-created ROS stacks (orphaned cloud resources). Add a read-only deploy-evidence check before cancel publications: - detect stacks from the A2A snapshot (CreateStack already returned a stack_id) and pending/unavailable cleanup evidence; - stamp deployedBeforeCancel=true plus deployedStackIds on the pipeline_canceled terminal data and the switch_to_normal handoff data in both cancel paths (executor CancelledError branch and waiting-input sidecar cancel); - when deploy evidence exists but the cleanup ledger has no pending resources, fall back to cleanup.status=unavailable so downstream must reconcile against the recorded stacks instead of assuming a clean cancel. Evidence detection failures never block cancel publication.
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.
问题
Aone 需求 #84289704:Session
8fde0f19425b4a06b1473a9aeec63223/02b02665f3ff410d9c8d8df9f9e2addb中,deploying 步骤已输出“部署成功/开始执行部署”后 17s~2min 内触发pipeline_canceled,pendingNormalHandoff.Outcome仅记录canceled,未区分“部署前取消”与“部署后取消”,存在云资源孤儿风险。方案
取消发布前增加只读部署证据核对钩子
_deployed_before_cancel_evidence:stacks(CreateStack 已返回 stack_id 即视为已发起部署)+ cleanup 数据中的 pending/unavailable 资源。CancelledError分支、waiting-input sidecar cancel)的pipeline_canceledterminal data 与pipeline_handoff_readyhandoff data 写入deployedBeforeCancel: true与deployedStackIds,随pendingTerminal/pendingNormalHandoff/normalHandoff持久化,触发下游按 stack 证据对账。cleanup.status=unavailable,避免下游误认为干净取消。测试
tests/a2a全量 1438 通过;ruff check/ty check通过;全量 pytest 13259 通过(18 个失败项在基线 d470b40 上同样失败,属沙箱环境问题)。