Skip to content

Feat/cesar harness improvements#272

Merged
cukas merged 8 commits into
mainfrom
feat/cesar-harness-improvements
Jul 18, 2026
Merged

Feat/cesar harness improvements#272
cukas merged 8 commits into
mainfrom
feat/cesar-harness-improvements

Conversation

@cukas

@cukas cukas commented Jul 18, 2026

Copy link
Copy Markdown
Contributor

No description provided.

cukas and others added 8 commits July 18, 2026 09:12
Read-only tools (Read/Grep/Glob/WebFetch/WebSearch/RetrieveResult/
ListPlans, plus read-only Bash) mutate nothing, so a superseded turn
lease is not a reason to reject them — doing so hard-failed harmless
reads whenever the turn advanced between the model's batch and
execution (sibling calls in one response can transition the lease).
Mutation-class tools still fence strictly.

- turn-runtime.kern: new isReadOnlyToolCall, lockstep with the
  read_only TurnEffectClass used by runTurnToolOnce
- session.kern: buildOnToolCall skips the lease fence for read-only
- 6 new unit tests (38 total in cesar-turn-runtime)

Co-Authored-By: agon (KERN) <292465531+KERN-Agon@users.noreply.github.com>
runInterruptActiveRun called clearSteering() unconditionally, deleting
any message the user had typed while Cesar was working. Now it harvests
those mid-turn messages via drainLeftoverSteering(), redirect-wraps them
against the just-interrupted turn (buildInterruptedTurnRedirect), and
pushes them into inputQueue so the existing idle drain delivers them as
the next turn — Claude Code parity. Pure idle Esc (nothing interrupted)
queues the raw text as-is. Composer drafts still survive.

- app-interrupt.kern: harvest-before-clear; setInputQueue dep
- app.kern: wire setInputQueue into the interrupt call

Co-Authored-By: agon (KERN) <292465531+KERN-Agon@users.noreply.github.com>
- Remove natural-language 'review with <engine>' dispatch from chat
- Keep slash commands (/review, /forge, etc.) as the only orchestration entry
- Simplify intent.kern by 85 lines, update tests
- Regenerate all generated TS mirrors

Co-Authored-By: agon (KERN) <292465531+KERN-Agon@users.noreply.github.com>
- Pluralize the tool count correctly in both recap renderers
- Update app-scroll recap assertions to the compact one-line summary
  (combined '~1 edited · ✓ tests · 3 tools' line, 'undo: /undo <id>',
  no per-tool breakdown) — completes 9ce3272 which shipped the
  renderers without these test updates
- Review findings from agon review (zai 0.85 grammar, codex 0.99
  assertion coverage) verified and applied

⚔️ Forged by [Agon](https://github.com/KERNlang/agon)

Co-Authored-By: agon (KERN) <292465531+KERN-Agon@users.noreply.github.com>
Tag every tool_timeline record with an effect class (read/write/bash-read/
bash-write) at write time, classified with the same predicates the
permission system uses (isWriteToolName/isBashToolName/isReadOnlyCommand).

replayCesarHarnessLogs now surfaces per-turn mutationCount/readOnlyCount
and a mutatingTools list, and renders an 'effects: N mutating · M read-only'
line plus a 'writes:' line listing only mutating tools — answering the
audit question 'what did Cesar actually change?' without re-deriving it.
Legacy records without an effect stamp count as neither class.

Co-Authored-By: agon (KERN) <292465531+KERN-Agon@users.noreply.github.com>
Review fixes for 8061cf0 (agon review, codex 3 verified blockers):
- Unwrap JSON-encoded Bash inputs before isReadOnlyCommand — the native
  stream path supplies '{"command":"git status"}' which was stamped
  bash-write wholesale; command-less/unparseable input fails closed
- Unknown-effect tools (Agent, MCP, SaveMemory, …) now return undefined
  instead of masquerading as 'read'; explicit read-only tool list added
- Mutation/read-only counts now derive from SUCCESSFUL tool_result events,
  not running-state tool_call attempts; failed mutation attempts surfaced
  as their own count in the replay rendering
- Replay 'tools=' line counts distinct calls, not call+result rows
- Tests: temp dirs cleaned up, unused appendFileSync import dropped,
  effect-split coverage extended to JSON inputs / unknown tools /
  failed writes

⚔️ Forged by [Agon](https://github.com/KERNlang/agon)

Co-Authored-By: agon (KERN) <292465531+KERN-Agon@users.noreply.github.com>
@cukas
cukas merged commit 265da09 into main Jul 18, 2026
2 checks passed
@cukas
cukas deleted the feat/cesar-harness-improvements branch July 18, 2026 09:10
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.

2 participants