Skip to content

test(login): publish fixture state atomically - #651

Merged
stamp-build[bot] merged 1 commit into
mainfrom
agent/otter/login-fixture-state
Nov 6, 2026
Merged

stamp-build[bot] merged 1 commit into
mainfrom
agent/otter/login-fixture-state

Conversation

@stamp-build

@stamp-build stamp-build Bot commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

Otter from open-agent-runtime opened this pull request through Stamp
View in Stamp →


A cancelled fake login process can leave its shared JSON state empty or truncated because it rewrites that file in place. The five login fixtures now write a sibling temporary file and replace the published state only after the write completes. A killed writer leaves the previous complete snapshot available to the strict reader; write errors still fail and the existing fixture-directory cleanup removes abandoned temporary files.

The regression starts each fake CLI, pauses its first save after truncation or a partial write, then kills that process and checks the entire previous snapshot. All ten cases fail against the old writers and pass with this change. Existing login/logout deadlines, PID requirements and process-liveness assertions are unchanged, including refusal to treat an unpublished PID as cleanup evidence.

This was investigated after PR #650's Windows check failed with Unexpected end of JSON input in the Claude deadline case. The fixture was unchanged from main. That run did not retain the interrupted file or a write checkpoint, so the precise cause of that CI occurrence remains unconfirmed; this PR fixes a separately reproduced fixture defect and changes no product code.

Validation:

  • Ten deterministic interruption regressions: fail before the fix, pass after it.
  • Login, logout and CLI login suite: 143 passed on Linux.
  • Full CI=1 pnpm run check: passed (3,569 unit tests and 18 mock behavior cases).
  • Windows and macOS verification will come from this PR's CI.

@stamp-build
stamp-build Bot merged commit 9bfdaca into main Nov 6, 2026
40 checks passed
@stamp-build
stamp-build Bot deleted the agent/otter/login-fixture-state branch November 6, 2026 04:48
@stamp-build stamp-build Bot mentioned this pull request Nov 6, 2026
stamp-build Bot added a commit that referenced this pull request Nov 6, 2026
<!-- 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> from open-agent-runtime opened this pull request through Stamp</sup><br><sup><a href="https://stamp.build/review?receipt=prc_038a3f19ff5c2d6bb704961ba32d1148"><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 in Stamp →</a></sup>

---
<!-- /stamp:review:v1 -->

DSH sessions can attach stdio MCP servers, and commands an ACP agent runs through OAR now take that agent's OOM score.

## DSH: session MCP servers (#650, fixes #646)
- `SessionOptions.mcpServers` now accepts stdio `command` and `args` on DSH, through native MCP client plugins in OAR's private invocation patch. The model sees and calls the tools, and resume needs the entries supplied again.
- A server that fails to start refuses the open, where DSH's own loader would otherwise continue without it. A native namespace collision also refuses, and the user's configuration is not changed.
- HTTP entries and non-empty `env` or `headers` stay refused. **Do not move tokens into `args`:** persistence of command and args has not been audited either.
- Verified on Linux with DSH 0.2.1-rc.5 and 0.2.2-rc.1 and a local provider, and by CI on macOS and Windows with the pinned 0.2.1-rc.5. No real account was used.

## ACP terminals take the agent's OOM score (#652)
- A host that wraps a runtime's command to raise its OOM score now gets that score on reverse terminal commands too. These are started by OAR, so they used to keep the host's score, and a runaway command under a protected host stayed protected.
- Linux only, with no option. OAR changes the launch only when the agent's score differs from its own. With equal scores, or if either score cannot be read, the command starts as before. If the kernel refuses the write, the command keeps the host's inherited score.
- Real Grok 1.0.70, Kimi 2.4.1 and CodeBuddy 2.179.3 sent reverse terminal requests and now run them at the agent's score. OpenCode 1.19.5 and Antigravity CLI 1.5.0 ran the probe's command in their own processes. This covers the measured command paths, not every tool a runtime has.

## Tests
- The fake login CLIs now publish their state atomically, so a killed writer cannot leave half a file (#651).

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Cindy <[email protected]>
stamp-build Bot added a commit that referenced this pull request Nov 6, 2026
<!-- stamp:review:v1 -->
<sup><img
src="https://cdn.slock.ai/avatars/6aabf32c-20bc-4cba-b55a-2aa72b60999b/8ba4452ceb890f1930886ef4286fdb99.webp"
width="16" height="16" align="absmiddle" alt=""> <b>Otter</b> from
open-agent-runtime opened this pull request through
Stamp</sup><br><sup><a
href="https://stamp.build/review?receipt=prc_c186a4a0f2e878a4a126931ff5684e1f"><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 in Stamp
→</a></sup>

---
<!-- /stamp:review:v1 -->

The Windows check on main `2ca01bf7` failed while waiting for the Kimi
login fixture to record `login` and `acp`, before the test could cancel
confirmation. Its failure only reported an undefined call list, so
neither the fixture stderr and exit code nor the settled login result
survived in the log. The same assertion failed in PR #664 and then
passed a single rerun.

Include the fake login process output, exit or launch error, ACP process
diagnostics and current login result in the existing assertion's failure
message. Scope observation to the one fake executable, forward the
original handlers, and leave real authentication output private. Always
abort and settle the test's login before fixture cleanup, including when
the wait fails. Keep the test in its original position, its exact call
and process-liveness assertions and its 10-second wait.

Three regressions cover failure before the first call record, successful
login and ACP confirmation, and exclusion of another executable. All 137
login tests pass locally. Full repository check also passes on Linux:
3,623 tests, typecheck, lint and 18 mock behavior cases.

This is evidence collection, not a claimed fix for the Windows failure.
A rename conflict from #651 remains a hypothesis until a failing process
reports it; no rename retries, deadlines, product code or CI gates
change. Task #195. Failure:
https://github.com/botiverse/oar/actions/runs/42210871353/job/127868894854.

Co-authored-by: Otter <[email protected]>
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.

0 participants