docs: verify the compaction projection docs against main (#3522) #6052
All Vouch review confidence checks passed
Residual risk 0.19 = Change Risk (0.48) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.48 · 373 lines diff across 4 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.354
Shallow Review Depth
shallow_review_depth
0.289
Ai Authored
ai_authored
0.050
Real PR Conversation Timeline
1 comments
"Review active on #6052"
general
weight: 0.35
ggbdpq
Summary
Second verification pass over the Context-and-compaction slice of #3522: both
llm-compaction-events-log-projection-draftdocuments (en + synced zh-CN), read line-by-line against currentmain. 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) — notAiSdkBackend.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— theagent-run-store.test.tscitation flagged on the issue was already corrected in #4046) ||
HistoryCompactCheckpointschema V2/V3,openai_codex_remote_v2variant |history-compact-checkpoint.ts:122,129,139,220||
matchHistoryCompactCheckpointPrefix()|history-compact-checkpoint.ts:569||
history_compact_checkpoint_recordeddurable 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.compactioncustom part |openai-codex-history-compactor.ts:65,327||
AiSdkBackend→AiSdkTurn| fixed |last_verifiedand the in-body currency date refresh to 2026-10-10 in both language editions.Verification
grepagainst source, not dist).npm run check:asf-headers: green.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
translation_status: syncedpreserved)Refs #3522