Skip to content

Conversation

@bokelley
Copy link
Collaborator

Summary

Renames media buy status values to more clearly communicate their meaning:

  • "pending""ready" (scheduled to activate at flight start)
  • "pending_manual""pending_approval" (requires manual approval)

Changes

Status Terminology Updates

  1. "ready" status - For media buys scheduled to start in the future

    • Clearer than "pending" - indicates the campaign is configured and ready to go live
    • Automatically activates when flight start date arrives
  2. "pending_approval" status - For media buys requiring manual approval

    • More descriptive than "pending_manual"
    • Consistent with workflow terminology throughout the system

Files Modified

  • src/core/schemas.py - Updated MediaBuyDeliveryData status literal type
  • src/core/main.py - Updated status assignment logic in 3 locations + valid_statuses list
  • templates/media_buy_approval.html - Updated approval UI checks (2 locations)
  • templates/workflows.html - Updated workflow status display
  • tests/unit/test_adcp_contract.py - Updated test with status_filter
  • tests/integration/test_delivery_simulator_restart.py - Updated database query
  • tests/integration/test_workflow_with_server.py - Updated status check logic

Testing

✅ All unit tests pass (593 passed)
✅ All integration tests pass (192 passed)
✅ All AdCP contract tests pass (46 passed)
✅ No breaking changes to existing functionality

Impact

  • User-facing: Admin UI displays more descriptive status labels
  • API: Status values in responses changed (clients may need updates)
  • Internal: Clearer code intent with self-documenting status names

Migration Notes

If any external systems check for "pending" status, they should update to check for "ready" status instead.

Changes:
- Rename "pending" to "ready" for media buys that will activate at flight start
- Rename "pending_manual" to "pending_approval" for media buys awaiting approval
- Update all status logic, templates, and tests to use new terminology

The new names better communicate intent:
- "ready" = scheduled to go live when flight dates arrive
- "pending_approval" = requires manual approval to proceed

Updated files:
- src/core/schemas.py: MediaBuyDeliveryData status literal
- src/core/main.py: Status assignment logic and valid_statuses list
- templates/: UI checks for approval status
- tests/: Status assertions updated to match new values

All AdCP contract tests pass with new status values.
@bokelley bokelley merged commit ded9501 into main Oct 13, 2025
8 checks passed
bokelley added a commit that referenced this pull request Oct 14, 2025
Merged latest changes from main including:
- Product pricing display and migration to pricing_options table (#369)
- Update media buy fix for database-persisted buys (#380)
- Automatic creative preview fetching (#379)
- Creative sync improvements (#378, #376, #373)
- Budget field access fixes (#374)
- UI improvements (#377, #375, #372)

Conflict Resolution:
- src/core/main.py: Combined debug logging from main with helper function from our branch
- Kept both improvements: stderr debug prints + create_get_products_request() helper

No conflicts in schema files - automatic merges succeeded.
danf-newton pushed a commit to Newton-Research-Inc/salesagent that referenced this pull request Nov 24, 2025
Changes:
- Rename "pending" to "ready" for media buys that will activate at flight start
- Rename "pending_manual" to "pending_approval" for media buys awaiting approval
- Update all status logic, templates, and tests to use new terminology

The new names better communicate intent:
- "ready" = scheduled to go live when flight dates arrive
- "pending_approval" = requires manual approval to proceed

Updated files:
- src/core/schemas.py: MediaBuyDeliveryData status literal
- src/core/main.py: Status assignment logic and valid_statuses list
- templates/: UI checks for approval status
- tests/: Status assertions updated to match new values

All AdCP contract tests pass with new status values.
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.

2 participants