test(pipeline): add Scala and Perl coverage and fix discovered defects - #52
Open
ciriacairic wants to merge 12 commits into
Open
test(pipeline): add Scala and Perl coverage and fix discovered defects#52ciriacairic wants to merge 12 commits into
ciriacairic wants to merge 12 commits into
Conversation
added 12 commits
August 12, 2026 09:50
Promote the nested remove_trailing_space and the graft-line split (as parseGraftLine) to gitLogToDB methods, behavior unchanged, so they are reachable from tests. The suite exercises them directly plus git_commits_iterator/findGrafts/isBare against JGit fixture repos with pinned identities and dates.
Lift the nested splitEmail/dealWithSingleWords defs and extract the transitive email-merge fold (unifyByEmail) and preferred-name pick (preferredName) out of main, behavior unchanged. The suite pins down strip_accents, Person equality semantics, key building, and the transitive merge that is the heart of the module.
Extract the footer parsing from git_commits_iterator into extractOriginalCid(cid, message), behavior unchanged, and pin down its edge cases: footer on/not on the last line, empty and newline-only messages, uppercase or short shas falling back to cid.
The autodetect path guarded on "defined defined($parsers{language})" -
a doubled defined() over a bareword key - which is always true, so the
check could never fire. Use the intended $parsers{$language} lookup.
Defensive only: today every extension in %extensions maps to a defined
parser, so no observable behavior changes.
prove-run t/ suites for tokenizeSrcMl.pl (golden files mirroring the srcMLtoken pattern, committed under tokenize/t/expected/), tokenize.pl (dispatch parity with the direct tokenizer run), tokenBySha.pl (stubbed BFG_TOKENIZE_CMD: memoization, cache hits, extension mapping, env validation) and formatBlame.pl/blameRepoFiles.pl (on-the-fly fixture repos with pinned dates; blame format, renames, filtering, overwrite). All tests run the scripts as subprocesses; no script refactoring. prettyPrint is deliberately not covered (needs fixture SQLite DBs for low marginal value).
sbt builds become 'test assembly'/'test one-jar', and a prove step runs the Perl suites after srcml2token is built (the golden tests need it).
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
slickGitLog,persons, andremapCommits)Test::Morecoverage for all eight Perl pipeline scriptsblobExectests and all new Scala/Perl suites in GitHub ActionsProduction fixes uncovered by the tests
Personvalues by their fields instead of hash code alone, normalize email components with a locale-independent lowercase operation, and write the identity spreadsheet columns in the documented orderThe successful-path formats and contracts remain unchanged. The behavior changes are limited to incorrect metadata and failure paths that previously produced wrong output or reported success.
Coverage
The added suites use temporary Git repositories, real SQLite databases and XLS/HTML/blame artifacts. External commands are stubbed only where the test is specifically about a repository-level driver.
slickGitLog,persons, andremapCommitsblobExectests, 5 C/C++ golden comparisons, and 14 Rust tokenizer tests