watch liveness check resolves relative source identities against process CWD instead of watch root

オープン 初心者向け
#4,896 コメント 5 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
78/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
python
領域
devtools

調査の方向性

まず、source identities を評価する watch liveness check と、watch-root-relative paths を処理する呼び出し箇所を特定する。作業ディレクトリを一時的なプロジェクトディレクトリに設定し、その後 home directory に設定して再現し、既存ファイルが誤って削除済みとして扱われることを確認する。watch root を基準としたパス解決を修正し、要求されたパラメタライズされたリグレッションテストを追加する。完了条件は、既存ファイルが alive のまま維持されること、実際に削除されたファイルでは引き続き fail-closed refusal が発火すること、および作業ディレクトリの両方のケースでテスト Passing すること。

索引モデルが issue の本文から書いたものです。

説明

Version 0.9.93, macOS, daily job under launchd.

SYMPTOM: incremental code rebuild refuses to overwrite (fail-closed, saved semantic nodes missing) only when run under the scheduler; the same rebuild from a shell rooted at the watch root succeeds.

ROOT CAUSE: the alive check does Path(identity).exists() where identity is a watch-root-relative source path. Under launchd with WorkingDirectory set to the home dir, existing files (e.g. memory slash plan docs) resolve to a nonexistent absolute path, are judged deleted, their semantic nodes are evicted, and fail-closed correctly refuses the write. Manual runs succeed only because the shell CWD happens to equal the watch root.

SUGGESTED FIX: resolve against the watch root at the call site (watch_root.joinpath(relative_id).exists()), not bare Path(relative_id).exists(). Prefer this over storing absolute identities (keeps watches relocatable, avoids leaking home-dir layout into stored state).

REGRESSION TEST: parametrize CWD (project tmp dir vs home dir), assert an existing file stays alive and a truly-deleted file still trips refusal.

主要言語
Python
スター
124k
フォーク
11.9k
平均マージ
2時間 35分
マージ済み PR(30日)
6

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

Graphify-Labs/graphify のほかの issue

Graphify-Labs/graphify の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。