Skip to content

Harden CI image build and add AI code-review job - #128

Merged
vadimskipin merged 2 commits into
mainfrom
ci-image-hardening-ai-review
Aug 22, 2026
Merged

Harden CI image build and add AI code-review job#128
vadimskipin merged 2 commits into
mainfrom
ci-image-hardening-ai-review

Conversation

@maxknv

@maxknv maxknv commented Aug 21, 2026

Copy link
Copy Markdown
Member

Mirrors two upstream changes into silk's CI, adapted to silk's conventions.

Image-build hardening (mirrors ClickHouse/praktika#141)

  • Add unattended-upgrades removal and disable the apt-daily/apt-daily-upgrade/unattended-upgrades units in the silk CI dependencies component, before its first apt-get. This stops stock Ubuntu background upgrades from holding the dpkg lock during the image build and, once the AMI is baked, at runner boot. Both commands carry || true so a missing package or transient apt failure never aborts the build.
  • Bump image_recipe_version 1.0.11 -> 1.0.12 so a fresh AMI is actually baked with the changed component content.

Note: praktika is consumed here as a pinned wheel, so the upstream fixes to praktika's own gh.py (Pages-root clean) and base _ubuntu_setup_component are not vendored in silk. This applies the same hardening to silk's own Ubuntu setup component instead.

AI code-review job

  • New CODE_REVIEW_JOB running praktika review against an OpenAI model on Bedrock, with allow_failure=True (a review hiccup never blocks merge) and enable_gh_auth=True (so it can post its review), wired into the PR workflow.
  • New RunnerLabels.SMALL_ARM_BEDROCK label and a dedicated arm-small-bedrock runner pool. Based on silk's existing arm-small pool (keeping the locked-down allow_all_*=False posture and system_logs), plus a scoped bedrock:InvokeModel IAM statement merged into ext["iam_statements"], so only this pool's role can reach the Bedrock model API. General job runners stay Bedrock-less.
  • New silk-specific ci/prompts/code_review.md: fiber-scheduler concurrency and lock-free correctness, hot-path performance discipline, and the errno-only error model.

To confirm before merge

  • The global.openai.gpt-5.6-sol Bedrock inference profile is reachable from eu-north-1 (Bedrock model availability is region-specific).

Add unattended-upgrades removal and apt-daily/apt-daily-upgrade timer
disable to the silk CI dependencies component before its first apt-get,
so stock Ubuntu background upgrades cannot hold the dpkg lock during the
image build or at runner boot. Bump image_recipe_version to 1.0.12 so a
fresh AMI is baked with the changed component content.
@praktika-gh

praktika-gh Bot commented Aug 21, 2026

Copy link
Copy Markdown

Workflow [PR], commit [6257717]


Code Review

Result: ✅ No issues found

What changed: Hardens CI image creation against background apt lock contention, bumps the image recipe, and adds a dedicated Bedrock-enabled ARM runner pool. It also adds a non-blocking AI code-review job and repository-specific review guidance to the pull-request workflow.

No issues found. The previously raised apt-service race is addressed by explicitly stopping both active apt services before purging unattended-upgrades.

Comment thread ci/infrastructure/projects.py
Wire praktika's native AI code-review job into the PR workflow as
CODE_REVIEW_JOB, running praktika review against an OpenAI model on
Bedrock with allow_failure so a review hiccup never blocks merge and
gh auth so it can post its review. Add a dedicated arm-small-bedrock
runner pool carrying a scoped bedrock:InvokeModel grant via
ext[iam_statements], its SMALL_ARM_BEDROCK label, and a silk-specific
review prompt so only this pool's role can reach the Bedrock model API.
@maxknv
maxknv force-pushed the ci-image-hardening-ai-review branch from 4047e27 to 6257717 Compare August 21, 2026 16:24
@maxknv
maxknv requested a review from vadimskipin August 21, 2026 16:31
@vadimskipin
vadimskipin merged commit 5811161 into main Aug 22, 2026
16 checks passed
@vadimskipin
vadimskipin deleted the ci-image-hardening-ai-review branch August 22, 2026 08:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants