Skip to content

perf(core): share session logs and warm layer state - #79

Open
LukasParke wants to merge 1 commit into
mattapperson:mainfrom
LukasParke:lukeparke/openrouter-session-log
Open

perf(core): share session logs and warm layer state#79
LukasParke wants to merge 1 commit into
mattapperson:mainfrom
LukasParke:lukeparke/openrouter-session-log

Conversation

@LukasParke

Copy link
Copy Markdown
Collaborator

What

  • give each session one live item log shared by all turn contexts
  • roll failed/aborted turns back to their starting watermark
  • validate history replacements before mutating the shared log
  • preserve layer/tool extension item schemas on the session log
  • carry initialized layer state by resolved scope key, with transient previews excluded

Why

Sessions copied history into each turn context and copied it back afterward. That adds work and makes rollback/schema behavior fragile. Warm hydration keyed only by thread can leak resource-scoped state across tenants and lose updates to global buckets.

This semantically ports item 12 from fork/port/openrouter-fixes commits fc89dbab and 796f7ec2. Delta checkpoint item batches, stitching, and ledger continuity remain item 13.

Test plan

  • full core suite — 1,475 pass, 5 live skips
  • context tests/typecheck
  • 40 focused session/log/hydration tests pass after review fixes
  • root lint
  • export-tag check
  • sentrux check .
  • sentrux gate .
  • clean-context Pi review; moved setup under rollback/cleanup and made history replacement atomic

Semantics

Failed turns still consume reported usage/cost, but their partial items are removed. Execution-scoped layers cold-init every turn; thread/resource/global scopes warm-carry only within their resolved bucket.

Port item 12 from fork/port/openrouter-fixes commits fc89dba and 796f7ec: session-owned logs with rollback and scope-correct warm hydration. Delta checkpoint batching remains item 13.

Signed-off-by: Luke Parke <5702154+LukasParke@users.noreply.github.com>
@vercel

vercel Bot commented Aug 13, 2026

Copy link
Copy Markdown

@LukasParke is attempting to deploy a commit to the Matt Apperson's projects Team on Vercel.

A member of the Team first needs to authorize it.

@LukasParke

Copy link
Copy Markdown
Collaborator Author

Agent: Code CI/structural/DCO are green where configured; remaining external red checks are compat with an empty upstream OPENROUTER_API_KEY and Vercel authorization. Where core CI is red, the only failure is the unrelated timing-sensitive executeRunCode retry-backoff test; affected local/full suites passed. I cannot rerun upstream Actions without admin rights.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant