Impossible runs: one definition, left out of the route model and the site statistics (#21, #22)
CI / test (pull_request) Successful in 41s

- core/spec/form.yaml impossible_flags: the flags that mean a run cannot have happened as recorded (a dragon an
  encounter does not have, a Green or the Black in the valley, two bonds, two burns, a cadet path that does not
  follow, an early death that still reached the hour...). atlas.runs.impossible() reads it.
- The route model and the site statistics (and the riders' paths) leave those runs out, from every source; every
  other run is used, however partial. The runs stay in runs_clean.csv, flagged. 80 runs: 75 form, 5 Reddit.
  Route-model odds move by at most 0.2 points.
- collection/etl/runs.py: the community form gets the same game-rule checks as "Report a run" and the Reddit
  comments (10 form rows newly flagged); new rule: the Black in the valley.
- The first-sighting pool stays a flag only: it is what riders have seen, not a rule.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UCzTd31GphpMXDhQqWrCMQ
This commit is contained in:
ekcSchiano
2026-11-19 16:03:45 +00:00
co-authored by Claude Opus 5.5
parent 036c86a1d1
commit 46c1f00150
10 changed files with 65 additions and 42 deletions
+8 -2
View File
@@ -52,7 +52,8 @@ def encounter_columns(row, intentional=False):
# ---------------------------------------------------------------- coders, by pipeline.yaml `runs:`
def spreadsheet(name, spec):
"""The community form: core/spec/form.yaml + core/atlas/coding.py, unchanged."""
"""The community form: core/spec/form.yaml + core/atlas/coding.py, plus the game-rule checks every source that
answers the form's questions gets (rule_flags; a flag the coder already set is not repeated)."""
from atlas import coding
df, missing = coding.code_frame(coding.read_export(path(spec["load"])))
if missing:
@@ -62,7 +63,10 @@ def spreadsheet(name, spec):
for rec in df.astype(object).where(df.notna(), None).to_dict("records"):
n = rec.pop("run_id")
entry = rec.pop("source")
rows.append({**{c: None for c in COLUMNS}, **rec, "run_id": f"sheet-{n}", "source": spec["run_source"], "entry": entry})
row = {**{c: None for c in COLUMNS}, **rec, "run_id": f"sheet-{n}", "source": spec["run_source"], "entry": entry}
have = [f for f in (row["data_flags"] or "").split("; ") if f]
row["data_flags"] = "; ".join(have + [f for f in rule_flags(row) if f not in have])
rows.append(row)
return rows
@@ -231,6 +235,8 @@ def rule_flags(row):
flags.append(f"{colour} at the {branch} encounter, which has only {'/'.join(sorted(enc_colours[branch]))}")
if row["hour"] == "Valley" and colour == "Green":
flags.append("Green recorded on a Valley run (no Greens in the valley)")
if row["hour"] == "Valley" and colour == "Black":
flags.append("Black recorded on a Valley run (the Black is only reached from the tree)")
scream, res = row["scream"], row["resolution"]
if scream in ("Investigate & help", "Ignore the scream", "Investigate & leave"):
if res in CADET_PATH and CADET_PATH[res] != scream: