Skip to content

Round-trip test matrix, fuzzing, sabotage, coverage gate, nightly mutation, regression ledger - #38

Merged
guijacquemet merged 15 commits into
mainfrom
claude/roundtrip-matrix
Oct 8, 2026
Merged

guijacquemet merged 15 commits into
mainfrom
claude/roundtrip-matrix

Conversation

@guijacquemet

Copy link
Copy Markdown
Contributor

Tests and CI only; no production code changes, no existing test edited (ci.yml, .gitignore, pyproject.toml and one row of tests/README.md are the only modified files).

What it adds

  • labconstrictor_tools/examples/roundtrip.py: an echo tool for every declared type plus transforms with known answers (the oracle is computed independently in the tests).
  • About 700 generated cases (dtypes, shapes, NaN/inf, awkward text, tables, files, points and shapes), pushed through every real path: the worker protocol (client.WorkerProcess), the CLI, the executed Python snippet, the executed terminal line (real shell), the notebook form, and shared memory. A test fails if a declared type, tool or marker has no case.
  • About 45 hypothesis properties (deterministic CI profile; LC_HYPOTHESIS_PROFILE=nightly for the big one), metamorphic geometry checks, hint-combination checks generated from the marker list, and failure injection through the real client.
  • Production-code guarantees: coverage measured on labconstrictor_tools only (85.95% today, CI floor 85 on Linux 3.12), a vulture scan with a reasoned whitelist, a sabotage test (44 deliberate breaks of production functions, all caught), and a nightly workflow with mutmut and the big hypothesis profile.
  • docs/TESTING.md and docs/REGRESSION_LEDGER.md (guarded by a test).

19 real findings (F1-F19) are not fixed here. Each is listed in tests/roundtrip_known_failures.py with a minimal reproduction and the expected behaviour; the matrix skips exactly these ids and a watcher test fails when one starts passing, so the list cannot rot. Each gets its own fix PR. Summary: wrong error codes for bad numbers and bad returns (F1, F5), table precision, names and NA text (F2, F3, F7), bad table files (F4), Affine NaN (F6), notebook clamps and unset optionals (F8, F9), Windows quoting of a trailing backslash (F10), shared-memory and path inputs (F11, F12), the worker destroying the host's shared memory (F13), labels_to_shapes dropping single pixels (F14), odd image outputs (F15), silently accepted hint misuse (F16), task() on a dead worker (F17), POSIX children surviving the host (F18), progress truncation (F19).

Verified by the author on Linux/py3.11: lint trio clean, the new set stable over 3 runs, whole suite shows only the 2 environmental failures that main has in this sandbox. Windows and macOS are verified only by this PR's CI. Adding scikit-image to the test extra makes test_shapes run in CI for the first time.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Y2SN8SuEakTdiWy3F2WUqN


Generated by Claude Code

claude added 15 commits October 8, 2026 09:17
…nd transforms with known results

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Y2SN8SuEakTdiWy3F2WUqN
…nd its self-checks

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Y2SN8SuEakTdiWy3F2WUqN
…opied snippet and terminal line, notebook form

Adds the harness (host-side writers and readers, one comparator per output type), the matrix runner, the copy-as-command tests
(quoting against a real shell and the documented Windows rules, app names with spaces and quotes), the shared-memory ownership
test and the known-failures list with its watcher. The defects found are listed, not fixed.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Y2SN8SuEakTdiWy3F2WUqN
…ror, round-trip identity, strict JSON, text never becomes a path or shell text

Deterministic ci profile (derandomized, 200 examples per property); nightly profile selected with LC_HYPOTHESIS_PROFILE.
hypothesis, scikit-image added to the test extra.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Y2SN8SuEakTdiWy3F2WUqN
…ntion; two more findings listed

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Y2SN8SuEakTdiWy3F2WUqN
…ed combination obeys the manifest, every invalid one is refused

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Y2SN8SuEakTdiWy3F2WUqN
…ngs and cancel, unserialisable and huge results, noise, floods, leftover processes

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Y2SN8SuEakTdiWy3F2WUqN
…d), a floor in the Linux 3.12 CI job, and a report of code that only tests reach

Floor 85 % (measured 85.95 % on the whole suite). The CI lint job also runs vulture (next commit).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Y2SN8SuEakTdiWy3F2WUqN
…very entry has a reason

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Y2SN8SuEakTdiWy3F2WUqN
…t be caught by the guarding slice of the matrix

Also: tool declarations read robustly when other tests clear the registry (roundtrip_app), one test per hypothesis property,
slice filters (LC_ROUNDTRIP_FILTER), region message tests, shared-memory check waits for the worker's tracker.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Y2SN8SuEakTdiWy3F2WUqN
…stems, and mutation testing (mutmut 3.8.0) of convert, introspection, shapes, region and command with the surviving mutants uploaded

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Y2SN8SuEakTdiWy3F2WUqN
…production-code guarantees) and docs/REGRESSION_LEDGER.md seeded with this week's CI bugs

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Y2SN8SuEakTdiWy3F2WUqN
…, F13 from Python 3.11, F20 (ARM float32 exactness cast) as a known failure, per-run results home for the command-line transports, pipes released and collected by the new tests

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Y2SN8SuEakTdiWy3F2WUqN
… process group in a race), no Python-version threshold

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Y2SN8SuEakTdiWy3F2WUqN
…n 3.10 too); the harness retries a Windows registration refused by os.replace (F21, ledger row, production fix pending)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Y2SN8SuEakTdiWy3F2WUqN
@guijacquemet
guijacquemet merged commit e2faccf into main Oct 8, 2026
14 checks passed
@guijacquemet
guijacquemet deleted the claude/roundtrip-matrix branch October 14, 2026 16:09
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.

2 participants