Repository navigation
Add nemar dataset screen: reproduce the screen locally - #2389
Merged
neuromechanist merged 8 commits intoNov 26, 2026
Merged
neuromechanist merged 8 commits into
neuromechanist merged 8 commits into
Conversation
📦 Package PreviewYour package is ready to test! bun install -g nemar-cli@PR2389Version: 🤖 Updated on each push. |
Contributor
Author
|
Merge gate (lead): head 9605a46. Every remote check passes after one rerun of e2e-sandbox, which failed on infrastructure (a 404 on the PR's npm tarball). Review: round 1 panel, 4 important findings (the update check reached the network and wrote files; unread history did not change the status; git failures read as no repository; copy outside the shared tables) and 4 more fixed; round 2 delta review resolved all eight; its test suggestion is fixed in 9605a46, and the over-conservative annex unreadable is accepted because it fails closed. |
neuromechanist
merged commit Nov 26, 2026
e3b69d6
into
feature/issue-2182-epic-pq-evidence
60 of 61 checks passed
This was referenced Nov 27, 2026
Merged
This branch was previously deployed
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
Adds
nemar dataset screen [path] [--json] [--committed]: the publication screen's report for the depositor's own copy of a dataset, with no login, no network, and no write to the dataset or its.git. Part of #2184. Part of #2182. Card A9.The command builds its report with the same two calls the publication screen's CI path makes (
scanDatasetFromManifest, thenfinalizeScanReport), with the same readers, limits and folds, and prints it withdescribeScreen, so a status, a per-format count, a finding kind, its remedy and docs link, and the scanner and reader versions read as they do on the server. The bytes come from a local file, a git blob throughgit cat-file, or the annex object store on this machine (indexed by listing it; git-annex is never run, because it can auto-initialize a repository).--committedreads the tree ofHEAD, which is what the server screens. The first line says which was read and the commit.partialwith reasoncontent-absent(declared by A1; its copy entry now says where the content is kept for a local run). It is not a failed read.--jsonprints the report (version 2) alone on stdout; the local gap lines go to stderr.Deviations and notes for review
src/index.ts(3 lines, outside the card's scope list): the rootpreActionhook sendsGET /noticesbefore every command, which would break "no network in the command". A command marked local-only (markLocalOnly, same pattern asisMovedCommandStub) skips it. The other startup network path, the daily update check, is global and is opted out withNEMAR_NO_UPDATE_CHECK=1as in the other CLI suites.scannerisidentifier-scan@<revision>of the checkout when the CLI runs from source, so the parity test compares it exactly; a packaged CLI has no checkout and isidentifier-scan@nemar-cli-v<version>, the release tag, which names an exact commit (lead ruling). One output line says which kind of id it is. The report door's scanner pattern (shared/identifier-screen-report.ts) accepts that form beside a revision; the publication workflow still sends a revision.headis the null object id (the contract needs a 40-hex commit) and the dataset id isxx000000(never allocated); neither is printed as if it were real.scripts/identifier-screen-ci-lib.tsneeded no edit. The CI path's ownscreenDatasetis run on the same repository in the parity test.LOCAL_COPYinshared/identifier-screen-copy.tswith docs anchorlocal-run; A10 needs a section for it.screenis added toCOMMON_COMMANDSinsrc/lib/help-groups.ts, so plainnemar dataset --helplists it (lead ruling).Tests
test/dataset-screen.test.ts(pure tier): parity withscreenDataseton three repositories in both modes, exit codes, working tree versus committed (both directions), no repository, content absent (locked, pointer, renamed, side file, dangling link), history present and absent, privacy, no writes, and a real git-annex repository (skipped locally only if git-annex is missing, an error underCI).test/dataset-screen-spawn.test.ts(process tier, its own file): help, exit status through the real entry point,--jsonvalidated withparseScreenReport, two runs over a dataset leave every byte of it and its.gitunchanged, and a counting proxy on every proxy variable sees zero connections, with a positive control from a command that does use the network.--committedreading the working tree, wrapper removed, history not read, absent history read, a git write added, limits changed, gap lines dropped); every one is killed.