Files
recipe-maintainer/.claude/commands/test-context-reset.md
autonomic-bot f283a371bb recipe-maintainer: public snapshot (secrets + deployment plans removed, single commit)
Sanitized single-commit public mirror of recipe-maintainer.
- Removed test-ssh/.testenv (live creds); added test-ssh/.testenv.example placeholders.
- Removed plans/ and planned-updates/ (deployment-planning docs) so no client/
  deployment domains appear in the public repo.
- All other secret stores were already gitignored.
- docs.coopcloud.tech retained as a submodule (public upstream).
2026-06-16 20:18:24 +00:00

2.5 KiB

description, argument-hint, allowed-tools
description argument-hint allowed-tools
Undeploy all apps from the test server except traefik
recipe-name
Bash
Read
Grep
Glob

Test Context Reset

Undeploy all apps from the active test server except for infrastructure services and (optionally) a specific recipe and its dependencies. This frees memory so you can test one recipe at a time without interference from other deployed apps.

The optional recipe name is: $ARGUMENTS

Read and follow the instructions in .claude/commands/includes/logging.md.

Steps

  1. Resolve the active test server:

    python3 scripts/get_test_instance.py
    

    This outputs SERVER and INSTANCE. Use SERVER as <SERVER> in the steps below.

  2. Build the protected recipe list.

    Start with the always-protected infrastructure recipes:

    • traefik
    • backup-bot-two

    If a recipe name was provided in $ARGUMENTS:

    • Add that recipe to the protected list.
    • Read recipe-info/<recipe>/dependencies.md (if it exists). Each ## heading names a recipe that is a test dependency. Add every listed recipe to the protected list.
    • Read recipe-info/<recipe>/test.md and look for a ## Requires section. Each line under that heading starting with - names a required recipe (e.g. - keycloak). Add every required recipe to the protected list.
    • For each required recipe found, also read its recipe-info/<required>/dependencies.md and recipe-info/<required>/test.md and check for further dependencies (transitive). Add those too. Continue until no new dependencies are found.
  3. List all deployed apps on the test server:

    abra app ls -s <SERVER> -S -m
    

    Parse the JSON output to get the list of app domains and their recipes.

  4. Match deployed apps to protected recipes — for each deployed app, check if its recipe name matches any entry in the protected list. If it does, mark it as protected and skip it.

  5. Show the user what will be undeployed — list the app domains that will be undeployed and confirm the protected apps that will be kept (and why — infrastructure, target recipe, or dependency).

  6. Undeploy each non-protected app — for every app that is not protected, run:

    abra app undeploy <domain> --no-input
    

    Run these sequentially (not in parallel) to avoid overwhelming the server.

  7. Verify — run abra app ls -s <SERVER> -S -m again and confirm only the protected apps remain deployed.

  8. Summarise — report what was undeployed and what's still running.