Skip to content

fix(service): add safe nonblocking startup-health snapshots - #3875

Merged
lidge-jun merged 4 commits into
devfrom
codex/260907-c3-startup-health
Sep 7, 2026
Merged

fix(service): add safe nonblocking startup-health snapshots#3875
lidge-jun merged 4 commits into
devfrom
codex/260907-c3-startup-health

Conversation

@lidge-jun

@lidge-jun lidge-jun commented Sep 7, 2026

Copy link
Copy Markdown
Owner

Summary

Carry the cache/test portion of #3863. Fresh cached health remains fresh; stale/empty snapshots return immediately while a single contained probe refreshes. Controlled fixtures cover synchronous throws, rejected probes and invalidation races. The source commit was path-filtered before cherry-pick -x to exclude M-owned config-routes.ts. Settings GET wiring at config-routes.ts:332 remains the main session’s separate layer; this cache-support PR alone does not resolve settings blocking.

Verification

  • Cross-platform CI: all required per-chain jobs SUCCESS, exact top head f1b8f2d2f1edee55b68202469f86a5334710688d: Linux 4, macOS 2, gates, storage, API, all keyring/npm smokes and Docker. Overall run status is completed / success; this is not an assertion that every workflow job passed.
  • Explicit user policy defers the six Windows test shards and macos control to one run on the final release-train head. They are excluded only from this per-chain LANDABLE decision. Windows keyring/npm smoke jobs remain required. Lower product CI is represented by the cumulative top-head result.
  • Attempt 1 macOS 1/2 timed out before a test result in codex-inject-write-lock.test.ts. Main explicitly authorized retrying the failed job at the unchanged head. The required-job evidence above uses each job's latest attempt; earlier failure is retained in run history. Independent Astra diagnosis found no proven C-cache interaction, and the same-head macOS control passed that file.
  • Local tests/typecheck/build/install: NOT RUN, explicitly prohibited for this train. Runtime verification is remote CI only.
  • git diff --check: passed.
  • Darwin, independent Astra high explorer: PASS for source review at the pinned layer head (fresh TTL, probe failures and generation isolation).

Checklist

  • Scope stays focused and avoids unrelated cleanup.
  • Docs or release notes were updated when needed.
  • Security-sensitive changes were reviewed for secrets, auth, and unsafe defaults.

Manual dependent PR chain

Native stack: null. Review only this layer’s diff. Main integrates bottom-up after refreshing dev ancestry, live heads/bases, review threads and required gates. This task does not merge. The CI-tested cumulative top tree is the integration target; advancing dev requires another cascade and top-head verification.

Layer Source PR Head
1 #3839 #3873 51b44371860b2ec933d66de1b68ca790be3b81fb
2 #3841 #3874 8eaa5641902b84bec6c97a94de6c2fe6d810c31d
3 #3863 #3875 91b54b79bc780011031b00354621cc9fcaef360e
4 #3860 #3876 abbdb227f385443228656c8440282187cb5dec75
5 #3252 #3878 f1b8f2d2f1edee55b68202469f86a5334710688d

Maintainer integration decision (MAINTAINERS.md, dev-only admin integration): @lidge-jun integrates lane C's manual chain (#3873#3874#3875#3876#3878) into dev bottom-up. Chain-top evidence at head f1b8f2d2f: Cross-platform CI run 34116228181, aggregate ci = success (attempt 2: macos 1/2 timed out at 20 min in attempt 1 after codex-inject-write-lock.test.ts with no output; independent diagnosis found no causal link to this chain and the same head's macos control passed those tests; the failed job alone was rerun and passed — no code change). Windows 6/6 and macos control also green on this head. Prospective merge tree of origin/dev@522ce5f8c + top = e0b0e5886 = tested tree. Independent source/security/GUI reviews PASS per PR bodies; screenshots from this run's dashboard-preview artifact. Local suites NOT RUN. Maintainer integration, not self-approval.

@coderabbitai

coderabbitai Bot commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

🗂️ Base branches to auto review (2)
  • ^dev$
  • ^preview$

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Team

Run ID: 813babc9-d2e3-4efd-9746-355814ea4dd4

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

github-actions Bot commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

Deterministic PR hygiene checks passed.

@github-actions github-actions Bot added the bug Something isn't working label Sep 7, 2026
@lidge-jun

Copy link
Copy Markdown
Owner Author

리뷰 · 우선순위 65 / 80

이 PR은 #3863의 cache/test 조각만 가져옵니다. base는 codex/260907-c2-anthropic-vision입니다. cherry-pick 전에 main-owned config-routes.ts를 path-filter로 빼서, 이 PR만으로는 설정 GET이 여전히 await getCachedStartupHealth를 기다릴 수 있습니다. PR 본문도 Settings GET 배선은 별도 main-session 레이어라고 명시합니다.

추가된 getStartupHealthSnapshot는 신선하면 캐시를 바로 주고, 오래됐거나 없으면 즉시 stale/conservative 값을 반환한 뒤 백그라운드에서 한 번만 probe합니다. refreshInBackground는 probe reject/throw를 stale 또는 conservative로 삼키고, invalidated된 옛 flight가 새 generation의 inflight를 지우지 못하게 inflight === probe일 때만 clear합니다. 테스트는 non-waiting 시작·fresh 보존·stale 즉시 반환·실패 probe·invalidation race를 고정합니다. astra-high PASS. types/config 손댐 없음.

중요한 스코프 경계: 지금 devconfig-routes.ts 설정 응답은 여전히 startupHealth: await readStartupHealth(config)입니다. 스냅샷 API만 추가되고 호출부가 없으면 대시보드 설정 로딩 지연 증상은 이 PR만으로 안 사라집니다. 제품 가치는 “안전한 nonblocking 헬퍼+회귀”이고, 실제 settings 경로는 후속이 필요합니다.

startup-health-cache.ts getStartupHealthSnapshot - 즉시 반환 + 백그라운드 refresh. settings가 서비스 매니저 probe에 막히지 않게 하려는 계약
refreshInBackground catch/finally - 실패를 삼키고, 무효화된 flight가 새 inflight를 지우지 않음
autostart-health.test.ts - fresh/stale/fail/invalidate 회귀
config-routes.ts 배선 - 이번 diff에 없음. settings-loading 이슈는 미해결로 남음(#3863 잔여)

메인테이너의 판단이 필요한 지점

  • 캐시 레이어만 먼저 넣고 settings GET을 짧은 후속으로 이을지, 배선까지 한 PR로 합칠지
  • 원본 #3863은 combo/archive 등 다른 조각이 남아 있으므로 이 PR 머지 후 partial landed인지, 이슈를 쪼갤지
  • top CI 후 Lane C 3층으로 진행할지

너의 추천
Lane C 3층으로 머지하세요. 헬퍼 계약과 회귀는 탄탄합니다. 다만 머지 직후 main-session에서 settings GET을 getStartupHealthSnapshot으로 바꾸는 짧은 후속을 바로 열어야 사용자 체감이 납니다. #3863 전체를 landed-via로 닫지 말고, 이 조각만 인용하거나 이슈를 분할하세요.

이 댓글은 grok-bot이 작성했습니다

@lidge-jun
lidge-jun force-pushed the codex/260907-c2-anthropic-vision branch from 788ed57 to 71ec4c7 Compare September 7, 2026 10:14
@lidge-jun
lidge-jun force-pushed the codex/260907-c3-startup-health branch from 299640a to 611154b Compare September 7, 2026 10:14
luvs01 and others added 4 commits September 7, 2026 20:21
…[skip ci]

(cherry picked from commit 55b009b)

Co-authored-by: luvs01 <27862058+luvs01@users.noreply.github.com>
…cel [skip ci]

Co-authored-by: luvs01 <27862058+luvs01@users.noreply.github.com>
Path-filtered source commit: 9606216. Config-route wiring excluded under lane ownership.

Co-authored-by: x3M3x <98298256+x3M3x@users.noreply.github.com>
(cherry picked from commit 197bf2e2bff362b9a135389741f1acf91670ded0)
…es [skip ci]

Co-authored-by: x3M3x <98298256+x3M3x@users.noreply.github.com>
@lidge-jun
lidge-jun force-pushed the codex/260907-c2-anthropic-vision branch from 71ec4c7 to 8eaa564 Compare September 7, 2026 11:21
@lidge-jun
lidge-jun force-pushed the codex/260907-c3-startup-health branch from 611154b to 91b54b7 Compare September 7, 2026 11:21
@lidge-jun
lidge-jun marked this pull request as ready for review September 7, 2026 11:53
@lidge-jun
lidge-jun requested a review from Ingwannu as a code owner September 7, 2026 11:53
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 7, 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 ⚠️ Failed 2026-09-07T11:54:04.516232Z 91b54b7 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.

@lidge-jun
lidge-jun changed the base branch from codex/260907-c2-anthropic-vision to dev September 7, 2026 11:53
@lidge-jun
lidge-jun merged commit 686cb12 into dev Sep 7, 2026
17 of 18 checks passed
@lidge-jun
lidge-jun deleted the codex/260907-c3-startup-health branch September 7, 2026 11:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants