← Back to Pull requests

fix(memory): treat a zero episode limit as no recall #3660

Open
unknown opened this pull request with 150 lines diff across 1 files
View on GitHub
unknown unknown commented on Nov 14, 2026 01:56 UTC
Author

Why are these changes needed?

EpisodicMemoryPolicy(max_episodes=0) currently uses entries[-0:], which injects all past conversation summaries. Return the original prompt and history before reading the store when the limit is zero.

Related issue number

No matching issue found. Reproduced on upstream main.

Checks

  • Added regression coverage. The new regression verifies that a nonempty store injects no past episodes when the cap is zero. The existing positive-limit tests still pass. Assembly and policy tests passed (61 tests).

  • Ruff lint and format, the project license-header check, and git whitespace checks passed on the changed files.

  • All GitHub checks have passed.
  • AI assistance

    Codex assisted with the investigation, changes, tests, and description. Validation was performed against the upstream baseline and the proposed fix. Human contributor attestations are left to the account owner.

  • I understand the changes in this PR and can explain them in my own words.

  • I have verified that the PR description accurately reflects the actual diff.

  • If AI assistance was used, I reviewed, tested, and validated the generated code/text before submitting.
  • Diff: 150 lines (+112 / -38) across 1 files Reviewer: its-amann Review duration: 20357m
    All Vouch review confidence checks passed
    Residual risk 0.19 = Change Risk (0.33) × (1 − Review Confidence (0.43)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.33 · 150 lines diff across 1 files
    0.33
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.02 · 1 substantive comment(s)
    0.02
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    42%
    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
    Shallow Review Depth shallow_review_depth
    0.344
    Diff Size diff_size
    0.300
    Real PR Conversation Timeline
    1 comments
    "Review active on #3660"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 43.0% 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: 33% (LOW) · Higher = larger blast radius
    33%
    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: 43.0% · Lower = rushed or shallow review
    43.0%
    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: 18.8% · Safe to merge
    18.8%
    Repository