feat: flag inactive Compose dependency targets - #230
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 91f7e08606
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| "finding_docker_compose_declared_target_not_active_{}", | ||
| collision_resistant_id_component(&format!("{}\u{1f}{}", edge.source, edge.target)) | ||
| ), | ||
| rule_id: FindingRule::DockerComposeDeclaredTargetNotActive, |
There was a problem hiding this comment.
Accept the new finding at the API boundary
When this branch emits DockerComposeDeclaredTargetNotActive, the browser-facing /api/findings route becomes unavailable: hasCoherentFindings in apps/api/src/daemonResponseValidation.ts accepts only the three pre-existing rules and returns false for every other rule at line 285, after which validateDaemonResponse rejects the entire payload and daemonClient.ts converts that rejection to HTTP 502. Add strict coherence validation for this new rule in the same change so a running service with an inactive Compose target does not hide all findings.
Useful? React with 👍 / 👎.
| .status | ||
| .as_deref() | ||
| .map(RuntimeServiceStatus::from_status_text), | ||
| Some(RuntimeServiceStatus::Stopped | RuntimeServiceStatus::Failed) |
There was a problem hiding this comment.
Preserve completion semantics before flagging stopped targets
For a Compose dependency declared with condition: service_completed_successfully, the expected healthy state is that the target exits successfully while the dependent remains running, but this condition is discarded by parse_depends_on_label in crates/dockermap-daemon/src/docker_collector.rs:296-310. Consequently an Exited (0) one-shot migration or initialization service normalizes to Stopped here and generates a misleading inactive-target advisory even though its declared condition was satisfied; preserve and inspect the condition, or otherwise exclude successful completion from this rule.
Useful? React with 👍 / 👎.
Summary
docker.compose_declared_target_not_activeadvisoryVerification
npm run test:rust:corenpm run test:rust:daemonnpm run fmt:rust:checknpm run lint:rustnpm run generate:contractsnpm run check:contractsFollow-up
API/web consumers must add strict handling for the closed rule before it is presented in browser-facing findings.