You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
import-test-result-log <log> now finishes an interrupted upload instead of creating a second report.
Every upload records what reached the server in a tracking sidecar beside the log (<log>.jsonl.tracking). A re-run reuses the report the earlier attempt created and sends only the missing entries; a fully uploaded log is a no-op. Resuming needs that report to still exist, so if it was deleted or the sidecar came from another environment the command fails and points at --new-report.
--new-report, and import_log_file(..., new_report=True), abandons the partial upload and creates a new report. The old sidecar moves to .tracking.bak so the abandoned report's ID stays recoverable.
import-test-result-log is now two modes, and the help text, docstrings, and guide all name the same two:
Mode
How to get it
Who it is for
New upload
default, nothing uploaded yet
First upload of a log
Resume
default, sidecar records an interrupted upload
Anyone re-running after an interruption
The third mode is gone from the public command. --incremental followed a log while the run writing it was still going, which only the plugin's background worker has a reason to do, and it ticked until stdin closed rather than stopping at the end of the log, so it was never a way to finish an interrupted upload and appeared to hang when run by hand. That mode now runs as an internal worker module the plugin spawns for itself, reachable by no flag. Anything passing --incremental by hand should drop it, since the default path resumes.
The two entry points share their connection arguments, client construction, and failure hint through one internal module rather than a copy each, and the worker no longer imports the report-context chain at startup, which was roughly 190 ms of pandas it needs only on the failure path.
16 new tests cover batch progress recording, resume through both paths, partially created batched measurement lines, the completed no-op, --new-report, the error paths, and the worker's follow mode, where an idle tick stays silent and never marks a growing log complete. 214 tests pass across the replay, session-artifact, report-context, and plugin suites. Also checked end to end against a plugin-produced offline log: an upload interrupted partway resumes to the same 63 entities as a clean run, with no duplicate report.
claude review:
The docstring says the live worker leaves resuming False because EOF of a growing file isn’t end-of-run. The code does the opposite: after the first successful worker tick, last_uploaded_line > 0 forces resuming=True, so every subsequent tick (including idle ones) sets complete=True.
Failure mode:
Plugin worker uploads some lines under --incremental
Worker is killed mid-suite; sidecar has complete=True and a partial id_map
User runs the recovery hint: import-test-result-log
Default path sees tracking.complete → returns empty ReplayResult as a no-op
Remaining lines never upload
The PR description claims a test that “an idle tick … never marks a growing log complete.” That test is not in the tree — and the current code would fail it.
This used to be only a “skip CreateTestReport missing” guard. The PR overloaded that flag to also mean “log is final.” Split them
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
import-test-result-log <log>now finishes an interrupted upload instead of creating a second report.Every upload records what reached the server in a tracking sidecar beside the log (
<log>.jsonl.tracking). A re-run reuses the report the earlier attempt created and sends only the missing entries; a fully uploaded log is a no-op. Resuming needs that report to still exist, so if it was deleted or the sidecar came from another environment the command fails and points at--new-report.--new-report, andimport_log_file(..., new_report=True), abandons the partial upload and creates a new report. The old sidecar moves to.tracking.bakso the abandoned report's ID stays recoverable.import-test-result-logis now two modes, and the help text, docstrings, and guide all name the same two:The third mode is gone from the public command.
--incrementalfollowed a log while the run writing it was still going, which only the plugin's background worker has a reason to do, and it ticked until stdin closed rather than stopping at the end of the log, so it was never a way to finish an interrupted upload and appeared to hang when run by hand. That mode now runs as an internal worker module the plugin spawns for itself, reachable by no flag. Anything passing--incrementalby hand should drop it, since the default path resumes.The two entry points share their connection arguments, client construction, and failure hint through one internal module rather than a copy each, and the worker no longer imports the report-context chain at startup, which was roughly 190 ms of pandas it needs only on the failure path.
16 new tests cover batch progress recording, resume through both paths, partially created batched measurement lines, the completed no-op,
--new-report, the error paths, and the worker's follow mode, where an idle tick stays silent and never marks a growing log complete. 214 tests pass across the replay, session-artifact, report-context, and plugin suites. Also checked end to end against a plugin-produced offline log: an upload interrupted partway resumes to the same 63 entities as a clean run, with no duplicate report.