Repository navigation
Conformance: conformance.json (packaged), validating loader, host loaders documented (phase 0.3, PR B) - #113
Merged
Merged
Conversation
…a validation labconstrictor_tools/conformance.json holds the rules that are already decided in docs/SPEC_WRONG_SCIENCE.md as data: named limits (number limits, retention quotas, lookup timings), host-internal codes, message templates, the compatibility vectors, and the wrong_science fixtures (coordinate frame CF-01..14, calibration CAL-01..18 and transitions, retention RET/HRET, run identity, asynchronous lookups, number limits NUM-01..05). It ships with the wheel (package-data). labconstrictor_tools.conformance loads and validates it (load, validate, path, python -m labconstrictor_tools.conformance). docs/CONFORMANCE.md documents the layout, how each host's test loads the file, and the gaps the spec leaves open (not invented in the file). Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Y2SN8SuEakTdiWy3F2WUqN
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Y2SN8SuEakTdiWy3F2WUqN # Conflicts: # docs/TESTING.md # tests/README.md # tests/test_sabotage.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Roadmap phase 0.3 part B ("87a"): the cross-host rules as data, plus the loader.
labconstrictor_tools/conformance.json, packaged with the wheel ([tool.setuptools.package-data]; a test builds the wheel and checks it contains the file).labconstrictor_tools/conformance.py:load()(validated, cached),validate()(hand-written schema, stdlib only, returns every problem),path(), andpython -m labconstrictor_tools.conformance --path | --validatefor hosts that are not Python.docs/CONFORMANCE.md: layout of the file, how each host's test loads it (Tools, Napari, Fiji viaLC_CONFORMANCE, QuPath), the rules for a host test, and the gaps.HOST_PARITY.mdsection 2,PROTOCOL.mdand the spec header now point to it.limits(number limits 2^53-1 and 1e15,results_kept20,run_records_kept50, lookup timings; each withstatus: decided|default),host_internal_codes(the four new ones),messages(templates),compatvectors, andwrong_science: coordinate frame (rule, placement formula, CF-01..CF-14), calibration (unit table, micro-sign and damaged-sign rule, anisotropy, default-dpi rule,_calibrationshape, CAL-01..CAL-18, CAL-T1..T9), retention (marker names; RET-01..09, 12, 13 as structured fixtures, HRET and RET-10/11/14 as host fixtures), run identity RUN-01..06, async ASY-01..08, number limits NUM-01..05.Tests (
tests/test_conformance.py)validatenever raises on odd data; a malformed file makesload()raise listing all problems.notebook.MAX_FORM_INTEGERandretention.RESULTS_KEPT/RUN_RECORDS_KEPT; everycompatvector throughcompat.check_schema; every message template is a sentence of the spec; host-internal codes match the spec text.c = x0 + (x + 0.5) * dfor every CF-14 variant, unit conversions (CAL-03, 05, 15, 16, 17, 18), the default-dpi tolerance.retention.pruneand the real CLI (4 concurrent processes, lock held by another process, symlink).conformance:*) intests/test_sabotage.py, all caught. Ledger row added in a different place from PR A's.Gaps found in the spec (not invented; full list in docs/CONFORMANCE.md "Gaps")
max_shapes,table_rows_shown,region_max_objects,max_export_bytes,max_display_bytes,cancel_grace_s,worker_orphan_grace_s,worker_idle_s, log limits,error_codes,notice_codes,worker_exit_hints,number_text(the Tools CLI itself diverges, TOOLS-7),quoting/command_vectors(Windows trailing backslash is "TO DECIDE";tests/quote_vectors.jsonstays the shared source),results_text,trust_vectors,host_error.rectis not stated (the mask shows it is[y, x], while protocol shapes are[x, y]); CF-09/CF-14 mix[width, height]and[rows, cols].millimeter, but the spec lists onlymm; long forms of the other units, case sensitivity, plurals and spaces are unspecified (onlymillimeter/millimetrewere added).>=form is from HOST_PARITY I06); float wording and the case of a GUI box that cannot hold the number are unspecified; the spec writes the key aslimits.form_integer_max = N, the file useslimits.form_integer_max.value.'L' must be <= 9007199254740991template of 6.2 (NUM-02/03). Not fixed here.default, not confirmed; N-D, downsample d != 1 and TimeIntervalOf/ZStepOf fixtures wait for Wave 2.Notes
🤖 Generated with Claude Code
https://claude.ai/code/session_01Y2SN8SuEakTdiWy3F2WUqN