You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maka.apache.org by "ggbdpq (via GitHub)" <gi...@apache.org> on 2026/10/10 10:23:11 UTC
[PR] docs: verify the compaction projection docs against main (#3522) [maka]
ggbdpq opened a new pull request, #6052:
URL: https://github.com/apache/maka/pull/6052
## Summary
Second verification pass over the Context-and-compaction slice of #3522: both `llm-compaction-events-log-projection-draft` documents (en + synced zh-CN), read line-by-line against current `main`. First pass was #4046; this one re-checks the chapter after the recent compaction-area changes (#5893, #5931, #5792, #5362, #5980).
**One drift fixed**: the prior-history path is `AiSdkTurn.buildPriorMessages()` (`packages/runtime/src/ai-sdk-turn.ts:2716`, class at `:613`) — not `AiSdkBackend.buildPriorMessages()`. The method moved out of the backend since the first pass; both language editions corrected.
**Everything else re-verified and holds:**
| Claim | Verified against |
| --- | --- |
| Code map: 14 source paths | all exist under `packages/runtime/src`, `packages/storage/src`, `packages/runtime-host/src/server` |
| Verification entry points: 10 test paths | all exist (incl. `sqlite-core-execution-store.test.ts` — the `agent-run-store.test.ts` citation flagged on the issue was already corrected in #4046) |
| `HistoryCompactCheckpoint` schema V2/V3, `openai_codex_remote_v2` variant | `history-compact-checkpoint.ts:122,129,139,220` |
| `matchHistoryCompactCheckpointPrefix()` | `history-compact-checkpoint.ts:569` |
| `history_compact_checkpoint_recorded` durable event | `agent-run.ts:814` |
| `RuntimeKernel.compactSession()`, `context_compaction_failed_open` | `runtime-kernel.ts:183` (+ `ai-sdk-turn.ts`) |
| 8,000-token compaction output cap | `DEFAULT_HISTORY_COMPACT_MAX_OUTPUT_TOKENS = 8_000` (`ai-sdk-compaction-contract.ts:41`) |
| Reply reserve `min(2 × last reply, 8,000)` | `replyReserveTokens()` / `MAX_REPLY_RESERVE_TOKENS = 8_000` (`ai-sdk-compaction.ts:1440`) |
| 16-entry malformed-input fingerprint circuit | `ai-sdk-compaction.ts:528` |
| Large-fold gate: >10,000 input tokens ⇒ ≥200 output tokens | `history-compact-summary-validation.ts:78-83` |
| 7,500-byte tool-result prune page; `toolResultPrune.enabled` | `read-page.ts:25`; `context-budget-policy.ts:51` |
| `maka://runtime/tool-results/<event-id>` address | `tool-result-archive-resource.ts:192` |
| Codex `compactionTrigger: true`, `openai.compaction` custom part | `openai-codex-history-compactor.ts:65,327` |
| `AiSdkBackend` → `AiSdkTurn` | **fixed** |
`last_verified` and the in-body currency date refresh to 2026-10-10 in both language editions.
## Verification
- Every path/symbol in the table resolved on this branch (`grep` against source, not dist).
- `npm run check:asf-headers`: green.
- Documentation-only change (two class-name corrections, date refreshes); no test suites affected.
## AI use
Generated with an AI coding assistant (ZCode / GLM-5.3-Flash) under human direction; every table row was checked against the repository by the assistant and verified by me.
## Checklist
- [x] One subsystem only (Context and compaction), per the issue's contributing rules
- [x] Paired translations move together (`translation_status: synced` preserved)
- [x] `Refs #3522`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org
For additional commands, e-mail: commits-help@maka.apache.org
Re: [PR] docs: verify the compaction projection docs against main (#3522) [maka]
Posted by "ggbdpq (via GitHub)" <gi...@apache.org>.
ggbdpq commented on code in PR #6052:
URL: https://github.com/apache/maka/pull/6052#discussion_r4238153736
##########
docs/architecture/llm-compaction-events-log-projection-draft.zh-CN.md:
##########
@@ -7,7 +7,7 @@ counterpart: ./llm-compaction-events-log-projection-draft.md
implementation_status: current
document_status: draft
translation_status: synced
-last_verified: 2026-08-28
+last_verified: 2026-10-10
Review Comment:
Fixed in `23102e66c` — all five points: both schema diagrams and the native-replay text now say `connectionId`; the overflow-recovery boundary is restated per step (a successful provider step resets the shaping budget) with the summarizer-failure circuit as the turn-scoped one; the 8,000-token cap is restricted to the portable text summarizer (the native Codex call passes none); the zh stale-prune step and explanation now match the durable-transition model; and the zh 7,500 threshold is UTF-8 bytes, not characters.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org
For additional commands, e-mail: commits-help@maka.apache.org
Re: [PR] docs: verify the compaction projection docs against main (#3522) [maka]
Posted by "Astro-Han (via GitHub)" <gi...@apache.org>.
Astro-Han commented on code in PR #6052:
URL: https://github.com/apache/maka/pull/6052#discussion_r4237437413
##########
docs/architecture/llm-compaction-events-log-projection-draft.zh-CN.md:
##########
@@ -7,7 +7,7 @@ counterpart: ./llm-compaction-events-log-projection-draft.md
implementation_status: current
document_status: draft
translation_status: synced
-last_verified: 2026-08-28
+last_verified: 2026-10-10
Review Comment:
[P2] Correct the remaining implementation claims in both verified chapters. Updating `last_verified` to October 10 and marking these translations synced leaves several factual discrepancies:
- The Chinese chapter at lines 166 and 175 still describes stale pruning of only the uncovered remainder. `AiSdkCompaction.prepareContextBudgetPolicy()` first commits/prunes through durable transitions (`ai-sdk-compaction.ts:683`), then checks the raw checkpoint prefix and effective covered digest (`:709–729`); `context-budget.ts:108` explicitly removes the former stale-prune stage. The English explanation already reflects this durable-transition model.
- Chinese line 456 says 7,500 serialized characters; the actual threshold is 7,500 UTF-8 bytes (`read-page.ts:25`, `tool-result-archive-transition.ts:237–242`), as the English counterpart correctly says. Chinese-heavy results therefore prune at a different boundary than this translation describes.
- Both schema diagrams at line 149 and native-replay explanations at line 243 use `connectionSlug`. The persisted V3 field and replay comparison use `connectionId` (`history-compact-checkpoint.ts:128–133,410–422`); the shape-validation regression explicitly rejects a slug-only checkpoint (`__tests__/history-compact-checkpoint.test.ts:199–207`).
- English line 188 says compaction is entered at most once per send. Successful provider steps reset the shaping budget (`ai-sdk-turn.ts:1854`), and `mid-turn-capacity-backend.test.ts:1199–1226` verifies two successful folds in one send. Document the per-step recovery boundary separately from the turn-scoped summarizer-failure circuit.
- Both native-compaction sections at line 239 claim an 8,000-token output cap. Only the text summarizer supplies that cap (`history-compact-summarizer.ts:142,177`). The native `streamText` call does not pass it (`openai-codex-history-compactor.ts:113–122`). A mock-provider probe supplying `maxOutputTokens: 8000` captured no dispatched maximum while `compactionTrigger` was true. Restrict this claim to the text-summary route rather than promising a native cap.
Please synchronize the corrections and the verification metadata; no runtime change is needed for these documentation errors.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org
For additional commands, e-mail: commits-help@maka.apache.org
Re: [PR] docs: verify the compaction projection docs against main (#3522) [maka]
Posted by "Astro-Han (via GitHub)" <gi...@apache.org>.
Astro-Han merged PR #6052:
URL: https://github.com/apache/maka/pull/6052
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org
For additional commands, e-mail: commits-help@maka.apache.org
Re: [PR] docs: verify the compaction projection docs against main (#3522) [maka]
Posted by "Astro-Han (via GitHub)" <gi...@apache.org>.
Astro-Han commented on PR #6052:
URL: https://github.com/apache/maka/pull/6052#issuecomment-6135539365
Thanks for the contribution! Merging now.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org
For additional commands, e-mail: commits-help@maka.apache.org
Re: [PR] docs: verify the compaction projection docs against main (#3522) [maka]
Posted by "ggbdpq (via GitHub)" <gi...@apache.org>.
ggbdpq commented on PR #6052:
URL: https://github.com/apache/maka/pull/6052#issuecomment-6117169832
Both follow-ups from the 2026-10-10 review are restored at `06deb5de6`:
- **P2** — line 160 in both editions points back to `AiSdkTurn.buildPriorMessages()`. Verified against source: the call and the implementation are on `AiSdkTurn` (`packages/runtime/src/ai-sdk-turn.ts:1163,2716`); `AiSdkBackend` has no such method.
- **P3** — `last_verified` and the in-body currency sentences are back to `2026-10-10` in both editions, matching the description's promised refresh.
The increment touches only those six lines. Diffed against the previously reviewed head `d69f4ec1`: the documents now differ solely by the five factual corrections this increment intentionally added (connectionId binding, overflow shaping reset, summarizer-only 8,000-token cap, durable prune transitions, 7,500 UTF-8-byte threshold).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org
For additional commands, e-mail: commits-help@maka.apache.org