ECC/skills/continuous-learning-v2/scripts
Gaurav Dubey a36148fff9
test(clv2): add coverage for instinct-cli prune, projects ops, promote dry-run, normalize-url (#2374)
* test(clv2): cover instinct-cli prune, projects ops, promote dry-run, normalize-url

Add pytest coverage for previously-untested functions in
skills/continuous-learning-v2/scripts/instinct-cli.py:

- _normalize_remote_url: scp/https/file forms, credential + .git
  stripping, network lowercasing, case-preserving local paths, idempotence
- _promote_specific dry-run: returns 0 and writes no global file
- projects delete/gc/merge: invalid-id, not-found, dry-run, and force
  paths over registry + storage, asserting destructive ops are gated
- cmd_prune: dry-run keeps files; non-dry-run deletes only expired; quiet

Test-only change; no production code modified.

Fixes #2302

* test(clv2): assert dry-run storage no-op and quiet-mode stderr silence

Address CodeRabbit review on #2374:

- projects gc/merge dry-run tests now also assert on-disk storage is
  untouched (empty1 project dir survives; nothing copied into dest
  personal), closing the gap where a storage-mutating dry-run regression
  would still pass.
- cmd_prune quiet test now asserts stderr is empty too, not just stdout.

* test(clv2): cover merge missing-destination and prune empty-pending branches
2026-06-29 18:43:32 -07:00
..
lib fix: port continuous-learning observer fixes 2026-05-11 03:35:42 -04:00
detect-project.sh fix(learning): add project registry maintenance 2026-05-19 12:51:18 -04:00
instinct-cli.py fix(clv2): align Python _update_registry schema with shell counterpart (#2369) 2026-06-29 18:43:19 -07:00
migrate-homunculus.sh fix(clv2): escape $HOME before pgrep -f in migrate-homunculus.sh (#2339) 2026-06-25 16:47:32 -07:00
test_parse_instinct.py test(clv2): add coverage for instinct-cli prune, projects ops, promote dry-run, normalize-url (#2374) 2026-06-29 18:43:32 -07:00