Skip to content

Phase: batch-feed local annex add paths - #1688

Merged
neuromechanist merged 3 commits into
feature/issue-1671-epic-bru-upload-fixesfrom
feature/issue-1455-bounded-annex-add
Oct 9, 2026
Merged

neuromechanist merged 3 commits into
feature/issue-1671-epic-bru-upload-fixesfrom
feature/issue-1455-bounded-annex-add

Conversation

@neuromechanist

@neuromechanist neuromechanist commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

Change

This phase adapts the list-input portion of Bru's PR #1649 onto the current epic head. Bounded path chunks now go to git annex add --batch -z over stdin. Per-file JSON results are checked, and paths without a response are inspected for absence so a missing file cannot silently report success. Only unanswered paths are statted, and non-ENOENT filesystem errors remain visible. The whole-tree string form retains its existing argv path.

The current trackDataFiles wrapper, ADR 0031 case-variant forcing, forceLarge, import backend: SHA256E, default .gitignore behavior, and import-only checkGitignore: false behavior are preserved. Unchanged indexed blobs are filtered before batch mode so ADR 0060 blocked-upload recovery still requires an explicit unstage before retry. A missing input can be discovered after valid siblings from the same batch were annexed; those completed paths remain resumable while the call fails.

Scope and impact

Part of #1455 and epic #1671.

Verification

  • bun test test/annex-add-batch.unit.test.ts test/annex-policy.test.ts test/upload-track-data.unit.test.ts test/git-annex-export-surface.unit.test.ts test/upload-s3-copy-step.unit.test.ts — 105 pass, 0 fail; real git-annex and filesystem remotes
  • bun test --test-name-pattern 'the new key is SHA256E even when the tree\x27s attributes now name another backend' test/import-scrub.test.ts — 1 pass
  • bun run typecheck
  • bun run lint
  • git diff --check

Independent review

The three independent review lenses covered batch semantics, pipeline contracts, and test quality. They found and resolved unanswered paths being mistaken for success, all lstat errors being mislabeled as missing, per-target NFS preflight costs, unbounded index-output concerns, missing real-git-annex byte and response-path coverage, and test helpers masking command failures. The final review found no remaining actionable findings; the findings and resolutions are recorded in the PR review comment.

Feed bounded path chunks through git-annex batch input while preserving upload policy and indexed-blob recovery behavior. Local worker selection remains pending the controlled #1455 benchmark.

(cherry picked from commit 1b321e6)
@github-actions

github-actions Bot commented Oct 9, 2026 •

Copy link
Copy Markdown

📦 Package Preview

Your package is ready to test!

bun install -g nemar-cli@PR1688

Version: 0.10.16-PR1688.3d2262e
Commit: 3d2262e


🤖 Updated on each push.

@neuromechanist

Copy link
Copy Markdown
Contributor Author

Independent review findings and resolutions

Three independent review lenses covered batch semantics, the upload/import pipeline contracts, and test quality.

  • Batch responses could hide a missing path. A blank git-annex batch response could be treated as success. The wrapper now correlates successful JSON records to input paths and checks only unanswered paths for absence. A real-git-annex test confirms the success record shape; the missing-path test confirms valid siblings remain annexed while the call reports failure.
  • Filesystem errors were mislabeled as missing files. Only ENOENT now means absent; permission and I/O errors propagate. The focused suite covers an inaccessible path.
  • The preflight could add one serial filesystem stat per input. It now stats only unanswered batch paths. Git index and worktree checks remain scoped to each bounded chunk. The whole-index-output concern was resolved by using literal pathspecs for each chunk.
  • Test coverage and failure visibility were strengthened. The tests verify real byte-bounded batches, newline filenames, successful response-path parsing, missing inputs, filesystem errors, and resumability. The git annex find helper checks its exit status and parses JSON paths. Scratch directories are unique per test run.
  • Pipeline review found no regressions. ADR 0031 case-variant forcing, ADR 0060 staged-blob recovery, the import SHA256E override and gitignore exception, and downstream Upload: "Uploaded 0 data files" after a copy that sent everything, and the post-copy check skips files #1642/Upload: S3 credentials expire after 2 h and the copy cannot renew them #1644 steps remain intact.

No actionable findings remain from the final reviews. The real NFS worker-count benchmark and #1455 inactivity diagnostic remain open; this phase makes no claim that a particular annex.jobs setting fixes the original stall.

@neuromechanist
neuromechanist merged commit 8d18f07 into feature/issue-1671-epic-bru-upload-fixes Oct 9, 2026
14 checks passed
@neuromechanist
neuromechanist deleted the feature/issue-1455-bounded-annex-add branch October 9, 2026 08:57

This branch was previously deployed

1 inactive deployment
npm — 3d2262e8 Deployed Oct 9, 2026 by neuromechanist via publish #3290
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants