Skip to content

Commit b692efd

Browse files
committed
docs(fork): ledger row for the context compaction cherry-pick (kagent-dev#2790)
1 parent 646e7fe commit b692efd

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

‎FORK.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ Their SHAs change at every re-pin; the ledger records the SHAs of each rebase.
4444
| `fix(a2agateway): the turn a unary SendMessage starts outlives the caller's deadline` | a unary A2A `SendMessage` forwarded the call to the AgentInstance runtime on the caller's context, so a caller whose gRPC deadline expired mid-turn cancelled the runtime's turn with it and the task stayed `TASK_STATE_SUBMITTED` for good — the instance refused every later message as a conflict (spidertron 2026-09-13 13:52Z: the Dev Portal's HITL answer, sent unary with its 30 s timeout, killed the turn it had just started; giantswarm/giantswarm#37771). The unary path now dispatches like the streaming one — a `taskRun` on the runtime's event stream, detached from the caller's context, persists every event and releases the instance when the task quiesces — and the caller waits on that run (the quiescent task, the runtime's message, or the first report of the task when the request asks to return immediately); a caller that leaves gets the task so far with its context's error while the run finishes the turn. The reconciler fails a submitted task beyond the dispatch grace period that the runtime still runs but no run of this gateway records (a controller restart mid-turn), cancelling it at the runtime best-effort, so the instance takes the next message | to file — prepared in the fork: branch `upstream/a2agateway-detached-dispatch` (row 33's `upstream/a2agateway-dispatch-failure` + this patch, `05f5bd17`, DCO-signed, no fork references; its message is the pull-request text). kagent-dev/kagent searched 2026-09-13: no issue or PR on a caller's deadline cancelling the turn (#2112 is the SDK client timeout knob); giantswarm/giantswarm#37742 row 42 |
4545
| `fix(adk): load a SKILL.md whose frontmatter carries fields outside the agentskills.io set` | the Go ADK's `skill.Parse` decodes the `SKILL.md` frontmatter with `KnownFields(true)` and knows the agentskills.io fields only, so one field outside that set — Claude Code's `user-invocable`/`argument-hint`, a top-level `version:` — failed the whole agent's golden boot (`failed to load skills: invalid frontmatter … field user-invocable not found in type skill.Frontmatter`); on gazelle's cut-over (2026-09-13) `sre-agent` (four private `giantswarm/claude-code` skills) and `vera` (`loomora-marketplace-data` with `version:`) stayed unrunnable while the same skills had loaded on kagent 0.10's Python runtime, whose `Frontmatter` allows extra fields (giantswarm/giantswarm#37772). The runtime now hands the ADK a filesystem view (`go/adk/pkg/skillfs.Lenient`) in which every skill's `SKILL.md` carries only the fields the ADK knows; the ADK's parser, validation (`name`/`description` required, directory name must match) and resource rules stay the single authority, `metadata` is untouched, and a `SKILL.md` the filter cannot read as frontmatter is served unchanged so the ADK reports it as before | to file — prepared in the fork: branch `upstream/skills-lenient-frontmatter` (mirror `main` @ the pin `6a6b54ff` + the patch, `84fb5872`, DCO-signed, no fork references; its message is the pull-request text). google/adk-go searched 2026-09-13: no issue or PR on unknown frontmatter fields (`main` still `KnownFields(true)`; #1296/#1301 fixed the scalar `allowed-tools` form only), the agentskills.io reference validator rejects unknown fields while adk-python's `Frontmatter` allows them; kagent-dev/kagent has nothing on it. The ADK-side fix (decode without `KnownFields`) is a candidate for google/adk-go once the team reviews the queue; giantswarm/giantswarm#37742 row 43 |
4646
| `feat(models): add prompt caching for the Anthropic provider` and `test(adk): deep-copy caller objects in the prompt cache no-mutation tests` | the Go ADK sent every Anthropic request without `cache_control`, so each model call of an agent loop re-processed the whole prefix — the system prompt and tool schemas (~6 k tokens for the platform's default agent), then the growing history — at full input price and with a time to first token that followed the uncached prefix (gazelle 2026-09-14: 26 of 26 `claude-sonnet-5` requests with `cache_read.input_tokens=0`; 0.7-1.5 s to the first token at 6 k input tokens, 9.7-13.5 s at 33-40 k; one twelve-call status question re-sent 340 k input tokens for $0.73 — giantswarm/giantswarm#37788). `spec.anthropic.promptCaching` (bool) and `spec.anthropic.cacheTTL` (`5m`, `1h`) on `ModelConfig`, wired through `adk.Anthropic` to both runtimes: when on, every Messages request marks the last tool definition, the last system block and the last content block of the latest turn with `cache_control`, so each call reads its previous history from the cache and writes only the new turn, and `cache_read_input_tokens` surfaces as the usage's cached count. Opt-in upstream, as Bedrock's knob is; the platform's meta chart turns it on for every Anthropic ModelConfig it renders | kagent-dev/kagent#2788 — **open** (`a0c974bd`, `f5679c2a`), carried as a cherry-pick until upstream merges it and the next re-pin drops it; giantswarm/giantswarm#37742 row 7 |
47+
| `chore(deps): bump google.golang.org/adk/v2 to v2.3.0`, `feat(adk): honour context compaction in the Go runtime`, `feat(api): add spec.context.compaction to the v1alpha3 AgentTemplate` and `test(e2e): cover context compaction with mockllm as the summarizer` | after prompt caching (the row above) the remaining cost of a long agent turn is the model's first pass over *new* tokens: every tool result stayed in the history verbatim and the Go runtime never compacted it, because the v1alpha3 `AgentTemplate` had no compaction field and the Go ADK ignored `context_config.compaction` (the Python runtime honours it) — gazelle 2026-09-15: the status question's ten model calls grew from 6 k to 62 k input tokens, 9.2 s to the first token after 16 k new tool-result tokens and 18.8 s after 21.9 k, model time 59 of the turn's 68 s (giantswarm/giantswarm#37792). `google.golang.org/adk/v2` v2.3.0 brings native `session/compaction` — a sliding window over whole invocations, and tail retention inside an invocation: before a model call, once the prompt (the last reported prompt token count plus an estimate of what was appended since) passes `tokenThreshold`, everything but the last `eventRetentionSize` events and the turn's own question is replaced by one rolling LLM summary — and moves the OTel exporter and contrib set to v1.45.0 / v0.21.0 / v0.70.0 (no fork code changed for the bump). `spec.context.compaction` on the `AgentTemplate` (`compactionInterval`/`overlapSize`, `tokenThreshold`/`eventRetentionSize`, an optional `summarizer.modelConfig` and `promptTemplate`; CEL refuses the half configurations at admission) is compiled by the kagent and BYO compilers into `config.json`, which the Go runtime translates into the ADK runner's `compaction.Config` (a half-configured setting warns and is ignored, as on the Python runtime; a custom prompt keeps the namespaced tool names, kagent-dev/kagent#1907; the startup log reads `context compaction enabled …` or `context compaction not configured`). Off unless a template sets it, as upstream; the platform's agent chart (giantswarm/agent) sets the default every platform agent runs with | kagent-dev/kagent#2790 — **open** (`29fe49ca`, `5e8b466a`, `d734c31b`, `e5238f0f`), carried as a cherry-pick until upstream merges it and the next re-pin drops it; giantswarm/giantswarm#37742 row 7 |
4748

4849
Rules for the table: every non-`ci(fork)` row has an upstream pull request or a "to file" that
4950
giantswarm/giantswarm#37742 tracks; a row leaves when the sync drops the commit because upstream merged it

0 commit comments

Comments
 (0)