Skip to content

[latent] JsonlLogSource._extract_artifacts のバグを取り込み経路に配線する前に修正 #31

Description

@senna-lang

概要

adapters/harness/jsonl_source.py_extract_artifacts に複数のバグがあるが、現状 loci index の実経路では未使用 (registry は .detect()/.id のみ利用、実取り込みは index_file/index_opencode_db)。有効化時に顕在化する地雷として先行修正しておく。

詳細 (jsonl_source.py:116-128)

  • [json.loads(l) for l in read_text().splitlines()]空行/1行破損でセッション全 touch/rename を無言喪失 (except (OSError, JSONDecodeError): return ())。実ログは末尾空行/切詰め行を含みうる。
  • 座標空間の食い違い: read_text().splitlines() は空行/不正行を含むが、ply_start/ply_end_load_raw_entries (空行/不正行スキップ) 由来。先行する空行/欠落で entry_slice がズレ、誤った entry から touch/rename を抽出
  • read_text()/fetch_verbatim が既定エンコーディング (非UTF-8ロケールで破損)。

修正案

  • _load_raw_entries の出力を artifact 抽出にも再利用 (index_file と同様)
  • read_text(encoding="utf-8")

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3-lowLow: cleanup/UXarea:indexbugSomething isn't working

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions