Quick Wins — ship tomorrow morning (<2 hrs each)
QW1 — Fix the silent config key (10 min)
config.yaml line 36 says expiry_tolerance_seconds but pairing.py:902 reads expiry_tolerance_sec. Rename in config (or add alias in code). Your 90s setting is already the default so this is invisible today — but the moment anyone tries to tune it, it won’t take effect. Rename it now so the config file tells the truth.
QW2 — Flip the pairing defaults (20 min)
In config.yaml add a pairing: block:
pairing:
require_exact_threshold: false
min_question_similarity: 0.70
near_pair_min_score: 0.55 # already set, re-affirm
near_pair_min_gross_edge: 0.02 # already set, re-affirm
Re-run tools/overnight_overlap_loop.py --iterations 1 read-only and look at data/overnight_overlap_runs.jsonl for the new counts.matched_pairs. If it’s still 0, the leak is upstream in _market_family/_indexed_tokens and you’ve falsified one hypothesis in 20 minutes.
QW3 — Split the overnight-loop candidate gate (25 min)
Edit tools/overnight_overlap_loop.py::_qualified_candidate to return both watchlist_candidates (score ≥ 0.80) and executable_candidates (current 0.995). Add both to run_summary.counts. Even if zero executable trades come out, you’ll see the actual shape of the funnel in one overnight run.
QW4 — Clean .env safety (15 min)
- Set
FORCE_DRY_RUN=1in.env(right now it’s0while nothing is running — landmine for a fresh start). - Add at the top of
main.py:python if os.getenv("FORCE_DRY_RUN", "1") == "0" and "--live" not in sys.argv: raise SystemExit("FORCE_DRY_RUN=0 but --live not passed; refusing to start.") - Remove the live
POLYMARKET_PRIVATE_KEYfrom repo checkout; move tosecrets/polymarket.key(already git-ignored path).
QW5 — Archive misleading docs (5 min)
DEPLOYMENT_STATUS.md and FINAL_QA_REPORT.md claim everything is green and live. Move them to docs/archive/2025-09/. Replace root DEPLOYMENT_STATUS.md with the STATE.md produced by this diagnostic.
QW6 — Kill stale PID, add startup guard (10 min)
data/overnight_overlap_loop.pid = 53818, no such process. In tools/overnight_overlap_loop.py, at startup:
pid_path = Path("data/overnight_overlap_loop.pid")
if pid_path.exists():
try:
old = int(pid_path.read_text())
os.kill(old, 0) # raises if not alive
raise SystemExit(f"Loop already running as pid {old}")
except (ProcessLookupError, ValueError):
pid_path.unlink(missing_ok=True)
pid_path.write_text(str(os.getpid()))
QW7 — Threshold extractor sanity test (45 min)
Add tests/test_threshold_extraction.py. Feed 20 real titles from catalog_market_inventory.payload_json. You’ll instantly see which real markets the current regex mis-parses. Don’t fix yet; the test is a diagnostic. Publish the failure list to overnight-diagnostic/EXTRACTOR-FAILURES.md.
QW8 — One-shot matcher diagnostic (30 min)
Write scripts/diag_pair_funnel.py (read-only) that loads the current DB, calls find_equivalent_pairs_from_contracts, and prints the count + top-20 by score. Run it nightly. Also call diagnose_near_pairs_from_contracts (exists) to bucket reasons for rejection (expiry_mismatch, anchor_mismatch, resolution_source_conflict, etc.). This is the fastest way to see whether Fix 1 worked.
Pick QW1 + QW2 + QW8 as the minimum viable morning: they answer “is the matcher salvageable by config tweaks, or do I need to rewrite?” in under an hour.