LibTmux/QueryPlan.pm

filter: Statementstmt 59.7% 80 / 134 Branchbran 53.7% 58 / 108 Conditioncond 56.3% 40 / 71 MC/DCmcdc 37.5% 15 / 40 Subroutinesub 82.3% 14 / 17 Podpod 66.6% 4 / 6 totaltotal 56.1% 211 / 376 CC 89 SCAR 49.8
CC
89
Cov
57%
_node
343.8
_requirements
110.0
_verification_report
25.0
CRAP 146.2
« LibTmux/Server.pm ↑ Summary LibTmux/Filter.pm »
1 package LibTmux::QueryPlan;
2 2 ▶use v5.44;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 2 ▶use Scalar::Util qw(blessed);
Subroutine BEGIN: called CC=1 SCAR=0.0
4 2 ▶use LibTmux::Filter;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 2 ▶use LibTmux::Schema;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 2 ▶use LibTmux::X;
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 18 ▶sub new ($class, %args) {
Subroutine new: called CC=10 SCAR=26.2
Pod undocumented
9 18 ▶ my $policy = $args{pushdown} // 'auto';
Condition100%2/2
$args{"pushdown"} // "auto"
l!l
414
MC/DC100%1/1
$args{"pushdown"} // "auto"
$args{"pushdown"}
Truth table100%2/2
A
A= $args{"pushdown"}
Aresult
11
00
10 18 ▶ LibTmux::X::InvalidArgument->throw(
Branch: 1 branch
BranchTrueFalseTotal
unless $policy =~ /\A(?:auto|never|require)\z/u 0 18 18
11 message => 'pushdown must be auto/never/require')
12 unless $policy =~ /\A(?:auto|never|require)\z/;
13 LibTmux::X::InvalidArgument->throw(
14 message => 'native_filter is exclusive with criteria and pushdown')
15 if exists($args{native_filter})
16 18 ▶ && (exists($args{where}) || exists($args{pushdown}));
Branch: 1 branch
BranchTrueFalseTotal
if exists $args{"native_filter"} and exists $args{"where"} || exists $args{"pushdown"} 0 18 18
Condition50%3/6
exists $args{"native_filter"} and exists $args{"where"} || exists $args{"pushdown"}
!ll&&!rl&&r
1620
exists $args{"where"} or exists $args{"pushdown"}
l!l&&r!l&&!r
002
MC/DC0%0/3
exists $args{"native_filter"} and exists $args{"where"} || exists $args{"pushdown"}
exists $args{"native_filter"} exists $args{"where"} exists $args{"pushdown"}
Truth table50%2/4
A and B or C
A= exists $args{"native_filter"}B= exists $args{"where"}C= exists $args{"pushdown"}
ABCresult
0XX0
1000
11X1
1011
17 my $filter =
18 blessed($args{where})
19 && $args{where}->isa('LibTmux::Filter')
20 ? $args{where}
21 18 ▶ : LibTmux::Filter->new(entity => 'pane', where => $args{where} // {});
Branch: 1 branch
BranchTrueFalseTotal
builtin::blessed($args{'where'}) && $args{'where'}->isa('LibTmux::Filter') ? : 0 18 18
Condition60%3/5
builtin::blessed($args{"where"}) and $args{"where"}->isa("LibTmux::Filter")
!ll&&!rl&&r
1800
$args{"where"} // {}
l!l
126
MC/DC0%0/2
builtin::blessed($args{"where"}) and $args{"where"}->isa("LibTmux::Filter")
builtin::blessed($args{"where"}) $args{"where"}->isa("LibTmux::Filter")
MC/DC100%1/1
$args{"where"} // {}
$args{"where"}
Truth table33%1/3
A and B
A= builtin::blessed($args{"where"})B= $args{"where"}->isa("LibTmux::Filter")
ABresult
0X0
100
111
Truth table100%2/2
A
A= $args{"where"}
Aresult
11
00
22 17 ▶ LibTmux::X::InvalidFilter->throw(
Branch: 1 branch
BranchTrueFalseTotal
unless $filter->entity eq "pane" 0 17 17
23 message => 'pane query needs a pane filter')
24 unless $filter->entity eq 'pane';
25 return bless {
26 filter => $filter,
27 policy => $policy,
28 native_filter => $args{native_filter}
29 17 }, $class;
30 }
31 26 ▶sub filter ($self) { $self->{filter} }
Subroutine filter: called CC=1 SCAR=0.0
Pod documented
32 50 ▶sub policy ($self) { $self->{policy} }
Subroutine policy: called CC=1 SCAR=0.0
Pod documented
33  
34 11 ▶sub _verification_report ($self, $snapshot, $local, $lowered, $native = undef) {
Subroutine _verification_report: called CC=25 SCAR=32.2
35 11 my $metadata = $snapshot->metadata;
36 11 my @captured = map { $_->id } $snapshot->panes->@*;
37 11 my @local = map { $_->id } $local->@*;
38 11 my %captured = map { $_ => true } @captured;
39 11 my %local = map { $_ => true } @local;
40 11 ▶ my %native = map { $_ => true } ($native // [])->@*;
Condition100%2/2
$native // []
l!l
83
MC/DC100%1/1
$native // []
$native
Truth table100%2/2
A
A= $native
Aresult
11
00
41 11 my $expert = $self->_is_native;
42 11 my $checked = defined $native;
43 11 ▶ my @missing = $checked && !$expert ? grep { !$native{$_} } @local : ();
Branch: 1 branch
BranchTrueFalseTotal
$checked && !$expert ? : 6 5 11
Condition100%3/3
$checked and not $expert
!ll&&!rl&&r
326
MC/DC100%2/2
$checked and not $expert
$checked not $expert
Truth table100%3/3
A and not(B)
A= $checkedB= not $expert
ABresult
0X0
100
111
44 my @unexpected =
45 $checked && !$expert && $lowered->{exact}
46 11 ▶ ? grep { !$local{$_} } @$native
Branch: 1 branch
BranchTrueFalseTotal
$checked && !$expert && $lowered->{'exact'} ? : 4 7 11
Condition100%6/6
$checked and not $expert and $lowered->{"exact"}
!ll&&!rl&&r
524
$checked and not $expert
!ll&&!rl&&r
326
MC/DC100%3/3
$checked and not $expert and $lowered->{"exact"}
$checked not $expert $lowered->{"exact"}
Truth table100%4/4
A and not(B) and C
A= $checkedB= not $expertC= $lowered->{"exact"}
ABCresult
0XX0
10X0
1100
1111
47 : ();
48 11 ▶ my @uncaptured = $checked ? grep { !$captured{$_} } @$native : ();
Branch: 1 branch
BranchTrueFalseTotal
$checked ? : 8 3 11
49 11 ▶ my $disagree = @missing || @unexpected || @uncaptured;
Condition83%5/6
@missing || @unexpected || @uncaptured
l!l&&r!l&&!r
317
@missing or @unexpected
l!l&&r!l&&!r
308
MC/DC66%2/3
@missing || @unexpected || @uncaptured
@missing @unexpected @uncaptured
Truth table75%3/4
A or B || C
A= @missingB= @unexpectedC= @uncaptured
ABCresult
1XX1
01X1
0011
0000
50 return {
51 policy => $expert ? 'native' : $self->policy,
52 status => !$checked ? ($self->policy eq 'never' ? 'disabled' : 'local')
53 : $disagree ? 'disagreed'
54 : $expert ? 'native'
55 : 'agreed',
56 comparison => !$checked ? 'none'
57 : $expert ? 'captured_membership'
58 : $lowered->{exact} ? 'exact_ids'
59 : 'candidate_superset',
60 native_checked => !!$checked,
61 translation_exact => $expert
62 || $self->policy eq 'never' ? undef : !!$lowered->{exact},
63 native_filter => $checked ? $lowered->{filter} : undef,
64 reasons => [($lowered->{reasons} // [])->@*],
65 server_id => $snapshot->server_id,
66 generation => $snapshot->generation,
67 daemon_version => $metadata->{version},
68 capture_start => $metadata->{capture_start},
69 capture_end => $metadata->{capture_end},
70 11 ▶ captured_ids => [@captured],
Branch: 12 branches
BranchTrueFalseTotal
$expert ? : 2 9 11
!$checked ? : 3 8 11
$self->policy eq 'never' ? : 2 1 3
$disagree ? : 4 4 8
$expert ? : 1 3 4
!$checked ? : 3 8 11
$expert ? : 2 6 8
$lowered->{'exact'} ? : 4 2 6
$expert || $self->policy eq 'never' ? : 4 7 11
$checked ? : 8 3 11
$expert ? : 2 9 11
$checked ? : 8 3 11
Condition100%5/5
$expert or $self->policy eq "never"
l!l&&r!l&&!r
227
$lowered->{"reasons"} // []
l!l
92
MC/DC100%2/2
$expert or $self->policy eq "never"
$expert $self->policy eq "never"
MC/DC100%1/1
$lowered->{"reasons"} // []
$lowered->{"reasons"}
Truth table100%3/3
A or B
A= $expertB= $self->policy eq "never"
ABresult
1X1
011
000
Truth table100%2/2
A
A= $lowered->{"reasons"}
Aresult
11
00
71 local_ids => $expert ? undef : [@local],
72 native_ids => $checked ? [@$native] : undef,
73 missing_ids => [@missing],
74 unexpected_ids => [@unexpected],
75 uncaptured_ids => [@uncaptured],
76 };
77 }
78  
79 21 ▶sub _is_native ($self) {
Subroutine _is_native: called CC=2 SCAR=7.6
80 21 ▶ exists $self->{native_filter} && defined $self->{native_filter};
Branch: 1 branch
BranchTrueFalseTotal
exists $self->{"native_filter"} and defined $self->{"native_filter"} 21 0 21
81 }
82 1 ▶sub _literal ($value) { $value =~ s/([#,}])/#$1/g; $value }
Subroutine _literal: called CC=1 SCAR=0.0
83  
84 6 ▶sub _join ($operator, $expressions, $identity) {
Subroutine _join: called CC=3 SCAR=11.1
85 6 ▶ return $identity unless @$expressions;
Branch: 1 branch
BranchTrueFalseTotal
unless @$expressions 0 6 6
86 6 my $value = shift @$expressions;
87 6 $value = "#{$operator:$value,$_}" for @$expressions;
88 6 return $value;
89 }
90  
91 11 ▶sub _node ($input, $version) {
Subroutine _node: called CC=39 SCAR=58.4
92 11 my (@parts, @reasons);
93 11 my $exact = true;
94 11 for my $key (sort keys %$input) {
95 11 my $rhs = $input->{$key};
96 11 ▶ if ($key eq '-and' || $key eq '-or') {
Branch: 1 branch
BranchTrueFalseTotal
if ($key eq "-and" or $key eq "-or") 0 11 11
Condition33%1/3
$key eq "-and" or $key eq "-or"
l!l&&r!l&&!r
0011
MC/DC0%0/2
$key eq "-and" or $key eq "-or"
$key eq "-and" $key eq "-or"
Truth table33%1/3
A or B
A= $key eq "-and"B= $key eq "-or"
ABresult
1X1
011
000
97 0 my (@children, $all_exact);
98 0 $all_exact = true;
99 0 for my $child (@$rhs) {
100 0 my ($expression, $full, $why) = _node($child, $version);
101 0 ▶ push @children, $expression if defined $expression;
Branch: 1 branch
BranchTrueFalseTotal
if defined $expression 0 0 0
102 0 push @reasons, @$why;
103 0 ▶ $all_exact = false unless $full;
Branch: 1 branch
BranchTrueFalseTotal
unless $full 0 0 0
104 }
105 0 ▶ if ($key eq '-or' && !$all_exact) { $exact = false; next }
Branch: 1 branch
BranchTrueFalseTotal
if ($key eq "-or" and not $all_exact) 0 0 0
Condition0%0/3
$key eq "-or" and not $all_exact
!ll&&!rl&&r
000
MC/DC0%0/2
$key eq "-or" and not $all_exact
$key eq "-or" not $all_exact
Truth table0%0/3
A and not(B)
A= $key eq "-or"B= not $all_exact
ABresult
0X0
100
111
106 0 ▶ push @parts,
Branch: 2 branches
BranchTrueFalseTotal
$key eq '-and' ? : 0 0 0
$key eq '-and' ? : 0 0 0
107 _join($key eq '-and' ? '&&' : '||',
108 \@children, $key eq '-and' ? '1' : '0');
109 0 ▶ $exact = false unless $all_exact;
Branch: 1 branch
BranchTrueFalseTotal
unless $all_exact 0 0 0
110 0 next;
111 }
112 11 ▶ if ($key eq '-not') {
Branch: 1 branch
BranchTrueFalseTotal
if ($key eq "-not") 0 11 11
113 0 my ($expression, $full, $why) = _node($rhs, $version);
114 0 push @reasons, @$why;
115 0 ▶ if ($full && defined $expression) {
Branch: 1 branch
BranchTrueFalseTotal
if ($full and defined $expression) { } 0 0 0
Condition0%0/3
$full and defined $expression
!ll&&!rl&&r
000
MC/DC0%0/2
$full and defined $expression
$full defined $expression
Truth table0%0/3
A and B
A= $fullB= defined $expression
ABresult
0X0
100
111
116 0 push @parts, "#{==:$expression,0}";
117 }
118 0 else { $exact = false }
119 0 next;
120 }
121 11 my $field = LibTmux::Schema->field('pane', $key);
122 11 ▶ if ( $field->{type} eq 'relation'
Branch: 1 branch
BranchTrueFalseTotal
if ($field->{"type"} eq "relation" or $field->{"type"} eq "bytes" or $field->{"nullable"} or not "LibTmux::Schema"->_version_at_least($version, $field->{"minimum"})) 0 11 11
Condition33%3/9
$field->{"type"} eq "relation" or $field->{"type"} eq "bytes" or $field->{"nullable"} or not "LibTmux::Schema"->_version_at_least($version, $field->{"minimum"})
l!l&&r!l&&!r
0011
$field->{"type"} eq "relation" or $field->{"type"} eq "bytes" or $field->{"nullable"}
l!l&&r!l&&!r
0011
$field->{"type"} eq "relation" or $field->{"type"} eq "bytes"
l!l&&r!l&&!r
0011
MC/DC0%0/4
$field->{"type"} eq "relation" or $field->{"type"} eq "bytes" or $field->{"nullable"} or not "LibTmux::Schema"->_version_at_least($version, $field->{"minimum"})
$field->{"type"} eq "relation" $field->{"type"} eq "bytes" $field->{"nullable"} not "LibTmux::Schema"->_version_at_least($version, $field->{"minimum"})
Truth table20%1/5
A or B or C or not(D)
A= $field->{"type"} eq "relation"B= $field->{"type"} eq "bytes"C= $field->{"nullable"}D= not "LibTmux::Schema"->_version_at_least($version, $field->{"minimum"})
ABCDresult
1XXX1
01XX1
001X1
00011
00000
123 || $field->{type} eq 'bytes'
124 || $field->{nullable}
125 || !LibTmux::Schema->_version_at_least($version, $field->{minimum}))
126 {
127 0 push @reasons,
128 "$key requires local relation, byte, null, or unavailable-field semantics";
129 0 $exact = false;
130 0 next;
131 }
132 11 ▶ my $ops = ref($rhs) eq 'HASH' ? $rhs : {-eq => $rhs};
Branch: 1 branch
BranchTrueFalseTotal
ref $rhs eq 'HASH' ? : 4 7 11
133 11 for my $op (sort keys %$ops) {
134 11 my $value = $ops->{$op};
135 11 my $left = '#{' . $field->{source} . '}';
136 11 ▶ my @operands = ref($value) eq 'ARRAY' ? @$value : ($value);
Branch: 1 branch
BranchTrueFalseTotal
ref $value eq 'ARRAY' ? : 0 11 11
137 11 ▶ if (grep { defined($_) && !ref($_) && /\0/ } @operands) {
Branch: 1 branch
BranchTrueFalseTotal
if (grep {defined $_ and not ref $_ and /\0/u;} @operands) 1 10 11
Condition50%3/6
defined $_ && !ref($_) && /\0/u
!ll&&!rl&&r
0101
defined $_ and not ref $_
!ll&&!rl&&r
0011
MC/DC33%1/3
defined $_ && !ref($_) && /\0/u
defined $_ not ref $_ /\0/u
Truth table50%2/4
A and not(B) && C
A= defined $_B= not ref $_C= /\0/u
ABCresult
0XX0
10X0
1100
1111
138 1 push @reasons,
139 "$key.$op contains NUL and requires local evaluation";
140 1 $exact = false;
141 1 next;
142 }
143 10 ▶ if ($op eq '-in' || $op eq '-not_in') {
Branch: 3 branches
BranchTrueFalseTotal
if ($op eq '-in' or $op eq '-not_in') { } 0 10 10
elsif ($op eq '-eq' or $op eq '-ne') { } 6 4 10
elsif ($field->{'type'} eq 'integer' and $op =~ /\A-(?:lt|lte|gt|gte)\z/u) { } 0 4 4
Condition33%1/3
$op eq "-in" or $op eq "-not_in"
l!l&&r!l&&!r
0010
MC/DC0%0/2
$op eq "-in" or $op eq "-not_in"
$op eq "-in" $op eq "-not_in"
Truth table33%1/3
A or B
A= $op eq "-in"B= $op eq "-not_in"
ABresult
1X1
011
000
144 my @items = map {
145 0 my $right =
146 0 ▶ $field->{type} eq 'boolean'
Branch: 2 branches
BranchTrueFalseTotal
$field->{'type'} eq 'boolean' ? : 0 0 0
$_ ? : 0 0 0
147 ? ($_ ? '1' : '0')
148 : _literal("$_");
149 0 "#{==:$left,$right}";
150 } @$value;
151 0 my $expression = _join('||', \@items, '0');
152 0 ▶ push @parts, $op eq '-in' ? $expression : "#{==:$expression,0}";
Branch: 1 branch
BranchTrueFalseTotal
$op eq '-in' ? : 0 0 0
153 }
154 ▶ elsif ($op eq '-eq' || $op eq '-ne') {
Condition66%2/3
$op eq "-eq" or $op eq "-ne"
l!l&&r!l&&!r
604
MC/DC50%1/2
$op eq "-eq" or $op eq "-ne"
$op eq "-eq" $op eq "-ne"
Truth table66%2/3
A or B
A= $op eq "-eq"B= $op eq "-ne"
ABresult
1X1
011
000
155 my $right =
156 6 ▶ $field->{type} eq 'boolean'
Branch: 2 branches
BranchTrueFalseTotal
$field->{'type'} eq 'boolean' ? : 5 1 6
$value ? : 5 0 5
157 ? ($value ? '1' : '0')
158 : _literal("$value");
159 6 ▶ my $operator = $op eq '-eq' ? '==' : '!=';
Branch: 1 branch
BranchTrueFalseTotal
$op eq '-eq' ? : 6 0 6
160 6 push @parts, "#{$operator:$left,$right}";
161 }
162 ▶ elsif ($field->{type} eq 'integer'
Condition33%1/3
$field->{"type"} eq "integer" and $op =~ /\A-(?:lt|lte|gt|gte)\z/u
!ll&&!rl&&r
400
MC/DC0%0/2
$field->{"type"} eq "integer" and $op =~ /\A-(?:lt|lte|gt|gte)\z/u
$field->{"type"} eq "integer" $op =~ /\A-(?:lt|lte|gt|gte)\z/u
Truth table33%1/3
A and B
A= $field->{"type"} eq "integer"B= $op =~ /\A-(?:lt|lte|gt|gte)\z/u
ABresult
0X0
100
111
163 && $op =~ /\A-(?:lt|lte|gt|gte)\z/)
164 {
165 0 my %operators = (
166 '-lt' => '<',
167 '-lte' => '<=',
168 '-gt' => '>',
169 '-gte' => '>='
170 );
171 0 push @parts, '#{e|' . $operators{$op} . ":$left,$value}";
172 }
173 else {
174 4 push @reasons, "$key.$op has a local residual";
175 4 $exact = false;
176 }
177 }
178 }
179 11 ▶ return (@parts ? _join('&&', \@parts, '1') : ($exact ? '1' : undef),
Branch: 2 branches
BranchTrueFalseTotal
@parts ? : 6 5 11
$exact ? : 2 3 5
180 $exact, \@reasons);
181 }
182  
183 13 ▶sub lowering ($self, $version = '3.3a') {
Subroutine lowering: called CC=3 SCAR=11.0
Pod undocumented
184 return {filter => $self->{native_filter}, exact => true, reasons => []}
185 13 ▶ if defined $self->{native_filter};
Branch: 1 branch
BranchTrueFalseTotal
if defined $self->{"native_filter"} 2 11 13
186 11 my ($filter, $exact, $reasons) =
187 _node($self->filter->normalized_where, $version);
188 11 return {filter => $filter, exact => $exact, reasons => $reasons};
189 }
190  
191 0 ▶sub summary ($self) {
Subroutine summary: not called CC=3 SCAR=24.8
Pod documented
192 0 my $lowered = $self->lowering;
193 0 ▶ return 'local evaluation; pushdown disabled' if $self->policy eq 'never';
Branch: 1 branch
BranchTrueFalseTotal
if $self->policy eq "never" 0 0 0
194 return
195 'captured local evaluation with verified native scalar filter; runtime candidate agreement required'
196 0 ▶ if $lowered->{exact};
Branch: 1 branch
BranchTrueFalseTotal
if $lowered->{"exact"} 0 0 0
197 0 return 'local residual: ' . join('; ', $lowered->{reasons}->@*);
198 }
199  
200 0 ▶sub _requirements ($kind, $where, $out) {
Subroutine _requirements: not called CC=10 SCAR=47.0
201 0 for my $key (sort keys %$where) {
202 0 my $value = $where->{$key};
203 0 ▶ if ($key eq '-and' || $key eq '-or') {
Branch: 1 branch
BranchTrueFalseTotal
if ($key eq "-and" or $key eq "-or") 0 0 0
Condition0%0/3
$key eq "-and" or $key eq "-or"
l!l&&r!l&&!r
000
MC/DC0%0/2
$key eq "-and" or $key eq "-or"
$key eq "-and" $key eq "-or"
Truth table0%0/3
A or B
A= $key eq "-and"B= $key eq "-or"
ABresult
1X1
011
000
204 0 _requirements($kind, $_, $out) for @$value;
205 0 next;
206 }
207 0 ▶ if ($key eq '-not') { _requirements($kind, $value, $out); next }
Branch: 1 branch
BranchTrueFalseTotal
if ($key eq "-not") 0 0 0
208 0 my $field = LibTmux::Schema->field($kind, $key);
209 0 my $id = "$kind.$key";
210 0 ▶ if ($field->{type} eq 'relation') {
Branch: 1 branch
BranchTrueFalseTotal
if ($field->{'type'} eq 'relation') { } 0 0 0
211 $out->{relations}{$id} = {
212 entity => $kind,
213 field => $key,
214 target => $field->{entity},
215 0 ▶ cardinality => $field->{many} ? 'many' : 'one',
Branch: 1 branch
BranchTrueFalseTotal
$field->{'many'} ? : 0 0 0
216 completeness => 'complete captured domain required'
217 };
218 0 for my $op (sort keys %$value) {
219 _requirements($field->{entity}, $value->{$op}, $out)
220 0 ▶ if defined $value->{$op};
Branch: 1 branch
BranchTrueFalseTotal
if defined $value->{$op} 0 0 0
221 }
222 }
223 else {
224 $out->{fields}{$id} = {
225 entity => $kind,
226 field => $key,
227 source => $field->{source},
228 minimum => $field->{minimum},
229 type => $field->{type}
230 0 };
231 }
232 }
233 }
234  
235 0 ▶sub to_data ($self) {
Subroutine to_data: not called CC=2 SCAR=17.9
Pod documented
236 0 my $lowered = $self->lowering;
237 0 my $requirements = {fields => {}, relations => {}};
238 0 _requirements('pane', $self->filter->normalized_where, $requirements);
239 return {
240 required_fields => [
241 0 map { $requirements->{fields}{$_} }
242 sort keys $requirements->{fields}->%*
243 ],
244 required_relations => [
245 0 ▶ map { $requirements->{relations}{$_} }
Branch: 1 branch
BranchTrueFalseTotal
$lowered->{'exact'} ? : 0 0 0
246 sort keys $requirements->{relations}->%*
247 ],
248 capability_discovery =>
249 'execution reads connected daemon identity; explanation itself performs no I/O',
250 acquisition =>
251 'strict complete snapshot before local evaluation and native candidate verification',
252 residual_where => $lowered->{exact}
253 ? {}
254 : $self->filter->normalized_where,
255 entity => 'pane',
256 policy => $self->policy,
257 where => $self->filter->to_data,
258 source_commands => [
259 ['list-sessions'], ['list-windows', '-a'],
260 ['list-panes', '-a'], ['list-clients']
261 ],
262 native_filter => $lowered->{filter},
263 exact => $lowered->{exact},
264 residual_reasons => $lowered->{reasons},
265 0 consistency =>
266 'capture interval; auto falls back on candidate disagreement, require rejects it'
267 };
268 }
269  
270 =head1 NAME
271  
272 LibTmux::QueryPlan - Explainable explicit pane acquisition
273  
274 =head1 METHODS
275  
276 =head2 summary
277  
278 Describe native lowering and local residual reasons. Explanation performs no
279 I/O and uses the support floor until connected capabilities are available.
280  
281 =head2 to_data
282  
283 Return an inspectable plan with source commands, filter, policy, and reasons.
284 The L<LibTmux::Schema> catalog identifies required fields and relations.
285  
286 =head2 filter
287  
288 Return the compiled L<LibTmux::Filter>. Its matching remains local.
289  
290 =head2 policy
291  
292 Return auto, never, or require. L<LibTmux::Server/query_panes> executes the
293 plan with complete captured local evaluation. Native candidates cannot hide
294 errors or discard matches from that captured result. Only verified complete
295 translation qualifies for require; runtime disagreement throws
296 L<LibTmux::X/QueryMismatch> without assigning a cause. The optional
297 L<LibTmux::Server/query_panes> observer exposes completed comparisons.
298  
299 =cut
« LibTmux/Server.pm ↑ Summary LibTmux/Filter.pm »