Commit 5a00886
committed
fix(api): attach SessionsConfig so smart truncation stops dropping records
`SessionsConfig` was defined but never added to `AgentaConfig`, so reading
`env.agenta.sessions.records.smart_truncation` raised AttributeError. That read
sits inside the record-publish try/except, whose handler logs and returns False,
so with AGENTA_RECORDS_SMART_TRUNCATION on every record over the 64 KB cap was
discarded outright. The legacy path it replaces at least stored a marker, and
records are now the only copy of the conversation, so a dropped record is lost
context.
The existing tests call `_truncate_attributes` directly and never read the flag,
which is why they stayed green while the feature was unreachable. Added a guard
that pins the config path itself.
Claude-Session: https://claude.ai/code/session_01KM69J7uHafgciiN5zfG7qR1 parent 882eebc commit 5a00886
2 files changed
Lines changed: 12 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
539 | 539 | | |
540 | 540 | | |
541 | 541 | | |
| 542 | + | |
542 | 543 | | |
543 | 544 | | |
544 | 545 | | |
| |||
Lines changed: 11 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
71 | 71 | | |
72 | 72 | | |
73 | 73 | | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
0 commit comments