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, commit 4cac2cf1fbb229c6bb8eb68a4cecf29e07e3922b (branch main). Change is in the Ok(Err(e)) arm of place_buy. Two new pure fns: is_fak_no_match(err) (detector) and fak_reject_line(id, req: &crate::EntryIntent, url: Option<&str>) (formatter). mark_failed + bump_breaker behavior 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 REJECTED line + 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>. Returns None when it can’t build a URL — fak_reject_line takes url: 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 if block 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 tests block in execute.rs. Full suite: 155 passing.