Skip to content

test(reports): cover rejected session-start pushes - #1348

Merged
jeff-r2026 merged 1 commit into
Tencent:mainfrom
ydflow:test/session-start-report-rejection
Oct 23, 2026
Merged

jeff-r2026 merged 1 commit into
Tencent:mainfrom
ydflow:test/session-start-report-rejection

Conversation

@ydflow

@ydflow ydflow commented Oct 23, 2026

Copy link
Copy Markdown
Contributor

Summary

Add the rejected-push regression requested in the #1324 review, on top of the merged #1323 fix. The existing SessionStart case covers a slow successful push; this case verifies that a delayed rejection retains unacknowledged usage and session snapshots, releases both report and sync locks, and later publishes exactly once when the remote accepts writes.

Tests only: one E2E file, using its existing real-CLI SessionStart helper. The local bare remote delays its first rejection by seven seconds, exceeding pull's five-second wait; subsequent writes reject immediately so the case does not spend seven seconds on every report category. All original receiver modes keep their behavior.

Type of Change

  • Tests only

Test Plan

  • npm run build
  • npx tsc --noEmit
  • npm run lint
  • git diff --check
  • Built-CLI E2E, with retries disabled:
npx vitest run --config vitest.e2e.config.ts src/__tests__/e2e/report-timeout.test.ts -t 'session-start|retains a rejected report' --maxWorkers=1 --retry=0

3 passed, 18 not selected: the existing direct-pull rejection/retry case, existing slow SessionStart success case, and new slow SessionStart rejection/retry case. The new case completed in about 26 seconds locally under the unchanged 60-second test deadline.

Before narrowing the fixture delay to the first rejection, the broader selection including git/claude slow direct-pull also passed (4 cases). That first version delayed every rejected report write and took about 54 seconds for the new case; the final fixture preserves the same data/lock/retry assertions with less idle waiting.

Windows / Node 24, Claude + generic Git provider, real CLI and Git subprocesses against an isolated local bare remote. No remote credentials or model calls. The full provider/agent matrix and complete unit suite were not run locally for this test-only change.

Related Issues

Follow-up to #1323 and #1322; extracts the failure-path test from #1324. The runtime fix is already in main through #1323. This PR adds regression coverage for its rejected-push path.

Signed-off-by: ydflow <314143294+ydflow@users.noreply.github.com>
@github-actions

Copy link
Copy Markdown

No findings in the specified diff.

This is a tests-only change, so no end-to-end record is required under the review rules. The PR description nevertheless documents a representative real-CLI run with retries disabled: 3 passed, including the new rejection/retry case. The documented testing is sufficient.

Review was read-only; I did not run, build, or install anything from the PR.

@jeff-r2026 jeff-r2026 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Reviewed the diff; merged locally onto main together with #1289/#1299/#1348/#1342, then ran tsc, build, the affected unit tests and e2e (redact, dashboard-collector, ai-client-openclaw, report-timeout, openclaw-ai-import): all passed.

@jeff-r2026
jeff-r2026 merged commit da9d53e into Tencent:main Oct 23, 2026
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants