Bug Description
add_golden_repo_index index_type=scip (and any operation that publishes a CoW versioned snapshot) FAILS at the snapshot-publish step with HTTP 400 PATH_NOT_ALLOWED from the CoW daemon, because cow_daemon.daemon_storage_path is null in ~/.cidx-server/config.json on all cluster nodes. SCIP generation itself SUCCEEDS (scip-python produced a valid 11MB index.scip.db and scip queries return real results); only the post-generation immutable-snapshot publish fails.
Root Cause (proven via daemon-payload replay)
src/code_indexer/server/storage/shared/clone_backend.py: the constructor sets self._daemon_storage_path = (config.daemon_storage_path or "").rstrip("/") -> "" when daemon_storage_path is null. _translate_to_daemon_path then early-returns the CIDX path UNCHANGED (if not self._daemon_storage_path: return cidx_path, ~line 370-371). So the destination is sent to the daemon as the NFS mount path /mnt/cow-storage/.versioned/<repo>/v_... instead of the daemon-local /home/jsbattig/cow-storage/.versioned/.... The daemon's _validate_dest_path (core/clone_manager.py) does resolved.relative_to(<daemon base_path>), which fails for the mount path -> PathNotAllowedError -> api/routes.py returns HTTP 400 PATH_NOT_ALLOWED.
Replay proof (on node .23): POST /api/v1/clones with the untranslated /mnt/cow-storage/... dest -> HTTP 400; with the daemon-local /home/jsbattig/cow-storage/... dest (what translation should produce) -> HTTP 202 accepted. (Probe clone deleted immediately, non-destructive.)
Environment
- Staging cluster v11.27.0, 3 nodes.
cow_daemon.daemon_storage_path = null in config.json on .20/.22/.23. CoW daemon on .23:8081, base_path /home/jsbattig/cow-storage, NFS-mounted at /mnt/cow-storage on the nodes.
Expected Behavior
CoW versioned-snapshot publish should translate the CIDX/NFS-mount path to the daemon-local storage path so _validate_dest_path accepts it, and the immutable snapshot publishes (HTTP 202).
Fix Direction
Either: (a) populate cow_daemon.daemon_storage_path = "/home/jsbattig/cow-storage" on cluster nodes so _translate_to_daemon_path maps /mnt/cow-storage -> the daemon base_path — wired durably via the auto-updater idempotent _ensure_X_config pattern (config bootstrap); OR (b) harden clone_backend.py so an empty daemon_storage_path still translates when mount_point differs from the daemon storage root (derive the daemon path from mount_point). Prefer wiring the config for correctness + a code guard so a null value fails loud rather than silently sending an untranslatable path. Then re-verify a versioned-snapshot publish returns 202 and the SCIP add-index job completes.
Impact
Severity: priority-2. Blocks CoW versioned-snapshot publishing (SCIP add-index jobs report FAILED; likely affects immutable-snapshot creation for other index types/activations too). SCIP generation + querying works (mutable golden-repo index), so not a total SCIP outage, but add-index JOBS face-plant and no immutable snapshot is produced. Independent of the v11.27.0 Node.js/timeout changes. Surfaced during #1318 SCIP verification.
Bug Description
add_golden_repo_index index_type=scip(and any operation that publishes a CoW versioned snapshot) FAILS at the snapshot-publish step withHTTP 400 PATH_NOT_ALLOWEDfrom the CoW daemon, becausecow_daemon.daemon_storage_pathisnullin~/.cidx-server/config.jsonon all cluster nodes. SCIP generation itself SUCCEEDS (scip-python produced a valid 11MB index.scip.db and scip queries return real results); only the post-generation immutable-snapshot publish fails.Root Cause (proven via daemon-payload replay)
src/code_indexer/server/storage/shared/clone_backend.py: the constructor setsself._daemon_storage_path = (config.daemon_storage_path or "").rstrip("/")->""when daemon_storage_path is null._translate_to_daemon_paththen early-returns the CIDX path UNCHANGED (if not self._daemon_storage_path: return cidx_path, ~line 370-371). So the destination is sent to the daemon as the NFS mount path/mnt/cow-storage/.versioned/<repo>/v_...instead of the daemon-local/home/jsbattig/cow-storage/.versioned/.... The daemon's_validate_dest_path(core/clone_manager.py) doesresolved.relative_to(<daemon base_path>), which fails for the mount path ->PathNotAllowedError->api/routes.pyreturns HTTP 400 PATH_NOT_ALLOWED.Replay proof (on node .23): POST /api/v1/clones with the untranslated
/mnt/cow-storage/...dest -> HTTP 400; with the daemon-local/home/jsbattig/cow-storage/...dest (what translation should produce) -> HTTP 202 accepted. (Probe clone deleted immediately, non-destructive.)Environment
cow_daemon.daemon_storage_path = nullin config.json on .20/.22/.23. CoW daemon on .23:8081, base_path/home/jsbattig/cow-storage, NFS-mounted at/mnt/cow-storageon the nodes.Expected Behavior
CoW versioned-snapshot publish should translate the CIDX/NFS-mount path to the daemon-local storage path so
_validate_dest_pathaccepts it, and the immutable snapshot publishes (HTTP 202).Fix Direction
Either: (a) populate
cow_daemon.daemon_storage_path = "/home/jsbattig/cow-storage"on cluster nodes so_translate_to_daemon_pathmaps/mnt/cow-storage-> the daemon base_path — wired durably via the auto-updater idempotent_ensure_X_configpattern (config bootstrap); OR (b) hardenclone_backend.pyso an emptydaemon_storage_pathstill translates whenmount_pointdiffers from the daemon storage root (derive the daemon path from mount_point). Prefer wiring the config for correctness + a code guard so a null value fails loud rather than silently sending an untranslatable path. Then re-verify a versioned-snapshot publish returns 202 and the SCIP add-index job completes.Impact
Severity: priority-2. Blocks CoW versioned-snapshot publishing (SCIP add-index jobs report FAILED; likely affects immutable-snapshot creation for other index types/activations too). SCIP generation + querying works (mutable golden-repo index), so not a total SCIP outage, but add-index JOBS face-plant and no immutable snapshot is produced. Independent of the v11.27.0 Node.js/timeout changes. Surfaced during #1318 SCIP verification.