Skip to main content

aft_base/
list_surfaces.rs

1use crate::list_envelope::{Reason, Unit};
2
3pub mod bash;
4pub mod call_tree;
5pub mod callers;
6pub mod callgraph;
7pub mod glob;
8pub mod grep;
9pub mod impact;
10pub mod inspect;
11pub mod outline;
12pub mod read;
13pub mod search;
14pub mod trace;
15pub mod trace_data;
16pub mod trace_to;
17
18/// Shared list-envelope rendering entry point for tool and daemon output.
19pub fn render_envelope_trailer(envelope: &crate::list_envelope::ListEnvelope) -> Option<String> {
20    crate::list_envelope::render_trailer(envelope)
21}
22
23#[cfg(test)]
24mod tests {
25    #[test]
26    fn callgraph_caps_keep_the_twenty_trigger_and_fifteen_limit() {
27        let mut items: Vec<_> = (0..20).collect();
28        assert_eq!(super::callgraph::cap_items(&mut items), (20, 20));
29        items.push(20);
30        assert_eq!(super::callgraph::cap_items(&mut items), (15, 21));
31        assert_eq!(items, (0..15).collect::<Vec<_>>());
32    }
33
34    #[test]
35    fn foreground_annotations_and_rendered_grep_rows_keep_their_counts() {
36        assert!(super::bash::is_foreground_task_line("[task bash-1]"));
37        assert!(super::bash::is_foreground_task_line(
38            "[task bash-1 (job job-2)]"
39        ));
40        assert!(!super::bash::is_foreground_task_line("[task ]"));
41        assert_eq!(
42            super::bash::count_output_lines("one\n[task bash-1]\ntwo\n"),
43            2
44        );
45        let mut data = serde_json::json!({"matches": [1, 2, 3]});
46        assert_eq!(super::grep::rendered_grep_match_count(&data), 3);
47        data["rendered_matches"] = serde_json::json!(2);
48        assert_eq!(super::grep::rendered_grep_match_count(&data), 2);
49        data["rendered_matches"] = serde_json::json!(9);
50        assert_eq!(super::grep::rendered_grep_match_count(&data), 3);
51    }
52}
53
54pub fn ast_search_envelope(
55    shown: usize,
56    total: usize,
57    skipped: bool,
58) -> crate::list_envelope::ListEnvelope {
59    use crate::list_envelope::{ListEnvelope, Total};
60    ListEnvelope::new(
61        shown,
62        if skipped {
63            Total::AtLeast(total)
64        } else {
65            Total::Exact(total)
66        },
67        Unit::Results,
68        vec![Reason::Budget],
69        &["paths", "globs", "pattern"],
70    )
71}
72
73/// Classification of a reason: whether the traversal stopped (`Bounding`)
74/// or a selector chose which of an enumerated set to retain (`Selecting`).
75#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
76pub enum ReasonKind {
77    Bounding,
78    Selecting,
79}
80
81/// A registered reason on a surface with its kind and the name of the function or constant where the condition is evaluated.
82#[derive(Debug, Clone, Copy, PartialEq, Eq)]
83pub struct ReasonEntry {
84    pub reason: Reason,
85    pub kind: ReasonKind,
86    pub predicate_name: &'static str,
87}
88
89/// Registry entry for a list-shaped surface.
90#[derive(Debug, Clone, Copy, PartialEq, Eq)]
91pub struct SurfaceEntry {
92    pub command: &'static str,
93    pub mode: &'static str,
94    pub list_id: &'static str,
95    /// A negotiated route capability required for this surface to exist.
96    pub requires: Option<&'static str>,
97    pub unit: Unit,
98    pub narrow: &'static [&'static str],
99    pub reasons: &'static [ReasonEntry],
100}
101
102/// Authoritative registry of every list-shaped surface in AFT.
103pub static LIST_SURFACES: &[SurfaceEntry] = &[
104    SurfaceEntry {
105        requires: None,
106        command: "callgraph",
107        mode: "impact",
108        list_id: "payload.sites",
109        unit: Unit::Sites,
110        narrow: &["depth", "includeTests"],
111        reasons: &[
112            ReasonEntry {
113                reason: Reason::Budget,
114                kind: ReasonKind::Bounding,
115                predicate_name: "IMPACT_EXPANSION_BUDGET, direct_callers_bounded",
116            },
117            ReasonEntry {
118                reason: Reason::Cap,
119                kind: ReasonKind::Selecting,
120                predicate_name: "HUB_SUMMARY_LIMIT, impact_result, impact_result_with_budget",
121            },
122            ReasonEntry {
123                reason: Reason::Depth,
124                kind: ReasonKind::Bounding,
125                predicate_name: "depth_cut_inside_requested, truncated",
126            },
127        ],
128    },
129    SurfaceEntry {
130        requires: None,
131        command: "callgraph",
132        mode: "callers",
133        list_id: "payload.callers",
134        unit: Unit::Items,
135        narrow: &["depth", "includeTests"],
136        reasons: &[
137            ReasonEntry {
138                reason: Reason::Cap,
139                kind: ReasonKind::Selecting,
140                predicate_name: "HUB_SUMMARY_LIMIT, callers_result, test_hidden_summary, included_summary",
141            },
142            ReasonEntry {
143                reason: Reason::Depth,
144                kind: ReasonKind::Bounding,
145                predicate_name: "depth_cut_inside_requested, truncated",
146            },
147        ],
148    },
149    SurfaceEntry {
150        requires: None,
151        command: "callgraph",
152        mode: "callers",
153        list_id: "payload.unresolved_callers.sites",
154        unit: Unit::Sites,
155        narrow: &["includeTests"],
156        reasons: &[ReasonEntry {
157            reason: Reason::Cap,
158            kind: ReasonKind::Selecting,
159            predicate_name: "UNRESOLVED_CALLER_SITES_LIMIT, unresolved_call_sites_named: sites.len() < limit",
160        }],
161    },
162    SurfaceEntry {
163        requires: None,
164        command: "callgraph",
165        mode: "call_tree",
166        list_id: "payload.tree",
167        unit: Unit::Items,
168        narrow: &["depth", "includeTests"],
169        reasons: &[
170            ReasonEntry {
171                reason: Reason::Cap,
172                kind: ReasonKind::Selecting,
173                predicate_name: "HUB_SUMMARY_LIMIT",
174            },
175            ReasonEntry {
176                reason: Reason::Depth,
177                kind: ReasonKind::Bounding,
178                predicate_name: "depth_cut_inside_requested, truncated",
179            },
180        ],
181    },
182    // Note: `trace_to_symbol` was originally grouped with `trace_to` under `payload.paths`,
183    // but its reply is a single shortest path with no list semantics
184    // (`path: Option<Vec<...>>`), rather than a `paths` list. Truncation envelopes apply
185    // only to multi-path lists (`trace_to`).
186    SurfaceEntry {
187        requires: None,
188        command: "callgraph",
189        mode: "trace_to",
190        list_id: "payload.paths",
191        unit: Unit::Paths,
192        narrow: &["depth", "includeTests"],
193        reasons: &[
194            ReasonEntry {
195                reason: Reason::Depth,
196                kind: ReasonKind::Bounding,
197                predicate_name: "trace_to_result, max_depth_reached",
198            },
199            ReasonEntry {
200                reason: Reason::Budget,
201                kind: ReasonKind::Bounding,
202                predicate_name: "TRACE_TO_EXPANSION_BUDGET, trace_to_result_with_budget, lower_bound_trace_summary",
203            },
204            ReasonEntry {
205                reason: Reason::Cap,
206                kind: ReasonKind::Selecting,
207                predicate_name: "TRACE_TO_RETAINED_PATH_LIMIT, retain_trace_path, trace_to_symbol_result",
208            },
209        ],
210    },
211    SurfaceEntry {
212        requires: None,
213        command: "callgraph",
214        mode: "trace_data",
215        list_id: "payload.hops",
216        unit: Unit::Hops,
217        narrow: &["depth"],
218        reasons: &[ReasonEntry {
219            reason: Reason::Depth,
220            kind: ReasonKind::Bounding,
221            predicate_name: "depth_limited",
222        }],
223    },
224    SurfaceEntry {
225        requires: None,
226        command: "search",
227        mode: "",
228        list_id: "payload.results",
229        unit: Unit::Results,
230        narrow: &["offset", "topK", "path", "includeTests"],
231        reasons: &[
232            ReasonEntry {
233                reason: Reason::Walk,
234                kind: ReasonKind::Bounding,
235                predicate_name: "bounded_walk_search_envelope, fallback_search_envelope, execute_fallback_mode, ExternalFallbackBody, external_fallback_response, external_exact::sweep, walk_truncated",
236            },
237            ReasonEntry {
238                reason: Reason::Depth,
239                kind: ReasonKind::Bounding,
240                predicate_name: "SearchTrailer::shared_envelope_projection, StopState::S3DepthCap",
241            },
242            ReasonEntry {
243                reason: Reason::Budget,
244                kind: ReasonKind::Bounding,
245                // The regex route sets engine_capped in rank_collection when its
246                // file-count or time bound left candidate files unexamined.
247                predicate_name: "engine_capped, rank_collection, read_degraded_grep_file",
248            },
249            // from_matches is the regex route's per-result line allowance: a
250            // file lists its first matching lines and reports the rest in
251            // more_in_file and a "+N more in this file" line.
252            ReasonEntry {
253                reason: Reason::Cap,
254                kind: ReasonKind::Selecting,
255                predicate_name: "SearchTrailer::shared_envelope_projection, StopState::S1MoreAtDepth, StopState::S2Exhausted, more_available, handle_external_semantic_or_hybrid_search, handle_external_grep_search, handle_semantic_or_hybrid_search, handle_grep_search, from_matches, run_engine_ranking, blast_radius_annotation_for_result, enrich_snippets_from_source_reference, enrich_snippets_from_source_with_context, read_bounded_snippet_line, truncate_chars, split_semantic_results, split_semantic_from_data, handle_split_search, reply",
256            },
257        ],
258    },
259    SurfaceEntry {
260        requires: None,
261        command: "grep",
262        mode: "",
263        list_id: "payload.matches",
264        unit: Unit::Rows,
265        narrow: &["offset", "path", "include"],
266        reasons: &[
267            ReasonEntry {
268                reason: Reason::Walk,
269                kind: ReasonKind::Bounding,
270                predicate_name: "handle_grep, handle_grep_inner, grep_result, grep_result_bytes, walk_truncated, skipped_foreign_mounts",
271            },
272            ReasonEntry {
273                reason: Reason::Cap,
274                kind: ReasonKind::Selecting,
275                predicate_name: "DEFAULT_MAX_RESULTS, GREP_MAX_OUTPUT_BYTES, MAX_DISPLAY_MATCHES_PER_FILE, FIRST_PAGE_ROWS, FIRST_PAGE_BYTES, FIRST_PAGE_ROUNDS, WHOLE_RESULT_ROWS, WHOLE_RESULT_BYTES, SUMMARY_FILES_LISTED, SUMMARY_FOLDERS_LISTED, handle_grep, handle_grep_inner, format_grep_text, grep_page_output, round_robin_order, files_first_summary, rendered_grep_match_count",
276            },
277            // Lines in lockfiles, generated and minified files, logs and
278            // JSON data files are counted per file instead of printed, unless
279            // the call names them; past COUNTED_ENTRIES_LISTED entries the
280            // counted-only block folds the rest into one row per kind and
281            // marker.
282            ReasonEntry {
283                reason: Reason::Kind,
284                kind: ReasonKind::Selecting,
285                predicate_name: "HANDFUL_ROWS, HANDFUL_BYTES, COUNTED_ENTRIES_LISTED, grep_page_output, counted_entries, include_targets",
286            },
287        ],
288    },
289    SurfaceEntry {
290        requires: Some(crate::protocol::RESULT_FORMAT),
291        command: "ast_search",
292        mode: "matches",
293        list_id: "payload.matches",
294        unit: Unit::Results,
295        narrow: &["paths", "globs", "pattern"],
296        reasons: &[ReasonEntry {
297            reason: Reason::Budget,
298            kind: ReasonKind::Selecting,
299            predicate_name: "MatchBudget",
300        }],
301    },
302    SurfaceEntry {
303        requires: None,
304        command: "search",
305        mode: "",
306        list_id: "payload.skipped_files",
307        unit: Unit::Files,
308        narrow: &["path"],
309        reasons: &[ReasonEntry { reason: Reason::Cap, kind: ReasonKind::Selecting, predicate_name: "disclose_large_read_skips" }],
310    },
311    SurfaceEntry {
312        requires: None,
313        command: "grep",
314        mode: "",
315        list_id: "payload.skipped_files",
316        unit: Unit::Files,
317        narrow: &["path"],
318        reasons: &[ReasonEntry { reason: Reason::Cap, kind: ReasonKind::Selecting, predicate_name: "disclose_large_read_skips" }],
319    },
320    SurfaceEntry {
321        requires: None,
322        command: "grep",
323        mode: "",
324        list_id: "payload.ignored_entries",
325        unit: Unit::Paths,
326        narrow: &["path"],
327        reasons: &[
328            ReasonEntry { reason: Reason::Walk, kind: ReasonKind::Bounding, predicate_name: "MAX_IGNORE_PROBE_ENTRIES, ignored_entries_in_folder" },
329            ReasonEntry { reason: Reason::Cap, kind: ReasonKind::Selecting, predicate_name: "MAX_IGNORED_SCOPE_NAMES, ignored_entries_in_folder" },
330        ],
331    },
332    SurfaceEntry {
333        requires: None,
334        command: "glob",
335        mode: "",
336        list_id: "payload.files",
337        unit: Unit::Files,
338        narrow: &["path"],
339        reasons: &[
340            ReasonEntry {
341                reason: Reason::TimeLimit,
342                kind: ReasonKind::Bounding,
343                predicate_name: "walk_time_limit_reached, walk_files_unbounded, bounded_fallback_walk_files_with_limits_target",
344            },
345            // glob_from_view answers from the data layer's checkout listing,
346            // which never walks, so it reports walk_truncated false and no
347            // skipped mounts; a directory missing from the listing is handed
348            // to fallback_glob, whose walk can stop early.
349            ReasonEntry {
350                reason: Reason::Walk,
351                kind: ReasonKind::Bounding,
352                predicate_name: "GlobDiscovery, handle_glob, handle_glob_inner, fallback_glob, glob_root, glob_from_view, discover_glob_root, named_ignored_glob_walk_stops_at_cap_and_deadline, walk_truncated, skipped_foreign_mounts",
353            },
354            ReasonEntry {
355                reason: Reason::Cap,
356                kind: ReasonKind::Selecting,
357                predicate_name: "DEFAULT_MAX_RESULTS, MAX_DIRECTORY_SECTIONS, MAX_DISPLAY_DIRECTORIES, MAX_DISPLAY_FILES_PER_DIRECTORY, handle_glob, handle_glob_inner, format_glob_text, format_glob_output, format_glob_selected, rendered_glob_file_count",
358            },
359        ],
360    },
361    SurfaceEntry {
362        requires: None,
363        command: "outline",
364        mode: "files",
365        list_id: "payload.files",
366        unit: Unit::Files,
367        narrow: &["path"],
368        reasons: &[
369            ReasonEntry {
370                reason: Reason::TimeLimit,
371                kind: ReasonKind::Bounding,
372                predicate_name: "outline_batch_deadline_reached, stop_at_deadline, take_back_last_file, build_outline_structure_envelope",
373            },
374            ReasonEntry {
375                reason: Reason::Budget,
376                kind: ReasonKind::Selecting,
377                predicate_name: "MAX_OUTPUT_BYTES, discover_outline_files, handle_outline_files_mode, MultiFileTreeWriter, requested_outline_files, budget_rollups_present",
378            },
379            ReasonEntry {
380                reason: Reason::Walk,
381                kind: ReasonKind::Bounding,
382                predicate_name: "OutlineFileDiscovery, discover_outline_files_with_options, discover_outline_files_unbounded, collect_outline_files_with_device_lookup, collect_outline_files_breadth_first_with_device_lookup, outline_walk_skips_and_reports_injected_foreign_mount, ITERATIONS, collection_truncated, walk_truncated, skipped_foreign_mounts",
383            },
384        ],
385    },
386    SurfaceEntry {
387        requires: None,
388        command: "read",
389        mode: "directory",
390        list_id: "payload.entries",
391        unit: Unit::Items,
392        narrow: &["path", "offset", "limit"],
393        reasons: &[
394            ReasonEntry {
395                reason: Reason::Walk,
396                kind: ReasonKind::Bounding,
397                predicate_name: "handle_directory",
398            },
399            ReasonEntry {
400                reason: Reason::Cap,
401                kind: ReasonKind::Selecting,
402                predicate_name: "handle_directory",
403            },
404        ],
405    },
406    SurfaceEntry {
407        requires: None,
408        command: "inspect",
409        mode: "",
410        list_id: "payload.details",
411        unit: Unit::Items,
412        narrow: &["topK", "scope", "sections"],
413        reasons: &[ReasonEntry {
414            reason: Reason::Cap,
415            kind: ReasonKind::Selecting,
416            predicate_name: "details_for, generated_details_for, test_only_details_for, uncovered_files_details_for, topk_limiting, write_skipped_files, filter_payload_for_scope, SKIPPED_FILES_LIMIT, attach_complexity_size_skips",
417        }],
418    },
419    SurfaceEntry {
420        requires: None,
421        command: "bash",
422        mode: "",
423        list_id: "bash.output",
424        unit: Unit::Lines,
425        narrow: &[],
426        reasons: &[ReasonEntry {
427            reason: Reason::Cap,
428            kind: ReasonKind::Selecting,
429            predicate_name: "cap_lines, compress_json, finish, middle_truncate, append_hunk, cap_git_lines, compress_add, compress_blame, compress_diff, flush_status_entries, looks_like_golangci_json, finish_folded, first_error_lines, truncate_line, parse_tree, compress_tsc, frozen_compress_tsc, compressor_line_dropping, render_cut, cap_lines_head_tail, cap_text_head_tail, apply_plain_cap_streaming, test_verdict, cap_test_verdict, bounded_failure_sections",
430        }],
431    },
432    SurfaceEntry { requires: None, command: "bash", mode: "changed_files", list_id: "bash.changed_files", unit: Unit::Files, narrow: &[], reasons: &[ReasonEntry { reason: Reason::Cap, kind: ReasonKind::Selecting, predicate_name: "render" }, ReasonEntry { reason: Reason::TimeLimit, kind: ReasonKind::Bounding, predicate_name: "render" }] },
433    SurfaceEntry { requires: None, command: "bash", mode: "diff_lines", list_id: "bash.diff_lines", unit: Unit::Lines, narrow: &[], reasons: &[ReasonEntry { reason: Reason::Cap, kind: ReasonKind::Selecting, predicate_name: "diff_file" }] },
434];
435
436/// An entry in the discovery exclusions table with written justification.
437#[derive(Debug, Clone, Copy, PartialEq, Eq)]
438pub struct ExclusionEntry {
439    pub file: &'static str,
440    pub enclosing_item: &'static str,
441    pub location_or_primitive: &'static str,
442    pub reason: &'static str,
443}
444
445/// Exclusions from the registry-free discovery scan with non-empty written reasons.
446pub static EXCLUSIONS: &[ExclusionEntry] = &[
447    ExclusionEntry {
448        file: "access_policy/linked_worktree.rs",
449        enclosing_item: "nearest_common_dir, read_pointer",
450        location_or_primitive: "MAX_ANCESTORS, MAX_POINTER_BYTES",
451        reason: "Repository identity checks bound traversal and pointer reads; neither returns a partial tool result.",
452    },
453    ExclusionEntry {
454        file: "commands/edit_match.rs",
455        enclosing_item: "handle_single_file_edit_match",
456        location_or_primitive: "take(AMBIGUOUS_OCCURRENCE_LIST_LIMIT)",
457        reason: "An ambiguous edit is a refusal, not a result list: its structured occurrence rows stop at the same eight the error message lists, and the message states the exact match count and how many more were not listed.",
458    },
459    ExclusionEntry {
460        file: "commands/batch.rs",
461        enclosing_item: "resolve_edit_with_offsets",
462        location_or_primitive: "take(AMBIGUOUS_OCCURRENCE_LIST_LIMIT)",
463        reason: "An ambiguous batch edit is a refusal, not a result list: its structured occurrence rows stop at the same eight the error message lists, and the message states the exact match count and how many more were not listed.",
464    },
465    ExclusionEntry {
466        file: "subc/rich_ui/display/bash_tail.rs",
467        enclosing_item: "from_streams",
468        location_or_primitive: "MAX_LINES, MAX_CHARS, .take(MAX_LINES)",
469        reason: "The optional tool-display completion preview uses the shared text_lines limits; the command output and its list envelope are unchanged.",
470    },
471    ExclusionEntry {
472        file: "context/checkout_suggestion.rs",
473        enclosing_item: "unique_indexed_checkout_suffix",
474        location_or_primitive: "MAX_PATHS, MAX_COMPONENTS",
475        reason: "Missing-path correction refuses recovery when the complete indexed inventory or requested path exceeds its work budget; it never returns a suggestion based on a truncated candidate list.",
476    },
477    ExclusionEntry {
478        file: "subc/scope_describe.rs",
479        enclosing_item: "CompletedEnds::insert",
480        location_or_primitive: "COMPLETED_END_CAP, pop_front",
481        reason: "Internal completed-end notification deduplication evicts oldest stamps at capacity or after ten minutes; a later duplicate can repeat an idempotent cleanup notice but cannot truncate a tool result or kill an ended task again.",
482    },
483    ExclusionEntry {
484        file: "late_result_bus.rs",
485        enclosing_item: "scan,replay,read_batch,capacity,due,deliver",
486        location_or_primitive: "SCAN_BATCH (64), LATE_RESULTS_PAGE_MAX, UNACKED_RESULTS_MAX, SQL LIMIT",
487        reason: "internal bus wakes use index-seeked settlement batches and startup-only custodian feed pages; the retry set stops cursor advancement at the existing feed retention cap, leaving overflow durable in the ledger rather than shortening a command result list",
488    },
489    #[cfg(feature = "callgraph-shape-census")]
490    ExclusionEntry {
491        file: "data_layer/shape_census.rs",
492        enclosing_item: "top_callers",
493        location_or_primitive: "truncate(10)",
494        reason: "Opt-in measurement export of the ten highest exact caller counts, not an agent-facing list.",
495    },
496    ExclusionEntry {
497        file: "exec_remote/read_only_note.rs",
498        enclosing_item: "source_read_only_note",
499        location_or_primitive: ".take(1_000)",
500        reason: "Internal permission-error scan stops after 1,000 matching lines to select one explanatory note; it never truncates the command output or returns a result list.",
501    },
502    ExclusionEntry {
503        file: "gh_shim_speech/service.rs",
504        enclosing_item: "log_no_binding_row_refusal",
505        location_or_primitive: "UNCONFIGURED_BINDING_LOG_CAP, cap, clear",
506        reason: "Internal INFO-log deduplication history is cleared at capacity; older agents may log again, but refusals and agent-visible result lists are unchanged.",
507    },
508    ExclusionEntry {
509        file: "subc/consent.rs",
510        enclosing_item: "DirectoryScopeProbes::note_fallback",
511        location_or_primitive: "DIRECTORY_SCOPE_MISSING_LOG_CAP, clear",
512        reason: "Internal vanished-directory INFO-log history is cleared at capacity; older scopes may log again, without changing the original file grant or any agent-visible result list.",
513    },
514    ExclusionEntry {
515        file: "checkpoint.rs",
516        enclosing_item: "status_count, STATUS_DIRECTORY_ENTRIES, STATUS_MANIFEST_BYTES, STATUS_BLOB_CHECKS",
517        location_or_primitive: "bounded status observation",
518        reason: "The checkpoint status reader caps directory entries, metadata bytes and blob validations; exhaustion returns unknown, never a truncated count or result list. Authoritative list and mutations retain full recovery semantics.",
519    },
520    ExclusionEntry {
521        file: "github_read/threads.rs",
522        enclosing_item: "fetch_review_threads",
523        location_or_primitive: "MAX_THREAD_PAGES, MAX_EXTRA_COMMENT_PAGES",
524        reason: "GitHub read renders a canonical document rather than a ListEnvelope; bounded thread and comment-ID pagination discloses omitted counts, marks partial thread totals, and leaves unmatched comments' thread state unknown.",
525    },
526    ExclusionEntry {
527        file: "parser/todo_markers.rs",
528        enclosing_item: "markers_lexical",
529        location_or_primitive: ".take(MAX_LINES_PER_FILE)",
530        reason: "Bounds per-file lexical comment scanning when producing stored TODO marker facts; it is not response pagination.",
531    },
532    ExclusionEntry {
533        file: "parser/todo_markers.rs",
534        enclosing_item: "truncate_text",
535        location_or_primitive: ".take(MAX_TEXT_CHARS)",
536        reason: "Bounds the text of one TODO marker in its stored content record, not the number of findings returned by inspect.",
537    },
538    ExclusionEntry {
539        file: "parser/dead_code_facts.rs",
540        enclosing_item: "collect_rust_macro_token_refs,Step",
541        location_or_primitive: "scope_stack.truncate(scope_len)",
542        reason: "Restores the syntax walk's lexical scope after leaving a node; it does not cut findings or stored references.",
543    },
544    ExclusionEntry {
545        file: "parent_search/mod.rs",
546        enclosing_item: "discover,walk,note_outside,DEFAULT_MAX_CHILD_REPOS,MAX_DISCOVERY_DEPTH,MAX_DISCOVERY_ENTRIES,MAX_OUTSIDE_PATHS",
547        location_or_primitive: "bounded parent repository discovery and split_off(cap)",
548        reason: "Parent discovery bounds filesystem work and the served child set. Repositories past the child cap remain in Discovery.skipped and queries disclose them as parent_children_over_cap gaps; outside paths are bounded discovery diagnostics, not a paged result list.",
549    },
550    ExclusionEntry {
551        file: "commands/data_search.rs",
552        enclosing_item: "lexical_rank_at_depth",
553        location_or_primitive: ".take(depth), truncate(depth)",
554        reason: "Internal lexical candidate pool at the engine's requested depth; final search pagination and completeness are reported by the search result envelope, not this intermediate pool.",
555    },
556    ExclusionEntry {
557        file: "commands/data_search.rs",
558        enclosing_item: "rarest",
559        location_or_primitive: ".take(3)",
560        reason: "Selects three trigram keys to plan an index lookup, not files or findings in an agent-visible list.",
561    },
562    ExclusionEntry {
563        file: "commands/parent_query/engine.rs",
564        enclosing_item: "search_with_disclosure",
565        location_or_primitive: ".take()",
566        reason: "Option::take transfers the embedding model between the parent and child search contexts; it does not cut a list.",
567    },
568    ExclusionEntry {
569        file: "gh_shim_speech/start_view/sweep.rs",
570        enclosing_item: "sweep_entries",
571        location_or_primitive: "MAX_ENTRIES, MAX_PASS, max_entries, deadline",
572        reason: "Internal crash-file housekeeping bounds directory iteration per detached pass, retaining its iterator for continuation; it never truncates an agent-visible result list.",
573    },
574    ExclusionEntry {
575        file: "search_state/memo.rs",
576        enclosing_item: "DigestProofCache::insert",
577        location_or_primitive: "MAX_DIGEST_PROOF_BYTES",
578        reason: "Internal verified-content proof retention budget; eviction or bypass always falls back to reading and hashing the complete served page, never truncates search candidates or output.",
579    },
580    ExclusionEntry {
581        file: "subc/rich_ui/records.rs",
582        enclosing_item: "cut_detail",
583        location_or_primitive: "canonical byte limit, files.pop, UTF-8 stream prefix, hunks.pop, lines.pop",
584        reason: "tool-display/v1 details use their own truncated/omittedItems/omittedBytes envelope, measured on RFC 8785 bytes, rather than the model-facing ListEnvelope.",
585    },
586    ExclusionEntry {
587        file: "subc/rich_ui/display/edit_hunks.rs",
588        enclosing_item: "Hunks::push, Hunks::charge, line_prefix",
589        location_or_primitive: "MAX_HUNKS, MAX_LINES, MAX_LINE_BYTES, DIFF_RESPONSE_BUDGET",
590        reason: "Edit detail uses the tool-display truncation flag and serves the prefix retained for the Diff component; this does not limit the edit result.",
591    },
592    ExclusionEntry {
593        file: "subc/rich_ui/outbox.rs",
594        enclosing_item: "admit, retry, pop_due, ReadCache::insert, ReadCache::prune",
595        location_or_primitive: "MAX_CALLS, MAX_BYTES, EXPIRY, attempts",
596        reason: "Optional display delivery quotas bound pending snapshots and retries, never a tool's result list or execution.",
597    },
598    ExclusionEntry {
599        file: "subc/rich_ui/outbox/reads.rs",
600        enclosing_item: "ReadCache::insert, ReadCache::prune",
601        location_or_primitive: "MAX_CALLS, MAX_BYTES, MIN_READ_WINDOW, EXPIRY",
602        reason: "Process-local display pull copies have bounded count, bytes and retention; early pressure eviction is counted in bus health and missing records return the protocol's unknown refusal, not a truncated tool result.",
603    },
604    ExclusionEntry {
605        file: "subc/rich_ui/display.rs",
606        enclosing_item: "register",
607        location_or_primitive: "calls.len() >= 64",
608        reason: "Optional in-flight display capture admission is bounded independently of command execution; a rejected display capture never truncates the tool reply.",
609    },
610    ExclusionEntry {
611        file: "semantic_index.rs",
612        enclosing_item: "format_skipped_chunks_summary",
613        location_or_primitive: ".take(5)",
614        reason: "Diagnostic preview of refused-input paths; skipped chunks and omitted file counts are disclosed alongside the first five paths.",
615    },
616    ExclusionEntry {
617        file: "db/call_ledger.rs",
618        enclosing_item: "late_results_for_consumer",
619        location_or_primitive: "LATE_RESULTS_PAGE_MAX (256), SQL LIMIT cap + 1, take(cap), max_body",
620        reason: "tool-provider protocol feed pagination uses entries, cursor and more, not an AFT ListEnvelope; the existing 256-entry limit and encoded reply-byte bound retain continuation through the shared cursor",
621    },
622    ExclusionEntry {
623        file: "db/display_records.rs",
624        enclosing_item: "sweep, persist",
625        location_or_primitive: "SWEEP_LIMIT, SQL LIMIT, MAX_RECORDS, MAX_BYTES",
626        reason: "Durable display pull retention bounds housekeeping pages and stored output, not a tool result list; protected capacity defers wakes without truncating or evicting promised records.",
627    },
628    ExclusionEntry {
629        file: "db/access_grants.rs",
630        enclosing_item: "saved_scope_batch",
631        location_or_primitive: "SQL LIMIT, PER_TICK (4)",
632        reason: "Keyset pagination bounds background lifecycle probes, not permissions.list; every live grant remains listed and later maintenance ticks continue after the saved cursor.",
633    },
634    ExclusionEntry {
635        file: "db/codemode_owners.rs",
636        enclosing_item: "save",
637        location_or_primitive: "MAX_ROWS (4,096), SQL LIMIT/OFFSET",
638        reason: "Eviction bounds the optional local route identity cache, not a list returned by a tool.",
639    },
640    ExclusionEntry {
641        file: "subc/consent_expiry.rs",
642        enclosing_item: "candidates, Sweep::run",
643        location_or_primitive: "SQL LIMIT, ROW_LIMIT (32)",
644        reason: "Pagination bounds background withdrawal of idle file approvals. Later sweeps continue at the saved cursor; no tool returns this list.",
645    },
646    ExclusionEntry {
647        file: "subc/scope_watch.rs",
648        enclosing_item: "reconcile",
649        location_or_primitive: "SELECTORS_PER_WATCH (256), WATCHES_PER_CONNECTION (16)",
650        reason: "Daemon subscription limits partition internal lifecycle selectors; excess scopes retain polling coverage and are counted in health, never dropped from a tool result or from lifecycle monitoring.",
651    },
652    ExclusionEntry {
653        file: "subc/held_task_recovery.rs",
654        enclosing_item: "sessions",
655        location_or_primitive: "RECOVERY_CHUNK (64), SQL LIMIT, keyset pagination",
656        reason: "Internal startup recovery exhausts every candidate source in index-seeking pages; the chunk bounds one shared database mutex hold, not an agent-visible result list.",
657    },
658    ExclusionEntry {
659        file: "subc/shells/runtime.rs",
660        enclosing_item: "list, project_row, output",
661        location_or_primitive: "PAGE_SIZE, 2048, DEFAULT_CHUNK_BYTES, take_while",
662        reason: "The operator-only shells/v1 wire protocol uses next_cursor for 50-row pages, command_truncated for command previews, and raw offset/end_offset for bounded output chunks; no agent-visible list is shortened.",
663    },
664    ExclusionEntry {
665        file: "subc/shells/runtime.rs",
666        enclosing_item: "read_root_agents",
667        location_or_primitive: "SQL LIMIT, ROOT_ASSOCIATION_LIMIT (256), lookahead (257)",
668        reason: "Operator sidebar root-agent hints have one shared 256-association budget. A bounded SQL iterator reads one lookahead row; agent_ids_truncated marks that root and any later roots whose association lists were not fully visited. Shell rows and their holder resolution remain complete.",
669    },
670    ExclusionEntry {
671        file: "subc/shells/state.rs",
672        enclosing_item: "push, resync",
673        location_or_primitive: "HISTORY, PAGE_SIZE",
674        reason: "The provider journal has finite cursor retention; an expired position triggers a full resync. Split resync parts deliver every matching row and are applied only at final:true.",
675    },
676    ExclusionEntry {
677        file: "subc/shells/output.rs",
678        enclosing_item: "next, plan, backfill_start",
679        location_or_primitive: "max, budget, BACKFILL_BYTES",
680        reason: "Shell output is a byte-addressed subscription, not an agent list: backfill cuts are explicit in truncated_before, subsequent chunks preserve raw offset/end_offset, and oversized escapes are omitted without losing raw byte accounting.",
681    },
682    ExclusionEntry {
683        file: "subc/shells/wire.rs",
684        enclosing_item: "PAGE_SIZE, RETENTION_MS, DEFAULT_CHUNK_BYTES, MAX_CHUNK_BYTES, BACKFILL_BYTES",
685        location_or_primitive: "shells/v1 protocol constants",
686        reason: "Operator-only wire limits use explicit continuation cursors, resync parts and raw byte offsets; they do not bound or change any agent tool reply.",
687    },
688    ExclusionEntry {
689        file: "subc/shells/capture.rs",
690        enclosing_item: "open, read, read_screen",
691        location_or_primitive: "DEFAULT_CHUNK_BYTES, max, take_while, 500 ms",
692        reason: "Capture reads and incremental screen rendering have bounded working memory and preserve raw offset coverage. Screen coalescing limits update rate, not the shell inventory or any agent-visible list.",
693    },
694    ExclusionEntry {
695        file: "bash_background/shell_registry.rs",
696        enclosing_item: "shell_masked_range, format_context_possible, SHELL_MASK_CONTEXT_BYTES",
697        location_or_primitive: "bounded file scan and masking context",
698        reason: "Internal masking windows preserve raw byte coverage; undecidable ranges carry explicit withheld text. These bounds neither drop shell rows nor shorten an agent-visible list.",
699    },
700    ExclusionEntry {
701        file: "bash_background/completion_preview.rs",
702        enclosing_item: "shell_mask_window_with_values, watch_mask_region, mask_region_from",
703        location_or_primitive: "take(range.start), line_limit",
704        reason: "Masking inspects a byte-addressed context rather than returning a result list. Operator output uses bounded source windows with explicit withheld ranges; existing agent watch-preview limits remain unchanged.",
705    },
706    ExclusionEntry {
707        file: "log_redact.rs",
708        enclosing_item: "shells_ticket_range, SHELL_TICKET_RANGE_BYTES, replace_in",
709        location_or_primitive: "4 KiB ticket masking windows; take_while common prefix and suffix",
710        reason: "Every requested byte remains covered while ticket masking uses bounded overlapping source windows. This cap limits masking work per window, not rows, tool results or streamed raw offset coverage.",
711    },
712    ExclusionEntry {
713        file: "db/call_ledger.rs",
714        enclosing_item: "enforce_retention_bounds",
715        location_or_primitive: "UNACKED_RESULTS_MAX (1000), EXPIRED_ENTRIES_MAX (1000), SQL OFFSET",
716        reason: "durable protocol retention quotas bound stored terminal answers and non-terminal update payloads rather than shortening a command result list; acknowledged updates keep deduplication keys until their admitted call is removed",
717    },
718    ExclusionEntry {
719        file: "bash_background/remote.rs",
720        enclosing_item: "admission_progress_detail",
721        location_or_primitive: "MAX_DETAIL_CHARS character preview",
722        reason: "pre-acceptance progress detail is one display string, not a result list; its redacted text is ellipsized at a Unicode character boundary without omitting any task or output records",
723    },
724    ExclusionEntry {
725        file: "subc/rich_ui/bash_output.rs",
726        enclosing_item: "page, stream_items",
727        location_or_primitive: "limit, PAGE_BYTES, ITEM_BYTES",
728        reason: "Resumable cursor pages split output losslessly by byte limits instead of dropping result items.",
729    },
730    ExclusionEntry {
731        file: "bash_background/viewed_task.rs",
732        enclosing_item: "resolve",
733        location_or_primitive: "SQL LIMIT 2",
734        reason: "The LIMIT 2 uniqueness probe detects ambiguous task keys and never returns a list.",
735    },
736    ExclusionEntry {
737        file: "commands/read.rs",
738        enclosing_item: "fit_github_images, process_image_fitting",
739        location_or_primitive: "remaining image byte budget, MAX_IMAGE_FIT_STEPS",
740        reason: "binary image sidecars are a bounded multimodal supplement, not pageable result records; omitted attachments are disclosed in read text with an exact count and source links, while local images shrink to a fixed floor or refuse explicitly",
741    },
742    ExclusionEntry {
743        file: "bash_permissions/scan.rs",
744        enclosing_item: "top_level_directory_targets, MAX_CWD_PATHS, insert",
745        location_or_primitive: "MAX_CWD_PATHS",
746        reason: "internal cwd analysis retains at most eight folder/mode states per exit-status branch; exceeding that bound makes the folder unknown rather than removing alternatives, and no response list is shortened",
747    },
748    ExclusionEntry {
749        file: "task_watch_lines.rs",
750        enclosing_item: "LineDelivery",
751        location_or_primitive: "MAX_LINES_PER_NOTIFICATION, MAX_NOTIFICATIONS_PER_MINUTE, MAX_LINE_BYTES",
752        reason: "Async push notifications are not command-response lists. LineBatch reports exact cap drops and the source stream/byte offset; oversized lines explicitly mark scanning incomplete.",
753    },
754    ExclusionEntry {
755        file: "standalone_input.rs",
756        enclosing_item: "read_bounded_line, room, push",
757        location_or_primitive: "MAX_LINE_BYTES / MAX_RETAINED_BYTES / MAX_RETAINED_ITEMS / MAX_HELD_BYTES / MAX_HELD_ITEMS",
758        reason: "transport admission and allocation bounds, not result-list cuts; oversized frames and excess held requests receive explicit errors, retained input keeps its budget charge across queue moves",
759    },
760    ExclusionEntry {
761        file: "cli/sandbox_launch/landlock_backend.rs",
762        enclosing_item: "session_task_read_paths",
763        location_or_primitive: "tasks.truncate(MAX_SESSION_READ_TASKS)",
764        reason: "internal Landlock read-grant snapshot; tasks beyond the 500-entry budget stay unreadable without a broader grant, not an agent-visible list",
765    },
766    ExclusionEntry {
767        file: "gh_shim.rs",
768        enclosing_item: "summarize_bypass_audit",
769        location_or_primitive: "BYPASS_AUDIT_RECENT_LIMIT (10), VecDeque::pop_front",
770        reason: "gh --status audit preview, not an AFT tool result list; bypass_audit_count discloses the exact total and --status --audit returns the full audit",
771    },
772    ExclusionEntry {
773        file: "gh_shim/read_contract.rs",
774        enclosing_item: "validate, validate_path",
775        location_or_primitive: "MAX_REPLY_BYTES job ranges and per_page <= 100",
776        reason: "closed GitHub read wire validation refuses oversized ranges and page sizes; it does not truncate an AFT result list",
777    },
778    ExclusionEntry {
779        file: "gh_shim/read_executor.rs",
780        enclosing_item: "decode_reply",
781        location_or_primitive: "REPLY_BYTES payload ceiling and returned byte range validation",
782        reason: "the GitHub read wire refuses oversized or malformed replies rather than silently cutting a response list",
783    },
784    ExclusionEntry {
785        file: "gh_shim/read_render.rs",
786        enclosing_item: "checked, fetch, stream_log",
787        location_or_primitive: "REPLY_BYTES and bounded JobLog byte windows",
788        reason: "governed read transport bound, not an AFT list surface; oversized replies refuse and complete logs stream through all byte windows",
789    },
790    ExclusionEntry {
791        file: "gh_shim/read_render.rs",
792        enclosing_item: "list, search, native",
793        location_or_primitive: "per_page caps of 100 (10 for Actions runs), adaptive page-size retries, items.iter().take(remaining), items.iter().take(plan.limit() - rows.len()) and native gh --limit selection",
794        reason: "REST API paging and gh-compatible explicit output limits, not an AFT tool result list; over-return is a fetch error",
795    },
796    ExclusionEntry {
797        file: "gh_shim/worker_reads.rs",
798        enclosing_item: "limit, search_query",
799        location_or_primitive: "native gh defaults and 1000-result search ceiling",
800        reason: "gh-compatible CLI output limits and GitHub search refusal, not an AFT list surface",
801    },
802    ExclusionEntry {
803        file: "lsp/manager.rs",
804        enclosing_item: "walk_applicable_area_uncached",
805        location_or_primitive: "visited >= entry_limit",
806        reason: "internal applicability discovery, not a response list; exhausting the iterator budget returns an explicit incomplete-walk error instead of certifying a partial server set",
807    },
808    ExclusionEntry {
809        file: "runtime_drain.rs",
810        enclosing_item: "collect_mutation_paths",
811        location_or_primitive: "budget.exhausted()",
812        reason: "bounded internal mutation-index discovery, not a response list; ignored directories are pruned, examined counts are logged, and unfinished work schedules a background corpus replacement with the index marked not ready",
813    },
814    ExclusionEntry {
815        file: "backup.rs",
816        enclosing_item: "discovery_limits, merge_disk_stack_heads, run_operation_discard",
817        location_or_primitive: "MAX_SESSION_DISCOVERY_ENTRIES, examined >= entry_limit, BackupIoBudget::check, ROLLBACK_CLEANUP_ALLOWANCE",
818        reason: "internal durable undo-stack discovery stops at its entry or deadline budget and returns an error, never a partial path list or false no-history result; operation-scoped rollback stops before advancing its path iterator when the independent cleanup allowance expires, queues the remaining paths for retry, and logs one deferred-path count; per-file undo avoids the session scan",
819    },
820    ExclusionEntry {
821        file: "status_inventory.rs",
822        enclosing_item: "discover_into",
823        location_or_primitive: "examined >= limits.entry_limit, BackupIoBudget::check",
824        reason: "the shared durable undo-stack discovery pass (also behind status-push tracked-file counts) stops at its entry or deadline budget and returns an error, never a partial path list; the status count then falls back to resident keys exactly as tracked_files does",
825    },
826    ExclusionEntry {
827        file: "runtime_drain.rs",
828        enclosing_item: "drop",
829        location_or_primitive: "budget.exhausted()",
830        reason: "bounded internal mutation-index refresh, not a response list; refreshed counts are logged and budget exhaustion schedules one background corpus replacement instead of certifying stale search answers as complete",
831    },
832    ExclusionEntry {
833        file: "commands/configure.rs",
834        enclosing_item: "join_storage_sweep_worker",
835        location_or_primitive: "Option .take()",
836        reason: "test-only handoff of the held storage sweep worker's join handle out of its gate, not a list",
837    },
838    ExclusionEntry {
839        file: "commands/url_resolution.rs",
840        enclosing_item: "drop",
841        location_or_primitive: "with_secret_fetch_for_test::Restore::drop self.0.take(), self.1.take()",
842        reason: "Option::take restores the previous test fetch vault and options when the scoped helper exits; neither call cuts a list",
843    },
844    ExclusionEntry {
845        file: "commands/configure.rs",
846        enclosing_item: "view_working_tree_refresh_path",
847        location_or_primitive: "max_examined .take()",
848        reason: "startup verification of persisted view bytes, not a result list; reaching the iterator budget schedules a full background publication and refuses stale graph answers rather than treating partial verification as complete",
849    },
850    ExclusionEntry {
851        file: "commands/configure.rs",
852        enclosing_item: "view_git_changed_paths",
853        location_or_primitive: "max_examined .take()",
854        reason: "bounded startup dirty-path discovery, not a result list; truncated subprocess output or reaching the iterator budget forces full view publication rather than certifying the checkout as clean",
855    },
856    ExclusionEntry {
857        file: "context.rs",
858        enclosing_item: "should_emit",
859        location_or_primitive: "256-entry status-bar session history / pop_front",
860        reason: "bounded deduplication bookkeeping, not a result list; evicting an idle session only repeats its next bar and never suppresses a changed value",
861    },
862    ExclusionEntry {
863        file: "lsp/manager.rs",
864        enclosing_item: "remember",
865        location_or_primitive: "WATCHED_LIFECYCLE_CAP / oldest pop_first",
866        reason: "per-server watched-file echo bookkeeping, not a result list; eviction can only forward a duplicate lifecycle event, never hide a file change",
867    },
868    ExclusionEntry {
869        file: "edit.rs",
870        enclosing_item: "drop, notify_full_validation_start",
871        location_or_primitive: "FULL_VALIDATION_START_HOOK Option::take",
872        reason: "consumes or clears a test-only callback; Option::take removes one optional value, not entries from an agent-visible list",
873    },
874    ExclusionEntry {
875        file: "edit.rs",
876        enclosing_item: "foreign_group",
877        location_or_primitive: "groups.truncate(count.max(0) as usize)",
878        reason: "test helper shrinking a getgroups buffer to the count the OS returned; group ids for a fixture, never an agent-visible list",
879    },
880    ExclusionEntry {
881        file: "edit.rs",
882        enclosing_item: "read_sized",
883        location_or_primitive: "buffer.truncate(read_size as usize)",
884        reason: "shrinks a byte buffer to the size the OS reported for an extended-attribute name list or value; raw metadata copied to the replacement file, never an agent-visible list",
885    },
886    ExclusionEntry {
887        file: "edit.rs",
888        enclosing_item: "REFORMATTED_EXCERPT_MAX_LINES, REFORMATTED_EXCERPT_MAX_BYTES, compute_reformatted_excerpt, excerpt_caps_bound_owned_line_construction",
889        location_or_primitive: "REFORMATTED_EXCERPT_MAX_",
890        reason: "bounds an inline post-format source excerpt, not a paginated list; oversized excerpts retain the existing extensive marker instead of returning partial source text",
891    },
892    ExclusionEntry {
893        file: "subc_format.rs",
894        enclosing_item: "format_ast_search_capture",
895        location_or_primitive: "AST_CAPTURE_INLINE_CHAR_LIMIT .chars().take()",
896        reason: "long or multiline AST capture values are referenced by their line range in the matched excerpt with an ellipsized first-line character preview; no match or capture entries are omitted, and the complete values remain in the structured response",
897    },
898    ExclusionEntry {
899        file: "subc_format.rs",
900        enclosing_item: "append_zoom_annotation_calls",
901        location_or_primitive: "ZOOM_CALL_ANNOTATION_LIMIT .take()",
902        reason: "aft_zoom displays at most 15 file-local call references per annotation section and counts omitted references with +N more; all annotation entries remain in the structured response",
903    },
904    ExclusionEntry {
905        file: "bash_background/registry.rs",
906        enclosing_item: "format_background_slot_refusal",
907        location_or_primitive: "SLOT_REFUSAL_MAX_ROWS / SLOT_REFUSAL_COMMAND_CHARS .take()",
908        reason: "a background-launch error previews at most eight of the caller's slot holders, counts omitted own holders and other sessions' holders, and shortens command labels with an ellipsis; this is actionable refusal context, not a paginated task-result list",
909    },
910    ExclusionEntry {
911        file: "bash_background/registry.rs",
912        enclosing_item: "kill_survivors_line",
913        location_or_primitive: "KILL_SURVIVORS_NAMED .take()",
914        reason: "the one-line kill-survivor notice names the first three surviving processes and counts the rest with +N more; every listed survivor stays in the structured live_descendants field",
915    },
916    ExclusionEntry {
917        file: "bash_background/process.rs",
918        enclosing_item: "bounded_members, safe_name, macos_argv, capped_identities",
919        location_or_primitive: "LIVE_DESCENDANT_CAP .take(), LIVE_DESCENDANT_NAME_CAP .take(), MAX_ARGS, GROUP_IDENTITY_CAP .take()",
920        reason: "a process-group check keeps at most 16 members and reports the exact omitted count in live_descendants_omitted; each member's name is shortened with an ellipsis and its arguments are never kept; the record keeps at most 1,024 member identities for recognising the group later and flags when more were found; this is task status detail, not a paginated result list",
921    },
922    ExclusionEntry {
923        file: "subc/consent.rs",
924        enclosing_item: "scope_reason_path",
925        location_or_primitive: "160-character reason limit, middle path-component elision, repository basename chars().take()",
926        reason: "consent-card display text, not a tool result list; the approved sentence stays intact while its path shows home as ~, keeps the repository basename before ancestor components, and visibly middle-elides a basename only when it alone cannot fit; the request path, scope pattern and stored grant retain the full path",
927    },
928    ExclusionEntry {
929        file: "subc/health.rs",
930        enclosing_item: "budget_health_metrics_with_limits, fit_health_metrics, group_health_roots, trim_health_root_groups, reduce_health_root_details, gap_largest_ancillary_health_field, compact_health_lsp_preview, enforce_health_hard_limit, abbreviate_health_root, abbreviated_health_path, abbreviated_health_refusal, build_health_diagnostic_rollup_from_actors",
931        location_or_primitive: "HEALTH_PROJECT_BUDGET_BYTES, HEALTH_ROOT_GROUP_EXAMPLES truncate, example pop and preview removal, healthy root detail cap and removal, default root counter removal, abnormal root reduction with largest-only overflow prefix, LSP preview clear, cache/root path and free-text caps, storage_retention map removal, v2_family_sweeps and data_store_failed pop, named telemetry gaps under HEALTH_METRICS_BUDGET_BYTES, root and optional gap-id pop under project and reply ceilings",
932        reason: "management health detail, not an agent result list; process telemetry is budgeted independently first, project detail receives at most half the metrics budget and only the remainder; repeated normal statuses always keep count and status, with exact examples_omitted, root_details_omitted and root_detail_gap.summarized counts; failed or stalled roots stay individual, most severe first; project cuts report root_detail_gap; abnormal reductions preserve failure facts and count root_details_reduced; current watcher loss keeps its overflow total and largest prefix; LSP fleet totals survive preview removal; identities that fit the project ceiling are not shortened by process pressure; long identities use full digests and bounded free text names the bytes cut; other oversized telemetry becomes a named gap with its original byte size",
933    },
934    ExclusionEntry {
935        file: "subc/health.rs",
936        enclosing_item: "health_lsp_metrics",
937        location_or_primitive: "HEALTH_LSP_APPLICABILITY_ROOT_CAP .take()",
938        reason: "health-only LSP cost preview, not a paginated result list; six roots ordered by full-walk time then misses are rendered with bounded digest-backed paths; applicability totals cover all roots with exact total and omitted counts, while the cached census and explicit status keep all roots",
939    },
940    ExclusionEntry {
941        file: "lsp/child_registry.rs",
942        enclosing_item: "health_for_children",
943        location_or_primitive: "LSP_CHILD_ROOT_DETAIL_CAP / split_off before child-row construction",
944        reason: "LSP child health telemetry bounds roots before rendering per-kind rows; exact omitted-root, child-count and RSS totals cover every omitted root, not a paginated tool result list",
945    },
946    ExclusionEntry {
947        file: "subc/route_census.rs",
948        enclosing_item: "snapshot, ScopeDescriptions::record",
949        location_or_primitive: "ROOT_LIMIT, ROUTE_LIMIT, PRINCIPAL_LIMIT, DESCRIPTION_LIMIT",
950        reason: "management-only ownership diagnostics, not an agent result list; root and per-root route details and principal groups have exact omitted counts while summary counts include omitted rows; the latest-result scope cache is bounded and reports evictions, with absent observations remaining unknown",
951    },
952    ExclusionEntry {
953        file: "gc/family.rs",
954        enclosing_item: "SweepStatsStore::update",
955        location_or_primitive: "SWEEP_STATS_FAMILY_LIMIT / pop_front",
956        reason: "observational health telemetry retains the latest 64 family details, not a paginated result list; cap evictions and retired-family removals are disclosed separately",
957    },
958    ExclusionEntry {
959        file: "status_push.rs",
960        enclosing_item: "project",
961        location_or_primitive: "REFUSAL_DETAILS .take()",
962        reason: "root-owned status notification detail, not an agent result list; exact refusal totals, omitted and unattributed counts remain present with an explicit status read pointer",
963    },
964    ExclusionEntry {
965        file: "status_push.rs",
966        enclosing_item: "bounded_body, scalar, summary",
967        location_or_primitive: "BODY_MAX_BYTES count-only wire summary and bounded scalar strings",
968        reason: "status notifications are not paginated results; deterministic compact summaries retain consumer scalar state and exact list/refusal totals with an explicit status read pointer",
969    },
970    ExclusionEntry {
971        file: "subc/push.rs",
972        enclosing_item: "drain_turn",
973        location_or_primitive: "STATUS_FANOUT_TURN_BYTES",
974        reason: "per-root status wire scheduling budget; remaining route deliveries retain the latest state and resume on later turns without omitting recipients",
975    },
976    ExclusionEntry {
977        file: "bash_background/registry.rs",
978        enclosing_item: "cleanup_finished_at_with, gc_harness_stores",
979        location_or_primitive: "GC_ENTRY_BUDGET maintenance queue and namespace iterator",
980        reason: "internal housekeeping advances bounded round-robin queues and resumable directory iterators; retained work is revisited on later passes, not truncated from an agent-visible list",
981    },
982    ExclusionEntry {
983        file: "sandbox_spawn/task_temp.rs",
984        enclosing_item: "sweep_stale",
985        location_or_primitive: "SWEEP_BUDGET directory iterator advancement",
986        reason: "internal crash cleanup resumes the same iterator on later task launches; the budget bounds maintenance work and does not cut an agent-visible list",
987    },
988    ExclusionEntry {
989        file: "bash_background/gc_cursor.rs",
990        enclosing_item: "next_batch",
991        location_or_primitive: "GC_ENTRY_BUDGET directory iterator advancement",
992        reason: "internal persisted-task and quarantine retention scans resume the same iterator next pass; the cap bounds inspection work, not returned records",
993    },
994    ExclusionEntry {
995        file: "bash_background/gc_memo.rs",
996        enclosing_item: "due_batches",
997        location_or_primitive: "GC_ENTRY_BUDGET ordered deadline iterator advancement",
998        reason: "internal retention candidates beyond the budget remain indexed for the next maintenance request; no agent-visible records are truncated",
999    },
1000    ExclusionEntry {
1001        file: "search_state/memo.rs",
1002        enclosing_item: "make_room_for, store_literal_presence, prune_lifecycle",
1003        location_or_primitive: "MAX_EXACT_MEMO_BYTES, MAX_LITERAL_PRESENCE_BYTES, MAX_RETIRED_POISONED_BYTES and obsolete-generation cache retirement",
1004        reason: "internal reconstructible cache ownership only; complete verified results still feed ranking and oversized entries are served without retention, while evicted literal-presence answers are recomputed; no agent-visible result is cut",
1005    },
1006    ExclusionEntry {
1007        file: "commands/semantic_search/data_file.rs",
1008        enclosing_item: "is_data_file_after_metadata",
1009        location_or_primitive: "io::Read::take(DATA_FILE_MIN_BYTES)",
1010        reason: "classification needs only the size threshold or a long line in a smaller file; reaching the byte threshold classifies the file as data, without cutting a result list",
1011    },
1012    ExclusionEntry {
1013        file: "search_state/memo.rs",
1014        enclosing_item: "digest_open_file_at_size",
1015        location_or_primitive: "io::Read::take(size)",
1016        reason: "small and streamed digests both stop at the descriptor's size at open; growth changes the stat and is re-digested by the next lookup, not silently accepted as a complete current-file hash",
1017    },
1018    ExclusionEntry {
1019        file: "search_state/request_files.rs",
1020        enclosing_item: "read_whole_file_at",
1021        location_or_primitive: "io::Read::take(stat.size)",
1022        reason: "reads the descriptor's size at open; files above the whole-read ceiling are separately disclosed as skipped, not silently cut from a result list",
1023    },
1024    ExclusionEntry {
1025        file: "bash_background/remote.rs",
1026        enclosing_item: "append_executor_environment_disclosure",
1027        location_or_primitive: "executor environment name preview min(10)",
1028        reason: "supplemental execution note names at most ten filtered environment variables and explicitly counts the rest with +N more; the complete executor report remains in persisted task metadata, not a paginated tool-result list",
1029    },
1030    ExclusionEntry {
1031        file: "bash_background/remote.rs",
1032        enclosing_item: "render_terminal_report",
1033        location_or_primitive: "workspace changes preview PATH_LIMIT and folder summary GROUP_LIMIT",
1034        reason: "supplemental remote execution report names at most twenty paths and summarizes the remainder in at most five folder groups with exact counts; the complete list remains in the build server's terminal record, not a paginated tool-result list",
1035    },
1036    ExclusionEntry {
1037        file: "subc/bind_log.rs",
1038        location_or_primitive: "consumer_capabilities preview (eight-entry slice cap)",
1039        reason: "Bounds RouteBind INFO logging only; does not cut a product result list.",
1040        enclosing_item: "consumer_capabilities",
1041    },
1042    ExclusionEntry {
1043        file: "subc/held_task_recovery.rs",
1044        enclosing_item: "recover",
1045        location_or_primitive: "missing root log preview (five examples)",
1046        reason: "Bounds an INFO log preview only; the total count is logged and no product result list is cut.",
1047    },
1048    ExclusionEntry {
1049        file: "large_read.rs",
1050        enclosing_item: "summarize_health_sites",
1051        location_or_primitive: "top-site health preview truncate(4)",
1052        reason: "Bounds supplemental health telemetry only; count, bytes, largest, whole_count, whole_bytes and sites_active still aggregate every active site, so the preview does not cut a tool result list.",
1053    },
1054    ExclusionEntry {
1055        file: "url_fetch.rs",
1056        enclosing_item: "hash_url",
1057        location_or_primitive: "URL cache hash prefix",
1058        reason: "cache filename derivation takes a fixed digest prefix, not a truncation of agent-visible text or records",
1059    },
1060    ExclusionEntry {
1061        file: "commands/url_output.rs",
1062        enclosing_item: "cap_text",
1063        location_or_primitive: "URL rendered text byte ceiling",
1064        reason: "remote document previews use an explicit truncated-at-N-of-M-bytes footer with URL and symbol narrowing advice; this is a byte cut, not a paginated list of records",
1065    },
1066    ExclusionEntry {
1067        file: "edit.rs",
1068        enclosing_item: "render_diff, separator, write_str, finish",
1069        location_or_primitive: "shared optional diff response byte budget",
1070        reason: "optional diff text is omitted as a whole with an explicit notice when its byte allowance is exceeded; every file outcome and line count remains, so this does not cut a result list",
1071    },
1072    ExclusionEntry {
1073        file: "file_read_exact.rs",
1074        enclosing_item: "bounded_bytes",
1075        location_or_primitive: "exact binary read byte ceiling",
1076        reason: "the module operation refuses oversized files after at most one lookahead byte; no truncated list or partial file is returned",
1077    },
1078    ExclusionEntry {
1079        file: "subc/perf_sweep.rs",
1080        enclosing_item: "parse_log",
1081        location_or_primitive: "bounded log iterator and take(8) metric previews",
1082        reason: "flow-only telemetry stops at byte or line caps and reports truncated plus scanned counts; top tool and WARN previews disclose tools_total and warn_shapes_total, not a paginated agent list",
1083    },
1084    ExclusionEntry {
1085        file: "subc/diagnostics_findings.rs",
1086        enclosing_item: "bounded_body",
1087        location_or_primitive: "truncate(5) samples and size >= BODY_LIMIT response trimming",
1088        reason: "diagnostics.findings v1 is a bounded diagnosis snapshot, not a paginated ledger; samples are removed first, then tail findings, and retained counts are unchanged as required by the vendored contract",
1089    },
1090    ExclusionEntry {
1091        file: "subc/perf_sweep.rs",
1092        enclosing_item: "summarize_profile, child_output, ChildCapture::drain",
1093        location_or_primitive: "top eight threads, first stack, leaf frame and child-output ceilings",
1094        reason: "flow-only profile summary preserves the sweep script's preview limits with threads_total; bounded child stdout is refused as a named gap rather than returned partially, and a marked bounded stderr tail preserves the failure cause",
1095    },
1096    ExclusionEntry {
1097        file: "url_fetch.rs",
1098        enclosing_item: "read_response_body, read_response_body_with, download_to_cache, fetch_with_secrets",
1099        location_or_primitive: "URL download byte ceiling and UTF-8 prefix repair",
1100        reason: "the producer stops after a bounded prefix and one lookahead byte; cached metadata discloses the cut with the known size or an explicit lower bound, separately from the rendered output ceiling",
1101    },
1102    ExclusionEntry {
1103        file: "tool_output.rs",
1104        enclosing_item: "cap_with_scope, cap_read, notice_suffix, render_cut, render_cut_with_data, read, cleanup_expired, SCAN_ENTRIES, save_failed_trailer",
1105        location_or_primitive: "rendered reply and saved artifact byte bounds",
1106        reason: "a transport-independent text byte budget, not a list surface; preserves list envelopes and saves the uncut reply in a session-private file with a recovery trailer; read instead reclaims whole source lines for its native paging footer and notices without saving a copy; failure reasons have a bounded UTF-8 prefix, artifact reads have a separate 64 MiB allocation guard, and retention cleanup resumes each bounded directory scan",
1107    },
1108    ExclusionEntry {
1109        file: "output_store.rs",
1110        enclosing_item: "read, cleanup_expired, SCAN_ENTRIES",
1111        location_or_primitive: "saved tool result storage bounds",
1112        reason: "Saved-file byte limits and bounded artifact cleanup do not truncate response lists.",
1113    },
1114    ExclusionEntry {
1115        file: "hashline/snapshot/mod.rs",
1116        enclosing_item: "read_body_limit, render_tagged_snapshot_with_options, render_tagless_snapshot_with_options",
1117        location_or_primitive: "hashline read byte budget with reserved finalization headroom",
1118        reason: "a source-text byte ceiling, not a result list; elision is decided before publishing exactly the rendered seen-line set, and the existing footer names unaddressable lines; finalization preserves published rows and spends reserved headroom on notices",
1119    },
1120    ExclusionEntry {
1121        file: "commands/bash_watch.rs",
1122        enclosing_item: "output_tail",
1123        location_or_primitive: "worker watch tail byte and line preview",
1124        reason: "a recent-output prose preview, not a result list; limits bytes as well as lines so a single huge log line cannot bypass the preview budget; full task output remains on disk",
1125    },
1126    ExclusionEntry {
1127        file: "subc/scope_background_tasks.rs",
1128        enclosing_item: "scan_saved, scan_sessions, next_entry, expected_roots, registry_snapshot",
1129        location_or_primitive: "WALK_LIMIT",
1130        reason: "owner-only management snapshot, not an agent result list; complete false with a reason discloses every bounded or failed walk",
1131    },
1132    ExclusionEntry {
1133        file: "bash_background/scoped_tasks.rs",
1134        enclosing_item: "running",
1135        location_or_primitive: "COMMAND_BYTES",
1136        reason: "a command preview, not a result list; command_truncated identifies the UTF-8 byte ceiling",
1137    },
1138    ExclusionEntry {
1139        file: "bash_background/runner_notice_scheduler.rs",
1140        enclosing_item: "offer_follow",
1141        location_or_primitive: "QUEUE_CAPACITY",
1142        reason: "an internal delivery queue bound, not a limit on results returned to an agent",
1143    },
1144    ExclusionEntry {
1145        file: "subc/bash_notice_text.rs",
1146        enclosing_item: "long_running",
1147        location_or_primitive: "120 UTF-16 code-unit command preview",
1148        reason: "a command text preview rather than a result list; preserves the existing OpenCode reminder formatter, including its ellipsis and full-command inspection guidance",
1149    },
1150    ExclusionEntry {
1151        file: "db/runner_harness_keys.rs",
1152        enclosing_item: "copy_aliases_with_limit, lookup_alias",
1153        location_or_primitive: "SOURCE_LIMIT and SQL LIMIT",
1154        reason: "startup value migration bounds source rows before copying and skips an oversized batch atomically; fallback reads select one authoritative row by identical key and deterministic recency, not an agent result list; originals remain available for rollback",
1155    },
1156    ExclusionEntry {
1157        file: "bash_background/registry.rs",
1158        enclosing_item: "try_scope_background_tasks",
1159        location_or_primitive: "remaining iterator budget",
1160        reason: "scope.background_tasks shares its bounded scan budget with saved records and returns complete false on exhaustion, never a complete empty done-gate snapshot",
1161    },
1162    ExclusionEntry {
1163        file: "commands/bash_watch/restart.rs",
1164        enclosing_item: "watch_unknown",
1165        location_or_primitive: "watch_unknown state.held.take() and state.wait.take()",
1166        reason: "Option::take consuming the held-call identity and its wait before settling an unknown result; no list is cut",
1167    },
1168    ExclusionEntry {
1169        file: "cold_build_limiter/progress.rs",
1170        enclosing_item: "snapshot",
1171        location_or_primitive: "take(LIST_CAP)",
1172        reason: "management health telemetry, not an agent list; running and queued are bounded at their iterators and disclose exact omitted counts",
1173    },
1174    ExclusionEntry {
1175        file: "github_read/fetch.rs",
1176        enclosing_item: "read_capped",
1177        location_or_primitive: "bounded gh subprocess reader",
1178        reason: "bounds stdout and stderr at the iterator; diff fetch ceilings are disclosed independently of line paging, and metadata ceilings refuse the fetch",
1179    },
1180    ExclusionEntry {
1181        file: "github_read/diff.rs",
1182        enclosing_item: "fetch_diff, page",
1183        location_or_primitive: "PR diff diagnostic paths and line window",
1184        reason: "diagnostic changed-path previews and sequential diff line pages integrate their list envelope trailers into content through the authorized NDJSON text builder",
1185    },
1186    ExclusionEntry {
1187        file: "grep_executor.rs",
1188        enclosing_item: "diagnose_scope_counts, diagnose_scope_counts_unbounded, bounded_fallback_walk_files_with_limits_target, walk_files_unbounded, walk_each_file_unbounded",
1189        location_or_primitive: "MAX_FALLBACK_WALK_FILES / FALLBACK_WALK_BUDGET",
1190        reason: "bounded filesystem fallback and empty-scope exclusion probe; ignored directories are pruned and counted once, and an exhausted probe reports unknown/incomplete rather than claiming an empty filesystem",
1191    },
1192    ExclusionEntry {
1193        file: "inspect/diagnostics_category.rs",
1194        enclosing_item: "ScopeWalkBudget, scoped_coverage_candidates_with_budget",
1195        location_or_primitive: "200_000 entry limit and scoped walk deadline",
1196        reason: "internal scoped-file inventory, not a paginated findings list; budget rejection is retained separately from iterator exhaustion and adds an analysis_incomplete gap with unknown diagnostic totals",
1197    },
1198    ExclusionEntry {
1199        file: "commands/inspect.rs",
1200        enclosing_item: "scoped_in_root_file_count, build_inspect_payload_with_offset",
1201        location_or_primitive: "ScopeWalkBudget scoped file count",
1202        reason: "internal corpus census, not a paginated findings list; an incomplete walk reports a named gap, marks scope_files_complete false, and renders the count as a lower bound",
1203    },
1204    ExclusionEntry {
1205        file: "cache_location/markers.rs",
1206        enclosing_item: "sweep_all_read_markers_pinned, sweep_marker_generation, read_marker_protection, marker_file_is_protected",
1207        location_or_primitive: "shared repair traversal budget and read-marker byte limit",
1208        reason: "internal marker liveness and cleanup, not result lists; incomplete or oversized marker reads protect the cache rather than authorize deletion",
1209    },
1210    ExclusionEntry {
1211        file: "pinned_dir.rs",
1212        enclosing_item: "RepairBudget, DirectoryEntries, unix_entries, unix_names, repair_names, directory_identities, collect_directory_identities, repair_measure, repair_remove_contents, windows_repair_names, repair_descendant, repair_validate_descendants",
1213        location_or_primitive: "repair traversal depth, entry and deadline bounds",
1214        reason: "internal cache repair and retention walks, not result lists; an incomplete identity census or inventory refuses deletion and interrupted removal reports partial progress",
1215    },
1216    ExclusionEntry {
1217        file: "crates/aft-store/src/family/disk.rs",
1218        enclosing_item: "Scan::open_dir, Scan::next_entry",
1219        location_or_primitive: "shared entry cap and deadline across manifest discovery and leftover file measurement",
1220        reason: "internal index store disk accounting, not a result list; a stopped scan keeps bytes, examined entries and the stop reason and withholds the total from status",
1221    },
1222    ExclusionEntry {
1223        file: "views/callgraph_copies.rs",
1224        enclosing_item: "evict_for",
1225        location_or_primitive: "EVICTION_CANDIDATES and five-second deadline",
1226        reason: "internal database admission maintenance, not result lists; exhausted eviction work makes the checkout borrow the main graph",
1227    },
1228    ExclusionEntry {
1229        file: "views/tree_base.rs",
1230        enclosing_item: "identity_for_admission, prove_until",
1231        location_or_primitive: "optional admission deadline in member proof and membership identity loops",
1232        reason: "internal reuse proof, not result lists; an expired proof cannot establish base reuse or authorize deletion",
1233    },
1234    ExclusionEntry {
1235        file: "views/base_builder.rs",
1236        enclosing_item: "claim_base_locked",
1237        location_or_primitive: "LIVE_BASES_PER_FAMILY",
1238        reason: "internal base admission count, not result lists; held capacity borrows a published graph or keeps text on its planned retry path",
1239    },
1240    ExclusionEntry {
1241        file: "storage_retention.rs",
1242        enclosing_item: "evict_least_recent_v3_member, reclaim_v3_admission_family",
1243        location_or_primitive: "SQL LIMIT and take(max_examined), 64-removal loop and five-second admission deadline",
1244        reason: "internal LRU database reclamation, not result lists; every deletion rechecks references and live holds and insufficient reclaim preserves the device-space refusal",
1245    },
1246    ExclusionEntry {
1247        file: "gh_shim/ticket_repository.rs",
1248        enclosing_item: "Cache::insert",
1249        location_or_primitive: "MAX_ROOTS",
1250        reason: "internal repository snapshot LRU, not a result list; eviction recomputes the binding from Git on the next ticket rather than omitting a repository",
1251    },
1252    ExclusionEntry {
1253        file: "cache_location.rs",
1254        enclosing_item: "candidates_and_durable, candidates_and_durable_with_budget, deletion_protections, deletion_protections_with_budget, retention_protections_with_budget, ensure_cache_idle",
1255        location_or_primitive: "RepairBudget",
1256        reason: "internal cleanup preflight, not result lists; exhausting the traversal budget refuses all deletion rather than accepting incomplete protection or lock inventories",
1257    },
1258    ExclusionEntry {
1259        file: "storage_retention.rs",
1260        enclosing_item: "bounded_dirs, traversal_batch_filtered, next_batch, sweep_view_generations, v3_view_domains, generation_registries, report_generation_registry_error, validate_tree, validate_tree_with_admission, validate_tree_observed, TreeObservation::unchanged, report_candidate_error, DueBatch::flush, PreparedDue::refuse, candidate_inner, reap_trash, reap_trash_with_snapshot_budget, reap_trash_with_cursor, trash_scans, reap_retired_with_budget, due_first, orphan_first, run_pass_with_budget, prune_bindings, retirement_members, retirement_members_with_budget, write_retirement_witness, verify_retirement_witness, collect_v3_idle, collect_v3_family_at, report_v3_idle_unknown, root_history, drain_due_views",
1261        location_or_primitive: "DUE_FIRST_ENTRIES, PASS_ENTRIES, TREE_ENTRIES, HISTORY_ENTRIES, TRASH_SCAN_HANDLES, reaper deadline and 10ms mount-snapshot admission budget, 64-view generation batch, 16 diagnostic errors or incomplete reasons per list, take, v3 idle SQL LIMIT 1 and member/deadline window, HISTORY_ENTRIES root-history census chunks and four immediate census followups",
1262        reason: "internal disk-maintenance walks, not tool-result lists; bounded lexical batches persist only processed names, retained-tree metadata probes honor the repair budget, TRASH_SCAN_HANDLES counts active iterators rather than completed refusal memos, incomplete protection snapshots refuse deletion, root-history iterators resume until a directory-stable census completes, and health separates real errors from incomplete work while reporting census examined/accumulated/restarted/complete alongside remaining views, trash estimates and kept reasons",
1263    },
1264    ExclusionEntry {
1265        file: "views/registry.rs",
1266        enclosing_item: "members_bounded, read_members_limited",
1267        location_or_primitive: "SQL LIMIT",
1268        reason: "internal family membership census, not an agent-visible list; an incomplete membership snapshot aborts background marking rather than deleting unmarked content",
1269    },
1270    ExclusionEntry {
1271        file: "views/assembly_seed.rs",
1272        enclosing_item: "worktree_roots, read_worktree_child, read_worktree_roots",
1273        location_or_primitive: "take(MAX_BYTES + 1), take(65_536), MAX_WORKTREES",
1274        reason: "optional sibling donor discovery bounds Git topology bytes, records and worktrees at their iterators; an incomplete or malformed enumeration disables reuse rather than claiming a freshest donor",
1275    },
1276    ExclusionEntry {
1277        file: "views/derived_index.rs",
1278        enclosing_item: "candidates, record",
1279        location_or_primitive: "SQL LIMIT CANDIDATES_PER_KIND, LIMIT RETAINED_ROWS",
1280        reason: "internal donor hints for derived-database seeding, not an agent-visible list; a candidate outside the bound or a trimmed row only means a seedless publication falls back to the worktree census or a cold build",
1281    },
1282    ExclusionEntry {
1283        file: "views/generation.rs",
1284        enclosing_item: "generation_directory_entries, bounded_directory_entries, blob_references_by_generation, generation_sweep_registry, has_superseded_artifacts, sweep_generations_bounded, claim_generation, reap_generation_trash, remove_generation_files",
1285        location_or_primitive: "take(limit.saturating_add(1)), truncate(limit), take(GENERATION_DIRECTORY_LIMIT), MAX_CLAIM_FILES atomic retirement batch",
1286        reason: "internal generation/protection enumeration; ownership or blob-mark overflow aborts before deletion, an oversized directory is cleaned one bounded window per pass that keeps any generation whose derived-owner reference it cannot see, and an incomplete temporary-file deletion pass only leaves garbage for a later pass",
1287    },
1288    ExclusionEntry {
1289        file: "views/reference_sidecar.rs",
1290        enclosing_item: "free_slots",
1291        location_or_primitive: "take(limit.saturating_add(1))",
1292        reason: "internal count of view-directory entries, taken once per blob scan or publication, that bounds how many reference sidecars may be added; counting stops just past the limit because only the free slots below it matter, and a skipped sidecar only means blob GC decodes that manifest",
1293    },
1294    ExclusionEntry {
1295        file: "gc/mod.rs",
1296        enclosing_item: "sweep_bounded, mark_live_assembly_pins, sweep_plane",
1297        location_or_primitive: "take(8193), take(4097), LIMIT 4096",
1298        reason: "internal mark-and-sweep budgets; incomplete marks refuse deletion and a SQL keyset cursor resumes bounded deletion; row/deletion counts and compaction deferrals are reported",
1299    },
1300    ExclusionEntry {
1301        file: "root_cache.rs",
1302        enclosing_item: "read_marker_protection",
1303        location_or_primitive: "take(4097)",
1304        reason: "internal reader-protection census; an unread marker or iterator overflow is protected, never permission to unlink a generation",
1305    },
1306    ExclusionEntry {
1307        file: "callgraph_store/mod.rs",
1308        enclosing_item: "gc_old_generations",
1309        location_or_primitive: "take(4096)",
1310        reason: "internal generation deletion batch, not a query result list; the current pointer and protected readers are checked independently for every candidate",
1311    },
1312    ExclusionEntry {
1313        file: "lsp/completed_rust_check.rs",
1314        enclosing_item: "sweep_records",
1315        location_or_primitive: "RECORD_SCAN_LIMIT, MAX_RECORDS",
1316        reason: "background disk-cache maintenance, not an agent-visible list; the scan counts directory entries inside the iterator loop and logs examined, removed and completion counts; a bounded scan refuses a new record until it can certify the 64-record cap",
1317    },
1318    ExclusionEntry {
1319        file: "subc/tool_provider.rs",
1320        enclosing_item: "uncertain_settlement_frame",
1321        location_or_primitive: "SETTLEMENT_RESULT_EXCERPT_BYTES",
1322        reason: "bounded diagnostic byte excerpt of an already formatted terminal, not a result-list cutoff; original_result_truncated explicitly discloses omitted bytes and no replay guarantee is claimed",
1323    },
1324    ExclusionEntry {
1325        file: "logging.rs",
1326        enclosing_item: "write_str",
1327        location_or_primitive: "PANIC_MESSAGE_BYTES, PANIC_BACKTRACE_BYTES",
1328        reason: "panic diagnostics bound formatted text, not a tool-result list; message and stack have separate byte budgets and an explicit truncation marker",
1329    },
1330    ExclusionEntry {
1331        file: "bash_db_hints/mod.rs",
1332        enclosing_item: "table_list, render, run_probe",
1333        location_or_primitive: "BLOCK_CAP, PROBE_OUTPUT_CAP",
1334        reason: "supplemental read-only schema trailer, not a paginated bash output list; omitted tables or schemas are explicitly counted, and an over-cap probe is discarded and counted as an error",
1335    },
1336    ExclusionEntry {
1337        file: "agent_child_env.rs",
1338        enclosing_item: "refresh_legacy_git_hooks_until",
1339        location_or_primitive: "legacy hook directory and file byte take",
1340        reason: "internal cache-maintenance enumeration and input-byte safety bounds, not an agent-visible list; the iterator caps new verification work, preserves verified progress on a bounded scan, and logs examined and rewritten counts plus whether its scan was bounded",
1341    },
1342    // The views-on semantic gap note names its first few missing files in the
1343    // response text; every missing file is listed in the JSON `semantic_gap`
1344    // field, and the text says how many more there are.
1345    ExclusionEntry {
1346        file: "commands/semantic_search/mod.rs",
1347        enclosing_item: "disclose",
1348        location_or_primitive: "semantic gap note take",
1349        reason: "summary line naming the first few files a views-on semantic answer is missing, with its own '(+N more)' count; the full list is in the semantic_gap JSON field",
1350    },
1351    // The unanalyzed-macro note on `callers` is one summary line, not a list
1352    // the agent pages through: it states how many mentions exist (or that the
1353    // count is a lower bound) and says how many of them it spells out.
1354    ExclusionEntry {
1355        file: "data_layer/callgraph_store_adapter.rs",
1356        enclosing_item: "unanalyzed_macro_note",
1357        location_or_primitive: "macro note site truncate",
1358        reason: "summary line under the callers list that carries its own count and 'shown N of M' wording; the callers list itself keeps its envelope",
1359    },
1360    ExclusionEntry {
1361        file: "callgraph_store/mod.rs",
1362        enclosing_item: "unresolved_call_site_count_filtered",
1363        location_or_primitive: "UNRESOLVED_CALL_SITE_COUNT_LIMIT, SQL LIMIT",
1364        reason: "bounded count for callers and impact incompleteness notes, including nonempty answers with matching unresolved names, not a list cut; the note says 'at least N' at the limit and the callers and impact lists retain their own truncation metadata",
1365    },
1366    // The borrowed-graph coverage note on callgraph answers is one summary
1367    // line: it names the first few files the borrowed graph does not reflect
1368    // and says how many more there are.
1369    ExclusionEntry {
1370        file: "commands/callgraph_borrowed.rs",
1371        enclosing_item: "sample",
1372        location_or_primitive: "coverage note file sample take",
1373        reason: "summary line naming the first few files a borrowed callgraph does not reflect, with its own 'and N more' count; the counts are in the borrowed_coverage JSON field and the answer's own list keeps its envelope",
1374    },
1375    // The lexical lane's depth tiers are engine-internal cuts over a candidate
1376    // pool (D_k = 200..3200); the agent never sees this list. The only cut an
1377    // agent sees is the search surface's topK, which carries the envelope.
1378    ExclusionEntry {
1379        file: "commands/semantic_search/lexical_lane.rs",
1380        enclosing_item: "from_scored_candidates",
1381        location_or_primitive: "depth-tier truncate",
1382        reason: "engine-internal lexical depth tier over the candidate pool; not an agent-visible list, the search surface attaches the envelope",
1383    },
1384    ExclusionEntry {
1385        file: "commands/semantic_search/lexical_lane.rs",
1386        enclosing_item: "enumerate_to_depth",
1387        location_or_primitive: "depth-tier take",
1388        reason: "engine-internal lexical depth tier over the candidate pool; not an agent-visible list, the search surface attaches the envelope",
1389    },
1390    ExclusionEntry {
1391        file: "commands/semantic_search/lexical_lane.rs",
1392        enclosing_item: "score_complete_selected_pool",
1393        location_or_primitive: "depth-tier take",
1394        reason: "engine-internal lexical depth tier over the candidate pool; not an agent-visible list, the search surface attaches the envelope",
1395    },
1396    // The block builder's page cut and the depth-tier observation are engine
1397    // cuts inside the search engine; the page the agent sees is the search
1398    // surface's, which attaches the envelope and the paging trailer.
1399    ExclusionEntry {
1400        file: "commands/semantic_search/blocks.rs",
1401        enclosing_item: "build",
1402        location_or_primitive: "page take",
1403        reason: "engine-internal page cut over the frozen block list; the search surface attaches the envelope and paging trailer",
1404    },
1405    ExclusionEntry {
1406        file: "commands/semantic_search/blocks.rs",
1407        enclosing_item: "observe_through_depth",
1408        location_or_primitive: "depth-tier take",
1409        reason: "engine-internal depth-tier observation over lane candidates; not an agent-visible list",
1410    },
1411    ExclusionEntry {
1412        file: "commands/semantic_search/paging.rs",
1413        enclosing_item: "build_l",
1414        location_or_primitive: "interval take",
1415        reason: "engine-internal interval cut when building L over frozen blocks; the served page's envelope and paging trailer are the search surface's",
1416    },
1417    ExclusionEntry {
1418        file: "commands/semantic_search/rerank/mod.rs",
1419        enclosing_item: "rerank_head",
1420        location_or_primitive: "page take",
1421        reason: "re-cuts the served page from the reranked canonical list with the same offset and topK as the block builder; the search surface computes the envelope and paging trailer from that page afterwards",
1422    },
1423    ExclusionEntry {
1424        file: "commands/semantic_search/rerank/mod.rs",
1425        enclosing_item: "rerank_positions",
1426        location_or_primitive: "rerank candidate take",
1427        reason: "selects which first-block entries a reranker may reorder (at most the configured rerank top_n); nothing is dropped from the list, so the served page and its paging trailer are unchanged in length",
1428    },
1429    ExclusionEntry {
1430        file: "commands/semantic_search/rerank/pool_export.rs",
1431        enclosing_item: "entries",
1432        location_or_primitive: "benchmark pool export take",
1433        reason: "benchmark-only export, written only when AFT_RERANK_POOL_EXPORT is set, of a fixed number of first-block candidates to a file; it is never part of a tool response",
1434    },
1435    ExclusionEntry {
1436        file: "commands/semantic_search/rerank/tests.rs",
1437        enclosing_item: "onnx_cost_profile_when_available",
1438        location_or_primitive: "test candidate text truncate",
1439        reason: "test-only cost profile that trims each candidate's text to a byte budget before timing the local reranker; no tool response is produced",
1440    },
1441    ExclusionEntry {
1442        file: "commands/semantic_search/exact_lane.rs",
1443        enclosing_item: "copied_worktree_exact_fallback_reproduction",
1444        location_or_primitive: "test walk-list truncate",
1445        reason: "ignored manual reproduction test that replays the former 1,000-file fallback walk cap to compare it with the current walk; no tool response is produced",
1446    },
1447    ExclusionEntry {
1448        file: "commands/glob.rs",
1449        enclosing_item: "exact_file_glob_with_ready_index_matches_basename_without_widening_scope, exact_file_glob_fallback_matches_basename_without_widening_scope",
1450        location_or_primitive: "test walk_truncated assertions",
1451        reason: "test-only assertions on walk_truncated for indexed and fallback exact-file discovery; they do not cut a list or produce a tool response",
1452    },
1453    // Checkpoint and restore results name their first files and then say how
1454    // many more there are; the checkpoint itself always covers every file.
1455    ExclusionEntry {
1456        file: "subc_format.rs",
1457        enclosing_item: "checkpoint_path_lines",
1458        location_or_primitive: "checkpoint path lines take",
1459        reason: "summary of a checkpoint or restore result naming its first few files with its own '… and N more' count; the operation covers every file and no paging applies",
1460    },
1461    ExclusionEntry {
1462        file: "commands/bash_status.rs",
1463        enclosing_item: "handle",
1464        location_or_primitive: "bash_status / bash live-tail",
1465        reason: "bash live-tail (bash_status polling) output is shown raw by design and carries no truncation envelope",
1466    },
1467    ExclusionEntry {
1468        file: "bash_background/registry.rs",
1469        enclosing_item: "read_artifact_page",
1470        location_or_primitive: "ARTIFACT_PAGE_BYTES",
1471        reason: "raw artifact transport is paged in bytes, not output lines or list records; callers continue at the actual returned byte offset and has_more discloses a captured backlog rather than claiming exhaustion",
1472    },
1473    ExclusionEntry {
1474        file: "commands/bash_status.rs",
1475        enclosing_item: "read_status_artifact_page",
1476        location_or_primitive: "ARTIFACT_PAGE_BYTES",
1477        reason: "store-unavailable status reads use the same bounded byte pages as registered tasks; next_offset and has_more describe the remaining artifact rather than a list truncation envelope",
1478    },
1479    ExclusionEntry {
1480        file: "commands/status.rs",
1481        enclosing_item: "handle",
1482        location_or_primitive: "summary count arrays",
1483        reason: "summary counts and census count arrays are totals by construction and carry no truncation envelope",
1484    },
1485    ExclusionEntry {
1486        file: "commands/delete_file.rs",
1487        enclosing_item: "MAX_PATHS",
1488        location_or_primitive: "commands::delete_file::MAX_PATHS",
1489        reason: "error message preview of offending non-regular file paths is diagnostic formatting, not a returned list payload",
1490    },
1491    ExclusionEntry {
1492        file: "commands/outline.rs",
1493        enclosing_item: "render_top_level_entries",
1494        location_or_primitive: "type member preview take",
1495        reason: "a type API preview with an exact '(N more)' count; single-file outlines list every product member, and the outer file budget carries the list trailer",
1496    },
1497    ExclusionEntry {
1498        file: "commands/outline.rs",
1499        enclosing_item: "inspect_outline_file_content",
1500        location_or_primitive: "bounded line-count byte reader",
1501        reason: "caps bytes inspected for a file's line-count statistic; the file remains in the outline with an unknown line count, so no agent-visible list items are removed",
1502    },
1503    ExclusionEntry {
1504        file: "commands/outline.rs",
1505        enclosing_item: "files_walk_stall_keeps_examined_paths_and_named_gap",
1506        location_or_primitive: "collection_truncated regression assertion",
1507        reason: "a test observes incomplete discovery; the assertion does not cut an agent-visible list",
1508    },
1509    ExclusionEntry {
1510        file: "commands/read.rs",
1511        enclosing_item: "handle_streaming_range_read",
1512        location_or_primitive: "bounded streamed line window",
1513        reason: "limits bytes retained while reading a selected text line; truncated content and scan gaps are disclosed by the read response, not a cut to a list of files or result records",
1514    },
1515    ExclusionEntry {
1516        file: "commands/lsp_diagnostics.rs",
1517        enclosing_item: "build_response, compute_unchecked_files, handle_directory_mode",
1518        location_or_primitive: "commands::lsp_diagnostics::DIRECTORY_FILE_CAP",
1519        reason: "internal diagnostics scanner file resolution cap is an engine boundary, not a returned list",
1520    },
1521    ExclusionEntry {
1522        file: "watcher_filter.rs",
1523        enclosing_item: "derive_exclusion_plan, refresh_touched",
1524        location_or_primitive: "WATCHER_EXCLUSION_LIMIT kernel exclusion slots",
1525        reason: "internal watcher exclusion budget, not an agent-visible result list; paths without a kernel exclusion slot remain rejected at the walk boundary",
1526    },
1527    ExclusionEntry {
1528        file: "shell_format.rs",
1529        enclosing_item: "format_seconds",
1530        location_or_primitive: "shell_format::seconds.truncate",
1531        reason: "string manipulation trimming timestamp representation, not a list truncation",
1532    },
1533    ExclusionEntry {
1534        file: "commands/zoom.rs",
1535        enclosing_item: "suggest_close_symbols",
1536        location_or_primitive: "commands::zoom::resolve_zoom_symbol candidate suggestion",
1537        reason: "did-you-mean candidate suggestion trimming for invalid symbol error messages",
1538    },
1539    ExclusionEntry {
1540        file: "commands/grep.rs",
1541        enclosing_item: "truncate_line_text",
1542        location_or_primitive: "commands::grep::truncate_line_text",
1543        reason: "line text preview truncation, not a list truncation",
1544    },
1545    ExclusionEntry {
1546        file: "commands/semantic_search/mod.rs",
1547        enclosing_item: "collect_degraded_grep_files, empty_degraded_grep_fallback_names_missing_semantic_coverage, execute_degraded_grep_fallback, handle_external_bounded_lexical_fallback, semantic_unavailable_grep_fallback_response",
1548        location_or_primitive: "commands::semantic_search degraded grep fallback status",
1549        reason: "internal fallback search status notes and degraded grep walk markers",
1550    },
1551    ExclusionEntry {
1552        file: "subc_format.rs",
1553        enclosing_item: "unresolved_summary_text",
1554        location_or_primitive: "subc_format::UNRESOLVED_SUMMARY_NAME_LIMIT",
1555        reason: "unresolved call site summary line preview names formatting",
1556    },
1557    ExclusionEntry {
1558        file: "subc_format.rs",
1559        enclosing_item: "format_outline_files_text",
1560        location_or_primitive: "subc_format::MAX_UNCHECKED_FILES_IN_FOOTER",
1561        reason: "legacy unchecked files list in outline text footer",
1562    },
1563    ExclusionEntry {
1564        file: "subc_format.rs",
1565        enclosing_item: "structure_outline_trailer_stays_last_after_skips",
1566        location_or_primitive: "walk_truncated",
1567        reason: "test-only response fixture proving that an integrated structure-map trailer remains last after skipped-file diagnostics; production outline walk and budget cuts are registered on the outline surface",
1568    },
1569    ExclusionEntry {
1570        file: "subc_format.rs",
1571        enclosing_item: "directory_outline_preserves_walk_truncation_footer, files_outline_uses_the_counting_walk_limit_in_partial_footer",
1572        location_or_primitive: "subc_format walk truncation footer tests",
1573        reason: "test assertions verifying legacy walk truncation footer",
1574    },
1575    ExclusionEntry {
1576        file: "commands/trace_to_symbol.rs",
1577        enclosing_item: "handle_trace_to_symbol",
1578        location_or_primitive: "commands::trace_to_symbol::handle_trace_to_symbol",
1579        reason: "trace_to_symbol reply is a single shortest path (path: Option<Vec<...>>) with no list semantics, so it carries no truncation envelope",
1580    },
1581    ExclusionEntry {
1582        file: "response_finalize.rs",
1583        enclosing_item: "drop",
1584        location_or_primitive: "response_finalize::DeferredWakeGuard drop self.0.take()",
1585        reason: "Option::take restoring the previous deferred-completion wake when a guard drops; no list is cut",
1586    },
1587    ExclusionEntry {
1588        file: "commands/configure.rs",
1589        enclosing_item: "schedule_artifact_loads_admitted",
1590        location_or_primitive: "commands::configure::schedule_artifact_loads_admitted warm_permit.take()",
1591        reason: "Option::take releasing a warm-reload permit before a cold-build acquire; no list is cut",
1592    },
1593    ExclusionEntry {
1594        file: "search_index.rs",
1595        enclosing_item: "git_diff_within_path_limit",
1596        location_or_primitive: "WARM_GIT_DIFF_PATH_LIMIT",
1597        reason: "bounds the union of warm Git-diff and disk-stale paths; over-limit refreshes are rejected before content reads and configure falls back to a full cold rebuild, so no agent-visible list is truncated",
1598    },
1599    ExclusionEntry {
1600        file: "search_index.rs",
1601        enclosing_item: "verify_file_mtimes_with_budget",
1602        location_or_primitive: "changed_paths.len() > limit",
1603        reason: "admission budget for disk-only changes and Git-diff paths; an over-budget refresh returns a cache miss for a permitted full rebuild, not a truncated agent-visible list",
1604    },
1605    ExclusionEntry {
1606        file: "commands/semantic_search/lexical_lane.rs",
1607        enclosing_item: "reference_selected_pool",
1608        location_or_primitive: "commands::semantic_search::lexical_lane::reference_selected_pool",
1609        reason: "test-only reference implementation choosing the three rarest trigram postings to compare against the optimized pool; not an agent-visible list",
1610    },
1611    ExclusionEntry {
1612        file: "commands/zoom.rs",
1613        enclosing_item: "indexed_offsets_avoid_repeated_prefix_scans_at_end_of_large_file",
1614        location_or_primitive: "commands::zoom indexed offset work-count test",
1615        reason: "test fixture selecting sample offsets for a work-count assertion; not an agent-visible list",
1616    },
1617    ExclusionEntry {
1618        file: "commands/semantic_search/mod.rs",
1619        enclosing_item: "audit1432_degraded_transient_rows_are_bounded_by_concurrency_not_all_files",
1620        location_or_primitive: "degraded grep fixture expected first ten rows",
1621        reason: "test-only reference selecting the expected input-order prefix before comparing independently sorted paths and line numbers; no tool response is produced",
1622    },
1623    // Split-query search (aft_search with both query and pattern). The
1624    // results list is the search surface's, cut and enveloped by the engine;
1625    // these items only describe the pattern input.
1626    ExclusionEntry {
1627        file: "commands/semantic_search/split_query.rs",
1628        enclosing_item: "line",
1629        location_or_primitive: "commands::semantic_search::split_query::SUMMARY_DEFINITION_SITES",
1630        reason: "the one-line pattern summary names at most three definition sites as a preview; the reply's pattern_summary.definition_files carries the full count, and no result is removed",
1631    },
1632    ExclusionEntry {
1633        file: "commands/semantic_search/split_query.rs",
1634        enclosing_item: "from_bounded_scan, bounded_scan_groups_lines_by_file_and_keeps_the_bound",
1635        location_or_primitive: "commands::semantic_search::split_query bounded scan truncation flags",
1636        reason: "reads (or, in the test, sets) the bounded grep scan's truncation flags to mark the pattern examination capped; nothing is cut here, and the split reply discloses the bound through its budget envelope",
1637    },
1638    ExclusionEntry {
1639        file: "commands/semantic_search/split_query.rs",
1640        enclosing_item: "selective_definitions, admission_definers, expand_group",
1641        location_or_primitive: "commands::semantic_search::split_query::MAX_PLACED_DEFINITIONS, MAX_GROUP_EXPANSION",
1642        reason: "bounds the definitions scored for relevance or carried into the ranking and the alternatives a group expands into; these are ranking inputs, no list is shown to the agent, and the results list is cut and enveloped by the engine",
1643    },
1644    // Identifier search in another project (external path): the sweep's
1645    // results page is the search surface's, registered under its cap reason.
1646    ExclusionEntry {
1647        file: "commands/semantic_search/external_exact.rs",
1648        enclosing_item: "sweep_after_metadata",
1649        location_or_primitive: "commands::semantic_search::external_exact::sweep skipped_foreign_mounts",
1650        reason: "counts mount points of other filesystems that the walk does not enter; no list is cut here, and a walk the deadline stops is reported through the sweep's enumeration_stopped and the reply's coverage line",
1651    },
1652    ExclusionEntry {
1653        file: "commands/semantic_search/mod.rs",
1654        enclosing_item: "count",
1655        location_or_primitive: "commands::semantic_search external grep coverage line walk_truncated",
1656        reason: "reads the bounded scan's truncation flag to word the coverage line; nothing is cut here, and the same flag marks the reply incomplete in external_fallback_response",
1657    },
1658    ExclusionEntry {
1659        file: "commands/semantic_search/nearest_names.rs",
1660        enclosing_item: "nearest_names",
1661        location_or_primitive: "commands::semantic_search::nearest_names NEAREST_NAME_FILE_LIMIT, NEAREST_NAME_LIMIT",
1662        reason: "a not-found answer suggests a few nearest names: the scan reads a bounded number of files and keeps the most similar names; these are suggestions for a name that occurs nowhere, not a cut of matching results",
1663    },
1664    ExclusionEntry {
1665        file: "commands/semantic_search/external_pattern.rs",
1666        enclosing_item: "semantic_results",
1667        location_or_primitive: "commands::semantic_search::external_pattern::Corpus semantic enumeration",
1668        reason: "enumerates at most SEMANTIC_ENUMERATION_LIMIT prose candidates before ranking, like the external query-only route; more_available reports the remaining candidates and the engine envelopes the results page",
1669    },
1670    ExclusionEntry {
1671        file: "commands/inspect.rs",
1672        enclosing_item: "partial_reason_from_parts",
1673        location_or_primitive: "commands::inspect::MAX_INSPECT_HEADER_PARTS",
1674        reason: "the PARTIAL status line shows every explicitly requested cause first, then previews unrequested causes up to MAX_INSPECT_HEADER_PARTS total parts and says `+N more`; every scanner reason stays in the body and the structured gaps, diagnostic overflow reasons are rendered in the body, and the cap never changes `complete`",
1675    },
1676    ExclusionEntry {
1677        file: "commands/inspect/gap_render.rs",
1678        enclosing_item: "incomplete_analysis_reason_with_files",
1679        location_or_primitive: "commands::inspect::MAX_PARSE_FAILURE_FILES",
1680        reason: "an incomplete-analysis explanation previews five parse-failure paths with their parse reasons and says `+N more`; this is a coverage gap, not a findings page. The full failure count and structured parse_errors stay visible and scope can narrow the affected files; the preview never changes completeness",
1681    },
1682    ExclusionEntry {
1683        file: "bounded_io.rs",
1684        enclosing_item: "walk_permission_gap",
1685        location_or_primitive: ".take(3)",
1686        reason: "three-folder preview inside a gap note with the full skipped count, not a pageable list",
1687    },
1688    ExclusionEntry {
1689        file: "bounded_io.rs",
1690        enclosing_item: "Reader::chunk",
1691        location_or_primitive: "buffer.truncate(count)",
1692        reason: "shrinks an I/O buffer to the number of bytes read; later chunks retain the rest of the file, so no result rows are cut",
1693    },
1694    ExclusionEntry {
1695        file: "commands/semantic_search/snippet_bounds.rs",
1696        enclosing_item: "LineWindow",
1697        location_or_primitive: "SNIPPET_LINE_MAX_CHARS",
1698        reason: "incremental implementation of the existing per-line text window, with exactly the same ellipsis and truncation marker; bounds retained characters, not result rows",
1699    },
1700    ExclusionEntry {
1701        file: "data_layer/surfaces.rs",
1702        enclosing_item: "disclose_index_gaps",
1703        location_or_primitive: "INDEX_GAP_PREVIEW",
1704        reason: "coverage-gap preview, not a findings page; skipped_folders counts every relevant unreadable folder and skipped_folders_omitted counts names beyond the preview",
1705    },
1706    ExclusionEntry {
1707        file: "data_layer/surfaces.rs",
1708        enclosing_item: "disclose_parse_gaps",
1709        location_or_primitive: "INDEX_GAP_PREVIEW",
1710        reason: "parse-coverage preview; skipped_parses and skipped_parses_omitted retain full counts; parse_gaps_list and its standard trailer disclose the preview cap",
1711    },
1712    ExclusionEntry {
1713        file: "commands/semantic_search/mod.rs",
1714        enclosing_item: "CheckoutSemanticGaps::disclose",
1715        location_or_primitive: ".take(crate::data_layer::surfaces::INDEX_GAP_PREVIEW)",
1716        reason: "semantic Luau coverage previews; skipped_files_count/omitted and failed_files_count/omitted retain full counts; each list envelope and its standard trailer disclose the preview cap",
1717    },
1718];
1719
1720/// Look up a surface by command, mode, and list id.
1721pub fn find_surface(command: &str, mode: &str, list_id: &str) -> Option<&'static SurfaceEntry> {
1722    LIST_SURFACES.iter().find(|s| {
1723        s.command == command
1724            && (s.mode == mode || s.mode.is_empty() || mode.is_empty())
1725            && s.list_id == list_id
1726    })
1727}