Incorporates #599 and #555 on current main, preserves pending-plan approval waits, adds regression coverage, and regenerates course data.
Validated locally: 503 tests and 118 subtests, TypeScript, 118-page production build. PR CI and Test passed.
Co-authored-by: wangwei69 <uquantum@hotmail.com>
Co-authored-by: Hongming (Chip) Li <hichipli@gmail.com>
agent() records its progress event when the runner returns, and pipeline()/parallel() intentionally let agents finish in any order. Python 3.13/3.14 interleave those completions differently (and vary between runs), so compare workflow_agent events as a multiset while still asserting phase order, log placement, and phase tags.
Incorporate #578, preserve #561's regression tests, and distinguish a complete request from a prefix of an older request. EN/ZH/JA examples stay synchronized.
Co-authored-by: ship <shiyipeng2002@163.com>
Every chapter REPL treated an empty line as a quit command and exited with
status 0 without a word, while the banner only promises "Type q to quit".
Under VS Code's debugger the Python extension's environment-activation line
is often injected into stdin after the program started, so the first thing
the REPL read was a blank line and the chapter vanished right after its
banner.
An empty line is now ignored and the prompt comes back; q and exit still
quit, and EOF/Ctrl-C still end the loop. s17 already behaved this way. A
static test keeps every chapter's quit check free of the empty string.
Fixes#567
Recognize the documented prompt is too long message in the bounded reactive-compaction path. Synchronize all three chapter READMEs and add regression coverage for recovery, compatible markers, retry exhaustion, and unrelated errors.
Validation: 21 targeted tests and 22 subtests passed. Full suite: 486 passed, 1 pre-existing S16 scenario ordering failure, 100 subtests passed.
Refs shareAI-lab/learn-claude-code#560. Prepared with AI assistance.
reactive_compact summarized the full message history before slicing off
the recent tail, so the kept tail was summarized and then re-attached
verbatim, and the emergency prompt-too-long path re-summarized the whole
oversized context. Move the summarize_history call below the tail
computation (including the tool_use/tool_result pair adjustment) and
summarize only messages[:tail_start], so the summary covers older history
while the recent tail stays verbatim.
Applied to the duplicated function in s08, s09, and s20, with the s08
README snippets (en/zh/ja) updated to match. Adds tests covering the
normal path and the case where a tool pair straddles the tail boundary.
Fixes#350