fcode-release
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseFactorial Code — Release
Factorial Code — 发布
Promotes an app's code from its workspace to its workspace
using CLI remotes. Input: the two workspace slugs. This updates prod's
current (unversioned) code only — publishing a workspace version and moving
the alias is the separate platform release (model in
, journey in ): don't run or
move in this flow unless explicitly asked.
dev-…prod-…stablefcode-core-conceptsfcode-amateam:versions:*stableGate every release with — see the procedure.
fcode-code-validation通过CLI远程仓库将应用代码从工作区推广到工作区。输入参数:两个工作区的标识(slug)。此操作仅更新生产环境的**当前(未版本化)**代码——发布工作区版本并迁移别名是独立的平台发布流程(相关模型见,流程说明见):除非明确要求,否则在此流程中不要执行命令或迁移别名。
dev-…prod-…stablefcode-core-conceptsfcode-amateam:versions:*stable所有发布都必须通过验证——请参照相关流程。
fcode-code-validationGotchas
注意事项
- Prod write access is required. Only operators and the app's Factorial
team admins can push to a workspace; the admin's grant lands when a release is requested and rides in the access token — if prod access is refused right after requesting, run
prod-…and retry. Who promotes and why:fcode login.fcode-ama - A ✅ validation is required before pushing. Run on the dev workspace first; while the report has Blockers, refuse to push. Only an explicit user override ("push anyway despite the Blockers") proceeds — record that the gate was overridden.
fcode-code-validation - Always confirm before the final . Summarize what will change in the prod workspace and wait for an explicit yes — prod code serves live installations.
fcode push - Never . If
--forceorfcode pullreports a divergence between local and prod, stop, show what diverged, and ask the user how to proceed (fcode push).fcode-cli - The after
fcode pullis mandatory — it picks up the prod workspace's current metadata. Skipping it pushes stale settings over prod's.remote:add - Both slugs are encoded tokens (/
dev-…), not the app's UUID (seeprod-…). Verify the prefixes: cloning target and push target must not be swapped.fcode-cli - A failing usually means a mistyped token or missing access (see
fcode clone) — don't retry blindly.fcode-ama - If already exists locally, don't reuse it silently — ask whether to release from a fresh clone (recommended) or the existing copy, and
dev-xxx/it first.fcode pull
- 需要生产环境写入权限。只有运维人员和应用的Factorial团队管理员才能向工作区推送代码;管理员权限会在发布请求时授予并包含在访问令牌中——如果请求后立即被拒绝生产环境访问,请执行
prod-…后重试。关于谁可以执行推广操作及原因,请查看fcode login。fcode-ama - 推送前必须通过✅验证。先在开发工作区执行;如果报告中存在阻塞项,拒绝推送。仅当用户明确覆盖(“尽管存在阻塞项仍要推送”)时才可继续——需记录此次验证门限被覆盖的情况。
fcode-code-validation - 最终执行前务必确认。总结生产工作区将发生的变更,等待用户明确确认——生产环境代码服务于实时安装的应用。
fcode push - 切勿使用参数。如果
--force或fcode pull报告本地与生产环境代码存在差异,请停止操作,展示差异内容并询问用户如何处理(相关说明见fcode push)。fcode-cli - 添加远程仓库后必须执行——此操作会获取生产工作区当前的元数据。跳过此步骤会将过时的设置覆盖到生产环境。
fcode pull - 两个标识(slug)都是编码令牌(/
dev-…),而非应用的UUID(相关说明见prod-…)。请验证前缀:克隆目标和推送目标不能混淆。fcode-cli - 失败通常意味着令牌输入错误或缺少访问权限(相关说明见
fcode clone)——不要盲目重试。fcode-ama - 如果本地已存在目录,请勿静默复用——询问用户是从全新克隆(推荐)还是现有副本进行发布,并先执行
dev-xxx/更新内容。fcode pull
Procedure
操作流程
-
Collect the two slugs. One(source) and one
dev-…(target). Wrong prefix or any ambiguity about which app they belong to: stop and ask.prod-… -
Validation gate. Ensure a current ✅exists for the dev workspace — run
APP_VALIDATION_REPORT.mdwhen it is missing or stale. On ❌, list the Blockers and refuse; proceed only on an explicit user override.fcode-code-validation -
Clone and wire the prod remote:sh
fcode clone --skipSkillsSetup dev-xxx cd dev-xxx fcode remote:add prod-xxx fcode pull # mandatory: picks up prod's current metadata fcode add # registers resources prod doesn't have yetOn a divergence reported by: stop and ask (see Gotchas).fcode pull -
Confirm. Run, summarize for the user what the push will change in
fcode status(processes, modules, variables, settings), and wait for explicit confirmation.prod-xxx -
Push:sh
fcode pushOn a divergence: stop and ask — neveron your own.--force -
Report the outcome, reminding the user that the platform release (publish a version, move) is a separate step (
stable).fcode-ama
-
收集两个工作区标识。一个(源)和一个
dev-…(目标)。如果前缀错误或无法确定所属应用,请停止操作并询问。prod-… -
验证门限。确保开发工作区存在最新的✅文件——如果文件缺失或过时,请执行
APP_VALIDATION_REPORT.md。如果验证结果为❌,列出阻塞项并拒绝继续;仅当用户明确覆盖时才可推进。fcode-code-validation -
克隆并配置生产环境远程仓库:sh
fcode clone --skipSkillsSetup dev-xxx cd dev-xxx fcode remote:add prod-xxx fcode pull # 必须执行:获取生产环境当前元数据 fcode add # 注册生产环境尚未有的资源如果报告存在差异,请停止操作并询问(见注意事项)。fcode pull -
确认变更。执行,向用户总结
fcode status工作区将发生的变更(流程、模块、变量、设置),等待用户明确确认。prod-xxx -
推送代码:sh
fcode push如果报告存在差异,请停止操作并询问——切勿自行使用参数。--force -
报告操作结果,提醒用户平台发布流程(发布版本、迁移别名)是独立步骤(相关说明见
stable)。fcode-ama