Skip to content

fix(training-agent): reject mixed-currency explicit product_ids proposals - #8128

Merged
garvitkaushik-123 merged 1 commit into
mainfrom
ccr-3d0ec022-9c9phw
Oct 11, 2026
Merged

garvitkaushik-123 merged 1 commit into
mainfrom
ccr-3d0ec022-9c9phw

Conversation

@garvitkaushik-123

@garvitkaushik-123 garvitkaushik-123 commented Oct 11, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Follow-up to #7863. That PR added a mixed-currency guard to the criteria-only request_proposals fixture branch. As @aleksUIX pointed out, the explicit product_ids (exactProductIds) paths still took the first product's currency for total_budget_guidance, so explicitly selected products priced in different currencies were combined into one proposal under a single budget currency.

Change

  • In server/src/training-agent/task-handlers.ts, both exactProductIds proposal builders (the prepared_* seeded-fixture branch and the selected_product_plan fallback) now build no proposal when the selected products span more than one currency. The request falls through to the existing rejected outcome, matching the criteria-only guard.
  • Requests with a single currency are unchanged.

Test plan

  • Added rejects request_proposals when explicit product_ids span seeded fixtures priced in different currencies to server/tests/unit/training-agent.test.ts (seeded USD + EUR products, explicit product_ids). Confirmed it fails without the change (proposed instead of rejected) and passes with it.
  • npx vitest run --config server/vitest.config.ts server/tests/unit/training-agent.test.ts: 806/806 passing.
  • npx tsc --project server/tsconfig.json --noEmit: clean.
  • No changeset: server-only change, outside protocol scope.

…sals

Mirror the criteria-only guard on the exactProductIds paths so explicitly
selected products priced in different currencies cannot share the first
product's budget currency. Follow-up to #7863.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01VHwHg8skXvfficerUbeoVd

@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: Approve

Approve — clean, minimal server-only fix with no blocking or medium findings.

What I checked:

  • Both exactProductIds proposal builders (prepared_* seeded branch and selected_product_plan fallback) now reject when selected products span more than one currency, mirroring the criteria-only guard from #7863 verbatim — fail-closed fall-through to the existing rejected path.
  • Added test exercises both guards (seeded USD+EUR products with explicit product_ids), confirmed red-green.
  • Server-only training-agent change, correctly outside protocol scope — no changeset required.

Gate checks:

  • gated_paths: false — no hard path gate.
  • No no-auto-approve team match.
  • high_risk: false.
  • No critical/high/medium findings.

With no findings and no escalation triggers, this falls through to row 9 of the decision table. review_decision: REVIEW_REQUIRED does not block approval here because gated_paths is false (row 2 does not fire).

@garvitkaushik-123
garvitkaushik-123 merged commit de70d99 into main Oct 11, 2026
54 checks passed
@garvitkaushik-123
garvitkaushik-123 deleted the ccr-3d0ec022-9c9phw branch October 11, 2026 05:27
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