Skip to content

Warn on idle annex tracking - #1689

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

neuromechanist merged 3 commits into
feature/issue-1671-epic-bru-upload-fixesfrom
feature/issue-1455-inactivity-diagnostic

Conversation

@neuromechanist

Copy link
Copy Markdown
Contributor

This PR adds a warning-only inactivity diagnostic for the bounded list-form git annex add --batch path used by upload tracking. It warns after 120 seconds without stdout or stderr, resets after either stream produces output, persists alongside the active upload spinner, and lets git-annex continue with unchanged exit and timeout behavior.

The warning says local tracking has produced no stdout/stderr for about the measured duration, git-annex is still running and may be reading a large file, the user can wait or interrupt and rerun, and earlier completed batches remain resumable. Whole-tree string adds, import callers, S3 copy, upload -j, and worker selection are unchanged.

This is a partial follow-up to #1455 and does not close #1455. The controlled NFS argv-vs-batch × J1/J4/J8 benchmark/default remains pending. The full upload spinner entry point could not be tested end-to-end because the only checked-in BIDS fixture is synthetic under the NO MOCKS policy. The new subprocess tests use real child processes, the existing annex suite uses real git-annex repositories, and production upload wiring was verified by inspection. The remaining integration-test gap is recorded in test_requirements.md.

Validation: bun test test/annex-add-batch.unit.test.ts test/run-command-inactivity.unit.test.ts (14 passing); bun run typecheck; bun run lint; git diff --check; bun test test/run-command-env.test.ts (6 passing). A targeted mutation that removed timer reset failed at the warning-count assertion (one warning instead of at least three); restoring the reset returned the focused test to green.

@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@PR1689

Version: 0.10.16-PR1689.12933e3
Commit: 12933e3


🤖 Updated on each push.

@neuromechanist

Copy link
Copy Markdown
Contributor Author

Independent review record

Reviewed exact PR head 12933e376853a839dd1173e28ae07c23972fefa7 against epic base 8d18f0738a37d0783e2c1d7662cabc7c750bfc92 with three independent lenses: upload/pipeline contract, subprocess and spinner runtime behavior, and test quality.

Resolved findings:

  • The newly exported inactivity threshold was missing from the exact-export surface pin. Added it to MODULE_EXPORTS["run-command"] and classified it as internal wiring in test/git-annex-export-surface.unit.test.ts (8ed6063d). The focused export and inactivity suites pass.
  • In non-TTY output, stopping one Ora spinner and starting another duplicated the active tracking line. Reuse the same spinner and restart it only when Ora is enabled; runtime checks confirmed one tracking line in non-TTY mode and resumed progress in TTY mode (12933e37).
  • The test-requirements note overstated the absence of a local upload harness. It now acknowledges the real git-annex/directory-remote harness and explains why its synthetic BIDS inputs cannot establish real-upload acceptance (12933e37).

No remaining actionable pipeline-contract or runtime findings were reported. The upload-entry-point integration gap remains explicit: the new warning tests exercise real subprocess behavior at runCommand, but do not drive the callback through uploadDataToS3 and the full spinner. The only checked-in BIDS dataset is synthetic under the repository's NO MOCKS rule, so this remains documented rather than represented as proven.

Local validation on this head: 45 tests across the annex-batch, inactivity, upload-step, and export-surface suites; bun run typecheck; bun run lint; git diff --check; and a mutation check that failed when timer-reset behavior was removed. Exact-head GitHub run 37913175406 has passed api-test, lint, e2e-sandbox, and Zenodo sandbox; unit-pure and integration-dev are still pending at the time of this record. The separate publish run 37913168142 passed. The CI sandbox E2E does not close the owner-selected upload-entry-point acceptance gap.

This branch was previously deployed

1 inactive deployment
npm — 12933e37 Deployed Oct 9, 2026 by neuromechanist via publish #3296
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.

1 participant