A live BUY POST rejected by Polymarket with a FAK (“fill-and-kill”) no-match error now emits a single concise telegram line instead of two. A FAK no-match means we were simply late — transient lateness, not a real failure — so the old two-line (REJECTED + latency-breakdown) output was spam. The FAK if block is also the deliberate seam for a future retry path (not yet implemented).
For Agents
File:
crates/position_manager/src/execute.rs, commit4cac2cf1fbb229c6bb8eb68a4cecf29e07e3922b(branchmain). Change is in theOk(Err(e))arm ofplace_buy. Two new pure fns:is_fak_no_match(err)(detector) andfak_reject_line(id, req: &crate::EntryIntent, url: Option<&str>)(formatter).mark_failed+bump_breakerbehavior is UNCHANGED — only the notify output changed.
What Changed
In place_buy’s Ok(Err(e)) arm:
- FAK no-match now branches FIRST, emitting only
fak_reject_line(...)— no latency breakdown. - Non-FAK rejects keep the original two-line behavior (
order REJECTEDline + latency breakdown) unchanged. - Failure bookkeeping is identical for both paths: FAK still calls
mark_failed, classifies, and bumps the circuit breaker exactly as before. Only the human-facing message differs.
is_fak_no_match(err) — detector
Pure fn. Matches on the lowercased error message containing:
"no orders found to match", OR- (
"fak"AND"no match").
Example trigger: Polymarket’s "no orders found to match with FAK order".
fak_reject_line(id, req, url) — formatter
Pure fn producing ONE line containing:
source_id- intended position:
outcome_label/size_usd/limit(from&crate::EntryIntent) token_id(so a retry can be identified)- market URL appended when available, via
crate::pricing::market_url(event_slug, slug) - emoji is the unicode lightning escape
\u{26A1}(⚡)
market_url signature
fn market_url(event_slug: &str, slug: &str) -> Option<String>. ReturnsNonewhen it can’t build a URL —fak_reject_linetakesurl: Option<&str>and only appends when present.
The Retry Seam (do NOT assume retry exists)
FAK branch is a structural seam, not a feature
The isolated FAK
ifblock exists so a future retry path can slot in cleanly. Retry was intentionally NOT implemented — spec is TBD/later. Do not assume retry behavior exists today; the only current behavior is “emit one line, record failure, bump breaker.”
Because the repo forbids ALL comments/docstrings (operator rule), the seam is expressed structurally (an isolated branch) rather than via a // TODO. When implementing retry, slot it inside this FAK branch.
Project Rules (gotchas for future work)
Repo conventions
- No comments / docstrings anywhere — seams must be structural, never comments.
- cargo must run with
CARGO_NET_GIT_FETCH_WITH_CLI=true(git deps fetch via CLI).- Tests live in the
#[cfg(test)] mod testsblock inexecute.rs. Full suite: 155 passing.
Related
- position_manager — PM execution-gate overview
- pmv2-polymarket-deposit-wallet-live-trading-solution-2026-06-26 — how the live BUY POST path that produces these rejects actually executes