Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jan 27, 2026

Binaries mounted from /usr/bin (date, gh, yq) into the AWF container fail with "library not found" errors because shared libraries aren't available.

Changes

  • New file pkg/workflow/library_mounts.go: Shared library mounting logic

    • GetLibraryMounts() returns AWF mount args for /usr/lib/x86_64-linux-gnu:ro
    • Only mounts the x86_64-linux-gnu directory (standard location on Ubuntu runners)
  • Modified pkg/workflow/copilot_engine_execution.go: Added library mounts after binary mounts

    awfArgs = append(awfArgs, "--mount", "/usr/bin/date:/usr/bin/date:ro")
    awfArgs = append(awfArgs, "--mount", "/usr/bin/gh:/usr/bin/gh:ro")
    awfArgs = append(awfArgs, "--mount", "/usr/bin/yq:/usr/bin/yq:ro")
    // Mount shared library directories required by the mounted binaries
    awfArgs = append(awfArgs, GetLibraryMounts()...)
  • Claude/Codex engines: No changes needed—they don't mount /usr/bin binaries

Design

Chose selective mounting (Option B from issue) over mounting entire /usr/lib to minimize security surface. Libraries mounted read-only.

Original prompt

This section details on the original issue you should resolve

<issue_title>[plan] Implement selective /usr/lib mounting for shared libraries</issue_title>
<issue_description>## Objective

Design and implement a mechanism to mount essential shared libraries from /usr/lib into the agent container to support utilities that depend on system libraries.

Context

The agent container currently mounts specific binaries from /usr/bin, but many utilities depend on shared libraries in /usr/lib and /usr/lib/x86_64-linux-gnu. Without these libraries, some utilities may fail with "library not found" errors.

Approach

  1. Identify which mounted /usr/bin utilities require shared libraries (use ldd command)
  2. Create a helper function to determine library dependencies for a given binary
  3. Design a mounting strategy:
    • Option A: Mount entire /usr/lib (simple but large)
    • Option B: Mount only required library directories (more selective)
    • Option C: Copy required libraries to a shared location
  4. Implement the chosen strategy in the engine files (copilot_engine_execution.go, claude_engine.go, codex_engine.go)
  5. Add tests to verify library mounting works correctly

Files to Modify

  • Modify: pkg/workflow/copilot_engine_execution.go (add library mounts)
  • Modify: pkg/workflow/claude_engine.go (add library mounts)
  • Modify: pkg/workflow/codex_engine.go (add library mounts)
  • Create: pkg/workflow/library_mounts.go (shared library mounting logic)
  • Create: pkg/workflow/library_mounts_test.go (test library detection)

Acceptance Criteria

  • Shared library dependencies are correctly identified for all mounted binaries
  • Library mounting mechanism works across all engine types (copilot, claude, codex)
  • Tests verify that mounted binaries can execute successfully
  • Documentation explains the library mounting approach and tradeoffs
  • Implementation minimizes security surface area (avoid mounting unnecessary libraries)
    Related to epic: build/test environment for agentic workflow #11970

AI generated by Plan Command for #11970

Comments on the Issue (you are @copilot in this section)


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.


Changeset

  • Type: patch
  • Description: Mount the shared libraries needed by the /usr/bin/date, gh, and yq binaries so they can run inside the AWF container without missing dependencies.

Ahoy! This treasure was crafted by 🏴‍☠️ Changeset Generator

Copilot AI and others added 2 commits January 27, 2026 00:18
Co-authored-by: Mossaka <5447827+Mossaka@users.noreply.github.com>
Co-authored-by: Mossaka <5447827+Mossaka@users.noreply.github.com>
Copilot AI changed the title [WIP] Implement selective /usr/lib mounting for shared libraries Implement selective /usr/lib mounting for shared libraries Jan 27, 2026
Copilot AI requested a review from Mossaka January 27, 2026 00:38
Mossaka and others added 2 commits January 27, 2026 17:18
…ective-lib-mounting

# Conflicts:
#	.github/workflows/agent-performance-analyzer.lock.yml
#	.github/workflows/agent-persona-explorer.lock.yml
#	.github/workflows/ai-moderator.lock.yml
#	.github/workflows/archie.lock.yml
#	.github/workflows/artifacts-summary.lock.yml
#	.github/workflows/auto-triage-issues.lock.yml
#	.github/workflows/brave.lock.yml
#	.github/workflows/breaking-change-checker.lock.yml
#	.github/workflows/chroma-issue-indexer.lock.yml
#	.github/workflows/ci-coach.lock.yml
#	.github/workflows/ci-doctor.lock.yml
#	.github/workflows/cli-consistency-checker.lock.yml
#	.github/workflows/code-scanning-fixer.lock.yml
#	.github/workflows/code-simplifier.lock.yml
#	.github/workflows/copilot-cli-deep-research.lock.yml
#	.github/workflows/copilot-pr-merged-report.lock.yml
#	.github/workflows/copilot-pr-nlp-analysis.lock.yml
#	.github/workflows/copilot-pr-prompt-analysis.lock.yml
#	.github/workflows/craft.lock.yml
#	.github/workflows/daily-assign-issue-to-user.lock.yml
#	.github/workflows/daily-cli-performance.lock.yml
#	.github/workflows/daily-compiler-quality.lock.yml
#	.github/workflows/daily-copilot-token-report.lock.yml
#	.github/workflows/daily-file-diet.lock.yml
#	.github/workflows/daily-firewall-report.lock.yml
#	.github/workflows/daily-malicious-code-scan.lock.yml
#	.github/workflows/daily-news.lock.yml
#	.github/workflows/daily-regulatory.lock.yml
#	.github/workflows/daily-repo-chronicle.lock.yml
#	.github/workflows/daily-secrets-analysis.lock.yml
#	.github/workflows/daily-semgrep-scan.lock.yml
#	.github/workflows/daily-team-status.lock.yml
#	.github/workflows/daily-testify-uber-super-expert.lock.yml
#	.github/workflows/daily-workflow-updater.lock.yml
#	.github/workflows/delight.lock.yml
#	.github/workflows/dependabot-bundler.lock.yml
#	.github/workflows/dependabot-go-checker.lock.yml
#	.github/workflows/dev-hawk.lock.yml
#	.github/workflows/dev.lock.yml
#	.github/workflows/dictation-prompt.lock.yml
#	.github/workflows/discussion-task-miner.lock.yml
#	.github/workflows/docs-noob-tester.lock.yml
#	.github/workflows/example-custom-error-patterns.lock.yml
#	.github/workflows/example-permissions-warning.lock.yml
#	.github/workflows/firewall-escape.lock.yml
#	.github/workflows/firewall.lock.yml
#	.github/workflows/github-remote-mcp-auth-test.lock.yml
#	.github/workflows/glossary-maintainer.lock.yml
#	.github/workflows/grumpy-reviewer.lock.yml
#	.github/workflows/hourly-ci-cleaner.lock.yml
#	.github/workflows/issue-monster.lock.yml
#	.github/workflows/issue-triage-agent.lock.yml
#	.github/workflows/jsweep.lock.yml
#	.github/workflows/layout-spec-maintainer.lock.yml
#	.github/workflows/mcp-inspector.lock.yml
#	.github/workflows/mergefest.lock.yml
#	.github/workflows/metrics-collector.lock.yml
#	.github/workflows/notion-issue-summary.lock.yml
#	.github/workflows/org-health-report.lock.yml
#	.github/workflows/pdf-summary.lock.yml
#	.github/workflows/plan.lock.yml
#	.github/workflows/poem-bot.lock.yml
#	.github/workflows/portfolio-analyst.lock.yml
#	.github/workflows/pr-nitpick-reviewer.lock.yml
#	.github/workflows/pr-triage-agent.lock.yml
#	.github/workflows/python-data-charts.lock.yml
#	.github/workflows/q.lock.yml
#	.github/workflows/release.lock.yml
#	.github/workflows/repo-audit-analyzer.lock.yml
#	.github/workflows/repo-tree-map.lock.yml
#	.github/workflows/repository-quality-improver.lock.yml
#	.github/workflows/research.lock.yml
#	.github/workflows/secret-scanning-triage.lock.yml
#	.github/workflows/security-compliance.lock.yml
#	.github/workflows/security-fix-pr.lock.yml
#	.github/workflows/security-review.lock.yml
#	.github/workflows/slide-deck-maintainer.lock.yml
#	.github/workflows/smoke-copilot.lock.yml
#	.github/workflows/stale-repo-identifier.lock.yml
#	.github/workflows/sub-issue-closer.lock.yml
#	.github/workflows/super-linter.lock.yml
#	.github/workflows/technical-doc-writer.lock.yml
#	.github/workflows/terminal-stylist.lock.yml
#	.github/workflows/tidy.lock.yml
#	.github/workflows/ubuntu-image-analyzer.lock.yml
#	.github/workflows/video-analyzer.lock.yml
#	.github/workflows/weekly-issue-summary.lock.yml
#	.github/workflows/workflow-generator.lock.yml
#	.github/workflows/workflow-health-manager.lock.yml
#	.github/workflows/workflow-normalizer.lock.yml
#	.github/workflows/workflow-skill-extractor.lock.yml
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@Mossaka Mossaka added the smoke label Jan 27, 2026
@github-actions
Copy link
Contributor

github-actions bot commented Jan 27, 2026

✨ The prophecy is fulfilled... Smoke Codex has completed its mystical journey. The stars align. 🌟

@github-actions
Copy link
Contributor

github-actions bot commented Jan 27, 2026

🎉 Yo ho ho! Changeset Generator found the treasure and completed successfully! ⚓💰

@github-actions
Copy link
Contributor

📰 BREAKING: Smoke Copilot is now investigating this pull request. Sources say the story is developing...

@github-actions
Copy link
Contributor

github-actions bot commented Jan 27, 2026

🎬 THE ENDSmoke Claude MISSION: ACCOMPLISHED! The hero saves the day! ✨

@github-actions
Copy link
Contributor

Smoke test results:

  • PR list: ✅
    • [WIP] Fix test failures when running make test
    • Enable campaign orchestrator generation via project field detection
  • GitHub MCP merged PRs: ✅
  • Serena activate: ✅
  • Playwright title check: ✅
  • Tavily search: ✅
  • File write/read: ✅
  • Discussion query/comment: ✅
    Overall status: PASS

AI generated by Smoke Codex

@github-actions
Copy link
Contributor

Smoke Test Results: ✅ PASS

@Mossaka @Copilot

AI generated by Smoke Copilot

@github-actions
Copy link
Contributor

📰 VERDICT: Smoke Copilot has concluded. All systems operational. This is a developing story. 🎤

@github-actions
Copy link
Contributor

✅ GitHub MCP: PR #8, PR #10
✅ GH CLI: PR #12055, PR #12053
✅ Serena: Activated
✅ Make: Build successful
✅ Playwright: Verified
✅ Tavily: 3 results
✅ File I/O: Verified
✅ Bash: Verified
✅ Discussion: #12049

PASS - §21407075824

AI generated by Smoke Claude

@Mossaka Mossaka marked this pull request as ready for review January 27, 2026 17:35
@Mossaka
Copy link
Collaborator

Mossaka commented Jan 27, 2026

Closing this PR since it should be built on top of #12062

@Mossaka Mossaka closed this Jan 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[plan] Implement selective /usr/lib mounting for shared libraries

2 participants