Skip to content

feat(staged): stamp every session-context item with its UTC date-time - #981

Merged
matt2e merged 2 commits into
mainfrom
add-time-to-repo-and-project-level-readout
Oct 16, 2026
Merged

matt2e merged 2 commits into
mainfrom
add-time-to-repo-and-project-level-readout

Conversation

@matt2e

@matt2e matt2e commented Oct 16, 2026

Copy link
Copy Markdown
Contributor

Summary

The context a session gets at start — the branch-level history and the project-level readout (per-repo branch timelines plus project notes) — gave no times for notes, reviews, or images. Commits were the only items with a time, from git's %ci line, which uses the committer's time zone. This PR adds a Date: line under the heading of every item, at both levels. Each date is a full YYYY-MM-DD HH:MM:SS UTC value from one shared formatter (format_context_timestamp), so items of any type can be compared directly.

Each item uses the same field the branch card shows for it, so the UI and the agent agree:

  • Commits: author time, taken from the %at prefix the log already had. The date is rendered before clamping, so a cherry-pick keeps its real date. The Date: %ci line is removed from both the local and remote git log formats.
  • Notes and reviews: completed_at ?? created_at
  • Images: created_at
  • Project notes: completed_at ?? created_at, in both the project readout and a branch's history

The context preambles are unchanged. A UTC explanation was added at first and removed after review, because the dates are clear without it.

Tests

  • Formatter output, including the Unix epoch and a known timestamp
  • Where the commit Date: line goes: commits with a body, a cherry-pick that gets clamped, and a commit with no body
  • Each store item type (notes, reviews, images) uses the expected field
  • Project notes at the branch level and the project level
  • Existing layout tests updated for the extra line

🤖 Generated with Claude Code

matt2e and others added 2 commits October 16, 2026 14:57
…-time

The context a session receives at start — the branch-level history and
the project-level readout (per-repo branch timelines plus project notes)
— listed commits, notes, reviews, and images without saying when they
happened, except for commits, which carried git's own `Date: %ci` line:
the committer date, in the author's time zone. Nothing else had a date at
all, so a session could only infer ordering from position.

Every item now carries a `Date:` line directly under its heading, as an
absolute `YYYY-MM-DD HH:MM:SS UTC` value from one shared formatter, so
items of every type and at both levels compare directly. Each item uses
the same field the branch card renders for it:

- commits: author time (the `%at` prefix the log already carried, now
  rendered in UTC before clamping so a cherry-pick keeps its real date;
  the `%ci` line is dropped from the git format)
- notes and reviews: `completed_at ?? created_at`
- images: `created_at`
- project notes: `completed_at ?? created_at`, in both the project
  readout and a branch's history

Both context preambles say the `Date:` lines are UTC. Tests cover the
formatter, the commit date placement and cherry-pick case, each store
item type, and project notes at both levels; existing layout tests are
updated for the extra line.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Signed-off-by: Matt Toohey <contact@matttoohey.com>
…preambles

Both the branch-level and project-level context preambles gained a
sentence telling the session that every item carries a `Date:` line in
UTC and what to use it for. Review feedback: the dates speak for
themselves, so the explanation is noise. Each preamble goes back to its
previous wording; the `Date:` lines on every item are unchanged.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Signed-off-by: Matt Toohey <contact@matttoohey.com>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 16, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-16T04:12:51.899771Z a84e8ca PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@matt2e
matt2e merged commit 87ff3cf into main Oct 16, 2026
4 checks passed
@matt2e
matt2e deleted the add-time-to-repo-and-project-level-readout branch October 16, 2026 04:35
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