Repository navigation
Fase 1: fundação + Core Runner + SDK psrunner (specs 001, 002) - #1
Merged
Merged
Conversation
- global.json (SDK 10.0.400, Microsoft.Testing.Platform), .slnx - Directory.Build.props (net10.0, nullable, warnings como erro, metadados de pacote) - Directory.Packages.props (versões centralizadas), .editorconfig, .gitattributes - README com o uso da Fase 1 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- @stage, Context (log, segredos, new_file), File e StageError - entrypoint psrunner.host (protocolo 1): conversão e validação dos 12 tipos, table como DataFrame quando há pandas, limite de memória no Linux, traceback do usuário - psrunner.testing.run_stage (pytest sem .NET) e CLI validate/run - schemas/stage.v1.json - pytest (54 testes), mypy strict e ruff Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Abstractions: FieldType/FieldDefinition, StageDefinition, RunResult, PsrFile, ICatalog, ISecretProvider, IRunRecorder e exceções - Core: catálogo em código e em pasta (stage.json validado pelo JSON Schema), binding/validação das entradas, ambientes uv com lock e cache por hash, executor de processo (ambiente limpo, timeout, cancelamento, Job Object no Windows, cauda de log com segredos mascarados, validação das saídas), RunStageAsync com retry, telemetria (ActivitySource/Meter) e AddPythonScriptRunner - 62 testes (unitários + integração com Python real), um por critério de aceite Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- .NET em Ubuntu e Windows (build + testes com uv), verificação de formatação - psrunner: Python 3.10–3.13 no Ubuntu e 3.12 no Windows (ruff, mypy, pytest) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A action não publica a tag flutuante v10. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
No Linux o próprio Python define LC_CTYPE ao iniciar com locale C (PEP 538); a variável não vem do host. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…no Windows No Windows o python.exe do venv é um lançador que cria o interpretador real como processo filho; o Job Object atribuído pelo .NET logo após o Process.Start podia não alcançar esse filho (teste AC-9 instável no CI). O psrunner agora cria um Job Object para o próprio processo via ctypes antes de importar o script, como já fazia com setrlimit no Linux. O Job Object do .NET continua encerrando a árvore de processos no timeout e no cancelamento. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Resumo
Primeira fase do PythonScriptRunner: estrutura da solução, Core Runner (execução síncrona de Stages) e o SDK Python
psrunner, com CI em Windows e Linux.PythonScriptRunner.Abstractions+PythonScriptRunner.Core: catálogos (C# fluente e pasta +stage.json), validação dos 12 tipos, ambientes uv (lock com hashes, venv por hash, trava entre processos), executor de processo (ambiente limpo, timeout, cancelamento, Job Object no Windows, cauda de log com segredos mascarados),RunStageAsynccom retry, telemetriapsrunner@stage,Context,File,StageError, entrypointpsrunner.host,psrunner.testing.run_stage, CLIvalidate/run.slnx,Directory.Build.props, CPM,.editorconfig, CI no GitHub ActionsRunPipelineAsync(trilhas) entra na Fase 2, como planejado.Critérios de aceite
Spec 001 (testes
Spec001_ACnn_*, Python real via uv)eco) devolve a saídaInputValidationException, nenhum processo iniciadoOutputContractViolationStageErrorpreserva código e tracebackMemoryLimitExceeded(Job Object no Windows,setrlimitno Linux)input.jsonSecretNotFoundsem iniciar PythonEnvironmentSetupFailedPsrFilee são apagados noDisposeAsyncArtifactLimitExceededout/→OutputContractViolationtruncated = truepsr.stage.execute(Activity) epsr.step.duration(métrica)stage.jsoninválido → erro com arquivo e caminho JSONStageNotFoundExceptionSpec 002 (pytest)
Verificação local (Windows)
dotnet format --verify-no-changesAjustes feitos durante o CI
astral-sh/setup-uvfixado na tag exatav10.3.0, porque a action não publica a tag flutuantev10.LC_CTYPEpassou a ser aceito no ambiente do processo. No Linux é o próprio Python que define essa variável ao iniciar com locale C (PEP 538); ela não vem do host.python.exede um venv é um lançador que cria o interpretador real como processo filho. O Job Object atribuído pelo .NET logo após oProcess.Startàs vezes não pegava esse filho (AC-9 instável). Agora opsrunneraplica o limite no próprio interpretador: Job Object viactypesno Windows,setrlimitno Linux. O Job Object do .NET continua encerrando a árvore de processos no timeout e no cancelamento.Detalhes de implementação a observar
PSR_SCRIPT; no Linux o ambiente limpo também temHOME/TMPDIRapontando paratmp/.psrunneré instalado em cada venv comuv pip install --no-deps, depois douv pip sync, na versão exata dePsrunnerRequirement(padrãopsrunner==0.1.0, ou um wheel local). Essa versão entra no hash do ambiente. Enquanto o pacote não estiver no PyPI (Fase 7), é preciso apontarPsrunnerRequirementpara um wheel local, como os testes fazem.StageDefinition.PythonVersioné anulável (nullusa o padrão 3.12). EmPsrFile,Length/Sha256são anuláveis só para streams ainda não lidos.dotnet testusa o Microsoft.Testing.Platform (exigência do .NET 10 com xunit.v3 4.x), configurado noglobal.json.Como testar
🤖 Generated with Claude Code