config: match.ip is never evaluated and match.path never during auto-selection — documented selection criteria silently ignored
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
調査の方向性
Start with src/profiles/core/config/service.py and trace the three select_active_configuration calls named in the issue, then read matcher.py, models.py, and the template examples. Check how get_local_ip() and the working directory are obtained and how path matching is intended to work; the issue leaves the path behavior as a design choice. Done means documented IP and path criteria work as described, or the docs and examples accurately describe the supported behavior, with tests covering the chosen behavior.
索引モデルが issue の本文から書いたものです。
説明
Problem
Every production caller of select_active_configuration hardcodes empty IP and path candidates:
# src/profiles/core/config/service.py:107, 160, 196 — all three
return select_active_configuration(config, hostname, "", "")
And match_pattern returns False when the value is empty (matcher.py:25-26), so match.ip and match.path criteria can never match:
get_local_ip()exists (src/profiles/utils/network.py:32, used bycollect_system_info) but is never plumbed into matching.- The starter template advertises IP matching with a worked example (
template.py:337-343and the commentedproductionconfig, lines 356-373). MatchCriteria.pathis documented as "Glob patterns for paths that must exist on the filesystem" (models.py:163-165) — yet nothing verifies existence; path patterns only participate in post-selection directory matching viafind_active_config(service.py:69-71).
Net effect: a user who writes an ip: or path: match criterion silently gets the fallback config, with no diagnostic anywhere.
Suggested fix
- Pass
get_local_ip()(and a working-directory candidate) intoselect_active_configurationfromfind_configuration_by_hostname/auto_select_directory/choose_active_directory. - For
path, either implement existence semantics inmatches_machine_config(fnmatch each pattern against existing scan/cwd paths) or fix the docstring to state the caller must supply the path — and drop the misleading template example if the feature is not implemented.
- 主要言語
- Python
- スター
- 1
- フォーク
- 1
- 平均マージ
- 4時間 46分
- マージ済み PR(30日)
- 55
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
falbany/ProFiles のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
falbany/ProFiles#187 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
bug frontend
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
bug frontend
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
メンテナーはふだん 1 日以内に返信
-
bug frontend
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
falbany/ProFiles の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
ip-tools/patzilla#219 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
EPSSClient commits to its SQLite cache once per score: a 100-CVE bulk fetch makes 101 disk flushesオープンpriority:p3 technical-debt
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
jimmy058910/jmo-security-repo#1673 ·
メンテナーはふだん 1 日以内に返信
-
enhancement ready
難易度 2/5 1〜3時間 初心者へのやさしさ 86/100
-
integration: frontier_silicon
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
home-assistant/core#193176 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
task create and task update take --body-file and --stdin対応中かも @JuanBarriosS が今日担当しました。 オープンcli enhancement good first issue help wanted
難易度 2/5 1〜3時間 初心者へのやさしさ 92/100
pyrite-wiki/pyrite#1687 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信