Skip to content

Take a fresh task listing for the second startup ownership decision - #5306

Closed
luvs01 wants to merge 1 commit into
lidge-jun:devfrom
luvs01:fix/startup-task-listing-refresh
Closed

luvs01 wants to merge 1 commit into
lidge-jun:devfrom
luvs01:fix/startup-task-listing-refresh

Conversation

@luvs01

@luvs01 luvs01 commented Sep 20, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • The startup Windows task-listing memo was shared across both synchronous startup ownership decisions. A targeted query returning unchanged bytes is not a Task Scheduler state generation, so a task committed between the two decisions could still be reported absent from a stale fallback listing.
  • The later race-sensitive ownership decision now takes a fresh listing; the memo is retained only within the first decision. Runtime ownership retries already omit this startup-local memo.

Verification

  • bun test tests/codex-integration/codex-service-manager-probe-hardening.test.ts — the rewritten regression passes. On this Windows host the suite fake-System32 seam has no icacls.exe, so startServer ACL hardening fails before the probe path (identical on the unmodified test); verified green with the real icacls resolved through the existing test override seam.
  • bun x tsc --noEmit — clean.

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.

Summary by CodeRabbit

  • Bug Fixes

    • Startup ownership checks now refresh Task Scheduler data when a task appears during startup, improving detection during race conditions.
    • Runtime ownership retries now use fresh targeted checks instead of relying on potentially outdated startup information.
  • Tests

    • Updated startup coverage to verify refreshed listings and accurate ownership results when tasks are registered during initialization.

Review readiness checklist

This PR stays in draft until every box below is ticked. Tick all four boxes once the requirements are met:

  • All CI tests are green on my local testing.

  • I pushed my PR to the latest dev commit.

  • I resolved all correct Codex and CodeRabbit findings.

  • My PR is ready for review.

@coderabbitai

coderabbitai Bot commented Sep 20, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository: lidge-jun/opencodex/.coderabbit.yaml

Review profile: ASSERTIVE

Plan: Advanced

Run ID: 5dce2fc4-153d-421a-a9ab-bfe28080d4d9

📥 Commits

Reviewing files that changed from the base of the PR and between d5b6821 and 9705b1d.

📒 Files selected for processing (1)
  • src/server/index.ts

Included review availability: Your plan provides up to 10 included reviews per hour; 7 remain after this review.


📝 Walkthrough

Walkthrough

The startup flow now uses the cached Windows task listing only for the first ownership decision. The later native-main re-probe performs a fresh query. The integration test models task registration between snapshots and verifies the updated ownership and query counts.

Changes

Startup ownership refresh

Layer / File(s) Summary
Use a fresh ownership query
src/server/index.ts
The comment states that the startup cache applies only to the first ownership decision. The native-main inspectStartupOwnership re-probe no longer receives startupWindowsTaskListingCache.
Validate task registration between snapshots
tests/codex-integration/codex-service-manager-probe-hardening.test.ts
The test models opencodex-proxy registration after the second targeted query. It expects ["owned", "unknown"], two full listings, and two targeted queries.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

Possibly related PRs

  • lidge-jun/opencodex#2928: Introduced the Windows task listing cache that this change limits to the first startup ownership decision.
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 2 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly describes the main change: the second startup ownership decision now uses a fresh Windows task listing.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
  • Fix all pre-merge checks with AI
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR

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

Copy link
Copy Markdown
Contributor

✅ Deterministic PR hygiene checks passed.

@lidge-jun

Copy link
Copy Markdown
Owner

리뷰 · 우선순위 74 / 80

이 PR은 Windows에서 서버가 켜질 때 “이 집이 우리 건지”를 두 번 묻는 길을 고칩니다. 예전에는 첫 번째 판단에서 쓴 작업 목록(Task Scheduler 전체 목록)을, 두 번째 판단에서도 그대로 썼습니다. 이유는 “세부 조회(/tn … /xml) 결과가 글자 하나 안 바뀌면 목록도 같다고 봐도 된다”는 메모(#2923 / #2928) 때문이었습니다. 그런데 세부 조회가 같은 바이트를 돌려준다고 해서 스케줄러 상태가 그대로라는 뜻은 아닙니다. 첫 판단과 두 번째 판단 사이에 다른 설치 프로그램이 opencodex-proxy 작업을 넣어도, 세부 조회가 또 “없음”처럼 보이면(특히 영어가 아닌 로케일에서 opaque한 실패 바이트) 옛 목록을 재사용하고 “작업 없음 → owned”로 잘못 볼 수 있었습니다. 지금은 메모를 첫 번째 판단에만 남기고, native-main 직전 두 번째 inspectStartupOwnership에는 캐시를 넘기지 않아 목록을 다시 봅니다. 런타임 재시도는 원래부터 이 메모를 안 썼습니다. 베이스는 dev이고, 프로덕션 한 곳(src/server/index.ts)과 회귀 테스트 한 곳만 바꿉니다.

왜 이게 중요한지 짧게 말하면, 목록에 작업이 보이는데 XML을 못 읽으면 프로브는 present가 아니라 unknown을 줍니다. unknown이면 native-main을 바로 켜지 않고 울타리를 칩니다(ownership-unknown + 재질문). 옛 캐시 때문에 잘못 owned가 나오면, 남의 설치가 끼어든 순간에 우리 쪽이 native-main을 열어 버릴 수 있습니다. 그래서 이번 변경은 “목록 한 번 더 읽기” 비용으로 그 실패 방향을 막는 수리입니다. 테스트도 예전 “목록 한 번만, owned/owned” 기대를 버리고, 두 번째 세부 조회 시점에 작업이 생긴 뒤 새 목록이 opencodex-proxy를 보고 owned → unknown, 목록 두 번을 기대하도록 다시 썼습니다. zh-CN + GBK not-found 바이트로 로케일 fallback 경로를 밟는 것도 버그 자리와 맞습니다. types.ts/config.ts 분할이나 프리뷰 배포와는 무관합니다. 이 시점 CI는 CodeRabbit pass, hygiene/label/resolve-pr는 아직 pending입니다.

라인 src/server/index.ts:556 근처 - 두 번째 inspectStartupOwnership에서 startupWindowsTaskListingCache 제거가 diff의 전부이고, 주석(#2923)도 “첫 판단 안에서만 성공 목록 유지”로 맞게 고쳤다. 범위가 아주 작다.
라인 tests/.../codex-service-manager-probe-hardening.test.ts:240-246 - targetedQueries === 2일 때 taskRegistered = true로 두고, /xml은 계속 not-found를 주는 모형이 캐시 버그(동일 세부 조회 바이트 → 옛 목록 재사용)를 정확히 겨냥한다. 실제 schtasks가 커밋 직후 /xml로 present를 주면 목록까지 안 가도 되지만, 이 PR이 고치는 실패 모드는 opaque not-found + 목록 쪽이다.
경로 src/service-manager-probe.ts createWindowsTaskListingCache - getOrRun의 “세부 조회 identity 같으면 목록 재사용” 규칙은 그대로다. 이번 PR은 그 규칙을 틀렸다고 지우는 게 아니라, 두 동기 판단 사이에 캐시를 넘기지 않게 수명을 줄인 것이다. 같은 파일의 단위 테스트 #2923 “cached-listing checks”와도 역할이 겹치지 않는다.
라인 src/server/index.ts:604-620 - 두 번째 판단이 unknown이 되면 native-main은 시작하지 않고 재질문 울타리로 간다. 기댓값이 ["owned","unknown"]인 이유가 여기와 맞는다. 영어 not-found만 나오는 호스트는 원래 목록을 거의 안 타서 이 레이스가 덜 보이지만, 비영어 fallback이 있는 호스트가 수리 대상이다.

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

  • 매 Windows 기동마다 전체 목록을 한 번 더 도는 비용을 항상 받아들일지, 아니면 “첫 목록 시각/세대” 같은 더 싼 무효화 신호를 나중에 넣을지(지금은 단순·안전 쪽이 맞음)
  • PR 본문대로 해당 hardening 테스트 + tsc --noEmit만으로 충분한지, 아니면 Windows exact-head 스위트 초록을 머지 게이트로 둘지
  • 캐시 모듈 주석에 “동기 startup 두 판단 사이에는 공유하지 않는다” 한 줄을 문서/주석에 더 남길지(코드만으로도 읽히지만 fix(windows): reuse unchanged startup task listing #2928 독자를 위해)

너의 추천

  • 머지 후보로 둔다. 실패 방향(잘못된 owned)을 막는 좁은 수리 + 회귀가 같은 레이스를 직접 고정한다.
  • CI pending만 확인한 뒤 dev에 랜딩하면 된다. 리베이스·보류·중복 PR 닫을 거리 없음.
  • leftover 원본 PR 없음(직접 lidge-jun 브랜치).

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

@github-actions

github-actions Bot commented Sep 20, 2026 •

Copy link
Copy Markdown
Contributor

✅ READY

  • all PR quality gates passed; the review readiness checklist is complete.

Review readiness checklist

  • ✅ All CI tests are green on my local testing.
  • ✅ I pushed my PR to the latest dev commit.
  • ✅ I resolved all correct Codex and CodeRabbit findings.
  • ✅ My PR is ready for review.

✅ 4/4 boxes ticked.

This pull request is already Ready for Review.
The review-ready label marks this PR as ready; review automation runs independently.
Maintainers: @lidge-jun @Ingwannu

@github-actions
github-actions Bot marked this pull request as draft September 20, 2026 09:31
@luvs01
luvs01 force-pushed the fix/startup-task-listing-refresh branch from d5b6821 to 9705b1d Compare September 21, 2026 13:48
@luvs01
luvs01 marked this pull request as ready for review September 21, 2026 23:50
@luvs01

luvs01 commented Sep 22, 2026

Copy link
Copy Markdown
Collaborator Author

Consolidated into #5512 in native Stack #5514.

Source head: 9705b1d03d224495b56fc01cb72c8d5362698125. Replacement head: 7b619b0dd12ee36659c4579eb9bc8b2c5b1bfc36.

Superseded by #5512 at 7b619b0. All 1 unique non-merge contribution commit(s) from this PR head 9705b1d are carried with verified patch equivalence and cherry-pick provenance: 9705b1d -> 8a0361b. Subsequent code/test moves were checked and preserve the contribution. This closes a duplicate source in favor of the existing open stack; it does not claim the replacement has landed or passed release gates. Exact-head cross-platform checks and required independent review remain incomplete.

Closing this duplicate standalone review entry at the author's request after verifying migration. This is not a merge or release claim; remaining integration checks and reviews are tracked on the draft replacement. Original branches are retained.

@luvs01 luvs01 closed this Sep 22, 2026
lidge-jun added a commit that referenced this pull request Sep 23, 2026
)

* fix(service): combine startup ownership, token binding, and slot retention

Carries #5512 by @luvs01 (head a12b2ad), which
consolidates #5477, #5306 and #5357:

- bind the service API token to its owning state, canonicalize qualified-localhost
  binds, and carry WSL ownership state honestly (#5477);
- take a fresh task listing for the second startup ownership decision (#5306);
- retain workflow slots for streaming turns (#5357);
- own server-auth fixture lifetime and project a current-schema config for it.

Squashed from the PR's own diff (origin/dev...a12b2ad) onto current dev.

Co-authored-by: luvs01 <27862058+luvs01@users.noreply.github.com>

* fix(server): self-heal a replaced package tree via drain-and-restart

Carries #5513 by @luvs01 (head 4d168f1), which
consolidates #5393 and its scheduler follow-up: detect a replaced installed package
tree, degrade health honestly, and drive a timer-driven, retryable drain-and-restart
whose verify step is deferred past scheduler re-entry. The guard factory lives in
src/server/index/package-tree-guard.ts.

Squashed from the PR's own diff (a12b2ad...4d168f1) onto the #5512 carry.

Co-authored-by: luvs01 <27862058+luvs01@users.noreply.github.com>

* fix(security): combine install discovery, credential, and transport hardening

Carries #5515 by @luvs01 (head 843f299), which
consolidates #5359, #5285 and #5322:

- keep selected Codex installation discovery off network filesystems, probe
  oversized wrappers through a held-handle prefix read, and stop a PATH scan at a
  refused probe (#5359);
- exclude npm candidates inside the launch directory subtree (#5285);
- refuse plaintext remote hub origins, fail closed on POSIX chmod for credential
  files, and skip the frame-log write when descriptor hardening fails (#5322).

Squashed from the PR's own diff (origin/dev...843f299) onto the chain carry.
Integration: structure/runtime.md wording reflowed by two lines so the combined
service and security stacks stay within the 600-line structure budget.

Co-authored-by: luvs01 <27862058+luvs01@users.noreply.github.com>

* fix(security): combine management-auth and boundary hardening

Carries #5516 by @luvs01 (head 245d542), which
consolidates #5326, #5312, #5363 and #5317:

- harden pairing redemption, agent roster intake, and SOCKS5 decoding (#5326);
- guard gh resolution, anchor the grok managed-region fences to whole lines, and
  bound provider-controlled text (#5312);
- harden management-auth admission and provenance (#5363);
- bound the /healthz version before it reaches diagnostics (#5317).

Squashed from the PR's own diff (843f299...245d542) onto the #5515 carry.
Integration: both stacks rewrote the shared server-auth test fixtures. The carry
keeps the #5512 current-schema fixture projection and config helper (including
its 4 KiB boundary case) and adds this PR's Aside sync capability assertions.

Co-authored-by: luvs01 <27862058+luvs01@users.noreply.github.com>

* fix(security): combine adapter argv and upstream-body hardening

Carries #5517 by @luvs01 (head 260a87b), which
consolidates #5315 and #5336:

- stage Qoder and CodeBuddy system prompts in private files instead of
  child-process argv, with exclusive creation and owned cleanup (#5315);
- bound upstream error bodies and resolve account-scoped transports (Copilot,
  Devin) from the same OAuth snapshot as the bearer (#5336).

Squashed from the PR's own diff (245d542...260a87b) onto the #5516 carry.

Co-authored-by: luvs01 <27862058+luvs01@users.noreply.github.com>

* feat(codebuddy): integrate capture-only tools with private prompt staging

Carries #5582 by @luvs01 (head 3061ef9), which
integrates the capture-only CodeBuddy tool bridge from #5148 by @mdwsk88 with the
private prompt staging from #5517. Requests with a tool catalog advertise only the
allowed tools through an isolated MCP server that captures calls without executing
them; the client keeps approval, sandboxing and execution. Pre-init, undeclared,
excessive or incomplete calls are rejected, streamed malformed tool arguments are
suppressed, bridge staging failures return a fixed message, and an opt-in live
acceptance harness is included. Design context: #5146.

Squashed from the PR's own diff (260a87b...3061ef9) onto the #5517 carry.

Co-authored-by: mdwsk88 <924038395@qq.com>

* fix(client): bound total hub catalog response lifetime

Carries #5252 by @luvs01 (head 779ef91): give the
hub catalog body read an overall deadline (24x the inactivity window, capped at
120 s) on top of the inactivity window, and release refused, HTTP-error and 304
bodies without awaiting their cancellation.

Squashed from the PR's own diff (origin/dev...779ef91).

Co-authored-by: luvs01 <27862058+luvs01@users.noreply.github.com>

* fix(grok): reserve model aliases only when the written config stays valid

Reimplements #5281 by @luvs01. A user sub-table such as [model.ocx-mine.extra]
only creates an implicit parent, so it no longer forces the generated table to a
suffixed alias. The alias choice is now checked against the bytes actually
written: the unsuffixed alias is used only when the final config (after
model-reference rewriting) parses; otherwise the conservative choice that also
reserves deeper headers is used, and a valid user file for which neither choice
parses is refused without writing. Malformed user TOML keeps the previous
conservative reservation.

The original change reserved only exact two-segment headers, which could emit a
duplicate [model.x] table when the user defines model.x through dotted keys.

Co-authored-by: luvs01 <27862058+luvs01@users.noreply.github.com>

* fix(codex-auth): scope Codex OAuth cancellation to the originating flow

Reimplements #4923 by @luvs01 on the current login-state layout (in-flight
controllers moved to src/oauth/login-flow-state.ts in #5220). Cancelling a Codex
login was keyed only by provider, so a stale modal posting an old flowId could
abort a newer attempt, and a cancel without a flowId expired every pending flow.

- Each in-flight controller records the flowId that started it; a cancel whose
  flowId does not match the active attempt is refused before anything aborts.
- POST /api/codex-auth/login/cancel requires a non-empty flowId, rejects unknown
  or non-pending flows with 400 without touching any row, and expires only that
  flow. Provider-wide cancellation through /api/oauth/login/cancel is unchanged.
- ocx account cancel requires --flow for Codex providers and sends no request
  without it.

The dashboard's 409 recovery keeps its code; its ownerless cancel is now refused,
so it ends in the existing "already in progress" message instead of superseding a
flow it does not own.

Co-authored-by: luvs01 <27862058+luvs01@users.noreply.github.com>

* fix(socks5): bound compressed event streams by expansion, not total size

Review follow-up to the #5516 carry. The 32 MiB decoded-body cap applied to every
gzip/deflate response, so a long, normally compressed SSE stream through the
SOCKS5 tunnel was cut once its cumulative output crossed the cap. Buffered
responses keep the absolute cap; event streams may continue while decoded bytes
stay within the greater of 32 MiB or 128x the coded bytes consumed, which still
stops high-ratio bombs.

Co-authored-by: luvs01 <27862058+luvs01@users.noreply.github.com>

* fix(codex): keep scanning PATH past a missing Windows candidate

Review follow-up to the #5515 carry. The held-handle reader reported a missing
file or directory as open-refused, so the default existence probe stopped the
PATH scan at the first absent PATHEXT candidate (for example codex.com) before it
reached an installed codex.cmd. NtCreateFile's object-name-not-found and
object-path-not-found statuses now map to a distinct not-found result that lets
the scan continue; every other failure still refuses.

Co-authored-by: luvs01 <27862058+luvs01@users.noreply.github.com>

* fix(server): require Windows ACL hardening before a frame-log append

Review follow-up to the #5515 carry. On Windows the frame log ignored a failed
permission change and appended anyway. Each append now hardens the target with
the required Windows ACL helper and checks that the path still names the opened
file before writing; any failure writes nothing.

Co-authored-by: luvs01 <27862058+luvs01@users.noreply.github.com>

* fix(devin): bind catalog authority to the tenant destination

Review follow-up to the #5517 carry.

- The observe-only OAuth snapshot applied the Copilot-validated apiBaseUrl to
  every provider, so a crafted Devin credential could carry a Copilot host that
  the snapshot claimed as its own. The overlay now applies only to github-copilot.
- Devin's live roster, stale fallback and cooldown were keyed by the token alone
  while discovery also depends on the validated tenant URL. The catalog authority
  and the matching routing-cache resolver now fingerprint the token together with
  the validated destination URL.

Co-authored-by: luvs01 <27862058+luvs01@users.noreply.github.com>

* fix(codebuddy): fail closed on unverified bridge turns and staging collisions

Review follow-up to the #5582 carry.

- With the capture-only tool bridge armed, a successful terminal event is no
  longer accepted unless the CLI's system/init frame confirmed the bridge server;
  a turn that ends without it fails with tool_bridge_init_missing.
- A tool_use block that arrives only in the complete assistant message, without
  the partial tool events the bridge captures, now fails the turn instead of
  being dropped silently; partial captures are deduplicated by id.
- The catalog and MCP config staging files are created exclusively (wx, 0600),
  like the prompt file, so a pre-existing file fails before spawn.
- The history-argument repair for a missing JSON object prefix is documented and
  tested as a provider-agnostic contract; other malformed strings keep {}.

Co-authored-by: luvs01 <27862058+luvs01@users.noreply.github.com>
Co-authored-by: mdwsk88 <924038395@qq.com>

* fix(service): keep service-command ownership bound to the recorded home

Review follow-up to the #5512 carry. On WSL with CODEX_HOME unset, the carried
allowance treated a legacy Linux ~/.codex install record as owned when discovery
now selects the Windows profile, so service stop could stop the Linux-home
service and then restore native Codex in the Windows home, and repair could
rewrite the recorded home. Service commands again require the exact recorded
home and name it in the refusal; the unattended startup inspector reaches the
same foreign verdict.

Co-authored-by: luvs01 <27862058+luvs01@users.noreply.github.com>

* fix(server): veto a package-tree restart when its server stops or loses ownership

Review follow-up to the #5513 carry.

- A package-tree restart accepted by the guard stayed scheduled after an explicit
  server.stop(), so the drain-and-respawn could reopen a server the caller had
  stopped. The caller that accepted a pending restart now receives a veto, and
  the guard uses it on dispose.
- When running as a supervised service child, the automatic path checks service
  home ownership when accepting and again before the handoff; a mismatch keeps
  the 503 fence and skips the restart.

Co-authored-by: luvs01 <27862058+luvs01@users.noreply.github.com>

* fix(security): resolve gh from fixed paths and look up pairing grants by digest

Review follow-ups to the #5516 carry.

- On Windows the automatically polled star-status route derived gh.exe roots from
  ProgramFiles and LOCALAPPDATA, so a process environment could select any
  absolute directory. Windows candidates are now the fixed system install paths,
  and the child PATH is only the resolved executable's directory. Other installs
  report gh as unavailable, which only hides the sidebar star state.
- Pairing redemption looked each guess up by scanning every live grant; the map
  is keyed by the grant digest, so the lookup is now a direct get. A valid grant
  still redeems behind a throttled source.

Co-authored-by: luvs01 <27862058+luvs01@users.noreply.github.com>

* test(server): cover the one-shot Aside sync capability end to end

Review follow-up to the #5516 carry, which added a one-shot, HMAC-bound
capability for the default ocx sync path without exercising it. A real listener
now proves single use, refusal on replay, wrong path, query, method, pid or port,
expiry and a bad MAC, and that the CLI default path performs the attestation and
a bodyless POST (through a narrow transport seam).

Co-authored-by: luvs01 <27862058+luvs01@users.noreply.github.com>

* test: register the review follow-up test files in the layout maps

Adds the three new test files from the L4 review follow-ups to both
scripts/test-layout/layout.json and tests/fixtures/test-layout-expected.json.

* test(grok): pin re-injection and strip for a nested user model table

Review follow-up to the #5281 reimplementation: two injections are byte
identical, every intermediate file parses, and strip restores the exact user
content.

Co-authored-by: luvs01 <27862058+luvs01@users.noreply.github.com>

* fix(server): harden a Windows frame log once per file identity

Re-review follow-up: requiring Windows ACL hardening on every append spawned
icacls for every relayed frame and could stall the realtime relay. The hardened
file identity (device and inode) is now remembered for the log path; an
unchanged file skips the respawn, and a replaced file at the same path is
hardened again before any write.

Co-authored-by: luvs01 <27862058+luvs01@users.noreply.github.com>

* docs(structure): describe the package-tree restart veto and ownership recheck

Co-authored-by: luvs01 <27862058+luvs01@users.noreply.github.com>

* fix(server): stop an automatic restart from handing off after an explicit shutdown

Security review follow-up to the #5513 carry. Once an automatic package-tree
restart entered its drain, an operator shutdown (signal or management stop)
could still be followed by the restart handoff, because the drain cannot tell
its own listener stop from an independent one. Explicit shutdown paths now mark
the process, and an admission-bound restart checks that mark before every
handoff step. Manually requested restarts keep their behavior.

Co-authored-by: luvs01 <27862058+luvs01@users.noreply.github.com>

* fix(server): mark a management stop before its asynchronous teardown

Security re-review follow-up: the management stop route marked the explicit
shutdown only after awaiting the shared teardown, so an automatic restart
draining concurrently could reach its handoff in that window. The mark now
precedes the first await after the stop is accepted.

Co-authored-by: luvs01 <27862058+luvs01@users.noreply.github.com>

* test(server): allow post-lookup pruning in the pairing digest regression

The digest-lookup regression trapped every iteration of the grant map, so a
valid redemption failed once session minting pruned expired grants after the
lookup (hosted CI test 4/4). The trap now fails only on a scan that precedes the
digest lookup, which is the regression it guards.

Co-authored-by: luvs01 <27862058+luvs01@users.noreply.github.com>

* fix: repair standalone bridge and restart ownership

Use the compiled CLI as the capture-only MCP entrypoint, release automatic restart fences on veto, align Devin discovery, and tighten Windows and local transport handling. Apply the documented Qoder prompt environment for both regions and update focused regressions and operator docs.

Co-authored-by: luvs01 <27862058+luvs01@users.noreply.github.com>

Co-authored-by: mdwsk88 <924038395@qq.com>

---------

Co-authored-by: luvs01 <27862058+luvs01@users.noreply.github.com>
Co-authored-by: mdwsk88 <924038395@qq.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants