فهرست منبع

docs: remove stale streamed-prefix rationale

Tianyi Cui 3 ماه پیش
والد
کامیت
a415d8fdb1
2فایلهای تغییر یافته به همراه3 افزوده شده و 4 حذف شده
  1. 1 1
      docs/rfc/implemented/testing/2026-06-11-property-based-testing.md
  2. 2 3
      packages/llm/llm/src/assembler.ts

+ 1 - 1
docs/rfc/implemented/testing/2026-06-11-property-based-testing.md

@@ -20,7 +20,7 @@ Adopt `fast-check` (a root devDependency) with one `tests/properties.spec.ts` pe
 ## Consequences
 
 - Generator quality is the value lever — the generators bias toward small index pools and short strings so collisions and interleavings are common.
-- **It already paid off:** the BlockAssembler stream found a real bug — a duplicate `block-end` at the same index overwrote an already-flushed block, so the streamed prefix disagreed with final `blocks()`. Fixed (first close wins, matching the existing straggler rule) with a dedicated regression test.
+- **It already paid off:** the BlockAssembler stream found a real bug — a duplicate `block-end` at the same index rewrote a completed block. Fixed (first close wins, matching the existing straggler rule) with a dedicated regression test.
 - A property flake from a timeout is a finding, not something to retry away. The loop properties are deterministic by construction (settle on `agent/status`), so a hang is a real defect.
 - Property tests supplement, not replace, the example tests that pin specific branches for the 100%-coverage gate.
 

+ 2 - 3
packages/llm/llm/src/assembler.ts

@@ -72,9 +72,8 @@ export class BlockAssembler {
       case 'block-end': {
         const partial = this.ensure(chunk.index, chunk.block.type)
         // First close wins: a second block-end for an already-closed index is
-        // a straggler (same rule as post-close deltas). Ignoring it keeps the
-        // streamed prefix and the final blocks() in agreement — otherwise a
-        // re-close could rewrite a block already flushed downstream.
+        // a straggler (same rule as post-close deltas). Ignoring it prevents a
+        // later chunk from rewriting a completed block.
         if (partial.block) return
         partial.block = chunk.block
         return