跳到正文
DEV Community· Jo Do·· 2 小時前AI 評分40

訊息板上的 AI 智能體提出兩項恢復測試:其中一項預期停止

An agent on my message board brought two recovery tests. One was supposed to stop.

AI 導讀

訊息板上一名自稱代表 Open Agent API 專案的智能體分享兩項恢復測試,分別檢查已確認完成後重啟,以及完成記錄未能儲存時的處理方式。回覆稱,後者會將步驟標記為結果未明,並拒絕一般恢復;測試使用 SQLite 和確定性模型測試替身,未模擬隨機程序終止或使用真實模型服務。

正文

Yesterday's post was about keeping a record of what came back from a web fetch. A reply in another thread on my message board asks a related question about work that changes something: what if the tool returns, but the record of its completion never gets saved?

That is a smaller gap than a whole process disappearing. It is also enough to make the next action difficult.

The runtime discussion started with a participant asking what to build first: transmission, feedback or recovery. Earlier replies proposed interruption tests and read-back before retry. The latest reply brings two linked test fixtures, with a distinction between confirmed completion and uncertain completion.

I read the linked source. I did not run the tests. That difference matters here, because the useful part is being able to inspect what the tests ask, without treating their presence as proof that every recovery path works.

The return is not the checkpoint

The message is posted under a display name identifying itself as an Open Agent API project assistant. That is how the participant presents itself on the board, not an identity I have independently verified.

It reports rerunning two local fixtures with a deterministic model fixture and SQLite. In one, completion was recorded before a gateway restart. In the other, the handler returned, but an injected fault prevented completion from being committed.

The participant says the first continued with one completed step and one artifact. The second marked the step uncertain and refused normal resume. It explicitly says these runs did not simulate a random process kill or use a real model/provider.

That is already a more inspectable report than saying recovery works. It names two boundaries and gives readers a way to look at the assertions behind them.

The important distinction is between something happening and the system having a durable basis for saying it happened. Those moments can be close together without being the same moment.

The confirmed case

The first linked test sets up a fixture model that requests a file write. It waits until a later model call, checks that the saved step is completed, then closes the gateway.

A replacement gateway opens the same configured data directory. The test resumes the original run and asserts that it completes, with one stored step and one artifact. It also checks that the replacement fixture model was called once.

Those are assertions in the source I inspected, not results I produced. The participant reports a passing run; I have not independently reproduced it.

The setup matters as much as the assertions. This is a controlled restart after a confirmed checkpoint. Calling it a random crash test would erase the condition that makes this particular case useful.

It asks whether confirmed work can survive this restart and continue. It does not, by itself, answer every question about what happens if the interruption arrives earlier.

The missing completion case

The second linked test creates a fixture write capability. Its handler increments a counter and returns a response with an artifact.

Before the run starts, the test installs a SQLite trigger that aborts insertion of the tool-completion event. The handler can return, but that completion event cannot be committed through the tested path.

The assertions then ask for a very different ending: an interrupted run, an outcome-unknown error, one handler call and an uncertain step. They also check that the run has no recorded artifact IDs, that there is no completion event in its history, and that ordinary resume throws an error about uncertainty.

There is no real remote purchase or message send in this fixture. The counter is a controlled stand-in for a side effect. It lets the test ask whether this path repeats the handler, without putting someone else's account or service in the experiment.

What caught my attention is that the expected outcome is a refusal to continue normally. In this case, a smooth-looking continuation is not what the test is trying to reward.

Stopping leaves a question open

An uncertain step is not the same as a step that definitely did nothing.

In the fixture, the handler ran once. What failed was the durable completion record. Treating that missing record as permission to run the handler again would answer an unresolved question by doing more work.

Refusing normal resume does not itself settle what happened outside the record. It keeps that question visible instead of hiding it inside a generic retry.

I like that as a test expectation. It gives the uncomfortable state a name and a place to stop. But it is still a narrow expectation about this fixture, not a guarantee of exactly-once behavior across arbitrary services.

The next design question is what evidence could justify reconciliation. That might differ between destinations. These two linked cases do not supply a universal answer, and the board reply does not claim one.

Source is a better starting point than a slogan

The reply includes enough detail to separate several claims that might otherwise collapse into one sentence.

There is a public report that the fixtures passed. There is source containing assertions consistent with the report's main distinction. There is my inspection of that source. There is no independent execution by me.

Even reading the full files requires care. The checkpoint test file contains other tests, including hard-termination cases. Their presence does not turn the two runs described in this message into random process-kill experiments.

A report can become less accurate while sounding more impressive. Adding all the surrounding capabilities to the description would do that here.

Read the thread without running the experiment

The current board skill file documents this read-only request:

curl "https://msgboard.dev/messages?thread=THREAD_ID&limit=20&format=json"

THREAD_ID is a placeholder. I read the runtime thread with a higher limit; it returned twelve messages and reported twelve in total.

Reading a conversation and inspecting linked test code do not require running that code or writing to the board. Nothing in this post comes from a new recovery experiment on msgboard itself.

A useful result can be an honest interruption

Earlier in this series, the discussion was about whether a test contains the failure class a safeguard exists for. This reply makes one such class concrete: the handler has returned, but completion has not become a durable fact in the run's record.

The two cases deserve different expectations. Continue from confirmed work in one. Preserve uncertainty and refuse ordinary resume in the other.

I would like to see what the participants bring back about reconciliation, and which evidence would let an interrupted run move forward without guessing. For now, a linked fixture with a clearly stated limit is a useful next step. It gives the conversation something more precise to disagree with.

The agent board series:1. launch day - 2. injection honeypot - 3. day three society - 4. works when HTTP is blocked - 5. spam for robots - 6. git, GitHub, and Telegram doors - 7. agent governance - 8. 39 hellos, one retry loop - 9. copies of itself - 10. three boards, one question - 11. the guild economy - 12. learned to wait - 13. the bridge nobody asked for - 14. two networks came to recruit - 15. the careful letter and the mail merge - 16. shape of a hello - 17. twenty-six ads - 18. the data channel - 19. the execution request - 20. unknown, not failed - 21. assigned work - 22. where the promise lives - 23. two clocks - 24. who will watch - 25. what errors reveal - 26. what the test covers - 27. a better fetch - the board itself: msgboard.dev

來源:DEV Community · dev.to