Skip to content

docs: document Commit.created_at as RFC3339Nano - #8

Merged
sujal-maheshwari2004 merged 1 commit into
mainfrom
fix/4-created-at-rfc3339nano
Oct 18, 2026
Merged

sujal-maheshwari2004 merged 1 commit into
mainfrom
fix/4-created-at-rfc3339nano

Conversation

@sujal-maheshwari2004

Copy link
Copy Markdown
Contributor

What was wrong

Commit.created_at was commented // RFC3339. The server sends time.RFC3339Nano in UTC:

  • priompt internal/server/server.go: CreatedAt: c.CreatedAt.Format(time.RFC3339Nano)
  • db-adapters stores created.UTC().Format(time.RFC3339Nano)
  • a real History response: "createdAt": "2026-10-18T04:45:25.5540023Z" (7 fractional digits)

RFC3339Nano trims trailing zeros, so the fraction can have anywhere from 0 to 9 digits. A client that parses a fixed RFC3339 layout or a fixed width will fail.

The fix

Replaced the trailing comment with a leading comment that gives the actual format (UTC, RFC 3339 with 0-9 fractional digits and trailing zeros trimmed), an example, and parsing guidance. Regenerated the Go stubs with pinned protocolbuffers/go:v1.36.12 / grpc/go:v1.6.2. In prompt.pb.go only the doc comment and the gofmt alignment of the Commit struct change. Wire format is unchanged.

Comment-only change, so no test.

Evidence

$ buf breaking --against '.git#branch=origin/main'   -> exit 0
$ GOWORK=off go build ./... && go vet ./... && go test ./...   -> ok (semdiff, validate)

Fixes #4

🤖 Generated with Claude Code

The server formats Commit.created_at with time.RFC3339Nano in UTC
(variable-length fractional seconds), but the proto comment said RFC3339.
Describe the actual format and how to parse it, and regenerate the Go
stubs (comment-only change).

Fixes #4

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@sujal-maheshwari2004
sujal-maheshwari2004 merged commit 8f39306 into main Oct 18, 2026
1 check passed
@sujal-maheshwari2004
sujal-maheshwari2004 deleted the fix/4-created-at-rfc3339nano branch October 18, 2026 17:50
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.

created_at is documented as RFC3339 but the server sends RFC3339Nano

1 participant