Repository navigation
fix(factory,agt-approval,agt-audit): preserve explicit empty event_id/instance_id for validation and reject pre-epoch timestamps in TS (#115) - #120
Conversation
|
🟡 Contributor Check: MEDIUM
Automated check by AgenTrust Contributor Check. |
0f29f80 to
3d8953a
Compare
…/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>
3d8953a to
3c256d5
Compare
dinakarjs
left a comment
There was a problem hiding this comment.
Reviewed the identifier defaults and both TypeScript timestamp parsers. Omitted IDs still use their defaults, while explicit empty IDs reach validation. The timestamp change preserves the Unix epoch boundary and fractional nanoseconds. The full Python suite passed with 167 tests and 174 subtests. The TypeScript build and all 51 TypeScript tests passed using Node's test runner with the tsx import. Hosted workflows await maintainer authorization.
Prepared with OpenAI Codex.
imran-siddique
left a comment
There was a problem hiding this comment.
Approving at 3c256d5: ran conformance, the Python suite and the TS check on this head; each new test fails against main's source; all 11 PRs in this series merge onto main together without conflicts and pass combined.
Closes #115
Summary
event_id is Noneinstead ofevent_id or ...in PythonEventFactory.build(src/agentrust_telemetry/adapters/base.py) so an explicitevent_id=""fails validation instead of silently generating a random UUID.None/undefinedproducer_instance_id/producer.instanceIdin Python (base.py) and TypeScript (packages/typescript/src/factory.ts) so""fails schema validation.< 1970-01-01T00:00:00Z) timestamps inpackages/typescript/src/agt-approval.tsandpackages/typescript/src/agt-audit.ts.tests/test_adapters.py,packages/typescript/test/agt-approval.test.ts, andpackages/typescript/test/agt-audit.test.ts.Validation
pytest tests/test_adapters.py -q— passed (23 passed)