Document WCAB 0.3.0 evaluation protocol
Browse filesAdd the tool-neutral observation contract, coverage-aware scoring rationale, and v0.3.0 validation record while retaining the schema-v2 fixture snapshot.
- README.md +2 -1
- RESEARCH.md +13 -0
- docs/observations.md +116 -0
- docs/validation.md +22 -8
README.md
CHANGED
|
@@ -62,4 +62,5 @@ wcab validate --fixtures fixtures
|
|
| 62 |
```
|
| 63 |
|
| 64 |
See the [source repository](https://github.com/SybilGambleyyu/workbook-change-benchmark)
|
| 65 |
-
for the schema,
|
|
|
|
|
|
| 62 |
```
|
| 63 |
|
| 64 |
See the [source repository](https://github.com/SybilGambleyyu/workbook-change-benchmark)
|
| 65 |
+
for the truth schema, tool-neutral observation protocol, validation contract,
|
| 66 |
+
and releases. The dataset is MIT licensed.
|
RESEARCH.md
CHANGED
|
@@ -52,3 +52,16 @@ change-review case that ordinary formula text comparison misses: the stored
|
|
| 52 |
formula can remain unchanged while the Table's stored range grows. WCAB schema
|
| 53 |
version 2 therefore adds a generated Table-expansion case that checks those
|
| 54 |
observable facts without evaluating a formula or asserting a result value.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 52 |
formula can remain unchanged while the Table's stored range grows. WCAB schema
|
| 53 |
version 2 therefore adds a generated Table-expansion case that checks those
|
| 54 |
observable facts without evaluating a formula or asserting a result value.
|
| 55 |
+
|
| 56 |
+
## Evidence scoring without a false-positive fiction
|
| 57 |
+
|
| 58 |
+
The [NIST static-analysis methodology](https://www.nist.gov/system/files/documents/2021/03/24/CAS%202012%20Static%20Analysis%20Tool%20Study%20Methodology.pdf)
|
| 59 |
+
defines precision as reported true findings divided by all reported findings,
|
| 60 |
+
and recall as reported true findings divided by all known findings. WCAB's
|
| 61 |
+
truth is intentionally not a complete list of every difference in a workbook:
|
| 62 |
+
it declares review-relevant facts plus coverage boundaries. Calling every
|
| 63 |
+
unlisted tool observation a false positive would therefore misrepresent the
|
| 64 |
+
oracle. Version 0.3 adds a normalized adapter protocol that measures recall of
|
| 65 |
+
declared facts, analyzed coverage, and reference-policy agreement, while
|
| 66 |
+
preserving unrecognized observations for review instead of forcing a precision
|
| 67 |
+
claim.
|
docs/observations.md
ADDED
|
@@ -0,0 +1,116 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# WCAB normalized observation protocol, version 1
|
| 2 |
+
|
| 3 |
+
WCAB evaluates tools that inspect a baseline/candidate workbook change. Native
|
| 4 |
+
tool reports differ, so an adapter should translate its result into this small
|
| 5 |
+
JSON protocol before invoking `wcab score`. The protocol is deliberately
|
| 6 |
+
separate from the fixture truth schema: a tool may keep its own report format,
|
| 7 |
+
but its benchmark adapter has one portable target.
|
| 8 |
+
|
| 9 |
+
## Start with a template
|
| 10 |
+
|
| 11 |
+
```bash
|
| 12 |
+
wcab observation-template --fixtures fixtures --output observations.json
|
| 13 |
+
# Run an adapter that replaces unsupported entries with observed evidence.
|
| 14 |
+
wcab score --fixtures fixtures --observations observations.json \
|
| 15 |
+
--output score.json
|
| 16 |
+
```
|
| 17 |
+
|
| 18 |
+
The template is valid and marks every case `unsupported`. That is intentional:
|
| 19 |
+
unsupported coverage is visible in the score rather than being treated as a
|
| 20 |
+
pass.
|
| 21 |
+
|
| 22 |
+
## Document shape
|
| 23 |
+
|
| 24 |
+
```json
|
| 25 |
+
{
|
| 26 |
+
"schema_version": 1,
|
| 27 |
+
"benchmark": {"fixture_schema_versions": [2]},
|
| 28 |
+
"tool": {"name": "example-tool", "version": "1.4.0"},
|
| 29 |
+
"cases": [
|
| 30 |
+
{
|
| 31 |
+
"id": "finance.formula_to_value",
|
| 32 |
+
"status": "analyzed",
|
| 33 |
+
"facts": [
|
| 34 |
+
{
|
| 35 |
+
"fact": {
|
| 36 |
+
"kind": "formula_to_value",
|
| 37 |
+
"sheet": "Revenue",
|
| 38 |
+
"cell": "C8"
|
| 39 |
+
},
|
| 40 |
+
"evidence": {"native_rule": "hardcode-replacement"}
|
| 41 |
+
}
|
| 42 |
+
],
|
| 43 |
+
"review": "block",
|
| 44 |
+
"coverage": []
|
| 45 |
+
}
|
| 46 |
+
]
|
| 47 |
+
}
|
| 48 |
+
```
|
| 49 |
+
|
| 50 |
+
`schema_version` is the observation protocol version. `fixture_schema_versions`
|
| 51 |
+
must name the truth-schema versions the adapter analyzed. `tool.name` is
|
| 52 |
+
required; `tool.version` is optional.
|
| 53 |
+
|
| 54 |
+
Each `facts` item wraps an exact WCAB truth fact in `fact`. The optional
|
| 55 |
+
`evidence` object is adapter-owned metadata and is never scored; it can record a
|
| 56 |
+
native rule ID, report location, or another reproducible pointer without making
|
| 57 |
+
one tool's report schema normative.
|
| 58 |
+
|
| 59 |
+
## Case status and review
|
| 60 |
+
|
| 61 |
+
| `status` | Required behavior | Score treatment |
|
| 62 |
+
| --- | --- | --- |
|
| 63 |
+
| `analyzed` | May report facts and one optional `review` disposition. | Its recognized facts can contribute to expected-fact recall. |
|
| 64 |
+
| `unsupported` | Must not report facts or a review. | Explicitly counted as unsupported, never as a pass. |
|
| 65 |
+
| `error` | Must include a non-empty `error` string and must not report facts or a review. | Counted separately from unsupported coverage. |
|
| 66 |
+
|
| 67 |
+
`review` is `allow`, `review`, `block`, or `null`. A non-null disposition is
|
| 68 |
+
compared with WCAB's reference convention and reported as **reference-policy
|
| 69 |
+
agreement**. It is not a claim that every organization must use the same
|
| 70 |
+
approval policy.
|
| 71 |
+
|
| 72 |
+
Omitting a known case is permitted for partial runs, but it is reported as
|
| 73 |
+
`not_reported` and cannot contribute to coverage or agreement.
|
| 74 |
+
|
| 75 |
+
## What the score means
|
| 76 |
+
|
| 77 |
+
The scorer returns deterministic per-case details plus these aggregate metrics:
|
| 78 |
+
|
| 79 |
+
| Metric | Meaning |
|
| 80 |
+
| --- | --- |
|
| 81 |
+
| `fact_recall` | Matched declared facts divided by all declared benchmark facts. |
|
| 82 |
+
| `analysis_coverage` | Cases marked `analyzed` divided by all WCAB cases. |
|
| 83 |
+
| `review_agreement` | Cases whose analyzed review matches the reference convention divided by all WCAB cases. |
|
| 84 |
+
| `complete_case_count` | Analyzed cases with every declared fact matched, no unrecognized fact, and matching reference review. |
|
| 85 |
+
| `unrecognized_fact_count` | Reported normalized facts that are not one of the case's declared facts. |
|
| 86 |
+
|
| 87 |
+
WCAB intentionally declares targeted observable facts and explicit boundaries;
|
| 88 |
+
it does **not** claim an exhaustive inventory of every workbook difference.
|
| 89 |
+
For that reason, the scorer does not call unrecognized facts false positives
|
| 90 |
+
and does not publish a precision metric. They remain reviewable evidence rather
|
| 91 |
+
than a silent score adjustment. This follows the basic distinction between
|
| 92 |
+
precision and recall used in the [NIST static-analysis study methodology](https://www.nist.gov/system/files/documents/2021/03/24/CAS%202012%20Static%20Analysis%20Tool%20Study%20Methodology.pdf),
|
| 93 |
+
while respecting WCAB's deliberately partial oracle.
|
| 94 |
+
|
| 95 |
+
Use `--strict` when a complete reference-policy run is required. It exits
|
| 96 |
+
nonzero unless every case is complete and no unrecognized normalized fact was
|
| 97 |
+
reported.
|
| 98 |
+
|
| 99 |
+
## Optional FormulaFence reference adapter
|
| 100 |
+
|
| 101 |
+
FormulaFence remains optional and is not a package dependency. If a trusted
|
| 102 |
+
local executable is installed, WCAB can emit a normalized report from its
|
| 103 |
+
existing adapter mapping:
|
| 104 |
+
|
| 105 |
+
```bash
|
| 106 |
+
wcab formulafence-observations --fixtures fixtures \
|
| 107 |
+
--executable formulafence --output formulafence-observations.json
|
| 108 |
+
wcab score --fixtures fixtures --observations formulafence-observations.json
|
| 109 |
+
```
|
| 110 |
+
|
| 111 |
+
The adapter copies a WCAB fact into the normalized report only after it matches
|
| 112 |
+
the documented native FormulaFence change/rule category, which is preserved in
|
| 113 |
+
the optional `evidence` object. It leaves `review` as `null`: FormulaFence
|
| 114 |
+
surfaces evidence but does not impose WCAB's reference policy as a universal
|
| 115 |
+
approval decision. Any intentionally unmapped WCAB fact becomes adapter
|
| 116 |
+
coverage text and remains missing from expected-fact recall.
|
docs/validation.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
| 1 |
# Validation record
|
| 2 |
|
| 3 |
-
This record describes the WCAB 0.
|
| 4 |
2026-08-02. It is reproducible from this repository; no network service or
|
| 5 |
private workbook is required.
|
| 6 |
|
|
@@ -19,6 +19,11 @@ Commands:
|
|
| 19 |
python -m pip install -e '.[dev]'
|
| 20 |
wcab build --output fixtures
|
| 21 |
wcab manifest --fixtures fixtures
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 22 |
ruff check .
|
| 23 |
ruff format --check .
|
| 24 |
pytest
|
|
@@ -31,27 +36,32 @@ Results:
|
|
| 31 |
- 19 observable truth facts: 12 `block` and five `review` dispositions.
|
| 32 |
- 53 workbook and truth-manifest fixture files, plus one generated JSONL case
|
| 33 |
catalogue, all generated from source.
|
| 34 |
-
-
|
| 35 |
regeneration and byte-for-byte fixture-tree equality.
|
| 36 |
- The fixture validator accepted all 17 cases.
|
| 37 |
|
| 38 |
## Distribution supplement
|
| 39 |
|
| 40 |
-
The 0.
|
| 41 |
-
|
| 42 |
-
|
|
|
|
| 43 |
|
| 44 |
Commands:
|
| 45 |
|
| 46 |
```bash
|
| 47 |
python -m build
|
| 48 |
-
twine check dist/workbook_change_benchmark-0.
|
| 49 |
python -m venv /tmp/wcab-wheel-test
|
| 50 |
/tmp/wcab-wheel-test/bin/python -m pip install \
|
| 51 |
-
dist/workbook_change_benchmark-0.
|
| 52 |
/tmp/wcab-wheel-test/bin/wcab validate --fixtures fixtures
|
| 53 |
/tmp/wcab-wheel-test/bin/wcab manifest --fixtures fixtures --output /tmp/manifest.jsonl
|
| 54 |
cmp fixtures/manifest.jsonl /tmp/manifest.jsonl
|
|
|
|
|
|
|
|
|
|
|
|
|
| 55 |
```
|
| 56 |
|
| 57 |
Results:
|
|
@@ -59,8 +69,12 @@ Results:
|
|
| 59 |
- The source distribution and universal wheel passed `twine check`.
|
| 60 |
- A fresh Python 3.12 wheel installation validated all 17 fixtures and emitted
|
| 61 |
byte-identical JSONL output.
|
| 62 |
-
- The full
|
| 63 |
local Python versions (3.12 and 3.13).
|
|
|
|
|
|
|
|
|
|
|
|
|
| 64 |
|
| 65 |
## FormulaFence reference adapter
|
| 66 |
|
|
|
|
| 1 |
# Validation record
|
| 2 |
|
| 3 |
+
This record describes the WCAB 0.3.0 / schema-version-2 validation run on
|
| 4 |
2026-08-02. It is reproducible from this repository; no network service or
|
| 5 |
private workbook is required.
|
| 6 |
|
|
|
|
| 19 |
python -m pip install -e '.[dev]'
|
| 20 |
wcab build --output fixtures
|
| 21 |
wcab manifest --fixtures fixtures
|
| 22 |
+
wcab observation-template --fixtures fixtures --output /tmp/observations.json
|
| 23 |
+
wcab score --fixtures fixtures --observations /tmp/observations.json
|
| 24 |
+
wcab formulafence-observations --fixtures fixtures \
|
| 25 |
+
--executable formulafence --output /tmp/formulafence-observations.json
|
| 26 |
+
wcab score --fixtures fixtures --observations /tmp/formulafence-observations.json
|
| 27 |
ruff check .
|
| 28 |
ruff format --check .
|
| 29 |
pytest
|
|
|
|
| 36 |
- 19 observable truth facts: 12 `block` and five `review` dispositions.
|
| 37 |
- 53 workbook and truth-manifest fixture files, plus one generated JSONL case
|
| 38 |
catalogue, all generated from source.
|
| 39 |
+
- Eighteen unit tests passed under both Python versions, including independent
|
| 40 |
regeneration and byte-for-byte fixture-tree equality.
|
| 41 |
- The fixture validator accepted all 17 cases.
|
| 42 |
|
| 43 |
## Distribution supplement
|
| 44 |
|
| 45 |
+
The 0.3.0 release builds a one-row-per-case `manifest.jsonl` catalogue and a
|
| 46 |
+
tool-neutral observation protocol. Each catalogue row retains the
|
| 47 |
+
schema-version-2 truth contract and includes byte counts and SHA-256 digests
|
| 48 |
+
for the workbooks it names.
|
| 49 |
|
| 50 |
Commands:
|
| 51 |
|
| 52 |
```bash
|
| 53 |
python -m build
|
| 54 |
+
twine check dist/workbook_change_benchmark-0.3.0*
|
| 55 |
python -m venv /tmp/wcab-wheel-test
|
| 56 |
/tmp/wcab-wheel-test/bin/python -m pip install \
|
| 57 |
+
dist/workbook_change_benchmark-0.3.0-py3-none-any.whl
|
| 58 |
/tmp/wcab-wheel-test/bin/wcab validate --fixtures fixtures
|
| 59 |
/tmp/wcab-wheel-test/bin/wcab manifest --fixtures fixtures --output /tmp/manifest.jsonl
|
| 60 |
cmp fixtures/manifest.jsonl /tmp/manifest.jsonl
|
| 61 |
+
/tmp/wcab-wheel-test/bin/wcab observation-template --fixtures fixtures \
|
| 62 |
+
--output /tmp/observations.json
|
| 63 |
+
/tmp/wcab-wheel-test/bin/wcab score --fixtures fixtures \
|
| 64 |
+
--observations /tmp/observations.json
|
| 65 |
```
|
| 66 |
|
| 67 |
Results:
|
|
|
|
| 69 |
- The source distribution and universal wheel passed `twine check`.
|
| 70 |
- A fresh Python 3.12 wheel installation validated all 17 fixtures and emitted
|
| 71 |
byte-identical JSONL output.
|
| 72 |
+
- The full eighteen-test suite, lint, and format checks passed under the supported
|
| 73 |
local Python versions (3.12 and 3.13).
|
| 74 |
+
- The generated unsupported template scored as zero analyzed coverage and zero
|
| 75 |
+
expected-fact recall, confirming that unsupported cases cannot become a pass.
|
| 76 |
+
- The FormulaFence normalizer emitted 18 matched facts, one intentionally
|
| 77 |
+
unmapped fact, and no invented review disposition.
|
| 78 |
|
| 79 |
## FormulaFence reference adapter
|
| 80 |
|