Commit 609c7e4
Hermes Agent
fix(embedded-agent-runner): accept compaction rewrites in session fence check
sessionFenceRewriteIsBenign rejected all rewrites where the file inode
changed, even when content validation passed. When compaction rewrites
the session file (new inode, smaller size), the early
sameSessionFileIdentity check caused both benign-check functions to
return false, triggering a false-positive EmbeddedAttemptSessionTakeoverError.
Fix: remove sameSessionFileIdentity from the early-return guard in
sessionFenceRewriteIsBenign. The function already rigorously validates
content via lineMatchesLinearTranscriptMigration. When content validation
passes, the rewrite is safe regardless of whether the inode changed —
a compaction rewrite with new inode is benign.1 parent f44af7e commit 609c7e4
1 file changed
Lines changed: 11 additions & 2 deletions
Lines changed: 11 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
259 | 259 | | |
260 | 260 | | |
261 | 261 | | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
262 | 265 | | |
263 | 266 | | |
264 | 267 | | |
265 | 268 | | |
266 | | - | |
267 | 269 | | |
268 | 270 | | |
269 | 271 | | |
| |||
296 | 298 | | |
297 | 299 | | |
298 | 300 | | |
299 | | - | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
300 | 309 | | |
301 | 310 | | |
302 | 311 | | |
| |||
0 commit comments