Loading…
Loading…
Loading…
Structured submission (gate redesign): the title is what bidders see in market lists; the deadline is the date by which the outcome must be resolvable. Source and invalid conditions are optional — the gate can complete them where the rules allow, or you can propose your own.
Question voting UI lives here once fe_display_questions_voting is built.
Pick a market from the dropdown above (or click a market on the Markets tab).
Loading…
Loading…
Working notes about the glossary — terms to add, structural ideas, things to verify. NOT sent to the LLM. The actual glossary lives in the pane below.
Terms, jargon, sources, and in-scope/out-of-scope conventions the LLM needs to interpret submitted questions. Sent to the LLM at eval time — either as a sibling cached block, or substituted in-place via the {INJECT_GLOSSARY_BODY} placeholder in the system prompt.
Working notes about the prompt — ideas, things to test, edge cases. NOT sent to the LLM. The actual prompt body lives in the pane below.
The actual system prompt sent to the LLM when you click Submit Evals. Keep it cache-friendly (no per-call dates or other variable values — those go in the user message at run time).
One per line. Closed list — the LLM is forced to pick from these. The aim is to refine prompt + glossary so other is used as rarely as possible.
One vendor/model id per line, # for comments. Ids must match
openrouter.ai/models exactly.
Costs aren't estimated up front — OpenRouter reports the actual cost per call and it accumulates on the run.
Requires OPENROUTER_API_KEY on the server; without it these models run in stub mode.
Send every eval question through the selected LLM and grade the response against the expected verdict + failure dimension + injection_flag. Manual scoring of the returned redirect happens in the results table.
No run yet. Pick a model and click Submit Evals.
Manually-curated test cases for the LLM Check Questions gate. Verdict is binary (pass / fail). On FAIL: Failure dimension picks from the editable list above; Expected redirect is what the LLM should suggest. Injection? marks questions that probe the gate itself — scored separately from the dimension. Save all commits every row's current values.
Loading…
Past Submit-Evals runs. Click a row to drill into the per-question results. Scores are auto-graded (verdict + dimension + injection_flag) plus the human-rated redirect score (0–2 per question).
Loading…
Modules from the flowchart. Orange = backend, green = frontend, blue = platform/infra (added since the flowchart). Status reflects the code as built, not the flowchart's (stale) annotations. Only major features noted. Test counts are from pytest (backend only — there's no frontend test harness yet); 400 backend tests total, covering every meaningful backend module, run by CI on every push.
harness_version comparability boundary), prompt + glossary version-controlled in Admin sub-tabs, and the gate-redesign Phase 1 schema (structured submissions, §9 {applicable, value} contract objects, completion-action scoring).remaining_contracts is the source of truth, no stake↔contract drift). Price-time priority, partial fills, self-match prevention. Price-improvement residual released back to user at bid close via release_funds; non-BALANCE_004 release failures surface at WARNING (no silent stake retention). Sub-MIN_CONTRACT remainders close as closed_dust with residual refunded. Displayed market price is the order-book midpoint with a €1 volume floor; decoupled from the trade-tape fields. Money-conservation invariant (sum(user_totals) + sum(unresolved_match_pool)) covered by dedicated tests that bypass the per-test drift-repair fixture. Interface kept narrow (single process_bids entry point) so a future batch-auction engine can swap in. Price priority symmetric on both sides (NO-side inversion fixed 2026-07-06). Cancellation race hardened: consumes execute at match time and a failed consume VOIDS the match (counterparty compensated + re-reserved); status updates carry a WHERE guard so a concurrent cancel is never clobbered.drain() (take-and-clear) is the only safe committer pattern for the shared endpoint queue — closed a lost-write race between concurrent requests.on_conflict/returning knobs; update ops accept an optional where guard (deferred updates can refuse to clobber a state that changed between queueing and commit).backend/app/modules/log_queue.py. event_log() enqueues; send_log drains once per main_loop cycle. Symmetric to Write to DB → Commit to DB but for log events. Local DB write stays synchronous inline in event_log() so the in-page panel sees events promptly.backend/app/modules/send_log.py drains log_queue and POSTs each item to AWKanban with a 3-second timeout. Silent no-op if AWKANBAN_URL/KEY unset. Failures aggregated to a single WARNING.pam.py with 5 read functions (account summary, open/closed positions, transactions, per-market leaderboard). Five endpoints under /api/users/{id}/... + /api/markets/{id}/leaderboard wired into the "My Account" top-tab and the specific-market detail page. ResolveEngine writes user_market_results on settlement, now including stake-weighted Brier loss + delta. Lifetime Brier averaged across resolved markets; per-market Brier shown in Closed Positions and on the resolved-market leaderboard./api/users. No dedicated backend file yet.QA_MODE_ENABLED env default). 12 tests focused on the dangerous + foundational paths (wipe safety, seed_users, SeededRng determinism).w rather than m to disambiguate from Send Notification.)#markets/<id> (shareable/bookmarkable) — price-over-time chart, order book, Market terms block (resolution source / criteria / invalid conditions / both close dates), bid placement, resolution-state badge, post-resolution leaderboard, QA-only bid/match lists. Auto-refreshes.git pull → run any new deploy/migrations/*.sql → docker compose up -d --build. Boot-time schema guard emits a red schema_behind_code event naming any missing columns if a migration was skipped.