Repository navigation
fix(data_flow,propagation): validate size_bytes/token_count in Python data_flow and reject control chars and conflicting headers in propagation (#104) - #108
Conversation
|
🟡 Contributor Check: MEDIUM
Automated check by AgenTrust Contributor Check. |
… data_flow and reject control chars and conflicting headers in propagation (agentrust-io#103) - Validate DataEndpoint types and non-negative safe-integer size_bytes and token_count in Python classified_data_flow, matching TypeScript classifiedDataFlow. - Reject ASCII control characters and conflicting case-insensitive duplicate headers in Python propagation. Closes agentrust-io#103 Signed-off-by: Raghuvar Durga <177662415+drk-ram@users.noreply.github.com> Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
50a97ec to
4504aef
Compare
dinakarjs
left a comment
There was a problem hiding this comment.
Reviewed source at 4504aef. Python unittest discovery passed with inherited OTEL_* variables removed; the initial three OTel failures were environment configuration. TypeScript build and all 44 existing tests passed using node --import tsx --test test/*.test.ts; the npm check launcher itself encountered an IPC-listen EPERM here, so I do not claim that wrapper passed. Local results only, not hosted CI. Python: 159 tests pass.
The new combined test stops on its first failing size assertion, so it does not independently demonstrate the control-character and conflicting-header guards. Please split the regression into independent tests and add valid twins, including identical case-insensitive duplicate headers and boundary size values. Also correct the description's closing reference: data-flow/propagation is #104, not #103.
Source review and local validation are complete within this scope; regression coverage remains for author follow-up before approval.
Prepared with OpenAI Codex.
… twins Signed-off-by: Raghuvar Durga <177662415+drk-ram@users.noreply.github.com> Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
|
Thanks @dinakarjs! Split the regression into three independent test methods in |
Summary
isinstance(source, DataEndpoint),isinstance(destination, DataEndpoint), and non-negative safe-integersize_bytesandtoken_count(rejectingbool) insrc/agentrust_telemetry/data_flow.pyto match TypeScriptclassifiedDataFlow.\x00..\x1f,\x7f) and conflicting case-insensitive duplicate correlation headers insrc/agentrust_telemetry/propagation.py.Closes #104
Validation
python -m pytest tests/test_data_flow.py tests/test_propagation.py -qpython -m ruff check src/agentrust_telemetry/data_flow.py src/agentrust_telemetry/propagation.py tests/test_data_flow.py