← Back to Pull requests

fix(test): restore the e2e model's context window between tests #689

Closed
unknown closed this pull request without merging on Oct 19, 2026 07:31 UTC
View on GitHub
unknown unknown commented on Oct 18, 2026 22:52 UTC
Author

Why main is red

Not a flake. Since #684 the daemon honors a request's num_ctx, and Cline's Ollama provider sends 32768 (its ollamaApiOptionsCtxNum default, checked in cline@2.18.0). The e2e suite shares one daemon warmed at 262144, so after the Cline test the model is reloaded at 32768 for every later test (daemon log: loaded with a context of 262144; unloading it to load it with 32768):

  • launch_hermes_with_model: context window of 32,768 tokens, which is below the minimum 64,000 required by Hermes Agent.

  • launch_qwen_with_model: request (38105 tokens) exceeds the available context size (32768 tokens).
  • That failed 7 of 8 E2E targets on the latest main run.

    Fix

  • tests/launch_e2e.rs: warm_model records the window the model loads with; before each test the model is reloaded unless it has at least that window (an idle model loads at the default). A live daemon that will not unload the model fails the warm-up instead of setting a wrong baseline.

  • daemon::running_context_length: reads the window from /api/ps without loading an idle model (split out of loaded_context_length).

  • README: shorter runtime wording.
  • Verification

  • Reproduced locally with a real Hermes install: one /api/chat with num_ctx: 32768, then llmman launch hermes fails with the CI message. With the fix launch_hermes_with_model passes against a pre-shrunk daemon.

  • A throwaway test (not committed) checked the shrink, the reload to 262144, and that an idle model is not loaded by the check.

  • fmt and clippy clean; PR build + test jobs green.

  • e2e is skipped on PRs, so it was dispatched on this branch: https://github.com/llmmanorg/llmman/actions/runs/39182143004
  • Not addressed: launch hermes still fails with Hermes's own 64K error if another client leaves a model loaded below 64K. That is a launcher decision.

    Diff: 231 lines (+173 / -58) across 2 files Reviewer: ericcurtin Review duration: 518m
    All Vouch review confidence checks passed
    Residual risk 0.15 = Change Risk (0.37) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.37 · 231 lines diff across 2 files
    0.37
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    60%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.326
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #689"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 60.5% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 37% (MEDIUM) · Higher = larger blast radius
    37%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 60.5% · Lower = rushed or shallow review
    60.5%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 14.6% · Safe to merge
    14.6%