Skip to content

fix(hashline-edit): scope formatter cache by directory#2804

Merged
code-yeongyu merged 1 commit intodevfrom
fix/b2-hashline-formatter-cache-per-project
Mar 24, 2026
Merged

fix(hashline-edit): scope formatter cache by directory#2804
code-yeongyu merged 1 commit intodevfrom
fix/b2-hashline-formatter-cache-per-project

Conversation

@code-yeongyu
Copy link
Copy Markdown
Owner

@code-yeongyu code-yeongyu commented Mar 24, 2026

Problem

The hashline formatter cache used a single global variable not keyed by directory. The first project's formatters won for all subsequent projects in the same process. Transient config failures were also cached permanently.

Fix

  • Key the formatter cache by project directory
  • Don't cache transient config.get() failures
  • Added regression test for multi-project isolation

Review

All 5 review-work lanes passed (goal, QA, code quality, security, context mining).
Tests passed, typecheck passed, build passed.


Summary by cubic

Scopes the hashline formatter cache by project directory and avoids caching transient config failures. This prevents one project's formatter settings from affecting others in the same process.

  • Bug Fixes
    • Cache formatters per normalized directory to isolate projects.
    • Do not cache when config.get() errors or returns no data; retry on next call.
    • Added tests for multi-project isolation and non-caching of failures.

Written for commit 6da4d2d. Summary will update on new commits.

Copy link
Copy Markdown

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 2 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Auto-approved: Fixes cache pollution across projects and prevents caching of transient failures. Includes regression tests and passes all CI checks without introducing risks.

@code-yeongyu code-yeongyu merged commit bfa8fa2 into dev Mar 24, 2026
8 checks passed
@code-yeongyu code-yeongyu deleted the fix/b2-hashline-formatter-cache-per-project branch March 24, 2026 15:32
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