mirror of
https://github.com/AgentSeal/codeburn.git
synced 2026-11-29 02:39:13 +00:00
Reviewed src/providers/dsh.ts against deepseek-harness @ 99f6f02f and fixed what the format says but the parser did not: - A forked session's log replays its parent's events verbatim, and codeburn parses the parent's own log as its own session, so every inherited call was billed twice. The header's parentSession + seedLength mark that prefix; events with seq < seedLength are now skipped. - The model now comes from the reporting assistant/message's own message.source, which is what actually served the step. request/header only describes the request DSH was about to make, and is the fallback. - user/message also carries agent-injected context (runtime snapshots, skill bodies) under source.kind 'plugin'; only a typed prompt becomes the preview, and it is bounded to 500 chars like every other provider rather than holding a whole injected system prompt per turn. - A log stamped with a session format version other than 0 is skipped with a notice. The format is pinned at 0 upstream with no compatibility implied, so reading a bumped format under today's assumptions would report confident wrong numbers. - Timestamps go through the seconds-vs-milliseconds guard and fall back to the header createdAt, so a call can no longer carry an empty timestamp and land in the undated cache shard. - The compressed read buffers the whole log to scan its frames, so it now takes the same oversize guard readSessionFile applies to the uncompressed variant. - The zstd-unavailable notice fired once per session log; each distinct notice is now emitted once. - Emit workingDirectory beside projectPath, as codex does. Tests add the upstream examples/acp-agent snapshot as a fixture, covering the real record shapes: packed reasoning-chunks/tool-call-chunks storage rows, a plugin-injected user/message beside the typed one, and both the streamed usage chunk and the final assistant/message usage for the same step. Plus the same snapshot re-encoded as multi-frame zstd with a torn tail (identical output), a forked session, an unsupported format version, and unparsable lines. |
||
|---|---|---|
| .. | ||
| antigravity.test.ts | ||
| claude-config-dirs.test.ts | ||
| cline-cli.test.ts | ||
| cline.test.ts | ||
| codebuff.test.ts | ||
| codewhale.test.ts | ||
| codex-resume.test.ts | ||
| codex.test.ts | ||
| copilot-skills.test.ts | ||
| copilot.test.ts | ||
| crush.test.ts | ||
| cursor-agent.test.ts | ||
| cursor-bubble-dedup.test.ts | ||
| cursor-large-db-cap.test.ts | ||
| cursor-real-tokens.test.ts | ||
| cursor-workspace-breakdown.test.ts | ||
| cursor.test.ts | ||
| devin.test.ts | ||
| droid.test.ts | ||
| dsh.test.ts | ||
| forge.test.ts | ||
| gemini.test.ts | ||
| grok.test.ts | ||
| hermes.test.ts | ||
| ibm-bob.test.ts | ||
| kilo-code.test.ts | ||
| kimi.test.ts | ||
| kimicode.test.ts | ||
| kiro.test.ts | ||
| lingtai-tui.test.ts | ||
| mistral-vibe.test.ts | ||
| mux.test.ts | ||
| omp.test.ts | ||
| open-design.test.ts | ||
| openclaude.test.ts | ||
| openclaw.test.ts | ||
| opencode-file.test.ts | ||
| opencode.test.ts | ||
| pi.test.ts | ||
| quickdesk.test.ts | ||
| roo-code.test.ts | ||
| vercel-gateway.test.ts | ||
| vscode-cline-parser.test.ts | ||
| warp.test.ts | ||
| zcode.test.ts | ||
| zed.test.ts | ||
| zerostack.test.ts | ||