vomebook commited on
Commit ·
ca49ff3
1
Parent(s): 0c43c01
Extract bounded download connection warmup
Browse filesFiles changed (8)
- backend/app.py+7-27
- backend/download_warm.pyAdded+42
- pyrightconfig.strict.json+1
- quality/baselines/backend-coverage-debt.json+1687-1739
- scripts/check_backend_coverage.py+107-9
- scripts/coverage-anchors/download-warm-old-app.py.snapshotAdded
- tests/gates/test_quality_inventory.py+109-13
- tests/proxy/test_async_proxy.py+49
32 unmodified lines3334353637381197 unmodified lines12361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127132 unmodified linesfrom pydantic import BaseModel, Fieldfrom contextlib import asynccontextmanagerfrom backend.cache_core import cached as _bounded_cachefrom backend.folder_tree import build_folder_tree as _build_folder_treefrom backend.folder_contents import get_folder_contents as _get_folder_contentsfrom backend.search_bootstrap import build_initial_payload as _build_initial_payload, trim_initial_results as _trim_initial_results1197 unmodified linesasync def warm_download_connection(app: FastAPI):# Use the download pool, but never queue speculative work behind real transfers.semaphore = app.state.upstream_semaphoreif semaphore.locked():returntry:async with semaphore:async with app.state.http_session.head("https://huggingface.co/robots.txt",allow_redirects=False,timeout=aiohttp.ClientTimeout(total=4, connect=3, sock_read=3),):passexcept (aiohttp.ClientError, asyncio.TimeoutError):# A failed warmup must not affect ping or the later download attempt.passdef schedule_download_connection_warm(app: FastAPI):state = app.stateif not getattr(state, "download_warm_enabled", False):returntask = state.download_warm_tasknow = time.monotonic()if task is not None and not task.done():returnif now - state.download_warm_at < DOWNLOAD_CONNECTION_WARM_INTERVAL_SECONDS:returnstate.download_warm_at = nowstate.download_warm_task = asyncio.create_task(warm_download_connection(app))@asynccontextmanager32 unmodified lines33343536373839401197 unmodified lines1238123912401241124212431244124512461247124812491250125132 unmodified linesfrom pydantic import BaseModel, Fieldfrom contextlib import asynccontextmanagerfrom backend.cache_core import cached as _bounded_cachefrom backend.download_warm import (warm_download_connection as _warm_download_connection,schedule_download_connection_warm as _schedule_download_connection_warm)from backend.folder_tree import build_folder_tree as _build_folder_treefrom backend.folder_contents import get_folder_contents as _get_folder_contentsfrom backend.search_bootstrap import build_initial_payload as _build_initial_payload, trim_initial_results as _trim_initial_results1197 unmodified linesasync def warm_download_connection(app: FastAPI):await _warm_download_connection(app)def schedule_download_connection_warm(app: FastAPI):_schedule_download_connection_warm(app, now=lambda: time.monotonic(), interval=lambda: DOWNLOAD_CONNECTION_WARM_INTERVAL_SECONDS,warm=lambda target: warm_download_connection(target),)@asynccontextmanager
123456789101112131415161718192021222324252627282930313233343536373839404142"""Bounded, owned speculative connection warmup for the download pool."""from __future__ import annotations
import asynciofrom collections.abc import Callable, Coroutinefrom typing import Anyfrom fastapi import FastAPIimport aiohttp
async def warm_download_connection(app: FastAPI): # Use the download pool, but never queue speculative work behind real transfers. semaphore = app.state.upstream_semaphore if semaphore.locked(): return try: async with semaphore: async with app.state.http_session.head( "https://huggingface.co/robots.txt", allow_redirects=False, timeout=aiohttp.ClientTimeout(total=4, connect=3, sock_read=3), ): pass except (aiohttp.ClientError, asyncio.TimeoutError): # A failed warmup must not affect ping or the later download attempt. pass
def schedule_download_connection_warm(app: FastAPI, *, now: Callable[[], float], interval: Callable[[], int], warm: Callable[[FastAPI], Coroutine[Any, Any, None]]) -> None: state = app.state if not getattr(state, "download_warm_enabled", False): return task = state.download_warm_task current_time = now() if task is not None and not task.done(): return if current_time - state.download_warm_at < interval(): return state.download_warm_at = current_time state.download_warm_task = asyncio.create_task(warm(app))8 unmodified lines910111213148 unmodified lines"backend/search_indexes.py","backend/data_formats.py","backend/proxy_streams.py","backend/reader_range_cache.py","backend/reader_assets.py","backend/reader_v3_catalog.py",8 unmodified lines91011121314158 unmodified lines"backend/search_indexes.py","backend/data_formats.py","backend/proxy_streams.py","backend/download_warm.py","backend/reader_range_cache.py","backend/reader_assets.py","backend/reader_v3_catalog.py",
123456727 unmodified lines353637383940414243444546474849505152535455565758593 unmodified lines636465666768697033 unmodified lines1041051061071081091101111121131141 unmodified line1161171181191201211221233 unmodified lines1271281291301311321331341351361371381391401411421431441451461471481491501511521534 unmodified lines1581591601611621631641651661672 unmodified lines1701711721731741751761772 unmodified lines1801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502514 unmodified lines2562572582592602612622632642652662672682692702711 unmodified line2732742752762772782792801 unmodified line28228328428528628728828929029129229329429529629729829938 unmodified lines3383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054 unmodified lines4104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764772 unmodified lines4804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345352 unmodified lines53853954054154254354454554654754854955055155211 unmodified lines5645655665675685695705715721 unmodified line5745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226237 unmodified lines6316326336346356366376386396406416426436446456466476486496506514 unmodified lines6566576586596606616626636646656666676686696706716726736742 unmodified lines6776786796806816826836846856866873 unmodified lines69169269369469569669769869970070170270370410 unmodified lines71571671771871972072172272372472514 unmodified lines74074174274374474574674714 unmodified lines7627637647657667677687697707717723 unmodified lines7767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158163 unmodified lines8208218228238248251 unmodified line8278288298308318322 unmodified lines8358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728732 unmodified lines8768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389394 unmodified lines9449459469479489499509519529539549559569579589599609611 unmodified line96396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210032 unmodified lines100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110522 unmodified lines10551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110824 unmodified lines108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411454 unmodified lines11501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313542 unmodified lines1357135813591360136113621363136413651366136713681369137013711372137313741375137613774 unmodified lines13821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301 unmodified line14321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681 unmodified line147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415855 unmodified lines159115921593159415951596159715981599160016011602160316044 unmodified lines160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341 unmodified line163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181 unmodified line1720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117823 unmodified lines17861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281 unmodified line1830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418653 unmodified lines186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319244 unmodified lines192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519964 unmodified lines20012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720284 unmodified lines2033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921401 unmodified line21422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124721 unmodified line247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125324 unmodified lines25372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325641 unmodified line25662567256825692570257125721 unmodified line2574257525762577257825792580258125822583258425852586258725881 unmodified line2590259125922593259425952596259725982599260026012602260326041 unmodified line2606260726082609261026112612261326142615261626172618261926204 unmodified lines262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127521 unmodified line2754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528161 unmodified line2818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329041 unmodified line29062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530564 unmodified lines306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731281 unmodified line3130313131323133313431353136313731383139314031413142314331445 unmodified lines315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533761 unmodified line33783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535161 unmodified line35183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736684 unmodified lines367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937401 unmodified line37423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739284 unmodified lines39333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540561 unmodified line405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964 unmodified lines4301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943601 unmodified line43624363436443654366436743682 unmodified lines4371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479{"backend/app.py": {"covered_lines": 1891,"covered_branches": 627,"lines": [3,4,27 unmodified lines33,34,35,36,41,42,44,45,47,50,53,56,58,59,65,68,69,70,74,82,93,94,95,96,97,3 unmodified lines101,102,103,138,139,140,141,142,33 unmodified lines176,177,178,180,181,182,185,186,187,188,189,1 unmodified line191,192,193,196,197,198,199,200,3 unmodified lines204,205,206,208,210,214,215,216,219,221,222,225,226,227,228,229,230,231,233,236,238,239,244,245,246,247,248,4 unmodified lines253,254,255,257,260,262,263,264,265,266,2 unmodified lines269,270,271,274,275,276,277,278,2 unmodified lines281,282,283,285,287,288,289,290,291,293,294,297,298,299,302,303,304,305,306,307,308,330,333,334,335,343,349,353,357,364,367,368,369,370,371,372,374,375,377,378,381,382,385,386,387,388,389,392,393,397,399,401,402,403,404,407,409,410,413,417,418,419,420,421,422,423,424,428,429,430,431,432,4 unmodified lines437,438,439,442,443,444,447,449,450,451,454,456,457,458,459,460,1 unmodified line462,463,464,466,467,468,469,470,1 unmodified line472,473,474,477,479,480,481,482,483,484,485,486,489,493,494,495,496,497,38 unmodified lines536,537,538,542,543,545,547,548,549,550,551,555,556,557,563,564,565,567,568,569,570,572,573,574,575,576,577,578,580,581,582,585,587,588,589,590,591,592,594,595,596,597,598,600,601,602,604,605,606,607,610,611,612,613,614,615,616,617,619,620,621,622,623,627,628,629,630,631,4 unmodified lines636,637,638,642,643,644,645,647,648,650,654,656,657,660,661,663,664,666,667,668,671,672,677,678,679,680,682,684,687,688,689,690,691,692,693,695,696,697,700,702,704,705,706,707,710,711,713,720,722,725,735,736,739,740,749,764,768,770,771,776,778,781,782,784,785,786,787,788,2 unmodified lines791,792,793,795,796,797,798,799,800,801,803,804,805,812,813,814,815,816,817,818,823,824,825,826,828,830,833,842,846,853,854,855,856,859,860,861,862,869,870,871,872,873,874,875,876,878,880,883,888,893,898,901,902,903,904,905,2 unmodified lines908,909,910,914,915,916,917,919,920,921,924,925,926,927,928,11 unmodified lines940,941,942,944,946,947,948,949,950,1 unmodified line952,953,954,956,957,958,959,960,963,969,972,973,974,975,976,979,985,989,990,994,995,996,997,998,999,1000,1001,1005,1006,1008,1009,1010,1011,1012,1013,1014,1017,1018,1019,1020,1021,1025,1026,1027,1029,1031,1032,1033,1034,1035,7 unmodified lines1043,1044,1045,1047,1049,1050,1051,1052,1054,1055,1057,1058,1059,1060,1061,1062,1064,1065,1066,1067,1068,4 unmodified lines1073,1074,1075,1079,1080,1081,1085,1086,1087,1089,1090,1093,1095,1096,1100,1101,1102,1103,1104,2 unmodified lines1107,1108,1109,1111,1112,1113,1115,1116,1117,1118,1119,3 unmodified lines1123,1124,1125,1127,1129,1130,1131,1132,1133,1135,1136,1137,1138,1139,10 unmodified lines1150,1151,1152,1154,1155,1156,1159,1160,1161,1162,1163,14 unmodified lines1178,1179,1180,1182,1183,1184,1185,1186,14 unmodified lines1201,1202,1203,1205,1206,1207,1209,1210,1211,1212,1213,3 unmodified lines1217,1218,1219,1221,1222,1223,1224,1226,1235,1238,1240,1241,1242,1243,1244,1245,1250,1251,1253,1256,1257,1258,1259,1260,1261,1262,1263,1264,1265,1266,1267,1270,1272,1274,1275,1276,1277,1278,1284,1285,1286,3 unmodified lines1290,1291,1292,1294,1295,1296,1 unmodified line1298,1299,1300,1303,1304,1305,2 unmodified lines1308,1309,1310,1311,1312,1313,1314,1315,1316,1317,1318,1319,1320,1321,1322,1323,1324,1325,1326,1327,1328,1329,1330,1338,1339,1341,1342,1343,1345,1346,1347,1348,1351,1352,1353,1354,1355,1356,1357,2 unmodified lines1360,1361,1362,1363,1364,1365,1366,1369,1370,1371,1372,1375,1376,1377,1378,1379,1380,1381,1382,1384,1385,1387,1388,1389,1391,1392,1393,1394,1395,1400,1401,1404,1407,1408,1409,1413,1414,1415,1419,1420,1421,1424,1425,1426,1427,1428,1429,1432,1434,1435,1436,1438,1439,1440,1441,1442,1443,1444,1445,1446,1448,1450,1451,1452,4 unmodified lines1458,1459,1460,1462,1463,1464,1465,1466,1467,1469,1470,1471,1472,1473,1474,1476,1477,1478,1 unmodified line1480,1481,1482,1484,1485,1486,1487,1489,1491,1492,1493,1494,1495,1496,1497,1498,1499,1500,1501,1502,1503,1504,1505,1506,1507,1508,1509,1512,1520,1521,1522,1523,1524,1526,1529,1530,1531,1532,1535,1536,1537,2 unmodified lines1540,1541,1542,1544,1545,1546,1549,1550,1551,1554,1555,1556,1557,1558,1559,1560,1561,1562,1563,1564,1565,1567,1568,1569,1570,1571,1573,1574,1575,1580,1581,1582,1583,1586,1590,1593,1597,1598,1599,1600,1601,1602,1605,1609,1612,1613,1614,2 unmodified lines1617,1618,1619,1620,1621,1622,1623,1624,1625,1626,1627,1628,1629,1630,1631,1632,1633,1634,1635,1636,1637,1638,1639,1648,1653,1663,1664,1665,4 unmodified lines1670,1671,1672,1675,1676,1677,1678,1679,1680,1681,1682,1683,1684,1685,1686,1687,1688,1689,1690,1691,1692,1693,1694,1697,1698,1710,1713,1714,1715,1716,1717,1718,1719,1721,1724,1725,1726,1727,1730,1731,1732,1735,1739,1757,1758,1759,1760,1761,1769,1770,1771,1772,1773,1774,1775,1776,1779,1780,1781,4 unmodified lines1786,1787,1788,1789,1790,1792,1793,1794,1795,1796,1797,1798,1799,1800,1801,1802,1803,1804,1805,1806,1807,1808,1810,1811,1813,1814,1815,1816,1819,1820,1821,1822,1823,1824,1826,1828,1829,1830,1831,1833,1834,1837,1838,1841,1842,1843,1844,1845,1846,1847,1848,1849,1850,1851,1853,1854,1855,1858,1860,1861,1862,1864,1865,1866,1868,1869,1870,1871,1872,1873,1874,1875,1876,1877,1878,1879,1881,1882,1883,1884,1885,1887,1888,1891,1892,1895,1896,1897,1898,1899,1900,1901,1903,1904,1905,1906,1907,1908,1909,1910,1911,1916,1918,1921,1923,1924,1935,1936,1937,1938,1940,1941,1943,1944,1946,1954,1955,1956,1957,1958,1959,1962,1963,1964,1965,1966,1967,1968,1969,1970,1971,1972,1975,1976,1977,1978,1979,1980,1982,1984,1985,1986,1987,1989,1990,1995,1996,1999,2004,2005,2009,2010,2011,2012,2013,2017,2019,2020,2021,2022,2023,2024,2025,2026,2027,2030,2031,2032,2033,2034,2035,2036,2037,2038,2039,2040,2041,2042,2044,2045,2046,2047,2048,2053,2054,2055,2056,2057,2059,2060,2061,2062,2063,2064,2065,2066,2067,2068,2069,2070,2071,2072,2074,2077,2078,2 unmodified lines2081,2082,2083,2084,2086,2087,2089,2091,2092,2093,2094,2097,2098,2099,2100,2101,2102,2103,2106,2107,2108,4 unmodified lines2113,2114,2115,2118,2119,2120,2121,2122,2123,2124,2125,2126,2127,2128,2129,2130,2131,2132,2133,2134,2135,2137,2138,2139,2142,2143,2144,2145,2150,2151,2153,2154,2157,2158,2159,2160,2161,2162,2163,2164,2166,2169,2172,2173,2174,2175,2177,2178,2179,1 unmodified line2181,2184,2185,2192,2193,2194,2195,2196,2197,2198,2199,2200,2201,2204,2205,2206,2207,2208,2210,2211,2212,2213,2214,2215,2216,2217,2220,2224,2225,2226,2227,2229,2230,2232,2234,2238,2239,1 unmodified line2241,2242,2243,2244,2245,2246,2247,2248,2249,2250,2251,2252,2253,2254,2258,2259,2260,2261,2262,2263,2267,2271,2272,2273,2274,2275,2276,2277,2278,2279,2282,2283,2284,2287,2288,2292,2295,2296,2299,2305,2306,2311,2312,2314,2316,2317,2318,2319,2320,2321,2325,2326,2327,2328,2329,2330,2331,2333,2334,2335,2336,2337,2340,2349,2351,2352,2353,2358,2359,2362,2365,2370,2371,2374,2375,2376,2377,2378,2379,2382,2383,2384,2385,2386,2387,2389,2390,2393,2396,2397,2398,2399,2400,2401,2402,2413,2415,2416,2417,2418,2419,2422,2423,2424,2427,2428,2430,2431,2432,2433,2434,2435,2437,2438,2439,2440,5 unmodified lines2446,2447,2448,2449,2451,2452,2453,2454,2455,2456,2458,2459,2460,2461,4 unmodified lines2466,2467,2468,2470,2471,2472,2473,2474,2475,2479,2480,2481,2482,2483,2484,2485,2486,2487,2488,2494,2495,2496,2497,2498,2499,2501,1 unmodified line2504,2505,2506,2507,2508,2509,2510,2511,2512,2513,2514,2515,2516,2518,2519,2521,2523,2524,2525,2526,2528,2529,2532,2533,2539,2540,2541,2542,2543,2544,2545,2553,2554,2555,2556,2557,2563,2564,2565,2568,2569,2571,2572,2573,2574,2575,2576,2579,2580,2581,2583,2584,2587,2588,2591,2592,2593,2594,2595,2596,2598,2601,2602,2603,2604,2605,2606,2607,2610,2611,2612,2613,2614,2615,2616,2617,2618,2619,2620,2621,2629,2630,2631,1 unmodified line2633,2634,2635,2645,2646,2647,2648,2649,2650,2651,2652,2653,2654,2655,2656,2657,2664,2665,2666,2667,2668,2669,2671,2672,2673,2674,2677,2678,2679,2680,2681,2682,2685,2686,2689,2690,2691,2693,2694,2695,2696,2697,2698,2700,2701,2702,2703,2704,2706,2707,2708,2710,2711,2712,2713,2714,2715,2716,2718,2719,2720,2721,2722,3 unmodified lines2727,2728,2729,2730,2731,2736,2737,2738,2740,2741,2742,2743,2744,2745,2747,2748,2749,2751,2754,2755,2757,2760,2761,2762,2765,2766,2767,2768,2769,2771,2772,2773,2774,2775,2776,2777,2778,2779,2780,2781,2784,2785,2786,1 unmodified line2788,2789,2790,2791,2792,2794,2796,2797,2798,2799,2800,2801,2802,2803,2804,2805,2806,2807,2808,2809,2810,2812,2813,2819,2826,2827,2828,2829,2830,2833,2835,2836,2837,2840,2841,2842,3 unmodified lines2846,2847,2848,2850,2851,2852,2853,2854,2856,2859,2860,2861,2862,2863,2864,2865,2866,2867,2868,2869,2870,2871,2872,2873,2875,2876,2878,2879],"arcs": [[226,227],[226,228],[229,230],[229,233],[245,246],[245,247],[247,4 unmodified lines249],[250,251],[250,254],[252,250],[252,253],[263,264],[263,265],[267,268],[267,269],[275,276],[275,277],[287,288],[287,290],[288,287],[288,289],[304,305],[304,306],[306,4 unmodified lines308],[370,371],[370,372],[387,388],[387,389],[418,419],[418,420],[420,4 unmodified lines422],[424,428],[424,429],[429,430],[429,432],[443,-442],[443,444],[449,450],[449,451],[456,457],[456,458],[459,460],[459,474],[461,-460],[461,462],[463,464],[463,466],[480,-477],[480,481],[481,482],[481,483],[514,515],[514,538],[518,519],[518,522],[524,525],[524,526],[526,1 unmodified line],[526,529],[542,543],[542,545],[555,556],[555,563],[565,567],[565,569],[567,565],[567,568],[569,-489],[569,570],[578,580],[578,582],[590,591],[590,594],[597,598],[597,600],[601,602],[601,604],[616,617],[616,619],[688,689],[688,697],[691,692],[691,693],[693,695],[693,696],[702,704],[705,706],[705,707],[787,788],[787,790],[792,-776],[792,793],[796,797],[796,798],[816,817],[816,818],[824,825],[824,826],[870,871],[870,873],[875,876],[875,880],[902,903],[902,905],[903,902],[903,904],[906,907],[906,910],[916,917],[916,921],[917,919],[917,920],[927,928],[927,930],[930,931],[930,934],[936,937],[936,950],[937,938],[937,950],[940,941],[940,942],[942,944],[942,946],[947,937],[947,948],[950,951],[950,960],[953,954],[953,956],[958,959],[958,960],[974,975],[974,976],[989,990],[989,994],[994,995],[994,1036],[998,999],[998,1021],[1000,1 unmodified line],[1000,1005],[1005,1006],[1005,1008],[1008,1009],[1012,1013],[1012,1018],[1014,1012],[1014,1017],[1019,998],[1019,1020],[1025,1026],[1025,1029],[1031,1032],[1031,1033],[1033,4 unmodified lines1035],[1036,1037],[1036,1071],[1039,1040],[1039,1057],[1040,1041],[1040,1049],[1042,1 unmodified line],[1042,1044],[1044,1 unmodified line],[1044,1047],[1049,1050],[1049,1051],[1051,1 unmodified line],[1051,1054],[1057,1058],[1057,1064],[1059,1 unmodified line],[1059,1061],[1066,1067],[1066,1068],[1068,4 unmodified lines1070],[1075,1079],[1075,1127],[1081,1085],[1081,1107],[1085,1086],[1085,1089],[1090,1093],[1090,1095],[1101,1102],[1101,1103],[1105,1081],[1105,1106],[1108,1109],[1108,1111],[1111,1112],[1111,1115],[1116,1117],[1116,1119],[1119,1120],[1119,1122],[1123,1124],[1131,1132],[1131,1133],[1136,1137],[1136,1143],[1137,1138],[1137,1139],[1140,1141],[1140,1142],[1144,1145],[1144,1173],[1146,1 unmodified line],[1146,1169],[1149,1150],[1149,1159],[1150,1151],[1150,1168],[1154,1150],[1154,1155],[1156,1150],[1160,1161],[1160,1168],[1161,1162],[1161,1166],[1162,1161],[1162,1163],[1164,1161],[1164,1 unmodified line],[1166,1160],[1166,1167],[1169,1170],[1169,1172],[1173,1174],[1173,1182],[1176,1177],[1176,1180],[1178,1176],[1178,1179],[1184,1185],[1188,1189],[1188,1190],[1191,1192],[1191,1200],[1192,1193],[1192,1194],[1198,1191],[1198,1199],[1200,1201],[1200,1202],[1202,1 unmodified line],[1202,1205],[1205,1206],[1205,1209],[1210,1211],[1210,1213],[1213,1214],[1213,1216],[1217,1218],[1222,1223],[1222,1224],[1241,1242],[1241,1243],[1258,1259],[1258,1260],[1262,1263],[1262,1264],[1264,1265],[1264,1266],[1303,1304],[1307,1308],[1307,1311],[1313,1314],[1313,1317],[1318,1319],[1318,1322],[1341,1342],[1341,1343],[1370,1371],[1370,1372],[1377,1378],[1377,1379],[1382,1384],[1382,1387],[1427,1428],[1427,1429],[1452,1453],[1452,1456],[1464,4 unmodified lines1466],[1471,1472],[1471,1473],[1477,1478],[1477,1484],[1480,1481],[1480,1482],[1484,1485],[1484,1486],[1493,1494],[1493,1507],[1495,1496],[1495,1501],[1496,1497],[1496,1498],[1499,1495],[1499,1500],[1502,1 unmodified line],[1502,1505],[1507,1508],[1507,1509],[1520,5 unmodified lines],[1522,1523],[1522,1526],[1529,1530],[1529,1531],[1537,1538],[1537,1540],[1540,1541],[1540,1542],[1542,1544],[1542,1545],[1558,1559],[1558,1560],[1563,1564],[1563,1565],[1597,1598],[1597,1599],[1600,1601],[1600,1602],[1678,1679],[1678,1680],[1680,1681],[1680,1682],[1683,1684],[1683,1685],[1691,1692],[1691,1693],[1693,-1675],[1693,1694],[1713,1714],[1713,1715],[1715,1716],[1715,1717],[1717,1718],[1717,1719],[1719,1721],[1725,1726],[1725,1727],[1774,1775],[1774,1776],[1782,1783],[1782,1792],[1784,1785],[1784,1792],[1786,1787],[1786,1789],[1793,1794],[1793,1816],[1794,1795],[1794,1796],[1799,1800],[1799,1808],[1801,1802],[1801,1803],[1805,1806],[1805,1808],[1830,1831],[1845,1 unmodified line],[1845,1855],[1847,1848],[1847,1849],[1851,1853],[1851,1855],[1861,1862],[1861,1865],[1865,1866],[1865,1868],[1869,1870],[1869,1876],[1871,1872],[1871,1874],[1877,1878],[1877,1888],[1882,1883],[1882,1884],[1884,-1881],[1884,1885],[1900,1901],[1900,1903],[1907,1908],[1907,1921],[1911,1916],[1911,1918],[1921,1923],[1921,1935],[1964,1965],[1964,1966],[1966,1967],[1966,1968],[1969,1970],[1969,1971],[1986,1987],[2020,1 unmodified line],[2020,2026],[2034,2035],[2034,2039],[2035,2036],[2035,2038],[2040,2041],[2040,2094],[2041,2042],[2041,2044],[2054,2055],[2054,2056],[2057,2059],[2057,2060],[2062,2063],[2062,2074],[2063,2064],[2063,2065],[2065,2066],[2065,2069],[2067,2068],[2067,2069],[2071,2062],[2071,2072],[2081,2082],[2081,2087],[2084,2086],[2084,2087],[2101,2102],[2101,2103],[2112,2113],[2112,2114],[2115,2118],[2115,2119],[2144,2145],[2144,2150],[2150,2151],[2150,2153],[2157,4 unmodified lines2160],[2160,2161],[2160,2162],[2163,2164],[2163,2166],[2177,2178],[2177,2180],[2178,2177],[2178,2179],[2193,2194],[2193,2195],[2201,2204],[2201,2205],[2208,2210],[2208,2211],[2214,2215],[2214,2216],[2240,1 unmodified line],[2240,2248],[2242,2243],[2242,2244],[2248,2249],[2248,2250],[2258,2259],[2258,2263],[2260,2261],[2260,2262],[2267,2271],[2267,2275],[2272,2273],[2272,2274],[2282,2283],[2282,2284],[2292,2295],[2292,2296],[2311,2312],[2311,2314],[2317,2318],[2318,2319],[2318,2320],[2320,2321],[2329,2330],[2329,2331],[2335,2336],[2335,2337],[2351,2352],[2351,2353],[2370,2371],[2370,2396],[2371,2374],[2375,2376],[2375,2384],[2377,2378],[2377,2382],[2385,2386],[2385,2389],[2390,2393],[2390,2396],[2415,2416],[2415,2417],[2422,2423],[2422,2424],[2424,2427],[2424,2430],[2427,4 unmodified lines2431],[2431,2432],[2431,2433],[2439,2440],[2439,2446],[2444,2445],[2444,2446],[2447,2448],[2447,2451],[2448,2449],[2448,2451],[2451,2452],[2451,2461],[2453,2454],[2453,2455],[2456,2458],[2456,2459],[2459,2460],[2459,2465],[2461,2462],[2461,2465],[2463,2464],[2463,2465],[2465,2466],[2465,2467],[2467,2468],[2467,2470],[2480,2481],[2480,2504],[2482,2483],[2482,2484],[2484,1 unmodified line],[2484,2486],[2486,2487],[2486,2503],[2488,2494],[2495,2496],[2495,2497],[2497,2498],[2497,2501],[2504,2505],[2504,2508],[2505,2506],[2505,2507],[2508,2509],[2508,2521],[2512,2513],[2512,2514],[2516,2518],[2516,2521],[2555,2556],[2555,2557],[2576,2579],[2576,2580],[2581,2583],[2583,2584],[2583,2587],[2592,2593],[2592,2594],[2595,2596],[2595,2598],[2632,2633],[2632,2634],[2664,2665],[2664,2666],[2671,2672],[2671,2673],[2680,2681],[2680,2682],[2682,2685],[2682,2686],[2695,2696],[2695,2697],[2702,2703],[2702,2704],[2714,2715],[2714,2716],[2722,2723],[2722,2724],[2729,2730],[2729,2731],[2743,2744],[2743,2745],[2768,2769],[2768,2771],[2772,2773],[2772,2774],[2777,2778],[2777,2779],[2779,2780],[2779,2781],[2787,4 unmodified lines2789],[2790,2791],[2790,2792],[2798,2799],[2798,2800],[2801,2802],[2801,2810],[2803,2804],[2803,2805],[2807,2808],[2807,2809],[2835,2836],[2835,2840],[2846,2847],[2846,2861],[2847,1 unmodified line],[2847,2850],[2851,2 unmodified lines[2851,2853],[2853,-2850],[2853,2854],[2865,2866],[2865,2870],[2867,2868],[2867,2869],[2871,2872],[2871,2873]],"missing_lines": [703,1157,1720,2372,2373,2489,2582],"missing_arcs": [[702,703],[1008,1010],[1123,1125],[1156,1157],[1184,1202],[1217,1219],[1303,1307],[1719,1720],[1830,-1826],[1986,-1982],[2317,-2316],[2320,2317],[2371,2372],[2488,2489],[2581,2582]]},123456727 unmodified lines35363738394041424344454647484950515253545556573 unmodified lines616263646566676833 unmodified lines1021031041051061071081091101111121 unmodified line1141151161171181191201213 unmodified lines1251261271281291301311321331341351361371381391401411421431441451461471481491501514 unmodified lines1561571581591601611621631641652 unmodified lines1681691701711721731741752 unmodified lines1781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482494 unmodified lines2542552562572582592602612622632642652662672682691 unmodified line2712722732742752762772781 unmodified line28028128228328428528628728828929029129229329429529629738 unmodified lines3363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034 unmodified lines4084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744752 unmodified lines4784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325332 unmodified lines53653753853954054154254354454554654754854955011 unmodified lines5625635645655665675685695701 unmodified line5725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206217 unmodified lines6296306316326336346356366376386396406416426436446456466476486494 unmodified lines6546556566576586596606616626636646656666676686696706716722 unmodified lines6756766776786796806816826836846853 unmodified lines68969069169269369469569669769869970070170210 unmodified lines71371471571671771871972072172272314 unmodified lines73873974074174274374474514 unmodified lines7607617627637647657667677687697703 unmodified lines7747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128133 unmodified lines8178188198208218228231 unmodified line8258268278288298308318322 unmodified lines8358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688692 unmodified lines8728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359364 unmodified lines9419429439449459469479489499509519529539549559569579581 unmodified line9609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979982 unmodified lines10011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110522 unmodified lines105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910804 unmodified lines1085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311444 unmodified lines1149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813492 unmodified lines1352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413754 unmodified lines13801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221 unmodified line1424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651 unmodified line1467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215835 unmodified lines1589159015911592159315941595159615971598159916004 unmodified lines1605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311 unmodified line163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091 unmodified line1711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517763 unmodified lines178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261 unmodified line18281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018613 unmodified lines186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518964 unmodified lines190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719684 unmodified lines19731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920004 unmodified lines2005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121121 unmodified line21142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324441 unmodified line244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325044 unmodified lines25092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525361 unmodified line25382539254025412542254325441 unmodified line2546254725482549255025512552255325542555255625572558255925601 unmodified line2562256325642565256625672568256925702571257225732574257525761 unmodified line2578257925802581258225832584258525862587258825892590259125924 unmodified lines259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327241 unmodified line2726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727881 unmodified line2790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528761 unmodified line2878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530364 unmodified lines3041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931001 unmodified line310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331245 unmodified lines313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533561 unmodified line335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734881 unmodified line34903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936404 unmodified lines36453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937201 unmodified line37223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739084 unmodified lines391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940401 unmodified line4042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844 unmodified lines42894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943401 unmodified line43424343434443454346434743482 unmodified lines43514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427{"backend/app.py": {"covered_lines": 1871,"covered_branches": 619,"lines": [3,4,27 unmodified lines33,34,35,38,43,44,46,47,49,52,55,58,60,61,67,70,71,72,76,84,95,96,97,3 unmodified lines101,102,103,104,105,140,141,142,33 unmodified lines176,177,178,179,180,182,183,184,187,188,189,1 unmodified line191,192,193,194,195,198,199,200,3 unmodified lines204,205,206,207,208,210,212,216,217,218,221,223,224,227,228,229,230,231,232,233,235,238,240,241,246,247,248,4 unmodified lines253,254,255,256,257,259,262,264,265,266,2 unmodified lines269,270,271,272,273,276,277,278,2 unmodified lines281,282,283,284,285,287,289,290,291,292,293,295,296,299,300,301,304,305,306,307,308,309,310,332,335,336,337,345,351,355,359,366,369,370,371,372,373,374,376,377,379,380,383,384,387,388,389,390,391,394,395,399,401,403,404,405,406,409,411,412,415,419,420,421,422,423,424,425,426,430,431,432,4 unmodified lines437,438,439,440,441,444,445,446,449,451,452,453,456,458,459,460,1 unmodified line462,463,464,465,466,468,469,470,1 unmodified line472,473,474,475,476,479,481,482,483,484,485,486,487,488,491,495,496,497,38 unmodified lines536,537,538,539,540,544,545,547,549,550,551,552,553,557,558,559,565,566,567,569,570,571,572,574,575,576,577,578,579,580,582,583,584,587,589,590,591,592,593,594,596,597,598,599,600,602,603,604,606,607,608,609,612,613,614,615,616,617,618,619,621,622,623,624,625,629,630,631,4 unmodified lines636,637,638,639,640,644,645,646,647,649,650,652,656,658,659,662,663,665,666,668,669,670,673,674,679,680,681,682,684,686,689,690,691,692,693,694,695,697,698,699,702,704,706,707,708,709,712,713,715,722,724,727,737,738,741,742,751,766,770,772,773,778,780,783,784,786,787,788,2 unmodified lines791,792,793,794,795,797,798,799,800,801,802,803,805,806,807,814,815,816,817,818,819,820,825,826,827,828,830,832,835,844,848,855,856,857,858,861,862,863,864,871,872,873,874,875,876,877,878,880,882,885,890,895,900,903,904,905,2 unmodified lines908,909,910,911,912,916,917,918,919,921,922,923,926,927,928,11 unmodified lines940,941,942,943,944,946,948,949,950,1 unmodified line952,953,954,955,956,958,959,960,961,962,965,971,974,975,976,977,978,981,987,991,992,996,997,998,999,1000,1001,1002,1003,1007,1008,1010,1011,1012,1013,1014,1015,1016,1019,1020,1021,1022,1023,1027,1028,1029,1031,1033,1034,1035,7 unmodified lines1043,1044,1045,1046,1047,1049,1051,1052,1053,1054,1056,1057,1059,1060,1061,1062,1063,1064,1066,1067,1068,4 unmodified lines1073,1074,1075,1076,1077,1081,1082,1083,1087,1088,1089,1091,1092,1095,1097,1098,1102,1103,1104,2 unmodified lines1107,1108,1109,1110,1111,1113,1114,1115,1117,1118,1119,3 unmodified lines1123,1124,1125,1126,1127,1129,1131,1132,1133,1134,1135,1137,1138,1139,10 unmodified lines1150,1151,1152,1153,1154,1156,1157,1158,1161,1162,1163,14 unmodified lines1178,1179,1180,1181,1182,1184,1185,1186,14 unmodified lines1201,1202,1203,1204,1205,1207,1208,1209,1211,1212,1213,3 unmodified lines1217,1218,1219,1220,1221,1223,1224,1225,1226,1228,1237,1240,1244,1250,1252,1254,1255,1256,1257,1258,1264,1265,1266,1267,1268,1269,1270,1271,1272,1274,1275,1276,1277,1278,1279,1280,1283,1284,1285,1286,3 unmodified lines1290,1291,1292,1293,1294,1295,1296,1 unmodified line1298,1299,1300,1301,1302,1303,1304,1305,2 unmodified lines1308,1309,1310,1318,1319,1321,1322,1323,1325,1326,1327,1328,1331,1332,1333,1334,1335,1336,1337,1338,1339,1340,1341,1342,1343,1344,1345,1346,1349,1350,1351,1352,1355,1356,1357,2 unmodified lines1360,1361,1362,1364,1365,1367,1368,1369,1371,1372,1373,1374,1375,1380,1381,1384,1387,1388,1389,1393,1394,1395,1399,1400,1401,1404,1405,1406,1407,1408,1409,1412,1414,1415,1416,1418,1419,1420,1421,1422,1423,1424,1425,1426,1428,1430,1431,1432,1433,1434,1436,1437,1438,1439,1440,1442,1443,1444,1445,1446,1447,1449,1450,1451,1452,4 unmodified lines1458,1459,1460,1461,1462,1464,1465,1466,1467,1469,1471,1472,1473,1474,1475,1476,1477,1478,1 unmodified line1480,1481,1482,1483,1484,1485,1486,1487,1488,1489,1492,1500,1501,1502,1503,1504,1506,1509,1510,1511,1512,1515,1516,1517,1518,1519,1520,1521,1522,1524,1525,1526,1529,1530,1531,1534,1535,1536,1537,2 unmodified lines1540,1541,1542,1543,1544,1545,1547,1548,1549,1550,1551,1553,1554,1555,1560,1561,1562,1563,1566,1570,1573,1577,1578,1579,1580,1581,1582,1585,1589,1592,1593,1594,1595,1596,1597,1598,1599,1600,1601,1602,1603,1604,1605,1606,1607,1608,1609,1610,1611,1612,1613,1614,2 unmodified lines1617,1618,1619,1628,1633,1643,1644,1645,1646,1647,1648,1649,1650,1651,1652,1655,1656,1657,1658,1659,1660,1661,1662,1663,1664,1665,4 unmodified lines1670,1671,1672,1673,1674,1677,1678,1690,1693,1694,1695,1696,1697,1698,1699,1701,1704,1705,1706,1707,1710,1711,1712,1715,1719,1737,1738,1739,1740,1741,1749,1750,1751,1752,1753,1754,1755,1756,1759,1760,1761,1762,1763,1764,1765,1766,1767,1768,1769,1770,1772,1773,1774,1775,1776,1777,1778,1779,1780,1781,4 unmodified lines1786,1787,1788,1790,1791,1793,1794,1795,1796,1799,1800,1801,1802,1803,1804,1806,1808,1809,1810,1811,1813,1814,1817,1818,1821,1822,1823,1824,1825,1826,1827,1828,1829,1830,1831,1833,1834,1835,1838,1840,1841,1842,1844,1845,1846,1848,1849,1850,1851,1852,1853,1854,1855,1856,1857,1858,1859,1861,1862,1863,1864,1865,1867,1868,1871,1872,1875,1876,1877,1878,1879,1880,1881,1883,1884,1885,1886,1887,1888,1889,1890,1891,1896,1898,1901,1903,1904,1915,1916,1917,1918,1920,1921,1923,1924,1926,1934,1935,1936,1937,1938,1939,1942,1943,1944,1945,1946,1947,1948,1949,1950,1951,1952,1955,1956,1957,1958,1959,1960,1962,1964,1965,1966,1967,1969,1970,1975,1976,1979,1984,1985,1989,1990,1991,1992,1993,1997,1999,2000,2001,2002,2003,2004,2005,2006,2007,2010,2011,2012,2013,2014,2015,2016,2017,2018,2019,2020,2021,2022,2024,2025,2026,2027,2028,2033,2034,2035,2036,2037,2039,2040,2041,2042,2043,2044,2045,2046,2047,2048,2049,2050,2051,2052,2054,2057,2058,2059,2060,2061,2062,2063,2064,2066,2067,2069,2071,2072,2073,2074,2077,2078,2 unmodified lines2081,2082,2083,2086,2087,2088,2089,2090,2091,2092,2093,2094,2095,2098,2099,2100,2101,2102,2103,2104,2105,2106,2107,2108,4 unmodified lines2113,2114,2115,2117,2118,2119,2122,2123,2124,2125,2130,2131,2133,2134,2137,2138,2139,2140,2141,2142,2143,2144,2146,2149,2152,2153,2154,2155,2157,2158,2159,2160,2161,2164,2165,2172,2173,2174,2175,2176,2177,2178,2179,1 unmodified line2181,2184,2185,2186,2187,2188,2190,2191,2192,2193,2194,2195,2196,2197,2200,2204,2205,2206,2207,2209,2210,2212,2214,2218,2219,2220,2221,2222,2223,2224,2225,2226,2227,2228,2229,2230,2231,2232,2233,2234,2238,2239,1 unmodified line2241,2242,2243,2247,2251,2252,2253,2254,2255,2256,2257,2258,2259,2262,2263,2264,2267,2268,2272,2275,2276,2279,2285,2286,2291,2292,2294,2296,2297,2298,2299,2300,2301,2305,2306,2307,2308,2309,2310,2311,2313,2314,2315,2316,2317,2320,2329,2331,2332,2333,2338,2339,2342,2345,2350,2351,2354,2355,2356,2357,2358,2359,2362,2363,2364,2365,2366,2367,2369,2370,2373,2376,2377,2378,2379,2380,2381,2382,2393,2395,2396,2397,2398,2399,2402,2403,2404,2407,2408,2410,2411,2412,2413,2414,2415,2417,2418,2419,2420,2421,2422,2423,2424,2425,2426,2427,2428,2429,2431,2432,2433,2434,2435,2436,2438,2439,2440,5 unmodified lines2446,2447,2448,2450,2451,2452,2453,2454,2455,2459,2460,2461,4 unmodified lines2466,2467,2468,2474,2475,2476,2477,2478,2479,2481,2483,2484,2485,2486,2487,2488,2489,2490,2491,2492,2493,2494,2495,2496,2498,2499,2501,1 unmodified line2504,2505,2506,2508,2509,2512,2513,2519,2520,2521,2522,2523,2524,2525,2533,2534,2535,2536,2537,2543,2544,2545,2548,2549,2551,2552,2553,2554,2555,2556,2559,2560,2561,2563,2564,2567,2568,2571,2572,2573,2574,2575,2576,2578,2581,2582,2583,2584,2585,2586,2587,2590,2591,2592,2593,2594,2595,2596,2597,2598,2599,2600,2601,2609,2610,2611,2612,2613,2614,2615,2625,2626,2627,2628,2629,2630,2631,1 unmodified line2633,2634,2635,2636,2637,2644,2645,2646,2647,2648,2649,2651,2652,2653,2654,2657,2658,2659,2660,2661,2662,2665,2666,2669,2670,2671,2673,2674,2675,2676,2677,2678,2680,2681,2682,2683,2684,2686,2687,2688,2690,2691,2692,2693,2694,2695,2696,2698,2699,2700,2701,2702,2703,2704,2705,2707,2708,2709,2710,2711,2716,2717,2718,2720,2721,2722,3 unmodified lines2727,2728,2729,2731,2734,2735,2737,2740,2741,2742,2745,2746,2747,2748,2749,2751,2752,2753,2754,2755,2756,2757,2758,2759,2760,2761,2764,2765,2766,2767,2768,2769,2770,2771,2772,2774,2776,2777,2778,2779,2780,2781,2782,2783,2784,2785,2786,1 unmodified line2788,2789,2790,2792,2793,2799,2806,2807,2808,2809,2810,2813,2815,2816,2817,2820,2821,2822,2823,2824,2825,2826,2827,2828,2830,2831,2832,2833,2834,2836,2839,2840,2841,2842,3 unmodified lines2846,2847,2848,2849,2850,2851,2852,2853,2855,2856,2858,2859],"arcs": [[228,229],[228,230],[231,232],[231,235],[247,4 unmodified lines249],[249,250],[249,251],[252,253],[252,256],[254,252],[254,255],[265,266],[265,267],[269,270],[269,271],[277,278],[277,279],[289,290],[289,292],[290,289],[290,291],[306,4 unmodified lines308],[308,309],[308,310],[372,373],[372,374],[389,390],[389,391],[420,4 unmodified lines422],[422,423],[422,424],[426,430],[426,431],[431,432],[431,434],[445,-444],[445,446],[451,452],[451,453],[458,459],[458,460],[461,462],[461,476],[463,-462],[463,464],[465,466],[465,468],[482,-479],[482,483],[483,484],[483,485],[516,517],[516,540],[520,521],[520,524],[526,1 unmodified line],[526,528],[528,529],[528,531],[544,545],[544,547],[557,558],[557,565],[567,569],[567,571],[569,567],[569,570],[571,-491],[571,572],[580,582],[580,584],[592,593],[592,596],[599,600],[599,602],[603,604],[603,606],[618,619],[618,621],[690,691],[690,699],[693,694],[693,695],[695,697],[695,698],[704,706],[707,708],[707,709],[789,790],[789,792],[794,-778],[794,795],[798,799],[798,800],[818,819],[818,820],[826,827],[826,828],[872,873],[872,875],[877,878],[877,882],[904,905],[904,907],[905,904],[905,906],[908,909],[908,912],[918,919],[918,923],[919,921],[919,922],[929,930],[929,932],[932,933],[932,936],[938,939],[938,952],[939,940],[939,952],[942,943],[942,944],[944,946],[944,948],[949,939],[949,950],[952,953],[952,962],[955,956],[955,958],[960,961],[960,962],[976,977],[976,978],[991,992],[991,996],[996,997],[996,1038],[1000,1 unmodified line],[1000,1023],[1002,1003],[1002,1007],[1007,1008],[1007,1010],[1010,1011],[1014,1015],[1014,1020],[1016,1014],[1016,1019],[1021,1000],[1021,1022],[1027,1028],[1027,1031],[1033,4 unmodified lines1035],[1035,1036],[1035,1037],[1038,1039],[1038,1073],[1041,1042],[1041,1059],[1042,1 unmodified line],[1042,1051],[1044,1 unmodified line],[1044,1046],[1046,1047],[1046,1049],[1051,1 unmodified line],[1051,1053],[1053,1054],[1053,1056],[1059,1 unmodified line],[1059,1066],[1061,1062],[1061,1063],[1068,4 unmodified lines1070],[1070,1071],[1070,1072],[1077,1081],[1077,1129],[1083,1087],[1083,1109],[1087,1088],[1087,1091],[1092,1095],[1092,1097],[1103,1104],[1103,1105],[1107,1083],[1107,1108],[1110,1111],[1110,1113],[1113,1114],[1113,1117],[1118,1119],[1118,1121],[1121,1122],[1121,1124],[1125,1126],[1133,1134],[1133,1135],[1138,1139],[1138,1145],[1139,1140],[1139,1141],[1142,1143],[1142,1144],[1146,1 unmodified line],[1146,1175],[1148,1149],[1148,1171],[1151,1152],[1151,1161],[1152,1153],[1152,1170],[1156,1152],[1156,1157],[1158,1152],[1162,1163],[1162,1170],[1163,1164],[1163,1168],[1164,1163],[1164,1 unmodified line],[1166,1163],[1166,1167],[1168,1162],[1168,1169],[1171,1172],[1171,1174],[1175,1176],[1175,1184],[1178,1179],[1178,1182],[1180,1178],[1180,1181],[1186,1187],[1190,1191],[1190,1192],[1193,1194],[1193,1202],[1194,1195],[1194,1196],[1200,1193],[1200,1201],[1202,1 unmodified line],[1202,1204],[1204,1205],[1204,1207],[1207,1208],[1207,1211],[1212,1213],[1212,1215],[1215,1216],[1215,1218],[1219,1220],[1224,1225],[1224,1226],[1283,1284],[1287,1288],[1287,1291],[1293,1294],[1293,1297],[1298,1299],[1298,1302],[1321,1322],[1321,1323],[1350,1351],[1350,1352],[1357,1358],[1357,1359],[1362,1364],[1362,1367],[1407,1408],[1407,1409],[1432,1433],[1432,1436],[1444,1445],[1444,1446],[1451,1452],[1451,1453],[1457,1458],[1457,1464],[1460,1461],[1460,1462],[1464,4 unmodified lines1466],[1473,1474],[1473,1487],[1475,1476],[1475,1481],[1476,1477],[1476,1478],[1479,1475],[1479,1480],[1482,1483],[1482,1485],[1487,1488],[1487,1489],[1500,1501],[1500,1502],[1502,1 unmodified line],[1502,1506],[1509,1510],[1509,1511],[1517,1518],[1517,1520],[1520,5 unmodified lines],[1522,1524],[1522,1525],[1538,1539],[1538,1540],[1543,1544],[1543,1545],[1577,1578],[1577,1579],[1580,1581],[1580,1582],[1658,1659],[1658,1660],[1660,1661],[1660,1662],[1663,1664],[1663,1665],[1671,1672],[1671,1673],[1673,-1655],[1673,1674],[1693,1694],[1693,1695],[1695,1696],[1695,1697],[1697,1698],[1697,1699],[1699,1701],[1705,1706],[1705,1707],[1754,1755],[1754,1756],[1762,1763],[1762,1772],[1764,1765],[1764,1772],[1766,1767],[1766,1769],[1773,1774],[1773,1796],[1774,1775],[1774,1776],[1779,1780],[1779,1788],[1781,1782],[1781,1783],[1785,1786],[1785,1788],[1810,1811],[1825,1826],[1825,1835],[1827,1828],[1827,1829],[1831,1833],[1831,1835],[1841,1842],[1841,1845],[1845,1 unmodified line],[1845,1848],[1849,1850],[1849,1856],[1851,1852],[1851,1854],[1857,1858],[1857,1868],[1862,1863],[1862,1864],[1864,-1861],[1864,1865],[1880,1881],[1880,1883],[1887,1888],[1887,1901],[1891,1896],[1891,1898],[1901,1903],[1901,1915],[1944,1945],[1944,1946],[1946,1947],[1946,1948],[1949,1950],[1949,1951],[1966,1967],[2000,2001],[2000,2006],[2014,2015],[2014,2019],[2015,2016],[2015,2018],[2020,1 unmodified line],[2020,2074],[2021,2022],[2021,2024],[2034,2035],[2034,2036],[2037,2039],[2037,2040],[2042,2043],[2042,2054],[2043,2044],[2043,2045],[2045,2046],[2045,2049],[2047,2048],[2047,2049],[2051,2042],[2051,2052],[2061,2062],[2061,2067],[2064,2066],[2064,2067],[2081,2082],[2081,2083],[2092,2093],[2092,2094],[2095,2098],[2095,2099],[2124,2125],[2124,2130],[2130,2131],[2130,2133],[2137,2138],[2137,2140],[2140,2141],[2140,2142],[2143,2144],[2143,2146],[2157,4 unmodified lines2160],[2158,2157],[2158,2159],[2173,2174],[2173,2175],[2181,2184],[2181,2185],[2188,2190],[2188,2191],[2194,2195],[2194,2196],[2220,2221],[2220,2228],[2222,2223],[2222,2224],[2228,2229],[2228,2230],[2238,2239],[2238,2243],[2240,1 unmodified line],[2240,2242],[2247,2251],[2247,2255],[2252,2253],[2252,2254],[2262,2263],[2262,2264],[2272,2275],[2272,2276],[2291,2292],[2291,2294],[2297,2298],[2298,2299],[2298,2300],[2300,2301],[2309,2310],[2309,2311],[2315,2316],[2315,2317],[2331,2332],[2331,2333],[2350,2351],[2350,2376],[2351,2354],[2355,2356],[2355,2364],[2357,2358],[2357,2362],[2365,2366],[2365,2369],[2370,2373],[2370,2376],[2395,2396],[2395,2397],[2402,2403],[2402,2404],[2404,2407],[2404,2410],[2407,2408],[2407,2411],[2411,2412],[2411,2413],[2419,2420],[2419,2426],[2424,2425],[2424,2426],[2427,4 unmodified lines2431],[2428,2429],[2428,2431],[2431,2432],[2431,2441],[2433,2434],[2433,2435],[2436,2438],[2436,2439],[2439,2440],[2439,2445],[2441,2442],[2441,2445],[2443,2444],[2443,2445],[2445,2446],[2445,2447],[2447,2448],[2447,2450],[2460,2461],[2460,2484],[2462,2463],[2462,2464],[2464,2465],[2464,2466],[2466,2467],[2466,2483],[2468,2474],[2475,2476],[2475,2477],[2477,2478],[2477,2481],[2484,1 unmodified line],[2484,2488],[2485,2486],[2485,2487],[2488,2489],[2488,2501],[2492,2493],[2492,2494],[2496,2498],[2496,2501],[2535,2536],[2535,2537],[2556,2559],[2556,2560],[2561,2563],[2563,2564],[2563,2567],[2572,2573],[2572,2574],[2575,2576],[2575,2578],[2612,2613],[2612,2614],[2644,2645],[2644,2646],[2651,2652],[2651,2653],[2660,2661],[2660,2662],[2662,2665],[2662,2666],[2675,2676],[2675,2677],[2682,2683],[2682,2684],[2694,2695],[2694,2696],[2702,2703],[2702,2704],[2709,2710],[2709,2711],[2723,2724],[2723,2725],[2748,2749],[2748,2751],[2752,2753],[2752,2754],[2757,2758],[2757,2759],[2759,2760],[2759,2761],[2767,2768],[2767,2769],[2770,2771],[2770,2772],[2778,2779],[2778,2780],[2781,2782],[2781,2790],[2783,2784],[2783,2785],[2787,4 unmodified lines2789],[2815,2816],[2815,2820],[2826,2827],[2826,2841],[2827,2828],[2827,2830],[2831,2832],[2831,2833],[2833,-2830],[2833,2834],[2845,2846],[2845,2850],[2847,1 unmodified line],[2847,2849],[2851,2 unmodified lines[2851,2853]],"missing_lines": [705,1159,1700,2352,2353,2469,2562],"missing_arcs": [[704,705],[1010,1012],[1125,1127],[1158,1159],[1186,1204],[1219,1221],[1283,1287],[1699,1700],[1810,-1806],[1966,-1962],[2297,-2296],[2300,2297],[2351,2352],[2468,2469],[2561,2562]]},
24 unmodified lines252627282930654 unmodified lines685686687688689690422 unmodified lines11131114111511161117111811191120112111221123144 unmodified lines1268126912701271127212731274127512763 unmodified lines12801281128212831284128512863 unmodified lines12901291129212931294129512966 unmodified lines13031304130513061307130813091 unmodified line13111312131313141315131613171 unmodified line1319132013211322132313241325132613271328132913301331133224 unmodified linesRANGE_MODULE_SHA = "8d6eb60fb15bab4f303e3ff689ca083ad9fa49ef92c928b75bfdc9aea88ce825"TERM_NEW_APP_SHA = "0c64e9323c7b7512f666d6ce69f151c33d8bef3d31c9b5c14fb14834eb6c94ed"TERM_MODULE_SHA = "4d66ea84242625e56e6b387506050527fed6e557b813af34bc7986aaba76970d"def migrate_retired_txt_app_baseline(root: Path, previous: dict[str, dict[str, object]],654 unmodified lines}return resultdef migrate_native_postings_baseline(previous: dict[str, dict[str, object]],old_source: Path, new_source: Path) -> dict[str, dict[str, object]]:422 unmodified lines(root / "scripts/coverage-anchors/term-candidates-old-app.py.snapshot").exists() andhashlib.sha256((root / "scripts/coverage-anchors/term-candidates-old-app.py.snapshot").read_bytes()).hexdigest() == RANGE_NEW_APP_SHA and(root / "backend/search_term_candidates.py").exists() andhashlib.sha256((root / "backend/search_term_candidates.py").read_bytes()).hexdigest() == TERM_MODULE_SHA):errors.append("star-browse coverage ratchet requires exact reviewed app source")else:entry = baseline.get(path, {})if source_sha == TERM_NEW_APP_SHA:first, second, third = 989, 990, 994elif source_sha == RANGE_NEW_APP_SHA:first, second, third = 1037, 1038, 1042144 unmodified linesdirect_term_parent = (previous is not None andhashlib.sha256(json.dumps(previous.get("backend/app.py"), sort_keys=True,separators=(",", ":")).encode()).hexdigest() == term_parent_digest)if (previous is not None and star_anchor.exists() and previous.get("backend/app.py") != baseline.get("backend/app.py")and not direct_pdf_baseline and not direct_archive_baseline and not direct_typing_baselineand not direct_folder_parent and not direct_range_parent and not direct_term_parent):try:# Historical migrations target their original immutable source,# never the later PDF edit.3 unmodified linesprint(f"star-browse coverage migration failed: {error}", file=sys.stderr)return 1if (previous is not None and pdf_anchor.exists() and previous.get("backend/app.py") != baseline.get("backend/app.py")and not direct_archive_baseline and not direct_typing_baseline and not direct_folder_parent and not direct_range_parent and not direct_term_parent):try:target = archive_old if archive_old.exists() else ROOT / "backend/app.py"previous = migrate_pdf_limit_app_baseline(previous, pdf_anchor, target)3 unmodified linesarchive_migrated = Falseif (previous is not None and archive_old.exists() and "backend/reader_archive.py" not in previousand previous.get("backend/app.py") != baseline.get("backend/app.py") and not direct_typing_baselineand not direct_folder_parent and not direct_range_parent and not direct_term_parent):try:previous = migrate_reader_archive_app_baseline(previous, archive_old, archive_new, archive_module)archive_migrated = True6 unmodified linesexcept ValueError as error:print(f"backend typing coverage migration failed: {error}", file=sys.stderr)return 1if previous is not None and previous.get("backend/app.py") != baseline.get("backend/app.py") and not direct_range_parent and not direct_term_parent:try:previous = migrate_folder_contents_app_baseline(previous, typing_new, ROOT / "scripts/coverage-anchors/range-cache-old-app.py.snapshot",1 unmodified lineexcept (OSError, ValueError) as error:print(f"folder-contents coverage migration failed: {error}", file=sys.stderr)return 1if previous is not None and previous.get("backend/app.py") != baseline.get("backend/app.py") and not direct_term_parent:try:previous = migrate_reader_range_app_baseline(previous, ROOT / "scripts/coverage-anchors/range-cache-old-app.py.snapshot",1 unmodified lineexcept (OSError, ValueError) as error:print(f"reader-range coverage migration failed: {error}", file=sys.stderr)return 1if previous is not None and previous.get("backend/app.py") != baseline.get("backend/app.py"):try:previous = migrate_search_term_app_baseline(previous, ROOT / "scripts/coverage-anchors/term-candidates-old-app.py.snapshot",ROOT / "backend/app.py", ROOT / "backend/search_term_candidates.py")except (OSError, ValueError) as error:print(f"search-term coverage migration failed: {error}", file=sys.stderr)return 1errors = coverage_errors(ROOT, report, baseline, previous)if errors:print("\n".join(errors), file=sys.stderr)24 unmodified lines2526272829303132654 unmodified lines687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761422 unmodified lines11841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209144 unmodified lines13541355135613571358135913601361136213631364136513663 unmodified lines13701371137213731374137513763 unmodified lines13801381138213831384138513866 unmodified lines13931394139513961397139813991 unmodified line14011402140314041405140614071 unmodified line140914101411141214131414141514161417141814191420142114221423142414251426142714281429143024 unmodified linesRANGE_MODULE_SHA = "8d6eb60fb15bab4f303e3ff689ca083ad9fa49ef92c928b75bfdc9aea88ce825"TERM_NEW_APP_SHA = "0c64e9323c7b7512f666d6ce69f151c33d8bef3d31c9b5c14fb14834eb6c94ed"TERM_MODULE_SHA = "4d66ea84242625e56e6b387506050527fed6e557b813af34bc7986aaba76970d"WARM_NEW_APP_SHA = "f9fe394346923e0d36f06908d7092a842330b5474b464c8a02dd46c12a6e8e8b"WARM_MODULE_SHA = "b720d87c5fb86d2cac1fb1fc2c7933477e106af7689fff56e6217c446604ab6a"def migrate_retired_txt_app_baseline(root: Path, previous: dict[str, dict[str, object]],654 unmodified lines}return resultdef migrate_download_warm_app_baseline(previous: dict[str, dict[str, object]],old_source: Path, new_source: Path, extracted_source: Path) -> dict[str, dict[str, object]]:"""Translate the reviewed download-warm move; the new module must be 100% covered."""expected = ((old_source, TERM_NEW_APP_SHA), (new_source, WARM_NEW_APP_SHA),(extracted_source, WARM_MODULE_SHA))if any(hashlib.sha256(path.read_bytes()).hexdigest() != digest for path, digest in expected):raise ValueError("download-warm migration requires exact reviewed sources")if "backend/app.py" not in previous or "backend/download_warm.py" in previous:raise ValueError("download-warm migration requires the original module inventory")old, new = old_source.read_text().splitlines(), new_source.read_text().splitlines()mapping: dict[int, int] = {}changes: list[tuple[str, int, int, int, int]] = []for op, start, end, new_start, new_end in difflib.SequenceMatcher(None, old, new, autojunk=False).get_opcodes():if op == "equal":mapping.update({index + 1: new_start + 1 + index - start for index in range(start, end)})else:changes.append((op, start, end, new_start, new_end))if changes != [("insert", 35, 35, 35, 37), ("replace", 1238, 1253, 1240, 1241),("replace", 1256, 1268, 1244, 1248)]:raise ValueError("unexpected download-warm source diff")moved = set(range(1239, 1254)) | set(range(1257, 1269))entry = previous["backend/app.py"]fields = ("lines", "missing_lines", "arcs", "missing_arcs")if not all(isinstance(entry.get(field), list) for field in fields):raise ValueError("invalid download-warm baseline coordinates")if (entry.get("covered_lines") != len(entry["lines"])or entry.get("covered_branches") != len(entry["arcs"])):raise ValueError("invalid download-warm baseline counts")if (len(entry["lines"]) != len(set(entry["lines"]))or len(entry["missing_lines"]) != len(set(entry["missing_lines"]))or len(entry["arcs"]) != len({tuple(arc) for arc in entry["arcs"]})or len(entry["missing_arcs"]) != len({tuple(arc) for arc in entry["missing_arcs"]})or set(entry["lines"]) & set(entry["missing_lines"])or {tuple(arc) for arc in entry["arcs"]} & {tuple(arc) for arc in entry["missing_arcs"]}):raise ValueError("overlapping or duplicate download-warm coordinates")def translate(number: int) -> int:if type(number) is not int or abs(number) not in mapping:raise ValueError(f"unmapped download-warm coordinate: {number}")return (-1 if number < 0 else 1) * mapping[abs(number)]def lines(values: object) -> list[int]:if not isinstance(values, list):raise ValueError("invalid download-warm baseline lines")return sorted(translate(value) for value in values if value not in moved)def arcs(values: object) -> list[list[int]]:if not isinstance(values, list):raise ValueError("invalid download-warm baseline arcs")result: list[list[int]] = []for start, end in values:if abs(start) in moved:if abs(end) not in moved:raise ValueError(f"unexpected download-warm branch endpoint: {start}, {end}")continueresult.append([translate(start), translate(end)])return sorted(result)covered_lines, covered_arcs = lines(entry["lines"]), arcs(entry["arcs"])result = {name: dict(item) for name, item in previous.items()}result["backend/app.py"] = {"covered_lines": len(covered_lines), "covered_branches": len(covered_arcs),"lines": covered_lines, "arcs": covered_arcs,"missing_lines": lines(entry["missing_lines"]), "missing_arcs": arcs(entry["missing_arcs"]),}return resultdef migrate_native_postings_baseline(previous: dict[str, dict[str, object]],old_source: Path, new_source: Path) -> dict[str, dict[str, object]]:422 unmodified lines(root / "scripts/coverage-anchors/term-candidates-old-app.py.snapshot").exists() andhashlib.sha256((root / "scripts/coverage-anchors/term-candidates-old-app.py.snapshot").read_bytes()).hexdigest() == RANGE_NEW_APP_SHA and(root / "backend/search_term_candidates.py").exists() andhashlib.sha256((root / "backend/search_term_candidates.py").read_bytes()).hexdigest() == TERM_MODULE_SHA) and not (reviewed_folder_source and source_sha == WARM_NEW_APP_SHA and(root / "scripts/coverage-anchors/range-cache-old-app.py.snapshot").exists() andhashlib.sha256((root / "scripts/coverage-anchors/range-cache-old-app.py.snapshot").read_bytes()).hexdigest() == RANGE_OLD_APP_SHA and(root / "backend/reader_range_cache.py").exists() andhashlib.sha256((root / "backend/reader_range_cache.py").read_bytes()).hexdigest() == RANGE_MODULE_SHA and(root / "scripts/coverage-anchors/term-candidates-old-app.py.snapshot").exists() andhashlib.sha256((root / "scripts/coverage-anchors/term-candidates-old-app.py.snapshot").read_bytes()).hexdigest() == RANGE_NEW_APP_SHA and(root / "backend/search_term_candidates.py").exists() andhashlib.sha256((root / "backend/search_term_candidates.py").read_bytes()).hexdigest() == TERM_MODULE_SHA and(root / "scripts/coverage-anchors/download-warm-old-app.py.snapshot").exists() andhashlib.sha256((root / "scripts/coverage-anchors/download-warm-old-app.py.snapshot").read_bytes()).hexdigest() == TERM_NEW_APP_SHA and(root / "backend/download_warm.py").exists() andhashlib.sha256((root / "backend/download_warm.py").read_bytes()).hexdigest() == WARM_MODULE_SHA):errors.append("star-browse coverage ratchet requires exact reviewed app source")else:entry = baseline.get(path, {})if source_sha == WARM_NEW_APP_SHA:first, second, third = 991, 992, 996elif source_sha == TERM_NEW_APP_SHA:first, second, third = 989, 990, 994elif source_sha == RANGE_NEW_APP_SHA:first, second, third = 1037, 1038, 1042144 unmodified linesdirect_term_parent = (previous is not None andhashlib.sha256(json.dumps(previous.get("backend/app.py"), sort_keys=True,separators=(",", ":")).encode()).hexdigest() == term_parent_digest)warm_parent_digest = "fb53051c2f393bace1273912cc5a0fd609858756746b798bd84dd1fe2b7d9591"direct_warm_parent = (previous is not None andhashlib.sha256(json.dumps(previous.get("backend/app.py"), sort_keys=True,separators=(",", ":")).encode()).hexdigest() == warm_parent_digest)if (previous is not None and star_anchor.exists() and previous.get("backend/app.py") != baseline.get("backend/app.py")and not direct_pdf_baseline and not direct_archive_baseline and not direct_typing_baselineand not direct_folder_parent and not direct_range_parent and not direct_term_parent and not direct_warm_parent):try:# Historical migrations target their original immutable source,# never the later PDF edit.3 unmodified linesprint(f"star-browse coverage migration failed: {error}", file=sys.stderr)return 1if (previous is not None and pdf_anchor.exists() and previous.get("backend/app.py") != baseline.get("backend/app.py")and not direct_archive_baseline and not direct_typing_baseline and not direct_folder_parent and not direct_range_parent and not direct_term_parent and not direct_warm_parent):try:target = archive_old if archive_old.exists() else ROOT / "backend/app.py"previous = migrate_pdf_limit_app_baseline(previous, pdf_anchor, target)3 unmodified linesarchive_migrated = Falseif (previous is not None and archive_old.exists() and "backend/reader_archive.py" not in previousand previous.get("backend/app.py") != baseline.get("backend/app.py") and not direct_typing_baselineand not direct_folder_parent and not direct_range_parent and not direct_term_parent and not direct_warm_parent):try:previous = migrate_reader_archive_app_baseline(previous, archive_old, archive_new, archive_module)archive_migrated = True6 unmodified linesexcept ValueError as error:print(f"backend typing coverage migration failed: {error}", file=sys.stderr)return 1if previous is not None and previous.get("backend/app.py") != baseline.get("backend/app.py") and not direct_range_parent and not direct_term_parent and not direct_warm_parent:try:previous = migrate_folder_contents_app_baseline(previous, typing_new, ROOT / "scripts/coverage-anchors/range-cache-old-app.py.snapshot",1 unmodified lineexcept (OSError, ValueError) as error:print(f"folder-contents coverage migration failed: {error}", file=sys.stderr)return 1if previous is not None and previous.get("backend/app.py") != baseline.get("backend/app.py") and not direct_term_parent and not direct_warm_parent:try:previous = migrate_reader_range_app_baseline(previous, ROOT / "scripts/coverage-anchors/range-cache-old-app.py.snapshot",1 unmodified lineexcept (OSError, ValueError) as error:print(f"reader-range coverage migration failed: {error}", file=sys.stderr)return 1if previous is not None and previous.get("backend/app.py") != baseline.get("backend/app.py") and not direct_warm_parent:try:previous = migrate_search_term_app_baseline(previous, ROOT / "scripts/coverage-anchors/term-candidates-old-app.py.snapshot",ROOT / "scripts/coverage-anchors/download-warm-old-app.py.snapshot", ROOT / "backend/search_term_candidates.py")except (OSError, ValueError) as error:print(f"search-term coverage migration failed: {error}", file=sys.stderr)return 1if previous is not None and previous.get("backend/app.py") != baseline.get("backend/app.py"):try:previous = migrate_download_warm_app_baseline(previous, ROOT / "scripts/coverage-anchors/download-warm-old-app.py.snapshot",ROOT / "backend/app.py", ROOT / "backend/download_warm.py")except (OSError, ValueError) as error:print(f"download-warm coverage migration failed: {error}", file=sys.stderr)return 1errors = coverage_errors(ROOT, report, baseline, previous)if errors:print("\n".join(errors), file=sys.stderr)
15 unmodified lines1617181920212284 unmodified lines1071081091101111121133 unmodified lines1171181191201211221231241251261271281348 unmodified lines14771478147914801481148214831484148581 unmodified lines15671568156915701571157215731574157561 unmodified lines1637163816391640164116421643164460 unmodified lines1705170617071708170917101711171217131714171534 unmodified lines17501751175217531754175517561757175839 unmodified lines17981799180018011802180315 unmodified linesmigrate_star_browse_app_baseline, migrate_pdf_limit_app_baseline,migrate_reader_archive_app_baseline, migrate_backend_typing_app_baseline,migrate_folder_contents_app_baseline, migrate_reader_range_app_baseline,migrate_search_term_app_baseline, typing_alignment)from scripts.check_search_words_mutation import (EMPTY_STATUSES, EXECUTION_TESTS, SPECS, generated_mutations,mutation_diagnostics, mutation_errors)from scripts.check_strict_inventory import inventory_errors84 unmodified linesdef search_term_mapping():import difflibold = (ANCHORS / "term-candidates-old-app.py.snapshot").read_text().splitlines()new = (Path(__file__).resolve().parents[2] / "backend/app.py").read_text().splitlines()return {index + 1: new_start + 1 + index - startfor op, start, end, new_start, _ in difflib.SequenceMatcher(None, old, new, autojunk=False).get_opcodes()if op == "equal" for index in range(start, end)}3 unmodified linesreturn (-1 if line < 0 else 1) * search_term_mapping()[abs(line)]def current_coordinate(line):return search_term_coordinate(reader_range_coordinate(folder_contents_coordinate(typed_coordinate(line))))def current_arc(arc):return tuple(search_term_coordinate(reader_range_coordinate(folder_contents_coordinate(value))) for value in typed_arc(arc))class QualityInventoryTests(unittest.TestCase):1348 unmodified linesrange_layout = migrate_reader_range_app_baseline(folder_layout, ANCHORS / "range-cache-old-app.py.snapshot", ANCHORS / "term-candidates-old-app.py.snapshot",root / "backend/reader_range_cache.py")current_layout = migrate_search_term_app_baseline(range_layout, ANCHORS / "term-candidates-old-app.py.snapshot", root / "backend/app.py",root / "backend/search_term_candidates.py")self.assertEqual(current_layout, current)self.assertEqual({k: v for k, v in migrated.items() if k != "backend/app.py"},{k: v for k, v in previous.items() if k != "backend/app.py"})81 unmodified linesself.assertEqual(before, saved)range_layout = migrate_reader_range_app_baseline(moved, new_app, ANCHORS / "term-candidates-old-app.py.snapshot", root / "backend/reader_range_cache.py")final_layout = migrate_search_term_app_baseline(range_layout, ANCHORS / "term-candidates-old-app.py.snapshot", root / "backend/app.py",root / "backend/search_term_candidates.py")self.assertEqual(final_layout, current)self.assertNotIn("backend/folder_contents.py", moved)self.assertEqual((before["backend/app.py"]["covered_lines"], before["backend/app.py"]["covered_branches"]),61 unmodified linesold_copy = json.loads(json.dumps(previous))current_app, extracted = ANCHORS / "term-candidates-old-app.py.snapshot", root / "backend/reader_range_cache.py"migrated = migrate_reader_range_app_baseline(previous, old_app, current_app, extracted)final_layout = migrate_search_term_app_baseline(migrated, current_app, root / "backend/app.py", root / "backend/search_term_candidates.py")current = json.loads((root / "quality/baselines/backend-coverage-debt.json").read_text())self.assertEqual(previous, old_copy)self.assertEqual(final_layout, current)60 unmodified linesold_app = ANCHORS / "term-candidates-old-app.py.snapshot"previous = migrate_reader_range_app_baseline(folder, folder_old, old_app, root / "backend/reader_range_cache.py")old_copy = json.loads(json.dumps(previous))current_app, extracted = root / "backend/app.py", root / "backend/search_term_candidates.py"migrated = migrate_search_term_app_baseline(previous, old_app, current_app, extracted)current = json.loads((root / "quality/baselines/backend-coverage-debt.json").read_text())self.assertEqual(previous, old_copy)self.assertEqual(migrated, current)self.assertNotIn("backend/search_term_candidates.py", migrated)old, new = previous["backend/app.py"], migrated["backend/app.py"]self.assertEqual((old["covered_lines"], old["covered_branches"]), (1941, 664))34 unmodified lines"covered_branches": 38, "num_branches": 38}, "executed_lines": list(range(1, 69)),"missing_lines": [69], "executed_branches": [], "missing_branches": [], "excluded_lines": []}}}self.assertIn("new backend module requires 100% statements and branches: backend/search_term_candidates.py",coverage_errors(root, report, current, migrated))report["files"].pop("backend/search_term_candidates.py")self.assertIn("missing backend coverage report: backend/search_term_candidates.py",coverage_errors(root, report, current, migrated))weakened = json.loads(json.dumps(current))weakened["backend/app.py"]["arcs"].pop()39 unmodified linesterm_module.write_bytes((root / "backend/search_term_candidates.py").read_bytes() + b"\n# changed\n")self.assertIn(source_error, coverage_errors(self.root, no_report, current))term_module.write_bytes((root / "backend/search_term_candidates.py").read_bytes())self.assertNotIn(source_error, coverage_errors(self.root, no_report, current))(anchors / "reader-archive-old-app.py.snapshot").write_bytes(PRE_ARCHIVE_APP.read_bytes() + b"\n# changed\n")self.assertIn(source_error, coverage_errors(self.root, no_report, current))15 unmodified lines161718192021222384 unmodified lines1081091101111121131143 unmodified lines1181191201211221231241251261271281291301311321331341351361371381391401411421431441348 unmodified lines1493149414951496149714981499150015011502150381 unmodified lines1585158615871588158915901591159215931594159561 unmodified lines165716581659166016611662166316641665166660 unmodified lines17271728172917301731173217331734173517361737173834 unmodified lines17731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184739 unmodified lines188718881889189018911892189318941895189618971898189915 unmodified linesmigrate_star_browse_app_baseline, migrate_pdf_limit_app_baseline,migrate_reader_archive_app_baseline, migrate_backend_typing_app_baseline,migrate_folder_contents_app_baseline, migrate_reader_range_app_baseline,migrate_search_term_app_baseline, migrate_download_warm_app_baseline,typing_alignment)from scripts.check_search_words_mutation import (EMPTY_STATUSES, EXECUTION_TESTS, SPECS, generated_mutations,mutation_diagnostics, mutation_errors)from scripts.check_strict_inventory import inventory_errors84 unmodified linesdef search_term_mapping():import difflibold = (ANCHORS / "term-candidates-old-app.py.snapshot").read_text().splitlines()new = (ANCHORS / "download-warm-old-app.py.snapshot").read_text().splitlines()return {index + 1: new_start + 1 + index - startfor op, start, end, new_start, _ in difflib.SequenceMatcher(None, old, new, autojunk=False).get_opcodes()if op == "equal" for index in range(start, end)}3 unmodified linesreturn (-1 if line < 0 else 1) * search_term_mapping()[abs(line)]@functools.lru_cache(maxsize=1)def download_warm_mapping():import difflibold = (ANCHORS / "download-warm-old-app.py.snapshot").read_text().splitlines()new = (Path(__file__).resolve().parents[2] / "backend/app.py").read_text().splitlines()return {index + 1: new_start + 1 + index - startfor op, start, end, new_start, _ in difflib.SequenceMatcher(None, old, new, autojunk=False).get_opcodes()if op == "equal" for index in range(start, end)}def download_warm_coordinate(line):return (-1 if line < 0 else 1) * download_warm_mapping()[abs(line)]def current_coordinate(line):return download_warm_coordinate(search_term_coordinate(reader_range_coordinate(folder_contents_coordinate(typed_coordinate(line)))))def current_arc(arc):return tuple(download_warm_coordinate(search_term_coordinate(reader_range_coordinate(folder_contents_coordinate(value))))for value in typed_arc(arc))class QualityInventoryTests(unittest.TestCase):1348 unmodified linesrange_layout = migrate_reader_range_app_baseline(folder_layout, ANCHORS / "range-cache-old-app.py.snapshot", ANCHORS / "term-candidates-old-app.py.snapshot",root / "backend/reader_range_cache.py")term_layout = migrate_search_term_app_baseline(range_layout, ANCHORS / "term-candidates-old-app.py.snapshot", ANCHORS / "download-warm-old-app.py.snapshot",root / "backend/search_term_candidates.py")current_layout = migrate_download_warm_app_baseline(term_layout, ANCHORS / "download-warm-old-app.py.snapshot", root / "backend/app.py", root / "backend/download_warm.py")self.assertEqual(current_layout, current)self.assertEqual({k: v for k, v in migrated.items() if k != "backend/app.py"},{k: v for k, v in previous.items() if k != "backend/app.py"})81 unmodified linesself.assertEqual(before, saved)range_layout = migrate_reader_range_app_baseline(moved, new_app, ANCHORS / "term-candidates-old-app.py.snapshot", root / "backend/reader_range_cache.py")term_layout = migrate_search_term_app_baseline(range_layout, ANCHORS / "term-candidates-old-app.py.snapshot", ANCHORS / "download-warm-old-app.py.snapshot",root / "backend/search_term_candidates.py")final_layout = migrate_download_warm_app_baseline(term_layout, ANCHORS / "download-warm-old-app.py.snapshot", root / "backend/app.py", root / "backend/download_warm.py")self.assertEqual(final_layout, current)self.assertNotIn("backend/folder_contents.py", moved)self.assertEqual((before["backend/app.py"]["covered_lines"], before["backend/app.py"]["covered_branches"]),61 unmodified linesold_copy = json.loads(json.dumps(previous))current_app, extracted = ANCHORS / "term-candidates-old-app.py.snapshot", root / "backend/reader_range_cache.py"migrated = migrate_reader_range_app_baseline(previous, old_app, current_app, extracted)term_layout = migrate_search_term_app_baseline(migrated, current_app, ANCHORS / "download-warm-old-app.py.snapshot", root / "backend/search_term_candidates.py")final_layout = migrate_download_warm_app_baseline(term_layout, ANCHORS / "download-warm-old-app.py.snapshot", root / "backend/app.py", root / "backend/download_warm.py")current = json.loads((root / "quality/baselines/backend-coverage-debt.json").read_text())self.assertEqual(previous, old_copy)self.assertEqual(final_layout, current)60 unmodified linesold_app = ANCHORS / "term-candidates-old-app.py.snapshot"previous = migrate_reader_range_app_baseline(folder, folder_old, old_app, root / "backend/reader_range_cache.py")old_copy = json.loads(json.dumps(previous))current_app, extracted = ANCHORS / "download-warm-old-app.py.snapshot", root / "backend/search_term_candidates.py"migrated = migrate_search_term_app_baseline(previous, old_app, current_app, extracted)final_layout = migrate_download_warm_app_baseline(migrated, current_app, root / "backend/app.py", root / "backend/download_warm.py")current = json.loads((root / "quality/baselines/backend-coverage-debt.json").read_text())self.assertEqual(previous, old_copy)self.assertEqual(final_layout, current)self.assertNotIn("backend/search_term_candidates.py", migrated)old, new = previous["backend/app.py"], migrated["backend/app.py"]self.assertEqual((old["covered_lines"], old["covered_branches"]), (1941, 664))34 unmodified lines"covered_branches": 38, "num_branches": 38}, "executed_lines": list(range(1, 69)),"missing_lines": [69], "executed_branches": [], "missing_branches": [], "excluded_lines": []}}}self.assertIn("new backend module requires 100% statements and branches: backend/search_term_candidates.py",coverage_errors(root, report, current, final_layout))report["files"].pop("backend/search_term_candidates.py")self.assertIn("missing backend coverage report: backend/search_term_candidates.py",coverage_errors(root, report, current, final_layout))weakened = json.loads(json.dumps(current))weakened["backend/app.py"]["arcs"].pop()weakened["backend/app.py"]["covered_branches"] -= 1self.assertIn("backend coverage debt cannot remove prior exercised lines or arcs: backend/app.py",coverage_errors(root, {"meta": {"branch_coverage": True}, "files": {}}, weakened, final_layout))def test_download_warm_migration_keeps_prior_coordinates_and_requires_full_module_coverage(self):root = Path(__file__).resolve().parents[2]typed = migrate_backend_typing_app_baseline(json.loads(PRE_TYPING_DEBT.read_text()), ANCHORS / "reader-archive-new-app.py.snapshot", TYPED_APP)folder_old = ANCHORS / "range-cache-old-app.py.snapshot"folder = migrate_folder_contents_app_baseline(typed, TYPED_APP, folder_old, root / "backend/folder_contents.py")range_old = ANCHORS / "term-candidates-old-app.py.snapshot"ranged = migrate_reader_range_app_baseline(folder, folder_old, range_old, root / "backend/reader_range_cache.py")old_app = ANCHORS / "download-warm-old-app.py.snapshot"previous = migrate_search_term_app_baseline(ranged, range_old, old_app, root / "backend/search_term_candidates.py")old_copy = json.loads(json.dumps(previous))current_app, extracted = root / "backend/app.py", root / "backend/download_warm.py"migrated = migrate_download_warm_app_baseline(previous, old_app, current_app, extracted)current = json.loads((root / "quality/baselines/backend-coverage-debt.json").read_text())self.assertEqual(previous, old_copy)self.assertEqual(migrated, current)self.assertNotIn("backend/download_warm.py", migrated)old, new = previous["backend/app.py"], migrated["backend/app.py"]self.assertEqual((old["covered_lines"], old["covered_branches"]), (1891, 627))self.assertEqual((new["covered_lines"], new["covered_branches"]), (1871, 619))removed = set(range(1239, 1254)) | set(range(1257, 1269))for field in ("lines", "missing_lines"):self.assertEqual({download_warm_coordinate(line) for line in old[field] if line not in removed},set(new[field]))for field in ("arcs", "missing_arcs"):self.assertEqual({tuple(download_warm_coordinate(value) for value in arc)for arc in old[field] if abs(arc[0]) not in removed},{tuple(arc) for arc in new[field]})self.assertFalse(set(old["missing_lines"]) & removed)self.assertFalse([arc for arc in old["missing_arcs"] if abs(arc[0]) in removed])for index, source in enumerate((old_app, current_app, extracted)):changed = self.root / f"changed-warm-{index}.py"changed.write_bytes(source.read_bytes() + b"\n# changed\n")args = [old_app, current_app, extracted]args[index] = changedwith self.subTest(changed=index), self.assertRaisesRegex(ValueError, "exact reviewed sources"):migrate_download_warm_app_baseline(previous, *args)bad = dict(previous)del bad["backend/app.py"]with self.assertRaisesRegex(ValueError, "original module inventory"):migrate_download_warm_app_baseline(bad, old_app, current_app, extracted)bad = dict(previous)bad["backend/download_warm.py"] = {}with self.assertRaisesRegex(ValueError, "original module inventory"):migrate_download_warm_app_baseline(bad, old_app, current_app, extracted)for field, value in (("lines", 999999), ("arcs", [1239, 999999])):bad = json.loads(json.dumps(previous))bad["backend/app.py"][field].append(value)bad["backend/app.py"]["covered_lines" if field == "lines" else "covered_branches"] += 1with self.subTest(unmapped=field), self.assertRaises(ValueError):migrate_download_warm_app_baseline(bad, old_app, current_app, extracted)report = {"meta": {"branch_coverage": True}, "files": {"backend/download_warm.py": {"summary": {"covered_lines": 27, "num_statements": 28,"covered_branches": 8, "num_branches": 8}, "executed_lines": list(range(1, 28)),"missing_lines": [28], "executed_branches": [], "missing_branches": [], "excluded_lines": []}}}self.assertIn("new backend module requires 100% statements and branches: backend/download_warm.py",coverage_errors(root, report, current, migrated))report["files"].pop("backend/download_warm.py")self.assertIn("missing backend coverage report: backend/download_warm.py",coverage_errors(root, report, current, migrated))weakened = json.loads(json.dumps(current))weakened["backend/app.py"]["arcs"].pop()39 unmodified linesterm_module.write_bytes((root / "backend/search_term_candidates.py").read_bytes() + b"\n# changed\n")self.assertIn(source_error, coverage_errors(self.root, no_report, current))term_module.write_bytes((root / "backend/search_term_candidates.py").read_bytes())self.assertIn(source_error, coverage_errors(self.root, no_report, current))warm_anchor = anchors / "download-warm-old-app.py.snapshot"warm_anchor.write_bytes((ANCHORS / warm_anchor.name).read_bytes())warm_module = self.root / "backend/download_warm.py"warm_module.write_bytes((root / "backend/download_warm.py").read_bytes() + b"\n# changed\n")self.assertIn(source_error, coverage_errors(self.root, no_report, current))warm_module.write_bytes((root / "backend/download_warm.py").read_bytes())self.assertNotIn(source_error, coverage_errors(self.root, no_report, current))(anchors / "reader-archive-old-app.py.snapshot").write_bytes(PRE_ARCHIVE_APP.read_bytes() + b"\n# changed\n")self.assertIn(source_error, coverage_errors(self.root, no_report, current))
85 unmodified lines86878889909185 unmodified linesself.assertIs(self.state.download_warm_task, task)self.assertEqual(self.state.upstream_semaphore._value, 2)async def test_failed_warmup_backs_off_then_allows_retry(self):self.state.http_session.head.side_effect = aiohttp.ClientConnectionError()app.schedule_download_connection_warm(self.application)85 unmodified lines868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914085 unmodified linesself.assertIs(self.state.download_warm_task, task)self.assertEqual(self.state.upstream_semaphore._value, 2)async def test_warm_scheduler_matches_pinned_original_across_admission_boundaries(self):import astimport hashlibfrom pathlib import Pathsource = (Path(__file__).resolve().parents[2] / 'scripts/coverage-anchors/download-warm-old-app.py.snapshot').read_bytes()self.assertEqual(hashlib.sha256(source).hexdigest(),'0c64e9323c7b7512f666d6ce69f151c33d8bef3d31c9b5c14fb14834eb6c94ed')tree = ast.parse(source)functions = [node for node in tree.body if isinstance(node, (ast.FunctionDef, ast.AsyncFunctionDef))and node.name in ('warm_download_connection', 'schedule_download_connection_warm')]for node in functions:node.name = '_original_' + node.namecode = compile(ast.fix_missing_locations(ast.Module(body=functions, type_ignores=[])), '<pinned>', 'exec')class PriorTask:def __init__(self, done):self.finished = donedef done(self):return self.finishedfor enabled, existing, last in ((False, None, 0), (True, None, 75),(True, PriorTask(False), 0), (True, PriorTask(True), 0),(True, None, 70), (True, None, 71)):outcomes = []for old in (True, False):response = FakeResponse()state = SimpleNamespace(download_warm_enabled=enabled, download_warm_task=existing,download_warm_at=float(last), upstream_semaphore=asyncio.Semaphore(1),http_session=SimpleNamespace(head=Mock(return_value=response)))application = SimpleNamespace(state=state)with patch.dict(app.__dict__), patch.object(app, 'time', SimpleNamespace(monotonic=lambda: 100.0)), \patch.object(app, 'DOWNLOAD_CONNECTION_WARM_INTERVAL_SECONDS', 30):exec(code, app.__dict__)if old:app.warm_download_connection = app._original_warm_download_connectionapp._original_schedule_download_connection_warm(application)else:app.schedule_download_connection_warm(application)task = state.download_warm_taskspawned = task is not existingif spawned:await taskoutcomes.append((state.download_warm_at, spawned, response.released,state.http_session.head.call_count, state.upstream_semaphore._value))with self.subTest(enabled=enabled, existing=existing, last=last):self.assertEqual(outcomes[0], outcomes[1])async def test_failed_warmup_backs_off_then_allows_retry(self):self.state.http_session.head.side_effect = aiohttp.ClientConnectionError()app.schedule_download_connection_warm(self.application)
backend/app.py+7-27
backend/download_warm.pyAdded+42
pyrightconfig.strict.json+1
quality/baselines/backend-coverage-debt.json+1687-1739
scripts/check_backend_coverage.py+107-9
scripts/coverage-anchors/download-warm-old-app.py.snapshotAdded
tests/gates/test_quality_inventory.py+109-13
tests/proxy/test_async_proxy.py+49