Reset per-service runtime state in svc.sh env_config #457

Merged
weichen merged 9 commits from feature/svc-pidcheck-leak into main 2026-10-12 09:39:31 +00:00
9 Commits
Author SHA1 Message Date
weichenandCursor 20a4733152 Treat zombie PIDs as dead in batch update regression
ci / test-pg (pull_request) Successful in 1m43s
ci / test (pull_request) Successful in 3m29s
Why: CI containers leave unreaped zombies; os.kill(0) still succeeds
and falsely failed the old-process-stopped assertion.

Evidence: local unittest of the batch update case.

Impact: assertion matches svc.sh/recover zombie semantics.

Refs: .task/feature-svc-pidcheck-leak.md; PR #457
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-12 09:35:27 +00:00
weichen f699b7851c Record the sync checkpoint
Why: bind the task validation checkpoint to the latest integration baseline.

Evidence: SELF recursive component checks; sync_base=2723e452440fc11022c0f6d916cd34cc4cd17335; candidate=c7364ed97152d3107f585215468c1a70aa340918.

Impact: task metadata only.

Refs: .task/feature-svc-pidcheck-leak.md
2026-10-12 09:33:19 +00:00
weichenandCursor c7364ed971 Skip reclaim attribution tests when ss cannot report PIDs
ci / test-pg (pull_request) Successful in 1m38s
ci / test (pull_request) Failing after 1m45s
Why: CI runners without ss -ltnp pid= attribution fail #456 reclaim
tests with "未能识别占用者", blocking unrelated merges.

Evidence: local unittest of reclaim + foreign-port + batch update cases.

Impact: reclaim tests skip without ss; foreign-port accepts either
attribution or unattributable refusal. Batch pidcheck fix unchanged.

Refs: .task/feature-svc-pidcheck-leak.md; PR #457
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-12 09:32:50 +00:00
weichenandCursor 7f120d8c32 Record PR #457 link on task card
ci / test-pg (pull_request) Successful in 1m39s
ci / test (pull_request) Failing after 1m43s
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-12 09:29:32 +00:00
weichen dc9ff87844 Record the sync checkpoint
ci / test-pg (pull_request) Successful in 1m37s
ci / test (pull_request) Failing after 1m44s
Why: bind the task validation checkpoint to the latest integration baseline.

Evidence: SELF recursive component checks; sync_base=2723e452440fc11022c0f6d916cd34cc4cd17335; candidate=83c4ee2430b841e537178f2cbdfe0b0ec9462730.

Impact: task metadata only.

Refs: .task/feature-svc-pidcheck-leak.md
2026-10-12 09:28:24 +00:00
weichenandCursor 83c4ee2430 Record governance evidence for svc-pidcheck-leak
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-12 09:26:24 +00:00
weichen 3dfd73343c Record the sync checkpoint
Why: bind the task validation checkpoint to the latest integration baseline.

Evidence: SELF recursive component checks; sync_base=2723e452440fc11022c0f6d916cd34cc4cd17335; candidate=442251c35ea169633cc03d88d3426083d5e80fef.

Impact: task metadata only.

Refs: .task/feature-svc-pidcheck-leak.md
2026-10-12 09:26:08 +00:00
weichenandCursor 442251c35e Reset per-service runtime state in svc.sh env_config
Why: Batch update --all left SVC_PIDCHECK from the prior service in
memory, so pid_alive/reclaim_own_port misclassified the next service's
process as dead/foreign, deleted svc.pid, and failed start on a still-
occupied port (genui/rdm1/rdmcand after successful dev).

Evidence: make test-governance (SELF; receipt /tmp/svc-pidcheck-gov.json);
new test_batch_update_stops_second_service_despite_prior_pidcheck +
SVC_PIDCHECK ratchet in test_svc_precheck.

Impact: env_config clears SVC_PIDCHECK/EXEC/VERSION/SOURCE per service;
batch update correctly stops and restarts each agent. After merge:
restore genui/rdm1/rdmcand and move rdmcand to its own data dir.

Refs: .task/feature-svc-pidcheck-leak.md; complements #456 reclaim_own_port
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-12 09:25:33 +00:00
weichen ab5f945c1c Record the task card for feature-svc-pidcheck-leak
Why: establish the authorized task workspace and its initial baseline.

Evidence: preserved precheck receipt in .task/feature-svc-pidcheck-leak.md; R0=2723e452440fc11022c0f6d916cd34cc4cd17335.

Impact: task metadata only; the feature workspace starts at 2723e45244.

Refs: .task/feature-svc-pidcheck-leak.md
2026-10-12 09:22:05 +00:00