5 Commits

Author SHA1 Message Date
Bingxi Zhao (Frank)
68106fb79a Merge PR #2670: fix(loop): keep the workspace system note byte-stable across turns (#2621)
Sort the regression-test imports and apply targeted formatting; integrated workspace-note suite passed.
2026-11-14 23:04:53 +08:00
wmym
d4a9f88292 fix(loop): keep the workspace system note byte-stable across turns (#2621)
The chat loop replays the workspace note as the "workspace" runtime
snapshot, which lives inside the cached prompt prefix. The note embedded
workspace.logical_output_dir — outputs/chat/<session>/<turn>/ — so its
bytes changed on every turn: the snapshot-replace logic cut the old copy
out of the middle of the rebuilt history and appended a fresh one,
invalidating the provider prompt cache on every multi-turn request
(cached-token hit rate <1%; single-turn tool loops were unaffected).

- workspace_system_note(state_turn_path=False) keeps the replayed chat
  snapshot byte-identical for the whole session and points at the current
  user message for the exact path instead.
- new workspace_turn_note() delivers the per-turn output folder in the
  trailing user message — fresh bytes each turn, so cache-safe by
  construction.
- phase-built prompts (question/research pipelines) keep embedding the
  exact path via the default state_turn_path=True; their behavior is
  unchanged.
- model-history reconstruction keeps an exact prefix once snapshots are
  stable; new multi-turn replay tests assert byte-level prefix extension
  across three consecutive turns, plus the second factor named in the
  issue turns out to be a consequence of the turn-scoped snapshot and
  needs no separate change.

Verified: tests/agents/chat 273 passed; tests/capabilities 739 passed;
tests/services/workspace+session 709 passed (8 failures pre-exist on the
clean tree and are unrelated); remaining tests/agents failures pre-exist.
2026-11-14 00:48:42 +08:00
Bingxi Zhao (Frank)
04040a2c06 release: v1.6.5
Ship a content workspace you choose, one exec tool for every language,
Mastery Path modes that gate its tools, and Settings that grades
readiness instead of listing faults.

Release notes: assets/releases/ver1-6-5.md
2026-09-06 13:46:29 +08:00
zhou2030109-glitch
b342b63b7a fix: align Windows exec runtime and search readiness 2026-08-27 17:17:03 +08:00
john00010
dcbb1d3393 fix(sandbox): support Windows code execution (#964)
* fix(sandbox): support Windows code execution

* refactor(sandbox): vary only the shell clause in the workspace note

The Windows branch duplicated the whole workspace paragraph, so the note
existed in four near-identical copies (zh/en x posix/windows) that would drift
apart on the next edit. Only the "how do I get a script into a file" clause
actually depends on the host shell, so vary that clause and keep one template
per language.

Also prefer `pwsh` (PowerShell 7+) when it is on PATH — it defaults to UTF-8
and is the version still receiving updates; the generated commands are written
in 5.1-compatible syntax, which 7 accepts too. And hoist `import sys` to module
scope now that two methods need it.

Adds the tests this note never had: each host gets the syntax that works there
(a Bash heredoc is a syntax error in PowerShell, and the model would silently
produce no file), and the host-independent half stays byte-identical.

---------

Co-authored-by: Frank <bingxizhao@novix.science>
2026-08-24 16:52:04 +08:00