# HANDOFF — 2026-09-13, from the BOT BOX (DESKTOP-3EHP138, user hanna) → any next session on any machine

Read this first. The owner uses one Claude login from several computers; machine-local Claude memory does not travel. This file, the VPS kit memory and `USER-DEMANDS-LEDGER.md` (2026-09-13 section, items 1–19) are the handoff. The 2026-09-12 handoff from DESKTOP-SKPI2F1 is CLOSED (its P0 shipped; see §2).

## 1. Owner status at handoff
- ALL BOTS PAUSED (owner 2026-09-12: "all bots are paused until i find a better buy/sell ladder config"). Local `config.json` pauses all four formats. Still the OWNER's: pick the buy/sell rule on superadmin (hub trading_rules bind on spokes), then unpause.
- Owner rules recorded today (HARD, verbatim in memory + subagents architecture / chart-builder / strategy): formulas show every variable's value; every rate prints its fraction "85% (51/60)"; game result × trade outcome are two axes (never "held and lost" alone); precise, contextual, comparative prose ("this was x, while that was y"); profit over the backtested tapes is PRIMARY, repeatability only in compare mode; THE TAPE IS A FACT — no "without the best matches" numbers, exclusion is the owner's per match by checkbox; every chart filterable per sport; cheap model = set `-m` explicitly (Grok grok-4.6 executes, Codex gpt-6-astra = architecture advisement only, Fable directs and QCs).

## 2. What is LIVE (all verified by Fable in a headless Chrome and by rerunning every suite)
- Bot package: `dist/build_package.py` is git-derived (fail-loud on unaccounted tracked files, manifest diff), `dist/release.py --push` = build + audit + cold install + push. Released twice → `/srv/git/pmstack.git` main 9a2109e (cold install 3937 passed / 0 failed). The live tree had 41 uncommitted files since 08-30 (race_rule, format_pause, wallet_tribute, …); committed 5dcfd9a + hygiene commits. The bot on this box runs from `C:\Users\hanna\pmtrade` (pmtrade.git), NOT from the pmstack package; no self-update task here.
- Rules-audit bot branch (09-12 handoff P0) merged by hand (4 supervisor hunks), released, supervisor restarted by PID; `state/rules/<id>.json` written per match; pusher (`D:\work\timeportal\local-only\push_odds_data.py`) attaches the rules block; odds.php?m=989095 rule pane shows "No buy: price never reached the first live rung after the open-kill (rung 3 = 26.5c; in-play low 30.0c)" + 35 rules. Local board mirror `D:\work\timeportal\polymarket` refreshed from the VPS docroot (28 files; backups in `_sync-bak-20260913/`).
- timeportal.pro/polymarket: tape phantom prints removed from the what-if grid and ladder backtest (`llm/tape_clean.py`; settled / empty-book / sub-tick; counts printed); chart 4 popup = tables (this cell / entry / exit 2×2 by game result / fill price / rates / how computed / data notes) with Copy (TSV) and a Deep-dive link; `cell.php` deep dive per cell (single engine `Whatif.evalCell`, 11,172/11,172 cells equal to the heatmap); `sweetspot.php` profit ranking + compare drawer (astra design), cohort chips exclusive with "+ combine", new chips "all matches" and "market-only fav" (= no basket stamp AND tracked side opened ≥ 50¢; split printed), top-5% list with per-match checkbox exclusions (`exclude=` in the URL, label "Excluded by the owner …"); conclusion bullets under every chart; hover/hold-row fixes; prose audit (contradictions, partial truths, one-sided lines fixed at the builders).
- Test suites on the VPS docroot (`polymarket/tests/*.test.js`, `*.py`): all green at handoff — sweet 125, whatif 319, cell 202, conclusions 137, llm_text 165, analysis 274, history_filters 150, adversarial 145, health 147.

## 3. In flight / open
- Grok run FOLLOWUPS (VPS): items 3–5 of `/root/briefs/FOLLOWUPS-20260913.md` (market-only chip vs MKT_ONLY basket wording; focus/sel reset after a cohort click; match titles in the top-5% list). Report: `/root/reports/FOLLOWUPS-REPORT-20260913.md`.
- astra (Codex gpt-6-astra) chart-insight review for analysis.php + history.php: question `/root/briefs/`… local scratch `CHART-INSIGHT-REVIEW-QUESTION-20260913.md`; answer → `astra-charts.txt` (was stalled once; relaunched). Next step after the answer: Fable writes the Grok brief for the insight charts (highest profit takable, most frequent profit, danger zones, win/loss, stop-loss/stop-buy; per-sport filter everywhere).
- Chart 4 hover could not be triggered by synthetic events in headless Chrome; owner to eyeball once with a real mouse.
- 3 pre-existing live-tape test failures on the origin box (rank-gap tier pin; two "no recorded TP-only fill loses a rung" pins) — not investigated yet.
- Ladder decision (owner). Backtest facts: every CI straddles zero; the top rows of the ranking are all "buy at 0.10× the opening price" (60 fills at 1–5¢, six game winners carry all the gains); 217 of 247 TP-only cells are positive on these tapes, which is one fact (TP-only picks were underpriced over 8 weeks), not 217.

## 4. Where things are
- VPS: briefs `/root/briefs/*-20260913.md`, reports `/root/reports/*-20260913.md`, logs `/root/logs/grok-*-20260913.log`, backups `*.bak-<pass>-20260913` next to every edited file, this handoff at `/home/claude/CONTINUITY/current/handoff/2026-09-13-bot-box/HANDOFF.md`.
- Bot box: `C:\Users\hanna\pmtrade\docs\briefs\*-20260913.md` + reports; `dist/RELEASE-LOG.md`; ledger `D:\work\bfm\apps\USER-DEMANDS-LEDGER.md`.
- Method that worked: Fable brief file (objective, measured facts, acceptance, HARD constraints, stop condition) → `grok -m grok-4.6 --permission-mode bypassPermissions -p 'Read <brief> and execute it fully'` (VPS: `nohup … < /dev/null &` via `ssh -f`; watcher `pgrep -f '[X]pattern'` to avoid self-match) → Fable QC (rerun suites, php -l, CORE md5 identity, headless-Chrome render) → ledger + memory.

## 5. Afternoon additions (2026-09-13 14:25–16:52 KST) — see ledger items 19–25
- astra (gpt-6-astra) chart-insight review: `/root/briefs/astra-charts-answer.txt`. Owner purposes: highest profit takable · most frequent profit · danger zones (net + frequency) · win/loss distinction · stop-loss / stop-buy times, prices, levels; every chart per sport.
- `llm/insight_records.py` (+ test, cron :20/:50, user claude): 14 record families per match / per candidate (494 candidates = 19 buy × 13 sell × 2 anchors), all cents/UTC, nulls with status, hindsight boundary on every record, per-sport index, `elapsed_envelope` (running low/high at 5…100% of the match clock, post-fill variant); reconciles with `Whatif.evalCell` (0 mismatches). Output: `odds_data/insight_records.json` (760 KB) + 494 shards in `odds_data/insight/` (2 GB, columnar stop/drawdown).
- analysis.php rebuilt as A0→A6 decision path (controls with sport counts → coverage/outcome table → highest-profit map → most-frequent-profit map → two danger maps → candidate comparison → owner decision); opportunity floor (default 10, URL `minopp`) on every outline; dollars ≥ 100¢; under-floor sports collapse to one line with the exact swing sentence.
- history.php rebuilt as H0→H8 (selected finding → elapsed-time envelope per sport → range chart with ORDER of extremes (dot first, arrowhead later; low-first vs high-first) + wheel zoom → winner vs loser distributions → stop/refusal grids → drawdown survival → chart 4 → drilldown with owner exclusions). Retired charts hidden (ids kept).
- Filters: chip pressed state = selection; exclusive click + "+ combine"; sport filter on every chart; ASCII per chart. Cohort chips: "all matches", "market-only fav" (no basket AND open ≥ 50¢; not the pipeline MKT_ONLY basket). Exclusions: top-5% list + per-match checkboxes (`exclude=`), no "without best matches" numbers anywhere.
- Owner rules recorded today (memory + architecture / chart-builder / strategy subagents): formulas with values; fractions on every rate; two axes; precise comparative prose; profit primary; tape is a fact; per-sport; elapsed-% envelopes not clustering; range order + wheel zoom.
- OPEN (INSIGHT-SYNC landed 17:08, all suites green, shared blocks identical): FOLLOWUPS items 2 (hover eyeball) and 6 (in-play extremes for unfilled matches from insight_records); ladder decision (owner); bots PAUSED.

## §6 evening additions (2026-09-13 19:05 KST, bot box)
- Grok is BACK on a fresh account (C). VPS `/root/.grok/auth.json` = account C (copy `auth-fresh-C-20260913.json`). A = 402, B = not signed in. Owner's recovery phrase: "fresh session. new account."
- Seat rules (HARD, owner 18:53/18:54): Grok executes; if Grok dies → Opus subagent; CODEX = STRATEGY/PLANNING ADVICE ONLY, never builds. CLAUDE.md on the bot box updated.
- Step 1 (chronological engine + A1–A12 + G8 pivot + print audit): Codex build stopped 18:55, partial files parked in the local mirror `docs/codex-partial-step1/`; Grok grok-4.6 building in `D:\work\timeportal\polymarket` since 18:57; report expected at `STEP1-REPORT-20260913.md` there. NOT deployed yet. Deploy order: pages + llm + tests → run generators on the VPS as user claude → md5 reconcile → browser sweep.
- Independent oracle fixture for the Step 1 engine: `/root/oracle/{oracle_chrono.py,oracle_fixture.json,ORACLE-REPORT.md}` (Grok, 19:03). Diff plan + settled semantics + oracle caveats: bot box scratchpad `STEP1-QC-CHECKLIST-20260913.md` (copy at `/root/reports/STEP1-QC-CHECKLIST-20260913.md`).
- Oracle finding: across all 208 TP_ONLY game losers there is no fill with a post-kill target touch (T 60/80) lacking an earlier pre-kill touch — the hindsight privilege moves no loser row at those targets.
- 19:27 KST: Grok account C 402 mid-Step-1. Tree state at handover: engine + schema-3 grid + pages + most suites green; insight_pages FAIL 2; print audit 92,623 violations / 8 uncovered; no report. Opus subagent continuing from 19:36 with `docs/STEP1-CONTINUE-OPUS-20260913.md`. Oracle diff of the engine: 963/1008 equal, 45 expected (unknown-kill settles), 0 unexpected. Settled: sale books at the target price T (limit fill).

## §8 Step 1 DEPLOYED (2026-09-14 00:50 KST, bot box)
- Step 1 (chronological what-if engine + A1–A12 + G8 rank-proxy pivot + print audit + boot smoke) is LIVE: 66 files (4 pages, llm/*.py+js, tests/) copied from the mirror `D:\work\timeportal\polymarket` (md5-reconciled, 0 diffs; VPS backups in `polymarket/_step1-bak-20260914/`), then regenerated ON the VPS as claude with the two generator crons paused: whatif_grid schema 4 (50 s), insight_records schema 4 release step1-chrono-3-e6af1e31779f2f57, 520 shards, gen_llm_text; crons restored. Log `/root/logs/regen-step1-20260914.log`; scripts `/root/regen_step1_vps.sh`, bot box scratchpad `deploy_step1.sh`.
- Live sweep (chrome devtools): history/cell/sweetspot/analysis boot, no code tokens, no ISO stamps, candidate + evidence lines, per-day title, decision-time line 115/289/90 of 494, best cell +$168.21 (what-if default: sell at the target before the kill, otherwise settle; winners $1/share). Report: `polymarket/STEP1-REPORT-20260913.md` (public path) + `/root/reports/`.
- OWNER RULES tonight (HARD, verbatim in memory): what-if = what WOULD HAVE HAPPENED (winners pay $1/share; match-end/hindsight are URL-only alternatives); nobody on the AI side analyses — build charts/tables that intermix conditions so the owner analyses; Codex = strategy/planning advice only; Grok dies → Opus (all 3 Grok accounts 402 tonight).
- Ladder spec (owner 22:06): superadmin LIVE (`buy.ladder_spec`, `sell.ladder_spec`, hub null until the owner commits); bot side UNMERGED on pmtrade worktree branch `worktree-agent-a690ceeb6e8e01b88` (report `LADDER-SPEC-REPORT-20260913.md` there) awaiting the owner's merge word; pusher masks buy rung stake dollars.
- Next: Steps 2–6 of astra's consolidated spec (validation, coverage/V6/V7, V1–V4, G3/G4/V5, G1/G2/V8) as VIEW builds; owner's ladder decision + unpause; browser tooltip geometry sweep (`window.__tooltipSweep`) on the live pages.
- 2026-09-14 08:35 KST: ladder-settings bot code merged into the live bot tree (commit 42ba94b, pushed to /srv/git/pmtrade.git). Hub values null; bots paused; supervisor not restarted. Next what-if page builds running under Opus in the bot-box mirror: build 2 (time split, beside-doing-nothing, coverage per day, profit through time, groups by net per $ staked), then build 3 (buy-level / sell-target / entry-timing curves), then build 4 (after-the-fill reach + ladder accounting and cancel triggers). Briefs in the mirror `docs/WHATIF-BUILD-*.md`; Fable deploys each with deploy_step1.sh + /root/regen_step1_vps.sh.

## §9 Owner stepping out (2026-09-14 09:20 KST) — continue from any machine
- Bot code: commit 11b73a0 on the live tree (ladder settings 42ba94b + test path fix), pushed to /srv/git/pmtrade.git; package release built, cold-tested (failures none) and pushed to /srv/git/pmstack.git (dist/RELEASE-LOG.md in the package).
- Work list for the other machine: https://timeportal.pro/polymarket/handoff/todo-current.md (rendered at the top of https://timeportal.pro/polymarket/todo/); kit copy beside this file. Memory files + ledger synced to /home/claude/CONTINUITY/current/{memory,USER-DEMANDS-LEDGER.md}.
- IN FLIGHT ON THE BOT BOX (its local mirror; do not edit the four what-if pages or superadmin PHP on the VPS until they land): what-if page build (per-match exclusion everywhere, beside-doing-nothing, coverage per day, profit through time, groups by net per $ staked, heatmap X view control, beige/black match tables, in-place header sort, stop-grid text scaling / 2.5 h axis / named x axis) and the superadmin plain-labels pass. If the bot box session dies before deploy, the mirror `D:\work\timeportal\polymarket` and `scratchpad\superadmin-work` hold the work; briefs in the mirror `docs/WHATIF-BUILD-*.md`.
- 2026-09-14 09:35 KST: superadmin plain-labels pass LIVE (every code written as its meaning, config key as a muted line; report /root/reports/PLAIN-LABELS-REPORT-20260914.md). Two shipped-default numbers corrected to the live config (single-match money floor $1,000; fixed sell rungs 12%@72¢ + 64%@81¢, ride 0.1). Known leftover: the validation error example still says "0.72:0.15, 0.81:0.80" (_spoke.php ~L992) — wording only.
- 2026-09-14 13:05 KST: what-if second build LIVE (per-match exclusion everywhere with chips + clear, beside-doing-nothing, coverage per day, profit through time, groups by net per $ staked, heatmap X view control, beige match tables, in-place sorting, stop-grid fixes, all period-split text removed). Report /polymarket/WHATIF-BUILD-2-REPORT-20260914.md. Next build (curves + entry timing) running on the bot box.
