ai-agent-book 精选快照(<2MB 代码与文档,来自 github.com/bojieli/ai-agent-book)
Build latest book artifacts / build (push) Canceled after 0s
dependency resolution / resolve (3.11) (push) Canceled after 0s
dependency resolution / resolve (3.13) (push) Canceled after 0s
deploy-pages / build (push) Canceled after 0s
deploy-pages / deploy (push) Canceled after 0s
i18n consistency check / check (push) Canceled after 0s
provider adoption tests / test (chapter2/context-compression) (push) Canceled after 0s
provider adoption tests / test (chapter2/prompt-injection) (push) Canceled after 0s
provider adoption tests / test (chapter2/system-hint) (push) Canceled after 0s
provider adoption tests / test (chapter3/log-sanitization) (push) Canceled after 0s
web-search-agent tests / test (push) Canceled after 0s
web-search-agent tests / agentbook (push) Canceled after 0s

This commit is contained in:
2026-08-20 13:12:50 +00:00
commit b119135836
10275 changed files with 3284984 additions and 0 deletions
@@ -0,0 +1,35 @@
# Seventh independent review: idempotent request rebuilds
The fourth terminal acceptance review rejected the candidate after all focused
tests passed. Continue the same self-update and correct this retry-path defect:
- `append_persistent_model_status()` is not idempotent when the same newest
message is used to build another request (for example, a transient provider
failure, empty-response retry, or request rebuild before a new transcript
message). It computes `updated = base + "\n\n" + status` from wire content
that already contains the previous projection, so every rebuild adds another
`<agent_status>` block.
- A direct production-helper exercise repeated the call 20 times and produced
20 status blocks, changing previously sent bytes and violating both the
prompt-cache stability claim and the total output bound.
- Current tests always append a new transcript message before the next build
and therefore miss same-message retries.
Make projection idempotent at the production persistence boundary. Preserve an
unmodified base sidecar or safely recognize/replace only a status projection
owned by this feature; do not delete user-authored text that merely resembles
status markup. Decide and document whether volatile status values remain fixed
for a retry of the same message or can be replaced, but previously sent prefix
bytes must not drift unexpectedly. Keep clean transcript content unchanged,
retain string-only fail-closed behavior, and durably persist the selected
sidecar by stable row identity.
Add a regression test that repeatedly builds requests with unchanged source
messages, including a persisted/reloaded case. Assert identical wire bytes and
exactly one owned status block. Retain realistic tool-call placement,
persistence-reload, adversarial-bound, and unsupported-type coverage.
Run the focused tests, existing sidecar/cache/turn-context regressions,
compilation, and `git diff --check`. Update `BOOK_SELF_EVOLUTION_REPORT.md` with
this seventh review and exact results. Do not edit the book, commit, push, or
claim downstream task improvement.