What does Dense Data Workbenches conclude, in numbers, about “The Workbench Playbook: Reconciliation, Orders, Stock and Customer Records, and the Distillation Spec”?
Answer: Each of the four workbenches has one pivot that connects seeing with doing. Reconciliation uses two matching passes to turn 1,089 red rows into an 18-row queue. Orders use a server-side state machine plus buttons so that 6.04 illegal options no longer appear on screen. Stock compares the inventory position, so red rows fall from 35.60 a day to 4.24 with stock-outs just as low. Customer records normalise on entry, so de-duplication goes from finding 66 duplicates to finding all 300. The next section writes these practices, together with the calculations of the earlier chapters, into new specifications for the front-end style kit.
Scope of the numbers: The book is not accounting, audit or legal advice. Marked boxes separate published evidence, runnable calculations, sources and the author's hypotheses, each stating what would refute it; the source studied is the reporting system of the Tang finance minister Liu Yan, given in paraphrase.
Data table
The numbers below are printed verbatim by the chapter's Python program and can be reproduced by running it. standard-library Python onlyprinted values that match the answer: 1089, 18, 300
| history | 60 days, labelled anomalies 1106, 18.43 a day |
| threshold 1.0: flags/day 204.60, true/day 17.07 | |
| threshold 2.0: flags/day 39.70, true/day 12.45 | |
| threshold 2.5: flags/day 16.80, true/day 9.02 | |
| case what verdict code hit result | |
| DT01 ledger table as specified PASS OK - | |
| DT02 amount column left-aligned REFUSE D1 D1 | |
| DT03 amount trimmed to 0 decimals REFUSE D1 D1 | |
| DT04 | 1,200 rows, header scrolls away REFUSE D2 D2 |
| DT05 wide table, reference column scrolls REFUSE D2 D2 | |
| DT06 touch layout, 36 px rows REFUSE S3 S3 | |
| DT07 touch layout, 44 px rows PASS OK - | |
| DT08 unknown column kind REFUSE E0 E0 | |
| CF01 alert 18/day PPV 1, watch 19.48/day PASS OK - alert/screen | 0.38 watch/screen=0.41 |
| CF02 chapter 1 red rows | 435/day, PPV 0.037 REFUSE D4 D4,D5 alert/screen=9.06 |
| CF03 alert tier with colour only REFUSE D3 D3 alert/screen | 0.38 watch/screen=0.41 |
| CF04 watch tier with neither glyph nor edge REFUSE D3 D3 alert/screen | 0.38 watch/screen=0.41 |
| CF05 alert tier PPV 0.40 REFUSE D4 D4 alert/screen | 0.38 watch/screen=0.41 |
| CF06 watch tier without measured PPV REFUSE D4 D4 alert/screen | 0.38 watch/screen=0.41 |
| CF07 naive diff rule, 1,089 rows/day REFUSE D4 D4,D5 alert/screen | 22.69 |
| CF08 muted text in a watch cell REFUSE S1 S1 alert/screen | 0.38 watch/screen=0.41 |
| CF09 alert at budget edge, 48 rows/day PASS OK - alert/screen | 1.0 |
| CF10 watch tier 150 rows/day REFUSE D5 D5 alert/screen | 0.38 watch/screen=3.12 |
| AT01 threshold 2.5 PASS OK - ppv | 0.537 recall=0.489 per_op_hour=0.53 |
| AT02 threshold 2.0 PASS OK - ppv | 0.314 recall=0.675 per_op_hour=1.24 |
| AT03 threshold 1.0 REFUSE D7 D7,D8 ppv | 0.083 recall=0.926 per_op_hour=6.39 |
| AT04 threshold 2.5, only 20 labelled REFUSE D6 D6 labelled | 20 |
| FG01 order entry as specified PASS OK - |
Show the full program
# Chapter 7. p75: Reference implementation of the four new style-kit checks and their golden cases.
# D3 follows WCAG 2.1 success criterion 1.4.1 (colour is never the only visual means of conveying meaning).
# Ops: table_spec (data table), cf_rules (conditional-format rule table), alert_threshold (alarm budget),
# form_guard (error-proof form). Refusal codes D1-D14 are this book's; S1 and S3 reuse the kit's codes.
# Parameters, each traced to a program of this book:
# tier PPV floors alert 0.5, watch 0.1, and at most 3.0 watch rows per screen (chapter 3 tier rules);
# alert rate <= 6 per operator-hour (chapter 4, ISA-18.2); learned-default accuracy >= 0.90 (p61); full
# checks on blur or hybrid only (p62); typed count from 50 rows, cap 300 rows per batch (p64).
# Set by this chapter: alert rows per 25-row screen <= 1.0 on average (the p70 exception queue needs
# 0.38); at least 30 labelled anomalies before a threshold is set. D3: an alert tier needs a glyph; a
# watch tier needs a glyph or an edge bar, so that hue is never the only channel.
# The alert_threshold cases use a seeded history (seed 7575): 60 days x 1,200 rows, anomaly rate 0.015,
# scores N(0,1) clean and N(2.5,1) anomalous; 4 operators x 8 hours. Golden outputs recorded on CPython 3.11.
import random
COL = {"dark": {"text-body": "#F2F0EA", "text-muted": "#8A8A93", "danger-text": "#F26B6F",
"accent": "#C9A45C",
"surface": "#1A1A1F", "cf-alert-bg": "#E5484D", "cf-alert-fg": "#0E0E10",
"cf-watch-bg": "#33290F",
"row-selected": "#2A2A33", "row-stripe": "#212127"}}
NUMERIC = ("money", "number", "qty")
PPV_FLOOR = {"alert": 0.5, "watch": 0.1}
BUDGET = {"alert": 1.0, "watch": 3.0}
def lum(h):
out = []
for i in (1, 3, 5):
c = int(h[i:i + 2], 16) / 255
out.append(c / 12.92 if c <= 0.03928 else ((c + 0.055) / 1.055) ** 2.4)
return 0.2126 * out[0] + 0.7152 * out[1] + 0.0722 * out[2]
def ratio(a, b):
la, lb = sorted((lum(a), lum(b)), reverse=True)
return (la + 0.05) / (lb + 0.05)
def table_spec(x):
hit = []
for c in x["columns"]:
if c["kind"] not in ("id", "text", "date", "status") + NUMERIC:
return ["E0"], {}
if c["kind"] in NUMERIC:
need_dec = 2 if c["kind"] == "money" else c.get("decimals", 0)
if c.get("align") != "right" or not c.get("tabular") or c.get("decimals") != need_dec \
or (c["kind"] != "qty" and not c.get("grouping")):
hit.append("D1")
if x["rows"] > x["viewport_rows"] and not x["header_sticky"]:
hit.append("D2")
if x["overflow_x"] and not x["first_sticky"]:
hit.append("D2")
if x["touch"] and x["row_height"] < 44:
hit.append("S3")
return hit, {}
def cf_rules(x):
hit, per = [], {}
screens = x["rows_per_day"] / x["screen_rows"]
for t in x["tiers"]:
if t["tier"] not in PPV_FLOOR:
return ["E0"], {}
if not t.get("glyph") and (t["tier"] == "alert" or not t.get("edge")):
hit.append("D3")
if t.get("ppv") is None or t["ppv"] < PPV_FLOOR[t["tier"]]:
hit.append("D4")
if t["tier"] == "alert" and t["scope"] == "row":
hit.append("D5")
col = COL[x["theme"]]
if ratio(col[t["fg"]], col[t["bg"]]) < 4.5:
hit.append("S1")
per[t["tier"]] = t["rows_per_day"] / screens
if per.get("alert", 0) > BUDGET["alert"] or per.get("watch", 0) > BUDGET["watch"]:
hit.append("D5")
return hit, {k + "/screen": round(v, 2) for k, v in per.items()}
def alert_threshold(x):
hit = []
if x["labelled_anomalies"] < 30:
return ["D6"], {"labelled": x["labelled_anomalies"]}
ppv = x["true_per_day"] / x["flags_per_day"]
rate = x["flags_per_day"] / (x["operators"] * x["hours"])
recall = x["true_per_day"] / x["anomalies_per_day"]
if ppv < PPV_FLOOR["watch"]:
hit.append("D7")
if rate > 6:
hit.append("D8")
return hit, {"ppv": round(ppv, 3), "recall": round(recall, 3), "per_op_hour": round(rate, 2)}
def form_guard(x):
hit = []
for f in x["fields"]:
if f["kind"] == "enum" and f["control"] == "text":
hit.append("D9")
if f["kind"] == "id" and f["control"] in ("text", "mask") and f.get("check", "none") == "none":
hit.append("D10")
d = f.get("default", {"source": "none"})
if d["source"] in ("static", "sticky") or (d["source"] in ("learned", "derived")
and d.get("accuracy", 0) < 0.90):
hit.append("D11")
if f.get("validate") in ("keystroke", "submit"):
hit.append("D12")
for a in x["actions"]:
if a["guard"] == "modal_generic" or (a["leaves"] and a["guard"] not in ("outbox", "modal_specific")):
hit.append("D13")
if a.get("batch") and (a["max_rows"] > 300 or (a["max_rows"] >= 50 and not a.get("typed_count"))):
hit.append("D14")
return hit, {}
OPS = {"table_spec": table_spec, "cf_rules": cf_rules, "alert_threshold": alert_threshold,
"form_guard": form_guard}
def run(x):
try:
hit, extra = OPS[x["op"]](x)
except (KeyError, TypeError, ValueError, ZeroDivisionError):
hit, extra = ["E0"], {}
hit = list(dict.fromkeys(hit))
return ("REFUSE" if hit else "PASS"), (hit[0] if hit else "OK"), hit, extra
def history():
rng = random.Random(7575)
rows = []
for _ in range(60 * 1200):
a = rng.random() < 0.015
rows.append((rng.gauss(2.5 if a else 0.0, 1.0), a))
return rows
if __name__ == "__main__":
h = history()
n_an = sum(1 for _, a in h if a)
thr = {}
for t in (1.0, 2.0, 2.5):
f = [a for s, a in h if s > t]
thr[t] = (len(f) / 60, sum(f) / 60)
print("history: 60 days, labelled anomalies {}, {:.2f} a day".format(n_an, n_an / 60))
for t, (fl, tr) in thr.items():
print(" threshold {:.1f}: flags/day {:.2f}, true/day {:.2f}".format(t, fl, tr))
def at(t, labelled=n_an):
return {"op": "alert_threshold", "flags_per_day": thr[t][0], "true_per_day": thr[t][1],
"anomalies_per_day": n_an / 60, "labelled_anomalies": labelled, "operators": 4, "hours": 8}
money = {"key": "amount", "kind": "money", "align": "right", "decimals": 2, "grouping": True,
"tabular": True}
ref = {"key": "ref", "kind": "id", "align": "left"}
base_t = {"op": "table_spec", "rows": 1200, "viewport_rows": 25, "row_height": 28, "touch": False,
"overflow_x": True, "header_sticky": True, "first_sticky": True, "columns": [ref, money]}
alert = {"tier": "alert", "scope": "cell", "fg": "cf-alert-fg", "bg": "cf-alert-bg", "glyph": "!",
"ppv": 1.0, "rows_per_day": 18}
watch = {"tier": "watch", "scope": "cell", "fg": "text-body", "bg": "cf-watch-bg", "glyph": "",
"edge": "accent", "ppv": 0.101, "rows_per_day": 19.48}
base_c = {"op": "cf_rules", "theme": "dark", "screen_rows": 25, "rows_per_day": 1200,
"tiers": [alert, watch]}
fld = [{"name": "currency", "kind": "enum", "control": "select",
"default": {"source": "learned", "accuracy": 0.9073}, "validate": "blur"},
{"name": "tracking", "kind": "id", "control": "mask", "check": "mod97", "validate": "hybrid"},
{"name": "amount", "kind": "money", "control": "mask", "validate": "hybrid"}]
act = [{"name": "refund", "leaves": True, "guard": "modal_specific"},
{"name": "message", "leaves": True, "guard": "outbox"},
{"name": "batch_status", "leaves": False, "guard": "undo", "batch": True, "max_rows": 300,
"typed_count": True}]
base_f = {"op": "form_guard", "fields": fld, "actions": act}
def mod(base, **kw):
y = dict(base)
y.update(kw)
return y
def fmod(i, **kw):
y = [dict(f) for f in fld]
y[i].update(kw)
return mod(base_f, fields=y)
def amod(i, **kw):
y = [dict(a) for a in act]
y[i].update(kw)
return mod(base_f, actions=y)
cases = [
("DT01", "ledger table as specified", base_t),
("DT02", "amount column left-aligned", mod(base_t, columns=[ref, dict(money, align="left")])),
("DT03", "amount trimmed to 0 decimals", mod(base_t, columns=[ref, dict(money, decimals=0)])),
("DT04", "1,200 rows, header scrolls away", mod(base_t, header_sticky=False)),
("DT05", "wide table, reference column scrolls", mod(base_t, first_sticky=False)),
("DT06", "touch layout, 36 px rows", mod(base_t, touch=True, row_height=36)),
("DT07", "touch layout, 44 px rows", mod(base_t, touch=True, row_height=44)),
("DT08", "unknown column kind", mod(base_t, columns=[dict(ref, kind="colour")])),
("CF01", "alert 18/day PPV 1, watch 19.48/day", base_c),
("CF02", "chapter 1 red rows: 435/day, PPV 0.037",
mod(base_c, tiers=[dict(alert, scope="row", ppv=0.037, rows_per_day=435)])),
("CF03", "alert tier with colour only", mod(base_c, tiers=[dict(alert, glyph=""), watch])),
("CF04", "watch tier with neither glyph nor edge", mod(base_c, tiers=[alert, dict(watch, edge="")])),
("CF05", "alert tier PPV 0.40", mod(base_c, tiers=[dict(alert, ppv=0.40), watch])),
("CF06", "watch tier without measured PPV", mod(base_c, tiers=[alert, dict(watch, ppv=None)])),
("CF07", "naive diff rule, 1,089 rows/day",
mod(base_c, tiers=[dict(alert, ppv=0.0165, rows_per_day=1089)])),
("CF08", "muted text in a watch cell", mod(base_c, tiers=[alert, dict(watch, fg="text-muted")])),
("CF09", "alert at budget edge, 48 rows/day", mod(base_c, tiers=[dict(alert, rows_per_day=48)])),
("CF10", "watch tier 150 rows/day", mod(base_c, tiers=[alert, dict(watch, rows_per_day=150)])),
("AT01", "threshold 2.5", at(2.5)),
("AT02", "threshold 2.0", at(2.0)),
("AT03", "threshold 1.0", at(1.0)),
("AT04", "threshold 2.5, only 20 labelled", at(2.5, labelled=20)),
("FG01", "order entry as specified", base_f),
("FG02", "currency typed as free text", fmod(0, control="text")),
("FG03", "tracking typed with no check digit", fmod(1, check="none")),
("FG04", "currency pre-filled JPY (static)", fmod(0, default={"source": "static"})),
("FG05", "learned default at 0.85", fmod(0, default={"source": "learned", "accuracy": 0.85})),
("FG06", "full check on every keystroke", fmod(2, validate="keystroke")),
("FG07", "refund behind 'Are you sure?'", amod(0, guard="modal_generic")),
("FG08", "message sent at once, no outbox", amod(1, guard="none")),
("FG09", "batch of up to 906 rows", amod(2, max_rows=906)),
("FG10", "batch of 300 without typed count", amod(2, typed_count=False)),
]
print("case what verdict code hit result")
for cid, what, x in cases:
v, code, hit, extra = run(x)
res = " ".join("{}={}".format(k, v2) for k, v2 in extra.items()) if extra else ""
line = "{:4s} {:38s} {:7s} {:4s} {:6s} {}".format(cid, what, v, code, ",".join(hit) or "-", res)
print(line.rstrip())
print("cases {}; refusal codes triggered: {}".format(len(cases), ", ".join(sorted(
{c for _, _, x in cases for c in run(x)[2]}, key=lambda s: (s[0], int(s[1:]))))))Single source and citation
Fan, Y. (2026). Cognitive Unloading of Dense Data Workbenches, Conditional-Format Salience and Zero-Training Error-Proof Form Engineering (Version 0.1.0), Chapter 7: The Workbench Playbook: Reconciliation, Orders, Stock and Customer Records, and the Distillation Spec. 5D Library. DOI pending
DOI pending · monograph page goes live after publication · 5DL-B-138 · v0.1.0 · CC-BY-NC-ND-4.0
BibTeX
@book{fan2026138,
author = {Fan, Yafu},
title = {Cognitive Unloading of Dense Data Workbenches, Conditional-Format Salience and Zero-Training Error-Proof Form Engineering},
year = {2026},
publisher = {5D Library},
edition = {0.1.0},
note = {DOI pending}
}Other chapter answers in this book
- Chapter 1 · Method: Three Losses, Four Metrics, Evidence Grades and the Liu Yan Reporting System
- Chapter 2 · Scan Paths and the Skeleton of a Table: Column Order, Alignment, Frozen Panes and Density
- Chapter 3 · Preattentive Salience: Let the Anomalies Jump Out, and Only the Anomalies
- Chapter 4 · Alarm Thresholds: Signal Detection, ROC, the Cost Matrix and a Per-Screen Alarm Cap
- Chapter 6 · Zero-Training Error-Proof Forms: Constraints, Defaults, Inline Validation, Confirm-or-Undo and Batch Guards
- Chapter 8 · Practice: Rebuilding the Harbourbridge Reconciliation Back Office from Diagnosis to Redesign