Repository navigation
Annex: stop unpublished host paths reaching git-annex - #1683
neuromechanist merged 8 commits into
Conversation
'git annex init' with no description writes user@host:/absolute/path into the git-annex branch's uuid.log, which is public once a dataset is (a cluster upload records login name, node and scratch path). - initDataset and ensureGitAnnexInitialized pass 'nemar-deposit'; cloneDataset passes 'nemar-clone' (admin/CI clones were adding their own entries, see the #1399 comment). - The upload's init step replaces an existing default description (a repo initialized by an older CLI, e.g. a resumed upload) before anything is pushed; a description someone chose is left alone. Paths under $HOME, which git-annex writes as user@host:~/path, are recognised too. The old value stays in the history of an already-pushed git-annex branch; scrubbing that is the separate back-catalogue decision in #1399.
📦 Package PreviewYour package is ready to test! bun install -g nemar-cli@PR1683Version: 🤖 Updated on each push. |
|
Review findings and resolutions for PR #1683 at
Independent review found no unresolved findings. Local checks passed: 48 The separate #1642 sandbox E2E acceptance gap remains documented and was not run for this review; the generic CI |
|
The CI failure on the prior head was the no-remote push test expecting the old Git error even though the new privacy preflight stops first. I updated that expectation in |
|
Review follow-up for final head
|
444bdb3
into
feature/issue-1671-epic-bru-upload-fixes
Change
This phase carries Bru's original fix into the epic branch and adds a pre-push privacy guard for #1399. New init and clone flows use fixed descriptions, resumed uploads fail closed if git-annex cannot verify or replace a default description, and a first push prunes unpublished git-annex history only when the remote has no git-annex branch. When an existing remote branch has unpublished default host/path descriptions for any UUID, the push stops before updating main and leaves published annex history intact. Every runtime annex-only push now uses the same guard, which sends only the checked annex commit and refuses ambiguous fetch/push destinations or URLs containing inline HTTP credentials. If the local branch advances during the push, the remaining changes are reported for retry. The NEMAR import-runner
/tmp/nemar-import-*description remains permitted, as issue #1399 explicitly classifies it as harmless.The already-published back catalogue remains untouched, so #1399 stays open for that separate decision. This PR is the epic-targeted continuation of Bru's PR #1654, and keeps his original commit.
Part of #1399.
Verification
bun test --timeout=15000 test/git-annex-remote.test.ts— 48 passbun test test/annex-init-description.unit.test.ts test/git-annex-export-surface.unit.test.ts— 19 passbun run typecheckbun run lintbunx biome checkon changed files andgit diff --checkRetry-fetch and annex-merge failure diagnostics are implemented, but those rare branches are not directly tested because the repository's strict no-stubs policy disallows synthetic command failures. The separate #1642 sandbox E2E acceptance gap remains documented; the generic CI
e2e-sandboxcheck does not close it.