attachJoinedIFCLabel attaches an IFC label computed by joining a set of per-item visibilities (true == private) when IFC labels are enabled. joinFn is the lattice join for the relevant item kind (e.g. ifc.LabelSearchIssues or ifc.LabelProjectList). The visibility slice is cheap to build from an alre
( ctx context.Context, deps ToolDependencies, r *mcp.CallToolResult, visibilities []bool, joinFn func([]bool) ifc.SecurityLabel, )
| 107 | // already-fetched response, so callers may construct it unconditionally and let |
| 108 | // this helper own the feature-flag gate. |
| 109 | func attachJoinedIFCLabel( |
| 110 | ctx context.Context, |
| 111 | deps ToolDependencies, |
| 112 | r *mcp.CallToolResult, |
| 113 | visibilities []bool, |
| 114 | joinFn func([]bool) ifc.SecurityLabel, |
| 115 | ) *mcp.CallToolResult { |
| 116 | if !shouldAttachIFCLabel(ctx, deps, r) { |
| 117 | return r |
| 118 | } |
| 119 | setIFCLabel(r, joinFn(visibilities)) |
| 120 | return r |
| 121 | } |
| 122 | |
| 123 | func attachProjectVisibilityIFCLabel( |
| 124 | ctx context.Context, |
no test coverage detected