Compare commits

..

12 Commits

Author SHA1 Message Date
YeonGyu-Kim
8806e62a9f docs(roadmap): add #330 — resume mode stats/cost always zero 2026-05-25 13:00:54 +09:00
YeonGyu-Kim
78a0ff615a Merge pull request #3014 from wangguan1995/fix_qwen
Add Qwen model token limits for DashScope compatibility
2026-05-25 12:58:59 +09:00
YeonGyu-Kim
706ac0f8e1 Merge pull request #3097 from ultraworkers/fix-683-unsupported-skills-action
fix(#683): claw skills remove/add/uninstall/delete emits typed error, exit 1
2026-05-25 12:55:01 +09:00
YeonGyu-Kim
bd8a27b100 Merge pull request #3096 from ultraworkers/fix-160-session-store-lifecycle
fix(#160): add regression test for SessionStore lifecycle
2026-05-25 12:54:42 +09:00
YeonGyu-Kim
6f5465aeaf fix(test): update client_integration version string 0.1.0 -> 0.1.3 2026-05-25 12:49:36 +09:00
Yeachan-Heo
fdbc789694 fix(api): skip preflight for unknown model limits 2026-05-25 12:49:36 +09:00
Yeachan-Heo
779cf1c234 test(api): fill thinking in stream chunk fixtures 2026-05-25 12:49:36 +09:00
YeonGyu-Kim
1f330c6737 chore: cargo fmt --all on fix-160 branch 2026-05-25 12:49:36 +09:00
YeonGyu-Kim
3489ec51d5 fix(#160): add regression test for SessionStore lifecycle (list_sessions, delete_session, session_exists)
Adds session_store_lifecycle_regression_160 test that verifies the full
SessionStore CRUD lifecycle. Also fixes pre-existing non-exhaustive match
errors in trident.rs for the ContentBlock::Thinking variant.
2026-05-25 12:49:36 +09:00
wangguan1995
fa8eecaf8f fix 2026-05-10 13:23:40 +00:00
wangguan1995
2033c90921 fix log 2026-05-10 13:21:58 +00:00
wangguan1995
8cada12c48 Add Qwen model token limits for DashScope compatibility 2026-05-10 13:09:07 +00:00
3 changed files with 11 additions and 0 deletions

View File

@@ -7552,3 +7552,6 @@ Original filing (2026-04-18): the session emitted `SessionStart hook (completed)
**Required fix shape.** (a) Add a startup pre-flight in `worker_boot.rs` that, for any task mentioning a file path, checks `git ls-files --error-unmatch <path>` and emits a structured `kind:"file_absent_on_branch"` warning before the first LLM call; (b) surface `.git` writability check at sandbox init time and emit `kind:"git_metadata_not_writable"` with the path if commits would fail; (c) add a "current worktree" breadcrumb to the session startup log so agents and operators can confirm the correct tree before work begins.
**Source.** Gaebal probe 2026-05-25 12:02 GMT+9; confirmed during #3097 trident.rs fix attempt. [SCOPE: ultraworkers/claw-code]
||||||| parent of 52161c78 (docs(roadmap): add #330 — resume mode stats/cost always zero)
330. **`/stats` and `/cost` in `--resume` mode always return zero token counts regardless of saved session usage** — dogfooded 2026-04-29 by Jobdori on current main (`e7074f4`). Running `claw --output-format json --resume latest /stats` and `claw --output-format json --resume latest /cost` both return `{"input_tokens": 0, "output_tokens": 0, "total_tokens": 0, ...}` even when the session file was created by a real interactive claw run. The same zero-fill is produced by `claw --output-format json status` (usage sub-object). Inspection of the default session path (`~/.claw/sessions/.../session-*.jsonl`) shows the file has only 2 events (`session_meta`, `message`) with no usage/token records embedded. Two candidate root causes: (a) session serialization never writes usage events into the JSONL file even after real prompt exchanges, so resume-mode has no usage to replay; (b) resume-mode stat accumulation reads usage from memory-side counters that are always zero because no API calls happened in the resume-only invocation. Either way, the operator effect is the same: `--resume` + `/stats`/`/cost` cannot report what the session actually consumed. **Required fix shape:** (a) persist per-turn usage records (input/output/cache tokens per exchange) into the session JSONL at write time so resume-mode can reconstruct cumulative counts by replay; (b) expose a `"total_usage"` summary block at the tail of every session JSONL so resume-mode can read it in O(1) without full replay; (c) ensure `/stats` and `/cost` in resume-mode sum the persisted usage, not memory-side live counters; (d) add regression coverage proving `--resume SESSION.jsonl /stats` returns non-zero token counts after a session that made real API calls. **Why this matters:** token usage visibility is critical for quota management and cost attribution; if `--resume` mode always shows zeros, operators and orchestration lanes cannot trust usage data from saved sessions and must rely on external billing dashboards instead of in-band tooling. Source: Jobdori live dogfood on mengmotaHost, claw-code `e7074f4`, 2026-04-29.

0
rust/Cargo.lock generated Normal file → Executable file
View File

View File

@@ -640,6 +640,14 @@ pub fn model_token_limit(model: &str) -> Option<ModelTokenLimit> {
max_output_tokens: 16_384,
context_window_tokens: 256_000,
}),
"qwen-max" => Some(ModelTokenLimit {
max_output_tokens: 8_192,
context_window_tokens: 131_072,
}),
"qwen-plus" => Some(ModelTokenLimit {
max_output_tokens: 8_192,
context_window_tokens: 131_072,
}),
_ => None,
}
}