[port #1057] internal/literals: preserve decoded byte-slice capacity - #8
Open
luantak wants to merge 2 commits into
Open
[port #1057] internal/literals: preserve decoded byte-slice capacity#8luantak wants to merge 2 commits into
luantak wants to merge 2 commits into
Conversation
luantak: define the obfuscator table as a variable before the loop, and extract the indented t.Run body into a top-level helper. Co-authored-by: Paul <luantak@pm.me>
cursor
Bot
force-pushed
the
cursor/maremagnum-pr-1057-literals-slice-capacity-2676
branch
from
August 11, 2026 21:05
bbd424e to
547dd1c
Compare
luantak
marked this pull request as ready for review
August 11, 2026 23:24
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.
Validity: valid
Observable correctness: decoded
[]bytevalues had wrongcapvs source literals (nil start for seed; +1 for shuffle/split). Allocating withlen=0, cap=literalLenrestores semantics without changing secrecy.Upstream
burrowers#1057
Commit layout
Commit 1 is Maremagnum's from burrowers#1057 (author preserved as on the upstream commit:
autoprofiler <autoprofiler@local.invalid>); following commit(s) address luantak/mvdan review feedback and are authored by the Cursor/luantak port side.4486942 autoprofiler | internal/literals: preserve decoded byte-slice capacity547dd1c Cursor Agent | Address review feedback: refactor capacity regression test styleWhat this ports
generation_regression_test.go(capacity-focused regression)Feedback applied (luantak requested changes)
for range).t.Runbody into top-levelcheckByteSliceDecoderCapacity.Note: unlike burrowers#1054 (where mvdan asked to drop unit tests), luantak asked to refactor this unit test — kept and refactored.
Testing
go test -short ./internal/literals/✅Remaining risks
Notes for Paul
Pairs well with burrowers#1055/burrowers#1056.