Skip to content

feat(recall): ENGRAPHIS_RECALL_NARROW_ARM opt-in for lower-latency small-k recall - #191

Merged
Coding-Dev-Tools merged 1 commit into
mainfrom
feat/recall-narrow-arm
Sep 3, 2026
Merged

feat(recall): ENGRAPHIS_RECALL_NARROW_ARM opt-in for lower-latency small-k recall#191
Coding-Dev-Tools merged 1 commit into
mainfrom
feat/recall-narrow-arm

Conversation

@Coding-Dev-Tools

Copy link
Copy Markdown
Owner

feat(recall): ENGRAPHIS_RECALL_NARROW_ARM opt-in

Rescued from ship/c5-narrow-arm-opt-in (abf92400) and rebased onto current main (post-#187/#189). 2 files, +221/−18: engraphis/core/recall.py + new tests/test_recall_narrow_arm_opt_in.py.

What it does

When the operator sets ENGRAPHIS_RECALL_NARROW_ARM to any non-empty, non-zero value, prompt-only recall for small-k callers (k ≤ 20) switches to a narrower first arm:

  • first page: max(candidate_k, min(50, candidate_k * 2)) — ~2× less work at k=8 (16 vs 32)
  • escalation ceiling: max(first_page, min(PROMPT_ONLY_MAX_CANDIDATES, candidate_k * 4)) — the second page can't silently undo the savings

The default wider arm (candidate_k + min(250, candidate_k * 3)) is untouched for everyone else, and the k ≤ 20 gate exists because the regression that motivated the widening only showed up on small-k callers; larger-k callers need full widening to find approved evidence.

Integration notes (conflict resolution vs #187/#189)

The commit conflicted with main's post-#189 arm-cap machinery. The combined block:

Verification

  • tests/test_recall_narrow_arm_opt_in.py: 6 passed on this branch
  • Full recall regression family green: test_recall (37), test_recall_arm_candidate_k_cap, test_planned_recall, test_recall_release, test_release_recall_contract
  • ruff clean on touched files
  • Default behavior unchanged unless the env var is set (fail-safe for the shipped 1.7 evidence)

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@Coding-Dev-Tools
Coding-Dev-Tools merged commit a7a9fe4 into main Sep 3, 2026
23 checks passed
@Coding-Dev-Tools
Coding-Dev-Tools deleted the feat/recall-narrow-arm branch September 3, 2026 14:14
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