fix: fix bodyparts CRLF no-op, logic_engines regex, and indirect object syntax#53
Open
toddr-bot wants to merge 2 commits into
Open
fix: fix bodyparts CRLF no-op, logic_engines regex, and indirect object syntax#53toddr-bot wants to merge 2 commits into
toddr-bot wants to merge 2 commits into
Conversation
…ct syntax Three bugs in Core.pm: 1. prepare_parts() applied s/\r\n/\n/ to scalar references instead of dereferenced strings — CRLF normalization on body parts was silently a no-op, potentially affecting signature computation consistency. 2. check_logic() logic_engines regex /^(\d\,)+$/ required a trailing comma, so valid config like "4,8" silently fell through to 'any' engine mode. Fixed to /^\d+(?:,\d+)*$/. 3. Replaced indirect object notation (new IO::Select, new IO::File) with method call syntax (IO::Select->new, IO::File->new). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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.
What
Fixes three bugs in Core.pm and one in Agent.pm.
Why
CRLF normalization was silently skipped on body parts —
prepare_parts()applieds/\r\n/\n/gsto the scalar reference itself instead of the dereferenced string. The substitution ran against"SCALAR(0x...)", doing nothing. This could cause signature inconsistencies between platforms with different line endings.logic_enginesconfig was silently ignored — The regex/^(\d\,)+$/required a trailing comma, so valid input likelogic_engines = 4,8fell through to the default'any'mode. Users who thought they were restricting engine selection were actually getting all engines.Indirect object notation —
new IO::Select(...)/new IO::Filecan be ambiguous to the Perl parser. Replaced withIO::Select->new(...)/IO::File->new.How
$bodyparts[$_] =~→${ $bodyparts[$_] } =~/^(\d\,)+$/→/^\d+(?:,\d+)*$/Testing
make testpasses (full suite)t/core_bugs.twith regression tests for the deref fix, regex fix, and check_logic integration🤖 Generated with Claude Code
Quality Report
Changes: 4 files changed, 114 insertions(+), 4 deletions(-)
Code scan: clean
Tests: passed (OK)
Branch hygiene: clean
Generated by Kōan post-mission quality pipeline