Skip to content

Say what a variable, a worker, and an export actually covered - #130

Merged
rajeeja merged 1 commit into
mainfrom
rajeeja/tiers-1-3
Sep 6, 2026
Merged

Say what a variable, a worker, and an export actually covered#130
rajeeja merged 1 commit into
mainfrom
rajeeja/tiers-1-3

Conversation

@rajeeja

@rajeeja rajeeja commented Sep 6, 2026

Copy link
Copy Markdown
Collaborator

Four disclosure gaps, each measured before it was closed. Closes #34.

inspect_variable reported statistics over an unstated subset: sst returned mean 80.5, and the same field with 145 of its 162 faces masked returned mean 153.0 in the same shape with nothing saying the number describes 17 faces; a fully masked field returned NaN, which is not JSON. mesh_coverage never reached a result computed on HPC, so MESH_NOT_GLOBAL could not fire on a remote reply whatever the mesh, and every HPC result also failed its own contract because nothing declares one for remote_calculate_area. export claimed success without a single stat or read-back: CSV dropped all 8 attributes on a 9-face dataset and wrote its one NaN as an empty field, and single-variable NetCDF export dropped the CF crs container while leaving sst pointing at it.

973 passed, 13 skipped; pre-commit 11/11.

Four disclosure gaps, each measured before it was closed.

inspect_variable reported statistics over an unstated subset: `sst`
returned mean 80.5, and the same field with 145 of its 162 faces masked
returned mean 153.0 in the same shape with nothing saying the number
describes 17 faces. A fully masked field returned NaN, which is not JSON,
after three RuntimeWarnings on stderr the caller never sees. Statistics
now come off a boolean index of the finite entries, a partly masked
variable also reports n_finite and n_total, and an empty one reports null.

mesh_coverage never reached a result computed on HPC, so MESH_NOT_GLOBAL
could not fire on a remote reply whatever the mesh. AllCodeStrategies
ships one function's code and nothing else, so the measurement is nested
inside remote_inspect_mesh and remote_calculate_area, as profile_coverage
and source_coverage already are. tests/test_remote_mesh_coverage.py
compares the three copies key for key on three grids.

Every HPC result failed its own contract. _run_on_hpc stamps
tool=func.__name__, nothing declares a contract for remote_calculate_area,
so attach_provenance skipped `operation` and validate_response answered
malformed_envelope for a reply whose science was fine. The four remote_*
functions now alias to the operations they answer.

export claimed success without checking anything: no stat, no read-back,
no comparison. On a 9-face dataset, CSV dropped all 8 attributes including
every unit and wrote its one NaN as an empty field; single-variable NetCDF
export dropped the CF crs container while leaving sst pointing at it.
Exports now return an export_fidelity block measured on the written file
and warn accordingly. The file is still written -- a lossy export is the
export that was asked for, and only the silence was wrong.

Adds scripts/measure_payload.py, which says where a reply's bytes go.
Token counts appear only with tiktoken installed and are never estimated
from a bytes-per-token constant.
@rajeeja
rajeeja merged commit dfd0ab3 into main Sep 6, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant