Skip to content

feat(training): adopt SDK 14 media-buy lifecycle - #6688

Merged
bokelley merged 10 commits into
mainfrom
continue-branch-work-v3
Aug 19, 2026
Merged

bokelley merged 10 commits into
mainfrom
continue-branch-work-v3

Conversation

@bokelley

@bokelley bokelley commented Aug 19, 2026 •

Copy link
Copy Markdown
Contributor

Closes #6646

Summary

  • upgrade the public training agent to @adcp/sdk 14 and the AdCP 3.2 beta envelope
  • make the seven compact media-buy lifecycle tools the default discovery surface while retaining frozen 3.0 compatibility
  • implement native product purchase, proposal acceptance, amendment, cancellation, media-buy controls, action discovery, and feed/pricing versioning
  • preserve proposal products, accepted snapshots, revisions, caller identity, and trusted account scope across compact lifecycle requests
  • serialize all media-buy mutations across operational controls, legacy updates, and accepted amendments, including authoritative reload and governance revalidation under the shared lock
  • add exact compliance gates for the five compact lifecycle variants

Validation

  • expert code review: approved, no blockers
  • expert protocol review: approved, no blockers
  • full pre-commit suite: 451 files, 6,340 passed, 30 skipped
  • training-agent unit suite: 655 passed
  • governance intent-binding suite: 35 passed
  • controller unit suite: 78 passed
  • training-agent tenant smoke: 34 passed
  • 3.0 compatibility integration: 8 passed
  • current storyboard matrix: all tenants green; sales 144 clean / 315 passing; all five exact lifecycle gates green
  • released 3.0.24 storyboard matrix: all tenants green; sales 65 clean / 302 passing
  • typecheck, changeset policy, shell syntax, version sync, and diff checks: passed

Release note

Includes a patch Changeset for the public training-agent lifecycle update.

@bokelley bokelley changed the title [codex] Adopt SDK 14 media-buy lifecycle feat(training): adopt SDK 14 media-buy lifecycle Aug 19, 2026

@aao-secretariat aao-secretariat Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ladon verdict: Escalate to human review

Escalate — gated path requires human/CODEOWNERS review.

This PR modifies .github/workflows/training-agent-storyboards.yml, which falls under the hard, path-based approval gate (gated_paths: true). The current review_decision is REVIEW_REQUIRED, not APPROVED, so decision-table row 2 fires before any finding-based outcome: the gate is not satisfied and the PR cannot be approved or plain-commented.

Escalation reasons

  • .github/workflows/training-agent-storyboards.yml (modified) matches the gated .github/workflows/** glob; human/CODEOWNERS approval is required and review_decision is REVIEW_REQUIRED.

Medium findings (informational — not blocking on their own)

  • server/src/training-agent/task-handlers.ts — control_media_buy has no session mutex; concurrent same-revision controls can silently lose an update. A real concurrency window on a durable mutation path; worth a human reviewer's attention alongside the gated-file review.

No critical/high findings were reported. The SDK 14 / AdCP 3.2-beta.2 adoption, the handleUpdateMediaBuy atomicity rewrite, terms_digest binding parity, and multi-tenant scoping of the task store were all reviewed as sound. This escalation is driven by the workflow-file approval gate, not by a code defect.

Medium findings

  • server/src/training-agent/task-handlers.ts — control_media_buy has no session mutex; concurrent same-revision controls can silently lose an update

Why human review

  • .github/workflows/training-agent-storyboards.yml (modified) is under the hard .github/workflows/** approval gate and review_decision is REVIEW_REQUIRED — human/CODEOWNERS approval required before merge
  • This PR touches a path under a hard, non-overridable approval gate (.github/workflows/training-agent-storyboards.yml (modified) matches .github/workflows/**) and the current GitHub review decision is 'REVIEW_REQUIRED', not APPROVED. This is a hard gate enforced in code — Ladon cannot auto-approve until a human/CODEOWNERS approval is recorded, regardless of how clean the diff is.

@aao-secretariat aao-secretariat Bot added the ladon/needs-human-review Ladon has escalated this PR for human review. label Aug 19, 2026

@aao-secretariat aao-secretariat Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ladon verdict: Escalate to human review

Escalate — hard approval gate on .github/workflows/** not yet satisfied.

This PR modifies .github/workflows/training-agent-storyboards.yml, which matches the deterministic gated path .github/workflows/** (gated_paths: true). The current review_decision is REVIEW_REQUIRED, not APPROVED, so decision-table row 2 fires: the outcome must be escalate until a human/CODEOWNERS approval is recorded — regardless of how clean the diff is.

The delta itself is a focused, well-executed concurrency fix: a per-session media-buy mutation mutex now wraps handleUpdateMediaBuy, handleControlMediaBuy, and the existing-proposal acceptance path (locked wrapper + *Unlocked core to avoid re-entrancy), with bounded 2s acquisition, a 120s in-flight TTL fail-safe, and evict-under-lock/flush-before-release ordering. This directly resolves the prior Medium finding (control_media_buy had no session mutex), which is now covered by three new race tests. No new Critical/High/Medium findings in this run.

Prior decision was also escalate for the same gated-path reason; it persists here because the gate condition remains unsatisfied. Once review_decision becomes APPROVED, this PR falls through to a normal clean-diff approval.

Escalation reason: .github/workflows/training-agent-storyboards.yml (modified) is under the hard .github/workflows/** approval gate and review_decision is REVIEW_REQUIRED — human/CODEOWNERS approval required before merge.

Why human review

  • .github/workflows/training-agent-storyboards.yml (modified) is under the hard .github/workflows/** approval gate and review_decision is REVIEW_REQUIRED — human/CODEOWNERS approval required before merge
  • This PR touches a path under a hard, non-overridable approval gate (.github/workflows/training-agent-storyboards.yml (modified) matches .github/workflows/**) and the current GitHub review decision is 'REVIEW_REQUIRED', not APPROVED. This is a hard gate enforced in code — Ladon cannot auto-approve until a human/CODEOWNERS approval is recorded, regardless of how clean the diff is.

@bokelley
bokelley enabled auto-merge (squash) August 19, 2026 17:56
@bokelley

Copy link
Copy Markdown
Contributor Author

@ohalushchak-exadel This is ready for the required human review of the workflow-file change: CI is 45/45 green, both expert reviews have no blockers, and the latest Ladon run confirms the prior concurrency finding is resolved with no new findings. Squash auto-merge is enabled once approved. Thank you!

@bokelley
bokelley merged commit cae33f5 into main Aug 19, 2026
45 checks passed
@bokelley
bokelley deleted the continue-branch-work-v3 branch August 19, 2026 18:30
bokelley added a commit that referenced this pull request Aug 19, 2026
…ta.2 (#6690)

The public router no longer supports the 3.2-beta.0 ordinal — it downshifts
to 3.1, causing the runnable constrained-seller example's capability assertion
to fail. Pin all three media-buy guide files to 3.2-beta.2, which the public
seller confirmed healthy via #6688.

Refs #6557


Claude-Session: https://claude.ai/code/session_01KreMofDsUsj2aNwK3tuH7x

Co-authored-by: Claude <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ladon/needs-human-review Ladon has escalated this PR for human review.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Training agent: adopt the complete AdCP 3.2 media-buy lifecycle

2 participants