GoogleCloudPlatform / GoogleCloudPlatform/BigQuery-Agent-Analytics-SDK
adk-2.0 producer: emit EVENT_COMPACTION from actions.compaction
- Dominant language
- Python
- Stars
- 47
- Forks
- 21
- Avg merge
- 2d 13h
- Merged PRs (30d)
- 33
Description
Parent tracker: #190 (v15 contract).
Wave: 2 — Producer event rows.
Blocked by: #194 (EventData source-event plumbing).
## Contract
In `on_event_callback`, when `event.actions.compaction` is non-null, emit an `EVENT_COMPACTION` event with exactly the three fields ADK exposes:
- `content = {start_timestamp, end_timestamp, compacted_content}`.
**Do not** require the producer to compute an affected-row count — the consumer derives it from the timestamp window in the `compaction_windows` view (C6).
**Timestamp note for downstream:** ADK exposes these as float epoch seconds (`event_actions.py:42-45`). The producer passes them through as-is; the consumer view is responsible for the BQ `TIMESTAMP` conversion (C6).
## Acceptance
- [ ] `EVENT_COMPACTION` emitted exactly once per `compaction` action.
- [ ] Content payload preserves all three fields as ADK provides them.
- [ ] Fractional seconds in the timestamps survive serialization (no implicit truncation).
## References
- #190 (v15 producer §5).
- `src/google/adk/events/event_actions.py:99` (`compaction: EventCompaction`).
Contributor guide
Assessment
This issue has not been assessed yet.