Repository navigation
test(lore): restore the characterization tests lost from PR #371 - #372
Merged
Merged
Conversation
PR #371 merged at d75cb86, its first commit. The test commit f06cbc9 was pushed to the branch but GitHub's record of the pull request head never advanced past d75cb86, so the squash merge took the decomposition without its tests. f06cbc9 carries zero check runs — CI never executed these tests, and the five green checks reported on #371 all belong to the pre-test commit. Nothing was lost: f06cbc9 remained intact on GitHub and these three files are restored from it verbatim, byte for byte, rather than rewritten. That leaves develop currently holding the runOnboard and generateManifest decomposition with no test covering either. This commit closes that gap. It is also the first time these tests run on Linux and Windows; they assert exact byte sequences including newlines, which has only been exercised on macOS. The tests themselves are unchanged from the reviewed commit. Expectations were hand-derived from the pre-decomposition implementations rather than captured from the refactored code, and both suites were mutation-checked: a one-space change to the annotation indent and a "." -> "./" change to the output directory default each failed exactly the tests that should have failed. Coverage restored: cmd/lore/lore/onboard 0% -> 25.8%, cmd/lore/lore 12% -> 19.8%. Per-helper blocks: parseLoreOnboardConfig 3/3, newOnboardProvider 5/5, reportOnboardResult 13/13, writeOnboardManifest 3/3. syncedRegistry (0/6) and runOnboard itself (0/7) stay uncovered — both are bound to the registry and the network. Verified: make test green, zero FAIL or panic lines by count; gofmt clean. Plan: docs/plans/audit-remediation.md (phase 1b-i). Issue: #365
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.
Restores the characterization tests that were lost when #371 merged.
What happened
#371's recorded head was
d75cb867, its first commit. The test commitf06cbc9cwas pushed to the branch, but GitHub's pull request head never advanced, so the squash merge took the decomposition without its tests.f06cbc9ccarries zero check runs — CI never executed these tests. The five green checks reported on #371 all belong tod75cb867. Nothing was lost:f06cbc9cremained intact on GitHub and these three files are restored from it verbatim, not rewritten.Develop currently holds the
runOnboardandgenerateManifestdecomposition with no test covering either function. This PR closes that gap, and is the first CI execution of these tests — they assert exact byte sequences including newlines, which so far has only been exercised on macOS.The tests
Unchanged from the reviewed commit. Expectations were hand-derived from the pre-decomposition implementations rather than captured from the refactored code, and both suites were mutation-checked:
" # "→" # ""."→"./"TestParseLoreOnboardConfig_DefaultsOutputDirToWorkingDirectoryCoverage restored
cmd/lore/lore/onboardcmd/lore/lorePer-helper blocks:
parseLoreOnboardConfig3/3,newOnboardProvider5/5,reportOnboardResult13/13,writeOnboardManifest3/3.syncedRegistry(0/6) andrunOnboarditself (0/7) remain uncovered — both are bound to the registry and the network.Verified locally:
make testgreen (zero FAIL/panic by count),gofmtclean.