Repository navigation
feat(runtime): opt-in authoritative Hermes terminal turn probe - #178
chriscoveries wants to merge 7 commits into
Conversation
|
CI note: on current |
|
Thank you for the substantial investigation and validation here! The ownership checks, default-off behavior, and separation from terminal-output heuristics are thoughtful. After reviewing the integration cost, we’ve decided not to take this adapter forward. It depends on Hermes database schema and holder-format details, together with Linux process inspection. The schema-31 restriction versus schema 32 in Hermes v0.22.4 already illustrates the ongoing compatibility burden. We’re also not comfortable treating lease expiry alone as authoritative evidence that a turn has finished settling. This is an integration-boundary decision, rather than a request for more tests or version guards. I don’t want to ask you to keep expanding a compatibility layer that we’re unlikely to maintain. I’d prefer to close this PR for now and revisit the goal if a supported status interface becomes available. For native terminals, we’ll keep output observations separate from authoritative turn state. Thank you again for exploring this carefully. |
|
Understood. We'll close this PR for now. Maintaining Hermes's database schema and holder format would make CCCC responsible for an unsupported integration, and lease expiry is not a reliable settlement signal. Native-terminal output observations should remain separate from authoritative turn state. We can revisit this if Hermes exposes a supported status interface. Thank you for the review. |
Native terminal actors currently report
waiting/pty_running_state_unknowneven during an active turn. Add a per-actorturn_probesetting (offby default,auto, orhermes_turn_lease) so supported Hermes CLI actors can expose provider-backed working and idle observations through the existingeffective_working_*fields. Settings take effect on the next actor start; managed sessions retain precedence.The Linux adapter reads only Hermes schema-31 lease and session metadata, using a read-only database connection and bounded queries. An active lease must belong to the actor's process tree, PID namespace and current process generation. Idle requires a previously observed owned lease, the same still-live holder, an open bound session and no active owned lease. Missing, unsupported or ambiguous metadata remains Unknown and preserves today's behavior. Terminal output and quiet time never establish turn state. The runtime remains a terminal actor; this change does not add dispatch policy or another runtime adapter.
Verification used GitHub Actions on the fork and an isolated stage:
d3cb0464c5e2c564a028aa1e9afff2467b62457a: 2,732 Rust tests passed, 58 skipped. Tests use captured metadata-only Hermes state and cover ownership, generation, fallback, profile and managed-session precedence controls. The branch includes the real-Chrome filter prerequisite from test(ci): route current ChatGPT browser fixtures to nightly #175.waitinginstead ofworking. This control retains the new capture/test harness but uses the unchanged upstream production working-state projection.d1c395ec8e6a5d386138aa9436ef5ae09afd1fdd09307d2fb3fef80ad9fec301.7c121fd990b8f636e2e847ba47446bd13466290ba6623e1777e50daa08f04a9b), and actor.activity records corroborated the transitions. Earlier incomplete setup/provider attempts remain recorded as failures. No provider message bodies or credentials were included. The previous stage binary and actor roster were restored afterward.