audit support of evaluate or program.execute method(Support for execution tracing and variable-level audit logs)

オープン
#30 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

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

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
35/100
issue の種類
機能追加
明瞭さ
説明が足りない
活発さ
活発
技術スタック
python, rust
領域
compilers

調査の方向性

evaluate と program.execute のエントリーポイントから始め、.exists() などのコレクションマクロが要素をどのように処理するかを調査します。trace または audit-log API を定義し、一致した値、インデックス、式の各部分、失敗の説明を含めます。そのうえで、要求された結果と trace が一緒に返されることを示すカバレッジを追加します。

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

説明

enhancement

Currently, the common-expression-language library evaluates expressions but provides limited or no visibility into the evaluation process. Specifically, there is:

No built-in execution trace.
No automatic "why it failed" explanation for complex logic.
No variable-level audit log to identify which specific part of the context triggered a result.

When dealing with collection-based macros like .exists(), etc,. it is difficult to debug which specific element in a list caused the expression to return True or False.

I would like a mechanism that returns a trace or an audit log. This trace should identify which value in the context resulted in the final pass, fail, or result.

Additional context (Example)
Consider the following scenario:

Expression: value.exists(v, v.x == 5)
Context: {"value": [{"x": 7}, {"x": 15}, {"x": 5}]}

The Issue:
The library correctly returns True because the third element matches the condition. However, there is no built-in way to programmatically identify that {"x": 5} was the specific element that satisfied the condition. In more complex real-world scenarios, knowing "why" or "which" value triggered the result is critical for auditing and debugging.

Suggested Output/API:
It would be helpful if the library could provide an output similar to:

{
"result": true,
"trace": {
"matched_element": {"x": 5},
"index": 2,
"expression_part": "v.x == 5"
}
}

Thanks in advance, please let me know if any more information or details needed.

主要言語
Python
スター
43
フォーク
4
平均マージ
9時間 57分
マージ済み PR(30日)
14

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

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

hardbyte/python-common-expression-language のほかの issue

hardbyte/python-common-expression-language の issue をすべて見る

似ている issue

Python の issue をもっと見る

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

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