Skip to content

perf(cache): replace MinerEvaluationCache deepcopy with targeted copies#839

Open
MkDev11 wants to merge 3 commits intoentrius:testfrom
MkDev11:fix/issue-785-cache-shallow-copy
Open

perf(cache): replace MinerEvaluationCache deepcopy with targeted copies#839
MkDev11 wants to merge 3 commits intoentrius:testfrom
MkDev11:fix/issue-785-cache-shallow-copy

Conversation

@MkDev11
Copy link
Copy Markdown
Contributor

@MkDev11 MkDev11 commented Apr 28, 2026

Summary

Replaces the MinerEvaluationCache deep-copy path with targeted cache-safe copies.

MinerEvaluationCache.store() and get() no longer copy the entire evaluation tree, including nested PR/file payload objects. The cache now preserves scoring and identity state, isolates mutable PR/issue/mirror objects from source and returned evaluations, clears github_pat, and drops heavy legacy/mirror file payloads that are not needed for cached fallback UIDs.

This also covers the current mirror PR shape on test, so cached mirror evaluations do not retain ScoredMirrorPR.files[*].head_content / base_content.

Related Issues

Closes #785

Type of Change

  • Bug fix
  • New feature
  • Refactor
  • Documentation
  • Other (describe below)

Testing

  • Tests added/updated
  • Manually tested

Checklist

  • Code follows project style guidelines
  • Self-review completed
  • Changes are documented (if applicable)

@xiao-xiao-mao xiao-xiao-mao Bot added the enhancement New feature or request label Apr 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

perf(cache): replace deepcopy in MinerEvaluationCache with shallow copy

1 participant