A stop needs more than a number
A configured stop price is an instruction to act. For a Weavers-managed paper position, software still has to receive a usable price, recognise the breach, submit an exit and establish what the broker did. A database value alone cannot perform those steps. Our protection redesign gives each step an explicit owner and a recoverable record, so a deployment or a failed process does not quietly become the end of the workflow.
Keep a brief breach from disappearing
Streaming prices provide the main observation path. Processing is bounded so a busy symbol cannot consume every worker. Within a pending batch, Weavers retains the low, high and most recent observations: a price that crosses a stop and then rebounds still reaches evaluation. Freshness checks reject invalid or stale observations. Missing or unusable prices leave coverage overdue and visible to monitoring; they do not count as a successful protection check.
Commit the decision before delivery
When a validated observation breaches a threshold, PostgreSQL compares the price and records the exit decision in one statement. That per-position record is also the outbox: the durable list of work waiting to be delivered. Concurrent checks cannot create independent decisions for the same position. A rebound does not cancel the recorded decision. Recovery starts from the database record rather than asking a restarted process to remember what it saw.
Use a queue that can be rebuilt
A dedicated BullMQ queue delivers exit commands to execution workers. Each message carries a position identifier; the worker reloads the authoritative decision from PostgreSQL. Pending decisions are republished, so losing a queued message or receiving no acknowledgement from the queue does not erase the underlying work. This separates the responsibility to remember an exit from the responsibility to deliver it. Recovery assumes PostgreSQL retains its committed state; database durability and recovery procedures remain essential.
Resolve an uncertain order before trying again
A broker request can succeed even when its response never reaches us. Blindly sending another sell would turn a recovery mechanism into a new risk. Weavers uses atomic position claims and a stable broker client-order identifier. On recovery, an uncertain submission is looked up by that original identifier before another submission is attempted. A failed lookup leaves the decision pending for further recovery and investigation. Broker acceptance completes command delivery; broker events and reconciliation establish fills and position closure.
Recover the protector itself
The deployment design uses two protection workers on separate nodes. One owns the price stream; the standby keeps retrying ownership instead of giving up after a startup race. Both can support durable delivery and independent fallback checks. Those checks cover open managed positions across signal timeframes, so a strategy using daily signals does not wait for its next entry schedule to have a stop evaluated. The legacy worker's replacement also waits for protection readiness before the outgoing worker is retired.
Measure the work, not just the process
A live process is insufficient evidence that a position is protected. Monitoring tracks recent valid evaluations, worker loops, queue publishing, exit consumers, pending decisions and orders that remain unconfirmed. Coverage gaps and delayed exits raise alerts. The entry guard blocks new exposure when these checks show protection is unhealthy. Recovery work on existing exits continues. A deployment therefore has to demonstrate working protection, rather than merely open a socket or refresh a heartbeat file.
What this design can promise
A committed exit decision remains recoverable through worker restarts and queue loss. That closes a specific route by which internal execution work could be silently forgotten. It does not make every skipped trade impossible: unavailable observations can prevent a decision from being recorded, brokers can reject or delay orders, and market gaps can produce fills beyond a stop. Entry signals may also be intentionally rejected by eligibility or capital limits. Those cases require explicit status, monitoring and investigation rather than an absolute execution claim.
A staged rollout with evidence
This article describes the protection redesign and its deployment contract. Activation is staged: the matching application and schema must be available, the new workers must demonstrate readiness, and the private metrics scrape and alert rules must be verified. Tests exercise ownership loss, concurrent checks, rebounds, lost queue contents and uncertain broker responses. Those checks establish recovery behaviour; they do not guarantee a stop-price fill or substitute for observing the running system after rollout.
A recorded exit remains unfinished work until delivery is confirmed.
