Repository navigation
fix: derive reuse lineage from the fitted distillation record - #73
Merged
forrestlinfeng merged 20 commits intoNov 11, 2026
Merged
forrestlinfeng merged 20 commits into
forrestlinfeng merged 20 commits into
Conversation
Kimi's late native terminal now goes through EvoMap#54's confirmTurnCompletion path instead of native-turn.js / native-monitor.js / TASKS.NATIVE. The shared mechanism gains, host-neutrally: - a canonical turnStart event: binds the open turn's id when the host announces it with the turn's own prompt, then schedules the shared turn monitor - turnStatus rows that carry record/answer, passed as recordOf through the turn monitor, closeUnfinishedTurn (also at session end) and recoverNativeTurns - runtime/session-log.js: a generic JSONL turnStatus reader (bounded head+tail, task files, confined paths) selected by a log-shaped statusRecord/modelRecord - the ACP runner on the configStamp + turnEnd.modelOf contract; the stamp hashes the config and every credential it names - a running background check keeps a row pending Removed: native session fields, deferred finishing, routeConflict / modelBinding / pendingNativeCheck ranges, correctedTurn. Drafts are written under sourceCandidate again; ones stored under sourceRange stay readable. Kept the tested shared fixes: correction lock around distill dispatch, the agent-Gene gate, isCurrentRange claimer + exact match. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…k-c7aa95 # Conflicts: # lib/agent/driver.js
- SessionStart reads the owner process only for owner-change hosts; finding Kimi's ancestor took the hook past its 3 s budget on Windows Node 22 - a turn end clears `settling` only if it still owns that timestamp - a distillation that throws still settles its claim; a stale range is dropped before calibration; model errors are redacted - the session-log reader caches only the parsed log, so a background task that settles without a log write is seen; the ACP stamp comes from the same config read as the selected route - a record declaration is a query or a session log, never both - Kimi keeps a task the newest turn names again within its 64 task ids - epochs stored per work turn by EvoMap#66 stay readable for corrections Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- the session-log tail opens one byte early, so a line starting exactly at the window edge is kept; the head is read in full and a header the tail cuts comes from it - the ACP stamp hashes the credential the run uses from that same read - closeTurn compares the session as sessionOf reads it - a model answer that arrives after shutdown returns `stopped` and leaves the range for the next start - a stored modelBinding stays out of the calibration corpus - withoutExpiredLeftovers accepts a missing table Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The reader's scope pseudonymises the log home it resolved at start; a later read whose root resolves elsewhere answers no row rather than reading a same-named session there under the old scope. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A session epoch is the time its state started over: withWorkTurn no longer lets a late turn of an older epoch replace the newer range, and a correction applies only to the range of the epoch it was resolved for. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ispatch - the session-log reader deduplicates task ids before checking their limit - a distill request is not dispatched once its signal has aborted Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
withoutWorkTurn takes the epoch its caller judged the turn in, like withCorrection, so a late "no work" re-judge cannot remove a newer range's turn of the same number. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…stopped The Proxy request carries the distillation's combined signal, so a correction or shutdown while it is in flight now settles as `dropped` or `stopped` instead of throwing; a model error during shutdown hands the claim back before it can be recorded as a blocked route. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…g log The session-log reader tells the decoder which byte span of a long log it left unread, and Kimi's decoder answers no row for a turn whose records may lie there, so a check in that span can never be missed and the turn verified. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The Windows job helper compiles its Win32 bridge with Add-Type before the native client starts, which alone can exceed the tests' 10 s completion signal on a cold CI runner: the signal then aborted mid-compile and the test failed with a retained scratch. Completions expected to succeed now share a 60 s budget. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The reader checks a log or task file is confined to the log home, then opens it; the file at that path could be swapped in between. The opened file's device and inode must now match the checked one, as the old native reader required. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…check a log path once open - a turn judged again after a later one joined only changes its own turn: the range keeps the newer turn's route, snapshot, owner and any route block - the session-log reader checks a file's path again once it is open, so a folder swapped for a link in between cannot pass the identity check Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The stamp's per-credential digest joined secret and device id with a NUL; both are already validated free of control characters, but a structured encoding keeps two different pairs from ever sharing a digest. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
baseFor takes the turn's session epoch: a range of another epoch gives no base, so a new epoch's first turn never inherits the old range's. Its one caller already only asked within the same epoch; the guard now holds on its own. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Sentinel 已审核此变更,未发现需要报告的问题。 开发 agent 查询详情: 调用 MCP 工具 由 Sentinel 审核 · 目标提交 9d8bf1ca2f55 |
feat(reuse): 蒸馏关联复用资产,账本写明宿主,source 被拒的报告补发
Run Kimi on the shared late-terminal mechanism and drop its own
The captured-owner change targeted lib/app/native-turn.js, which EvoMap#68 removed; main's shared late-terminal flow takes precedence, as the PR description anticipated. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
|
Merged after a main merge that drops the owner-retention commit superseded by #68; the lineage fix itself is unchanged. Thanks! |
forrestlinfeng
merged commit Nov 11, 2026
431aee6
into
EvoMap:claude/reuse-lineage-reporting
6 checks passed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary Follow-up to #69. Build reused_asset_ids from the turns retained in the fitted record sent to the model and Proxy. Assets from turns removed to satisfy the body limit are left out. ## Evidence - Before, an eight-turn session retained only recent turns in the record but attributed the resulting Gene to an asset injected in the removed first turn. - The regression now sends only the asset from the retained last turn, with the body below 256 KiB. - Distillation, prompt and architecture tests passed 60/60 on Windows Node 22.23.4 and 26.13.0. ## Merge Danger Two-way. This PR targets the #69 branch. Scope is the metadata attached to distillation requests.
Includes the captured-null owner fix also on #70 so the existing Kimi Windows hook stays within its budget during CI.