Repository navigation
test(compat): compare whole files, and replay rows of text files - #167
Merged
Merged
Conversation
Rows of text files failed the matrix while the clients behaved as they should (found with the rows of tpl-MNI152NLin2009cSym's migration, whose CerebA lookup table gets an n/a row): * the scenario reported the first 200 bytes of each file, and the tests compared them with the whole file. It now also reports each file's sha256, which the tests compare; * the DataLad Archive wrote made-up bytes for every old file of the rows, while S3 serves the real bytes of text files. It now holds the bytes S3 serves before the table, and the tests expect those. The sample table also removes the CerebA table (n/a), so that the matrix runs a text file. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #167 +/- ##
=======================================
Coverage 85.49% 85.49%
=======================================
Files 10 10
Lines 924 924
Branches 193 193
=======================================
Hits 790 790
Misses 70 70
Partials 64 64
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
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
The compatibility matrix failed on rows of text files while the clients behaved as they should. Replaying the rows of tpl-MNI152NLin2009cSym's migration (WP5's pilot) found two harness defects; its CerebA lookup table gets an
n/arow, the first text file any replay has had.runtime/scenario.py op_get -> {paths, contents (first 200 bytes, for messages and missed()), + sha256 (of the whole file)} test_compat.py assert_found - contents[0] == expected.decode() # 200 bytes against the whole file + sha256[0] == sha256(expected) datalad_archive.py DataladArchive(work, rows, text, + files, # the bytes S3 serves before the table bin_dir) - old files: made-up bytes # S3 serves the real bytes of text files + old files: files[old]; tests expect DataladArchive.contents[old] sample-renames.tsv + tpl-MNI152NLin2009cSym/..._atlas-CerebA_dseg.tsv n/a (a text file)Evidence
Local runs (Python 3.13; clients 25.0.4, 25.1.2 and the branch;
build-skeletons.pyof templateflow/templateflow master unless noted):On master, the failing tests found the right path, and the content's first 189 or more characters matched. In the DataLad home, client 26.0 served the removed table from S3, as it should, but the fixture expected made-up bytes.
The Compatibility workflow of this PR runs the new sample table.
Merge Danger
Door: two-way
Tests only, plus one line in CHANGES.
Blast Radius: tests
The sample table now spans two templates. The DataLad tests still use the template with the most rows (tpl-MNI152Lin), so they exercise text files only in replays of tables that have them, such as the WP5 template PRs.