Skip to content

Notebook form: refuse an integer beyond 2^53-1 with the sentence of spec 6.2 (NUM-02, NUM-03) - #116

Merged
guijacquemet merged 1 commit into
mainfrom
claude/notebook-integer-refusal
Oct 12, 2026
Merged

guijacquemet merged 1 commit into
mainfrom
claude/notebook-integer-refusal

Conversation

@guijacquemet

Copy link
Copy Markdown
Contributor

The notebook form refused an integer beyond 2^53-1 with 'L' is N, beyond the +-9007199254740991 the form can hold exactly: type a smaller number, .... Spec 6.2 (vectors NUM-02, NUM-03) asks for the worker templates, which conformance.json carries as messages.number_above_maximum and number_below_minimum. Now the form says:

  • above: 'L' must be <= 9007199254740991
  • below: 'L' must be >= -9007199254740991

where L is the field's label. Nothing else changes: code invalid_parameter, the value is never changed or clamped, no run starts, the tooltip (Whole numbers up to +-N.) is untouched. Only ToolForm.values in labconstrictor_tools/notebook.py changes (the old single abs(value) > check becomes two checks, one per template).

Tests

  • tests/test_notebook_unset_and_range.py: test_NUM_02_and_NUM_03_use_the_sentences_of_the_spec_and_start_no_run takes the vectors and templates from conformance.json (typed values and the sentence in the vector's expect), goes through ToolForm.run() and checks the status text exactly, that the tool never ran, that the control keeps the typed value, and values() raises the same message; test_NUM_01_the_largest_exact_integer_is_sent_unchanged covers the accepted edge. The older test (MAX+1 refused, MAX accepted) still passes.
  • tests/test_sabotage.py: four rows notebook form: ... (old sentence, lost minus sign, >= instead of >, negative limit moved).
  • docs/REGRESSION_LEDGER.md: one row (2026-10-12), inserted after the F4 row (not at the end of the table, to stay clear of other PRs).
  • docs/CONFORMANCE.md: Gaps item 6 (this divergence) removed; the other numbers are unchanged on purpose.

black, ruff, mypy, vulture clean; relevant tests and the sabotage rows pass.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Y2SN8SuEakTdiWy3F2WUqN


Generated by Claude Code

…the spec (NUM-02, NUM-03)

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

Copy link
Copy Markdown
Contributor Author

Local full suite as the non-root user tester, private TMPDIR (cleaned up afterwards): all tests pass except 2 in test_tools_features (test_register_writes_them_into_the_entry_and_the_cached_schema, test_doctor_prints_them_and_does_not_call_an_upgrade_stale). Those fail only in this sandbox, unrelated to this PR: the app interpreter /usr/bin/python imports an old editable install of Tools from /tmp/wt_versions (no retention_prune feature). CI is green on every job.


Generated by Claude Code

@guijacquemet
guijacquemet merged commit 4110fab into main Oct 12, 2026
6 checks passed
@guijacquemet
guijacquemet deleted the claude/notebook-integer-refusal branch October 14, 2026 16:10
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