docs: document timestamp column units (epoch ms) in ARCHITECTURE.md and fresh-install schema - #458
Conversation
…nd fresh-install schema
There was a problem hiding this comment.
All reported issues were addressed across 2 files
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
…ion) Address Greptile/cubic review: - ARCHITECTURE.md: flag caller-supplied timestamp paths in the table (row.createdAt for compartment_chunk_embeddings, candidate.createdAt for primer_candidates, input.now for primers); add Notes covering the session-clone path (copySessionStateForClone preserves created_at verbatim) and the NOT NULL DEFAULT 0 backstop on ledger columns. - storage-db.ts: source_contents.created_at comment now reads "epoch ms; Date.now() on source writes, preserved on session clones". Docs/comments only; no behavior or migration changes.
There was a problem hiding this comment.
All reported issues were addressed across 2 files (changes from recent commits).
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
updatePrimerAnswer() honors caller-supplied refreshedAt for primers.updated_at (default Date.now()); the table row previously listed only input.now. Docs only.
|
Merged as-is — the per-writer verified table is exactly what #457's decline asked for, the |
Follow-up to #457, reshaped per maintainer feedback (magic-alfonso).
Changes
ARCHITECTURE.md — added a
### Timestamp Columnstable in the storage section listing eachcreated_at/updated_atcolumn with its unit (epoch ms) and the writer that stamps it. Every row was verified against its writer; columns with mixed writers (memorieshost/Rust-mirror) or non-TypeScript writers (workspaces, dashboard Rust) are called out explicitly rather than blanket-asserted.packages/plugin/src/features/magic-context/storage-db.ts — adds
-- epoch ms (Date.now())comments tocreated_atcolumns in the fresh-install schema only (no migration DDL touched — shipped migrations stay append-only). Only columns verified to be stamped byDate.now()get the comment;memories/workspacesare deliberately omitted.No behavior change. Not touching
migrations.tsper the maintainer's "applied migrations are history" note.Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.Summary by cubic
Documents the audited timestamp columns as epoch milliseconds in ARCHITECTURE.md and annotates verified fresh-install schema columns with their
Date.now()units. Clarifies timestamp handling without changing runtime behavior or migration history.row.createdAt,candidate.createdAt,input.now,refreshedAt), clone-preserved timestamps, and mixed (memories) or Rust (workspaces) writers.Date.now()is the actual writer.Written for commit 8d76de6. Summary will update on new commits.
Greptile Summary
Documents the units and provenance of audited timestamp columns without changing runtime behavior or migration history.
refreshedAt.Confidence Score: 5/5
The PR appears safe to merge because it only clarifies timestamp documentation and schema comments, with no outstanding correctness or repository-rule issues.
The prior timestamp-provenance concern was addressed and its thread is resolved; the subsequent
refreshedAtclarification accurately documents the remaining caller-supplied path.Important Files Changed
Reviews (3): Last reviewed commit: "docs: note refreshedAt override on prime..." | Re-trigger Greptile