codeplain 0.4.3.dev60__tar.gz → 0.4.3.dev62__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {codeplain-0.4.3.dev60 → codeplain-0.4.3.dev62}/.github/scripts/record-linear-release.cjs +79 -25
- {codeplain-0.4.3.dev60 → codeplain-0.4.3.dev62}/PKG-INFO +1 -1
- {codeplain-0.4.3.dev60 → codeplain-0.4.3.dev62}/codeplain_REST_api.py +51 -47
- {codeplain-0.4.3.dev60 → codeplain-0.4.3.dev62}/plain2code.py +2 -0
- codeplain-0.4.3.dev62/render_machine/actions/fix_conformance_test.py +423 -0
- {codeplain-0.4.3.dev60 → codeplain-0.4.3.dev62}/render_machine/actions/fix_unit_tests.py +1 -0
- codeplain-0.4.3.dev62/render_machine/actions/prepare_testing_environment.py +120 -0
- {codeplain-0.4.3.dev60 → codeplain-0.4.3.dev62}/render_machine/actions/render_conformance_tests.py +2 -0
- {codeplain-0.4.3.dev60 → codeplain-0.4.3.dev62}/render_machine/actions/run_conformance_tests.py +5 -0
- codeplain-0.4.3.dev62/render_machine/agent_tools.py +601 -0
- codeplain-0.4.3.dev62/render_machine/conformance_fix_conversation.py +409 -0
- {codeplain-0.4.3.dev60 → codeplain-0.4.3.dev62}/render_machine/render_context.py +3 -1
- {codeplain-0.4.3.dev60 → codeplain-0.4.3.dev62}/render_machine/render_types.py +69 -0
- {codeplain-0.4.3.dev60 → codeplain-0.4.3.dev62}/render_machine/render_utils.py +10 -1
- codeplain-0.4.3.dev62/tests/test_agent_tools.py +346 -0
- codeplain-0.4.3.dev62/tests/test_api_client_retries.py +52 -0
- codeplain-0.4.3.dev62/tests/test_background_preparation.py +73 -0
- codeplain-0.4.3.dev62/tests/test_conformance_fix_conversation.py +677 -0
- {codeplain-0.4.3.dev60 → codeplain-0.4.3.dev62}/tests/test_fix_unit_tests_action.py +7 -0
- {codeplain-0.4.3.dev60 → codeplain-0.4.3.dev62}/tests/test_fix_unit_tests_conformance_context.py +8 -106
- {codeplain-0.4.3.dev60 → codeplain-0.4.3.dev62}/tests/test_render_finished_report.py +14 -0
- codeplain-0.4.3.dev62/tests/test_script_timeout_hint.py +24 -0
- codeplain-0.4.3.dev60/render_machine/actions/fix_conformance_test.py +0 -221
- codeplain-0.4.3.dev60/render_machine/actions/prepare_testing_environment.py +0 -46
- codeplain-0.4.3.dev60/render_machine/agent_tools.py +0 -270
- codeplain-0.4.3.dev60/tests/test_agent_tools.py +0 -166
- {codeplain-0.4.3.dev60 → codeplain-0.4.3.dev62}/.claude/settings.json +0 -0
- {codeplain-0.4.3.dev60 → codeplain-0.4.3.dev62}/.flake8 +0 -0
- {codeplain-0.4.3.dev60 → codeplain-0.4.3.dev62}/.github/dependabot.yml +0 -0
- {codeplain-0.4.3.dev60 → codeplain-0.4.3.dev62}/.github/workflows/e2e.yml +0 -0
- {codeplain-0.4.3.dev60 → codeplain-0.4.3.dev62}/.github/workflows/lint-and-test.yml +0 -0
- {codeplain-0.4.3.dev60 → codeplain-0.4.3.dev62}/.github/workflows/lint-powershell.yml +0 -0
- {codeplain-0.4.3.dev60 → codeplain-0.4.3.dev62}/.github/workflows/notify-slack-on-main-merge.yml +0 -0
- {codeplain-0.4.3.dev60 → codeplain-0.4.3.dev62}/.github/workflows/publish-dev-to-pypi.yml +0 -0
- {codeplain-0.4.3.dev60 → codeplain-0.4.3.dev62}/.github/workflows/publish-install-script.yml +0 -0
- {codeplain-0.4.3.dev60 → codeplain-0.4.3.dev62}/.github/workflows/publish-to-pypi.yml +0 -0
- {codeplain-0.4.3.dev60 → codeplain-0.4.3.dev62}/.gitignore +0 -0
- {codeplain-0.4.3.dev60 → codeplain-0.4.3.dev62}/.vscode/launch.json +0 -0
- {codeplain-0.4.3.dev60 → codeplain-0.4.3.dev62}/.vscode/settings.json +0 -0
- {codeplain-0.4.3.dev60 → codeplain-0.4.3.dev62}/CLAUDE.md +0 -0
- {codeplain-0.4.3.dev60 → codeplain-0.4.3.dev62}/CONTRIBUTING.md +0 -0
- {codeplain-0.4.3.dev60 → codeplain-0.4.3.dev62}/LICENSE +0 -0
- {codeplain-0.4.3.dev60 → codeplain-0.4.3.dev62}/README.md +0 -0
- {codeplain-0.4.3.dev60 → codeplain-0.4.3.dev62}/change_detection.py +0 -0
- {codeplain-0.4.3.dev60 → codeplain-0.4.3.dev62}/cli_output/__init__.py +0 -0
- {codeplain-0.4.3.dev60 → codeplain-0.4.3.dev62}/cli_output/dry_run.py +0 -0
- {codeplain-0.4.3.dev60 → codeplain-0.4.3.dev62}/cli_output/render_summary.py +0 -0
- {codeplain-0.4.3.dev60 → codeplain-0.4.3.dev62}/cli_output/status.py +0 -0
- {codeplain-0.4.3.dev60 → codeplain-0.4.3.dev62}/concept_utils.py +0 -0
- {codeplain-0.4.3.dev60 → codeplain-0.4.3.dev62}/config/__init__.py +0 -0
- {codeplain-0.4.3.dev60 → codeplain-0.4.3.dev62}/config/system_config.yaml +0 -0
- {codeplain-0.4.3.dev60 → codeplain-0.4.3.dev62}/conformance_fix_journal.py +0 -0
- {codeplain-0.4.3.dev60 → codeplain-0.4.3.dev62}/diff_utils.py +0 -0
- {codeplain-0.4.3.dev60 → codeplain-0.4.3.dev62}/docs/generate_cli.py +0 -0
- {codeplain-0.4.3.dev60 → codeplain-0.4.3.dev62}/docs/plain2code_cli.md +0 -0
- {codeplain-0.4.3.dev60 → codeplain-0.4.3.dev62}/docs/starting_a_plain_project_from_scratch.md +0 -0
- {codeplain-0.4.3.dev60 → codeplain-0.4.3.dev62}/event_bus.py +0 -0
- {codeplain-0.4.3.dev60 → codeplain-0.4.3.dev62}/examples/example_hello_world_golang/config.yaml +0 -0
- {codeplain-0.4.3.dev60 → codeplain-0.4.3.dev62}/examples/example_hello_world_golang/harness_tests/hello_world_test.go +0 -0
- {codeplain-0.4.3.dev60 → codeplain-0.4.3.dev62}/examples/example_hello_world_golang/hello_world_golang.plain +0 -0
- {codeplain-0.4.3.dev60 → codeplain-0.4.3.dev62}/examples/example_hello_world_golang/run.sh +0 -0
- {codeplain-0.4.3.dev60 → codeplain-0.4.3.dev62}/examples/example_hello_world_golang/tests/hello_world_golang/display-hello-world.plain +0 -0
- {codeplain-0.4.3.dev60 → codeplain-0.4.3.dev62}/examples/example_hello_world_python/config.yaml +0 -0
- {codeplain-0.4.3.dev60 → codeplain-0.4.3.dev62}/examples/example_hello_world_python/harness_tests/hello_world_display/test_hello_world.py +0 -0
- {codeplain-0.4.3.dev60 → codeplain-0.4.3.dev62}/examples/example_hello_world_python/hello_world_python.plain +0 -0
- {codeplain-0.4.3.dev60 → codeplain-0.4.3.dev62}/examples/example_hello_world_python/run.sh +0 -0
- {codeplain-0.4.3.dev60 → codeplain-0.4.3.dev62}/examples/example_hello_world_python/tests/hello_world_python/display-hello-world.plain +0 -0
- {codeplain-0.4.3.dev60 → codeplain-0.4.3.dev62}/examples/example_hello_world_react/config.yaml +0 -0
- {codeplain-0.4.3.dev60 → codeplain-0.4.3.dev62}/examples/example_hello_world_react/harness_tests/hello_world_display/cypress/e2e/hello_world.cy.ts +0 -0
- {codeplain-0.4.3.dev60 → codeplain-0.4.3.dev62}/examples/example_hello_world_react/harness_tests/hello_world_display/cypress/support/e2e.ts +0 -0
- {codeplain-0.4.3.dev60 → codeplain-0.4.3.dev62}/examples/example_hello_world_react/harness_tests/hello_world_display/cypress.config.ts +0 -0
- {codeplain-0.4.3.dev60 → codeplain-0.4.3.dev62}/examples/example_hello_world_react/harness_tests/hello_world_display/package.json +0 -0
- {codeplain-0.4.3.dev60 → codeplain-0.4.3.dev62}/examples/example_hello_world_react/harness_tests/hello_world_display/tsconfig.json +0 -0
- {codeplain-0.4.3.dev60 → codeplain-0.4.3.dev62}/examples/example_hello_world_react/hello_world_react.plain +0 -0
- {codeplain-0.4.3.dev60 → codeplain-0.4.3.dev62}/examples/example_hello_world_react/run.sh +0 -0
- {codeplain-0.4.3.dev60 → codeplain-0.4.3.dev62}/examples/example_hello_world_react/tests/hello_world_react/display-hello-world.plain +0 -0
- {codeplain-0.4.3.dev60 → codeplain-0.4.3.dev62}/examples/example_hello_world_react/tests/typescript-react-app-boilerplate/entry-point.plain +0 -0
- {codeplain-0.4.3.dev60 → codeplain-0.4.3.dev62}/examples/run.sh +0 -0
- {codeplain-0.4.3.dev60 → codeplain-0.4.3.dev62}/file_utils.py +0 -0
- {codeplain-0.4.3.dev60 → codeplain-0.4.3.dev62}/git_preflight.py +0 -0
- {codeplain-0.4.3.dev60 → codeplain-0.4.3.dev62}/git_utils.py +0 -0
- {codeplain-0.4.3.dev60 → codeplain-0.4.3.dev62}/install/bash/examples.sh +0 -0
- {codeplain-0.4.3.dev60 → codeplain-0.4.3.dev62}/install/bash/install.sh +0 -0
- {codeplain-0.4.3.dev60 → codeplain-0.4.3.dev62}/install/bash/walkthrough.sh +0 -0
- {codeplain-0.4.3.dev60 → codeplain-0.4.3.dev62}/install/powershell/examples.ps1 +0 -0
- {codeplain-0.4.3.dev60 → codeplain-0.4.3.dev62}/install/powershell/install.ps1 +0 -0
- {codeplain-0.4.3.dev60 → codeplain-0.4.3.dev62}/install/powershell/walkthrough.ps1 +0 -0
- {codeplain-0.4.3.dev60 → codeplain-0.4.3.dev62}/memory_management.py +0 -0
- {codeplain-0.4.3.dev60 → codeplain-0.4.3.dev62}/metadata_utils.py +0 -0
- {codeplain-0.4.3.dev60 → codeplain-0.4.3.dev62}/module_renderer.py +0 -0
- {codeplain-0.4.3.dev60 → codeplain-0.4.3.dev62}/partial_rendering.py +0 -0
- {codeplain-0.4.3.dev60 → codeplain-0.4.3.dev62}/path_resolution.py +0 -0
- {codeplain-0.4.3.dev60 → codeplain-0.4.3.dev62}/plain2code_arguments.py +0 -0
- {codeplain-0.4.3.dev60 → codeplain-0.4.3.dev62}/plain2code_cli.md +0 -0
- {codeplain-0.4.3.dev60 → codeplain-0.4.3.dev62}/plain2code_console.py +0 -0
- {codeplain-0.4.3.dev60 → codeplain-0.4.3.dev62}/plain2code_events.py +0 -0
- {codeplain-0.4.3.dev60 → codeplain-0.4.3.dev62}/plain2code_exceptions.py +0 -0
- {codeplain-0.4.3.dev60 → codeplain-0.4.3.dev62}/plain2code_logger.py +0 -0
- {codeplain-0.4.3.dev60 → codeplain-0.4.3.dev62}/plain2code_nodes.py +0 -0
- {codeplain-0.4.3.dev60 → codeplain-0.4.3.dev62}/plain2code_read_config.py +0 -0
- {codeplain-0.4.3.dev60 → codeplain-0.4.3.dev62}/plain2code_state.py +0 -0
- {codeplain-0.4.3.dev60 → codeplain-0.4.3.dev62}/plain2code_telemetry.py +0 -0
- {codeplain-0.4.3.dev60 → codeplain-0.4.3.dev62}/plain2code_utils.py +0 -0
- {codeplain-0.4.3.dev60 → codeplain-0.4.3.dev62}/plain_file.py +0 -0
- {codeplain-0.4.3.dev60 → codeplain-0.4.3.dev62}/plain_modules.py +0 -0
- {codeplain-0.4.3.dev60 → codeplain-0.4.3.dev62}/plain_spec.py +0 -0
- {codeplain-0.4.3.dev60 → codeplain-0.4.3.dev62}/pyproject.toml +0 -0
- {codeplain-0.4.3.dev60 → codeplain-0.4.3.dev62}/pytest.ini +0 -0
- {codeplain-0.4.3.dev60 → codeplain-0.4.3.dev62}/render_machine/__init__.py +0 -0
- {codeplain-0.4.3.dev60 → codeplain-0.4.3.dev62}/render_machine/actions/analyze_specification_ambiguity.py +0 -0
- {codeplain-0.4.3.dev60 → codeplain-0.4.3.dev62}/render_machine/actions/base_action.py +0 -0
- {codeplain-0.4.3.dev60 → codeplain-0.4.3.dev62}/render_machine/actions/commit_conformance_tests_changes.py +0 -0
- {codeplain-0.4.3.dev60 → codeplain-0.4.3.dev62}/render_machine/actions/commit_implementation_code_changes.py +0 -0
- {codeplain-0.4.3.dev60 → codeplain-0.4.3.dev62}/render_machine/actions/create_dist.py +0 -0
- {codeplain-0.4.3.dev60 → codeplain-0.4.3.dev62}/render_machine/actions/distill_conformance_test_memory.py +0 -0
- {codeplain-0.4.3.dev60 → codeplain-0.4.3.dev62}/render_machine/actions/exit_with_error.py +0 -0
- {codeplain-0.4.3.dev60 → codeplain-0.4.3.dev62}/render_machine/actions/finish_functional_requirement.py +0 -0
- {codeplain-0.4.3.dev60 → codeplain-0.4.3.dev62}/render_machine/actions/prepare_repositories.py +0 -0
- {codeplain-0.4.3.dev60 → codeplain-0.4.3.dev62}/render_machine/actions/refactor_code.py +0 -0
- {codeplain-0.4.3.dev60 → codeplain-0.4.3.dev62}/render_machine/actions/render_functional_requirement.py +0 -0
- {codeplain-0.4.3.dev60 → codeplain-0.4.3.dev62}/render_machine/actions/run_unit_tests.py +0 -0
- {codeplain-0.4.3.dev60 → codeplain-0.4.3.dev62}/render_machine/actions/summarize_conformance_tests.py +0 -0
- {codeplain-0.4.3.dev60 → codeplain-0.4.3.dev62}/render_machine/code_renderer.py +0 -0
- {codeplain-0.4.3.dev60 → codeplain-0.4.3.dev62}/render_machine/conformance_tests.py +0 -0
- {codeplain-0.4.3.dev60 → codeplain-0.4.3.dev62}/render_machine/implementation_code_helpers.py +0 -0
- {codeplain-0.4.3.dev60 → codeplain-0.4.3.dev62}/render_machine/state_machine_config.py +0 -0
- {codeplain-0.4.3.dev60 → codeplain-0.4.3.dev62}/render_machine/states.py +0 -0
- {codeplain-0.4.3.dev60 → codeplain-0.4.3.dev62}/render_machine/triggers.py +0 -0
- {codeplain-0.4.3.dev60 → codeplain-0.4.3.dev62}/requirements.txt +0 -0
- {codeplain-0.4.3.dev60 → codeplain-0.4.3.dev62}/resources/codeplain_overview.png +0 -0
- {codeplain-0.4.3.dev60 → codeplain-0.4.3.dev62}/resources/plain_example.png +0 -0
- {codeplain-0.4.3.dev60 → codeplain-0.4.3.dev62}/standard_template_library/golang-console-app-template.plain +0 -0
- {codeplain-0.4.3.dev60 → codeplain-0.4.3.dev62}/standard_template_library/python-console-app-template.plain +0 -0
- {codeplain-0.4.3.dev60 → codeplain-0.4.3.dev62}/standard_template_library/typescript-react-app-boilerplate.plain +0 -0
- {codeplain-0.4.3.dev60 → codeplain-0.4.3.dev62}/standard_template_library/typescript-react-app-template.plain +0 -0
- {codeplain-0.4.3.dev60 → codeplain-0.4.3.dev62}/system_config.py +0 -0
- {codeplain-0.4.3.dev60 → codeplain-0.4.3.dev62}/test_scripts/run_conformance_tests_cypress.ps1 +0 -0
- {codeplain-0.4.3.dev60 → codeplain-0.4.3.dev62}/test_scripts/run_conformance_tests_cypress.sh +0 -0
- {codeplain-0.4.3.dev60 → codeplain-0.4.3.dev62}/test_scripts/run_conformance_tests_golang.ps1 +0 -0
- {codeplain-0.4.3.dev60 → codeplain-0.4.3.dev62}/test_scripts/run_conformance_tests_golang.sh +0 -0
- {codeplain-0.4.3.dev60 → codeplain-0.4.3.dev62}/test_scripts/run_conformance_tests_python.ps1 +0 -0
- {codeplain-0.4.3.dev60 → codeplain-0.4.3.dev62}/test_scripts/run_conformance_tests_python.sh +0 -0
- {codeplain-0.4.3.dev60 → codeplain-0.4.3.dev62}/test_scripts/run_unittests_flutter.ps1 +0 -0
- {codeplain-0.4.3.dev60 → codeplain-0.4.3.dev62}/test_scripts/run_unittests_flutter.sh +0 -0
- {codeplain-0.4.3.dev60 → codeplain-0.4.3.dev62}/test_scripts/run_unittests_golang.ps1 +0 -0
- {codeplain-0.4.3.dev60 → codeplain-0.4.3.dev62}/test_scripts/run_unittests_golang.sh +0 -0
- {codeplain-0.4.3.dev60 → codeplain-0.4.3.dev62}/test_scripts/run_unittests_python.ps1 +0 -0
- {codeplain-0.4.3.dev60 → codeplain-0.4.3.dev62}/test_scripts/run_unittests_python.sh +0 -0
- {codeplain-0.4.3.dev60 → codeplain-0.4.3.dev62}/test_scripts/run_unittests_react.ps1 +0 -0
- {codeplain-0.4.3.dev60 → codeplain-0.4.3.dev62}/test_scripts/run_unittests_react.sh +0 -0
- {codeplain-0.4.3.dev60 → codeplain-0.4.3.dev62}/tests/__init__.py +0 -0
- {codeplain-0.4.3.dev60 → codeplain-0.4.3.dev62}/tests/conftest.py +0 -0
- {codeplain-0.4.3.dev60 → codeplain-0.4.3.dev62}/tests/data/acceptance_tests_warning/main_requiring_acceptance_tests.plain +0 -0
- {codeplain-0.4.3.dev60 → codeplain-0.4.3.dev62}/tests/data/acceptance_tests_warning/required_with_acceptance_tests.plain +0 -0
- {codeplain-0.4.3.dev60 → codeplain-0.4.3.dev62}/tests/data/acceptance_tests_warning/tests/required_with_acceptance_tests/entry-point.plain +0 -0
- {codeplain-0.4.3.dev60 → codeplain-0.4.3.dev62}/tests/data/partial_rendering/pr_code_var.plain +0 -0
- {codeplain-0.4.3.dev60 → codeplain-0.4.3.dev62}/tests/data/partial_rendering/pr_implement.plain +0 -0
- {codeplain-0.4.3.dev60 → codeplain-0.4.3.dev62}/tests/data/partial_rendering/pr_leaf.plain +0 -0
- {codeplain-0.4.3.dev60 → codeplain-0.4.3.dev62}/tests/data/partial_rendering/pr_middle.plain +0 -0
- {codeplain-0.4.3.dev60 → codeplain-0.4.3.dev62}/tests/data/partial_rendering/pr_root.plain +0 -0
- {codeplain-0.4.3.dev60 → codeplain-0.4.3.dev62}/tests/data/partial_rendering/pr_solo.plain +0 -0
- {codeplain-0.4.3.dev60 → codeplain-0.4.3.dev62}/tests/e2e/Dockerfile +0 -0
- {codeplain-0.4.3.dev60 → codeplain-0.4.3.dev62}/tests/e2e/conftest.py +0 -0
- {codeplain-0.4.3.dev60 → codeplain-0.4.3.dev62}/tests/e2e/test_hello_world_python.py +0 -0
- {codeplain-0.4.3.dev60 → codeplain-0.4.3.dev62}/tests/e2e/test_hello_world_python_windows.py +0 -0
- {codeplain-0.4.3.dev60 → codeplain-0.4.3.dev62}/tests/test_acceptance_scenario_rendered_once.py +0 -0
- {codeplain-0.4.3.dev60 → codeplain-0.4.3.dev62}/tests/test_acceptance_scenarios_after_a_code_fix.py +0 -0
- {codeplain-0.4.3.dev60 → codeplain-0.4.3.dev62}/tests/test_arg_provenance.py +0 -0
- {codeplain-0.4.3.dev60 → codeplain-0.4.3.dev62}/tests/test_change_detection.py +0 -0
- {codeplain-0.4.3.dev60 → codeplain-0.4.3.dev62}/tests/test_cli_output.py +0 -0
- {codeplain-0.4.3.dev60 → codeplain-0.4.3.dev62}/tests/test_conformance_fix_journal.py +0 -0
- {codeplain-0.4.3.dev60 → codeplain-0.4.3.dev62}/tests/test_console_log_styles.py +0 -0
- {codeplain-0.4.3.dev60 → codeplain-0.4.3.dev62}/tests/test_dependency_pins.py +0 -0
- {codeplain-0.4.3.dev60 → codeplain-0.4.3.dev62}/tests/test_distill_conformance_test_memory.py +0 -0
- {codeplain-0.4.3.dev60 → codeplain-0.4.3.dev62}/tests/test_dry_run_link_validation.py +0 -0
- {codeplain-0.4.3.dev60 → codeplain-0.4.3.dev62}/tests/test_exit_when_done.py +0 -0
- {codeplain-0.4.3.dev60 → codeplain-0.4.3.dev62}/tests/test_file_utils.py +0 -0
- {codeplain-0.4.3.dev60 → codeplain-0.4.3.dev62}/tests/test_folder_path_resolution.py +0 -0
- {codeplain-0.4.3.dev60 → codeplain-0.4.3.dev62}/tests/test_frid_arguments.py +0 -0
- {codeplain-0.4.3.dev60 → codeplain-0.4.3.dev62}/tests/test_functionality_position.py +0 -0
- {codeplain-0.4.3.dev60 → codeplain-0.4.3.dev62}/tests/test_functionality_without_scenarios.py +0 -0
- {codeplain-0.4.3.dev60 → codeplain-0.4.3.dev62}/tests/test_git_preflight.py +0 -0
- {codeplain-0.4.3.dev60 → codeplain-0.4.3.dev62}/tests/test_git_utils.py +0 -0
- {codeplain-0.4.3.dev60 → codeplain-0.4.3.dev62}/tests/test_headless_logging.py +0 -0
- {codeplain-0.4.3.dev60 → codeplain-0.4.3.dev62}/tests/test_log_file_name_resolution.py +0 -0
- {codeplain-0.4.3.dev60 → codeplain-0.4.3.dev62}/tests/test_logging_config_path_resolution.py +0 -0
- {codeplain-0.4.3.dev60 → codeplain-0.4.3.dev62}/tests/test_partial_rendering.py +0 -0
- {codeplain-0.4.3.dev60 → codeplain-0.4.3.dev62}/tests/test_path_resolution.py +0 -0
- {codeplain-0.4.3.dev60 → codeplain-0.4.3.dev62}/tests/test_plain2code.py +0 -0
- {codeplain-0.4.3.dev60 → codeplain-0.4.3.dev62}/tests/test_plain2code_state.py +0 -0
- {codeplain-0.4.3.dev60 → codeplain-0.4.3.dev62}/tests/test_plain2code_utils.py +0 -0
- {codeplain-0.4.3.dev60 → codeplain-0.4.3.dev62}/tests/test_plain_modules.py +0 -0
- {codeplain-0.4.3.dev60 → codeplain-0.4.3.dev62}/tests/test_prepare_repositories_layout.py +0 -0
- {codeplain-0.4.3.dev60 → codeplain-0.4.3.dev62}/tests/test_render_range.py +0 -0
- {codeplain-0.4.3.dev60 → codeplain-0.4.3.dev62}/tests/test_render_stop_reason.py +0 -0
- {codeplain-0.4.3.dev60 → codeplain-0.4.3.dev62}/tests/test_resolve_config_file.py +0 -0
- {codeplain-0.4.3.dev60 → codeplain-0.4.3.dev62}/tests/test_script_path_resolution.py +0 -0
- {codeplain-0.4.3.dev60 → codeplain-0.4.3.dev62}/tests/test_system_config.py +0 -0
- {codeplain-0.4.3.dev60 → codeplain-0.4.3.dev62}/tests/test_telemetry.py +0 -0
- {codeplain-0.4.3.dev60 → codeplain-0.4.3.dev62}/tests/test_terminal_attachment.py +0 -0
- {codeplain-0.4.3.dev60 → codeplain-0.4.3.dev62}/tests/test_tests_folders.py +0 -0
- {codeplain-0.4.3.dev60 → codeplain-0.4.3.dev62}/tests/test_traceability_warnings.py +0 -0
- {codeplain-0.4.3.dev60 → codeplain-0.4.3.dev62}/tests/test_tui_components.py +0 -0
- {codeplain-0.4.3.dev60 → codeplain-0.4.3.dev62}/tests/test_tui_usage.py +0 -0
- {codeplain-0.4.3.dev60 → codeplain-0.4.3.dev62}/tests/test_usage_summary.py +0 -0
- {codeplain-0.4.3.dev60 → codeplain-0.4.3.dev62}/tests/test_user_error_message.py +0 -0
- {codeplain-0.4.3.dev60 → codeplain-0.4.3.dev62}/tui/__init__.py +0 -0
- {codeplain-0.4.3.dev60 → codeplain-0.4.3.dev62}/tui/components.py +0 -0
- {codeplain-0.4.3.dev60 → codeplain-0.4.3.dev62}/tui/models.py +0 -0
- {codeplain-0.4.3.dev60 → codeplain-0.4.3.dev62}/tui/plain2code_tui.py +0 -0
- {codeplain-0.4.3.dev60 → codeplain-0.4.3.dev62}/tui/plain_module_render_choice_tui.py +0 -0
- {codeplain-0.4.3.dev60 → codeplain-0.4.3.dev62}/tui/spinner.py +0 -0
- {codeplain-0.4.3.dev60 → codeplain-0.4.3.dev62}/tui/state_handlers.py +0 -0
- {codeplain-0.4.3.dev60 → codeplain-0.4.3.dev62}/tui/styles.css +0 -0
- {codeplain-0.4.3.dev60 → codeplain-0.4.3.dev62}/tui/widget_helpers.py +0 -0
- {codeplain-0.4.3.dev60 → codeplain-0.4.3.dev62}/usage_summary.py +0 -0
|
@@ -17,30 +17,80 @@
|
|
|
17
17
|
const LINEAR_API = 'https://api.linear.app/graphql';
|
|
18
18
|
const MAX_BASE_CANDIDATES = 20;
|
|
19
19
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
20
|
+
/**
|
|
21
|
+
* Splits markdown into fenced code blocks and the text between them. A fence opens with three or more
|
|
22
|
+
* backticks or tildes, and closes with the same character, at least as many, on a line of its own.
|
|
23
|
+
* Fences inside block quotes count, and end with their quote. A fence that never closes runs to the
|
|
24
|
+
* end, as in CommonMark.
|
|
25
|
+
* @returns {{ code: boolean, text: string }[]}
|
|
26
|
+
*/
|
|
27
|
+
function splitFences(text) {
|
|
28
|
+
const parts = [];
|
|
29
|
+
let buffer = '';
|
|
30
|
+
let fence = null;
|
|
31
|
+
for (const line of text.split(/(?<=\n)/)) {
|
|
32
|
+
const quote = line.match(/^(?: {0,3}> ?)*/)[0];
|
|
33
|
+
const depth = (quote.match(/>/g) || []).length;
|
|
34
|
+
const rest = line.slice(quote.length);
|
|
35
|
+
if (fence && depth < fence.depth) {
|
|
36
|
+
parts.push({ code: true, text: buffer });
|
|
37
|
+
buffer = '';
|
|
38
|
+
fence = null;
|
|
39
|
+
}
|
|
40
|
+
if (fence) {
|
|
41
|
+
buffer += line;
|
|
42
|
+
const close = rest.match(/^ {0,3}(`{3,}|~{3,})[ \t]*\r?\n?$/);
|
|
43
|
+
if (close && close[1][0] === fence.marker[0] && close[1].length >= fence.marker.length) {
|
|
44
|
+
parts.push({ code: true, text: buffer });
|
|
45
|
+
buffer = '';
|
|
46
|
+
fence = null;
|
|
47
|
+
}
|
|
48
|
+
continue;
|
|
49
|
+
}
|
|
50
|
+
const open = rest.match(/^ {0,3}(`{3,}|~{3,})/);
|
|
51
|
+
// A backtick fence's info string can't contain a backtick.
|
|
52
|
+
if (open && !(open[1][0] === '`' && rest.slice(open[0].length).includes('`'))) {
|
|
53
|
+
parts.push({ code: false, text: buffer });
|
|
54
|
+
buffer = line;
|
|
55
|
+
fence = { marker: open[1], depth };
|
|
56
|
+
} else {
|
|
57
|
+
buffer += line;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
parts.push({ code: fence !== null, text: buffer });
|
|
61
|
+
return parts;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* Writes every GitHub reference out as a full link. On GitHub, "#12" is a PR or issue of the same repo;
|
|
66
|
+
* Linear matches a bare "#12" against every repo it knows, so it can link a PR from another repo.
|
|
67
|
+
* Code (fenced, or inline with any number of backticks), existing links and URLs are left alone.
|
|
68
|
+
* GitHub redirects /pull/N to /issues/N when N is an issue.
|
|
69
|
+
*/
|
|
24
70
|
function linkReferences(text, owner, repo) {
|
|
25
|
-
const untouched = /(
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
)
|
|
71
|
+
const untouched = /(?<!`)(`+)(?!`)[\s\S]*?(?<!`)\1(?!`)|\[[^\]\n]*\]\([^)\n]*\)|<[^>\n]*>|https?:\/\/[^\s)]+/g;
|
|
72
|
+
const linkPlain = (plain) =>
|
|
73
|
+
plain
|
|
74
|
+
.replace(
|
|
75
|
+
/(^|[^\w/#&])([\w.-]+)\/([\w.-]+)#(\d+)\b/g,
|
|
76
|
+
(_, pre, o, r, n) => `${pre}[${o}/${r}#${n}](https://github.com/${o}/${r}/pull/${n})`,
|
|
77
|
+
)
|
|
78
|
+
.replace(/(^|[^\w/#&[]|\bPR ?)#(\d+)\b/g, (_, pre, n) => `${pre}[#${n}](https://github.com/${owner}/${repo}/pull/${n})`);
|
|
79
|
+
const linkProse = (prose) => {
|
|
80
|
+
let out = '';
|
|
81
|
+
let last = 0;
|
|
82
|
+
for (const match of prose.matchAll(untouched)) {
|
|
83
|
+
out += linkPlain(prose.slice(last, match.index)) + match[0];
|
|
84
|
+
last = match.index + match[0].length;
|
|
85
|
+
}
|
|
86
|
+
return out + linkPlain(prose.slice(last));
|
|
87
|
+
};
|
|
88
|
+
return splitFences(text)
|
|
89
|
+
.map((part) => (part.code ? part.text : linkProse(part.text)))
|
|
41
90
|
.join('');
|
|
42
91
|
}
|
|
43
92
|
|
|
93
|
+
/** The release notes of a deploy: one line per PR, with Dependabot's PRs folded into one. */
|
|
44
94
|
function prNotes(prs, owner, repo) {
|
|
45
95
|
const link = (n) => `[#${n}](https://github.com/${owner}/${repo}/pull/${n})`;
|
|
46
96
|
const dependabot = prs.filter((pr) => pr.user.login === 'dependabot[bot]');
|
|
@@ -54,7 +104,7 @@ function prNotes(prs, owner, repo) {
|
|
|
54
104
|
return lines.join('\n');
|
|
55
105
|
}
|
|
56
106
|
|
|
57
|
-
|
|
107
|
+
/** The PRs merged into `branch` since the newest earlier release in this pipeline. */
|
|
58
108
|
async function pullRequestsSince({ github, owner, repo, branch, head, version, releases }) {
|
|
59
109
|
const compare = async (base, target, page = 1, perPage = 1) =>
|
|
60
110
|
(await github.rest.repos.compareCommitsWithBasehead({ owner, repo, basehead: `${base}...${target}`, page, per_page: perPage }))
|
|
@@ -66,11 +116,14 @@ async function pullRequestsSince({ github, owner, repo, branch, head, version, r
|
|
|
66
116
|
}
|
|
67
117
|
|
|
68
118
|
// Sorted by completion time, since an older release whose notes were edited can be listed first.
|
|
69
|
-
// A release that is not on the branch is a branch deploy and is never a base.
|
|
70
|
-
//
|
|
119
|
+
// A release that is not on the branch is a branch deploy and is never a base. A re-run of a
|
|
120
|
+
// recorded version only looks at releases before it. Another version at the same commit is a
|
|
121
|
+
// base, and leaves no new PRs.
|
|
122
|
+
const time = (r) => Date.parse(r.completedAt || r.createdAt);
|
|
123
|
+
const own = releases.find((r) => r.version === version);
|
|
71
124
|
const candidates = releases
|
|
72
|
-
.filter((r) => r.commitSha && r.version !== version)
|
|
73
|
-
.sort((a, b) =>
|
|
125
|
+
.filter((r) => r.commitSha && r.version !== version && (!own || time(r) < time(own)))
|
|
126
|
+
.sort((a, b) => time(b) - time(a))
|
|
74
127
|
.slice(0, MAX_BASE_CANDIDATES);
|
|
75
128
|
let base;
|
|
76
129
|
for (const release of candidates) {
|
|
@@ -101,6 +154,7 @@ async function pullRequestsSince({ github, owner, repo, branch, head, version, r
|
|
|
101
154
|
return { prs: [...prs.values()], base };
|
|
102
155
|
}
|
|
103
156
|
|
|
157
|
+
/** Records the release in Linear, or logs what it would record. */
|
|
104
158
|
module.exports = async ({ github, context, core }) => {
|
|
105
159
|
const key = process.env.LINEAR_ACCESS_KEY;
|
|
106
160
|
const live = process.env.LINEAR_RELEASE_MODE === 'live';
|
|
@@ -13,6 +13,10 @@ from plain2code_state import RunState
|
|
|
13
13
|
|
|
14
14
|
MAX_RETRIES = 4
|
|
15
15
|
RETRY_DELAY = 3
|
|
16
|
+
# Agent calls carry a whole session: losing one ends a long-running fix, so they retry longer (with the delay
|
|
17
|
+
# capped), which rides out a provider or network outage of several minutes.
|
|
18
|
+
AGENT_MAX_RETRIES = 8
|
|
19
|
+
MAX_RETRY_DELAY = 60
|
|
16
20
|
|
|
17
21
|
# A report the render does not consume must not be able to hold the process open
|
|
18
22
|
# at exit, and requests waits indefinitely by default.
|
|
@@ -86,6 +90,18 @@ ERROR_CODE_EXCEPTIONS = {
|
|
|
86
90
|
}
|
|
87
91
|
|
|
88
92
|
|
|
93
|
+
# Client errors that a retry can fix: a timeout on the server's side and rate limiting.
|
|
94
|
+
RETRYABLE_CLIENT_ERROR_STATUSES = {408, 429}
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
def _is_permanent_client_error(error: Exception) -> bool:
|
|
98
|
+
"""An HTTP 4xx answer other than RETRYABLE_CLIENT_ERROR_STATUSES: asking again gets the same answer."""
|
|
99
|
+
if not isinstance(error, requests.exceptions.HTTPError) or error.response is None:
|
|
100
|
+
return False
|
|
101
|
+
status = error.response.status_code
|
|
102
|
+
return 400 <= status < 500 and status not in RETRYABLE_CLIENT_ERROR_STATUSES
|
|
103
|
+
|
|
104
|
+
|
|
89
105
|
class CodeplainAPI:
|
|
90
106
|
|
|
91
107
|
def __init__(self, api_key, console):
|
|
@@ -135,7 +151,7 @@ class CodeplainAPI:
|
|
|
135
151
|
)
|
|
136
152
|
time.sleep(retry_delay)
|
|
137
153
|
# Exponential backoff
|
|
138
|
-
return retry_delay * 2
|
|
154
|
+
return min(retry_delay * 2, MAX_RETRY_DELAY)
|
|
139
155
|
else:
|
|
140
156
|
if not silent:
|
|
141
157
|
self.console.error(f"Max retries ({num_retries}) exceeded. Last error: {error}")
|
|
@@ -214,6 +230,10 @@ class CodeplainAPI:
|
|
|
214
230
|
if response_json is not None and "error_code" in response_json:
|
|
215
231
|
if response_json["error_code"] not in RETRY_ERROR_CODES:
|
|
216
232
|
raise e
|
|
233
|
+
if _is_permanent_client_error(e):
|
|
234
|
+
# Asking again gets the same answer (e.g. an expired agent session is 404): the caller gets the
|
|
235
|
+
# HTTPError itself, right away, to handle it.
|
|
236
|
+
raise e
|
|
217
237
|
|
|
218
238
|
retry_delay = self._handle_retry_logic(attempt, retry_delay, num_retries, e, silent)
|
|
219
239
|
|
|
@@ -405,50 +425,6 @@ class CodeplainAPI:
|
|
|
405
425
|
|
|
406
426
|
return self.post_request(endpoint_url, headers, payload, run_state)
|
|
407
427
|
|
|
408
|
-
def fix_conformance_tests_issue(
|
|
409
|
-
self,
|
|
410
|
-
frid,
|
|
411
|
-
functional_requirement_id,
|
|
412
|
-
plain_source_tree,
|
|
413
|
-
linked_resources,
|
|
414
|
-
existing_files_content,
|
|
415
|
-
memory_files_content,
|
|
416
|
-
module_name: str,
|
|
417
|
-
conformance_tests_module_name: str,
|
|
418
|
-
required_modules,
|
|
419
|
-
code_diff,
|
|
420
|
-
conformance_tests_files,
|
|
421
|
-
conformance_tests_issue,
|
|
422
|
-
implementation_fix_count,
|
|
423
|
-
conformance_tests_folder_name,
|
|
424
|
-
conflicting_requirements_count: int,
|
|
425
|
-
fix_attempts_journal: list,
|
|
426
|
-
run_state: RunState,
|
|
427
|
-
):
|
|
428
|
-
endpoint_url = f"{self.api_url}/fix_conformance_tests_issue"
|
|
429
|
-
headers = {"X-API-Key": self.api_key, "Content-Type": "application/json"}
|
|
430
|
-
|
|
431
|
-
payload = {
|
|
432
|
-
"frid": frid,
|
|
433
|
-
"functional_requirement_id": functional_requirement_id,
|
|
434
|
-
"plain_source_tree": plain_source_tree,
|
|
435
|
-
"linked_resources": linked_resources,
|
|
436
|
-
"existing_files_content": existing_files_content,
|
|
437
|
-
"memory_files_content": memory_files_content,
|
|
438
|
-
"module_name": module_name,
|
|
439
|
-
"conformance_tests_module_name": conformance_tests_module_name,
|
|
440
|
-
"required_modules": required_modules,
|
|
441
|
-
"code_diff": code_diff,
|
|
442
|
-
"conformance_tests_files": conformance_tests_files,
|
|
443
|
-
"conformance_tests_issue": conformance_tests_issue,
|
|
444
|
-
"implementation_fix_count": implementation_fix_count,
|
|
445
|
-
"conformance_tests_folder_name": conformance_tests_folder_name,
|
|
446
|
-
"conflicting_requirements_count": conflicting_requirements_count,
|
|
447
|
-
"fix_attempts_journal": fix_attempts_journal,
|
|
448
|
-
}
|
|
449
|
-
|
|
450
|
-
return self.post_request(endpoint_url, headers, payload, run_state)
|
|
451
|
-
|
|
452
428
|
def render_acceptance_tests(
|
|
453
429
|
self,
|
|
454
430
|
frid,
|
|
@@ -577,6 +553,34 @@ class CodeplainAPI:
|
|
|
577
553
|
|
|
578
554
|
return self.post_request(endpoint_url, headers, payload, run_state)
|
|
579
555
|
|
|
556
|
+
def report_conflicting_requirements(
|
|
557
|
+
self,
|
|
558
|
+
frid: str,
|
|
559
|
+
functional_requirement_id: str,
|
|
560
|
+
plain_source_tree: dict,
|
|
561
|
+
module_name: str,
|
|
562
|
+
conformance_tests_module_name: str,
|
|
563
|
+
required_modules,
|
|
564
|
+
failing_reason: str,
|
|
565
|
+
conflict_reason: str,
|
|
566
|
+
run_state: RunState,
|
|
567
|
+
):
|
|
568
|
+
"""Report a conflict the conformance tests fixer and its reviewer agreed on after it had been declared
|
|
569
|
+
once. The server always answers with the ConflictingRequirements error, raised here, ending the render."""
|
|
570
|
+
endpoint_url = f"{self.api_url}/report_conflicting_requirements"
|
|
571
|
+
headers = {"X-API-Key": self.api_key, "Content-Type": "application/json"}
|
|
572
|
+
payload = {
|
|
573
|
+
"frid": frid,
|
|
574
|
+
"functional_requirement_id": functional_requirement_id,
|
|
575
|
+
"plain_source_tree": plain_source_tree,
|
|
576
|
+
"module_name": module_name,
|
|
577
|
+
"conformance_tests_module_name": conformance_tests_module_name,
|
|
578
|
+
"required_modules": required_modules,
|
|
579
|
+
"failing_reason": failing_reason,
|
|
580
|
+
"conflict_reason": conflict_reason,
|
|
581
|
+
}
|
|
582
|
+
return self.post_request(endpoint_url, headers, payload, run_state)
|
|
583
|
+
|
|
580
584
|
def agent_start(self, task_type: str, task_params: dict, frid: str, module_name: str, run_state: RunState):
|
|
581
585
|
"""Start a server-side agent session; returns the first turn (tool calls or completion)."""
|
|
582
586
|
endpoint_url = f"{self.api_url}/agent/start"
|
|
@@ -587,7 +591,7 @@ class CodeplainAPI:
|
|
|
587
591
|
"frid": frid,
|
|
588
592
|
"module_name": module_name,
|
|
589
593
|
}
|
|
590
|
-
return self.post_request(endpoint_url, headers, payload, run_state)
|
|
594
|
+
return self.post_request(endpoint_url, headers, payload, run_state, num_retries=AGENT_MAX_RETRIES)
|
|
591
595
|
|
|
592
596
|
def agent_continue(
|
|
593
597
|
self, session_id: str, tool_results: list[dict], frid: str, module_name: str, run_state: RunState
|
|
@@ -601,4 +605,4 @@ class CodeplainAPI:
|
|
|
601
605
|
"frid": frid,
|
|
602
606
|
"module_name": module_name,
|
|
603
607
|
}
|
|
604
|
-
return self.post_request(endpoint_url, headers, payload, run_state)
|
|
608
|
+
return self.post_request(endpoint_url, headers, payload, run_state, num_retries=AGENT_MAX_RETRIES)
|
|
@@ -581,6 +581,8 @@ def main(): # noqa: C901
|
|
|
581
581
|
interrupted = True
|
|
582
582
|
else:
|
|
583
583
|
error_message = user_error_message(e)
|
|
584
|
+
# A module that finished before the error set render_succeeded; the render as a whole did not.
|
|
585
|
+
run_state.set_render_succeeded(False)
|
|
584
586
|
|
|
585
587
|
if not isinstance(e, EXPECTED_EXCEPTIONS):
|
|
586
588
|
exc_info = sys.exc_info()
|