Skip to content

Track the current 1.x-dev of bear/query-repository - #128

Merged
koriym merged 1 commit into
1.xfrom
track-current-query-repository
Sep 8, 2026
Merged

koriym merged 1 commit into
1.xfrom
track-current-query-repository

Conversation

@koriym

@koriym koriym commented Sep 7, 2026 •

Copy link
Copy Markdown
Collaborator

SafeSemanticLogger's constructor changed in bear/query-repository 1.x: it takes an optional
LogSinkInterface and a session store, not a delegate logger. Both places that bind the cache log
by hand passed a logger, so the current 1.x answers them with a TypeError inside the DI graph —
every oracle flow and the corpus cache test dies before it runs anything.

The lock moves from bec4c4d to 5abe573, which also brings the donut write-weaving fix
(bearsunday/BEAR.QueryRepository#215): a write annotated #[RefreshCache] used to be answered from
the cache without running.

Both bindings now use to() in Singleton scope rather than an instance. Both sites resolve the
logger from the injector, so nothing needs the instance; binding a service object also keeps DI out
of its construction and stops the injector from serialising.

Verified against the pinned 5abe573:

  • ./vendor/bin/phpunit tests/Resource/AgentCorpusCacheTest.php — 4 tests, 10 assertions, green
  • GATE_SUITE=0 ./var/loop/verify-all.sh — 12 flows ok, exit 0. The library line reads
    NOT A CHECKOUT, which is what a dist install looks like; the verdict is not attributed to a
    library commit
  • composer cs:php fails on 4 files, identically before and after this branch (pre-existing
    getenv() violations, none of them touched here)

composer.lock also records my-vendor/be-mart-be's path-package hash as recomputed on a clean
checkout.

Summary by CodeRabbit

  • テスト

    • キャッシュログ用ロガーのテスト構成をシングルトン方式に変更しました。
  • 改善

    • キャッシュログのロガー構成を統一し、安定した動作を実現しました。

SafeSemanticLogger's constructor changed there: it takes an optional
LogSinkInterface and a session store, not a delegate logger. Both places
that bind the cache log by hand passed a logger, so the release
candidate answers them with a TypeError before a single flow runs -
every oracle flow and the corpus cache test died in the DI graph.

Bound with to() in Singleton scope instead of an instance: the two
sites resolve the logger from the injector, and a service object on a
binding keeps DI out of its construction and stops the injector from
serialising.

Verified against the pinned 5abe573: tests/Resource/AgentCorpusCacheTest
4 tests green, and the gate reports 12 flows ok with exit 0 (the library
line reads NOT A CHECKOUT, which is what a dist install looks like).

composer.lock also records my-vendor/be-mart-be's path-package hash
recomputed on a clean checkout.
@koriym

koriym commented Sep 7, 2026

Copy link
Copy Markdown
Collaborator Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Sep 7, 2026 •

Copy link
Copy Markdown

Review Change Stack

Important

Review skipped

No new commits to review since the last review.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Team

Run ID: 53dd5d29-5153-465b-a0ba-979fdc9fe04c

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

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Team

Run ID: 0d4a5e6e-0f53-4534-9415-00f3ded47b9f

📥 Commits

Reviewing files that changed from the base of the PR and between 80a150e and 404ed8d.

⛔ Files ignored due to path filters (1)
  • composer.lock is excluded by !**/*.lock, !composer.lock
📒 Files selected for processing (2)
  • tests/Resource/AgentCorpusCacheTest.php
  • var/loop/verify-cache.php

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

キャッシュログ用のSafeSemanticLogger束縛を、生成済みインスタンスからRay.Diのシングルトンスコープ付きクラス束縛へ変更しました。テストとキャッシュ検証スクリプトの両方を更新しました。

Changes

キャッシュログ束縛

Layer / File(s) Summary
SafeSemanticLoggerのシングルトン束縛
tests/Resource/AgentCorpusCacheTest.php, var/loop/verify-cache.php
CacheLog付きのSemanticLoggerInterfaceをSafeSemanticLoggerのシングルトン束縛へ変更しました。不要なSemanticLoggerのimportを削除し、Scopeのimportを追加しました。

Estimated code review effort: 2 (Simple) | ~5 minutes

Merge Risk: ⚪ Minimal · up to 404ed

The dependency update adapts cache-log logger construction to injector-managed singleton bindings and includes the cache-refresh fix. The updated cache test and verification script cover the binding change, with no current merge-blocking risk identified.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 3 functions across 2 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed タイトルは、bear/query-repository を現在の 1.x-dev に更新する主な変更内容を明確かつ簡潔に示しています。
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch track-current-query-repository

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.

@coderabbitai

coderabbitai Bot commented Sep 7, 2026 •

Copy link
Copy Markdown
⚠️ Action not completed

Already reviewed the last commit. Use @coderabbitai full review to rerun a review of the entire changeset.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@koriym
koriym merged commit ba992f5 into 1.x Sep 8, 2026
2 checks passed
@koriym
koriym deleted the track-current-query-repository branch September 8, 2026 01: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