Skip to content

refactor(services): clean the service drivers and their comments - #27

Merged
ttncode merged 1 commit into
mainfrom
refactor/services-shell
Sep 16, 2026
Merged

ttncode merged 1 commit into
mainfrom
refactor/services-shell

Conversation

@ttncode

@ttncode ttncode commented Sep 16, 2026

Copy link
Copy Markdown
Owner

What this changes

PR 3 of 5 (spec: docs/superpowers/specs/2026-09-16-clean-shell-and-comments-design.md). Covers services/**/*.sh.

  • Headers: each of the 15 files now opens with a one-line description; comments are cut down to why-only.
  • Tests: the remaining shell [ ] tests in the drivers are now [[ ]].
  • Helpers: the probe splice moved out of the longest service_driver_apply bodies into same-file helpers splice_nest_probe, splice_laravel_probe and splice_mongodb_probe, the same shape as the existing splice_flask_probe. Driver interface functions are unchanged.
  • Unchanged: the logic of assert_nest_probe_spliced and the flask splice guard, plus every byte written into generated projects.

How it was verified

  • Lint: mise run lint exits 0.
  • Tests:
    • tests/service.bats 48/48.
    • test-integration 69/69.
    • test-unit 195/196. The one failure is install.bats "start_stack logs in to ghcr only when a token is set". It fails the same way on main and exercises common/install.sh, which this PR does not touch. Its stub docker never reads stdin, so the printf feeding --password-stdin can hit SIGPIPE.
  • Generated projects:
    • mise run checklist exits 0 for both --api flask --web nextjs --db postgres --cache redis and --api nestjs --db mongodb.
    • Both generated trees were diffed against the same projects generated from main and are byte-identical, apart from the -dirty git-describe suffix.

Checklist

  • mise run lint passes
  • mise run test-runner passes — see the pre-existing install.bats flake above
  • New behaviour has a test that fails without the change
  • Docs that describe changed behaviour were updated in the same commit
  • No unrelated changes

…vice drivers

Applies the comment-code and Clean Bash rules to the 15 services/**/*.sh
driver and shared files: strip banner headers, shrink comments to the
non-obvious why, convert [ ] to [[ ]], and extract each driver's probe-splice
block into its own named function (splice_nest_probe, splice_laravel_probe,
splice_mongodb_probe) so service_driver_apply stays a short setup sequence.
No generated output changes.
@ttncode
ttncode merged commit 00fb560 into main Sep 16, 2026
21 checks passed
@ttncode
ttncode deleted the refactor/services-shell branch September 16, 2026 15:15
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