Core: fix three coding bugs from the core review, with rule tests (#11)

1. Letting the Red pass. Only climbing down quickly puts you above the Red, so a tree run that
   passed on the Red and then met the Greens let it pass. Those 16 runs were coded as slow
   descents; they are now "Descend quickly: let the Red pass" and count for the Greens'
   encounter, so the route model's "let it pass" option rests on its own runs. A tree run with
   both the Red and the Greens attempted (impossible in one run) is now flagged.
2. Leaving your squadmates. The form only offered "> Left them" from 2026-10-27 (0 of 504 squad
   runs before chose it, 40 of 144 after). Earlier and undated squad runs are now unknown rather
   than "stayed together" (form.yaml: left_squadmates_asked_from).
3. Bot text. The wounded cadet's other two choices map onto the form; a test checks every choice
   the bot has logged maps onto a form variable (encounter answers excepted, not modelled yet).

Each rule has a test in tests/core/test_coding.py. Data rebuilt (runs, graph, policy, report);
the headline odds move by at most 0.02 points. The Methods tab describes both rules.


Claude-Session: https://claude.ai/code/session_01UCzTd31GphpMXDhQqWrCMQ

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
ekcSchiano
2026-11-03 21:12:34 +00:00
committed by GitHub
co-authored by Claude Opus 5.5
parent cc86343668
commit 963b08c522
15 changed files with 974 additions and 926 deletions
+2 -1
View File
@@ -631,8 +631,9 @@ a { color: var(--accent); text-underline-offset: 2px; }
<p>Each row of the <a href="https://docs.google.com/spreadsheets/d/1gnw1AdRg1XT4JsOfRM6QTA0jSaS3n9ZF-rPWnYewzv0" target="_blank" rel="noopener">"Threshing Routes" form</a> (and each row pasted in from players' own logs) is one threshing run. The page reads the raw export and codes every row with the same fixed rules, which are visible in <code>engine.js</code>:</p>
<ul>
<li><b>Source.</b> Rows with a real timestamp are form submissions. Rows labelled "Data Import", "Manual Upload" or "Historical import" were bulk-pasted from players' own run logs and are called <i>bulk logs</i> here.</li>
<li><b>Leaving your squadmates.</b> The form only offered "&gt; Left them" from 27 October 2026. Squad runs before that date, or without a date, are coded as unknown rather than as "stayed together".</li>
<li><b>Cadet encounter.</b> Split into the scream choice (help, investigate and leave, or ignore) and its resolution (killed the bullies, squadmate's revenge, left them to the dragons, tourniquet, left the cadet, took their weapons). The fork in the road only exists after helping, so other branches are coded "(no fork)".</li>
<li><b>Encounter branch.</b> A tree run with a Blue or Black recorded took the shadow. A tree run with Greens recorded descended slowly, and one with only a Red descended quickly. A valley run with an Orange, Brown or Blue recorded (or a Red marked "Changed my mind") passed the Red and reached the meadow.</li>
<li><b>Encounter branch.</b> A tree run with a Blue or Black recorded took the shadow. A tree run that passed on the Red ("changed my mind") and then met the Greens climbed down quickly and let the Red pass, since only a quick descent puts you above the Red. Any other tree run with Greens recorded descended slowly, and one with only a Red descended quickly. A valley run with an Orange, Brown or Blue recorded (or a Red marked "Changed my mind") passed the Red and reached the meadow.</li>
<li><b>Outcome.</b> Bonded to the one dragon marked "Bonded!". Otherwise incinerated by the last dragon marked "Incinerated" in encounter order, or died before the hour. "Saved by another" on the Greens plus a bonded Orange or Brown counts as a rescue bond.</li>
<li><b>Flags.</b> Rows are flagged, not deleted, when answers contradict each other: several directions or wings, Greens in the valley, two bonds, or a first sighting outside the documented pool. You can drop flagged rows with the checkbox on Deep Dive's route map.</li>
</ul>