feat(T-5.8): cli smoke-test runner script#242
Merged
Conversation
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.
Summary
apps/cli/scripts/smoke.sh— a parameterized end-to-end smoke runner that walksconfigure→whoami→generate --commitagainst any$API_URL, in a throwaway repo, asserting exit codes at every step and cleaning up temp config + workdir on exit.PROJECTRC_PATH:saveConfig's default now falls back toprocess.env.PROJECTRC_PATHbefore~/.projectrc, so the script's exported temp path is honoured byconfigure. Without this fix, step 1 would have silently overwritten the operator's real~/.projectrcon a successful run.cdis guarded; throwaway-repo init runs in aset -esubshell so any failure surfaces at the real call site.Scope note (staging vs. production)
docs/11-deployment.md§1 states this project is single-environment CD — there is no staging stack. The task title "Staging smoke test" is therefore reinterpreted as: ship a parameterized checklist runner now, and have the operator record a production run after the first deploy.This script is operator-driven (step 4 invokes the inquirer suggestion picker). Do not wire it into unattended CI.
Doc updates (gitignored — not in this diff)
docs/is gitignored in this repo, so the following edits live only in the working copy:docs/tasks/phase-5-cli/T-5.8-staging-smoke.md— deliverable description, the negative-path wiring proof, and a structured template for the operator's production run record.docs/11-deployment.md§11 — build-checklist entry now referencesapps/cli/scripts/smoke.sh.Test plan
pnpm -F @commit-analyzer/cli typecheckpnpm -F @commit-analyzer/cli lintpnpm -F @commit-analyzer/cli test(79 tests pass — adds one forsaveConfighonouringPROJECTRC_PATH)bash -n apps/cli/scripts/smoke.sh(syntax)API_URL=http://127.0.0.1:1 API_KEY=git_… bash apps/cli/scripts/smoke.sh→ script exits 4 (configure NetworkError), cleanup runs.Closes #65