Uh oh!
There was an error while loading. Please reload this page.
refactor(assert): group the assert_*.sh files into a src/assert/ module - #941
Merged
Conversation
Ten files and 2313 lines were already aggregated together by src/assertions.sh -- the concept existed, only the directory was missing. This is the first group under #940, the counterpart to #931: #931 splits files that are too large, this one collects files that belong together. src/assertions.sh -> src/assert/index.sh src/assert.sh -> src/assert/core.sh src/assert_<topic>.sh -> src/assert/<topic>.sh (9 files) The assert_ prefix drops inside the directory, which now carries the concept. No function is renamed and no line of any moved file changes: git records all ten as pure renames with a zero-line diff, and the aggregator's `source` order is preserved one-to-one. skip_todo.sh and test_doubles.sh stay flat and keep being sourced from the index, exactly as assertions.sh did. They are part of the same public test surface but they are not assertions, so they do not belong inside src/assert/. Two callers hardcoded these paths: - tests/unit/completions_test.sh derives the public assertion list from `src/assert*.sh` for the completions parity contract -> `src/assert/*.sh`. - tests/unit/build_test.sh special-cased src/assertions.sh as the one flat-file aggregator sitting outside the `src/*/index.sh` glob. That branch is deleted: every aggregator is now an index.sh, so the glob covers them all. This is the simplification ADR-010 predicted when the beside-convention argument was withdrawn. The built artifact's code content is identical -- every difference is a comment or an embed marker -- and `bash build.sh bin -v` prints "Build verified". Related #940
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 freeto 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.
🤔 Background
Related #940
Ten files and 2313 lines were already aggregated together by
src/assertions.sh— the concept existed, only the directory was missing. First group under #940, which is the counterpart to #931: #931 splits files that are too large, this one collects files that belong together.💡 Changes
The
assert_prefix drops inside the directory, which now carries the concept. No function is renamed and no line of any moved file changes — git records all ten as pure renames with a zero-line diff, and the aggregator'ssourceorder is preserved one-to-one.skip_todo.shandtest_doubles.shstay flat and keep being sourced from the index, exactly asassertions.shdid. They're part of the same public test surface but they aren't assertions, so they don't belong insidesrc/assert/.🧹 A special case this deletes
Two callers hardcoded these paths:
tests/unit/completions_test.shderives the public assertion list fromsrc/assert*.shfor the completions parity contract →src/assert/*.sh.tests/unit/build_test.shspecial-casedsrc/assertions.shas the one flat-file aggregator sitting outside thesrc/*/index.shglob. That branch is deleted — every aggregator is now anindex.sh, so the glob covers them all. This is exactly the simplification ADR-010 predicted when the "beside" argument was withdrawn in refactor(src): move module aggregators inside their directory as index.sh #934.✅ Verification
The built artifact's code content is identical — every difference is a comment or an embed marker — and
bash build.sh bin -vprints✅ Build verified ✅. Function count 101 before and after.Green: sequential (1604 passed, 0 failed) ·
--parallel --simple --strict·make sa·make lint· CI-mode ShellCheck (per file, no-x) ·git check-ignoreclean · no.editorconfigrule affected.Architecture map updated — including a line that still described the pre-#934
src/<module>.shconvention.