Skip to content

Add reusable Python guide bases and family snippets - #1915

Draft
n0tl3ss wants to merge 17 commits into
masterfrom
codex/python-guides-shared-bases-20261006
Draft

n0tl3ss wants to merge 17 commits into
masterfrom
codex/python-guides-shared-bases-20261006

Conversation

@n0tl3ss

@n0tl3ss n0tl3ss commented Oct 6, 2026 •

Copy link
Copy Markdown
Member

Depends on #1914; merge the shared infrastructure first. This master-targeted PR adds reusable unpublished guide bases above that prerequisite.

Guide families covered: hello/distribution, cloud database/OIDC/tracing, many-to-many, email, MCP diskspace/weather, object storage and OpenAPI. The cloud-database base is documentation-only rather than generating empty application artifacts.

Review the base-only commit: bf6e3bb
Review corrections: 4f48fb41
The inherited #1914 diff disappears once that prerequisite is merged into master. Shared review and fresh-output CI fixes are included through a normal merge commit, with no history rewrite. CI branch filters target master only.

Validation after the review fixes: 152 buildSrc tests pass; all 16 declared master Python projects/test scripts generate; 13 standard-library Python script tests pass. The nullable object-storage declaration has a source-contract regression that failed before the fix. All four documentation-only cloud database Build tasks pass from a fresh output tree, including the AWS task that previously failed in CI. Both existing Java MCP HTTP tests pass, including the corrected tool-description assertion; no assertions were removed.

Latest-head hosted CI is green: all 32 guide matrix jobs, matrix generation, Python script tests and Python guide generation pass. One Oracle many-to-many JVM cold-start failure passed on the unchanged-source failed-job rerun; the original log did not retain its exception, so a timeout remains an inference, not a newly fixed module bug.

No published Python guide implementation is enabled here, and no native image was built locally. This does not certify every inherited family in Python at runtime, Windows execution or cloud deployment. Family-specific guide PRs will explicitly depend on this PR.

n0tl3ss and others added 3 commits October 6, 2026 16:23
Preserve committed source and existing tests; separate shared prerequisites from guide changes.

Co-authored-by: Graeme Rocher <graeme.rocher@oracle.com>
Co-authored-by: Nemanja Mikic <n0t_l3ss@outlook.com>
Co-authored-by: Nemanja Mikic <nemanja.mikic@oracle.com>
Co-authored-by: Sergio del Amo <sergio.delamo@softamo.com>
Keep the released platform coordinates, remove the obsolete Starter fork checkout, and validate master, python and python-guide-support without native image compilation.
Preserve committed source and existing tests; separate shared prerequisites from guide changes.

Co-authored-by: Graeme Rocher <graeme.rocher@oracle.com>
Co-authored-by: Nemanja Mikic <n0t_l3ss@outlook.com>
Co-authored-by: Nemanja Mikic <nemanja.mikic@oracle.com>
Remove the obsolete environment-only skip; dedicated Python selection already separates Python and JVM scripts. The existing DocsOnlyGuideTest reproduces the bug with CI=true and the complete 149-test suite passes after the fix.

Fixes #1916
Keep default guide task selection unchanged. The general workflow excludes only existing dedicated Python runtime tasks, while retaining JVM/native tests and Python generation, docs, ZIPs and scripts. A separately configured Python runtime workflow can use the original task selection.

Matrix regression: 12 tests RED before the option, 12 GREEN after it; default selection, implicit/explicit apps, docs-only apps, JVM guides, transitive bases, deduplication and CLI controls preserved.

Fixes #1922
@n0tl3ss
n0tl3ss requested review from sdelamo and a balanced review from Copilot October 6, 2026 15:05

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

The advertised python metadata option is not implemented, and the reusable object-storage API loses its not-found return semantics.

Review effort: Balanced
Findings: 3 Medium severity · 1 Low severity

Open (4)
What changed in this PR

Adds reusable, unpublished Python implementations for several guide families, alongside the prerequisite Python generation, testing, metadata, and CI infrastructure.

Changes:

  • Adds Python base samples, configuration, tests, and language-specific documentation.
  • Adds docs-only guide handling and Python-aware generation/macros.
  • Adds Pyronaut test scripts, CI selection, and local composite-build support.
File Description
src/​docs/​common/​snippets/​common-enable-distributed-configuration.adoc Adds Python cloud configuration guidance.
settings.gradle Enables local composite builds.
README.md Documents local checkout configuration.
guides/​micronaut-openapi-base/​python/​tests/​example/​micronaut/​test_open_api_generated.py Tests generated OpenAPI resources.
guides/​micronaut-openapi-base/​python/​tests/​example/​micronaut/​test_open_api_exposed.py Tests exposed OpenAPI resources.
guides/​micronaut-openapi-base/​python/​tests/​example/​micronaut/​test_latest_guides_controller.py Tests guide JSON output.
guides/​micronaut-openapi-base/​python/​tests/​example/​micronaut/​test_home_controller.py Tests hidden OpenAPI operation.
guides/​micronaut-openapi-base/​python/​src/​example/​micronaut/​option.py Adds Python option model.
guides/​micronaut-openapi-base/​python/​src/​example/​micronaut/​latest_guides_controller.py Adds Python guide endpoint.
guides/​micronaut-openapi-base/​python/​src/​example/​micronaut/​language.py Adds language enumeration.
guides/​micronaut-openapi-base/​python/​src/​example/​micronaut/​guide.py Adds validated guide model.
guides/​micronaut-openapi-base/​python/​src/​example/​micronaut/​build_tool.py Adds build-tool enumeration.
guides/​micronaut-openapi-base/​python/​src/​example/​micronaut/​application.py Adds OpenAPI metadata.
guides/​micronaut-openapi-base/​python/​config/​application.toml Configures Swagger resources.
guides/​micronaut-openapi-base/​openapi-intro.adoc Documents Python OpenAPI implementation.
guides/​micronaut-object-storage-base/​testing-upload.adoc Adds Python TOML example.
guides/​micronaut-object-storage-base/​python/​src/​example/​micronaut/​profile_pictures_api.py Adds Python storage API contract.
guides/​micronaut-mcp-weather/​python/​src/​example/​micronaut/​weather/​weather_utils.py Adds weather formatting utilities.
guides/​micronaut-mcp-weather/​python/​src/​example/​micronaut/​weather/​weather_client.py Adds weather HTTP client.
guides/​micronaut-mcp-weather/​python/​src/​example/​micronaut/​weather/​model/​properties.py Adds alert properties model.
guides/​micronaut-mcp-weather/​python/​src/​example/​micronaut/​weather/​model/​point_response.py Adds point response model.
guides/​micronaut-mcp-weather/​python/​src/​example/​micronaut/​weather/​model/​point_properties.py Adds point properties model.
guides/​micronaut-mcp-weather/​python/​src/​example/​micronaut/​weather/​model/​period.py Adds forecast period model.
guides/​micronaut-mcp-weather/​python/​src/​example/​micronaut/​weather/​model/​location.py Adds location model.
guides/​micronaut-mcp-weather/​python/​src/​example/​micronaut/​weather/​model/​grid.py Adds forecast grid model.
guides/​micronaut-mcp-weather/​python/​src/​example/​micronaut/​weather/​model/​forecast.py Adds forecast model.
guides/​micronaut-mcp-weather/​python/​src/​example/​micronaut/​weather/​model/​forecast_properties.py Adds forecast properties model.
guides/​micronaut-mcp-weather/​python/​src/​example/​micronaut/​weather/​model/​feature.py Adds weather feature model.
guides/​micronaut-mcp-weather/​python/​src/​example/​micronaut/​weather/​model/​alerts.py Adds alerts model.
guides/​micronaut-mcp-weather/​python/​src/​example/​micronaut/​tools.py Adds MCP weather tools.
guides/​micronaut-mcp-weather/​python/​src/​example/​micronaut/​point.py Adds forecast tool input.
guides/​micronaut-mcp-weather/​python/​src/​example/​micronaut/​get_alert_input.py Adds alert tool input.
guides/​micronaut-mcp-weather/​json-schema-generation.adoc Generalizes schema documentation.
guides/​micronaut-mcp-diskspace/​tool.adoc Adds Python tool documentation.
guides/​micronaut-mcp-diskspace/​python/​src/​example/​micronaut/​my_tools.py Adds Python MCP tool.
guides/​micronaut-mcp-diskspace/​python/​src/​example/​micronaut/​disk_utils.py Adds disk-space utility.
guides/​micronaut-mcp-diskspace/​disk-utils.adoc Documents Python utility function.
guides/​micronaut-mcp-diskspace/​configuration.adoc Adds Python MCP configuration.
guides/​micronaut-email/​python/​config/​application.toml Adds Python email configuration.
guides/​micronaut-email/​configuration.adoc Adds TOML configuration example.
guides/​micronaut-data-many-to-many-base/​python/​tests/​example/​micronaut/​test_many_to_many.py Extends repository assertions.
guides/​micronaut-data-many-to-many-base/​python/​config/​db/​liquibase-changelog.xml Adds Python Liquibase root changelog.
guides/​micronaut-cloud-trace-base/​python/​tests/​test_application.py Tests tracing context startup.
guides/​micronaut-cloud-trace-base/​python/​tests/​example/​micronaut/​test_store_controller.py Tests store endpoints.
guides/​micronaut-cloud-trace-base/​python/​tests-config/​application-test.toml Disables trace exporting in tests.
guides/​micronaut-cloud-trace-base/​python/​src/​example/​micronaut/​warehouse_controller.py Adds warehouse endpoints.
guides/​micronaut-cloud-trace-base/​python/​src/​example/​micronaut/​warehouse_client.py Adds traced warehouse client.
guides/​micronaut-cloud-trace-base/​python/​src/​example/​micronaut/​store_controller.py Adds traced store controller.
guides/​micronaut-cloud-trace-base/​python/​src/​example/​micronaut/​inventory_service.py Adds inventory and tracing logic.
guides/​micronaut-cloud-oidc-base/​python/​tests/​test_application.py Tests OIDC context startup.
guides/​micronaut-cloud-oidc-base/​python/​tests/​example/​micronaut/​test_home_controller.py Tests anonymous and secure pages.
guides/​micronaut-cloud-oidc-base/​python/​tests-config/​application-test.toml Disables OAuth clients in tests.
guides/​micronaut-cloud-oidc-base/​python/​src/​example/​micronaut/​home_controller.py Adds secured Python routes.
guides/​micronaut-cloud-oidc-base/​python/​config/​views/​home.html Adds OIDC home view.
guides/​micronaut-cloud-oidc-base/​python/​config/​application.toml Adds Python OIDC configuration.
guides/​micronaut-cloud-oidc-base/​python/​config/​application-dev.toml Disables generated development client.
guides/​micronaut-cloud-oidc-base/​metadata.json Excludes generated starter sources.
guides/​micronaut-cloud-database-base/​metadata.json Makes base documentation-only.
guides/​micronaut-cloud-database-base/​create-app.adoc Documents reuse of Python JDBC sample.
guides/​hello-base/​python/​src/​example/​micronaut/​hello_controller.py Uses Python route media type.
guides/​hello-base/​hellocontroller.adoc Adds Python route documentation.
guides/​distribution-base/​python/​ttfr.sh Adds Python timing script.
guides/​distribution-base/​python/​src/​example/​micronaut/​controller.py Adds distribution routes.
gradle/​local-composite-builds.gradle Configures local included builds.
buildSrc/​src/​test/​resources/​file-transfer/​python-application-config/​src/​test/​resources/​bootstrap-test.properties Adds inherited test bootstrap fixture.
buildSrc/​src/​test/​resources/​file-transfer/​python-application-config/​src/​main/​resources/​bootstrap.properties Adds inherited bootstrap fixture.
buildSrc/​src/​test/​resources/​file-transfer/​python-application-config/​python/​tests-config/​application-test.toml Adds Python test override fixture.
buildSrc/​src/​test/​resources/​file-transfer/​python-application-config/​python/​config/​application.toml Adds Python configuration fixture.
buildSrc/​src/​test/​resources/​file-transfer/​python-application-config/​metadata.json Defines transfer test guide.
buildSrc/​src/​test/​resources/​expected_test_script.sh Removes docs-only project commands.
buildSrc/​src/​test/​resources/​expected_test_script_native.sh Removes docs-only native commands.
buildSrc/​src/​test/​java/​io/​micronaut/​guides/​tasks/​SampleProjectGenerationTaskTest.java Tests filtered regeneration.
buildSrc/​src/​test/​java/​io/​micronaut/​guides/​tasks/​PythonTestScriptTaskTest.java Tests task input annotations.
buildSrc/​src/​test/​java/​io/​micronaut/​guides/​IndexGeneratorTest.java Tests Python index rendering.
buildSrc/​src/​test/​java/​io/​micronaut/​guides/​GuidesPluginTest.java Tests task ordering.
buildSrc/​src/​test/​java/​io/​micronaut/​guides/​GuideProjectGeneratorTest.java Tests resource and symlink handling.
buildSrc/​src/​test/​java/​io/​micronaut/​guides/​GuideAsciidocGeneratorTest.java Tests language filtering.
buildSrc/​src/​test/​java/​io/​micronaut/​guides/​DocsOnlyGuideTest.java Tests documentation-only guides.
buildSrc/​src/​test/​java/​io/​micronaut/​guides/​core/​TestScriptGeneratorTest.java Tests dedicated Python scripts.
buildSrc/​src/​test/​java/​io/​micronaut/​guides/​core/​TestMacroSubstitutionTest.java Tests Python test macros.
buildSrc/​src/​test/​java/​io/​micronaut/​guides/​core/​SourceMacroSubstitutionTest.java Tests Python source macros.
buildSrc/​src/​test/​java/​io/​micronaut/​guides/​core/​MacroUtilsTest.java Tests Python module naming.
buildSrc/​src/​test/​java/​io/​micronaut/​guides/​core/​GuideUtilsTest.java Tests Python metadata merging.
buildSrc/​src/​test/​java/​io/​micronaut/​guides/​core/​GuideTest.java Updates guide schema tests.
buildSrc/​src/​test/​java/​io/​micronaut/​guides/​core/​GuideProjectZipperTest.java Makes ZIP assertion deterministic.
buildSrc/​src/​test/​java/​io/​micronaut/​guides/​core/​GuideProjectGeneratorTest.java Tests Python runtime dependencies.
buildSrc/​src/​test/​java/​io/​micronaut/​guides/​core/​GuideParserTest.java Tests explicit language narrowing.
buildSrc/​src/​test/​java/​io/​micronaut/​guides/​core/​GuideGenerationUtilsTest.java Tests Pyronaut/Pytest options.
buildSrc/​src/​test/​java/​io/​micronaut/​guides/​core/​FilesTransferUtilityTest.java Tests Python configuration transfer.
buildSrc/​src/​test/​java/​io/​micronaut/​guides/​core/​DependencyMacroSubstitutionTest.java Tests Pyronaut dependency snippets.
buildSrc/​src/​test/​java/​io/​micronaut/​guides/​core/​AppTest.java Updates application schema URI.
buildSrc/​src/​main/​resources/​pyronaut-test-functions.sh Adds reusable Pyronaut test helpers.
buildSrc/​src/​main/​resources/​pom.xml Adds H2 dependency coordinate.
buildSrc/​src/​main/​resources/​guide-metadata.schema.json Extends Python metadata schema.
buildSrc/​src/​main/​java/​io/​micronaut/​guides/​feature/​SpringSecurityCrypto.java Adds fallback Starter feature.
buildSrc/​src/​main/​java/​io/​micronaut/​guides/​feature/​H2Runtime.java Adds runtime-scoped H2 feature.
buildSrc/​src/​main/​java/​io/​micronaut/​guides/​core/​ZipIncludeMacroSubstitution.java Adapts macro method signature.
buildSrc/​src/​main/​java/​io/​micronaut/​guides/​core/​TestScriptGenerator.java Exposes Python script generation.
buildSrc/​src/​main/​java/​io/​micronaut/​guides/​core/​SourceBlockMacroSubstitution.java Adds Python source path handling.
buildSrc/​src/​main/​java/​io/​micronaut/​guides/​core/​MacroUtils.java Adds Python naming utilities.
buildSrc/​src/​main/​java/​io/​micronaut/​guides/​core/​GuideUtils.java Adds Python feature and merge logic.
buildSrc/​src/​main/​java/​io/​micronaut/​guides/​core/​GuideGenerationUtils.java Adds Python project paths.
buildSrc/​src/​main/​java/​io/​micronaut/​guides/​core/​Guide.java Adds docs-only and Pyronaut metadata.
buildSrc/​src/​main/​java/​io/​micronaut/​guides/​core/​DependencyLines.java Renders Pyronaut TOML dependencies.
buildSrc/​src/​main/​java/​io/​micronaut/​guides/​core/​DefaultTestScriptGenerator.java Generates dedicated Python scripts.
buildSrc/​src/​main/​java/​io/​micronaut/​guides/​core/​DefaultGuideProjectGenerator.java Cleans generated Python packages.
buildSrc/​src/​main/​java/​io/​micronaut/​guides/​core/​DefaultGuideParser.java Parses Python features and options.
buildSrc/​src/​main/​java/​io/​micronaut/​guides/​core/​DefaultFilesTransferUtility.java Transfers Python configuration safely.
buildSrc/​src/​main/​java/​io/​micronaut/​guides/​core/​App.java Adds Python-specific features.
buildSrc/​src/​main/​groovy/​io/​micronaut/​guides/​TestScriptGenerator.groovy Adds Python script generation.
buildSrc/​src/​main/​groovy/​io/​micronaut/​guides/​tasks/​TestScriptTask.groovy Supports language-specific script names.
buildSrc/​src/​main/​groovy/​io/​micronaut/​guides/​tasks/​TestScriptRunnerWorkAction.groovy Runs configured script files.
buildSrc/​src/​main/​groovy/​io/​micronaut/​guides/​tasks/​SampleProjectGenerationTask.groovy Tracks and cleans generated outputs.
buildSrc/​src/​main/​groovy/​io/​micronaut/​guides/​tasks/​PythonTestScriptTask.groovy Adds cacheable Python script task.
buildSrc/​src/​main/​groovy/​io/​micronaut/​guides/​IndexGenerator.groovy Adds conditional Python index column.
buildSrc/​src/​main/​groovy/​io/​micronaut/​guides/​GuidesPlugin.groovy Wires Python and docs-only tasks.
buildSrc/​src/​main/​groovy/​io/​micronaut/​guides/​GuideProjectGenerator.groovy Adds Python generation behavior.
buildSrc/​settings.gradle Enables buildSrc composite builds.
buildSrc/​build.gradle Updates Starter and schema URI.
.github/​workflows/​python-guides.yml Adds Python generation validation.
.github/​workflows/​gradle.yml Restricts general CI to JVM runtime.
.github/​scripts/​test_guide_ci_tasks.py Tests JVM-only task selection.
.github/​scripts/​guide_ci_tasks.py Adds JVM-only matrix mode.

💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread buildSrc/src/main/resources/guide-metadata.schema.json Outdated
Comment thread buildSrc/src/test/java/io/micronaut/guides/IndexGeneratorTest.java Outdated
Comment thread guides/micronaut-mcp-diskspace/python/src/example/micronaut/my_tools.py Outdated
Run on pushes to master and pull requests targeting master only. Keep the existing path filters and validation steps unchanged.
Create missing output parents in the shared generator and preserve file-conflict errors. Cover fresh nested output and repeated generation. Remove the inert python schema shorthand, retain canonical language parsing, and assert the actual Python language icon.

Refs #1910; addresses review feedback on #1915.
Allow a missing object-storage download in the Python protocol and add a source-contract regression. Correct the MCP tool description in Python and Java, retaining the existing HTTP tool metadata test assertion.
@n0tl3ss

n0tl3ss commented Oct 6, 2026

Copy link
Copy Markdown
Member Author

All four review threads are addressed and resolved. New commits: 4f48fb4 for the guide-base fixes, d477857 on prerequisite #1914 for shared review/CI fixes, and normal merge 19ae6ef here. No force push.

Validation on the merged source: 152 buildSrc tests, 13 Python script tests, generation of all 16 declared Python guide projects/test scripts, and fresh-output Build tasks for all four documentation-only cloud database guides pass. The Java MCP HTTP suite also passes both existing tests, including the corrected tool-description assertion. No local native image build.

The latest hosted Python script and Python generation checks pass; the general 32-guide matrix is still running. The previous AWS failure was caused by missing output parent directories, now reproduced and fixed in the shared generator rather than bypassed in CI.

@n0tl3ss

n0tl3ss commented Oct 6, 2026

Copy link
Copy Markdown
Member Author

Latest-head hosted CI is now green on 19ae6ef: all 32 guide matrix jobs pass, as do matrix generation, Python script tests and Python guide generation. All four review threads are resolved. Shared fixes remain in prerequisite #1914 and are normally merged here.

One Oracle many-to-many JVM job failed during the first cold container startup, then passed on the unchanged-source failed-job rerun. Its original quiet Gradle log did not retain the test exception; the timing matches the existing 60-second Test Resources client deadline, but that remains an inference rather than a confirmed timeout diagnosis or a newly fixed module bug. No timeout, assertion, retry policy or test-skip workaround was committed.

Local checks also pass: 152 infrastructure tests, 13 Python script tests, both existing Java MCP HTTP tests, all 16 declared Python guide generations and the four fresh-output docs-only cloud database builds. New commits only; no force push or local native image build.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🔵 Needs a closer look

Python CI filtering and OpenAPI language conditionals contain unresolved correctness and coverage gaps.

Review effort: Balanced
Findings: None

Resolved since last review (4)
Previously missed (3)

In code that hasn't changed since last review

Medium severity Resolve inherited language before applying JVM-only exclusion

.github/​scripts/​guide_ci_tasks.py:54

python_app only examines the child metadata, but the guide parser inherits languages from a base. If a published child inherits PYTHON, --jvm-only will not exclude its Pyronaut runner; the JVM matrix then invokes the runner and its local-Pyronaut staging requirement. Resolve inherited language/app state here before deciding whether to append the exclusion.

Medium severity Include composite-build script in workflow path filters

.github/​workflows/​python-guides.yml:10

The new composite-build script affects Python guide generation but is absent from this path filter. A PR that changes only gradle/local-composite-builds.gradle will skip this validation workflow, leaving the settings integration and buildSrc tests unchecked.

This issue also appears on line 19 of the same file.

Medium severity Restrict TOML resource rendering to Python guides

guides/​micronaut-openapi-base/​openapi-intro.adoc:91

This opens the TOML resource for every non-Java rendering, so Groovy and Kotlin guides will show both application.properties and application.toml. Restrict this block to Python, matching the Python-specific resource being added.

Handle inherited applications in the same sorted pass as GuideUtils and treat omitted applications as empty. Verify parser language defaults and all four language-filter renderings. Trigger Python validation when the local-composite build configuration changes.
Use the existing only-for-languages marker rather than excluding Java alone, which could expose TOML in Groovy and Kotlin. Retain the JVM properties example and check the source contract.
@n0tl3ss

n0tl3ss commented Oct 6, 2026

Copy link
Copy Markdown
Member Author

Addressed the three new findings in review 5434341593 through new commits, without rewriting history:

  • The shared selector correction is in prerequisite Add shared infrastructure for independently reviewed Python guides #1914, commit 1ffbfa7, imported by normal merge cd13c40. The real DefaultGuideParser regression shows that omitted child languages default to Java/Groovy/Kotlin, so they do not inherit Python from a base. The actual gap was inherited applications with explicitly enabled Python, plus omitted apps being incorrectly treated as an implicit application. The selector now matches the sorted application merge. New controls reproduce three failures before the fix and pass afterward.
  • Both master-only Python workflow path lists include gradle/local-composite-builds.gradle.
  • Commit ecbc39a changes the OpenAPI TOML block to only-for-languages:python. The JVM properties block is unchanged. Its source-contract regression fails with the old marker and passes with the fix; generator filtering is also checked for Java/Groovy/Kotlin/Python. No unsupported language variants were enabled.

Local checks on the merged head: 153 infrastructure tests and 19 Python script checks pass; both current Java OpenAPI guides render successfully (three Gradle/Maven pages checked: properties configuration present, no TOML or unresolved resource includes). No native image was built. Fresh hosted checks are running on cd13c40; the previous head’s green CI is not being reused as evidence for this head. #1914 must still merge first.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

Python script caching, mixed-name normalization, and failed timing cleanup can produce stale output or leaked processes.

Review effort: Balanced
Findings: 1 High severity · 1 Medium severity

Open (2)
Previously missed (2)

In code that hasn't changed since last review

Medium severity Avoid skipping normalization for mixed-case underscore identifiers

buildSrc/​src/​main/​groovy/​io/​micronaut/​guides/​GuideProjectGenerator.groovy:234

This early return skips normalization whenever a target contains an underscore, so a mixed identifier such as Hello_Controller remains case-sensitive instead of becoming hello_controller. That contradicts the new MacroUtilsTest expectation and can prevent Python exclusions from finding the generated file; only return early when the whole target is already lowercase.

Low severity Fix singular article before plural coordinates

guides/​micronaut-mcp-weather/​python/​src/​example/​micronaut/​tools.py:15

The singular article does not agree with the plural “coordinates”; remove “a” to match the Java tool metadata.

Comment thread guides/distribution-base/python/ttfr.sh
Fingerprint the merged Guide record value, so base-only application changes invalidate generated scripts without requiring serializer service loading during Gradle input evaluation. Normalize mixed-case identifiers with underscores in both existing filename helpers. Add parser-backed input and filesystem-independent exclusion regressions.

Fixes #1923

Fixes #1925
Install and clear EXIT cleanup traps in each language script and propagate failed timing status. Exercise success and both Bash timeout modes with fake commands, without starting real containers or native images. Match the Python weather-tool wording to Java.

Fixes #1924
@n0tl3ss

n0tl3ss commented Oct 6, 2026

Copy link
Copy Markdown
Member Author

Addressed all four findings in the newest review 5434888907, including both summary-only items. New shared commit 12cbce0 on prerequisite #1914 fixes effective-metadata script inputs and both mixed-case underscore guards; commit 7ea7ae0 fixes distribution cleanup across supported languages and the Weather wording. Normal merge 33051ba imports the shared changes. No force push.

Reproducers were added before production fixes and recorded in issues #1923, #1924 and #1925. All 156 infrastructure tests pass with zero failures/errors/skips; 29 stdlib script tests pass, including 36 timing subcases. All 16 existing master Python project/script tasks regenerate, and a second unchanged run is up-to-date. The existing distribution and MCP Weather Stdio Build tasks also pass locally with native execution explicitly excluded. Timing tests use fake commands, not containers/images.

Both new inline threads have been replied to and resolved. The previous-head hosted MCP Weather Stdio failure was Maven Central HTTP 403 for the MCP dependency and Maven distribution, before application tests ran; it was not a reproduced source failure. Fresh CI is running on 33051ba, so I am not claiming its guide matrix is green yet.

This PR remains a draft. Its master diff includes unmerged #1914 infrastructure plus multiple reusable guide families; that is why it is much larger than a per-guide PR. Individual guides remain separate contributions and should list only the shared prerequisites they actually need. No split, closure or merge was performed.

@n0tl3ss
n0tl3ss requested a balanced review from Copilot October 6, 2026 22:10

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants