+
    2jq                        R t ^ RIHt ^ RIHt ^ RIHt ^RIHtH	t	H
t
 ^RIHtHt ]'       d   ^ RIHt ^RIHt ^RIHt R	.t]! 0 Rm4      tR
 R lt ! R R	]4      tRR/R R lltR R ltR R ltR R ltR# )a  Emit-time lock coverage validation for the PEP 751 emitter.

A conformant PEP 751 consumer refuses a lock unless one of its declared
``environments`` markers matches the installing interpreter.  A
non-covering lock declares no row for an interpreter its own resolve
produced pins for, so the installer refuses it there.  This is the
completeness dual of the disjointness gate: that one forbids two same-name
entries firing under one context, this one forbids a resolved context with
no entry.

The universe is not expressible as a single PEP 508 marker, so the check
runs through the marker algebra.  For each target the resolve ran it asks
whether the union of the emitted rows admits the whole range the target
stands for: a minor-interval target stands for its whole minor, a whole
target for one micro.  A point in that range no row admits is returned as a
witness, and the gate fires naming the uncovered interpreter.
)annotations)reduce)TYPE_CHECKING)DecisionStore	MarkerSetvariable_names)UNBOUNDABLE_MARKER_VARIABLESdeclared_range_marker)Sequence)Marker)ResolveTargetCoverageErrorc                    V ^8  d   QhRRRR/# )   targetr   returnzdict[str, str] )formats   "h/home/user/billing-ledger-validation/.venv/lib/python3.14/site-packages/nab_python/_lockfile/coverage.py__annotate__r   /   s     
 
M 
n 
    c                    V P                   P                  4        UUu/ uF!  w  rV\        9  g   K  V\        9  g   K  WbK#  	  upp# u uppi )zReturn the env axes a reference pins to single equality values.

Every boundable axis :func:`declared_range_marker` fixes to one value,
minus the open python axis.
)
marker_envitemsr   _OPEN_PYTHON_AXIS)r   namevalues   &  r   _reference_pinsr   /   sU     ",,2244KD33 	8<DU8U 	4  s   A	A	A	c                      ] tR t^<tRtRtR# )r   zA resolved target has no covering ``environments`` row.

The error names one uncovered interpreter as a concrete point so the
producer can widen the declaration or drop the target.
r   N)__name__
__module____qualname____firstlineno____doc____static_attributes__r   r   r   r   r   <   s    r   storeNc               (    V ^8  d   QhRRRRRRRR/# )	r   targetsSequence[ResolveTarget]environmentsSequence[Marker]r%   zDecisionStore | Noner   Noner   )r   s   "r   r   r   D   s2     %< %<$%< #%<  	%<
 
%<r   c                  V'       g   R# \        \        P                  R V 4       \        P                  ! 4       4      p\	        W1V 4      p\        V 4      P                  4        F  w  rEVP                  \        V4      4      p\        \        P                  R V 4       \        P                  ! 4       4      pWv( ,          P                  VR7      pVf   Ks  \        \        V4      4      h	  R# )a  Confirm the emitted rows cover every target the resolve ran.

Asks the algebra for a point the declared rows miss; a witness is a
real interpreter the declaration would refuse.  Targets on one platform
share a restriction, so they are asked as a single question.

An empty ``environments`` returns early: an omitted field declares
support for every environment, so it must not be read as the empty set.
Nc              3  N   "   T F  p\         P                  ! V4      x  K  	  R # 5iNr   from_marker.0markers   & r   	<genexpr>+validate_marker_coverage.<locals>.<genexpr>X   s     B\6		v	&	&\   #%c              3  N   "   T F  p\         P                  ! V4      x  K  	  R # 5ir.   r/   r1   s   & r   r4   r5   d   s     DvY""6**r6   )r%   )r   r   unionempty_project_implementation_version_references_by_pinsr   restrictdictwitnessr   _coverage_message)	r'   r)   r%   coveredpins
referencescovered_hereaskedr>   s	   &$$      r   validate_marker_coveragerE   D   s     B\BG
 .gWMG/8>>@ ''T
3OODDOO

 =(111> 1' :;; Ar   c                    V ^8  d   QhRRRR/# )r   r'   r(   r   z,dict[tuple[tuple[str, str], ...], list[str]]r   )r   s   "r   r   r   l   s      $1r   c                   / p\        4       pV  Fs  p\        V4      pWB9   d   K  VP                  V4       \        \	        \        V4      P                  4       4      4      pVP                  V. 4      P                  V4       Ku  	  V# )a  Group the distinct target references by the platform axes they pin.

Targets differing only in Python version pin the same axes, so one
restricted union serves them all.  Deduped by marker string, so a split
minor's slices and the conflict forks of one environment count once.
)	setr	   addtuplesortedr   r   
setdefaultappend)r'   groupedseenr   r3   keys   &     r   r;   r;   l   sw     =?GUD&v.>F?6288:;<3#**62  Nr   c               (    V ^8  d   QhRRRRRRRR/# )r   r@   r   r)   r*   r'   r(   r   r   )r   s   "r   r   r      s0      " % 	r   c                *  a  \         ;QJ d    R V 4       F  '       g   K   RM	  RM! R V 4       4      '       g   S # V Uu0 uF  q3P                  kK  	  pp\        \        P                  V 3R lV 4       \        P
                  ! 4       4      # u upi )a  Drop ``implementation_version`` from ``covered`` when a row mirrors it.

On CPython the resolve mirrors each slice's ``python_full_version`` bounds
onto ``implementation_version``, and the algebra treats the two as
independent.  A cross term (``python_full_version`` from one slice,
``implementation_version`` from another) then survives the plain union and
manufactures a false hole on a covering lock, since the reference leaves
``implementation_version`` open.

With no existential primitive the projection is reproduced by ``restrict``:
binding ``implementation_version`` to one representative per slice drops the
axis, and the union over the targets' ``python_full_version`` reassembles
the minor.  Runs only when a row names ``implementation_version``.
c              3  >   "   T F  pR \        V4      9   x  K  	  R# 5iimplementation_versionN)r   )r2   rows   & r   r4   2_project_implementation_version.<locals>.<genexpr>   s     W,3'>#+>>,s   TFc              3  J   <"   T F  pSP                  R V/4      x  K  	  R# 5irT   )r<   )r2   repr@   s   & r   r4   rW      s%     Kds		3S9	:	:ds    #)anypython_full_versionr   r   r8   r9   )r@   r)   r'   r   repss   f&&  r   r:   r:      sn    & 3W,W333W,WWW5<=W6&&WD=KdK  >s   Bc                    V ^8  d   QhRRRR/# )r   r>   zdict[str, str | frozenset[str]]r   strr   )r   s   "r   r   r      s      > 3 r   c                B   \         R0,          pV P                  4        UUu/ uF'  w  r#\        V\        4      '       g   K  W!9  g   K%  W#bK)  	  pppVP	                  R4      pRP                  R \        VP                  4       4       4       4      pRV RV R2# u uppi )aS  Render the uncovered interpreter the witness names.

``python_full_version`` first, then the other boundable axes the witness
pins as a sorted ``name == "value"`` list.  Kernel axes and the
``python_version`` half of the shared python axis are dropped; membership
selections never appear on an environment row, so every value is a string.
python_versionr[   z, c              3  6   "   T F  w  rV R V R2x  K  	  R# 5i)z == ""Nr   )r2   r   r   s   &  r   r4   $_coverage_message.<locals>.<genexpr>   s#      2K;44&eWA2Ks   zBthe lock declares no environment covering python_full_version == "z" (zT). The resolve produced pins for this interpreter but no environments row admits it.)r   r   
isinstancer^   popjoinrK   )r>   skipr   r   	boundablefull_versionaxess   &      r   r?   r?      s     (+;*<<D #==?*KDeS! 	&*&6 	*  
 ==!67L99 289J2K D	$$0>TF ;	s   BB	B>   r`   r[   rU   )r#   
__future__r   	functoolsr   typingr   _vendor.packaging.markersetsr   r   r   r   r   r	   collections.abcr
   _vendor.packaging.markersr   r   __all__	frozensetr   r   
ValueErrorr   rE   r;   r:   r?   r   r   r   <module>rt      sv   $ #    S S H(2&  G 

J %< #'	%<P*:r   