Repository navigation
Inside Preview and production
Once step 4 has closed, sclaude goes on by itself (remind_prod in
deploy.sh), in the order "The end of the cycle" explains.
The preview is not asked about. It is what QA looks at, and nothing after it
can happen without one, so sclaude deploys it (preview_ship), up to
PREVIEW_TRIES (three) times on a failure, and runs the preview regression
against it. What a deployed stage's regression runs is the project's
previewRegression and prodRegression (project_stage_regression):
project_regression_parts gives the stage's own list for full, the
regression.smoke list for smoke — the full list where the product declares
none (project_smoke_declared), said in the run's heading — and nothing for
none, which is the path a stage with no list already takes: no gate, and the
map drops the suite (setting in process_config.py reads the same). A part named
smoke gets what e2e gets against a deployment in regression_command. A deploy that still fails is the stage's red in the regression
gate: the fixing session a red run gets, told which command failed
(SCLAUDE_BLOCK_AT, since the block's output stays in the terminal), the
migrations and the deploy again on its fix, the same two attempts and the
question after them. A tree already deployed and green is not deployed again; sclaude preview <name> and the menu's "Deploy a preview" still do it on purpose.
The preview is deployed from the main repository with a path to the worktree, the equivalent of:
cd ~/myapp
vercel ~/myapp-<feature> --project <name>The link to the Vercel project lives in the main repository's .vercel/, and
the worktree has none — a vercel launched from there would create a new
project instead of deploying to the existing one (verified; the spare project
had to be deleted by hand).
Production is asked about ("Ship to production?"), after the merge, unless
the project's ship says otherwise (project_ship_mode in project.sh):
auto runs the block with an empty prompt, as the preview's, but only in
place of the plain question — "Ship to production anyway?", where QA or a
check was passed over, is still asked (a merge after QA accepted the very
preview still deployed is not passed over, even where the preview runs no
suite: qa_accepted_now in qa.sh), and so is "Ship to production, with
what rides along?" where prod_riders finds other features' code between
production and main; off reaches no block, records no
rollback, and closes the issue with issue_close_done … shipoff before the
epilogue and the clean-up, as after a "no". No answer at all is not a "no":
nothing is closed or cleaned up, the issue hears of the merge, the feature
stays on the question (prod_pass.shipping), and the next run asks it again.
On a
"yes" sclaude runs it itself: the product's production deploy (deploy.prod,
vercel --prod where the product is on Vercel; with neither, production is
never offered, as with off) from the main repository, and if
the branch added migrations, the project's promote command first — whether one
is needed sclaude determines by whether the branch touches the migrations
directory. The chain breaks off at the first error, so that a promote that did
not go through does not drag a deploy along with it. Each command but a cd
is shown short — its first lines, every line that says something failed, and
its last — and written whole to .sclaude/local/feature/logs/ship/, whose path
the screen names (block_quiet.py): a pull's diffstat and a push hook's checks
once filled the screen around the one line that mattered. With a terminal
here the command runs on a terminal of its own, which the keys typed reach, so
one that asks only on a terminal still asks; with none it is piped, as before,
and reads the input sclaude was given. A line it leaves without its newline,
a question, is shown at once. The production
regression follows, and a red one rolls production back (see "Production rollback").
A ship that fails is looked into at once, time being dear there: production
keeps the release it had — a deploy switches it whole — but when the
promote began, the old code may stand on the new migrations, so production's
suite runs against it first. Then a fixing session opens, told which command
failed and, when it is red, what production's suite says. A fix in the code
goes the way a red production's does: step 4 reopened, a new pull request from
the same branch, the whole way round. A cause outside the code — Vercel's
login, the network — it writes down, and the next run offers the ship again.
Generated from docs/sclaude.md; edit it there, then rebuild with wiki/build.py.
SClaude is open source under MIT · Repository · Landing page · Contact
Why
How it works
- The cycle
- Big features in parts
- Limits in code
- Fewer tokens
- Feedback loops
- Metrics and the replay
- For a team
- Working from the phone
- Stack and costs
- Privacy
Guide
- Getting started
- Setting up
- Using sclaude
- The config, key by key
- When something goes wrong
- Glossary
- Gates and rules
- Team setup
- Privacy in full
- The tools
- Decks and the map
- Contributing
Inside
Links