Merged
Conversation
|
| GitGuardian id | GitGuardian status | Secret | Commit | Filename | |
|---|---|---|---|---|---|
| 21837872 | Triggered | Generic High Entropy Secret | d00a082 | scripts/test-sales-agent-local-mcp.sh | View secret |
🛠 Guidelines to remediate hardcoded secrets
- Understand the implications of revoking this secret by investigating where it is used in your code.
- Replace and store your secret safely. Learn here the best practices.
- Revoke and rotate this secret.
- If possible, rewrite git history. Rewriting git history is not a trivial act. You might completely break other contributing developers' workflow and you risk accidentally deleting legitimate data.
To avoid such incidents in the future consider
- following these best practices for managing and storing secrets including API keys and other credentials
- install secret detection on pre-commit to catch secret before it leaves your machine and ease remediation.
🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.
danf-newton
pushed a commit
to Newton-Research-Inc/salesagent
that referenced
this pull request
Nov 24, 2025
…lean-package-fixes fix: sales agent logic
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
This PR fixes multiple issues with media buy creation, package data consistency, and status reporting across auto-approved and manually-approved workflows.
Changes
1. Fixed Package Data Consistency (Auto-Approve vs Manual Approve)
Problem: Manual approval responses returned minimal package data (only 4 fields), while auto-approval returned complete data (budget, targeting, creative_ids, etc.).
Fix: Both manual approval paths now serialize the full package object using
model_dump_internal()to return consistent, complete data.Files Changed:
src/core/main.py(lines 4817-4833, 4987-5003)Impact: Buying agents now receive consistent package data regardless of approval path.
2. Added Package Data Fields to Auto-Approval Path
Problem: Auto-approved media buys weren't saving
product_id,budget, andtargeting_overlayto MediaPackage records, causing incomplete display in UI and inconsistent responses.Fix:
product_idandbudgetfields toMediaPackageschemaFiles Changed:
src/core/schemas.py(MediaPackage class)src/core/main.py(lines 5162-5188)Impact: Auto-approved packages now have complete metadata in database and responses.
3. Fixed Package Status Logic for Creative Approval
Problem: Package status was set to
COMPLETEDwhen creatives were assigned, even if they were still pending approval.Fix: Status now correctly reflects creative approval state:
INPUT_REQUIRED: Manual approval neededWORKING: Creatives still needed or pending approvalCOMPLETED: Creatives assigned AND approvedFiles Changed:
src/core/main.py(lines 5442-5452)Impact: Buying agents can now accurately determine if a media buy is truly ready.
4. Standardized TaskStatus Enum Usage
Problem: Manual approval paths used string literal
"pending_approval"instead of proper TaskStatus enum.Fix: Replaced all string status literals with
TaskStatus.INPUT_REQUIREDenum value.Files Changed:
src/core/main.py(lines 4821, 4991, 5002)Impact: Consistent status values across all response types.
5. Fixed Template Package Display
Problem: Media buy detail template tried to access package fields directly, but they're stored in
package_configJSONB.Fix: Updated template to access fields via
package.package_config.get().Files Changed:
templates/media_buy_detail.html(lines 128-148)Impact: Package details now display correctly for both approval paths.
6. Added Creative ID Display to Review Page
Problem: Creative review cards didn't show the
creative_id, making it hard to identify which creative to approve.Fix: Added creative_id display below the creative name in monospace font.
Files Changed:
templates/creative_management.html(lines 71-73)Impact: Easier identification of creatives during review.
Testing Notes
All fixes have been tested locally with Docker restart. Changes affect:
Breaking Changes
None - all changes are backwards compatible and fix existing inconsistencies.