Type: simplification / robustness · Difficulty: medium
pollIndexToCompletion (packages/cli/src/indexPoller.ts:31) and pollJobStatus (packages/cli/src/IngestCommand.ts:72) both loop on while (true) with a 1500ms delay, exiting only on PROCESSED/FAILED or a poll exception. If a job sticks in QUEUED/PROCESSING the CLI spins forever — the user must Ctrl-C.
Do: factor the two near-identical loops into one poller with a max wall-clock / max-attempts cap; on exceed, stop the spinner with "still running in background — check bytebell ls" and exit non-zero.
Done when: both commands share one poller that cannot hang indefinitely.
Type: simplification / robustness · Difficulty: medium
pollIndexToCompletion(packages/cli/src/indexPoller.ts:31) andpollJobStatus(packages/cli/src/IngestCommand.ts:72) both loop onwhile (true)with a 1500ms delay, exiting only onPROCESSED/FAILEDor a poll exception. If a job sticks inQUEUED/PROCESSINGthe CLI spins forever — the user must Ctrl-C.Do: factor the two near-identical loops into one poller with a max wall-clock / max-attempts cap; on exceed, stop the spinner with "still running in background — check
bytebell ls" and exit non-zero.Done when: both commands share one poller that cannot hang indefinitely.