···127127 if evt.TooBig {
128128 return fmt.Errorf("deprecated tooBig commit flag set")
129129 }
130130+ // if previous repo stat is unknown, and prevData is nil, assume that this is first commit for the account
131131+ // TODO: should still validate records existing in blocks, etc
132132+ if prevRepo == nil && evt.PrevData == nil {
133133+ r.Logger.Info("not verifying prevData or MST inversion for first commit from account")
134134+ return nil
135135+ }
136136+130137 if evt.PrevData == nil {
131138 return fmt.Errorf("missing prevData field")
132139 }
···142149 }
143150 }
144151145145- // this parse is redundant with earlier parse; once lenient mode is removed we should do only a single pass
146146- origRepo, _, err := repo.LoadRepoFromCAR(ctx, bytes.NewReader(evt.Blocks))
147147- if err != nil {
148148- return err
149149- }
150150-151151- // TODO: break out this function in to smaller chunks
152152- _ = origRepo
152152+ // TODO: break out this function in to smaller chunks. For example, missing PrevData
153153 if _, err := repo.VerifyCommitMessage(ctx, evt); err != nil {
154154 logger.Warn("failed to invert commit MST", "err", err)
155155 }
···158158 if evt.Rebase {
159159 return fmt.Errorf("deprecated rebase commit flag set")
160160 }
161161- _, err = syntax.ParseDatetime(evt.Time)
161161+ _, err := syntax.ParseDatetime(evt.Time)
162162 if err != nil {
163163 return fmt.Errorf("commit timestamp syntax: %w", err)
164164 }