mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2026-11-12 05:36:40 +00:00
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
4.9 KiB
4.9 KiB
Iteration
Use this page when you are iterating on a local app deploy during debugging or development.
Role Loop
- Before starting the loop, you MUST propose disabling all non-necessary services via
SERVICES_DISABLEDto reduce resource usage. In the typical case, this means keeping only the database and disabling everything else. Only proceed without this proposal if the user has already confirmed a full-stack setup. - Unless the user explicitly says to reuse the existing setup, you MUST start once with
APPS=<roles> make deploy-fresh-purged-appsto establish the baseline inventory and clean app state. SetFULL_CYCLE=trueto also run the async update pass (pass 2). - You MUST NOT run more than one deploy command at the same time. Deployments MUST be executed serially, never in parallel.
- To speed up debugging, you MAY pass multiple apps at once, e.g.
APPS="<roles> <roles>" make deploy-fresh-purged-apps. - After that, you MUST use
APPS=<roles> make deploy-reuse-kept-appsfor the default edit-fix-redeploy loop. - Do NOT rerun
APPS=<roles> make deploy-fresh-purged-appsjust because a deploy failed or you changed code. That restarts the stack unnecessarily and burns time. - If the same failure still reproduces on the reuse path and you want to test whether app entity state is involved, use
APPS=<roles> make deploy-reuse-purged-appsonce. - After that targeted purge check, you MUST return to
APPS=<roles> make deploy-reuse-kept-apps. - Only go back to
APPS=<roles> make deploy-fresh-purged-appsif you have concrete evidence that the inventory or host stack is broken, or you intentionally need a fresh single-app baseline again. - Network or DNS failures during a local deploy count as concrete evidence that the host stack is broken. In that case, the next retry MUST be
APPS=<roles> make deploy-fresh-purged-appsso the container stack is re-initialized. - If you need to validate the single-app init/deploy path separately, use
APPS=<roles> make deploy-fresh-kept-apps. It checks the clean single-app setup apart from the faster reuse path.
Workflow Loop
- When you are developing, optimizing, or debugging GitHub Actions workflows, you SHOULD explicitly propose
make act-workflowas the default iterative local debug loop. - You MUST NOT assume that Act should be used automatically for workflow work. If the user agrees with the proposal, you SHOULD use
make act-workflowfor the iteration loop. - After the user agrees to use Act, you SHOULD rerun
make act-workflowafter each focused workflow change and inspect the new output before making further edits. - If the workflow uses a distro matrix, you MUST iterate on one distro at a time instead of rerunning the whole matrix during the default debug loop.
- Debian SHOULD be the preferred distro for that focused workflow iteration unless the failure is clearly distro-specific or the user asked for a different distro.
- When you constrain an Act matrix run through
ACT_MATRIX, you MUST use Act'skey:valuesyntax instead ofkey=value. Otherwise Act may ignore the filter and rerun the whole matrix. - For
.github/workflows/test-environment.yml, the preferred focused Debian example isACT_WORKFLOW=.github/workflows/test-environment.yml ACT_JOB=test-environment ACT_MATRIX='dev_runtime_image:debian:bookworm' make act-workflow. - You SHOULD avoid jumping straight to repeated remote CI reruns when
make act-workflowcan validate the workflow locally and the user agreed to use it. - You MAY widen the scope to
make act-appormake act-allwhen the problem spans more than one workflow ormake act-workflowis too narrow for the failure.
Certificate Authority
- If the website uses locally deployed certificates, you MUST run
make trust-cabefore you inspect it in a browser. Otherwise the browser will warn about the local CA and the inspection will not be reliable. - After
make trust-ca, you MUST restart the browser so it picks up the updated trust store. - If
make trust-cafails due to missing root permissions, you MUST use the alternative syntaxcurl -k(orwget --no-check-certificate) to skip certificate validation when checking URLs from the command line instead of fixing the trust store.
Inspect
- Before you redeploy, you MUST complete all available inspections first. Check the live local output, local logs, and current browser state so the original state stays visible.
- To inspect files or run commands inside a running container, use
make exec. - When a local deploy fails, you SHOULD first inspect and, where practical, validate a fix inside the running container with
make execbefore starting another deploy. Use that live investigation to identify the concrete root cause and save iteration time. - Once the root cause is understood, you MUST apply the real fix in the repository files and then continue the redeploy loop with the usual commands from this page. In-container fixes are only for diagnosis or short validation and MUST NOT replace the repo change.