Skip to content

fix: remove splits multi-templates and no longer hard-fails template-less features - #17

Merged
MarcinDudekDev merged 1 commit into
mainfrom
feat/remove-holes
Sep 13, 2026
Merged

MarcinDudekDev merged 1 commit into
mainfrom
feat/remove-holes

Conversation

@MarcinDudekDev

Copy link
Copy Markdown
Owner

Fixes #16

remove no longer no-ops multi-template features or hard-fails template-less ones.

  • feature_remove splits comma-joined FEATURE_TEMPLATE and deletes/strips each file.
  • Custom removers: server-tuning, php-fpm-tuning, redis (dry-run safe; php-fpm pool never rewritten without a backup).

Tests use fake HOME / stubbed path helpers — they do not touch this machine's /etc/nginx or ~/.wp-test. 9 new assertions fail on main. 117/117. shellcheck --severity=warning clean.

…ing template-less features

feature_remove() treated FEATURE_TEMPLATE as one filename, so comma-joined
features (security, fastcgi-cache) matched nothing on disk and left files
and include lines behind. Split the list per filename and run the existing
delete + include-strip path for each.

server-tuning, php-fpm-tuning and redis register FEATURE_TEMPLATE="" and
previously failed with "has no template". Add feature_remove_custom_* hooks
using the registry's existing _normalize_id_for_func dispatch:

- server-tuning: restore a stranded .tuning-bak, else strip the
  worker_processes/worker_rlimit_nofile/worker_connections lines it wrote
  (nginx falls back to defaults), with a .remove-bak + nginx -t rollback.
- php-fpm-tuning: restore the .before-tuning copy apply keeps; if that is
  gone but our pm.* signature is present, comment the managed lines back
  out only after writing a fresh .remove-bak — a live pool is never
  rewritten without a backup.
- redis: drop the `redis:` service block from wp-test docker-compose.yml
  files and remove the redis-<site> container; system redis is reported
  but left running since it may predate this tool.

All hooks are dry-run safe. New assertions in run-tests.sh cover the
multi-template split and the three dry-run removals against fake fixtures.

Closes #16

Generated with [Devin](https://devin.ai)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@MarcinDudekDev
MarcinDudekDev merged commit b54fe20 into main Sep 13, 2026
4 checks passed
@MarcinDudekDev
MarcinDudekDev deleted the feat/remove-holes branch September 13, 2026 18:56
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.

remove: split multi-templates and stop hard-failing template-less features

1 participant