feat(agent-core-v2): drop the experimental gate from turn-level file history - #3525
Conversation
🦋 Changeset detectedLatest commit: 5f9ef04 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
commit: |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 48705567e3
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
…history The file_history flag and its KIMI_CODE_EXPERIMENTAL_FILE_HISTORY env var are removed; first-touch baselines, turn checkpoints, and the changes/turnRecorded/contentAt reads now run unconditionally, so the per-turn file diffs served by kap-server no longer depend on opt-in configuration. The changes REST response drops its enabled field — recorded alone tells an authoritative empty result apart from a turn whose records were never made, lost to a crash, or displaced by retention.
… listing turnRecorded always answered false for turns whose snapshots lived under the file-history/ prefix directory: BlobStoreService.has listed the scope directory (a shallow readdir) and exact-matched the nested key against top-level entries, so keyed blobs were never found and the changes endpoint reported recorded=false for exactly the turns that had edits. Stat the key through storage.size instead, and pin the turn-recorded assertions against a real node-fs home so the harness covers the production layout.
02bdc5d to
2ec8d6d
Compare
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 2ec8d6d415
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
…rded Merging the start and end entries let an end entry with key null (a deleted or oversize-at-end file) shadow the start baseline, and probing only one surviving key missed partial loss in the other phase: a session displaced from the thirty-session window could still claim authority for turns whose snapshots were gone. turnRecorded now stats every distinct keyed blob across both checkpoints and reports the turn unrecorded when any is missing.
|
@codex review |
|
Codex Review: Didn't find any major issues. Already looking forward to the next diff. Reviewed commit: ℹ️ About Codex in GitHubCodex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback". |
Related Issue
N/A — follow-up to #3339, which shipped turn-level file history behind the experimental
file_historyflag. Companion client PR: MoonshotAI/kimi-code-app#525 (consumes the now-unconditional endpoints).Problem
The turn-level file history shipped opt-in behind
KIMI_CODE_EXPERIMENTAL_FILE_HISTORY(default off). The feature is ready to be always on: keeping a flag means the per-turn file diffs served by kap-server silently degrade to empty for every default install, and every read/write path carries a guard that no longer earns its keep.What changed
file_historyflag definition and its env var are deleted; first-touch baselines, turn-boundary checkpoints, and thechanges/turnRecorded/contentAtreads now run unconditionally.GET /sessions/{id}/file-history/changesdrops theenabledfield from its response —recordedalone tells an authoritative empty result apart from a turn whose records were never made, lost to a crash, or displaced by retention.turnRecordedansweredrecorded=falsefor exactly the turns that had edits, becauseBlobStoreService.hasprobed existence with a shallow directory listing that can never match the nestedfile-history/<hash>@vNkeys; it now stats the key. The scripted-turns e2e now pinsturnRecordedagainst a real node-fs home so the harness covers the production layout.Checklist
/approve).agent-core-v2fileHistory 21 tests, kap-server routes)gen-changesetsskill, or this PR needs no changeset.gen-docsskill, or this PR needs no doc update. (wire/state manifests verified fresh by their tests — no durable event or state key changed)