Skip to content

feat(kernel): record timestamps and writer metadata - #2876

Merged
jbeda merged 2 commits into
mainfrom
impl/2663-history-metadata
Nov 19, 2026
Merged

jbeda merged 2 commits into
mainfrom
impl/2663-history-metadata

Conversation

@jbeda

@jbeda jbeda commented Nov 18, 2026

Copy link
Copy Markdown
Contributor

Summary

Add diagnostic timestamps and writer-instance metadata to the isolated kernel's history, with Session-owned stamping and immutable inspection. Production execution is unchanged.

  • Require signed Unix-nanosecond timestamps on records and commits, plus a nonzero commit writer-instance ID.
  • Require explicit Session authoring configuration; preserve exact metadata/bytes across uncertain submission retries.
  • Expose record timestamps and optional enclosing accepted-commit metadata without changing logical model-request identity.
  • Update deterministic fixtures, public examples, generated codecs, and API snapshots.

Related to #2663 and #2659. This slice does not close either issue or implement deferred principal attribution/production integration.

API compatibility

No production wire behavior, feature identifier, or wire-major change; no production client upgrade required. The experimental kernel intentionally breaks Go constructor APIs and stored history envelopes: New/Load require authoring configuration, and version 1 requires all metadata fields. Metadata-free experimental histories fail strict decoding. There is no migration, backward reader, synthesized historical metadata, or cutover. These breaks were explicitly approved during design review.

Implementation notes

  • Record time means successful local admission; commit time means first submission preparation, even if cancellation prevents a backend call. Neither is action timing or storage receipt time. Frozen retries retain the same proposal bytes/CID after clock advancement or lost acknowledgment.
  • The embedding caller chooses a nonzero writer ID once per writer lifetime and reuses it across sessions. Reloading under another writer preserves old metadata and uses the new configuration only for subsequent authoring. IDs provide no authentication, authority, fencing, or global-uniqueness guarantee.
  • Closeout reservation uses maximum encoded timestamp/ID widths without sampling the clock. Epoch, negative times, and backward jumps are valid; out-of-range clock values fail atomically rather than wrapping.
  • Accepted records share stable per-commit metadata backing created before publication. Captured proposed views never gain accepted metadata retroactively. Navigation stays O(1); metadata changes history CIDs but remains outside logical request bytes/CIDs.

Verification

  • Focused kernel, History-adapter, and architecture race checks; standalone engine suite.
  • task lint, task docs, task check:pr, generation/API freshness checks, and offline demo (tool call, permission approval, final result).
  • Implementation panel plus targeted fix rechecks: no remaining findings.
  • Scoped isolated-engine verification follows the approved plan; the full repository race suite and live providers were not run.

jbeda and others added 2 commits November 18, 2026 14:55
Stamp local record admission and first commit preparation, preserve frozen retries, reserve full-width closeout metadata, and expose immutable accepted commit metadata without changing logical model requests.

Co-authored-by: Mecatl <[email protected]>
Expose UTC time values from metadata inspection, nest resource policy in construction config, and trim duplicate kernel documentation.

Co-authored-by: Mecatl <[email protected]>
@jbeda
jbeda enabled auto-merge (squash) November 19, 2026 00:50
@jbeda
jbeda merged commit 92a2777 into main Nov 19, 2026
46 checks passed
@jbeda
jbeda deleted the impl/2663-history-metadata branch November 19, 2026 00:58
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.

1 participant