rosemarYuan commented on code in PR #887:
URL: https://github.com/apache/flink-agents/pull/887#discussion_r3726483376
##########
docs/content/docs/development/memory/sensory_and_short_term_memory.md:
##########
@@ -291,9 +291,13 @@ Short-term memory can be configured with a time-to-live
(TTL) so that older stat
Set `short-term-memory.state-ttl.ms` to a value greater than 0 in milliseconds
to enable TTL. You can also configure how the TTL is refreshed and whether
expired state can be returned before Flink cleans it up:
-- `short-term-memory.state-ttl.update-type`: controls whether TTL is refreshed
on create/write or on read/write.
+- `short-term-memory.state-ttl.update-type`: controls whether TTL is refreshed
on create/write (`ON_CREATE_AND_WRITE`) or on read/write (`ON_READ_AND_WRITE`,
the default).
- `short-term-memory.state-ttl.visibility`: controls whether expired memory is
never returned or may be returned if it has not been cleaned up yet.
+{{< hint warning >}}
+The default `ON_READ_AND_WRITE` update type extends an entry's lifetime
whenever it is read. This also applies when producing the run-begin snapshot
used by [Memory Events]({{< ref "docs/development/memory/memory_events" >}}):
if you opt in through `agent-run.begin-event`, each input scans the key's
short-term memory and refreshes TTL for the entries it reads, although only
value nodes are included in the event. Choose `ON_CREATE_AND_WRITE` when
entries should expire based only on writes.
Review Comment:
Thanks @wenjin272 for the detailed follow-up. I’ve addressed all of the
latest comments locally and organized the changes into four fixup commits:
1. Added an action-scoped observation ID to prevent LTM records from being
attributed across interleaved actions on the same key, including continuation,
recovery, and failed-action cleanup paths.
2. Corrected the stale Javadocs, user documentation, PR description, and
test summary to match the current implementation.
3. Rebased the branch onto the latest main and resolved the resulting
conflicts while preserving the intended behavior and test coverage.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]