Skip to content

feat: struggle nudge, answer cache, review throughput hardening - #159

Draft
georgenijo wants to merge 9 commits into
mainfrom
cursor/struggle-cache-review-throughput-ced1
Draft

georgenijo wants to merge 9 commits into
mainfrom
cursor/struggle-cache-review-throughput-ced1

Conversation

@georgenijo

@georgenijo georgenijo commented Jul 8, 2026 •

Copy link
Copy Markdown
Owner

Summary

Three product lifts on the autonomous mesh spine, planned and landed in parallel:

5 — Struggle → ask-the-expert nudge

Worker NDJSON stream observer detects repeated same-path edits / repeated test-failure fingerprints and fires an async mesh ask to an expert (never blocks Run()). Answer lands in .mesh_expert_hint for PostToolUse / prompt injection.

  • Opt-in: MESH_STRUGGLE_NUDGE=on
  • Role: MESH_STRUGGLE_ROLE → MESH_REVIEW_ROLE → architect
  • Caps: edit/test repeat, cooldown, max asks

6 — Exact-match answer cache (#29 slice)

Persisted answer-cache KV. Expert drainInbox looks up (role, q, ctx) before ExpertFunc; hits publish AnswerPayload.Cached=true and skip the LLM. Writes go through the shared recordAndPublishAnswer path.

  • Opt-in: MESH_ANSWER_CACHE=on (TTL default 15m)
  • Tickets KV remains the FSM authority

7 — Review throughput hardening

#123 pool + #125 readiness already shipped. This adds:

Decisions logged in docs/decisions/DECISIONS.md.

Test plan

  • make ci green
  • Unit: struggle heuristics, answercache key/TTL, coordinator redeliver retry
  • E2E: answer cache hit skips LLM; cold-start auto-review
  • Settings overlay / Validate fixtures updated for new knobs
Open in Web Open in Cursor 

Env/config fields for Features 5–6, BucketAnswerCache + AnswerPayload.Cached,
and persist the answer-cache bucket alongside jobs/tasks.

Co-authored-by: George Nijo <georgenijo@users.noreply.github.com>
@coderabbitai

coderabbitai Bot commented Jul 8, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: c981eabd-066a-45d7-9341-d66b79cc66f7

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch cursor/struggle-cache-review-throughput-ced1

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

cursoragent and others added 8 commits July 8, 2026 22:07
Expert drainInbox skips LLM on role+q(+ctx) hit;
tickets KV stays authority. Opt-in via MESH_ANSWER_CACHE.

Refs #29 Feature 6

Co-authored-by: George Nijo <georgenijo@users.noreply.github.com>
After autoExpertReadyWait expires without BucketExpertReady, still
re-deliver pending review requests and schedule spaced follow-ups so a
late ServeReviews subscription catches the cold first review. Adds unit
coverage, cold-start auto-expert review e2e, and STATUS/#85 doc sync.

Co-authored-by: George Nijo <georgenijo@users.noreply.github.com>
Stream observer detects edit/test loops from NDJSON tool
events, auto-asks async (no Run block), writes .mesh_expert_hint.

Co-authored-by: George Nijo <georgenijo@users.noreply.github.com>
ValidateRecord overlays onto defaultConfig then runs config.Validate;
zero struggle/answer-cache fields made every settings Put fail.

Co-authored-by: George Nijo <georgenijo@users.noreply.github.com>
Co-authored-by: George Nijo <georgenijo@users.noreply.github.com>
Co-authored-by: George Nijo <georgenijo@users.noreply.github.com>
Bare timing-only fixtures made staged settings fail Validate and
silently skip overlay — the restart test was a false pass.

Co-authored-by: George Nijo <georgenijo@users.noreply.github.com>
Co-authored-by: George Nijo <georgenijo@users.noreply.github.com>
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.

2 participants