From 580a5e2cfb11fcc30197a7cbff1cdf3e4ca88b52 Mon Sep 17 00:00:00 2001 From: unknown Date: Sun, 18 Oct 2026 15:30:59 +0530 Subject: [PATCH] docs: document Commit.created_at as RFC3339Nano 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 --- gen/priompt/v1/prompt.pb.go | 20 ++++++++++++-------- proto/priompt/v1/prompt.proto | 6 +++++- 2 files changed, 17 insertions(+), 9 deletions(-) diff --git a/gen/priompt/v1/prompt.pb.go b/gen/priompt/v1/prompt.pb.go index fcfa7b9..c30f82f 100644 --- a/gen/priompt/v1/prompt.pb.go +++ b/gen/priompt/v1/prompt.pb.go @@ -267,14 +267,18 @@ func (x *SetBranchResponse) GetVersionHash() string { // Commit is one node in a prompt's history DAG. type Commit struct { - state protoimpl.MessageState `protogen:"open.v1"` - Hash string `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"` - VersionHash string `protobuf:"bytes,2,opt,name=version_hash,json=versionHash,proto3" json:"version_hash,omitempty"` - Parent string `protobuf:"bytes,3,opt,name=parent,proto3" json:"parent,omitempty"` - Parent2 string `protobuf:"bytes,4,opt,name=parent2,proto3" json:"parent2,omitempty"` // set only on merge commits - Author string `protobuf:"bytes,5,opt,name=author,proto3" json:"author,omitempty"` - Message string `protobuf:"bytes,6,opt,name=message,proto3" json:"message,omitempty"` - CreatedAt string `protobuf:"bytes,7,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` // RFC3339 + state protoimpl.MessageState `protogen:"open.v1"` + Hash string `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"` + VersionHash string `protobuf:"bytes,2,opt,name=version_hash,json=versionHash,proto3" json:"version_hash,omitempty"` + Parent string `protobuf:"bytes,3,opt,name=parent,proto3" json:"parent,omitempty"` + Parent2 string `protobuf:"bytes,4,opt,name=parent2,proto3" json:"parent2,omitempty"` // set only on merge commits + Author string `protobuf:"bytes,5,opt,name=author,proto3" json:"author,omitempty"` + Message string `protobuf:"bytes,6,opt,name=message,proto3" json:"message,omitempty"` + // UTC timestamp in RFC 3339 with variable-length fractional seconds + // (Go time.RFC3339Nano: 0-9 digits, trailing zeros trimmed), e.g. + // "2026-10-18T04:45:25.5540023Z". Parse with an RFC 3339 parser that accepts + // fractional seconds; do not assume a fixed width. + CreatedAt string `protobuf:"bytes,7,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache } diff --git a/proto/priompt/v1/prompt.proto b/proto/priompt/v1/prompt.proto index 5c06201..cd7bdc8 100644 --- a/proto/priompt/v1/prompt.proto +++ b/proto/priompt/v1/prompt.proto @@ -64,7 +64,11 @@ message Commit { string parent2 = 4; // set only on merge commits string author = 5; string message = 6; - string created_at = 7; // RFC3339 + // UTC timestamp in RFC 3339 with variable-length fractional seconds + // (Go time.RFC3339Nano: 0-9 digits, trailing zeros trimmed), e.g. + // "2026-10-18T04:45:25.5540023Z". Parse with an RFC 3339 parser that accepts + // fractional seconds; do not assume a fixed width. + string created_at = 7; } message HistoryRequest {