observe.v1: observe, inventory, kill-object, fresh_only starts #39

Merged
mikluko merged 1 commit from server-observe into main 2026-11-16 06:19:32 +00:00
Owner

The third part of spec-bb1.24: observe.v1, with which gc's own conformance suite passes. Run with gc built from 76a06b2 (the pin) against the command and a server on real listeners: gc runtime check 21 of 21; gc runtime conformance 40 passed, 0 failed, 27 skipped (the capabilities not declared: fs.host, input-outcome, server-lifecycle, conformance-faults, city-scoped), and v2-ready: yes.

  • observe, inventory and kill-object. A session's box is its Job: object.id is the Job's UID and created its creation time; kill-object deletes by that UID (read first, then deleted with the UID as precondition). A service run by the server is a box with p<pid>. absent only when no Job and no process holds the name; a Job whose pod has ended is dead. inventory is one list of the Jobs, one of the registry, no round trip for a box. Identity is the marks gc started the session with, seeded before the Job exists.
  • fresh_only: a start over a name any box holds, live or dead, is exit 73, and nothing is touched.
  • peek of a name no box holds is exit 66 (a stopped session's Job is gone).
  • Start, stop, observe and kill-object of one name are serialized.
  • The agent verdict, which gc acts on: dead only where the server can tell. For a service, from the process table with gc's rules (base name of the command or of the first argument; an interpreter's script); for an agent in a pod, when gc asks about no process the staged command runs (Claude Code answers to claude, node and bun). A zombie kill re-checks the same and answers changed otherwise. This is the one judgement call: a pod's agent is not visible from the server, so a provider whose process names differ from its command's base name would be called dead and recycled; the host could report its agent's pid to make it exact.
  • From specs-58's note on #36: a start afresh and an end close the records of the owner's waiting prompts with Dropped. Two tests of roomcity-ee's (session and transcripts) expected the old stream and now see the extra record.
  • The ps-based test is skipped where the process table cannot be read (this sandbox); the Linux CI reads it.

Assisted-By: Claude noreply@anthropic.com

The third part of spec-bb1.24: observe.v1, with which gc's own conformance suite passes. Run with gc built from 76a06b2 (the pin) against the command and a server on real listeners: `gc runtime check` 21 of 21; `gc runtime conformance` 40 passed, 0 failed, 27 skipped (the capabilities not declared: fs.host, input-outcome, server-lifecycle, conformance-faults, city-scoped), and `v2-ready: yes`. - `observe`, `inventory` and `kill-object`. A session's box is its Job: `object.id` is the Job's UID and `created` its creation time; `kill-object` deletes by that UID (read first, then deleted with the UID as precondition). A service run by the server is a box with `p<pid>`. `absent` only when no Job and no process holds the name; a Job whose pod has ended is `dead`. `inventory` is one list of the Jobs, one of the registry, no round trip for a box. Identity is the marks gc started the session with, seeded before the Job exists. - `fresh_only`: a start over a name any box holds, live or dead, is exit 73, and nothing is touched. - `peek` of a name no box holds is exit 66 (a stopped session's Job is gone). - Start, stop, observe and kill-object of one name are serialized. - The agent verdict, which gc acts on: `dead` only where the server can tell. For a service, from the process table with gc's rules (base name of the command or of the first argument; an interpreter's script); for an agent in a pod, when gc asks about no process the staged command runs (Claude Code answers to `claude`, `node` and `bun`). A zombie kill re-checks the same and answers `changed` otherwise. This is the one judgement call: a pod's agent is not visible from the server, so a provider whose process names differ from its command's base name would be called dead and recycled; the host could report its agent's pid to make it exact. - From specs-58's note on #36: a start afresh and an end close the records of the owner's waiting prompts with `Dropped`. Two tests of roomcity-ee's (`session` and `transcripts`) expected the old stream and now see the extra record. - The ps-based test is skipped where the process table cannot be read (this sandbox); the Linux CI reads it. Assisted-By: Claude <noreply@anthropic.com>
Declare observe.v1: observe, inventory, kill-object and fresh_only starts
Some checks failed
test / changelog (pull_request) Failing after 6s
image / image (pull_request) Successful in 15s
test / go (pull_request) Successful in 57s
26e273eaed
A session's box is its Job, named by the Job's UID and creation time; a
service run by the server is a box with its pid. observe answers running,
dead or absent with the box's object and the identity gc started it with,
inventory lists every box from one read of the cluster and one of the
registry, and kill-object re-checks and deletes the exact object, the
Job by its UID. A fresh_only start over a name any box holds, live or
dead, is refused with 73 and touches nothing. start, stop, observe and
kill-object of one name are serialized. peek answers 66 for a name no
box holds.

An agent is called dead only where the server can tell: for a service from
the process table, as gc's own table reads it; for an agent in a pod when
gc asks about no process the staged command runs.

The records of the owner's prompts that waited are closed with Dropped
also when a session is started afresh or ends.

gc's runtime check passes 21 of 21 and runtime conformance 40 required
requirements of 40, with the runtime v2-ready.

Assisted-By: Claude <noreply@anthropic.com>
mikluko force-pushed server-observe from 26e273eaed
Some checks failed
test / changelog (pull_request) Failing after 6s
image / image (pull_request) Successful in 15s
test / go (pull_request) Successful in 57s
to 57acaf4f7d
All checks were successful
test / changelog (pull_request) Successful in 5s
image / image (pull_request) Successful in 16s
test / go (pull_request) Successful in 1m8s
2026-11-16 06:15:58 +00:00
Compare
mikluko deleted branch server-observe 2026-11-16 06:19:32 +00:00
Commenting is not possible because the repository is archived.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
mikluko/roomcity!39
No description provided.