---
id: TASK-39.1
title: Select app image for sysbuild compile_commands link
status: Done
assignee:
  - mrbya
created_date: '2026-03-05 16:41'
labels: []
dependencies: []
parent_task_id: TASK-39
priority: medium
---

## Description

<!-- SECTION:DESCRIPTION:BEGIN -->
Define and enforce the rules for selecting the project’s app image when choosing the compile_commands.json to link for sysbuild builds.
<!-- SECTION:DESCRIPTION:END -->

## Acceptance Criteria
<!-- AC:BEGIN -->
- [ ] #1 When multiple sysbuild images are available, the selected compile_commands.json always comes from the image whose name matches the project_root directory name.
- [ ] #2 External app images are never chosen for the link.
- [ ] #3 Failure to identify the project app image is handled without linking the file.
- [ ] #4 Tests cover app-image selection outcomes.
<!-- AC:END -->
