Skip to content

fix(agt_data,data-flow): reject float classification tiers and pre-epoch evaluated_at timestamps in Python and TypeScript (#112) - #117

Open
drk-ram wants to merge 1 commit into
agentrust-io:mainfrom
drk-ram:drk-ram-fix-agt-data-112
Open

drk-ram wants to merge 1 commit into
agentrust-io:mainfrom
drk-ram:drk-ram-fix-agt-data-112

Conversation

@drk-ram

@drk-ram drk-ram commented Oct 25, 2026

Copy link
Copy Markdown

Closes #112

Summary

  • Require type(raw) is int and raw in _LEVELS in src/agentrust_telemetry/adapters/agt_data.py so float values such as 0.0 or 2.0 are rejected (matching TypeScript Number.isInteger).
  • Reject pre-epoch (< 1970-01-01T00:00:00Z) evaluated_at timestamps in both Python (_datetime_ns) and TypeScript (timestampNs in packages/typescript/src/data-flow.ts), and validate decision is a plain object in TypeScript agtDataAccessFlow.
  • Add Python and TypeScript unit tests in tests/test_agt_adapter.py and packages/typescript/test/data-flow.test.ts.

Validation

  • pytest tests/test_agt_adapter.py -q — passed (7 passed)

@drk-ram
drk-ram requested review from a team and imran-siddique as code owners October 25, 2026 06:47
@github-actions

github-actions Bot commented Oct 25, 2026 •

Copy link
Copy Markdown

🟡 Contributor Check: MEDIUM

Check Result
Profile MEDIUM
Credential LOW
Overall MEDIUM

Automated check by AgenTrust Contributor Check.

@github-actions github-actions Bot added the needs-review:MEDIUM Contributor check flagged MEDIUM risk label Oct 25, 2026
…och evaluated_at timestamps in Python and TypeScript (agentrust-io#112)

Signed-off-by: Raghuvar Karthik Durga <177662415+drk-ram@users.noreply.github.com>
@drk-ram
drk-ram force-pushed the drk-ram-fix-agt-data-112 branch from 31c4c44 to ee02e48 Compare October 29, 2026 17:14

This branch has not been deployed

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

Labels

needs-review:MEDIUM Contributor check flagged MEDIUM risk

Projects

None yet

Development

Successfully merging this pull request may close these issues.

agt_data / data-flow: Python agt_data_classification accepts float tiers (0.0) and pre-epoch evaluated_at timestamps

1 participant