close issue 0081: tables promoted to registry + fn doctor cpp-apps BeginTable check
- docs/TQL.md: añadidas secciones joins, views, main_source, 24 viz tokens completos
(extraidos de tql_helpers.cpp), color_rules, fn.* builtins completos (20 funciones),
funciones bloqueadas del sandbox, tabla de estado de implementacion actualizada.
Nota al pie referencia los 129 checks roundtrip (41 emit + 88 apply).
- functions/infra/audit_cpp_apps.go: añadida AuditCppTableMigration() que escanea
.cpp de cada app imgui buscando ImGui::BeginTable; status CANDIDATE/MIXED/clean
segun si usa data_table_cpp_viz en uses_functions.
- cmd/fn/doctor.go: fn doctor cpp-apps ahora incluye seccion BeginTable migration
con tabwriter CANDIDATE/MIXED; --json produce {conformance, table_migration}.
doctorAll incluye cpp_table_migration en el mapa JSON.
- .claude/rules/fn_doctor.md: tabla de subcomandos y acciones complementarias
actualizadas con el nuevo check.
- dev/issues/0081 movido a completed/ con status done y notas de deuda documentadas.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
+42
-1
@@ -123,6 +123,11 @@ func doctorAll(root string, jsonOut bool) {
|
||||
} else {
|
||||
all["cpp_apps_error"] = err.Error()
|
||||
}
|
||||
if v, err := infra.AuditCppTableMigration(root); err == nil {
|
||||
all["cpp_table_migration"] = v
|
||||
} else {
|
||||
all["cpp_table_migration_error"] = err.Error()
|
||||
}
|
||||
if v, err := infra.AuditMlEnv(root); err == nil {
|
||||
all["ml"] = v
|
||||
} else {
|
||||
@@ -168,10 +173,21 @@ func doctorCppApps(root string, jsonOut bool) {
|
||||
fmt.Fprintf(os.Stderr, "error: %v\n", err)
|
||||
os.Exit(1)
|
||||
}
|
||||
tableAudits, err2 := infra.AuditCppTableMigration(root)
|
||||
if err2 != nil {
|
||||
fmt.Fprintf(os.Stderr, "warning: table migration audit failed: %v\n", err2)
|
||||
tableAudits = nil
|
||||
}
|
||||
|
||||
if jsonOut {
|
||||
emit(audits)
|
||||
emit(map[string]any{
|
||||
"conformance": audits,
|
||||
"table_migration": tableAudits,
|
||||
})
|
||||
return
|
||||
}
|
||||
|
||||
// Conformance section.
|
||||
bad := 0
|
||||
w := tabwriter.NewWriter(os.Stdout, 0, 0, 2, ' ', 0)
|
||||
fmt.Fprintln(w, "STATUS\tAPP\tISSUES")
|
||||
@@ -187,6 +203,31 @@ func doctorCppApps(root string, jsonOut bool) {
|
||||
}
|
||||
w.Flush()
|
||||
fmt.Printf("\n%d/%d C++ apps conform.\n", len(audits)-bad, len(audits))
|
||||
|
||||
// BeginTable migration section.
|
||||
if len(tableAudits) == 0 {
|
||||
return
|
||||
}
|
||||
hasMigrationNotes := false
|
||||
for _, t := range tableAudits {
|
||||
if t.Status != "clean" {
|
||||
hasMigrationNotes = true
|
||||
break
|
||||
}
|
||||
}
|
||||
if !hasMigrationNotes {
|
||||
return
|
||||
}
|
||||
fmt.Println("\n--- BeginTable migration (issue 0081) ---")
|
||||
tw := tabwriter.NewWriter(os.Stdout, 0, 0, 2, ' ', 0)
|
||||
fmt.Fprintln(tw, "STATUS\tAPP\tTABLES\tMESSAGE")
|
||||
for _, t := range tableAudits {
|
||||
if t.Status == "clean" {
|
||||
continue
|
||||
}
|
||||
fmt.Fprintf(tw, "%s\t%s\t%d\t%s\n", strings.ToUpper(t.Status), t.AppID, t.BeginTableCount, t.Message)
|
||||
}
|
||||
tw.Flush()
|
||||
}
|
||||
|
||||
func doctorArtefacts(root string, jsonOut bool) {
|
||||
|
||||
Reference in New Issue
Block a user