Skip to content

ACP compaction updates → compaction boundary and usage invalidation (provider-neutral) #80

Open

Description

@44madfire

Summary

Translate ACP compaction_update into the same boundary row legacy chat shows and invalidate context usage until the next report, for any ACP agent that sends it.

Context

  • 44madfire/orca#20 lists compaction boundaries as a parity row. v1 review finding 2 is partly corrected: replay does not turn compaction into a user message, it drops it (CompactionSummaryMessage keeps summary, replay reads content: packages/agent/src/compaction/messages.ts:49-51, packages/coding-agent/src/modes/acp/acp-agent.ts:2329-2336 @53f253f) — and live compaction emits nothing at all (ACP: emit compaction updates live and usage after compaction oh-my-pi#10).
  • Orca sinks compaction_update / compaction_summary_chunk to provider.frame (src/main/acp/acp-session-update.ts:86-90 @76d1b7b) and declares compact: false (src/main/acp/acp-structured-agent-definitions.ts:23). The vendored schema carries CompactionUpdateSchema (src/main/acp/generated/acp-protocol.generated.ts:1123).
  • Legacy presentation: 'Context compacted', presentation: 'compaction' (src/main/native-chat/transcript-line-decoders-omp.ts:46-51 @76d1b7b), with usage invalidated until the next reply (src/shared/native-chat-context-usage.ts).

Scope

  • One boundary row per compactionId, placed where the compaction started; summary chunks folded into bounded detail.
  • Usage invalidated from the boundary until the next usage_update.
  • Replay window behavior unchanged (suppressed).

Non-goals

Depends on

Parity rows owned

  • P-CMPX-01.

Acceptance criteria

  • Automatic and /compact compaction in a live OMP chat render exactly one boundary row at the point it fired.
  • The ring is invalidated from the boundary until the next usage report.
  • Adopted history keeps the decoder's boundary rows; reattach adds none.
  • Agents that never send compaction updates are unaffected.

Required tests

  • Start without complete (child dies) → one boundary, settles on exit.
  • Duplicate updates for one compactionId → one row.
  • Compaction frames inside the loading window → no row.
  • usage_update racing compaction completion keeps the post-compaction value.

Base branch

acp-migration (44madfire/orca).

Metadata

Metadata

Assignees

No one assigned

    Labels

    acp-migrationOMP Native Chat ACP migrationphase-BPhase B parity completion

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions