Code audit: fix 67 bugs across 8 core files#22
Open
iahncajigas wants to merge 2 commits intomasterfrom
Open
Conversation
Critical fixes: inverted sampleRate in KS test (FitResult), isa(x,'nan')
always-false checks in decoding (DecodingAlgorithms), symvar alphabetical
reordering breaking CIF argument order, ExplambdaDeltaCubed using ld^2
instead of ld^3, findPeaks('minima') returning maxima (SignalObj), handle
aliasing in arithmetic operators (SignalObj), burst detection off-by-one
(nspikeTrain), sOBj/crosscor typos (SignalObj).
Also: 22 eval->feval conversions, 11 silent catch->named exception,
7 roundn->round (removes Mapping Toolbox dep), log(0) guards,
div-by-zero guards, floating-point index fixes, fitType validation.
All changes tagged with inline '% FIX:' comments. See AUDIT_REPORT.md
for full details.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Documents the 67 bug fixes applied across 8 core files during the 2026-03-10 codebase audit, with links to the full AUDIT_REPORT.md. 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.
Summary
% FIX:commentsAUDIT_REPORT.mdwith full findings and verification commandsREADME.mdwith audit summaryCritical bugs fixed
sampleRateas bin width instead of1/sampleRateisa(x,'nan')always false;ExplambdaDeltaCubedused.^2instead of.^3symvar()reordered variables alphabetically, breakingmatlabFunctionargument orderingfindPeaks('minima')returned maxima;sOBjtypo crashedfindGlobalPeak; handle aliasing mutated inputs in arithmeticCode quality
eval()→feval()conversions (SignalObj.m)catch→ named exception capturesroundn→round(removes Mapping Toolbox dependency)log(0)guards, div-by-zero guards, float index fixesfitTypevalidation, deprecated function annotationsFiles changed (11)
Test plan
grep -rc '% FIX:' *.mreturns 67 tags across 8 filesfindPeaks('minima')returns actual minima🤖 Generated with Claude Code