fix: permanently retire Global ETF research mandate - #306
Conversation
Co-Authored-By: Codex <noreply@openai.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e5a5c790fd
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if mandate_provenance.get("mandate_id") == _RETIRED_GLOBAL_ETF_RESEARCH_MANDATE: | ||
| return {}, {"retired_global_etf_research_mandate"} |
There was a problem hiding this comment.
Sanitize malformed metadata before issuing retired rejection
When a request uses the retired mandate ID but contains malformed position or budget metadata, this early return only seeds the rejection reason and still proceeds to _canonical_digest(decision_payload). Fields such as PositionTarget.role, order_preference, or BudgetIntent.unit are copied without validation, so a value like float("nan") raises ValueError under allow_nan=False instead of returning the promised terminal REJECT with cleared exposure. The retired path should sanitize these receipt fields or otherwise guarantee the rejection after the exactly-once engine assessment.
Useful? React with 👍 / 👎.
Summary
Safety behavior
Every retired-ID request returns REJECT with positions and budgets cleared and execution_authorized=false. Malformed, non-finite, and oversized numeric material cannot escape the fail-closed result.
This is terminal revocation only. It grants no research promotion, deployment, runtime, paper, shadow, live, order, or capital authority.
Verification
No remediation is authorized on this PR. Any new material exact-head blocker closes the PR unmerged and parks the slice.