You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maka.apache.org by "fxl112233 (via GitHub)" <gi...@apache.org> on 2026/08/27 20:14:14 UTC
[PR] docs(architecture): audit context compaction [maka]
fxl112233 opened a new pull request, #4046:
URL: https://github.com/apache/maka/pull/4046
## Summary
- Audit the paired Context and compaction architecture chapters against the current Runtime, Runtime Host, and SQLite storage implementation.
- Correct checkpoint-before-prune ordering, atomic AgentRun event/projection persistence, and the current replay-fit policy.
- Document structured-summary admission, one bounded repair, malformed-input retry fingerprinting, and the absence of a compaction-only output cap.
- Refresh both code/test maps and set the paired documents' `last_verified` date to 2026-08-28.
Refs #3522
## Verification
- `npm run format:check` — passed (1,706 files)
- `npm run lint` — passed (2,845 files)
- `npm run check:asf-headers` — passed
- `npm run build` — passed
- `npm run typecheck` — passed after building workspace dependencies
- Focused Runtime/Storage suite covering the 10 documented verification files — 611 passed, 0 failed
- Explicit path/symbol audit — all 24 documented paths and 10 named runtime symbols resolved
## AI use
Select exactly one:
- [ ] No generative tool made a substantive contribution
- [x] Generative tooling made a substantive contribution
Tool(s) and scope: OpenAI Codex audited the current implementation, drafted the synchronized English and Chinese corrections, ran verification, and submitted the PR under @fxl112233's direction. The commit includes the required `Generated-by: OpenAI Codex` trailer.
## Checklist
- [ ] Tests cover the change and fail without it
- [x] Lint, format, typecheck and the affected suites pass locally
Does this PR entail a change in behavior?
- [ ] Yes — described under Summary above
- [x] No
--
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(architecture): audit context compaction [maka]
Posted by "Astro-Han (via GitHub)" <gi...@apache.org>.
Astro-Han commented on PR #4046:
URL: https://github.com/apache/maka/pull/4046#issuecomment-5445967430
This is a synthesis of the independent blind review by @Sol-404ARE at exact head `81546ed34be0079b53878791653235ab00bf6c84` (base `ff226aff2f3082e54300dea0ee9e410898ae2c0f`, 2 files +108/-76). I verified the diff and the exact-head CI myself; the file:line findings below are from Sol's sealed review.
What I checked myself:
- Read `gh pr diff 4046` (audit: `llm-compaction-events-log-projection-draft` 2 files) and confirmed the edited failure table now claims `implementation_status: current` / `last_verified: 2026-08-28` while stating that an empty/initial V2 summary retains a bounded raw tail and emits `context_compaction_failed_open`.
- Checked exact-head CI: `label` run 33112332075 SUCCESS, `test` run 33112332673 `action_required` (not green), Windows `recovery` likewise pending, OPEN/MERGEABLE/BLOCKED/REVIEW_REQUIRED.
Findings from Sol's review (file:line anchored):
**Standards — GO (0 P0–P3)**
- No Standards finding. ASF header audit, `git diff --check` PASS, worktree clean, Markdown ignored by Biome (0 files), PR body reports `611/611` focused tests.
**Spec — NO-GO — 1×P2 (worst P2)**
- **P2 — The refreshed “current” architecture contract still describes the wrong automatic first-compaction failure outcome** — `docs/architecture/llm-compaction-events-log-projection-draft.md:394,405` (and `.zh-CN.md:394,405`) says an empty/initial V2 summary retains a bounded raw tail and emits one visible `context_compaction_failed_open` note. In the automatic pre-turn path this is false: `packages/runtime/src/ai-sdk-compaction.ts:356-372` returns failure without replacing the raw context; `ai-sdk-backend.ts:3625-3648` then returns `context_budget_exhausted`; `:1823-1835` emits only the terminal `complete` and returns before the token-usage/note path at `:2900-2914`. The exact regression at `ai-sdk-backend.test.ts:6128-6195` injects an empty summary plus `BLANK_RETAINED_TAIL` and then asserts zero provider calls, zero checkpoint writes, and terminal `context_budget_exhausted` — so the automatic initial failure neither continues on a tail nor persists the promised note
. Manual compaction is different: `runtime-kernel.ts:1075-1084` does append the note on failure. The docs should distinguish automatic over-budget terminal exhaustion from manual failure, or the runtime/tests should be changed. The wording predates the patch, but because this PR audits and refreshes the failure table and certifies `current`/`2026-08-28`, it newly certifies the incorrect contract.
Remaining changed claims were verified as consistent: checkpoint replay before stale-result prune, AgentRun canonical event plus bounded projection committed atomically and recoverable from ledger, replay budget/strictly-smaller gate, structured summary/one-repair/16-entry fingerprint — all match implementation; the Chinese and English hunks are structurally synchronized and all 14 production paths + 10 test entries exist. Entropy is neutral.
What I did not judge: the broader compaction loop beyond the two failure paths was not re-executed — verification was by code inspection and the referenced regression noted above.
Gate: one P2 docs Spec remains; `label` green but `test`/`windows_recovery` are `action_required` (not SUCCESS), so head `81546ed` is not yet merge-ready despite Standards GO. Fix the automatic vs manual failure description in both docs and await workflow approval with terminal CI green. Seal: `notes/pr-4046-provisional.md`.
---
> **Automated review notice:** This comment was posted by an automated review agent operated by Astro-Han. It is not an independent human review and does not replace one.
--
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(architecture): audit context compaction [maka]
Posted by "fxl112233 (via GitHub)" <gi...@apache.org>.
fxl112233 commented on PR #4046:
URL: https://github.com/apache/maka/pull/4046#issuecomment-5446778101
Addressed the P2 finding in commit 38b79fc.
The English and Chinese chapters now distinguish the two implemented failure paths:
- automatic pre-turn compaction keeps the original source-derived projection and terminates with `context_budget_exhausted` without persisting a failure note when it remains over budget;
- manual compaction records one visible `context_compaction_failed_open` note.
Verified against `ai-sdk-compaction.ts`, `ai-sdk-backend.ts`, `runtime-kernel.ts`, and the empty-summary regression in `packages/runtime/src/__tests__/ai-sdk-backend.test.ts`. `git diff --check` passes, and the paired chapters remain structurally aligned (559 LF lines and 27 headings each).
The upstream workflow still requires maintainer approval before CI can run.
--
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(architecture): audit context compaction [maka]
Posted by "YayoiNanoka (via GitHub)" <gi...@apache.org>.
YayoiNanoka merged PR #4046:
URL: https://github.com/apache/maka/pull/4046
--
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