Skip to content

fix: close Worker context when runner startup fails [skip deploy] - #185

Merged
lyyzka merged 2 commits into
mainfrom
codex/worker-startup-cleanup
Oct 19, 2026
Merged

lyyzka merged 2 commits into
mainfrom
codex/worker-startup-cleanup

Conversation

@lyyzka

@lyyzka lyyzka commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

Worker channel reconciliation creates a passive LingxiOS context before runner admission. If runner startup then fails, its stop handle has not yet been registered: two realtime Redis sockets survive cleanup and can keep the failed process alive instead of allowing an exit-based restart. Register context cleanup before reconciliation, after passive ownership is accepted. Preserve the original startup error and close context before product pools.

An integration regression using real isolated PostgreSQL/Redis and the exact published 3.5.2 Worker image reproduced 2 leaked connections instead of 0, then passed after the fix. The existing passive-startup regression also passes. The lifecycle deployment assertion now permits the already-approved independent Worker image field while still requiring full environment inheritance. Runtime/provider/schema versions and production configuration are unchanged.

CI passed on eec5c5fd: normal package install, server lint/typecheck, 114/114 server tests, 2/2 selector tests, and complete integration (247 passed, 0 failed, 21 existing gated skips). Local owning regressions passed 2/2, lifecycle 8/8, and pinned upstream WuKongIM raftstore tests passed. Skipped checks do not qualify live-provider behavior.

Read-only public production checks on 2026-10-19 show healthy readiness/dependencies, Web c132e9f2, LingxiOS 3.5.2/schema 12, and reachable Komodo on txy3. Current per-node/Worker health, running image digests, migration provenance, WAL logs and provider results remain unverified. Official sigillo@0.14.2 me --json returned error: not logged in; there is no Komodo credential injection. The cloud npm identity returned 401, so local exact-version tests used the pinned published image; canonical CI package installation succeeded. No credentials were created or transferred.

The original 3.5.1 Web/API soak remains incomplete at 797 samples / 47,829.58 seconds, without a terminal receipt. It is neither evidence of a production failure nor 3.5.2 Worker/provider acceptance. Timestamped observations, red/green logs, hashes, reproduction and remaining access.

Draft for review. No merge, production deployment, fault injection, data reset or new/restarted soak was performed. The patch affects failed-start resource cleanup and uses the existing idempotent stop wrapper. If approved for release, the proposed scope is the two Worker services only, with Komodo update completion, readiness and actual image digests verified through existing authorized access. Merge and deployment scope remain for the parent thread to confirm.

lyyzka commented Oct 19, 2026

Copy link
Copy Markdown
Contributor Author

本轮唯一合并/生产发布会话已接手审查。用户 2026-10-19 最新授权覆盖普通合并及正常生产部署;安全配置、持久权限及凭据变更仍不在此授权内。当前 main 47ba60d,本 PR head eec5c5f,已确认 CI39186205826 checks(server)/integration 成功,21 项门控跳过不计通过。正在审查启动清理顺序、当前云端 Sigillo/Komodo 访问和备份/镜像/迁移/回滚前置条件。旧 3.5.1 Web/API soak 保持未完成(797 samples / 47829.58s,无终态回执),不作为 3.5.2 Worker/provider 验收。后续会在此记录实际合并、发布 update ID 与验收边界。

lyyzka commented Oct 19, 2026

Copy link
Copy Markdown
Contributor Author

审查完成,未发现阻塞问题:清理句柄在 passive ownership 成功后、任何 reconciliation 前注册;逆序清理先关闭 context,再关闭产品连接;原启动错误仍保留,重复停止使用既有幂等 wrapper。当前云端使用根锁文件重新安装依赖并移开环境 setup 残留的 server/node_modules 后,server lint/typecheck、114/114 server tests、2/2 owning PostgreSQL/Redis integration 均通过、零跳过;无需源码兼容性改动。既有 CI39186205826 完整 integration 为247通过/0失败/21门控跳过。将正常合并准确 head eec5c5f,保留 [skip deploy] 以便本轮最终依赖统一发布;合并不代表旧四项外部验收全部通过。

@lyyzka
lyyzka marked this pull request as ready for review October 19, 2026 09:35
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 19, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-19T09:36:24.226132Z eec5c5f Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@lyyzka
lyyzka merged commit 97441ba into main Oct 19, 2026
7 checks passed

lyyzka commented Oct 19, 2026

Copy link
Copy Markdown
Contributor Author

已合并并随 PR194 / 成功发布流程 正常上线。最终产品源码 b76c4cc0 使用正式 LingxiOS3.5.3,生产实际镜像和Web/API、Worker readiness已核验;最终源码CI集成281通过/0失败/21门控跳过,服务端107/107。原启动失败Redis连接清理修复及其原始测试证据保留,未将可选门控跳过计为通过。

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