Add dynamic library dependency detection for AWF container mounts#12460
Add dynamic library dependency detection for AWF container mounts#12460
Conversation
- Created scripts/detect-library-deps.sh for dynamic library detection - Supports multiple output formats: awf-mounts, paths, json - Includes caching mechanism for performance - Handles symlinks and library versioning - Created scripts/detect-library-deps_test.sh with 12 passing tests - Tests cover common utilities (curl, jq, git) and edge cases Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
- Added GenerateLibraryMountArgsCommand and GetCommonBinaryPaths helpers - Modified copilot_engine_execution.go to use library detection - Modified claude_engine.go to use library detection - Modified codex_engine.go to use library detection - Libraries are detected dynamically at runtime using detect-library-deps.sh - Only required libraries are mounted, reducing container size and security surface Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
- Created engine_helpers_library_test.go with comprehensive tests - Tests verify GetCommonBinaryPaths returns expected binaries - Tests verify GenerateLibraryMountArgsCommand generates correct commands - All tests pass - Verified workflow compilation includes library detection Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
🔍 PR Triage ResultsCategory: chore | Risk: high | Priority: 45/100 Scores Breakdown
📋 Recommended Action: deferLow impact or work in progress Note: High risk due to large change scope (711 additions across 7 files). Ensure thorough testing before merge. Triaged by PR Triage Agent on 2026-01-29
|
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
🔍 PR Triage ResultsCategory: feature | Risk: high | Priority: 50/100 Scores Breakdown
📋 Recommended Action: batch_reviewPart of Batch #2: Feature Additions (batch-feature-001). Related to PRs #12459, #12444 for container mount functionality. Triaged by PR Triage Agent on 2026-01-31 | Run #21540069309
|
🔍 PR Triage ResultsCategory: feature | Risk: high | Priority: 60/100 Scores Breakdown
📋 Recommended Action: Batch ReviewThis PR is recommended for batch review with similar PRs. 📦 Batch ProcessingThis PR is part of batch-feature-001 with 3 other PR(s): #12130, #12459, #12698 Consider reviewing these PRs together for consistency and efficiency. Triaged by PR Triage Agent on 2026-01-31 12:17 UTC
|
Mounting entire
/liband/usr/libdirectories in AWF containers increases size and security surface. This implements runtime library detection usinglddto mount only required dependencies.Implementation
Script (
scripts/detect-library-deps.sh)ldd, resolves symlinks, outputs AWF mount argsawf-mounts,paths,json/tmp/gh-aw-lib-deps-cache.txt(per-workflow-run)Integration (
pkg/workflow/)GenerateLibraryMountArgsCommand()- generates detection commandGetCommonBinaryPaths()- returns standard utility paths$LIB_MOUNTSGenerated Command
Impact
Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.