Skip to content

feature/Make-serve-refused-no-ps · L-260923-e82e4a - #42

Merged
lchoquel merged 4 commits into
devfrom
feature/Make-serve-refused-no-ps
Sep 25, 2026
Merged

lchoquel merged 4 commits into
devfrom
feature/Make-serve-refused-no-ps

Conversation

@lchoquel

@lchoquel lchoquel commented Sep 25, 2026 •

Copy link
Copy Markdown
Member

Where ps may not run, as in Codex's workspace-write sandbox on macOS, the web app template's make serve started a server it could not record and reported it as exited, and make stop took a running server for another process and dropped its record, so nothing could stop it. Both now refuse as refused: no-ps with the record kept, a running group lsof cannot see is refused the same way as no-lsof, and any server serve or stop meant to stop and could not is reported as failed: still-running with its record kept instead of as stopped. The lifecycle tests skip where ps may not run, so the template's make all passes in that sandbox.

Closes L-260923-e82e4a

🤖 Generated with Claude Code


Summary by cubic

Fixes make serve and make stop where ps may not run, as in Codex's workspace-write sandbox on macOS. Previously make serve started a server it couldn't record and reported it as exited, and make stop could take a running server for another process, drop its record, and leave it listening with no way to stop it. Both now refuse as refused: no-ps without signaling anything, keeping the record.

Bug Fixes

  • make serve checks it can read a start time before starting anything and refuses with refused: no-ps otherwise.
  • make stop refuses as no-ps or no-lsof while a recorded group still runs but can't be identified, keeping the record; a group that has ended is still cleared.
  • A server that couldn't be stopped, because the system refused the signal or it outlived SIGKILL, is reported failed: still-running with its record kept instead of stopped.
  • Lifecycle tests skip where ps may not run, so make all passes in that sandbox.

Closes L-260923-e82e4a

Written for commit d9647b9. Summary will update on new commits.

Review in cubic

lchoquel and others added 4 commits September 25, 2026 12:06
In a sandbox that refuses ps, as Codex's workspace-write sandbox does on
macOS, make serve started the server, could not read its start time and
reported it as a server that exited at once, and make stop took the running
server for another process, dropped its record and left it listening with no
make gesture able to find it.

Both now read serve's own start time before anything else and refuse as
`refused: no-ps`, keeping the record. A recorded group whose first process
still runs but whose start time cannot be read is refused the same way,
never taken for another process's. A stop the system refuses to signal is
reported as `failed: still-running` with the record kept, never as
`stopped`. The lifecycle tests are skipped where ps cannot run.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014vaarU7anrUwbR5tvoiGUe
make stop required ps before it looked at the recorded group, so where
ps may not run it refused even for a group that had already ended, and
the stale record stayed for every later make stop to refuse on. It now
asks for a start time only while the group's first process still runs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014vaarU7anrUwbR5tvoiGUe
When make serve gave up on a server it had just started, it ignored how
stopping the group ended, removed the record and said the server was
stopped, even when the group outlived SIGKILL or the signal was refused.
It now removes the record only once the group has ended, and otherwise
says failed: still-running, naming the group for a person to stop when
the start failed before it could be recorded.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014vaarU7anrUwbR5tvoiGUe
ownership took a recorded group that still runs, but none of whose
processes lsof reported, for one that had ended, and dropped its record.
It now tells the two apart with the group's liveness and refuses as
no-lsof, naming the group, when it runs unseen. The changelog entry is
split into one bullet per change.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@lchoquel

Copy link
Copy Markdown
Member Author

Reviewed locally with /rev at profile 3 (cubic, Codex and code-review), in three rounds that converged.

Round 1 fixed two defects:

  • make stop required ps before it saw that the recorded group had ended, so a stale record was never cleared where ps may not run (0af8708).
  • When make serve gave up on a start, it dropped the record and said the server had stopped, even when the group outlived the stop (641b6c5).

Round 2 fixed two more:

  • A running group none of whose processes lsof could see was taken for one that had ended, and its record dropped. It is now refused as no-lsof (d9647b9).
  • The changelog entry is split into one bullet per change (d9647b9).

cubic's claim that lsof cannot see outside processes in Codex's sandbox did not reproduce: under codex sandbox -c sandbox_mode=workspace-write it read an outside process's working directory. The fix does not depend on it either way.

Round 3 was clean at its bar. Its three findings were deferred to the ledger: one helper for the stop-then-forget sequence, keeping the give-up reason in a still-running verdict, and making that verdict the last line after an unexpected error.

@lchoquel
lchoquel merged commit a2dbc7c into dev Sep 25, 2026
3 checks passed
@lchoquel
lchoquel deleted the feature/Make-serve-refused-no-ps branch September 25, 2026 10:42
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.

1 participant