Skip to content

test: hardening sprint — 31 new tests (376→407)#2

Merged
sigilante merged 1 commit into
masterfrom
test/hardening-sprint
Mar 22, 2026
Merged

test: hardening sprint — 31 new tests (376→407)#2
sigilante merged 1 commit into
masterfrom
test/hardening-sprint

Conversation

@sigilante

Copy link
Copy Markdown
Owner

Summary

Adds 31 crash recovery and gate jet tests to the test suite.

Phase A — Crash Recovery (15 tests)

All previously uncovered nock_crash() sites in nock.c now have BEFORE/T recovery tests:

Category Tests
%wild malformed clue entry not cell, sock not cell
Jet arg validation dec/add/sub/mul/div/mod with cell args
Tree edit (hax) axis 0, edit in atom
Slot axis not direct (indirect atom as axis)
%tame label/name mismatch
Op10 structural edit axis not direct, atom hint
Op11 structural tag not direct

Phase D — Gate Jet SKNOCK Tests (16 tests)

All 10 gate jet Forth words now tested via SKNOCK dispatch (sub/mul/div/mod/lth/gth/lte/gte — dec and add were already covered in 9b):

  • 2 tests per jet (boundary + normal case)
  • Verifies Forth dictionary lookup → jet dispatch path end-to-end

Result

407/407 passed

Phase A — crash recovery (15 tests):
- %wild: malformed wilt entry (not cell, sock not cell)
- jet arg crashes: dec/add/sub/mul/div/mod with cell args
- hax/tree-edit crashes: axis 0, edit in atom
- slot axis not direct (indirect atom as axis)
- %tame name mismatch
- op10: edit axis not direct, atom hint
- op11: tag not direct

Phase D — gate jet SKNOCK tests (16 tests):
- sub, mul, div, mod: 2 tests each via SKNOCK dispatch
- lth, gth, lte, gte: 2 tests each via SKNOCK dispatch

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@sigilante
sigilante merged commit c87a6f8 into master Mar 22, 2026
2 checks passed
@sigilante
sigilante deleted the test/hardening-sprint branch March 22, 2026 13: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.

1 participant