[PR #371] [CLOSED] fix: prevent duplicate log entries across pages #385

Closed
opened 2026-10-29 14:22:51 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/kvcache-ai/AgentENV/pull/371
Author: @zlzGithub-0801
Created: 10/12/2026
Status: ❌ Closed

Base: main ← Head: fix/issue-353


📝 Commits (1)

  • b248e19 fix: prevent duplicate log entries across pages

📊 Changes

1 file changed (+89 additions, -12 deletions)

View changed files

📝 src/sandbox/logs.rs (+89 -12)

📄 Description

What

Fix sandbox log pagination boundary duplication while preserving a hard limit.

Why

Reusing the last log’s timestamp as the cursor could repeat boundary entries and prevent pagination from terminating.

Closes #353

Scope and non-goals

Update log query boundaries, regression tests, and API descriptions. Lossless pagination for logs sharing a millisecond is out of scope.

Design and behavior changes

Continuation queries exclude the cursor’s entire millisecond in both directions. Responses remain strictly capped by limit.

Compatibility and operations

  • Public API or generated protocol: Fields unchanged; cursor semantics are now exclusive.
  • Configuration or defaults: N/A
  • Snapshot manifest, artifact layout, or storage format: N/A
  • Upgrade and rollback: N/A
  • Host requirements, permissions, ports, or dependencies: N/A

Validation

  • make fmt
  • make clippy
  • make test-unit
  • Relevant Rust integration tests
  • make -C services test (required when services/ changes)
  • Generated clients/server regenerated with the documented make target
  • Documentation updated
  • Benchmarks or performance comparison completed

Skipped checks and reasons:

Full unit/integration suites and benchmarks were not run; validation focused on log pagination. Go tests are not applicable.

Risks and reviewer notes

  1. Cursor behavior now differs from E2B: continuation excludes the cursor millisecond, so clients should not additionally advance it by 1ms.
  2. Missing-log behavior is not fixed: a hard limit can split a millisecond’s logs, and continuation skips any remaining entries in that millisecond.

Checklist

  • The PR contains one coherent change and no unrelated formatting or refactoring.
  • New behavior is covered by tests, or I explained why testing is impractical.
  • Logs and examples contain no credentials, tokens, or private registry information.
  • I did not manually edit generated code without updating its source and regenerating it.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/kvcache-ai/AgentENV/pull/371 **Author:** [@zlzGithub-0801](https://github.com/zlzGithub-0801) **Created:** 10/12/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `fix/issue-353` --- ### 📝 Commits (1) - [`b248e19`](https://github.com/kvcache-ai/AgentENV/commit/b248e19d1cbefd3e31ac79203843c1cee52a5a52) fix: prevent duplicate log entries across pages ### 📊 Changes **1 file changed** (+89 additions, -12 deletions) <details> <summary>View changed files</summary> 📝 `src/sandbox/logs.rs` (+89 -12) </details> ### 📄 Description ## What Fix sandbox log pagination boundary duplication while preserving a hard `limit`. ## Why Reusing the last log’s timestamp as the cursor could repeat boundary entries and prevent pagination from terminating. ## Related issue Closes #353 ## Scope and non-goals Update log query boundaries, regression tests, and API descriptions. Lossless pagination for logs sharing a millisecond is out of scope. ## Design and behavior changes Continuation queries exclude the cursor’s entire millisecond in both directions. Responses remain strictly capped by `limit`. ## Compatibility and operations - Public API or generated protocol: Fields unchanged; cursor semantics are now exclusive. - Configuration or defaults: N/A - Snapshot manifest, artifact layout, or storage format: N/A - Upgrade and rollback: N/A - Host requirements, permissions, ports, or dependencies: N/A ## Validation - [x] `make fmt` - [x] `make clippy` - [x] `make test-unit` - [x] Relevant Rust integration tests - [ ] `make -C services test` (required when `services/` changes) - [ ] Generated clients/server regenerated with the documented `make` target - [x] Documentation updated - [ ] Benchmarks or performance comparison completed Skipped checks and reasons: Full unit/integration suites and benchmarks were not run; validation focused on log pagination. Go tests are not applicable. ## Risks and reviewer notes 1. Cursor behavior now differs from E2B: continuation excludes the cursor millisecond, so clients should not additionally advance it by 1ms. 2. Missing-log behavior is not fixed: a hard limit can split a millisecond’s logs, and continuation skips any remaining entries in that millisecond. ## Checklist - [x] The PR contains one coherent change and no unrelated formatting or refactoring. - [x] New behavior is covered by tests, or I explained why testing is impractical. - [x] Logs and examples contain no credentials, tokens, or private registry information. - [x] I did not manually edit generated code without updating its source and regenerating it. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-29 14:22:51 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
kvcache-ai/AgentENV#385
No description provided.