fix(agent99): preserve callback execution identity
All checks were successful
CD Pipeline / workflow-shape (push) Successful in 1s
CD Pipeline / cancel-stale-cd (push) Has been skipped
CD Pipeline / tests (push) Successful in 2m51s
CD Pipeline / build-and-deploy (push) Successful in 15m25s
AWOOOI Harbor 110 Local Repair / workflow-shape (push) Successful in 1s
AWOOOI Harbor 110 Local Repair / harbor-110-local-repair (push) Successful in 18s
CD Pipeline / post-deploy-checks (push) Successful in 2m42s

This commit is contained in:
Your Name
2026-07-17 08:08:34 +08:00
parent 3ac462e15d
commit 3941de36a9
2 changed files with 22 additions and 4 deletions

View File

@@ -150,6 +150,19 @@ def test_agent99_completion_callback_uses_bounded_canonical_incident_id() -> Non
assert "alert_id = if ($alertId)" not in source
def test_agent99_completion_callback_preserves_canonical_execution_identity() -> None:
source = _CONTROL_PLANE.read_text(encoding="utf-8")
assert '$identity = Get-AgentObjectValue $Result "identity" $null' in source
assert 'Get-AgentObjectValue $identity "project_id" ""' in source
assert 'Get-AgentObjectValue $identity "run_id" ""' in source
assert 'Get-AgentObjectValue $identity "trace_id" ""' in source
assert 'Get-AgentObjectValue $identity "work_item_id" ""' in source
assert "run_id = if ($canonicalRunId)" in source
assert "trace_id = if ($canonicalTraceId)" in source
assert "work_item_id = if ($canonicalWorkItemId)" in source
def test_agent99_backupcheck_reads_offsite_and_escrow_without_mutation() -> None:
source = _CONTROL_PLANE.read_text(encoding="utf-8")
readback = source[