feat: content hash y timestamps inteligentes en registry
Agrega content_hash a functions, types y apps para detectar cambios reales entre reindexaciones. Los timestamps created_at se preservan si el contenido no cambió, y updated_at solo se actualiza cuando hay cambios efectivos. Incluye migración 005, hash.go con SHA256 determinístico, y ajustes en store/indexer/models para el nuevo flujo de timestamps. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -54,6 +54,10 @@ type Function struct {
|
||||
Tests []string `json:"tests"`
|
||||
TestFilePath string `json:"test_file_path"`
|
||||
FilePath string `json:"file_path"`
|
||||
ContentHash string `json:"content_hash"`
|
||||
SourceRepo string `json:"source_repo"`
|
||||
SourceLicense string `json:"source_license"`
|
||||
SourceFile string `json:"source_file"`
|
||||
CreatedAt time.Time `json:"created_at"`
|
||||
UpdatedAt time.Time `json:"updated_at"`
|
||||
|
||||
@@ -90,6 +94,10 @@ type Type struct {
|
||||
Documentation string `json:"documentation"`
|
||||
Code string `json:"code"`
|
||||
FilePath string `json:"file_path"`
|
||||
ContentHash string `json:"content_hash"`
|
||||
SourceRepo string `json:"source_repo"`
|
||||
SourceLicense string `json:"source_license"`
|
||||
SourceFile string `json:"source_file"`
|
||||
CreatedAt time.Time `json:"created_at"`
|
||||
UpdatedAt time.Time `json:"updated_at"`
|
||||
}
|
||||
@@ -109,6 +117,7 @@ type App struct {
|
||||
Documentation string `json:"documentation"`
|
||||
Notes string `json:"notes"`
|
||||
DirPath string `json:"dir_path"`
|
||||
ContentHash string `json:"content_hash"`
|
||||
CreatedAt time.Time `json:"created_at"`
|
||||
UpdatedAt time.Time `json:"updated_at"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user