Skip to content

PTD-22.2: Materialize selected Temurin Java in the isolated builder - #140

Merged
omry merged 1 commit into
pr136from
pr139
Sep 8, 2026
Merged

PTD-22.2: Materialize selected Temurin Java in the isolated builder#140
omry merged 1 commit into
pr136from
pr139

Conversation

@omry

@omry omry commented Sep 7, 2026

Copy link
Copy Markdown
Owner

Defer source-builder portable-tool planning until Python dependency resolution selects a local override and snapshots its source. A generic build-wide coordinator accumulates only those path-free immutable recipes, resolves their build scopes, acquires and offline-materializes the pinned Temurin payload, prepares and validates a disposable COPY-only builder image, and opens a distinct source-build consumer without modifying or restarting the dependency resolver.

Expose only the selected java and javac commands on source-build PATH, bind retained source artifacts to the exact prefix and portable selections, carry the final acquisition lock into the build lock, and remove every temporary builder image and host materialization. Exact reuse with prior source-builder scopes re-enters graph execution so old locked selections cannot become desired state before current source selection.

Treat executable mode as archive and Linux-image validation evidence rather than a Windows host filesystem property, while retaining regular-file checks and fail-closed destination, recipe identity, acquisition, materialization, and validation boundaries. The final application image and workload provider graph remain unchanged.

@omry
omry changed the base branch from main to pr136 September 7, 2026 15:06
Comment on lines +56 to +70
func (coordinator *SourceBuilderCoordinatorV1) Prepare(
ctx context.Context,
upstream deploy.ImageDescriptor,
selected []SourceBuilderSelectedRecipeV1,
) (*SourceBuilderEnvironmentV1, error) {
if coordinator == nil {
return nil, fmt.Errorf("prepare source-builder tools requires a coordinator")
}
if len(selected) == 0 {
return nil, fmt.Errorf("prepare source-builder tools requires selected recipes")
}
coordinator.mu.Lock()
defer coordinator.mu.Unlock()
if coordinator.cleanedUp {
return nil, fmt.Errorf("source-builder coordinator is already cleaned up")

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Performance: Coordinator re-materializes full tool union per Python node

SourceBuilderCoordinatorV1.Prepare re-plans, re-acquires, and re-materializes the complete accumulated recipe union on every call, with no memoization keyed on the current recipe set. Each Python node that has a source build triggers a fresh materialization of every selected closure (e.g. the ~360MB Temurin JDK is untarred into a new workspace and a new disposable image for each node), even when the recipe union is unchanged from a prior node's Prepare call. With multiple source-building Python nodes this is O(nodes × tools) archive extraction and image builds. Acquisitions are cache-hit after the first, but the offline materialization work repeats. Consider caching the materialized tools/environment by the resolved plan identity so identical unions reuse a prior materialization.

Was this helpful? React with 👍 / 👎

@omry

omry commented Sep 7, 2026

Copy link
Copy Markdown
Owner Author

PR-cycle state — maintained automatically. Do not edit by hand.

Mechanical PR-cycle state (JSON)
{
  "approval": {
    "candidate_revision_fingerprint": "sha256:865a4602e6d4e8232aa104b292ee69b80c3cbb44fa8aa330afe82325062c7152",
    "evidence": {
      "attestations": [],
      "candidate_revision_fingerprint": "sha256:865a4602e6d4e8232aa104b292ee69b80c3cbb44fa8aa330afe82325062c7152",
      "check_conclusions": [
        {
          "conclusion": "SUCCESS",
          "name": "Gitar"
        },
        {
          "conclusion": "SUCCESS",
          "name": "Linux CI checks"
        },
        {
          "conclusion": "SUCCESS",
          "name": "Target smoke (darwin-amd64)"
        },
        {
          "conclusion": "SUCCESS",
          "name": "Target smoke (darwin-arm64)"
        },
        {
          "conclusion": "SUCCESS",
          "name": "Target smoke (linux-amd64)"
        },
        {
          "conclusion": "SUCCESS",
          "name": "Target smoke (linux-arm64)"
        },
        {
          "conclusion": "SUCCESS",
          "name": "Windows host smoke (windows-amd64)"
        },
        {
          "conclusion": "SUCCESS",
          "name": "Windows host smoke (windows-arm64)"
        }
      ],
      "delivery_deferral_ledger_digest": "sha256:14554488f9256a12e12b2a1eace0aea54fa6d3abeecaaecdb9e1d484fea05c3b",
      "finding_dispositions_digest": "sha256:b4aab81ecb85a730abc0bfefd6f74763c7d5fa70dd09feeb55c5bed180fa6f75",
      "operation_identity": "sha256:3599c34c179a8d8a430eeeb45f16cd6778420c6b50e365c4a946d9a5b588bbd2",
      "review_request": {
        "body_digest": "sha256:98082d5c37cc8731da8dcc671b9d112ef4ceb4589453fff6d68e9ee858801caa",
        "id": 5573892572
      },
      "review_result": {
        "body_digest": "sha256:95c962f674972d280332f9c60260ba8bcbacc07f32bde13cd1870364f2f2aad6",
        "id": 5573946636
      }
    },
    "evidence_fingerprint": "sha256:fd7565f9a6f3ad96d15f69aca559c6bf2e764bc946bb0ed20c5986407ec6d96e",
    "head_sha": "e8863b842cee168a8f5fca899cb5eb057d07ff11",
    "operation_identity": "sha256:3599c34c179a8d8a430eeeb45f16cd6778420c6b50e365c4a946d9a5b588bbd2",
    "review_request_id": 5573892572,
    "review_result_id": 5573946636,
    "status": "approved-evidence-recorded"
  },
  "candidate_revision_fingerprint": "sha256:865a4602e6d4e8232aa104b292ee69b80c3cbb44fa8aa330afe82325062c7152",
  "check_conclusions": [
    {
      "conclusion": "SUCCESS",
      "name": "Gitar"
    },
    {
      "conclusion": "SUCCESS",
      "name": "Linux CI checks"
    },
    {
      "conclusion": "SUCCESS",
      "name": "Target smoke (darwin-amd64)"
    },
    {
      "conclusion": "SUCCESS",
      "name": "Target smoke (darwin-arm64)"
    },
    {
      "conclusion": "SUCCESS",
      "name": "Target smoke (linux-amd64)"
    },
    {
      "conclusion": "SUCCESS",
      "name": "Target smoke (linux-arm64)"
    },
    {
      "conclusion": "SUCCESS",
      "name": "Windows host smoke (windows-amd64)"
    },
    {
      "conclusion": "SUCCESS",
      "name": "Windows host smoke (windows-arm64)"
    }
  ],
  "check_observations": [
    {
      "checks": [
        {
          "conclusion": "SUCCESS",
          "name": "Gitar",
          "run_id": 101788769820,
          "run_status": "completed",
          "status": "success",
          "url": "https://github.com/omry/reploy/runs/101788769820"
        },
        {
          "conclusion": "SUCCESS",
          "name": "Linux CI checks",
          "run_id": 101788764999,
          "run_status": "completed",
          "status": "success",
          "url": "https://github.com/omry/reploy/actions/runs/34136546573/job/101788764999"
        },
        {
          "conclusion": "SUCCESS",
          "name": "Target smoke (darwin-amd64)",
          "run_id": 101788765376,
          "run_status": "completed",
          "status": "success",
          "url": "https://github.com/omry/reploy/actions/runs/34136546573/job/101788765376"
        },
        {
          "conclusion": "SUCCESS",
          "name": "Target smoke (darwin-arm64)",
          "run_id": 101788765255,
          "run_status": "completed",
          "status": "success",
          "url": "https://github.com/omry/reploy/actions/runs/34136546573/job/101788765255"
        },
        {
          "conclusion": "SUCCESS",
          "name": "Target smoke (linux-amd64)",
          "run_id": 101788765352,
          "run_status": "completed",
          "status": "success",
          "url": "https://github.com/omry/reploy/actions/runs/34136546573/job/101788765352"
        },
        {
          "conclusion": "SUCCESS",
          "name": "Target smoke (linux-arm64)",
          "run_id": 101788765433,
          "run_status": "completed",
          "status": "success",
          "url": "https://github.com/omry/reploy/actions/runs/34136546573/job/101788765433"
        },
        {
          "conclusion": "FAILURE",
          "name": "Windows host smoke (windows-amd64)",
          "run_id": 101788765268,
          "run_status": "completed",
          "status": "failure",
          "url": "https://github.com/omry/reploy/actions/runs/34136546573/job/101788765268"
        },
        {
          "conclusion": "FAILURE",
          "name": "Windows host smoke (windows-arm64)",
          "run_id": 101788765162,
          "run_status": "completed",
          "status": "failure",
          "url": "https://github.com/omry/reploy/actions/runs/34136546573/job/101788765162"
        }
      ],
      "head_sha": "ab1d7e8f92ff7c41b53ef00f00dba84d60b38323",
      "id": "sha256:80ca2b065f141b8513dfbd8e1650b049e8ab7b5ea7ccb5d8d5d237e974415e1e",
      "required_checks": [
        "Gitar",
        "Linux CI checks",
        "Target smoke (darwin-amd64)",
        "Target smoke (darwin-arm64)",
        "Target smoke (linux-amd64)",
        "Target smoke (linux-arm64)",
        "Windows host smoke (windows-amd64)",
        "Windows host smoke (windows-arm64)"
      ],
      "status": "failure"
    },
    {
      "checks": [
        {
          "conclusion": "SUCCESS",
          "name": "Gitar",
          "run_id": 101818369227,
          "run_status": "completed",
          "status": "success",
          "url": "https://github.com/omry/reploy/runs/101818369227"
        },
        {
          "conclusion": "SUCCESS",
          "name": "Linux CI checks",
          "run_id": 101818138171,
          "run_status": "completed",
          "status": "success",
          "url": "https://github.com/omry/reploy/actions/runs/34146025222/job/101818138171"
        },
        {
          "conclusion": "SUCCESS",
          "name": "Target smoke (darwin-amd64)",
          "run_id": 101818138257,
          "run_status": "completed",
          "status": "success",
          "url": "https://github.com/omry/reploy/actions/runs/34146025222/job/101818138257"
        },
        {
          "conclusion": "SUCCESS",
          "name": "Target smoke (darwin-arm64)",
          "run_id": 101818138567,
          "run_status": "completed",
          "status": "success",
          "url": "https://github.com/omry/reploy/actions/runs/34146025222/job/101818138567"
        },
        {
          "conclusion": "SUCCESS",
          "name": "Target smoke (linux-amd64)",
          "run_id": 101818138374,
          "run_status": "completed",
          "status": "success",
          "url": "https://github.com/omry/reploy/actions/runs/34146025222/job/101818138374"
        },
        {
          "conclusion": "SUCCESS",
          "name": "Target smoke (linux-arm64)",
          "run_id": 101818138334,
          "run_status": "completed",
          "status": "success",
          "url": "https://github.com/omry/reploy/actions/runs/34146025222/job/101818138334"
        },
        {
          "conclusion": "SUCCESS",
          "name": "Windows host smoke (windows-amd64)",
          "run_id": 101818138302,
          "run_status": "completed",
          "status": "success",
          "url": "https://github.com/omry/reploy/actions/runs/34146025222/job/101818138302"
        },
        {
          "conclusion": "SUCCESS",
          "name": "Windows host smoke (windows-arm64)",
          "run_id": 101818138306,
          "run_status": "completed",
          "status": "success",
          "url": "https://github.com/omry/reploy/actions/runs/34146025222/job/101818138306"
        }
      ],
      "head_sha": "e8863b842cee168a8f5fca899cb5eb057d07ff11",
      "id": "sha256:c5a83fc89d82d699dc3637b08daebf095e9015e01e56a51017f23b71703b0bb8",
      "required_checks": [
        "Gitar",
        "Linux CI checks",
        "Target smoke (darwin-amd64)",
        "Target smoke (darwin-arm64)",
        "Target smoke (linux-amd64)",
        "Target smoke (linux-arm64)",
        "Windows host smoke (windows-amd64)",
        "Windows host smoke (windows-arm64)"
      ],
      "status": "success"
    },
    {
      "checks": [
        {
          "conclusion": "SUCCESS",
          "name": "Gitar",
          "run_id": 101799689534,
          "run_status": "completed",
          "status": "success",
          "url": "https://github.com/omry/reploy/runs/101799689534"
        },
        {
          "conclusion": "SUCCESS",
          "name": "Linux CI checks",
          "run_id": 101799699287,
          "run_status": "completed",
          "status": "success",
          "url": "https://github.com/omry/reploy/actions/runs/34140027146/job/101799699287"
        },
        {
          "conclusion": "SUCCESS",
          "name": "Target smoke (darwin-amd64)",
          "run_id": 101799699726,
          "run_status": "completed",
          "status": "success",
          "url": "https://github.com/omry/reploy/actions/runs/34140027146/job/101799699726"
        },
        {
          "conclusion": "SUCCESS",
          "name": "Target smoke (darwin-arm64)",
          "run_id": 101799699616,
          "run_status": "completed",
          "status": "success",
          "url": "https://github.com/omry/reploy/actions/runs/34140027146/job/101799699616"
        },
        {
          "conclusion": "SUCCESS",
          "name": "Target smoke (linux-amd64)",
          "run_id": 101799699735,
          "run_status": "completed",
          "status": "success",
          "url": "https://github.com/omry/reploy/actions/runs/34140027146/job/101799699735"
        },
        {
          "conclusion": "SUCCESS",
          "name": "Target smoke (linux-arm64)",
          "run_id": 101799699584,
          "run_status": "completed",
          "status": "success",
          "url": "https://github.com/omry/reploy/actions/runs/34140027146/job/101799699584"
        },
        {
          "conclusion": "SUCCESS",
          "name": "Windows host smoke (windows-amd64)",
          "run_id": 101799699685,
          "run_status": "completed",
          "status": "success",
          "url": "https://github.com/omry/reploy/actions/runs/34140027146/job/101799699685"
        },
        {
          "conclusion": "SUCCESS",
          "name": "Windows host smoke (windows-arm64)",
          "run_id": 101799699665,
          "run_status": "completed",
          "status": "success",
          "url": "https://github.com/omry/reploy/actions/runs/34140027146/job/101799699665"
        }
      ],
      "head_sha": "d106c3a0a8a9ae258d4ba473cb01503ab18acd38",
      "id": "sha256:e82b1bf7035a87232cf4f9121734a9be62cf851ed8bc266dd763d1b9783c189a",
      "required_checks": [
        "Gitar",
        "Linux CI checks",
        "Target smoke (darwin-amd64)",
        "Target smoke (darwin-arm64)",
        "Target smoke (linux-amd64)",
        "Target smoke (linux-arm64)",
        "Windows host smoke (windows-amd64)",
        "Windows host smoke (windows-arm64)"
      ],
      "status": "success"
    }
  ],
  "delivery_deferral_ledger_digest": "sha256:14554488f9256a12e12b2a1eace0aea54fa6d3abeecaaecdb9e1d484fea05c3b",
  "delivery_deferrals": [
    {
      "classification": "additive-delivery-work",
      "evidence": [
        "https://github.com/omry/reploy/pull/140#discussion_r3950938566"
      ],
      "id": "review-comment:3950938566",
      "rationale": "This is a future performance optimization, not a PTD-22.2 correctness requirement; acquisition is already cached and adding lifecycle-safe materialization caching would expand the approved slice.",
      "source": "gitar-review",
      "status": "deferred",
      "summary": "Cache materialized source-builder tool unions by resolved plan identity."
    }
  ],
  "findings": [
    {
      "evidence": [
        "https://github.com/omry/reploy/actions/runs/34136546573/job/101788765268",
        "https://github.com/omry/reploy/actions/runs/34136546573/job/101788765162"
      ],
      "id": "required-checks:windows-symlink-mode-assertions",
      "severity": "medium",
      "source": "required-checks-and-local-review",
      "status": "accepted",
      "summary": "Two TAR symbolic-link tests demand Unix 0555 executable bits on Windows instead of using the package's platform-aware regular-file mode assertion."
    },
    {
      "evidence": [
        "https://github.com/omry/reploy/pull/140#discussion_r3951126576"
      ],
      "id": "review-comment:3951126576",
      "rationale": "PTD is explicitly being released as one unit and the delivery contract says not to preserve intermediate compatibility; no released build lock can contain this intermediate record shape.",
      "severity": "P1",
      "source": "codex-independent-review",
      "status": "rejected",
      "summary": "Preserve compatibility with portable-tool-payload-v1 records that predate symbolic_link_policy.",
      "thread_id": "PRRT_kwDOTFQCkM6f99C6"
    }
  ],
  "pr": {
    "base_ref": "pr136",
    "base_sha": "f78044429baaa69d47f7d4174256126e46607d89",
    "body_digest": "sha256:d6c7493f8e73038d896ee9d07db73ce8ea9862508f5856cfdbd4eb37e550cfaf",
    "diff_digest": "sha256:27d11eaa59d2af1e842e37c05577c81f80a9cccec7004f5ee04dc25990984626",
    "head_ref": "pr139",
    "head_sha": "e8863b842cee168a8f5fca899cb5eb057d07ff11",
    "pr": 140,
    "repository": "omry/reploy",
    "scope_authority": [],
    "title_digest": "sha256:a63944f773940235fc1b0bc8b338ca49a87414b019a81bb7b8e02764134bf3ca"
  },
  "record_version": 12,
  "review_observations": [],
  "review_requests": [
    {
      "base_established_at": "2026-09-07T15:06:26Z",
      "base_ref": "pr136",
      "base_sha": "f78044429baaa69d47f7d4174256126e46607d89",
      "body_digest": "sha256:a0c79d5df527598d5024c59b1acde79518e0f8ea33cc76ad9f5beb495b036af1",
      "created_at": "2026-09-07T15:31:38Z",
      "head_sha": "ab1d7e8f92ff7c41b53ef00f00dba84d60b38323",
      "id": 5572839106,
      "kind": "regular-review"
    },
    {
      "base_established_at": "2026-09-07T15:06:26Z",
      "base_ref": "pr136",
      "base_sha": "f78044429baaa69d47f7d4174256126e46607d89",
      "body_digest": "sha256:14f2e54953a0c2c7cd41039b197a8badd7a47435e3c52f5ab2cca61d080a7304",
      "created_at": "2026-09-07T16:00:07Z",
      "head_sha": "d106c3a0a8a9ae258d4ba473cb01503ab18acd38",
      "id": 5573136295,
      "kind": "regular-review"
    },
    {
      "base_established_at": "2026-09-07T15:06:26Z",
      "base_ref": "pr136",
      "base_sha": "f78044429baaa69d47f7d4174256126e46607d89",
      "body_digest": "sha256:98082d5c37cc8731da8dcc671b9d112ef4ceb4589453fff6d68e9ee858801caa",
      "created_at": "2026-09-07T17:21:25Z",
      "head_sha": "e8863b842cee168a8f5fca899cb5eb057d07ff11",
      "id": 5573892572,
      "kind": "regular-review"
    }
  ],
  "review_results": [
    {
      "base_ref": "pr136",
      "base_sha": "f78044429baaa69d47f7d4174256126e46607d89",
      "body_digest": "sha256:f262539c82fbde6e8e678adf76d2b887c8e6e54de7a97faff1c1ab894a1a6a75",
      "commit_id": "ab1d7e8f92ff7c41b53ef00f00dba84d60b38323",
      "id": 5133666607,
      "inline_message_ids": [
        3951126576
      ],
      "request_comment_id": 5572839106,
      "result_kind": "findings",
      "status": "result",
      "submitted_at": "2026-09-07T15:38:40Z",
      "unresolved_thread_ids": [
        "PRRT_kwDOTFQCkM6f99C6",
        "PRRT_kwDOTFQCkM6f9eb8"
      ]
    },
    {
      "base_ref": "pr136",
      "base_sha": "f78044429baaa69d47f7d4174256126e46607d89",
      "body_digest": "sha256:feb4460520cde9d30be0a81a3d6f51da671b81b66374a1bcb55b69d8e52027d9",
      "commit_id": "d106c3a0a8a9ae258d4ba473cb01503ab18acd38",
      "id": 5573196060,
      "inline_message_ids": [],
      "request_comment_id": 5573136295,
      "result_kind": "clean",
      "status": "result",
      "submitted_at": "2026-09-07T16:05:58Z",
      "unresolved_thread_ids": [
        "PRRT_kwDOTFQCkM6f9eb8"
      ]
    },
    {
      "base_ref": "pr136",
      "base_sha": "f78044429baaa69d47f7d4174256126e46607d89",
      "body_digest": "sha256:95c962f674972d280332f9c60260ba8bcbacc07f32bde13cd1870364f2f2aad6",
      "commit_id": "e8863b842cee168a8f5fca899cb5eb057d07ff11",
      "id": 5573946636,
      "inline_message_ids": [],
      "request_comment_id": 5573892572,
      "result_kind": "clean",
      "status": "result",
      "submitted_at": "2026-09-07T17:28:04Z",
      "unresolved_thread_ids": [
        "PRRT_kwDOTFQCkM6f9eb8"
      ]
    }
  ],
  "revision_fingerprint": "sha256:865a4602e6d4e8232aa104b292ee69b80c3cbb44fa8aa330afe82325062c7152",
  "rounds": [
    {
      "applied_fix_paths": [
        "internal/providerstore/archive_materialization_tar_test.go"
      ],
      "disposition_changes": [
        "review-comment:3951126576",
        "required-checks:windows-symlink-mode-assertions"
      ],
      "effective_diff_digest": "sha256:27d11eaa59d2af1e842e37c05577c81f80a9cccec7004f5ee04dc25990984626",
      "finding_ids": [
        "review-comment:3951126576",
        "required-checks:windows-symlink-mode-assertions"
      ],
      "invariants": [
        "Archive materialization mode tests must use the package's platform-specific regular-file mode contract.",
        "PTD-22.2 must not add compatibility for an unreleased intermediate PTD record shape."
      ],
      "outcome": "corrected-head-needs-review",
      "proposed_fix_paths": [
        "internal/providerstore/archive_materialization_tar_test.go"
      ],
      "resulting_head": "d106c3a0a8a9ae258d4ba473cb01503ab18acd38",
      "review_observation_id": null,
      "review_request_id": 5572839106,
      "review_result_id": 5133666607,
      "reviewed_head": "ab1d7e8f92ff7c41b53ef00f00dba84d60b38323",
      "root_cause": "Two TAR-specific tests bypassed the existing platform-aware assertion helper and directly required Unix executable bits on Windows. The independent compatibility finding assumed an externally released intermediate schema, contrary to the atomic PTD delivery contract.",
      "round": 1,
      "unresolved_current_slice_findings": 0,
      "unresolved_design_blockers": 0
    },
    {
      "applied_fix_paths": [],
      "disposition_changes": [],
      "effective_diff_digest": "sha256:27d11eaa59d2af1e842e37c05577c81f80a9cccec7004f5ee04dc25990984626",
      "finding_ids": [],
      "invariants": [
        "The corrected PR head has a clean attributable independent Codex review.",
        "Every repository-policy-selected required check succeeds on the exact corrected head.",
        "Complete repository-required local validation and local review are clean on the exact corrected content."
      ],
      "outcome": "clean",
      "proposed_fix_paths": [],
      "resulting_head": "d106c3a0a8a9ae258d4ba473cb01503ab18acd38",
      "review_observation_id": null,
      "review_request_id": 5573136295,
      "review_result_id": 5573196060,
      "reviewed_head": "d106c3a0a8a9ae258d4ba473cb01503ab18acd38",
      "root_cause": null,
      "round": 2,
      "unresolved_current_slice_findings": 0,
      "unresolved_design_blockers": 0
    },
    {
      "applied_fix_paths": [],
      "disposition_changes": [],
      "effective_diff_digest": "sha256:27d11eaa59d2af1e842e37c05577c81f80a9cccec7004f5ee04dc25990984626",
      "finding_ids": [],
      "invariants": [
        "The PTD-22.2 commit and pull-request descriptions contain no false authorship attribution and remain accurate to the approved scope.",
        "The corrected PR head has a clean attributable Codex review.",
        "Every repository-policy-selected required check succeeds on the exact corrected head.",
        "Complete repository-required local validation and local review are clean on the exact corrected content."
      ],
      "outcome": "clean",
      "proposed_fix_paths": [],
      "resulting_head": "e8863b842cee168a8f5fca899cb5eb057d07ff11",
      "review_observation_id": null,
      "review_request_id": 5573892572,
      "review_result_id": 5573946636,
      "reviewed_head": "e8863b842cee168a8f5fca899cb5eb057d07ff11",
      "root_cause": null,
      "round": 3,
      "unresolved_current_slice_findings": 0,
      "unresolved_design_blockers": 0
    }
  ],
  "schema": "awd:swe:pr-cycle-state",
  "version": 2
}

@omry
omry marked this pull request as ready for review September 7, 2026 15:26
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 7, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-07T17:28:05.821808Z e8863b8 Manual request
🔒 Security Review Completed 2026-09-07T15:34:34.961421Z ab1d7e8 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@omry

omry commented Sep 7, 2026

Copy link
Copy Markdown
Owner Author

@codex, regular review ab1d7e8

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ab1d7e8f92

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread internal/portabletool/record_validate.go
@gitar-bot

gitar-bot Bot commented Sep 7, 2026

Copy link
Copy Markdown
Code Review 👍 Approved with suggestions 0 resolved / 1 findings

Defers source-builder planning until Python dependency resolution selects a local override, then materializes the pinned Temurin payload into a disposable builder image with only the selected Java commands on PATH. The final application image and workload provider graph remain unchanged.

Consider caching materialized tools by resolved plan identity to avoid re-materializing the full tool union (e.g. the ~360MB Temurin JDK) for each Python node with a source build.

💡 Performance: Coordinator re-materializes full tool union per Python node

📄 internal/dockerdeploy/source_builder_coordinator.go:56-70

SourceBuilderCoordinatorV1.Prepare re-plans, re-acquires, and re-materializes the complete accumulated recipe union on every call, with no memoization keyed on the current recipe set. Each Python node that has a source build triggers a fresh materialization of every selected closure (e.g. the ~360MB Temurin JDK is untarred into a new workspace and a new disposable image for each node), even when the recipe union is unchanged from a prior node's Prepare call. With multiple source-building Python nodes this is O(nodes × tools) archive extraction and image builds. Acquisitions are cache-hit after the first, but the offline materialization work repeats. Consider caching the materialized tools/environment by the resolved plan identity so identical unions reuse a prior materialization.

🤖 Prompt for agents
Code Review: Defers source-builder planning until Python dependency resolution selects a local override, then materializes the pinned Temurin payload into a disposable builder image with only the selected Java commands on PATH. The final application image and workload provider graph remain unchanged.
  
  Consider caching materialized tools by resolved plan identity to avoid re-materializing the full tool union (e.g. the ~360MB Temurin JDK) for each Python node with a source build.

1. 💡 Performance: Coordinator re-materializes full tool union per Python node
   Files: internal/dockerdeploy/source_builder_coordinator.go:56-70

   SourceBuilderCoordinatorV1.Prepare re-plans, re-acquires, and re-materializes the complete accumulated recipe union on every call, with no memoization keyed on the current recipe set. Each Python node that has a source build triggers a fresh materialization of every selected closure (e.g. the ~360MB Temurin JDK is untarred into a new workspace and a new disposable image for each node), even when the recipe union is unchanged from a prior node's Prepare call. With multiple source-building Python nodes this is O(nodes × tools) archive extraction and image builds. Acquisitions are cache-hit after the first, but the offline materialization work repeats. Consider caching the materialized tools/environment by the resolved plan identity so identical unions reuse a prior materialization.

Options

Auto-apply is off → Gitar will not commit updates to this branch.
Display: compact → Showing less information.

Comment with these commands to change the behavior for this request:

Auto-apply Compact
gitar auto-apply:on         
gitar display:verbose         

Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source

@omry

omry commented Sep 7, 2026

Copy link
Copy Markdown
Owner Author

@codex, regular review d106c3a

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 🚀

Reviewed commit: d106c3a0a8

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@omry omry added the approved PR reviewed and approved label Sep 7, 2026
Defer source-builder portable-tool planning until Python dependency resolution selects a local override and snapshots its source. A generic build-wide coordinator accumulates only those path-free immutable recipes, resolves their build scopes, acquires and offline-materializes the pinned Temurin payload, prepares and validates a disposable COPY-only builder image, and opens a distinct source-build consumer without modifying or restarting the dependency resolver.

Expose only the selected java and javac commands on source-build PATH, bind retained source artifacts to the exact prefix and portable selections, carry the final acquisition lock into the build lock, and remove every temporary builder image and host materialization. Exact reuse with prior source-builder scopes re-enters graph execution so old locked selections cannot become desired state before current source selection.

Treat executable mode as archive and Linux-image validation evidence rather than a Windows host filesystem property, while retaining regular-file checks and fail-closed destination, recipe identity, acquisition, materialization, and validation boundaries. The final application image and workload provider graph remain unchanged.
@omry omry removed the approved PR reviewed and approved label Sep 7, 2026
@omry

omry commented Sep 7, 2026

Copy link
Copy Markdown
Owner Author

@codex, regular review e8863b8

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 🎉

Reviewed commit: e8863b842c

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@omry omry added the approved PR reviewed and approved label Sep 7, 2026
@omry omry added approved PR reviewed and approved and removed approved PR reviewed and approved labels Sep 7, 2026
@omry
omry merged commit 838176e into main Sep 8, 2026
8 checks passed
@omry
omry deleted the pr139 branch September 8, 2026 03:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved PR reviewed and approved

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant