LAB / 011

A1 / The chat-history commit boundary

How should committed history survive failures, truncation and candidate trimming?

Completed ·

EXPERIMENT RESULT

GitHub ↗

01 / QUESTION

How should committed history survive failures, truncation and candidate trimming?

METHOD

Java 8 candidate snapshots, whole-pair commits and a UTF-8 wire budget; explicit doubles inject timeout, 429, empty, truncated and malformed replies.

RESULT

41 offline assertions pass, 13 local transport-double invocations and zero network requests.

OBSERVATIONS

A failed candidate that needed trimming preserves original history; after success, evicted pairs do not reappear.

CONCLUSION

Replace history by complete turns only after output completeness checks.

LIMITATIONS

In-process state tests with injected faults; no claim about model memory or real network behavior. No persistence, concurrent service or automatic retry.

REPRODUCE

Compile with Maven and write a new --self-test report. The --live Agnes 3.0 adapter exists but was not exercised online.

KEEP EXPLORING

Related content

  1. Engineering cases

    Java LLM practice 3: don't let a failed request change conversation history

    Candidate snapshots, complete-pair commits and a UTF-8 request budget: 41 offline checks for history that survives failed requests.

    10 MINPublished
  2. Tutorials

    Calling an LLM with Java 8 — from one request to a conversation

    Three runnable Java demos explain HTTP requests, JSON parsing, timeouts and conversation history.

    15 MINPublished
  3. PROJECT / 002

    Java LLM Practice

    Five Java 8 demos plus a TypeScript boundary comparison: requests, validation, transactional history and traceable experiments.

    Building

← Back to index