Skip to content

feat: state machine compliance scenarios for comply#375

Merged
bokelley merged 2 commits into
mainfrom
bokelley/async-state-workflows
Mar 22, 2026
Merged

feat: state machine compliance scenarios for comply#375
bokelley merged 2 commits into
mainfrom
bokelley/async-state-workflows

Conversation

@bokelley

Copy link
Copy Markdown
Contributor

Summary

  • Add 3 new comply scenarios to the media_buy track that test state machine correctness
  • media_buy_lifecycle: create -> pause -> resume -> get status (valid_actions) -> cancel
  • terminal_state_enforcement: create -> cancel -> try update (expect INVALID_STATE) -> try re-cancel (idempotent)
  • package_lifecycle: package-level pause/resume independent of media buy status
  • Add comply observations for missing valid_actions and pause/resume support
  • 33 new tests covering wiring, routing, requirements, and decision logic

Context: comply currently validates "can you call the tool and get a response" but not "do you implement the state machine correctly." These scenarios exercise the transitions formalized in adcp#1611. Also filed AdCP issues for undocumented state machines: #1612 (creative status), #1613 (account status), #1614 (SI session), #1616 (catalog/creative approval).

Test plan

  • npm run build passes
  • All 1252 tests pass (0 fail, 2 skipped)
  • New scenarios correctly registered in TRACK_DEFINITIONS, SCENARIO_REQUIREMENTS, DEFAULT_SCENARIOS
  • getApplicableScenarios includes/excludes scenarios based on tool presence
  • Code review: fixed undefined result overwrite bug in terminal_state_enforcement
  • Security review: no Must Fix findings

🤖 Generated with Claude Code

bokelley and others added 2 commits March 22, 2026 10:14
Add three new scenarios to the media_buy comply track that test state
transition correctness rather than just happy-path tool calls:

- media_buy_lifecycle: create -> pause -> resume -> get status -> cancel
- terminal_state_enforcement: reject updates to canceled/terminal buys
- package_lifecycle: package-level pause/resume independent of media buy

Also adds comply observations for valid_actions and pause/resume support.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@bokelley bokelley merged commit 9338bb4 into main Mar 22, 2026
8 checks passed
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