Skip to content

fix(submit): compact missing-client and active-time preservation warnings - #1596

Open
azestkingscrown wants to merge 1 commit into
junhoyeo:mainfrom
azestkingscrown:fix/compact-preservation-warnings
Open

azestkingscrown wants to merge 1 commit into
junhoyeo:mainfrom
azestkingscrown:fix/compact-preservation-warnings

Conversation

@azestkingscrown

@azestkingscrown azestkingscrown commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Extends the submit warning compaction introduced in #1581 to recognize and group missing-client (Preserved {client} because it disappeared from this same-device resubmit; kept {kept} tokens.) and active-time (Preserved {stored}ms active time because this same-device resubmit reported only {incoming}ms.) preservation warnings alongside daily token decrease warnings.

  • Groups missing-client warnings per client when 4 or more occur, displaying a single heading with compact date: kept pairs.
  • Groups active-time preservation warnings across days when 4 or more occur, displaying a single heading with compact date: stored -> incoming pairs.
  • Preserves every date, token count, and millisecond value without alteration or loss.
  • Warnings with fewer than 4 items and unrecognized messages remain uncompacted and are emitted verbatim.
  • Server-side accounting, high-water mark protection, and merge logic are untouched.

Closes #1593

Evidence

  • Unit tests in crates/tokscale-cli/src/submission_warnings.rs verify compaction for disappeared clients, active-time decreases, short groups (< 4), invalid dates/values, and mixed warning lists preserving relative order.
  • CLI integration test test_submit_compacts_missing_client_and_active_time_preservation_warnings in crates/tokscale-cli/tests/cli_tests.rs tests synthetic HTTP submit response containing mixed warnings.
  • cargo fmt --check passes.
  • cargo clippy --locked -p tokscale-cli --all-features --all-targets -- -D warnings passes without warnings.
  • cargo test -p tokscale-cli --bin tokscale passes (1,764 passed, 1 ignored).
  • TZ=UTC cargo test -p tokscale-cli --test cli_tests passes (221 passed).

Summary by cubic

Extends submit warning compaction to also group missing-client and active-time preservation warnings alongside daily token decreases. Closes #1593.

When 4 or more warnings of the same kind occur, they're now compressed into a single heading with date: kept or date: stored -> incoming details. Groups under 4 items and unrecognized messages are still printed verbatim. All dates, token counts, and millisecond values are preserved; server-side accounting, high-water mark protection, and merge logic are untouched.

Written for commit 962d18f. Summary will update on new commits.

View guided diff

…ings

Extend submit warning compaction to group disappeared-client warnings per client and active-time warnings across days when 4 or more occur, preserving all dates and values.
@vercel

vercel Bot commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
tokscale Ready Ready Preview Nov 2, 2026 11:10am UTC

Request Review

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

No issues found across 2 files

View guided diff | Re-trigger cubic

This branch was successfully deployed

1 active deployment
Preview — 962d18f0 Deployed Nov 2, 2026 by vercel[bot]
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.

submit: extend #1581 compaction to missing-client and active-time preservation warnings

1 participant