Hardening OIL-NEWS-SYSTEM for Ambiguous News and Execution FailuresHardening OIL-NEWS-SYSTEM for Ambiguous News and Execution Failures
The network for creativity
Join 1.25M professional creatives like you
Connect with clients, get discovered, and run your business 100% commission-free
Creatives on Contra have earned over $150M and we are just getting started
The Update That Made OIL-NEWS-SYSTEM Harder to Kill
Two commits. One on the reasoning gate. One on execution. Both aimed at the same thing: the system should behave correctly when the world stops behaving normally.
groq_brain.py — the prompt was rebuilt. The old prompt asked the model to classify. The new one asks it to reason against ambiguity. The four fields are the same — IsOil, Impact, Strength, Confidence — but the system prompt now forces the model to justify why a headline is not a trade before it justifies why it is one. The result is fewer borderline approvals and a tighter confidence distribution. The gate still costs ~300ms. It now rejects more noise for the same price.
main.py — position sync and order cancellation were hardened. Execution is where systems die quietly: a position that does not match the exchange, an order that was sent but never confirmed, a cancel that arrives after the fill. The update adds explicit reconciliation between local state and exchange state, and cancellation paths that do not assume the order is still open. If the exchange says one thing and the bot says another, the bot now trusts the exchange and corrects itself.
sentiment.py — the fallback got a cancel path. The deterministic keyword engine that takes over after three API failures now includes BEAR cancellation logic, so the degraded mode does not just stop trading — it exits cleanly.
twitter_monitor.py — priming is still there. First poll primes the state. The bot never trades a headline it has already seen before it started watching. Stale news is still structurally impossible.
The philosophy has not changed: auditability over raw speed. The reasoning trace is still one call per headline, sequential, logged. The fallback is still three failures away. The difference is that the edges of the system — the ambiguous headline, the orphaned order, the degraded fallback — are now handled explicitly instead of optimistically.
You can read every commit: github.com/S-7-D-2023/OIL-NEWS-SYSTEM
This is not a feature release. It is the update that makes the system trustable at the boundary conditions — which is where trust is actually earned.
Post image
Back to feed
The network for creativity
Join 1.25M professional creatives like you
Connect with clients, get discovered, and run your business 100% commission-free
Creatives on Contra have earned over $150M and we are just getting started