Repository navigation
test: wait for native process identities before timeout checks - #1150
Conversation
Co-authored-by: xxchan <[email protected]>
|
Reviewed One blocking issue before approval:
One small non-blocking hardening note while updating the PR:
|
Co-authored-by: xxchan <[email protected]>
|
The revised clock helper releases on every readiness exit. If a readiness read or assertion throws, it aborts the operation when an abort controller is available, joins the pending promise, and runs pending cleanup timers before propagating the original error. The pipe, query and Windows tests now place their pre-deadline assertions inside that guard. The native probe fixtures also terminate a child whose process identity they cannot publish. Two real-process regressions with a deliberately missing readiness file check both timeout and explicit cancellation. Each probe's child closes the output pipes and ignores SIGTERM. Joining the command alone left the child alive in both Linux controls. With the cleanup timer executed, both checks preserve ENOENT and verify that the real root and child have exited after restoring the real clock. The CI-script wrapper now removes mixed-case temporary-directory and npm-cache variables before setting its private values, including RUNNER_TEMP. At 79c13b1 the local full check passed type checking, lint, 5,598 unit tests and 19 mock behaviors. All 77 targeted tests and the three native Pi stalled-reader cases also passed.
|
|
Approved at Verified in this revision:
Ready to merge once all required CI checks on
|
|
Post-merge CI failed on Newly failing: Run. Logs: |
|
The Windows Pi RPC job timed out in both stalled-query cases. Adding a 65 ms synchronous process-identity lookup in a Linux control reproduced both exit-check failures. The fix drives the reader deadline after PID publication and the force-kill grace after the child observes stdin EOF. The revised tests passed the same control and all 25 Pi RPC vendor cases on Linux. Windows verification is tracked in PR #1152.
|
<!-- stamp:review:v1 --> <sup><img src="https://api.raft.build/api/avatars/pixel/bXVn.svg" width="16" height="16" align="absmiddle" alt=""> <b>Cindy</b> (open-agent-runtime) opened via Stamp · <a href="https://stamp.build/review?receipt=prc_5d3a397b07e608c8e27fe089d5ec351b"><picture><source media="(prefers-color-scheme: dark)" srcset="https://stamp.build/assets/brand/stamp-glyph-dark.d907ffcadb44.svg"><img src="https://stamp.build/assets/brand/stamp-glyph-light.58a2c10ed108.svg" width="13" height="12" align="absmiddle" alt=""></picture> View →</a></sup> --- <!-- /stamp:review:v1 --> ## OAR 0.130.0 ### Features - **Kimi capability-gated KAP session adapter with ACP fallback** (#1137, #1156, #1157). Adds the Kimi Agent Protocol (KAP) session adapter gated on server capabilities with automatic fallback to ACP on unpatched installations, clears pending steers on aborted turns with steer-gap abort support, and projects partial tool input text as deltas with complete input on item end. - **Subagent selected-model reporting** (#1148). Reports the model selected for subagent sessions. - **Antigravity local file skill discovery** (#1144, #1145). Reads skill files locally on Antigravity 1.5.14 and enables file skill discovery on 1.5.15. ### Fixes - **Pi RPC private-pipe startup config and MCP credential admission** (#1161). Delivers Pi RPC startup configuration once over the cross-platform private fd 3 pipe with no config file written to disk, and admits `mcpServerCredentials` on Pi RPC across all platforms. - **Claude Code private-file MCP credential handoff on non-FIFO platforms** (#1160). Delivers credentialed MCP config through an owner-only temporary file on platforms without FIFOs (including Windows), waits for Claude `initialize`, and unlinks the file before session open returns. - **ACP `session/load` 60-second default deadline and Grok open bounds** (#1159). Gives ACP `session/load` a 60-second default deadline, shares a single deadline across open and readiness checks, and sets Grok's default request timeout to 30 seconds. - **Grok `serveMcpTools` readiness wait** (#1128). Awaits `server_status` ready for every `serveMcpTools` server before completing startup. - **DSH cross-process startup serialization** (#1119). Serializes same-profile startup across processes. - **Factory tool projection, compaction context, and OAuth email** (#1133). Projects `script_only` tools, refreshes post-compact context, and surfaces OAuth email. - **Pi Durable tool input and CLI runtime dispatch alignment** (#1143). Aligns Pi Durable tool input handling and CLI runtime dispatch with contracts. ### Documentation, CI, and Tests - **Documentation alignment** (#1124, #1132, #1135, #1136, #1138, #1139, #1140, #1141, #1142). Aligns design docs, specs, runtime guides, package READMEs, and Kimi KAP wire and verification records with shipped contracts, and links `awesome-oar` in README. - **CI and test reliability** (#1122, #1127, #1129, #1131, #1146, #1147, #1149, #1150, #1152, #1158). Tightens native fixture cleanup, Windows case-insensitive `Path` handling in CI sharding, the Antigravity 1.5.14 ACP baseline, bounded fetch retries, and test timing stability. Full diff: v0.129.1...v0.130.0 Co-authored-by: Cindy <[email protected]>
The Windows failure on PR #1148 timed out the Antigravity plan query after 400 ms, before the ACP fixture wrote its process identity. In a controlled reproduction a 600 ms cold start caused the original test to fail reading acp.pid. The revised test passed the same delay, reached authenticate, observed the timeout and confirmed the recorded process exited.
The audit covered tests and sea-trial fixtures that read PID files, serialized process trees, or process identities from login state. Timeout cases now hold the caller's clock until the actual child or descendant has published its PID and start time, with an independent real-time readiness limit. The clock then runs the existing deadline and cleanup timers. This covers the account and login readers, Pi RPC readers, executable and pipe probes, process table command, installer and Windows auxiliary cleanup. The OpenCode late-listen test still measures the shared startup and HTTP budget. Process assertions continue to check the recorded identities.
The separate Windows shard-one failure returned a null exit status after 90 seconds. Its log ends after verifying the first 220-byte fixture download. It cannot identify the subsequent operation that stalled. The CI-script test now runs the Node suite in an owned process tree, isolates its temporary directory and npm cache, and includes the saved installer stage and subprocess diagnostics on failure. A Linux control that deliberately stalled npm reported the timeout and the npm-install stage. The original 90-second limit and the four real npm installation cases are retained.
The original failures are recorded on Windows shard one and shard two. Both shards passed on the same head when rerun. The cold-start regression and installer-stage control were repeated locally. All three native Pi stalled-reader cases passed on Linux.
The full check on the rebased head passed type checking, lint, 5,596 unit tests and 19 mock behavior cases.