Skip to content

test: remove wall-clock waits from usage stats - #883

Merged
V3RON merged 8 commits into
mainfrom
fix/865-deterministic-usage-e2e
Oct 22, 2026
Merged

V3RON merged 8 commits into
mainfrom
fix/865-deterministic-usage-e2e

Conversation

@V3RON

@V3RON V3RON commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

Problem

Overview and Usage presentation tests waited for the next minute boundary before reading completed stats.

Result

Prepare completed historical usage rows while the daemon is stopped, then restart it. Require strict stop, socket removal and process exit before editing the history database. Keep the UI and CLI assertions against real daemon output. Console fixture disposal escalates failed graceful cleanup and verifies exit before home removal.

Validation

  • Overview/Usage Console cases: 12 passed after final changes.
  • Long-install worker tabs cleanup: 1 passed.
  • Usage projection and stats E2E: 8 passed before the final Console fixture-only change.
  • Pre-commit and pre-push hooks passed.

CI status and dependency

Run 39761604557 had four Queue child-exit failures and a worker socket-removal failure; cleanup now escalates and confirms exit. Search failures were the selection race fixed in #882. This PR is based on fix/864-console-semantic-waits; retarget to main after #882 merges.

Its E2E (1/3) also got 409 instead of 201 in the second request of gateway-smoke.test.ts. That test does not use the changed Console fixture. The focused file passed on base f5aa210c (6 tests), so the CI failure remains unconfirmed. New CI is pending.

Review

Spec review: skipped. Code review: 0 blocking, 1 fixed, 0 notes. Claims review: skipped.
Rounds: 1. Tokens: n/a.

One gpt-6.1-sol verification round, following the user-requested abbreviated workflow. Sol identified missing proof of daemon shutdown before history edits. Fixed by checking stop success, socket removal and process exit. No second review round was performed.

Update after #882 and #884

Merged main. #884's cleanup in e2e/console/fixtures.ts replaces this branch's three cleanup commits (no-owner exit code, stale socket lookup, forced cleanup), so main's version is kept. prepareHistoricalUsage now also waits for the daemon process to exit, because main's stop() waits only for the socket. Overview and Usage Console specs: 57 passed locally (all three browsers).

Written by an agent.

@V3RON
V3RON marked this pull request as ready for review October 22, 2026 10:13
@V3RON
V3RON force-pushed the fix/865-deterministic-usage-e2e branch from 994cedf to 6c120e7 Compare October 22, 2026 10:35
@V3RON
V3RON changed the base branch from main to fix/864-console-semantic-waits October 22, 2026 10:35
Base automatically changed from fix/864-console-semantic-waits to main October 22, 2026 10:46
#882 and #884 landed on main; main's cleanup in e2e/console/fixtures.ts replaces this branch's
cleanup commits, and the daemon process now has to exit before history.db is edited.
@V3RON
V3RON merged commit 3ca05c5 into main Oct 22, 2026
40 checks passed
@V3RON
V3RON deleted the fix/865-deterministic-usage-e2e branch October 22, 2026 11:24
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.

1 participant