DealJockey MVP: Phase 4A + 4B (Templates & Seller Integration)#75
Open
DealJockey MVP: Phase 4A + 4B (Templates & Seller Integration)#75
Conversation
Create ad_buyer.booking package consolidating duplicated pricing, deal ID generation, and quote flow logic from unified_client.py, request_deal.py, and get_pricing.py into reusable modules. New modules: - booking/pricing.py: PricingCalculator with tier + volume discounts - booking/deal_id.py: generate_deal_id() utility - booking/quote_flow.py: QuoteFlowClient for deal data construction - booking/template_flow.py: TemplateFlowClient stub Refactored consumers to use centralized modules: - unified_client.py get_pricing/request_deal - tools/dsp/request_deal.py _create_deal_response - tools/dsp/get_pricing.py _format_pricing 31 new tests, 1424 existing tests pass (0 regressions). bead: buyer-te6b.1.6 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Implements deal template and supply path template management for DealJockey (Strategic Plan Sections 6.3 and 6.4): - Schema v3: deal_templates and supply_path_templates tables with indexes and migration from v2 - DealStore: full CRUD methods for both template types - ManageDealTemplateTool: create/read/list/update/delete deal templates with optional advertiser_id scoping (null = agency-wide) - ManageSupplyPathTemplateTool: create/read/list/update/delete supply path templates with scoring_weights validation (sum must equal 1.0) - 33 new tests covering all CRUD operations, validation, and edge cases - Updated schema version tests and dashboard test for v3 bead: buyer-te6b.1.13 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…to PricingCalculator - unified_client.py: remove unused generate_deal_id import (buyer-d9p) - discover_inventory.py: replace inline tier discount math with PricingCalculator from booking module (buyer-pnf) - Add tests verifying tiered price calculation in discovery results bead: buyer-d9p, buyer-pnf Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…ey-instantiate-from-template
Implements weighted scoring of supply paths on 4 dimensions: transparency (schain completeness), fee (intermediary cost), trust (seller reputation), and performance (historical delivery metrics). Supports scoring from raw supply path data or by deal_id lookup, comparing multiple paths with ranking, and custom weights from a supply_path_template. Default weights: transparency=0.25, fee=0.35, trust=0.20, performance=0.20. 22 tests covering scoring, custom weights, deal lookup, missing data handling, and multi-path ranking. bead: buyer-te6b.2.7 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Implements buyer-te6b.2.8: creates deals from stored deal templates by reading the template, applying optional overrides (pricing, targeting, flight dates), calling the seller API via internal booking modules, storing the new deal in the portfolio, and emitting deal.template_created event. Handles rejections with seller floor price details. 18 tests cover: successful instantiation, rejection handling, template not found, override application, event emission, portfolio storage, seller API errors, and CrewAI tool wrapper. bead: buyer-te6b.2.8 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…/dealjockey-v1-e2e
default_price was not a column in the deal_templates table, not in the allowed set in update_deal_template(), and not passed through in save_deal_template(). An LLM caller passing default_price to the update action would get a silent failure reported as "not found". This adds the column end-to-end: schema, INSERT, UPDATE allowed set, tool create pass-through, input schema description, and formatted read output. bead: buyer-5wx Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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.
Summary
DealJockey MVP — deal portfolio management agent for the buyer system. This combines Phase 4A (core MVP) and Phase 4B (templates & seller integration) into a single release.
Phase 4A — MVP DealJockey
Phase 4B — Templates & Seller Integration
Test plan
🤖 Generated with Claude Code