Problem
The CLI currently uses different default roots for related runtime state:
- Repository clones for URL/repo-name inputs are rooted at
process.cwd() (.repos/...) in setup and index flows.
- Queue state defaults to project root via
SCSI_QUEUE_BASE_DIR resolution in config.
This can split state when commands are run from a different working directory (for example cron/job runners), causing repos and queue DBs to land in different base locations.
Why this is risky
- Duplicate clones can be created across different CWDs.
- Queue/recovery operations become harder to reason about.
- Behavior is less predictable for automation and operators.
Current behavior (example)
Running the index command from /tmp can place:
- repos under
/tmp/.repos/...
- queues under
<project-root>/.queues/...
Proposed direction
Unify default base-dir behavior for repo storage and queue storage.
Possible approach:
- Introduce a single canonical repos base dir config (for example
SCSI_REPOS_BASE_DIR) resolved from project root by default.
- Use that base in both
setup_command and parseRepoArg for URL/repo-name inputs.
- Keep explicit absolute/relative repo path arguments working as-is.
- Document the final default behavior in README/DEVELOPER_GUIDE.
Acceptance criteria
- Invoking from different CWDs does not split default repo/queue state across unrelated directories.
- Existing explicit repo-path usage keeps working.
- Unit tests cover repo path resolution for URL/repo-name + explicit paths.
Context
Problem
The CLI currently uses different default roots for related runtime state:
process.cwd()(.repos/...) insetupandindexflows.SCSI_QUEUE_BASE_DIRresolution in config.This can split state when commands are run from a different working directory (for example cron/job runners), causing repos and queue DBs to land in different base locations.
Why this is risky
Current behavior (example)
Running the index command from
/tmpcan place:/tmp/.repos/...<project-root>/.queues/...Proposed direction
Unify default base-dir behavior for repo storage and queue storage.
Possible approach:
SCSI_REPOS_BASE_DIR) resolved from project root by default.setup_commandandparseRepoArgfor URL/repo-name inputs.Acceptance criteria
Context
src/commands/setup_command.tssrc/commands/index_command.ts