Skip to content

fix(factory,agt-approval,agt-audit): preserve explicit empty event_id/instance_id for validation and reject pre-epoch timestamps in TS (#115) - #120

Open
drk-ram wants to merge 1 commit into
agentrust-io:mainfrom
drk-ram:drk-ram-fix-factory-agt-ts-115
Open

drk-ram wants to merge 1 commit into
agentrust-io:mainfrom
drk-ram:drk-ram-fix-factory-agt-ts-115

Conversation

@drk-ram

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

Copy link
Copy Markdown

Closes #115

Summary

  • Use event_id is None instead of event_id or ... in Python EventFactory.build (src/agentrust_telemetry/adapters/base.py) so an explicit event_id="" fails validation instead of silently generating a random UUID.
  • Preserve explicit non-None/undefined producer_instance_id / producer.instanceId in Python (base.py) and TypeScript (packages/typescript/src/factory.ts) so "" fails schema validation.
  • Reject pre-epoch (< 1970-01-01T00:00:00Z) timestamps in packages/typescript/src/agt-approval.ts and packages/typescript/src/agt-audit.ts.
  • Add Python and TypeScript unit tests in tests/test_adapters.py, packages/typescript/test/agt-approval.test.ts, and packages/typescript/test/agt-audit.test.ts.

Validation

  • pytest tests/test_adapters.py -q — passed (23 passed)

@drk-ram
drk-ram requested review from a team and imran-siddique as code owners October 25, 2026 06:48
@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
…/instance_id for validation and reject pre-epoch timestamps in TS (agentrust-io#115)

Signed-off-by: Raghuvar Karthik Durga <177662415+drk-ram@users.noreply.github.com>
@drk-ram
drk-ram force-pushed the drk-ram-fix-factory-agt-ts-115 branch from 0f29f80 to 3d8953a 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

1 participant