Summary
The current logs polling logic treats every previously seen line as globally unique.
If the application prints the same message twice at different times, the later occurrence is hidden from the user.
Steps To Reproduce
- Deploy an app that prints the same line multiple times
- Run the logs flow.
- The first occurrence is shown.
- Later identical occurrences are skipped because the string already exists in (logsTill).
Expected Behavior
Repeated identical lines should still appear if they occur again later in the log stream.
Actual Behavior
The CLI hides later occurrences of the same line, making log output incomplete and misleading.
Proposed Fix
- Track the last emitted position instead of using global string membership.
- Compare by appended tail or line index/count rather than content-only deduplication.
- Add a unit test where the same line appears multiple times across polling iterations.
Summary
The current logs polling logic treats every previously seen line as globally unique.
If the application prints the same message twice at different times, the later occurrence is hidden from the user.
Steps To Reproduce
Expected Behavior
Repeated identical lines should still appear if they occur again later in the log stream.
Actual Behavior
The CLI hides later occurrences of the same line, making log output incomplete and misleading.
Proposed Fix