fix: remove splits multi-templates and no longer hard-fails template-less features - #17
Merged
Merged
Conversation
…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
force-pushed
the
feat/remove-holes
branch
from
September 13, 2026 18:56
1a8a5df to
e962936
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #16
removeno longer no-ops multi-template features or hard-fails template-less ones.feature_removesplits comma-joinedFEATURE_TEMPLATEand deletes/strips each file.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/nginxor~/.wp-test. 9 new assertions fail on main. 117/117. shellcheck --severity=warning clean.