Repository navigation
Audit fixes before v0.3.0-alpha.1: told TIFF fallback, ledger, docs, test hygiene, CI hardening - #129
Merged
Merged
Conversation
…er, docs, test hygiene - convert._memmap_tiff: a TIFF of 8 MiB or more that is read the plain way logs one warning (file, reason) to the log and the worker's stderr - worker._orphan_exit: a temp folder that cannot be removed is logged - ledger rows for #124 and #125, real PR numbers instead of "this PR", pending section replaced by a note - docs: tag install URLs, OPERATIONS contradictions, HOST_FEATURES rows, Playground rule, features rule exception - tests: new tests and sabotage rows, dead retention guard removed, gc test asserts, test count not hard-coded Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Y2SN8SuEakTdiWy3F2WUqN
…s Fiji and QuPath refs as inputs 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
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.
Fixes the items of the rules audit (/home/user/AUDIT_rules_tools_template.md) that had to land before the tag
v0.3.0-alpha.1. Smallest changes, no refactoring. Two commits: code, docs and tests; then CI hardening. Not merged.What changes, per item
1. Silent fallbacks
convert._memmap_tiff: every "read it the plain way" return goes through_not_mapped(path, reason). For a file of 8 MiB or more (MEMMAP_MIN_BYTES) it writes one warning,TIFF <name> was read into memory, not memory-mapped: <reason>, to the log file (log.warning) and to the worker's stderr (LabConstrictor worker: ..., like the worker's other notes). Reasons: compressed, tiled, multi-series (n series), big-endian byte order, truncated, not contiguous, pyramid levels, OME/other series kind, pixel type,LC_TIFF_MEMMAP=0, or a failed mapping (exception type and text). Files under 8 MiB, and mapped files, say nothing. The refusal conditions are the same as before, only split so each has its reason (no behaviour change for what is mapped).docs/OPERATIONS.md"Fallbacks (intended)": rows for the TIFF fallback and forWorker._orphan_exit.worker._orphan_exit: keptignore_errors=True(a failing remove must not stop the worker leaving), but a folder that still exists is logged withlog.warningto the log file only (stderr has no reader once the host is gone;_complainthere could raise on a closed pipe and stop the exit).convert.py:181(OverflowError, refused two lines later), the twoProcessLookupError,registry.py:417(race, commented, entry reported elsewhere),retentionOSErrorreturns (end in the reportskippedor the documented lock exit code),cliFileExistsError, prune guard, diagnostics, exporter, protocol, conformance: all are told elsewhere or are correct control flow and are left as they are. Only the two above were silent without a reason.2. Ledger and HOST_FEATURES
REGRESSION_LEDGER.md: rows for Worker exit code 3 is called an import failure only when the worker said so on stderr #124 and Worker: honour or refuse shared-memory order; memory-map big TIFF inputs #125 with their guards; a row for the TIFF fallback (Audit fixes before v0.3.0-alpha.1: told TIFF fallback, ledger, docs, test hygiene, CI hardening #129); all 26 "this PR" replaced by real PR links (looked up with the PR search: Fix: error codes and validation (F1 F5 F6 F11 F12 F15 F16 F20) #41, Fix: worker and client lifecycle (F13 F17 F18 F19 F21) #42, Fix: labels_to_shapes never drops a label that simplification collapses (F14) #43, Fix: Windows quoting follows the C runtime backslash rules, shared quote vectors (F10) #44, Fix: table inputs read floats exactly, keep names as written, NA words stay text, readable errors (F2 F3 F4 F7) #45, Fix: notebook form has no silent number clamp, and optional parameters can be left unset (F8 F9) #46, Fix: Windows quoting (F10) and table inputs (F2 F3 F4 F7), merged and conflict-resolved together #47, Tools versioning: 0.2.0rc1, tools_version/features, reserved-input tolerance, compat check, compat CI job #110, Conformance: conformance.json (packaged), validating loader, host loaders documented (phase 0.3, PR B) #113, Notebook form: refuse an integer beyond 2^53-1 with the sentence of spec 6.2 (NUM-02, NUM-03) #116, Fix main CI on Windows/macOS Python 3.10 (wheel test, conformance CLI test) #118, Record two decisions of 13 Oct: changed-size sentence, crash after Cancel (spec, data, fixtures) #121, runs: build_record, record_json, done_status for hosts that write their own run record #122; F2/F3/F4/F7 and F10 carry both the fix PR and Fix: Windows quoting (F10) and table inputs (F2 F3 F4 F7), merged and conflict-resolved together #47, which merged them); the "fix PRs pending" section is gone, its 8 rows moved into the table, and a note saystests/roundtrip_known_failures.pyis empty (FINDINGS = {},KNOWN = {}).HOST_FEATURES.md: rows for the shared-memoryorder(shm_order_v1) and the TIFF memory map. The host columns say "same" (worker-side behaviour); whether each host sends F-ordered blocks is not checked here.3. Install from the tag.
README.md(themain.zipblock removed, the tag block kept),OPERATIONS.mdInstall (Tools by tag; the Napari plugin has no tag and staysrefs/heads/main, labelled as development version),LABCONSTRICTOR_INTEGRATION.mdline 15,HUMAN_TEST_PROTOCOL.mdline 207 (the URL only; thenapari[pyqt5]text there is untouched, as asked).4. OPERATIONS contradictions
features.pydocstring: states the exception (a flag added later for already shipped behaviour is allowed when it is the only way to tell versions apart;shm_order_v1).TESTING.md("The Playground rule", with where it is checked) and pointed to fromOPERATIONS.md.5. Test hygiene.
tests/README.mdno longer hard-codes a count (and names the permanent skips); the deadtry/except ImportErrorandskipIf(retention is None)intest_conformance.pyremoved (retention is imported directly, thecli/runsfallback branch too);test_regressions_run1_gcnow assertsgc.garbage == [];TESTING.mdlistssmoke_migration. Also inTESTING.md: the sabotage claim now says "in the table" and names what is covered, and the known-failures row says the list is empty.6. CI hardening (second commit). The only third-party action is
conda-incubator/setup-miniconda(smoke_install, smoke_migration): pinned tofc2d68f6413eb2d87b895e92f8584b5b94a10167 # v3.3.0(SHA of the tagv3.3.0, equal to the oldv3tag, resolved withgit ls-remoteand fetched to confirm the commit exists).tj-actions/changed-filesis not used in this repository (it is in the template). GitHub's ownactions/*stay on major tags;TESTING.mdsays so.release_sandbox: new inputsfiji_refandqupath_ref(defaultmain, passed togit clone --branchthroughenv; the default branch of both repositories ismain, so behaviour is unchanged);napari_refdescription says what it is.TESTING.md: smoke workflows are dispatch-only (no schedule, no PR trigger;smokealso on pushes toclaude/smoke-bridge) and a table of which ones default to branch names.Tests changed
tests/test_input_loading.py::MappedTiff:test_a_file_that_could_not_be_mapped_says_why_in_the_log_and_on_stderr(compressed, tiled, multi-series, big-endian, not contiguous, truncated; one line, file name, reason, same text on stderr),test_the_environment_switch_is_told_for_a_big_file,test_nothing_is_said_for_a_small_file_or_a_mapped_one.tests/test_worker_orphan_exit.py(2 tests).tests/test_sabotage.py(log line removed, small-file gate removed, orphan log removed) and updated the existing row "pages of a TIFF stack are not checked for gaps" because the line it breaks moved. Sabotage-checked: each new row's break makes its slice fail (run withLC_SABOTAGE_ONLY); while writing the compressed-file test it also caught a wrong reason ("no contiguous pixel data" for a compressed file), fixed before the commit.tests/test_conformance.py(guard removed, nothing else),tests/test_regressions_run1_gc.py(assertion added). No test was skipped, loosened or deleted.Not verified
release_sandboxchange is not exercised (dispatch-only, needs a released app); the YAML parses. The pinnedsetup-minicondaSHA runs only insmoke_install/smoke_migration, which were not dispatched.tj-actions/changed-files@v44and the template pin are separate work.CI
cion the PR head and a full-matrixworkflow_dispatchrun (6 test jobs, lint, compat) are green: https://github.com/CellMigrationLab/LabConstrictor-Tools/actions/runs/38425033947🤖 Generated with Claude Code
https://claude.ai/code/session_01Y2SN8SuEakTdiWy3F2WUqN