Skip to content

fix(aep): Date.now() timestamps + addAction capability_decision sync#17

Merged
HainingYin merged 2 commits into
mainfrom
fix/aep-emitter-timestamp-and-capability-sync
Jul 3, 2026
Merged

fix(aep): Date.now() timestamps + addAction capability_decision sync#17
HainingYin merged 2 commits into
mainfrom
fix/aep-emitter-timestamp-and-capability-sync

Conversation

@HainingYin

Copy link
Copy Markdown
Contributor

Summary

Test plan

  • Existing AEP emitter tests pass
  • emit() without explicit timestamp produces created_at_ms in reasonable epoch range (e.g. >1700000000000)
  • addAction({ capability_decision: {...} }) populates capability_decisions[] without separate addCapabilityDecision() call
  • Duplicate capability decisions (same capability+subject+resource) are not double-registered

Fixes #14, #15


🤖 Generated with Claude Code

HainingYin and others added 2 commits July 3, 2026 09:35
…on sync

Two fixes in AEPEmitter:

1. Replace performance.now() with Date.now() for all default timestamps.
   performance.now() returns ms-since-process-start (~730ms), not Unix epoch,
   causing downstream tools to show 1970-01-01 for all records. (#14)

2. addAction() with capability_decision now auto-registers to the record-level
   capability_decisions[] array (deduped by capability+subject+resource).
   Previously the split API caused silent empty manifests. (#15)

Fixes #14
Fixes #15

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@HainingYin HainingYin merged commit 70f111f into main Jul 3, 2026
2 checks passed
@HainingYin HainingYin deleted the fix/aep-emitter-timestamp-and-capability-sync branch July 3, 2026 07:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug(@wasmagent/aep): emit() defaults to performance.now() instead of Date.now() causing created_at_ms ≈ 19ms

1 participant