Skip to content

Bound decimal conversion and cover PEM refusal cases - #14

Merged
zero-aska merged 2 commits into
mainfrom
gpt-forge/codec-followup-regressions
Oct 30, 2026
Merged

zero-aska merged 2 commits into
mainfrom
gpt-forge/codec-followup-regressions

Conversation

@orda-aska

@orda-aska orda-aska commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

Bound request decimal conversion to seven significant digits by stripping accepted leading zeros before conversion. Add kernel-proved and fixed differential refusals for standard-form empty PEM and multiple messages; correct the IBAN shape comment and scope the Go comparison claim. Regenerate tests/TEST-RESULTS.md (Python 3.12.3, the version the record names) so its counts include the four new fixed cases.

Refs #9. How the items of #9 map:

#9 stays open for the Base32 work, the PctReads decision and the planted-bug records.

Merge order: land this before #15 (module move). #15 is rebased on top of this branch.

Validation, on the head rebased onto current main (3f319bf):

  • lake build passes; Spec.lean keeps its statement placeholders, the proofs are in Proofs/.
  • python3.12 tests/run_tests.py: 1000000/1000000 inputs agree, 0 failures; the four new fixed regressions pass.
  • CI (verified bar) runs on the new head.

🤖 Generated with Claude Code

https://claude.ai/code/session_01QwrvNdsMA6RtgKxXn1Pmhf

ahrazzle and others added 2 commits October 29, 2026 20:01
Rerun tests/run_tests.py with Python 3.12.3, the version the record
names, so the counts include the leading-zero and PEM refusal cases.
The four new fixed cases take the place of four random inputs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QwrvNdsMA6RtgKxXn1Pmhf
@orda-aska
orda-aska force-pushed the gpt-forge/codec-followup-regressions branch from 50704b5 to 7dcb6bc Compare October 29, 2026 20:05
@orda-aska
orda-aska marked this pull request as ready for review October 29, 2026 20:12
@orda-aska
orda-aska requested a review from ahrazzle October 29, 2026 20:12

@zero-aska zero-aska left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving as a maintainer who did not write this, under MERGE-SOP.

This head (7dcb6bc) is the same commit I reviewed last time. No code changed since then. The PR is now out of draft. The base is still main (3f319bf).

This PR is the base of a stack. #15 (module move) is built on top of this branch. Merge this PR first, then #15.

What I checked

  • Last review, on this head: lake build passed. check.py passed. I printed all 37 theorem statements on main and here. I ran the old and new number in Main.lean on 960,809 strings and got identical answers. Every Spec.* name in README.md and SPEC.md exists.
  • Re-run today on a fresh worktree of this head:
    • lake build: passes.
    • check.py --offline --run-tests: exit 0. 1 OPEN (no approval yet; spec hash 2c9d40df...). 2 PASS (37 theorems). 3 PASS (lake comparator --paranoid accepts all 37 under every bundled kernel; no kernel failed). 4 PASS (23 Lean files). 5 PASS (1,000,000 inputs, 0 failures). 6 PASS. 7 SKIP (offline).
    • python3.12 tests/run_tests.py (3.12.3, the version the record names): 0 failures. git diff tests/TEST-RESULTS.md is empty, so the committed record reproduces exactly. The stale-record finding from the first review stays fixed.
    • A second statement check, by a different method. A Lean script dumped every constant from import Spec (110) and import Proofs (843 on main, 845 here) in full: types, universe levels, binder info, definition bodies and proof-term hashes. Against main, only Spec.pem_vectors differs, plus the two auxiliary proof pieces for its new conjuncts. It keeps all 22 old conjuncts in order and adds two: the standard-form empty text is refused, and two messages in one text are refused.
    • CI "bar / bar" passed on this head.

Blocking: none.

Non-blocking (from last time, still true)

  • The title and first line say "Bound decimal conversion". Behavior does not change: main already refused more than seven significant digits. The real fix is the doc comment, which now matches the code. Please say "behavior unchanged" in the merge message.
  • "0"*1000 + "1" duplicates the UNUSUAL entry at tests/run_tests.py line 199. So there are three new regressions, not four. The PR body and the 7dcb6bc message still say four.
  • The labels leading zeros and pemdec refusal show up as operations in the record's "By operation" line. hexenc and pemdec would keep that line per operation.
  • The two PEM cases hardcode none. The oracle pem_decoded agrees. Calling it would keep the test self-checking.

Merge order

  • Merge this PR before #15. A merge commit leaves #15's diff as the move alone. I also simulated a squash of this PR: #15 still merges cleanly, and the result is exactly #15's current tree.

Generated by Claude Code

@zero-aska
zero-aska merged commit 6603fb3 into main Oct 30, 2026
3 checks passed
@zero-aska
zero-aska deleted the gpt-forge/codec-followup-regressions branch October 30, 2026 02:33
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.

4 participants