root_sig_contract: handle deeply nested JSON, duplicate ptr64_hi error, and bad pack_layout inputs (OLD-5357) #573
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
missing claim
needs rebase
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/ubiquitarianism--leonida!573
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/573/head"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@Taffyyy-ops on GitHub · 2026-11-24 08:45 UTC · original
Taffyyy-ops:feat/root-sig-contract-harden→main· +184 −5 · 2 files · 1 commits · merged 2026-11-24 09:27 UTCClaimed in the coordination issue as: OLD-5357 (#14)
What and why
Carried over from the closed upstream
ItsNotRexed/LeonidaPR #5357 and rebased cleanly ontoubiquitarianism/leonidamain(a63d4bbd7).Hardens
tools/root_sig_contract.pyfor malformed or boundary inputs:RecursionError) cleanly with exit code 2 instead of an unhandled traceback.ptr64_hierror alongside the primary incompatibility when reconciling constant/descriptor/table halves.pack_layoutsignature/parameter shapes cleanly without raising.unittestregression coverage intests/test_root_sig_contract_edges.py(6 tests).Tested
On Windows 11 with Python 3.12+ after rebasing onto
1c93c8697:python -I tests/test_root_sig_contract_edges.py -v-> Ran 6 tests in 0.259s, OKpython -I tools/root_sig_contract.py --example-> exit 0python -m compileall -q tools/root_sig_contract.py tests/test_root_sig_contract_edges.py-> exit 0python -I scripts/check_no_game_data.py-> exit 0git diff --check upstream/main..HEAD-> exit 0(Note:
tests/test_root_sig_contract.pyrequirespytest, which is not installed in this host Python environment.)GPUs tested: n/a (host CPU Python stdlib)
AI-assisted: yes
Checklist
mainand merges cleanly (a conflicting pull request is labeledneeds rebase).@QemmHD on GitHub · 2026-11-24 09:27 UTC · original
Merging. Why merged: root_sig_contract rejects non-object signatures and parameters, reports deeply nested JSON as a clean exit-2 error, and fixes the ptr64_hi double report.
Why it's good: the new edge tests go 4 passed / 15 failed on main -> 6 passed (20 subtests) on the merge; the existing 58 tests still pass; clean on main
7430f59; consistency 565/0.AI-assisted (Claude Code, Claude Opus 5.5).