Skip to content

refactor(doctor): share deploy path comparison - #522

Merged
gfargo merged 1 commit into
mainfrom
refactor/comparison-engine-inspectors
Aug 27, 2026
Merged

refactor(doctor): share deploy path comparison#522
gfargo merged 1 commit into
mainfrom
refactor/comparison-engine-inspectors

Conversation

@gfargo

@gfargo gfargo commented Aug 26, 2026

Copy link
Copy Markdown
Owner

Summary

  • extend the shared comparison core with filesystem-independent lexical path normalization
  • make shallow and deep doctor checks use the same deploy-root containment policy
  • reject sibling prefixes such as stacks-old while tolerating repeated and trailing separators

Why

The two doctor VPS inspection paths implemented deploy-root checks independently. The shallow fleet check required a slash boundary, while the deep check used a raw string prefix and could accept /expected/stacks-old/... as if it were under /expected/stacks.

This continues #248 by moving another inspection policy into lib/compare.sh without changing remote collection, output formatting, or doctor exit behavior.

Validation

  • full Bats suite: 2,650 tests passed, 2 skipped
  • focused doctor/diff/drift suite: 111 tests passed
  • direct component-boundary, repeated-separator, trailing-slash, exact-root, and root-path smoke checks
  • shellcheck -s bash lib/compare.sh lib/cmd_doctor.sh
  • Bash syntax checks
  • git diff --check

Advances #248

@gfargo
gfargo merged commit a8041c9 into main Aug 27, 2026
3 checks passed
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