"It's here anyway" + the tape measure: the human overrules the packer

Eric, looking at a dense cube full of "no room" and "unmeasured":
how do I say it really IS here, and in what orientation? Two answers.

The packer models one flat pile and one standing row; real shelves are
3-D — boxes sit crosswise, ride on top of piles, stand proud of the
edge. Acknowledge generalizes from overhang-only to the human
overruling the model: "it's here anyway" on any resident the lanes
can't take. An acknowledged box takes a lane when one works (honoring
a flat/standing override; the spine-out case lands relaxed standing,
now tagged ", proud" by the packer itself instead of guessed from
misfit-ness) and otherwise is WEDGED IN: really there, in some
arrangement the model can't see, outside the capacity bars and never
warned about. The previous commit's ackable gate is gone — accepting
always does something now, so no placebo remains to guard against.

And "unmeasured" is no longer a dead end: the chip is a button. Tap,
enter width × length × depth from your own tape measure, and it saves
to data/measurements.json (a new committed curation store) with dims
source "measured" — overlaid on every games.json read (web, dims,
export, CSV import), because the owner's ruler outranks BGG's
database. All three fields empty clears one.

Verified live: Etherfields on the tower reads "standing, proud", an
acknowledged box in a width-starved cube reads "wedged in", the
measure form opens with three inputs, zero page errors.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016jXZFSTZQKzAC8fqpWSz9g
This commit is contained in:
Eric Wagoner
2026-08-09 16:10:35 -04:00
co-authored by Claude Fable 5
parent 4952e69920
commit 6c95953dc0
15 changed files with 1135 additions and 90 deletions
+68 -30
View File
@@ -1039,10 +1039,15 @@ def test_acknowledged_overhang(tmp_path):
assert report["lanes"] == {"g1": "standing"}
assert report["standing_in"] == pytest.approx(2.9)
# the width budget stays honest: nine acknowledged monoliths
# still overflow a 23.25" row
# overflow a 23.25" row — the surplus goes wedged (the human said
# they're here), never silently placed in a lane
crowd = [(f"g{i}", ether) for i in range(9)]
report = opening_report(tower, crowd, acknowledged={k for k, _ in crowd})
assert report["overfull"]
assert not report["overfull"]
assert report["wedged"]
assert len(report["wedged"]) + len(
[lane for lane in report["lanes"].values() if lane]
) == 9
def test_import_acknowledge_column(tmp_path):
@@ -1097,17 +1102,15 @@ def test_import_acknowledge_column(tmp_path):
}
def test_ackable_only_when_it_helps(tmp_path):
"""The accept-overhang button is offered only when acknowledging
would actually give the box a lane. A depth-blocked box on a shallow
shelf is ackable; a box squeezed out of a width-starved opening is
overfull, not overhung — no placebo button."""
def test_here_anyway_wedges_the_unplaceable(tmp_path):
""""It's here anyway": acknowledging a box the lanes can't take
marks it wedged — really there, outside the capacity math — and the
opening stops warning about it."""
web, cfg = _web(
tmp_path,
{
"1": _entry("Wide Flat", 13.0, 13.0, 12.0),
"2": _entry("Squeezed Out", 10.0, 10.0, 3.0),
"3": _entry("Etherfields", 11.8, 11.8, 2.9),
},
)
save_furniture(
@@ -1123,15 +1126,7 @@ def test_ackable_only_when_it_helps(tmp_path):
"width_in": 13.25,
"height_in": 13.25,
"depth_in": 15.4,
},
{
"id": "tower",
"label": "B1",
"zone": "",
"width_in": 23.25,
"height_in": 19.0,
"depth_in": 9.5,
},
}
],
}
],
@@ -1141,18 +1136,61 @@ def test_ackable_only_when_it_helps(tmp_path):
{
"1": {"opening_id": "cube", "note": ""},
"2": {"opening_id": "cube", "note": ""},
"3": {"opening_id": "tower", "note": ""},
},
)
units = web.get("/api/shelves").json()["units"]
by_label = {o["label"]: o for o in units[0]["openings"]}
cube = {g["name"]: g for g in by_label["A1"]["resident_games"]}
# the wide flat box claims 13.0" of a 13.25" opening: 0.25" of
# standing lane left — acknowledging Squeezed Out changes nothing
assert cube["Squeezed Out"]["laneless"] is True
assert cube["Squeezed Out"]["ackable"] is False
tower = {g["name"]: g for g in by_label["B1"]["resident_games"]}
# the classic overhang: no lane takes 11.8" of depth on a 9.5"
# shelf, but standing proud works — offer the button
assert tower["Etherfields"]["laneless"] is True
assert tower["Etherfields"]["ackable"] is True
state = web.get("/api/shelves").json()
a1 = state["units"][0]["openings"][0]
squeezed = next(g for g in a1["resident_games"] if g["name"] == "Squeezed Out")
assert squeezed["laneless"] is True and squeezed["wedged"] is False
assert a1["overfull"] is True
state = web.post(
"/api/acknowledge", json={"key": "2", "acknowledged": True}
).json()
a1 = state["units"][0]["openings"][0]
squeezed = next(g for g in a1["resident_games"] if g["name"] == "Squeezed Out")
assert squeezed["wedged"] is True and squeezed["laneless"] is False
assert a1["overfull"] is False
def test_measurements_overlay(tmp_path):
"""The owner's tape measure outranks BGG: /api/measure records
dimensions for an unmeasured game, the library sees source
"measured", and clearing restores the unmeasured state."""
web, cfg = _web(tmp_path, {"1": {"name": "Mystery Box"}})
save_furniture(
cfg,
[
{
"name": "Mix",
"openings": [
{
"id": "cube",
"label": "A1",
"zone": "",
"width_in": 13.25,
"height_in": 13.25,
"depth_in": 15.4,
}
],
}
],
)
save_locations(cfg, {"1": {"opening_id": "cube", "note": ""}})
state = web.get("/api/shelves").json()
g = state["units"][0]["openings"][0]["resident_games"][0]
assert g["measured"] is False
state = web.post(
"/api/measure",
json={"key": "1", "width_in": 10.0, "length_in": 10.0, "depth_in": 2.5},
).json()
g = state["units"][0]["openings"][0]["resident_games"][0]
assert g["measured"] is True and g["lane"] == "flat"
# partial numbers are refused, never guessed
assert (
web.post("/api/measure", json={"key": "1", "width_in": 10.0}).status_code
== 400
)
# clearing (all empty) restores honest ignorance
state = web.post("/api/measure", json={"key": "1"}).json()
g = state["units"][0]["openings"][0]["resident_games"][0]
assert g["measured"] is False