Deploy AWS Device Farm Lambda orchestrator with OpenTofu #31
All Vouch review confidence checks passed
Residual risk 0.26 = Change Risk (0.66) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.66 · 363 lines diff across 4 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.353
Shallow Review Depth
shallow_review_depth
0.289
Sensitive Paths
sensitive_paths
0.066
Real PR Conversation Timeline
1 comments
"Review active on #31"
general
weight: 0.35
louwers
Running Android hardware tests for
maplibre/mln-rsvia GitHub Actions watcher workflows requires long-lived polling jobs and exposes AWS credential wiring in repository workflows. Moving orchestration into AWS Lambda behind a GitHub App lets untrusted fork PRs run safely on AWS Device Farm and report results natively via a GitHub Check Run (device-test / android), without executing untrusted PR code inside Lambda or keeping CI runners occupied while waiting on phones.Summary
device-farm/): single staticlinux/arm64binary (provided.al2023,bootstrap) dispatched viaMODE:-
webhook: verifiesX-Hub-Signature-256, filters configured repos (maplibre/mln-rs, structured somaplibre/maplibre-nativecan be added as a config entry) and optionalALLOWED_BRANCHES, enqueues onto SQS, and returns202 Accepted.-
worker: manages thedevice-test / androidCheck Run lifecycle (includingworkflow_runsafety-net settling andcheck_runrerequestedreruns), stops/supersedes older active runs on the same(repo, head_repo, head_branch), downloadsandroid-device-testswithout forwarding GitHubAuthorizationheaders on redirect, extractsandroid-tests.zipwithout unpacking or executing its contents, fetchestools/device-farm/android.ymlexclusively frommain, uploads to Device Farm, and schedules runs on Pixel 9 and Galaxy S25.-
poller: polls active runs every minute from DynamoDBstate-index, collectsTESTSPEC_OUTPUT.txtandCUSTOMER_ARTIFACT.zip, parses boundedjunit.xml(falling back to the last 40 output lines), uploads results to private S3 withContent-Disposition: attachment, and settles the Check Run with Markdown summaries and sandboxed CloudFront links.opentofu/device-farm/): independent root inus-west-2using the shared S3 state bucket, with Secrets Manager secret shell, DynamoDB table + GSIs + TTL, SQS queue + DLQ, private S3 bucket (30-day expiry) + CloudFront OAC (Content-Security-Policy: sandbox,X-Content-Type-Options: nosniff), least-privilege per-Lambda IAM roles, CloudWatch log retention, and EventBridge schedule.device-farminto the rootjustfile, updatedopentofu/README.md, and documented setup, branch-gated evaluation (allowed_branches), cutover, and onboarding additional repositories indevice-farm/README.md.Verification
go vet ./...andgo test -count=1 -race ./...pass across all packages.just device-farm::buildproduces a statically linkedARM aarch64bootstrapbinary packaged inbootstrap.zip.tofu fmt -check -recursive opentofuandtofu -chdir=opentofu/device-farm init -backend=false && tofu -chdir=opentofu/device-farm validatepass with zero warnings.tofu applywas not run).Created with gemini-4-neon in T3 Code.