e3c8979e8d
- cmd/fn/doctor.go - cmd/fn/main.go - cpp/apps/primitives_gallery/playground/tables/CMakeLists.txt - cpp/apps/primitives_gallery/playground/tables/data_table.cpp - cpp/apps/primitives_gallery/playground/tables/data_table_logic.cpp - cpp/apps/primitives_gallery/playground/tables/data_table_logic.h - cpp/apps/primitives_gallery/playground/tables/self_test.cpp - cpp/apps/primitives_gallery/playground/tables/tql.cpp - cpp/apps/primitives_gallery/playground/tables/viz.cpp - cpp/apps/primitives_gallery/playground/tables/viz.h - ... Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1.8 KiB
1.8 KiB
name, kind, lang, domain, version, purity, signature, description, tags, uses_functions, uses_types, returns, returns_optional, error_type, imports, tested, tests, test_file_path, file_path, params, output
| name | kind | lang | domain | version | purity | signature | description | tags | uses_functions | uses_types | returns | returns_optional | error_type | imports | tested | tests | test_file_path | file_path | params | output | |||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| vault_diff | function | go | infra | 1.0.0 | pure | func VaultDiff(prev, curr []VaultFile) VaultDiffReport | Computes the diff between two vault snapshots (slices of VaultFile). Returns Added, Removed, Changed and Unchanged counts. Pure and deterministic — no I/O. |
|
|
false |
|
true |
|
functions/infra/vault_diff_test.go | functions/infra/vault_diff.go |
|
VaultDiffReport con Added (nuevos), Removed (eliminados), Changed (mismo rel_path, sha256 distinto) y Unchanged (identicos). Todos los slices ordenados por RelPath ASC. |
Ejemplo
prev, _ := infra.VaultInventoryScan(oldPath, "my_vault_proj", "my_vault")
curr, _ := infra.VaultInventoryScan(newPath, "my_vault_proj", "my_vault")
report := infra.VaultDiff(prev, curr)
fmt.Printf("Added: %d, Removed: %d, Changed: %d, Unchanged: %d\n",
len(report.Added), len(report.Removed), len(report.Changed), report.Unchanged)
Notas
- Usa
RelPathcomo clave de identidad de archivo (no nombre, no sha256). - Dos archivos con mismo
RelPathpero diferenteSha256se consideran Changed. - Los slices del report se ordenan por
RelPathASC para salida deterministica. - Función pura: no toca disco ni BD.