Skip to content

fix(deploy): preserve sealed per-start ordinary deployment - #873

Merged
LIghtJUNction merged 1 commit into
mainfrom
fix/ordinary-perstart-forward-20261012
Oct 12, 2026
Merged

LIghtJUNction merged 1 commit into
mainfrom
fix/ordinary-perstart-forward-20261012

Conversation

@LIghtJUNction

Copy link
Copy Markdown
Member

LMM API Pull Request

变更说明 / Summary

Ordinary deployment from a confirmed per-start writer currently fails sealed startup checks, and a new capsule path cannot inherit the prior hook seal. Add a native startup projection that validates the actual predecessor capsule and loaded persistent hook, then bind the new hook only after the exact ordinary parent proves the retained writer stopped. Arch and the standalone wrapper keep the same verified shared-PG ownership through startup and confirmation; a confirmed transaction can later restart with its own per-start owner.

The patch preserves verify-existing/no-DDL scope, exact predecessor/target paths, immutable schema and writer identity, live parent RPC/PG lock checks, shutdown/refund proof, one-shot bind intents and fresh startup checks. Foreign/same-ID/non-Go targets, stale parent state and failed bind/start proofs fail closed. No API/Web behavior, dependencies, packaging or release workflow changes are included.

与上游的关系 / Upstream relationship

  • LMM API 独有变更 / LMM API-specific change
  • 上游尚未合并的修复或功能 / Change not yet merged upstream
  • 同步或移植上游变更 / Upstream sync or backport
  • 不适用(文档、CI、仓库维护等)/ Not applicable

上游参考 / Upstream reference: N/A; follows the native startup sealing work in #870.

关联 Issue / Related issue

No separate issue; production ordinary startup compatibility follow-up to #870.

变更类型 / Type of change

  • Bug 修复 / Bug fix
  • 新功能 / Feature
  • 重构或性能优化 / Refactor or performance
  • 前端或交互 / Frontend or UX
  • 部署、CI 或构建 / Deployment, CI, or build
  • 文档或仓库维护 / Documentation or maintenance

验证 / Verification

env GOTOOLCHAIN=go1.25.1 LMM_TEST_POSTGRES=1 LMM_TEST_ORDINARY_BIND=1 go -C apps/api-go test ./internal/deploycli -run '^(TestMerchantStoreOrdinary|TestProductionMerchantStoreStartupTransition|TestExistingSchema|TestProductionMerchantStore(Capsule|Portable|Start|Writer))' -v -count=1 -timeout=180s
result: PASS (exact bc80af271b7449cea58a260a4d718a427e8065b2)
env GOTOOLCHAIN=go1.25.1 LMM_TEST_POSTGRES=1 LMM_TEST_ORDINARY_BIND=1 go -C apps/api-go test -race ./internal/deploycli -run '^(TestMerchantStoreOrdinary|TestProductionMerchantStoreStartupTransition)' -v -count=1 -timeout=180s
result: PASS (exact bc80af271b7449cea58a260a4d718a427e8065b2)
python3 -B scripts/test-native-shared-pg-deploy.py -v
result: PASS (exact bc80af271b7449cea58a260a4d718a427e8065b2)
just test-deploy-entrypoint
result: PASS (exact bc80af271b7449cea58a260a4d718a427e8065b2)
env GOTOOLCHAIN=go1.25.1 GIT_DIR=/home/lightjunction/Documents/GITHUB/api.lmm.best/.git/worktrees/api-ordinary-perstart-forward-20261012 GIT_WORK_TREE=/home/lightjunction/.cache/api-ordinary-perstart-forward-20261012 just build-deploy
result: PASS (exact bc80af271b7449cea58a260a4d718a427e8065b2)

Affected native checks include complete bind fixtures, real local PostgreSQL parent/terminal restart linkage and race checks. Wrapper tests pass 11 cases; deployment entrypoints and Web shipping tests pass 18/17. Two initial tool build attempts failed linked-worktree VCS discovery; the recorded successful command pins the exact Git directory/worktree and retains vcs.modified=false. Original failed records remain preserved.

Unchanged API and Web test results are reused with immutable source-object comparisons; no full application matrix or local API/Web build was repeated. Actual-systemd optional tests remain skipped. Official signatures, native package installation and origin/browser acceptance belong to the authorized release/deployment and are not claimed by these local tests.

截图或日志 / Screenshots or logs

Source-matched local records retain exact commands, exits and stdout/stderr SHA256. Qualification source: bc80af271b7449cea58a260a4d718a427e8065b2; all five selected records pass the standard local-release verifier. No production logs or secrets are included.

提交检查 / Checklist

  • 我已搜索本仓库的 Issues 和 PRs,确认没有重复工作。
  • 此 PR 只包含与当前目标相关的改动,未混入格式化或其他无关变更。
  • 我已说明该变更对当前产品流程或兼容行为的影响,并保留必要的来源、版权和许可证信息。
  • 我已检查兼容性;如有破坏性变化,已在说明中明确列出迁移方式。
  • 我已补充或更新相关测试,并在上方记录实际验证结果;如未测试,已说明原因。
  • 我已更新受影响的文档、示例配置和多语言文案(如适用)。
  • 代码、日志、截图和提交记录中不包含 API Key、Cookie、Token、密码、DSN 或其他敏感信息。

Copilot AI balanced review requested due to automatic review settings October 12, 2026 02:02
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for security reviews. Please try again later.

@LIghtJUNction
LIghtJUNction merged commit 0c42f83 into main Oct 12, 2026

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@LIghtJUNction
LIghtJUNction deleted the fix/ordinary-perstart-forward-20261012 branch November 5, 2026 07:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants