Repository navigation
fix: PWL-01 follow-ups — WithinMaximum bounds the initial allocation; gate exits if cd fails - #275
Merged
Merged
Conversation
shellcheck SC2164. The gate runs without `set -e` (it collects failures), so a failed cd would have carried on from the caller's directory: `rm -rf _build/kernel-proofs` and every relative path would resolve there. Same guard as panll's check-abi.sh (hyperpolymath/panll#145). The other PWL-01 scripts (check-grade-kernel.sh, scripts/fetch-siblings.sh, tests/transcription/gen.sh) are shellcheck-clean. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Y6FD63UrriRBHqmhhEca9t
Contributor
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 17 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
hyperpolymath
marked this pull request as ready for review
October 14, 2026 01:50
CodeRabbit on #273 (Occupancy.idr:185). UnderMaximum asked only that the run's peak fit the declared maximum. An empty run has peak 0, so `\pm, m, prf => UnderMaximum prf LTEZero` certified every private memory with a maximum, including MkPrivateMemory o n 2 (Just 1), whose initial allocation already exceeds it. The memory is live from its initial allocation on, so UnderMaximum now takes `LTE pm.initial m` as well; `peak g` stays the run's absolute live-state peak. Reproduced first: against main 117bbf8 that declaration typechecks. New reject tests/reject/InitialOverMaximum.idr states it with the new constructor and is refused at the initial bound ("Can't solve constraint between: 0 and pm .initial"). The binding stays DESIGNED; LEVEL-STATUS row 13 and the reject README name the fixture. check-kernel-proofs: build, 10 rejection(s), table, 3 negative control rows; regression 202 passed; e2e passed; warnings unchanged (24). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Y6FD63UrriRBHqmhhEca9t
Same defect CodeRabbit found in panll's copy of this job (hyperpolymath/panll#145, CWE-494): a tag can move. The job now fetches 15a3e4e70843f7a34100f6470c04b791330788df (what v0.8.0 names), checks HEAD against it, and tags it v0.8.0 locally so the Makefile reports the release version rather than 0.8.0-<sha>. actions.lock is unaffected (no action reference changed). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Y6FD63UrriRBHqmhhEca9t
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Summary
Two small fixes to the merged PWL-01 work.
Occupancy.WithinMaximumdidn't bound a private memory's initial allocation. CodeRabbit reported it on feat(abi): L11/L12 read through the grade kernel; L13 occupancy and R-2 at a boundary (PWL-01, PR B) #273 (Occupancy.idr:185) and nobody answered before the merge.UnderMaximumasked only that the run's peak fit the declared maximum. An empty run has peak 0, so\pm, m, prf => UnderMaximum prf LTEZerocertified every private memory with a maximum.MkPrivateMemory o n 2 (Just 1), which already exceeds its maximum when it is allocated.117bbf8.tools/check-kernel-proofs.shcould carry on after a failedcd(shellcheck SC2164). The gate runs withoutset -e, because it collects failures instead of stopping. A failedcdwould have leftrm -rf "$OUT",rm -rf src/abi/buildand every relative path resolving from the caller's directory. CodeFactor found the same defect in panll's copy of the pattern (feat(panel-clades): graded clade contracts over typed-wasm's grade kernel (PWL-01) panll#145).Changes
src/abi/TypedWasm/ABI/Occupancy.idr:UnderMaximumnow also takesLTE pm.initial m.peak gstays the run's absolute live-state peak, and the doc comment says so.tests/reject/InitialOverMaximum.idr, which states the old general claim with the new constructor. It is refused at the initial bound (Can't solve constraint between: 0 and pm .initial).LEVEL-STATUSrow 13 andtests/reject/README.adocname the fixture. The binding stays DESIGNED; no status moves.tools/check-kernel-proofs.sh:cd "$(dirname "$0")/.." || exit 1.CHANGELOG: a Fixed entry for both.The other PWL-01 scripts are already shellcheck-clean:
check-grade-kernel.sh,scripts/fetch-siblings.shandtests/transcription/gen.sh.tools/check-contract.shhas the same SC2164; it predates PWL-01 and is left alone here.RSR Quality Checklist
Required
unsafeblocks without// SAFETY:comments.envfiles includedAs Applicable
LEVEL-STATUSrow 13, reject README)CHANGELOGupdatedcontract.abi.sha256unchanged (its anchors cover only the wire format)Testing
Negative control: the same declaration with the old two-argument
UnderMaximumtypechecks against main117bbf8(exit 0, noError:).🤖 Generated with Claude Code
https://claude.ai/code/session_01Y6FD63UrriRBHqmhhEca9t