Skip to content

Import changes from master to main - #1383

Closed
yashvardhannanavati wants to merge 115 commits into
mainfrom
import_changes
Closed

yashvardhannanavati wants to merge 115 commits into
mainfrom
import_changes

Conversation

@yashvardhannanavati

Copy link
Copy Markdown
Collaborator

No description provided.

Tulsi Chandwani and others added 30 commits June 18, 2026 12:28
Adds allowed_remote_resources with both fullsend-ai/fullsend and
fullsend-ai/agents URLs.

This is required for the agent extraction migration: agent harnesses
are now resolved from fullsend-ai/agents at runtime and the URL must
be in the allowlist.
When rm_operators is set, also copy operator packages from the built
image into Git. Previously the if/elif/else logic performed only one
operation, leaving stale deprecated operator dirs in Git during add
requests with deprecations.

Signed-off-by: Jan Lipovský <jlipovsk@redhat.com>
Assisted-by: Cursor <cursoragent@cursor.com>
Extract operator package names from deprecation_list (user input) and
pass them to _update_index_image_pull_spec so Git cleanup runs during
overwrite. Uses get_operator_packages_from_deprecation_list instead of
deprecation_bundles to avoid manifest-list digest mismatches.

Signed-off-by: Jan Lipovský <jlipovsk@redhat.com>
Assisted-by: Cursor
Removed the duplicate py12 entry in tox envlist
Corrected the gh-actions 3.13 mapping to run on 3.13

Assisted-by: Cursor
Co-authored-by: Yashvardhan Nanavati <yashn@bu.edu>
Assisted-by: Gemini, Claude, Cursor

[CLOUDDST-28644]
[CLOUDDST-28865]
Co-authored-by: Jan Lipovský <jlipovsk@redhat.com>
Assisted-by: Claude
Signed-off-by: Yashvardhan Nanavati <yashn@bu.edu>
Co-authored-by: Yashvardhan Nanavati <yashn@bu.edu>

[CLOUDDST-28644]
[CLOUDDST-28865]
Co-authored-by: Yashvardhan Nanavati <yashn@bu.edu>

[CLOUDDST-28644]
[CLOUDDST-28865]
Co-authored-by: Jan Lipovský <jlipovsk@redhat.com>
Assisted-by: Cursor

Signed-off-by: Yashvardhan Nanavati <yashn@bu.edu>
Refers to CLOUDDST-28865

Assisted-by: Claude
Signed-off-by: Yashvardhan Nanavati <yashn@bu.edu>
Assisted by: Gemini, Claude

[CLOUDDST-28644]
Assisted by: Gemini

[CLOUDDST-28644]
This will be done in iib-playbooks.

[CLOUDDST-28644]
Refers to CLOUDDST-28865

Signed-off-by: Yashvardhan Nanavati <yashn@bu.edu>

Assisted-by: Cursor
Signed-off-by: Yashvardhan Nanavati <yashn@bu.edu>
Signed-off-by: Yashvardhan Nanavati <yashn@bu.edu>
This commit introduces a new function named
`validate_bundes_in_parallel` on `containerized_utils` which performs a
parallel validation of whether the bundles in a given list are present
in the registry.

THe function will wait for all the threads to complete by default, but
it can return the list of threads for external waiting.

Signed-off-by: Jonathan Gangi <jgangi@redhat.com>

Assisted-by: Cursor/Gemini
All handler functions perform some common operations like
cloning the git repo, fetching index.db, pushing it and creating
mrs. This commit extracts those into helper functions to avoid
duplication of code.

Signed-off-by: Yashvardhan Nanavati <yashn@bu.edu>

Assisted-by: Claude
Signed-off-by: Yashvardhan Nanavati <yashn@bu.edu>
Refers to CLOUDDST-28866

Assisted-by: Claude
Signed-off-by: Yashvardhan Nanavati <yashn@bu.edu>
Refers to CLOUDDST-28866

Assisted-by: Cursor
Signed-off-by: Yashvardhan Nanavati <yashn@bu.edu>
For some older versions like v4.12, OCP has stopped building the
binary image for a couple of arches. Index image should follow suite.
Include arches in the build metadata so the builder task can build the
index image accordingly.

Signed-off-by: Yashvardhan Nanavati <yashn@bu.edu>

Assisted-by: Cursor
Refers to CLOUDDST-29408

Signed-off-by: Jonathan Gangi <jgangi@redhat.com>

Assisted-by: Cursor/Gemini

# Conflicts:
#	iib/workers/tasks/build_merge_index_image.py
#   and fixing unit tests [jlipovsk]
Update `api_v2` to use the `handle_containerized_merge_request`

Refers to CLOUDDST-29408

Signed-off-by: Jonathan Gangi <jgangi@redhat.com>

Assisted-by: Cursor/Gemini
yashvardhannanavati and others added 16 commits September 10, 2026 11:48
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Resolve three correctness issues raised by automated reviewers on the
index.db naming / divergent-tag work:

1. remote_branch_exists no longer runs git ls-remote with strict=False,
   which swallowed network/auth failures as "branch absent" and could
   misroute a request onto the divergent build path. It now raises on
   command failure and accepts optional token args so the check works
   against private repos (auth injected into the URL, kept out of errors).

2. Divergent extraction now sources index.db/configs from the
   digest-resolved pullspec (from_index_resolved) instead of the mutable
   tag, so the extracted content matches the image the request already
   inspected during prebuild and cannot drift if the tag moves.

3. extract_catalog_and_db_from_image only falls back to the labeled db /
   empty db when the hidden-db path is genuinely absent. A new
   FileNotFoundInImageError (subclass of IIBError) distinguishes an absent
   path from a real registry/OCI/layer/tar failure, which now propagates
   instead of silently degrading to a wrong index.db.

Also add clarifying comments: the empty index.db artifact tag is
intentionally namespace-agnostic, test_get_artifact_combined_tag
intentionally omits the pullspec hash, and drop a misleading
:raises IIBError: from get_index_tag's docstring.

Additionally, update stale test expectations uncovered by rebasing this
work onto the digest-identity base (a4ed53b): test_utils.py carried
duplicate copies of the oras_utils pullspec tests still asserting the
old {image_name}-{tag} naming without mocking get_image_digest, and
test_build_containerized_rm.py mocked
containerized_utils._get_name_and_tag_from_pullspec, a symbol the
digest-identity refactor removed from that module. Both are
test-expectation fixes only; no production code changed.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Also updates build_containerized_merge.py and
build_containerized_regenerate_bundle.py, which call the same
push_index_db_artifact/cleanup_on_failure interfaces changed in Task 5/6
but were not enumerated in the task-7 brief; mypy caught the now-invalid
call signatures.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Update the containerized README's cache-naming section and an inline
comment to reflect the content-digest identity scheme (replacing the
earlier pullspec-hash description).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
extract_catalog_and_db_from_image now extracts only the FBC configs and the
hidden index.db. Drop the labeled-db and synthesised empty-db fallbacks: an
image with no hidden index.db has not been onboarded to the containerized
flow, so the request fails ("no index.db found, onboard the image to build").

pull_index_db_artifact no longer bootstraps index.db from the image on an ORAS
miss. On the normal path a missing digest-keyed artifact fails the request
("no index.db found for the image, onboard the image to build") rather than
silently sourcing content from the image.

Remove the now-dead bootstrap_index_db_from_image helper and unused imports,
add source/destination path logging to aid debugging, and update tests and
the containerized README to match.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
extract_files_from_image_non_privileged reconstructed the entire root
filesystem with tarfile.extractall to copy out one subpath. That fails on
real UBI/RHEL images: the 'data' filter rejects absolute symlinks
(/etc/alternatives, AbsoluteLinkError), 'tar' rejects escaping symlink
targets (/etc/crypto-policies, OutsideDestinationError), and
'fully_trusted' trips on read-only files overwritten across layers
(/etc/machine-id) -- plus tarfile ignores OCI whiteouts and hardlinks.

Delegate to 'oc image extract' instead, which applies OCI layer/whiteout
semantics correctly, runs unprivileged, and is already installed in the
worker base image and used elsewhere in the repo. The function signature
is unchanged, so callers are unaffected.

'oc' distinguishes files from directories by argument shape and exits 0
extracting nothing when a path is absent, so probe the directory form
('<dir>/*:<dst>') first, then the file form ('<file>:<dst>'), and treat
"nothing extracted" as FileNotFoundInImageError.

Tests rewritten to mock 'oc'/run_cmd instead of tarfile/skopeo internals.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
'oc image extract' unpacks only file entries, so an empty index's /configs
(no files) is indistinguishable from an absent path — both raise
FileNotFoundInImageError. Rather than guess in the low-level extractor (the
reverted dotfile approach), let extract_catalog_and_db_from_image decide: it
holds the configs label as the signal that the image declares an FBC root, so
it catches FileNotFoundInImageError and uses an empty catalog directory. The
hidden index.db remains required and still fails with an onboarding error when
absent, regardless of whether /configs is empty.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Correctness:

- push_index_db_artifact hardcoded 'idb-<digest>' while the read path in
  _get_content_addressed_artifact_tag went through
  iib_index_db_artifact_tag_template. Identical under the default, silently
  divergent under any site override -- every lookup would miss. Route the
  write path through the same template.

- remote_branch_exists passed the bare branch name to 'git ls-remote', which
  matches a pattern against the tail of a ref at slash boundaries: 'v4.17'
  also matches 'refs/heads/team/v4.17'. A nested branch was reported as the
  tag branch, misrouting a divergent-tag request onto the normal path where
  the subsequent clone then fails. Pass the fully-qualified ref.

- extract_files_from_image_non_privileged stages with symlinks=True so a link
  is never followed against the worker filesystem, but prepare_build_sources
  then copies the configs tree with a plain copytree, which resolves it. An
  image carrying '/configs/x -> /etc/passwd' would get host content committed
  and pushed to GitLab. Reject symlinks escaping the extraction root in
  extract_catalog_and_db_from_image, covering both copies, and fail closed
  naming the offending path -- an FBC catalog is declarative JSON/YAML, so an
  escaping link is not a legitimate shape for an index image to have.

- Chain the exceptions raised on missing index.db so the original traceback
  survives for outer handlers.

Config:

- The tag template placeholders changed from {image_name}/{tag} to {digest}
  when cache keys became content-addressed. A deployment carrying an override
  from the old scheme failed deep inside a build with a bare KeyError;
  validate at worker startup and name the setting instead. Only validated
  when present, since absence means the class default applies. Documented in
  the containerized README.

Cleanup:

- Move run_cmd to the module-level import (no circular-import reason; the
  same module is already imported there) and repoint the tests onto
  containerized_utils.run_cmd, matching every other mock in that file.
- Rename _get_artifact_combined_tag to _get_content_addressed_artifact_tag;
  nothing is "combined" anymore, it is a pure content digest.
- Freeze BuildSources so the is_divergent guard, which decides whether an MR
  may be merged, cannot be flipped after resolution.
- Note why prepare_git_repository_for_build is retained alongside
  prepare_build_sources; add the missing :return: on remote_branch_exists.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
pull_index_db_artifact caught every IIBError out of get_oras_artifact and
rewrote it as "No index.db found ... Onboard the image to build." A registry
outage, an auth failure or a 5xx therefore told operators to re-onboard an
image that was already onboarded.

Add ArtifactNotFoundError(IIBError), following the FileNotFoundInImageError
pattern: run_cmd classifies 'oras pull' stderr against the registry codes that
mean the artifact is absent (MANIFEST_UNKNOWN, NAME_UNKNOWN, BLOB_UNKNOWN,
"not found", 404) and raises it; everything else stays a plain IIBError.
Deliberately does not match a bare 401/403, since an authenticated registry
answers 404 for an absent tag. get_oras_artifact preserves the type through its
cleanup wrapper, and pull_index_db_artifact keeps the onboarding message for a
genuine miss while reporting a failed pull as what it is. The ImageStream
fallback is unaffected, as ArtifactNotFoundError is still an IIBError.

Also collapse the FileNotFoundInImageError docstring to a single line, moving
its rationale to a comment above the class, to match every other exception in
iib/exceptions.py.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
- Copy the divergent-path catalog with symlinks=True, matching the
  extraction copy. Escaping symlinks are already rejected, so the links
  that remain are internal and should be committed as links rather than
  dereferenced into duplicate regular files.
- Move the rationale for FileNotFoundInImageError and ArtifactNotFoundError
  from block comments into their class docstrings, matching the rest of
  iib/exceptions.py.
- Reject an iib_index_db_artifact_tag_template that cannot fit the
  "-<request_id>" suffix within the 128-character OCI tag limit, so a long
  custom prefix fails at worker startup instead of at push time.
- Note at the three handler merge guards that "not sources.is_divergent" is
  defense-in-depth over the rejection in prepare_build_sources.
- Clarify in AGENTS.md that only the git side rolls back on failure;
  content-addressed index.db artifacts are never overwritten.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@fullsend-ai-review

fullsend-ai-review Bot commented Sep 10, 2026 •

Copy link
Copy Markdown

🤖 Finished Review · ✅ Success · Started 6:50 PM UTC · Completed 7:31 PM UTC

Commit: 372ed03 · View workflow run →

Runtime: claude · Model: opus → claude-opus-4-6 · Effort: high · Cost: $21.81

@qodo-for-releng

Copy link
Copy Markdown

PR Summary by Qodo

Migrate IIB builds to containerized Konflux workflows

✨ Enhancement 🐞 Bug fix 🧪 Tests 📝 Documentation ⚙️ Configuration changes 🕐 40+ Minutes

Grey Divider

AI Description

• Routes index operations through Git-backed, containerized Konflux build workflows.
• Adds content-addressed index database artifacts, divergent-tag handling, and transactional
 merge-request cleanup.
• Expands deployment tooling, security updates, documentation, and comprehensive workflow tests.
Diagram

sequenceDiagram
    actor Client
    participant API as IIB API
    participant Worker as Celery Worker
    participant Git as GitLab Catalog
    participant Konflux
    participant Registry as Image Registry
    participant ORAS as DB Artifacts
    Client->>API: Submit build
    API->>Worker: Queue containerized task
    Worker->>ORAS: Fetch index.db
    Worker->>Git: Commit catalog MR
    Git->>Konflux: Trigger PipelineRun
    Worker->>Konflux: Monitor build
    Konflux-->>Worker: Return image URL
    Worker->>Registry: Replicate built image
    Worker->>ORAS: Push updated index.db
    Worker->>Git: Merge or close MR
    Worker-->>API: Complete request
Loading
High-Level Assessment

The following are alternative approaches to this PR:

1. Feature-flagged dual execution
  • ➕ Allows gradual rollout by request type or environment
  • ➕ Provides a fast fallback to legacy local builds
  • ➖ Maintains two complex execution paths longer
  • ➖ Increases configuration, testing, and operational ambiguity
2. Dedicated orchestration service
  • ➕ Separates Git, Konflux, and artifact lifecycle concerns from Celery tasks
  • ➕ Could provide stronger workflow persistence and observability
  • ➖ Requires a new deployable service and API boundary
  • ➖ Significantly increases migration time and operational overhead

Recommendation: The PR's direct replacement with dedicated containerized handlers is appropriate because each request type retains an isolated coordinator while sharing lifecycle utilities. Before broad production rollout, deploy progressively by environment and validate failure recovery, artifact consistency, divergent-tag behavior, and MR cleanup; retaining the legacy implementation as non-task code provides short-term reference without keeping two active routing paths.

Files changed (97) +17322 / -703

Enhancement (16) +3848 / -169
exceptions.pyDifferentiate missing images and artifacts +21/-0

Differentiate missing images and artifacts

• Adds specific IIB exceptions for absent image paths and missing OCI artifacts.

iib/exceptions.py

api_v1.pyRoute APIs to containerized handlers +39/-21

Route APIs to containerized handlers

• Switches add, remove, merge, FBC, empty-index, and bundle-regeneration endpoints to Konflux-backed tasks. It also requires from_index for add requests and forwards architecture compatibility settings.

iib/web/api_v1.py

build.pyAdapt shared build helpers for containerized execution +39/-24

Adapt shared build helpers for containerized execution

• Reuses output pull-spec generation, supports catalog cleanup during simultaneous add/remove, and skips duplicate Git synchronization for containerized requests. Related-image extraction now uses unprivileged OC commands.

iib/workers/tasks/build.py

build_add_deprecations.pyForward architecture compatibility configuration +5/-1

Forward architecture compatibility configuration

• Allows deprecation requests to use explicitly permitted binary images with reduced architecture coverage.

iib/workers/tasks/build_add_deprecations.py

build_containerized_add.pyAdd the containerized bundle-add workflow +379/-0

Add the containerized bundle-add workflow

• Coordinates bundle resolution, database and FBC updates, GitLab MRs, Konflux builds, image replication, artifact publication, deprecation cleanup, and failure recovery.

iib/workers/tasks/build_containerized_add.py

build_containerized_create_empty_index.pyAdd the containerized empty-index workflow +384/-0

Add the containerized empty-index workflow

• Builds empty catalogs through Git and Konflux, using a shared empty database artifact when available and a remove-all fallback otherwise.

iib/workers/tasks/build_containerized_create_empty_index.py

build_containerized_fbc_operations.pyAdd containerized FBC fragment operations +282/-0

Add containerized FBC fragment operations

• Applies one or more FBC fragments to Git-backed catalogs and delegates image construction to Konflux.

iib/workers/tasks/build_containerized_fbc_operations.py

build_containerized_merge.pyAdd the containerized index merge workflow +414/-0

Add the containerized index merge workflow

• Merges source and target databases, validates bundles concurrently, applies deprecations, updates Git catalog content, and publishes through Konflux.

iib/workers/tasks/build_containerized_merge.py

build_containerized_regenerate_bundle.pyAdd containerized bundle regeneration +279/-0

Add containerized bundle regeneration

• Extracts and rewrites bundle manifests, commits build inputs to Git, runs Konflux, and publishes the regenerated image.

iib/workers/tasks/build_containerized_regenerate_bundle.py

build_containerized_rm.pyAdd the containerized operator removal workflow +340/-0

Add the containerized operator removal workflow

• Removes operators from Git and index.db, validates the resulting catalog, builds through Konflux, and synchronizes outputs atomically.

iib/workers/tasks/build_containerized_rm.py

build_recursive_related_bundles.pyUse unprivileged bundle extraction +3/-13

Use unprivileged bundle extraction

• Replaces local Podman-based manifest and metadata copying with OC image extraction.

iib/workers/tasks/build_recursive_related_bundles.py

containerized_utils.pyAdd shared containerized workflow orchestration +1004/-0

Add shared containerized workflow orchestration

• Introduces safe image extraction, divergent source selection, parallel validation, Git/MR lifecycle management, Konflux monitoring, image replication, and content-addressed database artifact operations.

iib/workers/tasks/containerized_utils.py

git_utils.pyExtend Git and merge-request lifecycle support +208/-55

Extend Git and merge-request lifecycle support

• Supports simultaneous catalog additions and removals, exact authenticated branch checks, environment-prefixed MRs, and retryable GitLab merges.

iib/workers/tasks/git_utils.py

konflux_utils.pyImprove Konflux pipeline discovery and results +66/-3

Improve Konflux pipeline discovery and results

• Retries delayed PipelineRun discovery, returns completed run data, and extracts IMAGE_URL from current or legacy Tekton results.

iib/workers/tasks/konflux_utils.py

opm_operations.pySupport database-first containerized OPM operations +146/-22

Support database-first containerized OPM operations

• Separates database deprecation from FBC generation and adds multi-fragment catalog replacement using an existing index database.

iib/workers/tasks/opm_operations.py

oras_utils.pyMake index database artifacts content-addressed +239/-30

Make index database artifacts content-addressed

• Keys artifacts and ImageStream entries by image digest, supports dedicated ORAS credentials, and distinguishes missing artifacts from registry failures. Pushes now use relative paths and configurable working directories.

iib/workers/tasks/oras_utils.py

Bug fix (3) +336 / -23
fbc_utils.pyHarden FBC extraction and YAML conversion +136/-13

Harden FBC extraction and YAML conversion

• Uses unprivileged OC extraction and isolated fragment directories. YAML conversion now supports yml files, ignores empty documents, and rejects empty, malformed, or conflicting inputs.

iib/workers/tasks/fbc_utils.py

general.pyReset registry configuration after task failures +3/-4

Reset registry configuration after task failures

• Replaces legacy build cleanup with focused Docker authentication reset in failure callbacks.

iib/workers/tasks/general.py

utils.pyHarden deprecation and artifact utilities +197/-6

Harden deprecation and artifact utilities

• Safely derives and removes deprecated package directories, distinguishes ORAS 404 responses, and supports approved reduced-architecture builds. It also adds a temporary-directory context helper.

iib/workers/tasks/utils.py

Refactor (4) +89 / -36
build_create_empty_index.pyRetain legacy empty-index helper without task routing +8/-3

Retain legacy empty-index helper without task routing

• Removes active Celery registration and forwards reduced-architecture compatibility configuration.

iib/workers/tasks/build_create_empty_index.py

build_fbc_operations.pyDisable legacy FBC task registration +3/-2

Disable legacy FBC task registration

• Keeps the legacy implementation available as a helper while routing requests to its containerized replacement.

iib/workers/tasks/build_fbc_operations.py

build_merge_index_image.pyExtract reusable merge selection logic +75/-29

Extract reusable merge selection logic

• Separates missing and invalid bundle calculation from local image construction for reuse by the containerized merge handler.

iib/workers/tasks/build_merge_index_image.py

build_regenerate_bundle.pyDisable legacy regeneration task registration +3/-2

Disable legacy regeneration task registration

• Keeps reusable bundle transformation helpers while routing active requests to the containerized handler.

iib/workers/tasks/build_regenerate_bundle.py

Tests (20) +10632 / -295
test_api_v1.pyUpdate API tests for containerized task routing +97/-93

Update API tests for containerized task routing

• Validates new task arguments, mandatory add sources, queue behavior, redaction, batches, and all containerized endpoint dispatch paths.

tests/test_web/test_api_v1.py

test_broker_error.pyUpdate broker failure tests for new handlers +9/-14

Update broker failure tests for new handlers

• Verifies containerized task dispatch failures still transition individual and batch requests to failed states.

tests/test_web/test_broker_error.py

test_config.pyTest artifact and Konflux configuration validation +141/-1

Test artifact and Konflux configuration validation

• Covers required artifact registries, environment-name constraints, digest placeholders, and OCI tag length limits.

tests/test_workers/test_config.py

test_build.pyTest shared build compatibility changes +197/-11

Test shared build compatibility changes

• Covers output pull specs, OCI signature removal, simultaneous deprecation cleanup, and unprivileged related-image extraction.

tests/test_workers/test_tasks/test_build.py

test_build_containerized_add.pyTest containerized add orchestration +722/-0

Test containerized add orchestration

• Covers successful, failed, overwrite, and divergent-tag add workflows and their cleanup behavior.

tests/test_workers/test_tasks/test_build_containerized_add.py

test_build_containerized_create_empty_index.pyTest containerized empty-index orchestration +731/-0

Test containerized empty-index orchestration

• Covers prebuilt artifact use, database fallback, pipeline failures, missing mappings, and OPM errors.

tests/test_workers/test_tasks/test_build_containerized_create_empty_index.py

test_build_containerized_fbc_operations.pyTest containerized FBC operations +644/-0

Test containerized FBC operations

• Covers single and multiple fragments, overwrite behavior, failures, and divergent-tag MR handling.

tests/test_workers/test_tasks/test_build_containerized_fbc_operations.py

test_build_containerized_merge.pyTest containerized index merging +2729/-0

Test containerized index merging

• Provides extensive coverage for deprecations, invalid bundles, optional targets, build tags, MR modes, and failure cleanup.

tests/test_workers/test_tasks/test_build_containerized_merge.py

test_build_containerized_regenerate_bundle.pyTest containerized bundle regeneration +464/-0

Test containerized bundle regeneration

• Covers successful builds, cleanup failures, missing architectures or repositories, and output registry replacement.

tests/test_workers/test_tasks/test_build_containerized_regenerate_bundle.py

test_build_containerized_rm.pyTest containerized operator removal +1622/-0

Test containerized operator removal

• Covers overwrite and throw-away flows, conditional database mutation, missing inputs, pipeline errors, tags, and divergent sources.

tests/test_workers/test_tasks/test_build_containerized_rm.py

test_build_merge_index_image.pyUpdate legacy merge helper tests +8/-4

Update legacy merge helper tests

• Adapts coverage to the extracted missing-bundle calculation used by containerized merges.

tests/test_workers/test_tasks/test_build_merge_index_image.py

test_build_recursive_related_bundles.pyUpdate recursive bundle extraction tests +8/-13

Update recursive bundle extraction tests

• Verifies recursive bundle processing through the unprivileged extraction helper.

tests/test_workers/test_tasks/test_build_recursive_related_bundles.py

test_containerized_utils.pyTest shared containerized workflow utilities +1622/-0

Test shared containerized workflow utilities

• Extensively covers artifact caching, safe extraction, symlink rejection, parallel validation, Git cleanup, MR lifecycle, and divergent source selection.

tests/test_workers/test_tasks/test_containerized_utils.py

test_fbc_utils.pyTest hardened FBC utilities +267/-24

Test hardened FBC utilities

• Covers unprivileged extraction, fragment isolation, empty YAML documents, malformed input, yml support, and output collisions.

tests/test_workers/test_tasks/test_fbc_utils.py

test_general.pyUpdate failure callback cleanup tests +3/-3

Update failure callback cleanup tests

• Verifies failed tasks reset Docker authentication state instead of invoking legacy cleanup.

tests/test_workers/test_tasks/test_general.py

test_git_utils.pyTest enhanced Git and MR operations +328/-66

Test enhanced Git and MR operations

• Covers add-and-remove synchronization, commit detection, branch lookup, environment-prefixed MRs, and retryable merges.

tests/test_workers/test_tasks/test_git_utils.py

test_konflux_utils.pyTest Konflux retries and image result parsing +119/-8

Test Konflux retries and image result parsing

• Covers delayed PipelineRuns, completed run returns, IMAGE_URL formats, whitespace, and missing-result errors.

tests/test_workers/test_tasks/test_konflux_utils.py

test_opm_operations.pyTest containerized FBC fragment operations +88/-3

Test containerized FBC fragment operations

• Validates fragment extraction, conflict removal, database updates, and catalog replacement behavior.

tests/test_workers/test_tasks/test_opm_operations.py

test_oras_utils.pyTest content-addressed ORAS behavior +471/-53

Test content-addressed ORAS behavior

• Covers digest keys, pull-spec parsing, dedicated authentication, relative pushes, cache synchronization, and missing-artifact classification.

tests/test_workers/test_tasks/test_oras_utils.py

test_utils.pyTest safe cleanup and artifact error handling +362/-2

Test safe cleanup and artifact error handling

• Covers ORAS error classification, package path validation, deprecation cleanup, reduced architecture selection, and directory restoration.

tests/test_workers/test_tasks/test_utils.py

Documentation (17) +1313 / -1
SKILL.mdDocument database migration workflow +57/-0

Document database migration workflow

• Provides agent instructions for safely creating and validating Alembic migrations.

.agents/skills/creating-db-migration/SKILL.md

SKILL.mdDocument request failure debugging +164/-0

Document request failure debugging

• Adds a structured troubleshooting workflow for API, broker, worker, and external-service failures.

.agents/skills/debugging-request-failures/SKILL.md

endpoint-parameters.mdReference endpoint request parameters +72/-0

Reference endpoint request parameters

• Documents endpoint-specific parameters used while diagnosing request failures.

.agents/skills/debugging-request-failures/references/endpoint-parameters.md

SKILL.mdDocument change validation practices +121/-0

Document change validation practices

• Defines repository-specific linting, testing, and runtime verification guidance.

.agents/skills/validating-changes/SKILL.md

SKILL.mdDocument worker task implementation patterns +95/-0

Document worker task implementation patterns

• Describes conventions and lifecycle requirements for IIB Celery request handlers.

.agents/skills/worker-task-handler/SKILL.md

SKILL.mdDocument IIB testing conventions +168/-0

Document IIB testing conventions

• Provides guidance for fixtures, mocks, targeted tests, and validation commands.

.agents/skills/writing-tests/SKILL.md

bug_report.mdAdd bug report template +27/-0

Add bug report template

• Introduces a structured template for reporting reproducible defects.

.github/ISSUE_TEMPLATE/bug_report.md

feature_request.mdAdd feature request template +19/-0

Add feature request template

• Introduces a structured template for enhancement proposals.

.github/ISSUE_TEMPLATE/feature_request.md

PULL_REQUEST_TEMPLATE.mdAdd pull request template +21/-0

Add pull request template

• Adds standard sections for change descriptions, testing, and reviewer context.

.github/PULL_REQUEST_TEMPLATE.md

AGENTS.mdAdd concise repository guidance for agents +60/-0

Add concise repository guidance for agents

• Summarizes architecture, commands, design constraints, key modules, and workflow pitfalls.

AGENTS.md

CHANGELOG.mdDocument the 9.5.3 release +5/-0

Document the 9.5.3 release

• Adds release notes for version 9.5.3.

CHANGELOG.md

CLAUDE.mdPoint Claude to repository guidance +1/-0

Point Claude to repository guidance

• Adds a reference to the canonical AGENTS.md instructions.

CLAUDE.md

README.mdDocument containerized builds and new configuration +72/-1

Document containerized builds and new configuration

• Explains the split image architecture, agent skills, static checks, artifact settings, and Konflux environment naming.

README.md

SECURITY.mdAdd vulnerability disclosure policy +41/-0

Add vulnerability disclosure policy

• Documents private reporting channels, expected response times, submission details, and stewardship information.

SECURITY.md

README.mdDocument the containerized Konflux workflow +315/-0

Document the containerized Konflux workflow

• Provides setup, architecture, troubleshooting, divergent-tag, and content-addressed artifact guidance.

docker/containerized/README.md

konflux-ca.crt.exampleAdd example Konflux CA file +3/-0

Add example Konflux CA file

• Documents where developers should place the external cluster CA certificate.

docker/containerized/konflux-ca.crt.example

iib.workers.tasks.rstExpose containerized task modules in API docs +72/-0

Expose containerized task modules in API docs

• Adds Sphinx entries for containerized handlers and their Git, Konflux, ORAS, and shared utilities.

docs/module_documentation/iib.workers.tasks.rst

Other (37) +1104 / -179
.agentready-config.yamlConfigure repository readiness assessment exclusions +20/-0

Configure repository readiness assessment exclusions

• Defines AgentReady exclusions for inapplicable checks and documented false positives.

.agentready/config/.agentready-config.yaml

setup-skills.shAdd agent skill symlink setup script +35/-0

Add agent skill symlink setup script

• Adds automation for exposing repository skills to supported coding assistants.

.agents/setup-skills.sh

creating-db-migrationExpose database migration skill to Claude +1/-0

Expose database migration skill to Claude

• Adds the Claude skill link for database migration guidance.

.claude/skills/creating-db-migration

debugging-request-failuresExpose request debugging skill to Claude +1/-0

Expose request debugging skill to Claude

• Adds the Claude skill link for request failure troubleshooting.

.claude/skills/debugging-request-failures

validating-changesExpose validation skill to Claude +1/-0

Expose validation skill to Claude

• Adds the Claude skill link for repository change validation.

.claude/skills/validating-changes

worker-task-handlerExpose worker task skill to Claude +1/-0

Expose worker task skill to Claude

• Adds the Claude skill link for worker handler development.

.claude/skills/worker-task-handler

writing-testsExpose testing skill to Claude +1/-0

Expose testing skill to Claude

• Adds the Claude skill link for test authoring guidance.

.claude/skills/writing-tests

.env.containerized.templateAdd containerized worker environment template +94/-0

Add containerized worker environment template

• Documents required Konflux, GitLab, registry, artifact, logging, and retry environment variables.

.env.containerized.template

.flake8Align lint rules with new workflow code +5/-3

Align lint rules with new workflow code

• Updates per-file exceptions and standardizes the maximum line length and docstring ignores.

.flake8

config.yamlAllow remote agent resources +3/-0

Allow remote agent resources

• Allows runtime resources from the fullsend and agents GitHub repositories.

.fullsend/config.yaml

agentready.yamlAdd AgentReady pull request assessment +27/-0

Add AgentReady pull request assessment

• Runs the pinned AgentReady assessment against pull requests targeting main.

.github/workflows/agentready.yaml

build.ymlPin release build actions +10/-5

Pin release build actions

• Pins checkout, tag lookup, and Buildah actions to immutable revisions.

.github/workflows/build.yml

build_base_image.ymlAdd reusable base image build workflow +56/-0

Add reusable base image build workflow

• Builds and publishes the shared worker tooling image to Quay, manually or from another workflow.

.github/workflows/build_base_image.yml

build_on_main.ymlBuild application images after main merges +119/-0

Build application images after main merges

• Adds coordinated API, worker, and conditional base-image builds for every push to main.

.github/workflows/build_on_main.yml

build_on_tag.api.ymlPin tagged API build actions +4/-2

Pin tagged API build actions

• Uses immutable revisions for checkout and Buildah during tagged API builds.

.github/workflows/build_on_tag.api.yml

check_agents_md.ymlEnforce AGENTS.md size limit +27/-0

Enforce AGENTS.md size limit

• Adds CI validation that repository agent guidance remains at most 60 lines.

.github/workflows/check_agents_md.yml

fullsend.yamlPin Fullsend reusable workflow +2/-1

Pin Fullsend reusable workflow

• Replaces the floating Fullsend version with an immutable commit.

.github/workflows/fullsend.yaml

run_tox.ymlRun tests on main with pinned actions +5/-2

Run tests on main with pinned actions

• Adds main branch coverage and pins Python setup and checkout actions.

.github/workflows/run_tox.yml

.hadolint.yamlConfigure Dockerfile linting +17/-0

Configure Dockerfile linting

• Defines UBI-compatible Hadolint exceptions and trusted registries.

.hadolint.yaml

.pre-commit-config.yamlAdd local pre-commit checks +19/-0

Add local pre-commit checks

• Configures Black, Flake8, and conventional commit validation.

.pre-commit-config.yaml

MakefileBuild the worker base image first +2/-1

Build the worker base image first

• Orders local builds so the shared base image exists before application images are built.

Makefile

docker-compose.ymlWire the local worker base image +11/-1

Wire the local worker base image

• Adds a build-only base-image service and passes it into the worker build.

compose-files/docker-compose.yml

podman-compose.ymlWire the Podman worker base image +11/-1

Wire the Podman worker base image

• Adds a build-only base-image service and passes it into the worker build.

compose-files/podman-compose.yml

Dockerfile-apiMove the API image to UBI 9 +5/-5

Move the API image to UBI 9

• Upgrades the base OS and configures Python 3.12 alternatives for UBI 9.

docker/Dockerfile-api

Dockerfile-base-imageAdd shared worker tooling image +83/-0

Add shared worker tooling image

• Creates a UBI 9 tooling layer containing container tools, multiple verified OPM versions, ORAS, OC, and supporting binaries.

docker/Dockerfile-base-image

Dockerfile-workersBuild workers from the shared tooling image +20/-44

Build workers from the shared tooling image

• Moves tooling into a configurable base image, prepares random-UID storage, and improves dependency-layer caching.

docker/Dockerfile-workers

konflux-ca.crtAdd local Konflux CA placeholder +0/-0

Add local Konflux CA placeholder

• Adds the expected certificate path for the containerized development environment.

docker/containerized/konflux-ca.crt

worker_config.pyAdd containerized worker configuration +124/-0

Add containerized worker configuration

• Loads Konflux, GitLab, registry, artifact, and retry settings from the environment and validates required values.

docker/containerized/worker_config.py

DockerfileMove the broker image to UBI 9 +2/-2

Move the broker image to UBI 9

• Upgrades the base image and cleans DNF caches after installation.

docker/message_broker/Dockerfile

requirements.txtUpdate documentation dependencies +2/-1

Update documentation dependencies

• Adds Kubernetes API documentation support and pins Sphinx 8.2.3.

docs/requirements.txt

config.pyAdd containerized API settings +2/-0

Add containerized API settings

• Adds configuration for reduced-architecture binary images and the bundle regeneration repository key.

iib/web/config.py

config.pyConfigure containerized builds and artifacts +120/-0

Configure containerized builds and artifacts

• Registers containerized tasks, OPM mappings, artifact/cache settings, and environment-aware MR branches. Startup validation now enforces digest-based artifact tags and valid Konflux environment names.

iib/workers/config.py

podman-compose-containerized.ymlAdd a complete containerized development stack +160/-0

Add a complete containerized development stack

• Defines API, worker, databases, brokers, local TLS registry, certificates, and Konflux-oriented mounts and configuration.

podman-compose-containerized.yml

requirements-test.txtApply test dependency security upgrades +50/-53

Apply test dependency security upgrades

• Updates cryptography to 50.0.0 and setuptools to 83.0.0 with refreshed hashes.

requirements-test.txt

requirements.txtUpgrade cryptography to version 50 +47/-50

Upgrade cryptography to version 50

• Applies the security update and refreshes locked package hashes.

requirements.txt

setup.pyRelease IIB 9.5.3 +1/-1

Release IIB 9.5.3

• Bumps the package version from 9.5.2 to 9.5.3.

setup.py

tox.iniExpand supported test and lint environments +16/-7

Expand supported test and lint environments

• Adds Python 3.13 and Hadolint environments, updates Flake8, and includes Dockerfile linting in static checks.

tox.ini

@qodo-for-releng

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (15) 📘 Rule violations (0) 📜 Skill insights (0)

⚠️ 18 lower-priority findings omitted to fit the comment size limit; re-run the review or view the findings in the Qodo portal.

Grey Divider


Action required

1. Successful builds can fail cleanup 🐞 Bug ☼ Reliability
Description
The merge, catalog-operation, and empty-index handlers run containerized OPM commands inside
TemporaryDirectory but never restore write permissions as the add handler does. When Podman
creates non-writable files, context cleanup raises PermissionError after build side effects have
occurred, affecting all three workflows.
Code

iib/workers/tasks/build_containerized_merge.py[163]

+    with tempfile.TemporaryDirectory(prefix=f'iib-{request_id}-') as temp_dir:
Relevance

●●● Strong

Same Podman permission hazard is handled in the add workflow but omitted from three equivalent
temporary-directory workflows.

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
The add workflow explicitly documents that Podman-created OPM files may be non-writable and calls
chmod_recursively to prevent context-manager cleanup failure. The merge, FBC-operation, and
empty-index workflows invoke the same class of containerized OPM operations inside temporary
directories but omit that normalization before those contexts exit.

iib/workers/tasks/build_containerized_add.py[261-268]
iib/workers/tasks/build_containerized_merge.py[163-311]
iib/workers/tasks/build_containerized_fbc_operations.py[132-182]
iib/workers/tasks/build_containerized_create_empty_index.py[179-265]
iib/workers/tasks/opm_operations.py[744-789]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
Containerized OPM commands can leave non-writable files in temporary build directories, causing successful merge, FBC-operation, and empty-index tasks to fail when `TemporaryDirectory` removes their contents.

## Fix Focus Areas
- iib/workers/tasks/build_containerized_merge.py[163-414]
- iib/workers/tasks/build_containerized_fbc_operations.py[132-282]
- iib/workers/tasks/build_containerized_create_empty_index.py[179-381]

## Recommended Fix
Ensure each temporary-directory body normalizes file and directory permissions with `chmod_recursively` before cleanup. Place that normalization in a `finally` path so it also runs when an OPM operation or later build step raises, following the permission modes used by the containerized add workflow.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


2. Catalog updates cannot be committed 🐞 Bug ☼ Reliability
Description
push_configs_to_git and revert_last_commit no longer configure a repository-local Git identity
before commit_and_push invokes git commit. The worker image writes Git's global identity as root
but sets runtime HOME to /home/iib-worker, so normal OpenShift worker commits cannot find that
root-owned configuration and fail when a catalog update or merge-request branch has changes.
Code

iib/workers/tasks/git_utils.py[L77-79]

-            # Configure Git user for commits
-            configure_git_user(local_repo_dir)
-
Relevance

●●● Strong

Removing local Git identity setup can deterministically break commits under the worker runtime HOME.

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
The changed helper now commits without a local identity setup. The runtime image explicitly changes
HOME after root writes the global configuration, so Git's per-user configuration lookup no longer
reaches the configured file.

iib/workers/tasks/git_utils.py[76-80]
iib/workers/tasks/git_utils.py[243-250]
iib/workers/tasks/git_utils.py[439-446]
docker/Dockerfile-workers[10-17]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

Issue description
`configure_git_user()` was removed after cloning repositories, but `commit_and_push()` still creates commits. The Docker build configures root's global Git config while the runtime HOME is `/home/iib-worker`, leaving runtime commits without an author identity.

Fix Focus Areas
- iib/workers/tasks/git_utils.py[76-80]
- iib/workers/tasks/git_utils.py[243-250]

Recommended Fix
Restore repository-local `user.name` and `user.email` configuration immediately after each clone that can create a commit, or configure an identity in a runtime-visible system Git config. Keep the identity setup before both direct catalog commits and merge-request commits.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


3. Requested platforms are skipped 🐞 Bug ≡ Correctness
Description
prepare_request_for_build only rejects an unavailable architecture when
binary_image_less_arches_allowed_versions is truthy, then replaces the requested set with its
supported intersection in every other case. All containerized task entry points default that
parameter to None, so requests without an explicit allow-list now build only a subset of their
requested platforms instead of retaining the previous unsupported-platform error.
Code

iib/workers/tasks/utils.py[R1432-1435]

+        if build_request_config.binary_image_less_arches_allowed_versions:
+            if binary_image not in build_request_config.binary_image_less_arches_allowed_versions:
+                raise IIBError(
+                    'The binary image is not available for the following arches: {}'.format(
Relevance

●●● Strong

Optional allow-list logic silently filters requested platforms instead of preserving
unsupported-platform errors.

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
Request configuration initializes unspecified attributes to None, and containerized tasks expose
the new allow-list as an optional parameter defaulting to None. The new truthiness check
consequently skips the rejection and assigns the filtered architecture set used by the build
workflow.

iib/workers/tasks/utils.py[239-250]
iib/workers/tasks/utils.py[1429-1451]
iib/workers/tasks/build_containerized_add.py[66-82]
iib/workers/tasks/build_containerized_add.py[131-147]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

Issue description
An absent or empty `binary_image_less_arches_allowed_versions` currently bypasses the allow-list check and permits a partial-platform build. The parameter defaults to `None` in task entry points, making partial output the default whenever the selected binary image lacks one requested platform.

Fix Focus Areas
- iib/workers/tasks/utils.py[1429-1451]
- iib/workers/tasks/build_containerized_add.py[66-82]

Recommended Fix
Treat a missing or empty allow-list as disallowing reduced-platform builds. Only filter `arches` to the supported intersection when the selected `binary_image` is explicitly present in a non-empty allow-list; otherwise raise the existing unavailable-architectures error.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


View high (12)
4. Main branch checks fail on Hadolint 🐞 Bug ☼ Reliability
Description
The new hadolint tox command treats warnings as failures, while the added configuration neither
ignores DL3007 nor trusts Quay. The scanned API and message-broker Dockerfiles use :latest, and
the worker Dockerfile additionally uses the untrusted quay.io base image, so every tox run
including the new environment fails.
Code

tox.ini[118]

+    hadolint --failure-threshold warning docker/Dockerfile-api docker/Dockerfile-workers docker/message_broker/Dockerfile
Relevance

●●● Strong

Hadolint violations make the new warning-level check fail; matching lint integration was accepted in
PR 1374.

PR-#1374

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
hadolint is added to the default tox environment and fails at warning level. The configuration
leaves DL3007 enabled and accepts only the two Red Hat registries, while the scanned Dockerfiles
contain the cited floating tags and Quay base reference.

tox.ini[4-8]
tox.ini[112-118]
.hadolint.yaml[3-17]
docker/Dockerfile-api[1-1]
docker/Dockerfile-workers[4-5]
docker/message_broker/Dockerfile[1-2]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
The newly mandatory Hadolint invocation fails on existing Dockerfile constructs: `:latest` tags and the worker base image hosted on Quay.

## Fix Focus Areas
- tox.ini[112-118]
- .hadolint.yaml[3-17]
- docker/Dockerfile-api[1-1]
- docker/Dockerfile-workers[4-5]
- docker/message_broker/Dockerfile[2-2]

## Recommended Fix
Either make the Dockerfiles comply by pinning their base images to immutable tags or digests and allowlisting the required Quay registry, or explicitly ignore the applicable rules in `.hadolint.yaml` if floating tags are intentional. Keep the warning failure threshold only once all scanned Dockerfiles satisfy the selected policy.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


5. Containerized workers reject the template 🐞 Bug ≡ Correctness
Description
.env.containerized.template and the documented containerized setup omit IIB_ENVIRONMENT_NAME,
although ContainerizedConfig.validate() unconditionally requires a non-empty
iib_environment_name during worker-configuration import. A developer who creates
.env.containerized from the supplied instructions and fills every documented Konflux setting
reaches a ValueError before Celery starts.
Code

.env.containerized.template[R26-30]

+# Namespace where Konflux pipelines run
+IIB_KONFLUX_NAMESPACE=
+
+# Pipeline timeout in seconds (default: 1800 = 30 minutes)
+IIB_KONFLUX_PIPELINE_TIMEOUT=1800
Relevance

●●● Strong

The supplied environment template omits a mandatory configuration value, preventing documented
containerized worker startup.

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
The worker compose service loads .env.containerized and uses the mounted worker configuration,
which reads IIB_ENVIRONMENT_NAME, includes it among its mandatory fields, and validates it during
module import. The template and documented example provide the other Konflux settings—cluster URL,
token, CA path, namespace, and timeout—but no environment-name entry, directly leaving the required
value absent when Celery loads its configuration.

.env.containerized.template[6-30]
docker/containerized/worker_config.py[21-29]
docker/containerized/worker_config.py[99-117]
docker/containerized/README.md[90-130]
docker/containerized/worker_config.py[22-29]
.env.containerized.template[10-30]
podman-compose-containerized.yml[106-135]
podman-compose-containerized.yml[106-113]
.env.containerized.template[8-30]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
The containerized environment template and setup documentation do not define `IIB_ENVIRONMENT_NAME`, but the mounted worker configuration requires it at import time, so a user following the supplied setup cannot start the worker.

## Fix Focus Areas
- .env.containerized.template[6-30]
- docker/containerized/README.md[99-116]
- docker/containerized/worker_config.py[99-117]

## Recommended Fix
Add a documented `IIB_ENVIRONMENT_NAME=` entry near the other Konflux settings in `.env.containerized.template`, including a matching comment that explains its purpose and valid format and gives an example value such as `qe`. Update the containerized setup documentation and Konflux configuration example to tell users to set it before starting the worker, while retaining the import-time validation so omitted explicit configuration continues to fail clearly.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


6. Konflux API calls reject the CA 🐞 Bug ≡ Correctness
Description
ContainerizedConfig and the environment template set iib_konflux_cluster_ca_cert to
/etc/iib/konflux-ca.crt, while the compose service mounts konflux-ca.crt at
/tmp/host-ca-chain.crt. Without a custom override, pipeline monitoring makes
_create_kubernetes_configuration() treat the nonexistent path as inline PEM content and write the
literal path to a temporary certificate file, so all documented cross-cluster Konflux API requests
use an invalid CA bundle.
Code

podman-compose-containerized.yml[R134-135]

+      # Mount Konflux CA chain for GitLab SSL verification
+      - ./docker/containerized/konflux-ca.crt:/tmp/host-ca-chain.crt:ro
Relevance

●●● Strong

Configured and mounted CA paths differ, causing invalid Kubernetes TLS verification.

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
The worker default, environment template, and documentation identify /etc/iib/konflux-ca.crt as
the in-container CA path, but the compose volume binds the copied certificate to
/tmp/host-ca-chain.crt. The Kubernetes configuration helper only treats the configured value as a
filename when that file exists; otherwise, it interprets the value as inline certificate content,
writes the literal pathname to a temporary file, and assigns that invalid file to ssl_ca_cert.

podman-compose-containerized.yml[106-110]
podman-compose-containerized.yml[128-135]
.env.containerized.template[21-24]
docker/containerized/worker_config.py[22-26]
iib/workers/tasks/konflux_utils.py[87-112]
iib/workers/tasks/konflux_utils.py[102-112]
docker/containerized/README.md[99-124]
docker/containerized/worker_config.py[22-27]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
The containerized worker’s configured and documented Konflux CA path differs from the path where compose mounts the certificate, causing Kubernetes client TLS setup to receive a nonexistent filename and use a temporary file containing that pathname instead of the certificate.

## Fix Focus Areas
- podman-compose-containerized.yml[106-110]
- podman-compose-containerized.yml[128-135]
- .env.containerized.template[21-24]
- docker/containerized/worker_config.py[22-26]
- docker/containerized/README.md[99-124]

## Recommended Fix
Use one consistent certificate path across the worker default, environment template, documentation, certificate-copy instructions, and compose volume mount. Prefer mounting `./docker/containerized/konflux-ca.crt` at `/etc/iib/konflux-ca.crt:ro` to match the existing documented and configured value, or consistently change those values to `/tmp/host-ca-chain.crt`; also ensure any `REQUESTS_CA_BUNDLE` and `GIT_SSL_CAINFO` values refer to files that actually exist inside the container.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


7. The local registry exits before startup 🐞 Bug ☼ Reliability
Description
The registry service is configured to load TLS files generated by minica, but it has no
dependency or readiness wait for the certificate generator. On a new containerized stack, registry
startup can occur before minica finishes downloading and running, so its configured certificate
and key paths do not yet exist and the registry terminates.
Code

podman-compose-containerized.yml[R25-35]

+    environment:
+      REGISTRY_HTTP_ADDR: 0.0.0.0:8443
+      REGISTRY_HTTP_TLS_CERTIFICATE: /certs/registry/cert.pem
+      REGISTRY_HTTP_TLS_KEY: /certs/registry/key.pem
+      REGISTRY_AUTH: htpasswd
+      REGISTRY_AUTH_HTPASSWD_PATH: /auth/htpasswd
+      REGISTRY_AUTH_HTPASSWD_REALM: Registry Realm
+    volumes:
+      - ./iib_data/registry:/var/lib/registry
+      - registry-certs-volume:/certs:z
+      - ./docker/registry/auth:/auth
Relevance

●●● Strong

Missing certificate-generation ordering can terminate registry during fresh stack startup.

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
minica creates the certificate asynchronously in the shared volume only after installing and
executing its generator. The registry uses that volume immediately for its TLS certificate and key,
but the new configuration declares no dependency from registry to minica; the worker dependency does
not order registry startup behind certificate generation.

podman-compose-containerized.yml[6-19]
podman-compose-containerized.yml[21-35]
podman-compose-containerized.yml[136-140]
docker/containerized/README.md[139-155]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
The TLS-enabled local registry can start before the separate `minica` service has populated the shared certificate volume.

## Fix Focus Areas
- podman-compose-containerized.yml[6-19]
- podman-compose-containerized.yml[21-35]
- podman-compose-containerized.yml[136-140]

## Recommended Fix
Make the registry wait for successful completion of certificate generation before starting, using a compose-supported completion dependency where available or a registry entrypoint wrapper that waits for both certificate files. Ensure the worker also depends on the registry being usable rather than merely started.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


8. Adds from scratch are rejected 🐞 Bug ≡ Correctness
Description
add_bundles now rejects every payload without from_index before RequestAdd.from_json() applies
its established source-or-architectures validation. Clients that supply bundles with add_arches
but intentionally omit a source index now receive a 400 response, while batch requests still accept
this request shape and the prior handler supported it.
Code

iib/web/api_v1.py[R602-603]

+    if not payload.get('from_index'):
+        raise ValidationError('The input "from_index" is required.')
Relevance

●●● Strong

Clear API regression: endpoint rejects add_arches-only requests accepted by the established request
model and batch endpoint.

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
The new endpoint-level check is stricter than the request model and is inconsistent with the batch
endpoint. The legacy worker accepts this flow through its add_arches path, so this changes an
accepted API request into an immediate validation failure.

iib/web/api_v1.py[598-610]
iib/web/models.py[1002-1004]
iib/web/models.py[1177-1180]
iib/web/api_v1.py[1023-1035]
iib/workers/tasks/build_containerized_add.py[66-96]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
The single add endpoint newly requires `from_index`, which rejects valid requests that provide `bundles` and `add_arches` to create an index without a source image.

## Fix Focus Areas
- iib/web/api_v1.py[602-603]

## Recommended Fix
Remove the unconditional `from_index` check and rely on `RequestAdd.from_json()` validation, which permits a request when either `from_index` or `add_arches` is supplied.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


9. Empty indexes ignore output format 🐞 Bug ≡ Correctness
Description
The create-empty-index dispatch removes payload.get('output_fbc'), and
handle_containerized_create_empty_index_request has no corresponding argument and unconditionally
clears and builds a Git FBC catalog. Requests using the default or explicitly false value therefore
follow the FBC path instead of the former SQLite path, while FBC source images no longer reach the
previous SQLite incompatibility check.
Code

iib/web/api_v1.py[1166]

-        payload.get('output_fbc'),
Relevance

●●● Strong

Dispatch drops a validated output_fbc option, changing established SQLite behavior and bypassing its
input compatibility validation.

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
The public API payload type and model validation still accept and validate output_fbc, but the new
dispatch does not pass it and the containerized handler signature cannot receive it. The retained
legacy implementation shows that False selected the SQLite removal/build path and rejected
incompatible FBC input, while True selected FBC-specific creation; the replacement handler always
performs FBC catalog operations before submitting the Konflux build.

iib/web/api_v1.py[1179-1193]
iib/web/iib_static_types.py[191-197]
iib/web/models.py[1935-1946]
iib/workers/tasks/build_containerized_create_empty_index.py[117-125]
iib/workers/tasks/build_containerized_create_empty_index.py[238-265]
iib/workers/tasks/build_create_empty_index.py[82-115]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
The create-empty-index endpoint still accepts `output_fbc`, but dispatch no longer passes it and the containerized worker always creates an FBC catalog, silently changing the result for callers requesting the default or explicit SQLite output.

## Fix Focus Areas
- iib/workers/tasks/build_containerized_create_empty_index.py[117-125]
- iib/web/api_v1.py[1179-1193]

## Recommended Fix
Add an `output_fbc` parameter to the containerized task and propagate the payload value from the API dispatch. Implement the SQLite and FBC branches consistently with the legacy behavior, including rejecting incompatible FBC source images on the SQLite path; alternatively, if SQLite output is unsupported, reject that option during API validation before persisting and scheduling the request rather than silently producing an FBC image.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


10. Host files can enter the build database 🐞 Bug ⛨ Security
Description
extract_files_from_image_non_privileged() accepts a staged symlink because is_file() follows it
and shutil.copy2() copies its target rather than rejecting the link. A malicious index image whose
hidden database entry links to a worker-readable absolute path reaches divergent add, remove, and
FBC builds without the configs-only symlink validation.
Code

iib/workers/tasks/containerized_utils.py[R148-152]

+        extracted_file = file_staging / posixpath.basename(normalized)
+        if extracted_file.is_file():
+            dest = Path(dest_path)
+            dest.parent.mkdir(parents=True, exist_ok=True)
+            shutil.copy2(extracted_file, dest)
Relevance

●●● Strong

Following staged symlinks can copy unauthorized host files into build outputs.

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
The file-form path follows symlinks both while checking the staged entry and while copying it. The
subsequent hidden-database extraction has no equivalent validation, while only the extracted configs
directory is checked for escaping symlinks; divergent build handlers consume that extracted database
directly.

iib/workers/tasks/containerized_utils.py[148-152]
iib/workers/tasks/containerized_utils.py[277-298]
iib/workers/tasks/build_containerized_add.py[176-185]
iib/workers/tasks/build_containerized_rm.py[150-159]
iib/workers/tasks/build_containerized_fbc_operations.py[147-156]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
The file extraction fallback follows symlinks when copying the hidden index database, allowing an image-controlled symlink to read a path from the worker filesystem.

## Fix Focus Areas
- iib/workers/tasks/containerized_utils.py[148-152]

## Recommended Fix
Reject a symlink at `extracted_file` before copying it, and require the hidden database extraction to produce a regular non-symlink file. Raise `IIBError` with the image path when the entry is a symlink rather than passing it to `copy2()`.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


11. Temporary builds leave merge requests open 🐞 Bug ☼ Reliability
Description
cleanup_merge_request_if_exists() catches an IIBError from close_mr() and returns normally.
Every throw-away containerized flow calls this helper immediately before marking its request
complete, so a GitLab close failure leaves the merge request and feature branch open while reporting
a successful build.
Code

iib/workers/tasks/containerized_utils.py[R969-974]

+    if mr_details and index_git_repo:
+        try:
+            close_mr(mr_details, index_git_repo)
+            log.info("Closed merge request: %s", mr_details.get('mr_url'))
+        except IIBError as e:
+            log.warning("Failed to close merge request: %s", e)
Relevance

●●● Strong

Suppressing close failures can falsely report success while leaving temporary merge requests open.

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
The helper explicitly suppresses the exception raised by failed GitLab closure. The add, remove, FBC
operation, and empty-index handlers invoke it directly before setting a successful terminal request
state.

iib/workers/tasks/containerized_utils.py[969-974]
iib/workers/tasks/git_utils.py[547-565]
iib/workers/tasks/git_utils.py[586-602]
iib/workers/tasks/build_containerized_add.py[356-367]
iib/workers/tasks/build_containerized_rm.py[312-325]
iib/workers/tasks/build_containerized_create_empty_index.py[361-369]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
Throw-away build flows complete successfully even when their merge request could not be closed.

## Fix Focus Areas
- iib/workers/tasks/containerized_utils.py[969-974]

## Recommended Fix
Do not suppress `IIBError` from `close_mr()` in the successful-flow helper. Let it reach the caller's failure path so the request is not marked complete and cleanup can be retried or surfaced as failed.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


12. Requested graph updates are omitted from merges 🐞 Bug ≡ Correctness
Description
handle_containerized_merge_request accepts graph_update_mode but calls _opm_registry_add
without passing it. Any merge that adds target-only bundles therefore uses the default graph
behavior instead of the mode submitted through the API, unlike the existing merge implementation.
Code

iib/workers/tasks/build_containerized_merge.py[R234-235]

+        if target_index_db_path:
+            _opm_registry_add(temp_dir, source_index_db_path, missing_bundle_paths)
Relevance

●●● Strong

The supplied graph update mode is ignored when adding target-only bundles, unlike the established
merge path.

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
The task signature exposes graph_update_mode, but the only missing-bundle mutation omits it.
_opm_registry_add explicitly supports this argument and adds --mode only when it is supplied;
the established non-containerized merge path forwards the same parameter to its add operation.

iib/workers/tasks/build_containerized_merge.py[66-82]
iib/workers/tasks/build_containerized_merge.py[234-235]
iib/workers/tasks/opm_operations.py[744-751]
iib/workers/tasks/opm_operations.py[786-792]
iib/workers/tasks/build_merge_index_image.py[239-260]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
The containerized merge handler accepts `graph_update_mode` but discards it when adding missing bundles to the SQLite catalog, so requested channel-graph behavior is not applied.

## Fix Focus Areas
- iib/workers/tasks/build_containerized_merge.py[234-235]

## Recommended Fix
Pass `graph_update_mode=graph_update_mode` to `_opm_registry_add`. Add or update a focused test that invokes the handler with a non-null graph update mode and asserts that `_opm_registry_add` receives it.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


13. Private target merges lose their registry access 🐞 Bug ☼ Reliability
Description
The target overwrite token context exits before `fetch_and_verify_index_db_artifact(target_index,
...)` resolves the target image digest and before bundle validation inspects target bundle
pullspecs. A merge whose target index or its bundles requires the supplied token fails during either
later registry access despite the request accepting that credential.
Code

iib/workers/tasks/build_containerized_merge.py[R180-182]

+        source_index_db_path = fetch_and_verify_index_db_artifact(source_from_index, temp_dir)
+        if target_index:
+            target_index_db_path = fetch_and_verify_index_db_artifact(target_index, temp_dir)
Relevance

●●● Strong

Registry credentials are restored before private target fetch and validation, making accepted
credentials ineffective for later operations.

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
set_registry_token restores the prior Docker configuration when its context exits. Fetching an
index.db artifact derives its reference by resolving the supplied index image with
get_image_digest, and validation directly performs skopeo_inspect; both operations currently
occur after the token context ends.

iib/workers/tasks/build_containerized_merge.py[180-213]
iib/workers/tasks/utils.py[734-753]
iib/workers/tasks/containerized_utils.py[822-846]
iib/workers/tasks/oras_utils.py[84-116]
iib/workers/tasks/utils.py[636-654]
iib/workers/tasks/containerized_utils.py[318-326]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
Registry access needed to resolve the target image for its index.db artifact happens after the scoped overwrite-token context has exited. Private target index images cannot be merged reliably with their supplied overwrite credential.

## Fix Focus Areas
- iib/workers/tasks/build_containerized_merge.py[180-182]
- iib/workers/tasks/build_containerized_merge.py[208-213]

## Recommended Fix
Wrap target artifact retrieval and subsequent bundle validation in an appropriate `set_registry_token` scope, using the target image reference. Keep the scope limited to operations that require the override credential, and add a test demonstrating that the credential context remains active while the target artifact digest is resolved.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


14. A moved tag can merge unreviewed catalog data 🐞 Bug ≡ Correctness
Description
fetch_and_verify_index_db_artifact receives the original source and target tag pullspecs instead
of source_from_index_resolved and target_index_resolved captured during prebuild. When either
mutable tag changes after prebuild, artifact lookup resolves the new digest while OPM selection and
merge validation continue to use the prior digest, so the workflow can combine inconsistent image
state or fail to find the expected artifact.
Code

iib/workers/tasks/build_containerized_merge.py[R180-182]

+        source_index_db_path = fetch_and_verify_index_db_artifact(source_from_index, temp_dir)
+        if target_index:
+            target_index_db_path = fetch_and_verify_index_db_artifact(target_index, temp_dir)
Relevance

●●● Strong

Re-resolving mutable tags after prebuild can combine artifact data from different image revisions.

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
The handler retains resolved image references specifically for build decisions, but artifact
pullspec construction resolves whichever reference it receives to a digest. Passing tags therefore
introduces a second, later resolution and allows artifact content to drift from the
prebuild-selected images.

iib/workers/tasks/build_containerized_merge.py[137-152]
iib/workers/tasks/build_containerized_merge.py[178-182]
iib/workers/tasks/oras_utils.py[84-116]
iib/workers/tasks/utils.py[636-654]
iib/workers/tasks/containerized_utils.py[680-683]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
The merge workflow resolves source and target images during prebuild, but retrieves their index.db artifacts using mutable tag pullspecs. A tag can move between those operations, causing the database artifact to represent different content from the already-resolved merge inputs.

## Fix Focus Areas
- iib/workers/tasks/build_containerized_merge.py[180-182]

## Recommended Fix
Call `fetch_and_verify_index_db_artifact` with `source_from_index_resolved` and, when present, `target_index_resolved`. Preserve unresolved pullspecs only where they are intentionally needed for mutable-tag operations such as Git branch selection or overwrite publication, and add a regression test covering distinct unresolved and resolved values.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


15. Overwritten images can lack Git updates 🐞 Bug ≡ Correctness
Description
handle_containerized_fbc_operation_request calls _update_index_image_pull_spec with
overwrite_from_index=True before it publishes the index database artifact or merges the merge
request. _update_index_image_pull_spec immediately copies the output image over from_index, so
an artifact publication or merge failure leaves that overwritten tag published while cleanup closes
the unmerged Git change and cannot roll back the image.
Code

iib/workers/tasks/build_containerized_fbc_operations.py[R219-222]

+            _update_index_image_pull_spec(
+                output_pull_spec=output_pull_spec,
+                request_id=request_id,
+                arches=arches,
Relevance

●●● Strong

Image overwrite occurs before artifact publication and merge completion, leaving irreversible
registry state after later failures.

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
The changed handler invokes the overwrite-capable request-update helper before artifact publication
and MR merging. The helper's implementation performs the registry copy during that call, while
failure cleanup only closes or reverts Git work and has no image rollback.

iib/workers/tasks/build_containerized_fbc_operations.py[219-263]
iib/workers/tasks/build.py[287-323]
iib/workers/tasks/build.py[506-578]
iib/workers/tasks/containerized_utils.py[594-644]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
The source index tag is overwritten before the required index database artifact is published and before the Git merge request is merged. A subsequent failure closes the merge request but leaves the new image at the source tag.

## Fix Focus Areas
- iib/workers/tasks/build_containerized_fbc_operations.py[219-247]
- iib/workers/tasks/build_containerized_fbc_operations.py[258-263]

## Recommended Fix
Reorder the overwrite flow so failure-prone artifact publication and Git publication complete before the irreversible source-tag overwrite. Keep the request's final pull-spec update consistent with that ordering, and ensure a failure cannot close the Git change after the source image has already been replaced.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


Grey Divider

Context sources
Review mode: 🧠 Deep: This is a highly cross-cutting import with 97 files, 335 hunks, substantial new production logic across containerized workers/utilities, configuration and workflows, plus extensive tests, creating many independent opportunities for subtle defects.

Grey Divider

Tip of the day
💡 Did you know, you can turn these tips off under Display preferences

More tips ↗ | Customize Qodo ↗ | Qodo docs ↗

Grey Divider

Qodo Logo

last_commit_sha: Optional[str] = None
output_pull_spec: Optional[str] = None

with tempfile.TemporaryDirectory(prefix=f'iib-{request_id}-') as temp_dir:

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Action required

1. Successful builds can fail cleanup 🐞 Bug ☼ Reliability

The merge, catalog-operation, and empty-index handlers run containerized OPM commands inside
TemporaryDirectory but never restore write permissions as the add handler does. When Podman
creates non-writable files, context cleanup raises PermissionError after build side effects have
occurred, affecting all three workflows.
Agent Prompt
## Issue description
Containerized OPM commands can leave non-writable files in temporary build directories, causing successful merge, FBC-operation, and empty-index tasks to fail when `TemporaryDirectory` removes their contents.

## Fix Focus Areas
- iib/workers/tasks/build_containerized_merge.py[163-414]
- iib/workers/tasks/build_containerized_fbc_operations.py[132-282]
- iib/workers/tasks/build_containerized_create_empty_index.py[179-381]

## Recommended Fix
Ensure each temporary-directory body normalizes file and directory permissions with `chmod_recursively` before cleanup. Place that normalization in a `finally` path so it also runs when an OPM operation or later build step raises, following the permission modes used by the containerized add workflow.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools

Comment thread iib/workers/tasks/git_utils.py Outdated
Comment on lines -77 to -79
# Configure Git user for commits
configure_git_user(local_repo_dir)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Action required

2. Catalog updates cannot be committed 🐞 Bug ☼ Reliability

push_configs_to_git and revert_last_commit no longer configure a repository-local Git identity
before commit_and_push invokes git commit. The worker image writes Git's global identity as root
but sets runtime HOME to /home/iib-worker, so normal OpenShift worker commits cannot find that
root-owned configuration and fail when a catalog update or merge-request branch has changes.
Agent Prompt
Issue description
`configure_git_user()` was removed after cloning repositories, but `commit_and_push()` still creates commits. The Docker build configures root's global Git config while the runtime HOME is `/home/iib-worker`, leaving runtime commits without an author identity.

Fix Focus Areas
- iib/workers/tasks/git_utils.py[76-80]
- iib/workers/tasks/git_utils.py[243-250]

Recommended Fix
Restore repository-local `user.name` and `user.email` configuration immediately after each clone that can create a commit, or configure an identity in a runtime-visible system Git config. Keep the identity setup before both direct catalog commits and merge-request commits.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools

Comment on lines +1432 to +1435
if build_request_config.binary_image_less_arches_allowed_versions:
if binary_image not in build_request_config.binary_image_less_arches_allowed_versions:
raise IIBError(
'The binary image is not available for the following arches: {}'.format(

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Action required

3. Requested platforms are skipped 🐞 Bug ≡ Correctness

prepare_request_for_build only rejects an unavailable architecture when
binary_image_less_arches_allowed_versions is truthy, then replaces the requested set with its
supported intersection in every other case. All containerized task entry points default that
parameter to None, so requests without an explicit allow-list now build only a subset of their
requested platforms instead of retaining the previous unsupported-platform error.
Agent Prompt
Issue description
An absent or empty `binary_image_less_arches_allowed_versions` currently bypasses the allow-list check and permits a partial-platform build. The parameter defaults to `None` in task entry points, making partial output the default whenever the selected binary image lacks one requested platform.

Fix Focus Areas
- iib/workers/tasks/utils.py[1429-1451]
- iib/workers/tasks/build_containerized_add.py[66-82]

Recommended Fix
Treat a missing or empty allow-list as disallowing reduced-platform builds. Only filter `arches` to the supported intersection when the selected `binary_image` is explicitly present in a non-empty allow-list; otherwise raise the existing unavailable-architectures error.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools

Comment on lines +1312 to +1313
if "index.db" in pull_spec:
raise IIBError(f'Cannot get label "{label}" from {pull_spec}')

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Remediation recommended

21. Bundle images with dotted names fail 🐞 Bug ≡ Correctness

get_image_label raises whenever the pull specification merely contains the substring index.db,
rather than identifying an actual local database path. Bundle and deprecation processing pass
user-provided image pull specifications directly through this helper, so an otherwise normal image
whose repository or tag contains that string cannot have its required package label read.
Agent Prompt
Issue description
`get_image_label()` rejects any pull specification containing `index.db`, including valid image repository and tag components. Its callers use this helper for bundle and deprecation pull specifications, so the broad substring test blocks ordinary image inspection.

Fix Focus Areas
- iib/workers/tasks/utils.py[1302-1315]
- iib/workers/tasks/utils.py[509-538]

Recommended Fix
Remove the broad substring guard. If a local database-path check is required, validate an actual local path with an exact filename/path condition rather than matching text anywhere in an image pull specification.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools

Comment thread tox.ini
deps =
hadolint-py==2.15.1.2
commands =
hadolint --failure-threshold warning docker/Dockerfile-api docker/Dockerfile-workers docker/message_broker/Dockerfile

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Action required

4. Main branch checks fail on hadolint 🐞 Bug ☼ Reliability

The new hadolint tox command treats warnings as failures, while the added configuration neither
ignores DL3007 nor trusts Quay. The scanned API and message-broker Dockerfiles use :latest, and
the worker Dockerfile additionally uses the untrusted quay.io base image, so every tox run
including the new environment fails.
Agent Prompt
## Issue description
The newly mandatory Hadolint invocation fails on existing Dockerfile constructs: `:latest` tags and the worker base image hosted on Quay.

## Fix Focus Areas
- tox.ini[112-118]
- .hadolint.yaml[3-17]
- docker/Dockerfile-api[1-1]
- docker/Dockerfile-workers[4-5]
- docker/message_broker/Dockerfile[2-2]

## Recommended Fix
Either make the Dockerfiles comply by pinning their base images to immutable tags or digests and allowlisting the required Quay registry, or explicitly ignore the applicable rules in `.hadolint.yaml` if floating tags are intentional. Keep the warning failure threshold only once all scanned Dockerfiles satisfy the selected policy.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools

Comment on lines +53 to +57
except Exception:
# MUST revert git commit first
revert_git_commit(commit_sha, repo_url, branch)
set_request_state(request_id, 'failed', str(error))
raise

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Remediation recommended

29. Failure cleanup raises a second error 🐞 Bug ≡ Correctness

The failure template calls nonexistent revert_git_commit and uses error without binding it in
the except Exception clause. A handler copied from this template fails again while handling its
original exception, preventing the documented failed-state update from completing.
Agent Prompt
## Issue description
The worker-handler failure example cannot execute because it uses an undefined revert helper and an undefined exception variable.

## Fix Focus Areas
- .agents/skills/worker-task-handler/SKILL.md[51-57]
- iib/workers/tasks/containerized_utils.py[594-644]
- iib/workers/tasks/git_utils.py[352-385]

## Recommended Fix
Replace the illustrative direct revert code with the repository's `cleanup_on_failure(...)` pattern, or use `except Exception as error:` and the real `revert_last_commit` signature. Preserve the distinction between closing an MR and reverting a direct-push commit.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools

Comment on lines +72 to +75
Worker handler tests mock two categories of dependencies:
- **Handler-local functions** — mock on `iib.workers.tasks.build_containerized_<type>.<function>`
- **Shared containerized utilities** — mock on `iib.workers.tasks.containerized_utils.<function>`

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Remediation recommended

30. Handler tests can call real services 🐞 Bug ☼ Reliability

The testing skill says containerized utility functions should be patched in containerized_utils,
even when handlers imported those functions into their own module namespace. When a handler directly
imports Git, artifact, or pipeline helpers, patches at the defining module do not replace the
handler's bound references and its test can invoke the real dependency.
Agent Prompt
## Issue description
The testing guide gives a generic patch target that does not intercept dependencies directly imported by containerized handlers.

## Fix Focus Areas
- .agents/skills/writing-tests/SKILL.md[72-96]
- .agents/skills/writing-tests/SKILL.md[162-168]
- iib/workers/tasks/build_containerized_add.py[22-32]
- tests/test_workers/test_tasks/test_build_containerized_add.py[30-62]

## Recommended Fix
State that mocks must target the namespace where each dependency is looked up. For functions imported directly by a handler, use `iib.workers.tasks.build_containerized_<type>.<function>`; reserve `containerized_utils.<function>` for calls looked up from within that module.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools

Comment on lines +139 to +141
1. Apply the fix to the relevant source file
2. The dev environment uses watchmedo for auto-reload — the worker will restart automatically after file changes
3. Re-submit the same request

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Remediation recommended

31. Fixes are retested against stale workers 🐞 Bug ≡ Correctness

The debugging skill says the containerized development worker uses watchmedo and restarts
automatically after source changes. The containerized compose service instead starts Celery
directly, so a resubmitted request after an edit continues using the already imported worker code
until the service is restarted.
Agent Prompt
## Issue description
The containerized debugging instructions claim automatic worker reload even though the compose service starts Celery without a file watcher.

## Fix Focus Areas
- .agents/skills/debugging-request-failures/SKILL.md[137-144]
- podman-compose-containerized.yml[94-140]

## Recommended Fix
Replace the automatic-reload claim with an explicit command to restart `iib-worker-containerized` after worker-code changes, then resubmit the request. Keep any automatic reload guidance scoped only to the legacy compose configuration that actually runs watchmedo.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools

Comment on lines +6 to +7
| `bundles` | Yes | `List[str]` — bundle image pull specs |
| `from_index` | Yes | `str` — index image to add to |

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Remediation recommended

32. Index-only additions cannot be reproduced 🐞 Bug ≡ Correctness

The endpoint reference marks both bundles and from_index as required for an add request.
RequestAdd.from_json() permits either value and rejects only the case where neither is supplied,
so agents following this reference cannot submit the supported index-only form.
Agent Prompt
## Issue description
The endpoint parameter reference incorrectly requires both add inputs even though the API accepts an add request with either bundles or a source index.

## Fix Focus Areas
- .agents/skills/debugging-request-failures/references/endpoint-parameters.md[3-16]
- .agents/skills/debugging-request-failures/SKILL.md[45-55]
- .agents/skills/validating-changes/SKILL.md[89-99]
- iib/web/models.py[1168-1180]
- iib/web/models.py[1215-1228]

## Recommended Fix
Describe `bundles` and `from_index` as conditionally required: at least one must be supplied. Update both quick-reference tables so the reproduction and validation instructions agree with the API.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools

Comment on lines +30 to +35
## `POST /builds/regenerate-bundle`
| Parameter | Required | Type |
|---|---|---|
| `from_bundle_image` | Yes | `str` — bundle image to regenerate |
| `organization` | No | `str` |
| `registry_auths` | No | `Dict[str, Any]` |

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Remediation recommended

33. Replacement-based rebuilds go untested 🐞 Bug ≡ Correctness

The regenerate-bundle parameter table omits bundle_replacements while claiming to provide the full
required and optional parameter set. The API forwards that value to the containerized handler, so
agents relying on the table do not gather or reproduce requests that use supported bundle
substitutions.
Agent Prompt
## Issue description
The regenerate-bundle endpoint reference omits a supported optional parameter that is forwarded to the worker handler.

## Fix Focus Areas
- .agents/skills/debugging-request-failures/references/endpoint-parameters.md[30-35]
- iib/web/api_v1.py[889-917]
- iib/workers/tasks/build_containerized_regenerate_bundle.py[64-83]

## Recommended Fix
Add `bundle_replacements` as an optional `Dict[str, str]` parameter and explain that it maps original bundle pull specifications to rebuilt bundle pull specifications.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools

@fullsend-ai-review fullsend-ai-review Bot added the risk/elevated PR risk: elevated label Sep 10, 2026
@fullsend-ai-review

Copy link
Copy Markdown

Risk Assessment: elevated (3/5)

Details

A bulk 'master to main' import of 97 files and 18k+ lines touching 19 protected paths, multiple CI workflows, and 3 dependency files produces high Tier 1 metadata risk (3.25), which is partially offset by low git churn and stable authorship history on the changed files (Tier 2 avg 1.71), yielding a composite score of 3 (elevated).

@fullsend-ai-review

Copy link
Copy Markdown

Review

Findings

High

  • [protected-path] .claude/ (5 files), .github/ (11 files), .pre-commit-config.yaml, AGENTS.md, CLAUDE.md — This PR modifies 19 files under protected paths. The PR has no linked issue and no description explaining why these governance and infrastructure files are being changed. Human approval is always required for protected-path changes.

  • [missing-authorization] .github/PULL_REQUEST_TEMPLATE.md — No linked issue, no PR body, and no labels for an 18K-line, 97-file change that replaces the core Celery task dispatch system. Non-trivial changes of this scope warrant a tracking issue and documented intent.
    Remediation: Open a tracking issue that describes the intent, links individual feature PRs from master, and authorizes the dispatch-layer switch. Reference it in the PR body.

  • [scope-mismatch] iib/web/api_v1.py — PR title "Import changes from master to main" implies a branch-sync but the actual change is a hard cutover of the API dispatch layer: all six production task handlers replaced with containerized counterparts. This is a major feature release, not a branch import.
    Remediation: Retitle the PR and document scope in the PR body.

  • [architectural-coherence] iib/workers/tasks/build.py:26 — Circular dependency between build.py and containerized_utils.py. containerized_utils.py imports from build.py at module level, and build.py imports from containerized_utils.py via a local import with a comment documenting the problem rather than resolving it.
    Remediation: Extract shared symbols into a dedicated utility module.

  • [architectural-coherence] iib/workers/tasks/build.py — @app.task decorator and celery app import have been commented out (not removed) in multiple handler files. Legacy handlers are dead code with no migration plan for in-flight requests, no task name aliasing, and no deprecation notice.
    Remediation: Document whether in-flight tasks need to drain. Remove dead code or use Celery task aliasing.

  • [naming-convention] iib/workers/tasks/build_containerized_add.py:65 — @instrument_tracing span name is workers.tasks.handle_add_request, missing build. prefix and containerized qualifier. Every other containerized handler uses workers.tasks.build.handle_containerized_*_request.
    Remediation: Change span_name to workers.tasks.build.handle_containerized_add_request.

  • [missing-doc] docs/module_documentation/iib.workers.tasks.rst — iib.workers.tasks.build_containerized_add module is absent from the RST module documentation. All five other containerized modules were correctly added.
    Remediation: Add the missing .. automodule:: directive.

  • [stale-doc] docs/gettingstarted.md — This configuration reference was not updated with new config options introduced in this PR. Deployers reading only this file will miss required configuration.
    Remediation: Apply the same config documentation changes from README.md.

  • [breaking-api] iib/web/api_v1.py:602 — POST /builds/add now unconditionally requires from_index. Previously only required when no bundles were specified. Breaks callers that submit add-only requests without from_index.
    Remediation: Document as intentional API change, or replicate old conditional validation.

  • [breaking-api] iib/web/api_v1.py:162 — _get_safe_args() calls safe_args.index(payload['cnr_token']) but _get_add_args() no longer includes cnr_token in args. Any caller sending cnr_token gets a 500 ValueError.
    Remediation: Remove the cnr_token branch from _get_safe_args().

Medium

  • [logic-error] iib/workers/tasks/build_containerized_fbc_operations.py:268 — Success message says "were successfully removed from the index image" but this handler adds FBC fragments. Copy-paste error from the RM handler.
    Remediation: Change message to reflect the add operation.

  • [logic-error] iib/workers/tasks/utils.py:1429 — When binary_image_less_arches_allowed_versions is falsy (default), the arch mismatch check silently falls through to reducing the architecture set instead of raising IIBError. Old behavior always raised. Affects ALL request types via prepare_request_for_build.
    Remediation: Add an else clause to restore the old strict behavior.

  • [test-adequacy] tests/test_workers/test_tasks/test_build_containerized_fbc_operations.py:514 — test_handle_containerized_fbc_operation_request_failure is a false-positive test. It manually calls mock_cof then asserts it was called, testing its own call rather than production behavior. The cleanup_on_failure error-path is entirely untested.
    Remediation: Mock a function that fails inside the try block instead.

  • [test-adequacy] tests/test_workers/test_tasks/test_git_utils.py:900 — @mock.patch('iib.workers.tasks.git_utils.configure_git_user') references a function removed in this PR. Will raise AttributeError at test collection time.
    Remediation: Remove the stale mock.patch decorator and parameter.

  • [secrets-handling] .env.containerized.template:3 — Template states .env.containerized is already in .gitignore but it is NOT listed. Only .env is covered. Developers following the instructions could accidentally commit credentials.
    Remediation: Add .env.containerized to .gitignore.

  • [architectural-coherence] iib/workers/tasks/build_merge_index_image.py:87 — _add_bundles_missing_in_source renamed to get_missing_bundles_from_target_to_source with 6 parameters removed, visibility changed from private to public, and semantics changed. Protected handler internals modified without authorization.
    Remediation: Document the scope authorization and verify no other callers rely on the old name.

  • [architectural-coherence] .github/workflows/build_on_main.yml — Pushes images to quay.io/exd-guild-hello-operator on every push to main. No documentation clarifying intended status of main relative to production deployment.
    Remediation: Document whether main is the production branch and confirm the target registry.

  • [documentation-comment-format] iib/workers/tasks/git_utils.py:307 — Docstring :param str repo_url: but the parameter is local_repo_path.
    Remediation: Change to :param str local_repo_path:.

  • [documentation-comment-format] iib/workers/tasks/oras_utils.py:321 — Return type annotation is -> bool but :rtype: says str.
    Remediation: Change :rtype: str to :rtype: bool.

  • [missing-doc] README.md — iib_index_db_artifact_template is a new worker config key used throughout the codebase but not documented.
    Remediation: Add to the worker config section of README.md.

  • [missing-doc] README.md — IIB_REGENERATE_BUNDLE_REPO_KEY added to web config but absent from REST API config section.
    Remediation: Add to the REST API config section.

  • [breaking-api] iib/web/api_v1.py:132 — organization and force_backport are silently dropped from Celery task args but still accepted by the API. Callers get success but no action.
    Remediation: Remove from schema or re-add to containerized handler args.

  • [breaking-api] iib/web/api_v1.py:1179 — output_fbc parameter removed from args dispatched to create-empty-index handler but still accepted by the API.
    Remediation: Remove from schema or verify the handler doesn't need it.

  • [breaking-api] iib/web/api_v1.py:136 — IIB_GREENWAVE_CONFIG value removed from _get_add_args(). Deployments with Greenwave config silently lose gate enforcement.
    Remediation: Document removal or verify equivalent checks in containerized handler.

Low

  • [race-condition] iib/workers/tasks/containerized_utils.py:322 — ValidateBundlesThread.run() has a TOCTOU race: empty() check followed by blocking get() can cause threads to hang indefinitely.
    Remediation: Use get_nowait() with queue.Empty exception handling.

  • [test-adequacy] tests/test_workers/test_tasks/test_build_containerized_rm.py:1378 — Duplicate mock.patch decorators target the same path.
    Remediation: Fix or remove the duplicate.

  • [api-contract] iib/workers/tasks/build_containerized_rm.py:195 — list[str](operators_in_db) implies type enforcement that doesn't occur.
    Remediation: Replace with list(operators_in_db).

  • [CI/CD-supply-chain] .github/workflows/build.yml:68 — redhat-actions/push-to-registry@v2.7.1 referenced by mutable tag while other actions are pinned to SHAs.
    Remediation: Pin to commit SHA.

  • [CI/CD-permissions] .github/workflows/build.yml:1 — build.yml and build_on_tag.api.yml lack explicit permissions blocks unlike new workflows.
    Remediation: Add permissions: contents: read.

  • [documentation-comment-format] iib/workers/tasks/oras_utils.py:24 — Non-standard :returns: format used instead of the established :return:/:rtype: pair.

  • [naming-convention] iib/workers/tasks/containerized_utils.py:358 — threads and wait parameters lack type annotations unlike all other new functions.

  • [architectural-coherence] .agents/skills/debugging-request-failures/SKILL.md — New agent skills describe containerized handlers as sole architecture without mentioning that legacy handlers still exist.

  • [breaking-api] iib/web/api_v1.py:533 — Validation error messages changed; clients doing string matching will break.

  • [breaking-api] iib/web/api_v1.py:627 — All six Celery task dispatches renamed to containerized_* variants. External monitoring and integration tests will break.
    Remediation: Document task name changes and ensure deployment sequencing.


Labels: PR adds 6 new containerized build handlers, modifies CI workflows, touches 19 protected paths, and risk assessment scored elevated (3/5)


Next steps:

  • /fs-fix — agent addresses review findings automatically
  • /fs-fix <your instruction> — agent fixes with your specific guidance
  • Push commits directly — review re-runs automatically on push
  • /fs-fix-stop — disable automatic fix runs for this PR

@fullsend-ai-review fullsend-ai-review 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.

Note: The following review comments could not be posted on the diff (GitHub returned 422) and are included here instead:

  • iib/web/api_v1.py (file-level): Line 162 · [high] breaking-api

_get_safe_args() calls safe_args.index(payload['cnr_token']) but _get_add_args() no longer includes cnr_token in args. Any caller sending cnr_token gets a 500 ValueError.

Suggested fix: Remove the cnr_token branch from _get_safe_args().

  • tests/test_workers/test_tasks/test_git_utils.py (file-level): Line 900 · [medium] test-adequacy

@mock.patch references configure_git_user which was removed from git_utils.py in this PR. Will raise AttributeError at test collection time.

Suggested fix: Remove the stale mock.patch decorator.

  • .github/workflows/build.yml (file-level): Line 68 · [low] CI/CD-supply-chain

redhat-actions/push-to-registry@v2.7.1 referenced by mutable tag while other actions are pinned to SHAs.

Suggested fix: Pin to commit SHA.

  • .github/workflows/build.yml (file-level): Line 1 · [low] CI/CD-permissions

build.yml and build_on_tag.api.yml lack explicit permissions blocks unlike new workflows.

Suggested fix: Add permissions: contents: read.

  • iib/web/api_v1.py (file-level): Line 533 · [low] breaking-api

Validation error messages changed; clients doing string matching will break.

@fullsend-ai-review fullsend-ai-review 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.

See the review comment for full details.

from iib.workers.config import get_worker_config
from iib.workers.tasks.celery import app

# from iib.workers.tasks.celery import app

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

[high] architectural-coherence

Circular dependency between build.py and containerized_utils.py. containerized_utils.py imports from build.py at module level, and build.py imports from containerized_utils.py via a local import with a comment documenting the problem rather than resolving it.

Suggested fix: Extract shared symbols into a dedicated utility module.


@app.task
@request_logger
@instrument_tracing(span_name="workers.tasks.handle_add_request", attributes=get_binary_versions())

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

[high] naming-convention

@instrument_tracing span name is 'workers.tasks.handle_add_request', missing 'build.' prefix and 'containerized' qualifier. Every other containerized handler uses 'workers.tasks.build.handle_containerized_*_request'.

Suggested fix: Change span_name to 'workers.tasks.build.handle_containerized_add_request'.

Comment thread iib/web/api_v1.py
if not isinstance(payload, dict):
raise ValidationError('The input data must be a JSON object')

if not payload.get('from_index'):

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

[high] breaking-api

POST /builds/add now unconditionally requires 'from_index'. Previously only required when no bundles were specified. Breaks callers that submit add-only requests without from_index.

Suggested fix: Document as intentional API change, or replicate old conditional validation.

set_request_state(
request_id,
'complete',
f"The operator(s) {operators_in_db} were successfully removed "

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

[medium] logic-error

Success message says 'were successfully removed from the index image' but this handler adds FBC fragments. Copy-paste error from the RM handler.

Suggested fix: Change message to reflect the add operation.

@@ -1275,11 +1427,28 @@ def prepare_request_for_build(
binary_image_arches = get_image_arches(binary_image_resolved)

if not arches.issubset(binary_image_arches):

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

[medium] logic-error

When binary_image_less_arches_allowed_versions is falsy (default), the arch mismatch check silently falls through instead of raising IIBError. Old behavior always raised. Affects ALL request types.

Suggested fix: Add an else clause to restore the old strict behavior.

@mock.patch('iib.workers.tasks.build_containerized_rm.reset_docker_config')
@mock.patch('iib.workers.tasks.build_containerized_rm.cleanup_on_failure')
@mock.patch('iib.workers.tasks.containerized_utils._skopeo_copy')
@mock.patch('iib.workers.tasks.containerized_utils.get_worker_config')

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

[low] test-adequacy

Duplicate mock.patch decorators target the same path.

Suggested fix: Fix or remove the duplicate.

fbc_dir, _ = opm_registry_rm_fbc(
base_dir=temp_dir,
from_index=from_index_resolved,
operators=list[str](operators_in_db),

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

[low] api-contract

liststr implies type enforcement that doesn't occur at runtime.

Suggested fix: Replace with list(operators_in_db).

Parse a container image pullspec (URL) to extract the index name and tag.

:param str image_pullspec: The full image pullspec string (registry/path/name:tag[@digest]).
:returns Tuple[str, str]: The extracted index name and tag (e.g., 'iib-pub-pending', 'v4.17').

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

[low] documentation-comment-format

Non-standard :returns: format used instead of the established :return:/:rtype: pair.

Suggested fix: Use standard two-line format.



def validate_bundles_in_parallel(
bundles: Union[List[BundleImage], List[str]], threads=5, wait=True

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

[low] naming-convention

threads and wait parameters lack type annotations unlike all other new functions.

Suggested fix: Add type annotations.

Comment thread iib/web/api_v1.py

try:
handle_add_request.apply_async(
handle_containerized_add_request.apply_async(

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

[low] breaking-api

All six Celery task dispatches renamed to containerized_* variants. External monitoring and integration tests will break.

Suggested fix: Document task name changes and ensure deployment sequencing.

@fullsend-ai-review fullsend-ai-review Bot added feature github_actions Pull requests that update GitHub Actions code labels Sep 10, 2026
@fullsend-ai-retro

fullsend-ai-retro Bot commented Sep 10, 2026 •

Copy link
Copy Markdown

🤖 Finished Retro · ✅ Success · Started 8:08 PM UTC · Completed 8:18 PM UTC

Commit: 372ed03 · View workflow run →

Runtime: claude · Model: opus → claude-opus-4-6 · Effort: high · Cost: $4.07

@fullsend-ai-retro

Copy link
Copy Markdown

Retro: PR #1383 — "Import changes from master to main"

Timeline

  1. 18:49 UTC — PR opened by yashvardhannanavati: 97 files, 17,322 additions, 703 deletions, 83 commits. No linked issue, empty PR body, branch import_changes → main.
  2. 18:49 — Review agent dispatched (run 34516708493). Runtime: claude-opus-4-6, effort: high.
  3. 18:51 — qodo-for-releng posted PR summary (50K chars) and later code review (60K chars, 15 High bugs, 18 additional findings).
  4. 19:31 — Review agent completed after 41 minutes. Cost: $21.81. Posted risk assessment (elevated 3/5), 34 findings (10 High, 14 Medium, 10 Low), 19 inline comments, and submitted CHANGES_REQUESTED. Five findings couldn't be posted inline (GitHub 422) and were gracefully recovered into the review body.
  5. 20:07 — Author closed the PR without merging, ~37 minutes after review posted.

Assessment

Review quality was excellent. The agent found substantive, real issues: breaking API changes (cnr_token causing 500 errors, from_index now unconditionally required), security gaps (.env.containerized missing from .gitignore, symlink-following vulnerability), architectural problems (circular dependency, dead code with commented-out decorators), and accurate process-level observations (scope mismatch, missing authorization). The risk assessment (elevated 3/5) was well-calibrated.

The 422 inline comment recovery worked correctly. Five findings that couldn't be posted on diff lines were automatically posted in the review body — no findings were lost.

Cost was high but proportional to PR size. $21.81 for a 97-file, 18K-line review using Opus at high effort is within expected bounds. However, the PR was closed without merging, meaning the detailed code-level findings may not be acted upon if the code is restructured for resubmission.

Superseded workflow runs were handled correctly. Three pull_request_review runs were triggered by the bot's own review activity; two were cancelled via supersession and one was routed but all agents skipped. Eight issue_comment runs were also correctly skipped.

Existing issues this retro provides evidence for

Proposals skipped (target repo not allowed)

File manually or update create_issues.allow_targets in config.yaml:

  • Add metadata pre-flight gate to defer full review on undocumented large PRs (fullsend-ai/agents)

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

Labels

feature github_actions Pull requests that update GitHub Actions code risk/elevated PR risk: elevated

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants