Dropped extracted decisions and preferences still write their steps and entities
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 66/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- python, typescript
調査の方向性
Start with _assemble in src/selfgraph/extraction/extractor.py, focusing on the decision and preference loops and how add_relation and resolve() register writes. Reproduce both cases from the issue against embedded Kuzu, then inspect the relevant extraction tests. Done when dropped items leave no relations or fallback entities in the graph, while valid items still persist.
索引モデルが issue の本文から書いたものです。
説明
What happens
When insert.text drops an extracted decision or preference as invalid, parts of it are still written:
- A decision dropped for an empty or control-character title still writes the relations its
stepsnamed. - A preference dropped for a bad
strengthorkeystill creates its subject and value asThingentities.
The warning says the item was dropped, but the graph holds what the item created.
Reproduce
On main (5a277c9), embedded Kuzu:
import asyncio, tempfile
from selfgraph import KuzuStore, SelfGraph
class LLM:
def __init__(self, **replies):
self.replies = replies
async def generate(self, *, system, user, output):
kind = next(iter(output.model_fields))
return {kind: self.replies.get(kind, [])}
async def run(llm):
with tempfile.TemporaryDirectory() as tmp:
async with SelfGraph(store=KuzuStore(f"{tmp}/g.kuzu"), llm=llm) as g:
r = await g.insert.text("x")
print([w.message for w in r.warnings])
print([e.id for e in r.entities], [(x.from_entity, x.type, x.to_entity) for x in r.relations])
asyncio.run(run(LLM(
entities=[{"type": "Person", "name": "Ann"}, {"type": "Company", "name": "Acme"}],
decisions=[{"title": "", "actor_name": "Ann", "steps": [{"from_name": "Ann", "type": "CHOSE", "to_name": "Acme"}]}],
)))
asyncio.run(run(LLM(
preferences=[{"subject_name": "Zed", "key": "food", "value_name": "Pizza", "strength": 5.0}],
)))
The first run warns dropped an extracted decision: decision title cannot be empty and stores person:ann -CHOSE-> company:acme. The second warns about the strength and stores thing:zed and thing:pizza.
Cause
src/selfgraph/extraction/extractor.py, _assemble: the decision loop calls add_relation for each step, and the preference loop calls resolve() (which registers fallback entities), before the item's own checks run. Validating the item first, or registering its writes only once it is accepted, would fix both.
- 主要言語
- TypeScript
- スター
- 173
- フォーク
- 58
- 平均マージ
- 6時間
- マージ済み PR(30日)
- 120
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
hydra-db/selfgraph のほかの issue
-
approved-for-pr area: cli-mcp area: errors bug effort: S P3
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
hydra-db/selfgraph#401 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
approved-for-pr area: errors area: store bug effort: S P3
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
hydra-db/selfgraph#398 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
approved-for-pr area: errors area: write bug effort: S P3
難易度 2/5 1〜3時間 初心者へのやさしさ 77/100
hydra-db/selfgraph#392 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
approved-for-pr area: parity area: write bug effort: S P3
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
hydra-db/selfgraph#391 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
メンテナーはふだん 1 日以内に返信
hydra-db/selfgraph の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 77/100
code-yeongyu/senpi#7139 ·
メンテナーはふだん 1 日以内に返信
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
難易度 1/5 1〜3時間 初心者へのやさしさ 72/100
lingdojo/kana-dojo#34395 · コメント 1 件 · リアクション 5 件 ·
メンテナーはふだん 1 日以内に返信
-
bug status: needs triage
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
mastra-ai/mastra#31093 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
area:web p2 product:business triage:active type:bug
難易度 1/5 1時間未満 初心者へのやさしさ 89/100
cuadrao-ai/argus#2328 ·
メンテナーはふだん 1 日以内に返信
-
bug frontend good first issue help wanted
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
nikhilb2/simple_invoicing#907 ·