fix(profile): admit CLI capture destinations before publication
Recibo final — release concluído; Sonar da branch continua bloqueado
O workflow Release 47660597932 terminou SUCCESS. Sua validação final, job 146118478839, executou o próprio merge c33f9b697c11899cb213fa6ae5e6e24b59994fce: setup/check aprovados; 2.674 testes em 135,23 s; zero avisos de runtime; nenhum teste próximo dos limites. Passaram os cinco casos públicos de profile e os sete de composição Git. A árvore permanece 040e35fa965e2bd6b3dc37e6eb17eb5ceab7147f.
O artefato 15992023502 teve SHA-256 30bbc15363fc1143e82b6baa216d1f142578d7c6bed7d6ea4a1ad9decf3f82a8 conferido. O recibo de check registra o mesmo commit/árvore, retorno zero e checkout sem alterações antes/depois. Os resultados de testes vêm dos logs nativos; não se atribui JUnit ao artefato que não o contém.
O plano registrou bump=none current=0.12.3 next=0.12.3 releasable=False. Tag/build/publish e a qualificação opcional FULL foram pulados pela rota; não houve nova versão publicada.
O gate Sonar da integração permanece ERROR/C, exigindo A. A consulta atual de vulnerabilidades confirmou os mesmos quatro IDs do inventário anterior: AaHDJM8o__TgKab75PGM, AaHDJM8o__TgKab75PGN, AaHDJM8o__TgKab75PGO (yaml:S2068 nos snapshots de testes) e AaFW-IYcx7x0cPygmn5y (pythonsecurity:S8707 no clock). Nenhum finding foi encerrado, suprimido ou classificado. A #3027 trata o escopo dos catálogos e continua draft com projeções pendentes.
Este recibo encerra a observação das execuções nativas desta entrega. As menções abaixo a release ainda em processamento são históricas. Ele não declara todos os projetos ou gates verdes.
Versão 1.5 · 06/12/2026 · Marlon Costa marlon.costa@datacosmos.com.br — Datacosmos.
Integrated repair — native validation passed; branch Sonar gate remains open
PR #3034 merged as c33f9b697c11899cb213fa6ae5e6e24b59994fce, with parents b5531266d2865df1d0a4e60677e65b9aab0a0aaf and final head 08e0bf4486521d24c50a7849913966715f464dd7. The merged tree 040e35fa965e2bd6b3dc37e6eb17eb5ceab7147f equals the tested head and preview c75ca09d775bd5079699504e87ec8d99545119a6. All concurrent profile repairs, documentation and five public scenarios are preserved.
Failure boundaries and causal repairs
The fifth public regression at ac14f61e exposed a separate result-contract defect: execute() raised the original path-admission ValueError before returning its typed result. CI 47658492516 / 146110370496 recorded 1 failed and 2,466 passed in 95.86 s, with zero runtime warnings. The concurrent correction f369f7e moved admission into the existing specific try, preserving operation order and r.fail(..., exception=failure). Construction still admits the initial paths; execution re-admits them; the CLI finalizer propagates the original cause through unwrap(). The guide now limits the exception-preservation statement to path refusals.
CI 47659554901 / 146113802542 then stopped before profiling: 1 failed and 110 passed in 19.64 s. The declaration-parser test exceeded its unchanged 2-second call limit while cloning a fixture submodule, before invoking git_submodule_declarations().
Commit 08e0bf4 removes only that test's unused two-member cloning. It creates a real repository and physical .gitmodules, keeps the native git config --file update and parser, and preserves every field assertion. The separate committed-gitlink and dependency-graph scenarios still construct real submodules. No operation was moved outside the call timer; no mock, skip, marker, timeout change or unchanged rerun was added.
Native receipts for the exact candidate and merge
| Revision | Native job | Result |
|---|---|---|
Head 08e0bf4, preview c75ca09d | PR CI 47660223980 / 146115833076 | Setup/check passed; 2,674 collected test executions passed in 131.00 s; zero runtime warnings. |
Merge c33f9b69 | Push CI 47660597956 / 146116997854 | Setup/check passed; 2,674 passed in 118.21 s; zero runtime warnings. |
Merge c33f9b69 | Exact release-candidate validation 47660597932 / 146117045788 | Setup/check passed; 2,674 passed in 144.13 s; zero runtime warnings. |
All five public profile cases passed in each of these receipts. The seven Git-composition cases passed in the PR and push suites, including the formerly timed-out declaration test and the unchanged gitlink/graph scenarios. Each of those suites reported one other test near the unchanged ordinary limit, without exceeding it. The optional full qualification was not selected.
PR Sonar, Semgrep, Cubic and release-plan checks passed; all review threads are resolved. Post-merge docs quality passed; deployment was skipped. The whole release workflow was still processing its release-PR stage when this receipt was written; its exact-candidate validation above is complete.
The integration-branch Sonar gate is still red. Check 146117747671 reports Security Rating C on new code, requiring A. The preceding base b5531266 already reports the same failed condition in check 146111744653. This establishes the preceding gate condition, not identity or resolution of every underlying issue. GitHub supplied no issue annotations. No analyzer finding was suppressed or declared a false positive. Branch analysis.
Earlier sections below retain their original heads and observations as historical receipts. This bounded delivery does not close the original broader facade/performance acceptance, the separate inode-isolation/Mise qualification, or the branch security findings.
Receipt version: 1.4
Date: 2026-12-06
Author: Marlon Costa marlon.costa@datacosmos.com.br — Datacosmos
Integrada e revalidada — resultado atual
Merge: c33f9b697c11899cb213fa6ae5e6e24b59994fce. Árvore: 040e35fa965e2bd6b3dc37e6eb17eb5ceab7147f. Pais: integração b5531266 e candidato 08e0bf44.
O CI do commit integrado executou o próprio SHA de merge. Setup, check e tests passaram: 2.674 testes em 118,21 s, com zero avisos de runtime. Os cinco cenários públicos de profiling e o caso de declarações Git aparecem individualmente como PASSED. O Docs do mesmo SHA passou em setup, build e check; deploy foi skipped conforme a branch.
A correção admite o destino pelo owner do relatório antes dos efeitos da captura. Revalida antes do relatório. A recusa operacional retorna no Result com a exceção original; o finalizador propaga essa causa por unwrap. A fixture de declarações mantém repositório e parser Git reais, eliminando apenas a criação de submódulos que não participa daquele contrato. Os demais cenários com gitlinks permanecem completos.
O CI do candidato 08e0bf44 também passou: 2.674 testes em 131,00 s, zero avisos. O timeout anterior do teste de declarações e todos os REDs estão preservados no histórico. A duração individual do caso após o ajuste não foi publicada no recibo verde; não há ganho temporal medido nem causa inicial da variação de tempo comprovada.
Sonar da integração continua reprovado em Security Rating C, exigindo A. A análise exata do merge mantém os mesmos quatro findings históricos: três S2068 no snapshot de teste e o S8707 em clock.py. Esta integração não fecha esses findings. A triagem estática e a correção comportamental têm escopos distintos.
Full permaneceu skipped. Os casos Mod marcados slow não fizeram parte da população executada. O aceite original da fachada, os trackers e a adoção pelos consumidores não são declarados concluídos por este reparo.
Autor: Marlon Costa marlon.costa@datacosmos.com.br — Datacosmos.
Data: 06/12/2026 — America/Sao_Paulo. Versão desta atualização: 1.8.
Histórico anterior à integração
Delivered — standard CI passed before and after merge
Merged through the normal protected route as c33f9b697c11899cb213fa6ae5e6e24b59994fce. Qualified delivery head: 08e0bf4486521d24c50a7849913966715f464dd7. The PR preview and final merge share tree 040e35fa965e2bd6b3dc37e6eb17eb5ceab7147f.
The clock admits the actual immutable capture destination through the report owner before creating directories, starting the profiler or running the operation. Finalization repeats that same admission after the operation. The report's typed failure retains the original exception and traceback; the finalizer propagates it through unwrap(). All five public regressions passed, including direct report execution after directory relocation. Nested captures still reuse their outer capture.
A later standard-CI failure exposed redundant fixture work: the declaration-only Git test cloned two members before calling the API under test. Concurrent commit 08e0bf44 uses a real repository and physical .gitmodules instead, preserving native Git parsing, boolean configuration and every assertion. The separate committed-gitlink and dependency-graph tests still construct real submodules. No time limit was increased.
Final execution evidence
- PR CI 47660223980 / job 146115833076: setup, Ruff, Pyrefly and tests passed; 2,674 passed in 131.00 seconds; zero captured runtime warnings.
- Post-merge CI 47660597956 / job 146116997854: checked out the exact merge
c33f9b697c11899cb213fa6ae5e6e24b59994fce; setup, check and tests passed; 2,674 passed in 118.21 seconds; zero captured runtime warnings. - All five public profiling scenarios passed in both runs. The optional full native test qualification was not requested or run.
- Existing source and concurrent integration changes were preserved. No private-interface test, mock, warning suppression, compatibility alias, forced update or protection bypass was introduced.
This delivery does not claim to resolve separate Sonar findings, native projection blockers, upstream Mise warnings or the wider facade qualification.
Traceability: version 1.4; 2026-12-06 (America/Sao_Paulo); Marlon Costa marlon.costa@datacosmos.com.br — Datacosmos.
Historical investigation and receipts
The earlier pending statements below describe their historical candidate revisions. The delivered status and final receipts above supersede them without removing the original evidence.
Integrado — CI do PR aprovada; pós-merge em execução
Merge normal confirmado: c33f9b697c11899cb213fa6ae5e6e24b59994fce, com pais b5531266d2865df1d0a4e60677e65b9aab0a0aaf e 08e0bf4486521d24c50a7849913966715f464dd7. A árvore integrada é 040e35fa965e2bd6b3dc37e6eb17eb5ceab7147f, igual à candidata qualificada. A branch 0.12.0-dev foi lida diretamente nesse merge.
CI padrão 47660223980 / job 146115833076: make setup, make check e make tests aprovados; 2.674 passed em 131,00 s; zero runtime warnings. Os cinco casos públicos de profile e todos os sete casos de composição Git passaram. A qualificação opcional FULL foi pulada pela rota padrão; não foi solicitada.
Correções qualificadas
O clock elege o caminho imutável e chama a preparação do relatório antes de criar diretórios, iniciar o profiler ou executar a operação. O relatório revalida o destino na finalização, antes de leitura/renderização/publicação, pelo mesmo guard usado na construção. A admissão fica dentro do tratamento operacional de execute(): recusas de caminho retornam um Result de falha que preserva a instância da exceção e a relança pelo unwrap(). Não há política de caminho duplicada no clock.
O quinto caso teve RED nativo em 47658492516 / 146110370496: a chamada direta a execute() lançava antes de retornar seu contrato. O fix f369f7e1, preservado até a ponta qualificada, colocou a admissão dentro do try existente. Os outros quatro casos preservam bytes recusados, captura válida, nesting e recusa após relocação real. Os testes usam APIs públicas e arquivos físicos.
O teste de declarações Git teve RED independente em 47659554901 / 146113802542: o limite de 2 s interrompeu git submodule add no preparo, antes da API sob teste. Em 08e0bf44, esse caso passou a usar um repositório real e .gitmodules físico, mantendo o parser Git, a configuração booleana e todas as asserções. Os clones/commits dos membros não eram consumidos por esse contrato. Os cenários de gitlink e grafo mantêm suas fixtures completas. Duas revisões independentes confirmaram o escopo. O limite de 2 s permaneceu.
Pós-merge
Acompanhar o CI push 47660597956 e o Release 47660597932. Eles ainda estavam em execução neste recibo. O resultado verde do PR não antecipa esses resultados nem encerra os findings históricos do Sonar da branch.
Versão 1.4 · 06/12/2026 · Marlon Costa marlon.costa@datacosmos.com.br — Datacosmos.
Histórico preservado
As seções abaixo registram candidatos anteriores. Seus estados “pending/current” são históricos e são substituídos pelo recibo acima.
Historical finalization and typing repair
Head ea00e0942546aff3e1c7d9de3b6e96ad0c1177b4 adopts integration 8cf506a94e433090d6db81778ad3e4d67d06f811 through a normal two-parent commit. The two integration-side codemod changes are disjoint and preserved. All four public destination regressions remain unchanged.
The fourth regression produced a real behavioral failure in CI 47656569512, job 146104249608: 2,467 passed, 1 failed in 131.21 seconds, zero runtime warnings. After the operation relocated the capture directory, the atomic writer refused its symlink with NotADirectoryError; the report owner's earlier domain refusal was missing. This is not evidence that the writer permitted an escaped write.
The concurrent correction 0cfc00cb re-admits paths at the start of execute, before any read or report publication. CI 47657095251, job 146105930547 then exposed one Pyrefly not-callable error: directly calling the Pydantic-decorated validator produces a PydanticDescriptorProxy typing contract. Tests were not executed in that run.
The current correction keeps the path policy once in an ordinary internal owner method. The Pydantic hook and execution boundary both call it. It preserves the prepared model, messages and exception chaining. No cast, suppression, model reconstruction, compatibility alias or private-interface test is added. Independent code review and diff checks passed; standard CI must qualify this exact head.
Rastreabilidade: versão 1.3; 2026-12-06; Marlon Costa marlon.costa@datacosmos.com.br — Datacosmos.
Historical additional finalization regression
Head 44352e0098c3cd2d5b6aa6cd8fb8f794b1d41cc7 preserves the concurrent production repair, public test namespace and typed nested predicate. It adds a fourth public regression: a real operation relocates a child of .reports and installs a symlink at its previous path. The report must repeat its existing destination admission after that operation.
The prepared model currently proceeds directly to execute(). Source review therefore predicts loss of the report owner's path refusal. The pinned CLI writer independently rejects symlink traversal; no escaped summary write is claimed. The native CI must determine the actual failure before the finalizer changes. This requirement remains open and the PR is not ready to merge.
The test keeps the raw profile readable, requires no summary in the relocated directory, and expects the existing domain refusal. It uses the real public profiler and report-preparation owner. No private-state mutation, mock, limit change or filesystem-sandbox claim is introduced.
Problem
CLI profiling passes the output to the clock before the report owner admits its path. The report model already refuses captures outside the repository report root, but the refusal currently occurs after the shared profile has been replaced and immutable evidence has been published.
The regression exercises FlextInfraCli.infra_main through the public in-process CLI utility. It places four existing artifacts in a real project, enables profiling through the public typed settings owner, expects the existing path refusal, and requires unchanged bytes and directory entries. Settings are restored in finally.
Original regression candidate
Head: 6292bf7c355b958c6e4ee0cb879dbf941649351f.
Original commit parent: 3f8c5460f70a858a8824552e0ec643318fe740a1.
The original candidate left production unchanged. Two independent source reviews beyond the test author checked the public settings contract, CLI execution, default runner behavior and artifact assertions. Standard CI established the expected failure recorded below. The production correction has now been published and requires its own standard CI result.
No local test execution, optional full-suite qualification, mock, private-state mutation or changed time limit is used.
Native RED receipt
CI 47654158553, job 146096642852 checked out 0c04eaf8944fc3bb62162167a498fd49a59aca49: head 6292bf7c combined with integration b1838765ba31cfc1e6651c18c7692ef322fa1e72, tree 2ad7fed0b95bf1b686daad8096bb7798b2ac6216.
Setup, Ruff and Pyrefly passed. The regression failed at its unchanged-bytes assertion, after the expected path-refusal exception had already been observed. The shared file contained native cProfile/marshal data instead of its original bytes. This is the intended behavioral failure, not a timeout or a test-construction error.
The ordinary suite stopped on that first failure: 1 failed, 2461 passed in 111.78 seconds, with zero captured runtime warnings and timed_out=False. The fail-fast stop means the remaining tests were not executed. No rerun was requested.
Causal repair under review
The clock owns the immutable capture name and nested-operation reuse. The report module owns destination admission. The correction must run that existing admission on the actual immutable destination before directory creation, profiler startup and command execution, while preserving nested captures and generic clock callers. The regression will remain in the ordinary test lane.
This defect was found while investigating the remaining profiling findings. It does not validate the separate Sonar trace through profile_child and _preserve_previous; no analyzer issue status is changed.
Published causal correction — 2026-12-06
Head: 2f68060ccc28f7d7d4f84df9966002409fca5d15.
Tree: 020725d92ab96242d1006a32fcf8c4cea32b0f6e.
Parents: regression 6292bf7c355b958c6e4ee0cb879dbf941649351f and integration b1838765ba31cfc1e6651c18c7692ef322fa1e72.
The clock now elects the immutable path and invokes prepare_profile before directory creation, profiler startup or command execution. FlextInfraCProfileReport.prepare_capture validates one report model and returns a closure that later executes that same model. Nested captures still reuse the active operation before preparation; generic callers without report publication retain their existing path. The CLI and python -m flext_infra share the corrected entrypoint.
The sole callback consumer was rewired in the same change. The retired callback/name has no compatibility alias. No report-domain policy was copied into the clock. The first operation failure, native capture publication and finalization ordering remain owned by their existing components. Two independent source reviews found no blocker. This is not a filesystem sandbox or a guarantee against concurrent directory replacement.
The source change and current integration were adopted through a normal two-parent commit. The four changed paths had no integration-side changes; all concurrent integration work is preserved. Standard CI must validate this exact head. No local runtime result, optional full-suite execution or Sonar disposition is claimed.
Traceability
Version: 1.2
Date: 2026-12-06
Author: Marlon Costa marlon.costa@datacosmos.com.br — Datacosmos
Summary by cubic
Fixes CLI profiling so a destination outside the report root is refused before any profile artifacts are replaced or published. The report's destination admission runs twice: once before directories are created, the profiler starts, or the command runs, and again before the summary renders, so a capture directory relocated by the operation is also refused. Admission failures now return through execute() as a typed Result failure carrying the original exception instead of raising; a missing input profile keeps the existing failure result, which carries no exception.
- Renames the clock's
after_profilehook toprepare_profile. - Adds regression tests for refused destinations, unused summary symlinks, nested profiling, and relocated capture directories, including
report.execute()'s returned-failure contract. - Parses
.gitmodulesdeclarations without cloning unused members in the declaration test. - Refreshes the execution-context guide and WIP handoff.