Skip to content

e2e: session.getContextUsage step races session readiness (document-narrow.spec.ts:350, U7b scene; 2 sightings) #743

Closed

Description

@SSFSKIM

What happens

A scene's session.getContextUsage step sometimes runs before the session is ready, and the scene goes red. Two sightings, with different messages:

  • 2026-11-14, U7b's 50dc123, Actions run 43554569087: session is not ready (initializing).
  • 2026-11-16, e2e/document-narrow.spec.ts:350 at :416, U10b-2's 3b7493f, e2e:document-app on the mini host (CI-opt manual gate 3b7493f-20261116T143056Z): get_context_usage was not recorded in this replay.

Both are green on a rerun of the same tree (docs/tech-debt-tracker.md, rows 42 and 43, 11-17 collection).

Likely cause (unverified)

The call races the session's readiness: the step issues the call while the session is still initializing, and the result depends on which wins. Caveat: U10b-2 adds openDraftCase to e2e/support/library-session.ts, which document-narrow imports, so the 11-16 sighting may instead belong to that change.

Work

  1. Read both failure records and decide which of the two it is: a test that calls before readiness, or a product path that should wait or answer differently while initializing.
  2. If it is the test: the step waits on the session's ready state (settle on state, never on sleep or frame waits).
  3. If it is the product: session.getContextUsage during initializing either waits for ready or returns a defined "not yet" answer the caller handles, with a unit case for the initializing state.
  4. Red first: reproduce by issuing the call during initializing.

Done when

The scene passes 20 runs in a row on the mini host under the load rule, and the cause is named in the ticket.

Activity

  1. added
    bug
    status:ready-for-implementer
    priority:P3
    status:in-progress
    and removed
    status:ready-for-implementer
    on Nov 17, 2026
  2. SSFSKIM commented on Nov 20, 2026

    @SSFSKIM
    OwnerAuthor

    [board] in-progress: batch 7, group D

  3. added
    status:in-review
    and removed
    status:in-progress
    on Nov 20, 2026
  4. SSFSKIM commented on Nov 20, 2026

    @SSFSKIM
    OwnerAuthor

    [board] in-review: batch 7, PR #804

  5. removed
    status:in-review
    on Nov 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugpriority:P3

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions