docs(flows): DoD obligatorio con user-facing surface + abrir issues 0100-0103 (taxonomia, frontmatter migration, dev_console, work dashboard)
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
+18
-1
@@ -61,6 +61,7 @@ func ComputeAppHash(a *App) string {
|
||||
fmt.Fprintf(h, "|%s", marshalStrings(a.Tags))
|
||||
fmt.Fprintf(h, "|%s", marshalStrings(a.UsesFunctions))
|
||||
fmt.Fprintf(h, "|%s", marshalStrings(a.UsesTypes))
|
||||
fmt.Fprintf(h, "|%s", marshalStrings(a.UsesModules))
|
||||
fmt.Fprintf(h, "|%s|%s|%s|%s|%s|%s", a.Framework, a.EntryPoint, a.Documentation, a.Notes, a.DirPath, a.RepoURL)
|
||||
return fmt.Sprintf("%x", h.Sum(nil))
|
||||
}
|
||||
@@ -73,10 +74,22 @@ func ComputeAnalysisHash(a *Analysis) string {
|
||||
fmt.Fprintf(h, "|%s", marshalStrings(a.Tags))
|
||||
fmt.Fprintf(h, "|%s", marshalStrings(a.UsesFunctions))
|
||||
fmt.Fprintf(h, "|%s", marshalStrings(a.UsesTypes))
|
||||
fmt.Fprintf(h, "|%s", marshalStrings(a.UsesModules))
|
||||
fmt.Fprintf(h, "|%s|%s|%s|%s|%s|%s", a.Framework, a.EntryPoint, a.Documentation, a.Notes, a.DirPath, a.RepoURL)
|
||||
return fmt.Sprintf("%x", h.Sum(nil))
|
||||
}
|
||||
|
||||
// ComputeModuleHash computes a deterministic hash of all content fields of a Module.
|
||||
func ComputeModuleHash(m *Module) string {
|
||||
h := sha256.New()
|
||||
fmt.Fprintf(h, "%s|%s|%s|%s|%s",
|
||||
m.ID, m.Name, m.Version, m.Lang, m.Description)
|
||||
fmt.Fprintf(h, "|%s", marshalStrings(m.Members))
|
||||
fmt.Fprintf(h, "|%s", marshalStrings(m.Tags))
|
||||
fmt.Fprintf(h, "|%s|%s|%s|%s", m.DirPath, m.RepoURL, m.Documentation, m.Notes)
|
||||
return fmt.Sprintf("%x", h.Sum(nil))
|
||||
}
|
||||
|
||||
// ComputeProjectHash computes a deterministic hash of all content fields of a Project.
|
||||
func ComputeProjectHash(p *Project) string {
|
||||
h := sha256.New()
|
||||
@@ -98,7 +111,7 @@ func ComputeVaultHash(v *Vault) string {
|
||||
|
||||
// LoadTimestamps reads existing id → {created_at, updated_at, content_hash} from all tables.
|
||||
// Called before Purge so we can preserve dates across reindexing.
|
||||
func (db *DB) LoadTimestamps() (funcs, types, apps, analysis, projects, vaults map[string]timestampRecord, err error) {
|
||||
func (db *DB) LoadTimestamps() (funcs, types, apps, analysis, projects, vaults, modules map[string]timestampRecord, err error) {
|
||||
funcs, err = loadTable(db, "functions")
|
||||
if err != nil {
|
||||
return
|
||||
@@ -120,6 +133,10 @@ func (db *DB) LoadTimestamps() (funcs, types, apps, analysis, projects, vaults m
|
||||
return
|
||||
}
|
||||
vaults, err = loadTable(db, "vaults")
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
modules, err = loadTable(db, "modules")
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user