From 0951751ebe65434884a9c920be2372599541470c Mon Sep 17 00:00:00 2001 From: codex-server Date: Sat, 2 May 2026 06:29:22 -0300 Subject: [PATCH] auto-sync: tudo-para-ia-mais-humana 2026-05-02 06:29:22 --- controle-semantico.sqlite | Bin 4939776 -> 4947968 bytes ...nonical-identity-central-write-status.json | 2 +- dados/canonical-identity-graph.json | 2 +- ...onical-identity-semantic-write-status.json | 7 +++ ...orkspace-hygiene-central-write-status.json | 2 +- dados/workspace-hygiene-report.json | 12 ++--- ecossistema/CANONICAL-IDENTITY-GRAPH.md | 2 +- ecossistema/WORKSPACE-HYGIENE-REPORT.md | 10 ++-- matrizes/workspace-hygiene-targets.csv | 2 +- src/mais_humana/canonical_identity.py | 51 +++++++++++++++++- 10 files changed, 73 insertions(+), 17 deletions(-) create mode 100644 dados/canonical-identity-semantic-write-status.json diff --git a/controle-semantico.sqlite b/controle-semantico.sqlite index 0fcdd91ab6f0adb4e5b753e7d7cf3f184092a04c..931a76ad763bd420e00298b8392ea159ba4355da 100644 GIT binary patch delta 3176 zcmds(O>EO<7{{H&ZJN(EO+!CIi!-|vN|QM)#r;?bSzFoyg|>7Ijk45p3%N{3f(rz%Q*onhWa_l#+ z-{=4L^Pzro)2ynWnJ@ZF+yp`1xkN=w?%R_>#Prkog~;4O#Dtg;3qm3#NGW1P$`Bi3 zM;wR~aUpJ`9H~G&NG0M$st_Nt0jWl6kXob;@gp0NdZYo_giuHTc`3UPp?9%mb>*{! zamdTgU17_)^4Tx6#RukWNT&BYop?X19V7_Ld2M*^!dV(&kVa%P(u8b5wj#~QHlzg! zA|d2ughj$gE7FE+N7}O&&hD6f*wxE?rep^bvkM`$fkj=iI^b8#Z$rK31vdb zjFDR7>Ye!U!CJc@&k&0vq!w5{2i~kV6L)o$)71`L?bOvSUG3J@S9G;US9j`aL|1p| zYE)NW)zw~I?bFqMUEQs#1G+k>t3#ivd+uMY;7Df)!4S>|wx3JCw%mY<`>j=8eO5bI zL1+>2h;K*>Xo0}o5x70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!O!^P}qMYV;-o%qNC(0%AlI@09VwLX2qt)m}XDrjp{%&<> z(&6l@cgO#=jk?dzmXZoM7TVE)PJBWay3qq03G|{5{YYW}gZPXg40{3R%m4Eih6uWK diff --git a/dados/canonical-identity-central-write-status.json b/dados/canonical-identity-central-write-status.json index 3502482..cedfadd 100644 --- a/dados/canonical-identity-central-write-status.json +++ b/dados/canonical-identity-central-write-status.json @@ -6,6 +6,6 @@ "path": "G:\\_codex-git\\nucleo-gestao-operacional\\central-de-ordem-de-servico\\projects\\15_repo_tudo-para-ia-mais-humana-platform\\reports\\EXECUTADO__canonical-identity-graph.md" } ], - "generatedAt": "2026-05-02T09:21:36+00:00", + "generatedAt": "2026-05-02T09:25:08+00:00", "ok": false } \ No newline at end of file diff --git a/dados/canonical-identity-graph.json b/dados/canonical-identity-graph.json index 60b7fea..1376763 100644 --- a/dados/canonical-identity-graph.json +++ b/dados/canonical-identity-graph.json @@ -1808,7 +1808,7 @@ "compatibilityRule": "Nome canonico institucional aprovado como tudo-para-ia-mais-humana-platform; o repositorio local historico tudo-para-ia-mais-humana e o alias tudo-para-ia-mais-humana-plataform permanecem aliases de compatibilidade ate migracao Git/MCP sincronizada, sem duplicar repositorio nem sobrescrever historico.", "controlPlaneId": "tudo-para-ia-mcps-internos-plataform", "decisionSource": "015-ROTEADOR-PERMANENTE-DE-ORDEM_DE_SERVICO.MD", - "generatedAt": "2026-05-02T09:21:36+00:00", + "generatedAt": "2026-05-02T09:25:08+00:00", "graphId": "canonical-identity-59e116f20f1a36a6", "maisHumanaCanonicalProjectId": "tudo-para-ia-mais-humana-platform", "maisHumanaCentralFolder": "15_repo_tudo-para-ia-mais-humana-platform", diff --git a/dados/canonical-identity-semantic-write-status.json b/dados/canonical-identity-semantic-write-status.json new file mode 100644 index 0000000..bad96a6 --- /dev/null +++ b/dados/canonical-identity-semantic-write-status.json @@ -0,0 +1,7 @@ +{ + "error": "", + "filesCount": 6, + "generatedAt": "2026-05-02T09:25:08+00:00", + "ok": true, + "sqlitePath": "G:\\_codex-git\\tudo-para-ia-mais-humana\\controle-semantico.sqlite" +} \ No newline at end of file diff --git a/dados/workspace-hygiene-central-write-status.json b/dados/workspace-hygiene-central-write-status.json index 59d2cf4..5065e42 100644 --- a/dados/workspace-hygiene-central-write-status.json +++ b/dados/workspace-hygiene-central-write-status.json @@ -6,6 +6,6 @@ "path": "G:\\_codex-git\\nucleo-gestao-operacional\\central-de-ordem-de-servico\\projects\\15_repo_tudo-para-ia-mais-humana-platform\\reports\\EXECUTADO__workspace-hygiene.md" } ], - "generatedAt": "2026-05-02T08:21:08+00:00", + "generatedAt": "2026-05-02T09:27:04+00:00", "ok": false } \ No newline at end of file diff --git a/dados/workspace-hygiene-report.json b/dados/workspace-hygiene-report.json index b79edf4..70d7c96 100644 --- a/dados/workspace-hygiene-report.json +++ b/dados/workspace-hygiene-report.json @@ -7,7 +7,7 @@ "error": "PermissionError: [WinError 5] Acesso negado: 'G:\\\\_codex-git\\\\tudo-para-ia-mais-humana\\\\.test-tmp\\\\tmpnk6r4sdb'", "footprint_after": { "byte_count": 0, - "child_count": 897, + "child_count": 1042, "errors": [ "PermissionError: [WinError 5] Acesso negado: 'G:\\\\_codex-git\\\\tudo-para-ia-mais-humana\\\\.test-tmp\\\\tmpnk6r4sdb'", "PermissionError: [WinError 5] Acesso negado: 'G:\\\\_codex-git\\\\tudo-para-ia-mais-humana\\\\.test-tmp\\\\tmpu13bzfhr'" @@ -17,8 +17,8 @@ "is_file": false }, "footprint_before": { - "byte_count": 60842050, - "child_count": 2213, + "byte_count": 68130347, + "child_count": 3052, "errors": [ "PermissionError: [WinError 5] Acesso negado: 'G:\\\\_codex-git\\\\tudo-para-ia-mais-humana\\\\.test-tmp\\\\tmpnk6r4sdb'", "PermissionError: [WinError 5] Acesso negado: 'G:\\\\_codex-git\\\\tudo-para-ia-mais-humana\\\\.test-tmp\\\\tmpu13bzfhr'" @@ -63,11 +63,11 @@ "blockers": [ "python-test-temp:PermissionError: [WinError 5] Acesso negado: 'G:\\\\_codex-git\\\\tudo-para-ia-mais-humana\\\\.test-tmp\\\\tmpnk6r4sdb'" ], - "central_platform_folder": "", + "central_platform_folder": "G:\\_codex-git\\nucleo-gestao-operacional\\central-de-ordem-de-servico\\projects\\15_repo_tudo-para-ia-mais-humana-platform", "clean": false, - "generated_at": "2026-05-02T08:28:47+00:00", + "generated_at": "2026-05-02T09:27:04+00:00", "project_root": "G:\\_codex-git\\tudo-para-ia-mais-humana", - "report_id": "workspace-hygiene-534686882219", + "report_id": "workspace-hygiene-389155382838", "status": "blocked", "summary": [ "Targets evaluated: 2.", diff --git a/ecossistema/CANONICAL-IDENTITY-GRAPH.md b/ecossistema/CANONICAL-IDENTITY-GRAPH.md index 6bd7f8d..fdf0a8f 100644 --- a/ecossistema/CANONICAL-IDENTITY-GRAPH.md +++ b/ecossistema/CANONICAL-IDENTITY-GRAPH.md @@ -1,7 +1,7 @@ # Canonical Identity Graph - graph_id: `canonical-identity-59e116f20f1a36a6` -- generated_at: `2026-05-02T09:21:36+00:00` +- generated_at: `2026-05-02T09:25:08+00:00` - records: `15` - aliases: `75` - acceptance_cases: `4125` diff --git a/ecossistema/WORKSPACE-HYGIENE-REPORT.md b/ecossistema/WORKSPACE-HYGIENE-REPORT.md index bb3b76e..3d7c10e 100644 --- a/ecossistema/WORKSPACE-HYGIENE-REPORT.md +++ b/ecossistema/WORKSPACE-HYGIENE-REPORT.md @@ -1,9 +1,9 @@ # Workspace Hygiene Report -- report_id: `workspace-hygiene-534686882219` -- generated_at: `2026-05-02T08:28:47+00:00` +- report_id: `workspace-hygiene-389155382838` +- generated_at: `2026-05-02T09:27:04+00:00` - project_root: `G:\_codex-git\tudo-para-ia-mais-humana` -- central_platform_folder: `` +- central_platform_folder: `G:\_codex-git\nucleo-gestao-operacional\central-de-ordem-de-servico\projects\15_repo_tudo-para-ia-mais-humana-platform` - status: `blocked` - clean: `False` - apply: `True` @@ -27,8 +27,8 @@ - applied: `True` - deleted: `False` - exists_after: `True` -- children_before: `2213` -- bytes_before: `60842050` +- children_before: `3052` +- bytes_before: `68130347` - note: artifact retained by ACL or filesystem lock - error: `PermissionError: [WinError 5] Acesso negado: 'G:\\_codex-git\\tudo-para-ia-mais-humana\\.test-tmp\\tmpnk6r4sdb'` - footprint_errors: diff --git a/matrizes/workspace-hygiene-targets.csv b/matrizes/workspace-hygiene-targets.csv index 6087e2e..90fab97 100644 --- a/matrizes/workspace-hygiene-targets.csv +++ b/matrizes/workspace-hygiene-targets.csv @@ -1,3 +1,3 @@ target_id,path,action,status,applied,deleted,exists_after,children_before,bytes_before,error,note -python-test-temp,G:\_codex-git\tudo-para-ia-mais-humana\.test-tmp,delete_directory,blocked,yes,no,yes,2213,60842050,PermissionError: [WinError 5] Acesso negado: 'G:\\_codex-git\\tudo-para-ia-mais-humana\\.test-tmp\\tmpnk6r4sdb',artifact retained by ACL or filesystem lock +python-test-temp,G:\_codex-git\tudo-para-ia-mais-humana\.test-tmp,delete_directory,blocked,yes,no,yes,3052,68130347,PermissionError: [WinError 5] Acesso negado: 'G:\\_codex-git\\tudo-para-ia-mais-humana\\.test-tmp\\tmpnk6r4sdb',artifact retained by ACL or filesystem lock node-dependencies,G:\_codex-git\tudo-para-ia-mais-humana\node_modules,verify_absent,not_found,no,no,no,0,0,,target already absent diff --git a/src/mais_humana/canonical_identity.py b/src/mais_humana/canonical_identity.py index b481d49..1fc644a 100644 --- a/src/mais_humana/canonical_identity.py +++ b/src/mais_humana/canonical_identity.py @@ -30,6 +30,7 @@ from .identity_policy import ( from .models import GeneratedFile, as_plain_data, merge_unique, slugify, utc_now from .repository_mesh import RepositoryTarget, default_repository_targets, stable_digest from .repository_mesh_naming import plataform_to_platform, platform_to_plataform +from .storage import connect, upsert_files class CanonicalAliasKind(str, Enum): @@ -848,6 +849,53 @@ def write_identity_graph_artifacts( return tuple(records) +def _semantic_status_record(project_root: Path) -> GeneratedFile: + return GeneratedFile( + path=str(project_root / "dados" / "canonical-identity-semantic-write-status.json"), + description="Status da escrita semantica local do grafo canonico.", + function="canonical identity local semantic write status", + file_type="json", + changed_by="mais_humana.canonical_identity", + change_summary="Registrado resultado da atualizacao do controle-semantico.sqlite local.", + relation_to_order="0035_EXECUTIVA__reconciliar-nome-canonico-real-alias-platform", + ) + + +def write_local_semantic_records(project_root: Path, records: Sequence[GeneratedFile]) -> tuple[GeneratedFile, ...]: + sqlite_path = project_root / "controle-semantico.sqlite" + status_record = _semantic_status_record(project_root) + status_path = Path(status_record.path) + tracked_records = tuple(records) + (status_record,) + error = "" + ok = False + try: + with connect(sqlite_path) as conn: + upsert_files(conn, tracked_records) + ok = True + except Exception as exc: + error = f"{type(exc).__name__}: {exc}" + status_path.parent.mkdir(parents=True, exist_ok=True) + status_path.write_text( + json.dumps( + { + "generatedAt": utc_now(), + "ok": ok, + "error": error, + "sqlitePath": str(sqlite_path), + "filesCount": len(tracked_records), + }, + ensure_ascii=False, + indent=2, + sort_keys=True, + ), + encoding="utf-8", + ) + if ok: + with connect(sqlite_path) as conn: + upsert_files(conn, (status_record,)) + return tracked_records + + def run_canonical_identity_graph( *, project_root: Path, @@ -856,4 +904,5 @@ def run_canonical_identity_graph( ) -> tuple[CanonicalIdentityGraph, tuple[GeneratedFile, ...]]: graph = build_identity_graph(use_generated=use_generated) records = write_identity_graph_artifacts(graph, project_root, central_platform_folder=central_platform_folder) - return graph, records + semantic_records = write_local_semantic_records(project_root, records) + return graph, semantic_records