Skip to content

fix(agent): preserve source timestamps across all hook integrations - #286

Merged
geekgonecrazy merged 2 commits into
devfrom
fix/opencode-adapter-event-timestamps
Oct 26, 2026
Merged

geekgonecrazy merged 2 commits into
devfrom
fix/opencode-adapter-event-timestamps

Conversation

@graywolf336

@graywolf336 graywolf336 commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Share timestamp normalization across all 15 registered hook adapters, with an explicit wire encoding selected by each adapter.
  • Preserve RFC-3339 source time, offsets, and fractional precision; support Copilot’s numeric epoch milliseconds and ISO payloads, plus Cline’s decimal epoch-millisecond strings.
  • Use receipt time only for missing/null timestamps. Reject malformed, unsupported, or out-of-range values with agent/hook context; never guess units from magnitude or read timestamps from tool arguments.
  • Keep original timestamp values in raw payloads and preserve millisecond source time through the provenance journal. No migrations, reindexing, or historical payload rewrites.

Stacked on #285 (fix/provenance-seconds-and-milliseconds). Hosts without timestamps retain receipt-time fallback. Companion OpenCode producer change remains separate: atomicdotdev/atomic-opencode#15.

Validation

  • cargo test -p atomic-agent — 1,390 unit tests, 13 integration tests, and 28 doctests passed (9 doctests ignored).
  • Eight new registry-driven tests cover every supported hook across all adapters, including native encodings, timezone/subsecond precision, missing/null fallback, malformed input, overflow, epoch edge cases, and unsupported representations.
  • cargo clippy -p atomic-agent --all-targets --all-features -- -D warnings passed.
  • cargo doc -p atomic-agent --no-deps, formatting, and whitespace checks passed.

Previous CI was green before the all-integration extension; the updated head requires a fresh run.

@graywolf336
graywolf336 force-pushed the fix/opencode-adapter-event-timestamps branch from 4c3fd6a to cc3b7a9 Compare October 26, 2026 11:14
@graywolf336
graywolf336 changed the base branch from feat/semweb-knowledge-graph to fix/provenance-seconds-and-milliseconds October 26, 2026 11:16
@graywolf336
graywolf336 added this pull request to stack #287 October 26, 2026 11:22
@graywolf336 graywolf336 changed the title fix(agent): preserve source timestamps in OpenCode hooks fix(agent): preserve source timestamps across all hook integrations Oct 26, 2026
Base automatically changed from fix/provenance-seconds-and-milliseconds to dev October 26, 2026 17:11
@geekgonecrazy
geekgonecrazy force-pushed the fix/opencode-adapter-event-timestamps branch from b83585c to cd88e32 Compare October 26, 2026 17:11
@geekgonecrazy
geekgonecrazy merged commit 0c535f7 into dev Oct 26, 2026
8 checks passed
@geekgonecrazy
geekgonecrazy deleted the fix/opencode-adapter-event-timestamps branch October 26, 2026 17:11
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.

2 participants