@joshuafolkken/kit 1.3041.0 → 1.3092.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude/skills/workflow-commands/backlogrun-steps.md +1 -1
- package/.claude/skills/workflow-commands/fullrun-steps.md +3 -3
- package/.claude/skills/workflow-commands/halfrun.md +3 -2
- package/.claude/skills/workflow-commands/kickoff.md +9 -2
- package/.claude/skills/workflow-commands/prerequisite.md +2 -0
- package/.claude/skills/workflow-commands/progress-watcher.md +10 -8
- package/.claude/skills/workflow-commands/retrospective.md +2 -1
- package/.claude/skills/workflow-commands/split-assessment.md +4 -0
- package/.github/workflows/ci.yml +0 -20
- package/.github/workflows/pr-classification.yml +0 -5
- package/.github/workflows/publish.yml +0 -1
- package/.github/workflows/sonar-qube.yml +0 -5
- package/README.md +2 -0
- package/SECURITY.md +2 -1
- package/dist/.inputs-verified.json +1 -1
- package/dist/commands/adopt.js +29 -20
- package/dist/commands/auto-ok-judge-cli.js +43 -33
- package/dist/commands/auto-ok-main.js +73 -74
- package/dist/commands/backlog-budget-main.js +5 -6
- package/dist/commands/backlog-drive-cli.js +286 -305
- package/dist/commands/backlog-next-main.js +111 -108
- package/dist/commands/backlog-offer-main.js +148 -112
- package/dist/commands/backlog-plan-cli.js +123 -120
- package/dist/commands/backlog-triage-cli.js +131 -128
- package/dist/commands/backlogrun-cli.js +273 -264
- package/dist/commands/behavior-cli.js +23 -26
- package/dist/commands/bytes-command.js +56 -59
- package/dist/commands/cases-cli.js +4 -5
- package/dist/commands/check-commit-message-main.js +3 -4
- package/dist/commands/check-related.js +125 -119
- package/dist/commands/chunk-26JL4UU4.js +365 -0
- package/dist/commands/chunk-2BIVHPCA.js +85 -0
- package/dist/commands/chunk-2CKJODCK.js +245 -0
- package/dist/commands/chunk-2E6PSONB.js +46 -0
- package/dist/commands/chunk-2GA4775H.js +77 -0
- package/dist/commands/chunk-2O64H5UJ.js +462 -0
- package/dist/commands/chunk-2OEXY4GM.js +252 -0
- package/dist/commands/chunk-2OMIHPPE.js +51 -0
- package/dist/commands/chunk-2ONSHOAY.js +46 -0
- package/dist/commands/chunk-2Q7MGFYB.js +1208 -0
- package/dist/commands/chunk-2SA3W4JF.js +41 -0
- package/dist/commands/chunk-2VY7CJ2R.js +212 -0
- package/dist/commands/chunk-2WRDAQPJ.js +74 -0
- package/dist/commands/chunk-2XLR7R6E.js +541 -0
- package/dist/commands/chunk-2XZF3YFY.js +47 -0
- package/dist/commands/chunk-33TAOZUE.js +29 -0
- package/dist/commands/chunk-374XGAWD.js +158 -0
- package/dist/commands/chunk-3CJNQU7P.js +179 -0
- package/dist/commands/chunk-3D5T6KMW.js +59 -0
- package/dist/commands/chunk-3EW5LTN3.js +114 -0
- package/dist/commands/chunk-3F3RNIG2.js +128 -0
- package/dist/commands/chunk-3FLTEJZY.js +74 -0
- package/dist/commands/chunk-3JWPTRNI.js +60 -0
- package/dist/commands/chunk-3MQTOUXT.js +94 -0
- package/dist/commands/chunk-3PCUERXE.js +19 -0
- package/dist/commands/chunk-3U6A5WON.js +173 -0
- package/dist/commands/chunk-3YT3RCSI.js +140 -0
- package/dist/commands/chunk-43DU7DYZ.js +540 -0
- package/dist/commands/chunk-43H725LG.js +132 -0
- package/dist/commands/chunk-46STCE6Q.js +48 -0
- package/dist/commands/chunk-46WEC6HZ.js +82 -0
- package/dist/commands/chunk-47J4KOZP.js +46 -0
- package/dist/commands/chunk-47W7PF4T.js +22 -0
- package/dist/commands/chunk-4F4KARQN.js +229 -0
- package/dist/commands/chunk-4GUGC4IW.js +338 -0
- package/dist/commands/chunk-4HB7NWXP.js +263 -0
- package/dist/commands/chunk-4HOTJAO6.js +89 -0
- package/dist/commands/chunk-4I5AA4P5.js +237 -0
- package/dist/commands/chunk-4IDINPBE.js +525 -0
- package/dist/commands/chunk-4K7KLR7L.js +69 -0
- package/dist/commands/chunk-4MGTNY2L.js +347 -0
- package/dist/commands/chunk-4NSIW3UB.js +104 -0
- package/dist/commands/chunk-4YTKV6WV.js +37 -0
- package/dist/commands/chunk-5ARNFMQK.js +1263 -0
- package/dist/commands/chunk-5AZTSESD.js +114 -0
- package/dist/commands/chunk-5FUI2MLY.js +89 -0
- package/dist/commands/chunk-5GI5GLC4.js +214 -0
- package/dist/commands/chunk-5IHEBIPD.js +333 -0
- package/dist/commands/chunk-5KAW5GPF.js +44 -0
- package/dist/commands/chunk-5KSJEWXR.js +77 -0
- package/dist/commands/chunk-5OF2B4BF.js +35 -0
- package/dist/commands/chunk-5PLJ7R3D.js +126 -0
- package/dist/commands/chunk-5PPWXOCF.js +64 -0
- package/dist/commands/chunk-5VQCL33M.js +46 -0
- package/dist/commands/chunk-5Y7FOJLX.js +186 -0
- package/dist/commands/chunk-5YTEMF4O.js +110 -0
- package/dist/commands/chunk-62NYXZCC.js +241 -0
- package/dist/commands/chunk-6KUA7MRG.js +64 -0
- package/dist/commands/chunk-6LDEZFYR.js +88 -0
- package/dist/commands/chunk-6NXIZMIK.js +122 -0
- package/dist/commands/chunk-6O45F6YI.js +86 -0
- package/dist/commands/chunk-6OHJBQDE.js +184 -0
- package/dist/commands/chunk-6WDCCG3M.js +1249 -0
- package/dist/commands/chunk-6ZHXEQAI.js +715 -0
- package/dist/commands/chunk-736NECRD.js +16 -0
- package/dist/commands/chunk-77LEKVEE.js +32 -0
- package/dist/commands/chunk-7CX5VYOL.js +50 -0
- package/dist/commands/chunk-7DGHFBU7.js +247 -0
- package/dist/commands/chunk-7E43YW53.js +128 -0
- package/dist/commands/chunk-7EAYFMDN.js +235 -0
- package/dist/commands/chunk-7HP3FQGQ.js +51 -0
- package/dist/commands/chunk-7JOOMFDI.js +155 -0
- package/dist/commands/chunk-7OEBSPPU.js +321 -0
- package/dist/commands/chunk-A3JYZWBS.js +803 -0
- package/dist/commands/chunk-A3LCN4KA.js +84 -0
- package/dist/commands/chunk-ABLXBG6C.js +98 -0
- package/dist/commands/chunk-AN7BFVHU.js +244 -0
- package/dist/commands/chunk-AQCVEQSM.js +99 -0
- package/dist/commands/chunk-AT46EY7H.js +393 -0
- package/dist/commands/chunk-AU563VKH.js +75 -0
- package/dist/commands/chunk-AUTD5FV2.js +1077 -0
- package/dist/commands/chunk-AV26CMY6.js +304 -0
- package/dist/commands/chunk-B2PJEV3S.js +246 -0
- package/dist/commands/chunk-B545ENGY.js +214 -0
- package/dist/commands/chunk-B5HP6T4L.js +170 -0
- package/dist/commands/chunk-B5XYAWNN.js +37 -0
- package/dist/commands/chunk-B73IIRMS.js +207 -0
- package/dist/commands/chunk-BAEDHPXW.js +160 -0
- package/dist/commands/chunk-BDSG6JKH.js +977 -0
- package/dist/commands/chunk-BE6F4YK2.js +769 -0
- package/dist/commands/chunk-BFKTUD3V.js +33 -0
- package/dist/commands/chunk-BLRXHK2V.js +17 -0
- package/dist/commands/chunk-BLUAO4QW.js +173 -0
- package/dist/commands/chunk-BML6MEUB.js +326 -0
- package/dist/commands/chunk-BPDNGJXY.js +63 -0
- package/dist/commands/chunk-BQLKWGGC.js +118 -0
- package/dist/commands/chunk-BRMJVCP7.js +167 -0
- package/dist/commands/chunk-BRWR5YKU.js +268 -0
- package/dist/commands/chunk-BUZAYEBD.js +319 -0
- package/dist/commands/chunk-BVUL57IX.js +139 -0
- package/dist/commands/chunk-CC4BIGCA.js +20 -0
- package/dist/commands/chunk-CCHJZEF5.js +4220 -0
- package/dist/commands/chunk-CDK7QZWG.js +44 -0
- package/dist/commands/chunk-CDYFUCDC.js +72 -0
- package/dist/commands/chunk-CEADAQIL.js +170 -0
- package/dist/commands/chunk-CNL3SLM6.js +116 -0
- package/dist/commands/chunk-CNQ7D2GZ.js +104 -0
- package/dist/commands/chunk-CTXJVMHW.js +48 -0
- package/dist/commands/chunk-CUWT6UQO.js +13 -0
- package/dist/commands/chunk-CVRDJCOE.js +125 -0
- package/dist/commands/chunk-D6CF5QGM.js +80 -0
- package/dist/commands/chunk-DACNQAXC.js +20 -0
- package/dist/commands/chunk-DDOS32JU.js +74 -0
- package/dist/commands/chunk-DDZVMXZD.js +481 -0
- package/dist/commands/chunk-DF6QD4AF.js +52 -0
- package/dist/commands/chunk-DFEXNB44.js +159 -0
- package/dist/commands/chunk-DHDKG5HZ.js +151 -0
- package/dist/commands/chunk-DHJRFBKO.js +223 -0
- package/dist/commands/chunk-DKDWOE3C.js +78 -0
- package/dist/commands/chunk-DKO5VTEH.js +65 -0
- package/dist/commands/chunk-DLHH3MLS.js +85 -0
- package/dist/commands/chunk-DOYNK72G.js +81 -0
- package/dist/commands/chunk-DS53UUDH.js +679 -0
- package/dist/commands/chunk-DUA4E4ES.js +230 -0
- package/dist/commands/chunk-DURHGVRC.js +33 -0
- package/dist/commands/chunk-DVCMQMRN.js +191 -0
- package/dist/commands/chunk-E3YKMCCJ.js +108 -0
- package/dist/commands/chunk-E4F2RTKC.js +272 -0
- package/dist/commands/chunk-E4PFCTXN.js +127 -0
- package/dist/commands/chunk-EAOTR2WL.js +24 -0
- package/dist/commands/chunk-EE4VOZJP.js +167 -0
- package/dist/commands/chunk-EHVEWJQ4.js +33 -0
- package/dist/commands/chunk-EMFSPPMH.js +98 -0
- package/dist/commands/chunk-EN65ZS3S.js +73 -0
- package/dist/commands/chunk-ES42XPAD.js +123 -0
- package/dist/commands/chunk-ESUY7KTZ.js +137 -0
- package/dist/commands/chunk-ET6IRQ3L.js +330 -0
- package/dist/commands/chunk-EWCUT7U2.js +1314 -0
- package/dist/commands/chunk-EWXXEGXL.js +149 -0
- package/dist/commands/chunk-EZYW54OQ.js +7569 -0
- package/dist/commands/chunk-F2RDEF2J.js +205 -0
- package/dist/commands/chunk-F2U46HAE.js +52 -0
- package/dist/commands/chunk-F2VYWU6Z.js +653 -0
- package/dist/commands/chunk-F4SGOTUF.js +36 -0
- package/dist/commands/chunk-F4YMLVWN.js +183 -0
- package/dist/commands/chunk-F5N2QIFD.js +213 -0
- package/dist/commands/chunk-F7B4ESZE.js +80 -0
- package/dist/commands/chunk-FJM2HWKW.js +299 -0
- package/dist/commands/chunk-FJMXUDEY.js +3985 -0
- package/dist/commands/chunk-FM7VVAK6.js +426 -0
- package/dist/commands/chunk-FQWRM5FC.js +67 -0
- package/dist/commands/chunk-FT33ZCSB.js +298 -0
- package/dist/commands/chunk-G2DNS74C.js +53 -0
- package/dist/commands/chunk-G75GWNNY.js +101 -0
- package/dist/commands/chunk-GA2YSPFH.js +32 -0
- package/dist/commands/chunk-GAVSK6P6.js +230 -0
- package/dist/commands/chunk-GB2BRQVL.js +300 -0
- package/dist/commands/chunk-GBMZXFFC.js +44 -0
- package/dist/commands/chunk-GDP7QXYE.js +76 -0
- package/dist/commands/chunk-GGWXF7RJ.js +70 -0
- package/dist/commands/chunk-GHOTKHI4.js +30 -0
- package/dist/commands/chunk-GMVN6ZP2.js +48 -0
- package/dist/commands/chunk-GNTTGRCX.js +133 -0
- package/dist/commands/chunk-GOY5JECO.js +130 -0
- package/dist/commands/chunk-GVDRRBHZ.js +507 -0
- package/dist/commands/chunk-GWTBIGYC.js +550 -0
- package/dist/commands/chunk-GZL6ISVM.js +72 -0
- package/dist/commands/chunk-HALHQILI.js +51 -0
- package/dist/commands/chunk-HAT7AFBF.js +85 -0
- package/dist/commands/chunk-HDVSZ6CZ.js +292 -0
- package/dist/commands/chunk-HE3GOMR7.js +88 -0
- package/dist/commands/chunk-HEFUC4ZW.js +65 -0
- package/dist/commands/chunk-HESWKELD.js +60 -0
- package/dist/commands/chunk-HNFBEB4L.js +77 -0
- package/dist/commands/chunk-HRN73FQJ.js +77 -0
- package/dist/commands/chunk-HYE3MBAN.js +113 -0
- package/dist/commands/chunk-IAB6LCJL.js +18 -0
- package/dist/commands/chunk-IAGENI2U.js +42 -0
- package/dist/commands/chunk-ICPVBHIX.js +48 -0
- package/dist/commands/chunk-IEKW3ON6.js +161 -0
- package/dist/commands/chunk-IOKOHB7P.js +109 -0
- package/dist/commands/chunk-IONGJJYM.js +179 -0
- package/dist/commands/chunk-IP23WOWP.js +126 -0
- package/dist/commands/chunk-IPS7EBE5.js +140 -0
- package/dist/commands/chunk-IXZZSST7.js +459 -0
- package/dist/commands/chunk-J4XHEOOW.js +156 -0
- package/dist/commands/chunk-JDHLHYJJ.js +208 -0
- package/dist/commands/chunk-JEYITIWB.js +423 -0
- package/dist/commands/chunk-JGX7JIW4.js +126 -0
- package/dist/commands/chunk-JHIGDFBS.js +59 -0
- package/dist/commands/chunk-JI2EGXZX.js +53 -0
- package/dist/commands/chunk-JNV3VRK2.js +47 -0
- package/dist/commands/chunk-JPMAW2VZ.js +91 -0
- package/dist/commands/chunk-JQEY6KDP.js +90 -0
- package/dist/commands/chunk-JSJDIEGZ.js +88 -0
- package/dist/commands/chunk-JT5ICRFF.js +44 -0
- package/dist/commands/chunk-JUCJ4Y42.js +77 -0
- package/dist/commands/chunk-K3OZBV3L.js +49 -0
- package/dist/commands/chunk-K5H3CLZZ.js +430 -0
- package/dist/commands/chunk-K6P5PISC.js +114 -0
- package/dist/commands/chunk-KD3SEAMV.js +402 -0
- package/dist/commands/chunk-KDCHY7XO.js +88 -0
- package/dist/commands/chunk-KDGX3JTV.js +51 -0
- package/dist/commands/chunk-KGSEWOKI.js +353 -0
- package/dist/commands/chunk-KHGDZQRG.js +271 -0
- package/dist/commands/chunk-KIS7JFNP.js +217 -0
- package/dist/commands/chunk-KKHD3C2P.js +114 -0
- package/dist/commands/chunk-KKIIY5I5.js +67 -0
- package/dist/commands/chunk-KN46UC77.js +114 -0
- package/dist/commands/chunk-KP2BVAS5.js +125 -0
- package/dist/commands/chunk-KPAJBJXG.js +63 -0
- package/dist/commands/chunk-KPMAJP6D.js +145 -0
- package/dist/commands/chunk-KR6WUAJM.js +122 -0
- package/dist/commands/chunk-KWLNK2NJ.js +391 -0
- package/dist/commands/chunk-L2CLCNXW.js +144 -0
- package/dist/commands/chunk-L7MDU6D7.js +155 -0
- package/dist/commands/chunk-L7VD4MLF.js +78 -0
- package/dist/commands/chunk-LBMAJDGN.js +124 -0
- package/dist/commands/chunk-LBVYFW3I.js +38 -0
- package/dist/commands/chunk-LE3M42CF.js +350 -0
- package/dist/commands/chunk-LIPUSINQ.js +140 -0
- package/dist/commands/chunk-LJVZWE3A.js +1885 -0
- package/dist/commands/chunk-LKSSQVDA.js +49 -0
- package/dist/commands/chunk-LL6G34MF.js +93 -0
- package/dist/commands/chunk-LNQOL2CL.js +321 -0
- package/dist/commands/chunk-LS7P324N.js +72 -0
- package/dist/commands/chunk-LU5EOGFQ.js +50 -0
- package/dist/commands/chunk-LX2ENXHZ.js +197 -0
- package/dist/commands/chunk-M32UPB2D.js +110 -0
- package/dist/commands/chunk-M3UGRNNB.js +103 -0
- package/dist/commands/chunk-M4WG74Q7.js +260 -0
- package/dist/commands/chunk-M5HA2ZCG.js +105 -0
- package/dist/commands/chunk-MDGPJOLK.js +351 -0
- package/dist/commands/chunk-MDKRTUE4.js +288 -0
- package/dist/commands/chunk-MFZVRWRS.js +34 -0
- package/dist/commands/chunk-MHXIJKGP.js +304 -0
- package/dist/commands/chunk-MK4CARBI.js +90 -0
- package/dist/commands/chunk-MLJDW7YN.js +64 -0
- package/dist/commands/chunk-MNLHYAJO.js +80 -0
- package/dist/commands/chunk-MOD3FG4V.js +419 -0
- package/dist/commands/chunk-MRAEJLXL.js +83 -0
- package/dist/commands/chunk-MRW2WYJS.js +68 -0
- package/dist/commands/chunk-MXPCEZL5.js +23 -0
- package/dist/commands/chunk-N2XH7QBY.js +103 -0
- package/dist/commands/chunk-N2ZF6T4E.js +332 -0
- package/dist/commands/chunk-N36NZMAL.js +79 -0
- package/dist/commands/chunk-N4EMFHQ6.js +114 -0
- package/dist/commands/chunk-N4P64UIH.js +211 -0
- package/dist/commands/chunk-NABSSY4P.js +204 -0
- package/dist/commands/chunk-NDQIJBRQ.js +100 -0
- package/dist/commands/chunk-NDR4PCVG.js +29 -0
- package/dist/commands/chunk-NEOCCN6D.js +302 -0
- package/dist/commands/chunk-NFKWFOFM.js +45 -0
- package/dist/commands/chunk-NFUPJBBG.js +516 -0
- package/dist/commands/chunk-NHEBKL7X.js +170 -0
- package/dist/commands/chunk-NHTEC5U4.js +99 -0
- package/dist/commands/chunk-NOSG3RUP.js +84 -0
- package/dist/commands/chunk-NOSODWWK.js +1132 -0
- package/dist/commands/chunk-NPXXYG6Z.js +580 -0
- package/dist/commands/chunk-NR2JDBPV.js +75 -0
- package/dist/commands/chunk-NRULNBYI.js +1153 -0
- package/dist/commands/chunk-NTGF5N3N.js +110 -0
- package/dist/commands/chunk-NTIVNQKF.js +73 -0
- package/dist/commands/chunk-NUCFIYZL.js +119 -0
- package/dist/commands/chunk-NVMV7BYX.js +88 -0
- package/dist/commands/chunk-NYWPTYGL.js +169 -0
- package/dist/commands/chunk-NZ45KOLL.js +104 -0
- package/dist/commands/chunk-O45BX4EL.js +39 -0
- package/dist/commands/chunk-O46T4ANI.js +229 -0
- package/dist/commands/chunk-O5JGV7NA.js +245 -0
- package/dist/commands/chunk-O7ESC4HL.js +566 -0
- package/dist/commands/chunk-OBYLXHCH.js +86 -0
- package/dist/commands/chunk-OKN63ZH5.js +109 -0
- package/dist/commands/chunk-ON4IKRGS.js +469 -0
- package/dist/commands/chunk-OT74RSQO.js +82 -0
- package/dist/commands/chunk-OVCVINYW.js +143 -0
- package/dist/commands/chunk-OZKLVTYI.js +342 -0
- package/dist/commands/chunk-P3LJ2Q4N.js +555 -0
- package/dist/commands/chunk-P43GWYR6.js +185 -0
- package/dist/commands/chunk-P6ASP2DY.js +132 -0
- package/dist/commands/chunk-PBAEJ5PT.js +38 -0
- package/dist/commands/chunk-PCZROH3R.js +100 -0
- package/dist/commands/chunk-PF3PMT2Q.js +46 -0
- package/dist/commands/chunk-PILH72AV.js +170 -0
- package/dist/commands/chunk-PJYTUUTH.js +34 -0
- package/dist/commands/chunk-PKXTISWR.js +58 -0
- package/dist/commands/chunk-PSGLUBSB.js +74 -0
- package/dist/commands/chunk-PUQA7F6Y.js +186 -0
- package/dist/commands/chunk-PVRDJU2B.js +126 -0
- package/dist/commands/chunk-Q3HM2BEH.js +45 -0
- package/dist/commands/chunk-Q42NF2TL.js +47 -0
- package/dist/commands/chunk-Q4ULMZAS.js +106 -0
- package/dist/commands/chunk-QCRUPRQ2.js +207 -0
- package/dist/commands/chunk-QFIKPGMC.js +280 -0
- package/dist/commands/chunk-QSBYULSS.js +100 -0
- package/dist/commands/chunk-QSJCZATC.js +18 -0
- package/dist/commands/chunk-QTJPCXEW.js +23 -0
- package/dist/commands/chunk-QTQAI2M2.js +179 -0
- package/dist/commands/chunk-QTVVFV4Q.js +127 -0
- package/dist/commands/chunk-QX2EMUXV.js +102 -0
- package/dist/commands/chunk-QXBOECGL.js +272 -0
- package/dist/commands/chunk-QXCG3SG4.js +88 -0
- package/dist/commands/chunk-QZVMGAWV.js +307 -0
- package/dist/commands/chunk-R36VZIKU.js +53 -0
- package/dist/commands/chunk-R3F7F3TX.js +94 -0
- package/dist/commands/chunk-R5AABJZJ.js +1062 -0
- package/dist/commands/chunk-R7PYR4HW.js +389 -0
- package/dist/commands/chunk-RDUFVQVJ.js +997 -0
- package/dist/commands/chunk-RESNXNDG.js +54 -0
- package/dist/commands/chunk-RFIOZTXY.js +305 -0
- package/dist/commands/chunk-RFWB2KAV.js +102 -0
- package/dist/commands/chunk-RFXON3FK.js +25 -0
- package/dist/commands/chunk-RGEB5L37.js +66 -0
- package/dist/commands/chunk-RGRLLF2J.js +119 -0
- package/dist/commands/chunk-RLRIMYXM.js +178 -0
- package/dist/commands/chunk-RNB3DQOZ.js +70 -0
- package/dist/commands/chunk-RO4QEZJO.js +172 -0
- package/dist/commands/chunk-RS5HBJY6.js +161 -0
- package/dist/commands/chunk-RV7EQIE4.js +202 -0
- package/dist/commands/chunk-RWPCK3CO.js +41 -0
- package/dist/commands/chunk-RWYSVFIA.js +250 -0
- package/dist/commands/chunk-RYKK75YT.js +289 -0
- package/dist/commands/chunk-S4JE63QE.js +704 -0
- package/dist/commands/chunk-S4OZJIXD.js +134 -0
- package/dist/commands/chunk-SD4EX75H.js +177 -0
- package/dist/commands/chunk-SJITWFNY.js +480 -0
- package/dist/commands/chunk-SKGDMAIA.js +33 -0
- package/dist/commands/chunk-SNSZ25XZ.js +393 -0
- package/dist/commands/chunk-SQZZHK6X.js +119 -0
- package/dist/commands/chunk-SRTEE34O.js +93 -0
- package/dist/commands/chunk-SYTCTLMD.js +285 -0
- package/dist/commands/chunk-T6JUDQMW.js +181 -0
- package/dist/commands/chunk-T6OUNP7E.js +426 -0
- package/dist/commands/chunk-TEXUEBGE.js +208 -0
- package/dist/commands/chunk-TFDVTU6O.js +910 -0
- package/dist/commands/chunk-TFYYXETQ.js +472 -0
- package/dist/commands/chunk-TMFKVJUW.js +121 -0
- package/dist/commands/chunk-TNJU4CXD.js +32 -0
- package/dist/commands/chunk-TRHWBUWE.js +61 -0
- package/dist/commands/chunk-TROCFVCU.js +45 -0
- package/dist/commands/chunk-TTTZZN7F.js +269 -0
- package/dist/commands/chunk-TUBBESHU.js +85 -0
- package/dist/commands/chunk-TVZIFZZN.js +62 -0
- package/dist/commands/chunk-TXRWAL63.js +144 -0
- package/dist/commands/chunk-U46YTYJQ.js +92 -0
- package/dist/commands/chunk-U5EO4QEV.js +48 -0
- package/dist/commands/chunk-UCO333EX.js +47 -0
- package/dist/commands/chunk-UIXQ4IYT.js +445 -0
- package/dist/commands/chunk-UJGNYPMD.js +716 -0
- package/dist/commands/chunk-URZ4RDC4.js +220 -0
- package/dist/commands/chunk-UUH3DE77.js +57 -0
- package/dist/commands/chunk-UVY5ODCM.js +60 -0
- package/dist/commands/chunk-UWMB6EOU.js +45 -0
- package/dist/commands/chunk-UX3HCPLX.js +449 -0
- package/dist/commands/chunk-UY62WJV6.js +120 -0
- package/dist/commands/chunk-V2T5DP3B.js +224 -0
- package/dist/commands/chunk-VAHQ4AFM.js +585 -0
- package/dist/commands/chunk-VCWNMRH7.js +71 -0
- package/dist/commands/chunk-VHLDQ3PH.js +30 -0
- package/dist/commands/chunk-VL5I2IOD.js +332 -0
- package/dist/commands/chunk-VLN6TSPJ.js +139 -0
- package/dist/commands/chunk-VMG3QB6C.js +81 -0
- package/dist/commands/chunk-VO25PMGS.js +58 -0
- package/dist/commands/chunk-VTLWODJ2.js +133 -0
- package/dist/commands/chunk-VXE3V3OC.js +335 -0
- package/dist/commands/chunk-VY7ZJMDT.js +469 -0
- package/dist/commands/chunk-W3MDLQZF.js +137 -0
- package/dist/commands/chunk-W4BR6QNU.js +1241 -0
- package/dist/commands/chunk-WCYRNNKF.js +76 -0
- package/dist/commands/chunk-WEUUJIWQ.js +84 -0
- package/dist/commands/chunk-WNBJK6QE.js +84 -0
- package/dist/commands/chunk-WR5PKCQW.js +61 -0
- package/dist/commands/chunk-WR73HTRG.js +121 -0
- package/dist/commands/chunk-WRNMUQTD.js +95 -0
- package/dist/commands/chunk-WROJTXWZ.js +138 -0
- package/dist/commands/chunk-WTIPX5NG.js +43 -0
- package/dist/commands/chunk-WWLCQREY.js +225 -0
- package/dist/commands/chunk-WXLW7S4M.js +71 -0
- package/dist/commands/chunk-WXXLJQBO.js +67 -0
- package/dist/commands/chunk-X4LYH6Q4.js +56 -0
- package/dist/commands/chunk-XAEL24EG.js +66 -0
- package/dist/commands/chunk-XCCT6GKA.js +74 -0
- package/dist/commands/chunk-XDR2BRDL.js +216 -0
- package/dist/commands/chunk-XRQMVAB4.js +85 -0
- package/dist/commands/chunk-XSKJAG72.js +91 -0
- package/dist/commands/chunk-XTJA34ND.js +492 -0
- package/dist/commands/chunk-XUXCFPDK.js +218 -0
- package/dist/commands/chunk-XXPDFJRI.js +48 -0
- package/dist/commands/chunk-Y6OGDG5I.js +49 -0
- package/dist/commands/chunk-YEAE46TS.js +98 -0
- package/dist/commands/chunk-YEQFAEVW.js +112 -0
- package/dist/commands/chunk-YJZAD4Z5.js +103 -0
- package/dist/commands/chunk-YMAEYY5R.js +278 -0
- package/dist/commands/chunk-YNCF66RK.js +1052 -0
- package/dist/commands/chunk-YOA25SII.js +210 -0
- package/dist/commands/chunk-YOZTZMAT.js +38 -0
- package/dist/commands/chunk-YSGRHVZG.js +897 -0
- package/dist/commands/chunk-YSLGWRQN.js +646 -0
- package/dist/commands/chunk-YTXCLGGL.js +168 -0
- package/dist/commands/chunk-YVHJN2HS.js +74 -0
- package/dist/commands/chunk-YY7XVVSB.js +43 -0
- package/dist/commands/chunk-Z5GZV4DV.js +16 -0
- package/dist/commands/chunk-Z6QLFPFB.js +907 -0
- package/dist/commands/chunk-ZB52ZIEA.js +1629 -0
- package/dist/commands/chunk-ZCD4AV2P.js +73 -0
- package/dist/commands/chunk-ZCHZU6NX.js +799 -0
- package/dist/commands/chunk-ZEH2B3DF.js +239 -0
- package/dist/commands/chunk-ZEUKX3RZ.js +245 -0
- package/dist/commands/chunk-ZGANVZCA.js +92 -0
- package/dist/commands/chunk-ZGBXUY7R.js +198 -0
- package/dist/commands/chunk-ZGEUWHFF.js +297 -0
- package/dist/commands/chunk-ZHSNQ2F7.js +161 -0
- package/dist/commands/chunk-ZIIUBGON.js +773 -0
- package/dist/commands/chunk-ZJ5S4VFD.js +258 -0
- package/dist/commands/chunk-ZNIIA275.js +59 -0
- package/dist/commands/chunk-ZV6BZZJ2.js +271 -0
- package/dist/commands/ci-timing-cli.js +22 -3
- package/dist/commands/code-symbol-cli.js +21 -7
- package/dist/commands/codex-hook-adapter.js +124 -119
- package/dist/commands/command-derive.js +9 -11
- package/dist/commands/cost-audit-main.js +118 -119
- package/dist/commands/cost-main.js +5 -7
- package/dist/commands/cspell-cached.js +55 -57
- package/dist/commands/defect-origin-main.js +42 -37
- package/dist/commands/defect-report-main.js +33 -25
- package/dist/commands/diff-summary-cli.js +3 -4
- package/dist/commands/disposition-cli.js +117 -118
- package/dist/commands/doctor.js +24 -11
- package/dist/commands/document-read-cli.js +50 -53
- package/dist/commands/document-section-main.js +50 -53
- package/dist/commands/dogfood-commit-cli.js +19 -4
- package/dist/commands/effect-audit-cli.js +40 -41
- package/dist/commands/epic-audit-main.js +88 -86
- package/dist/commands/epic-bundle-main.js +122 -119
- package/dist/commands/epic-check.js +37 -31
- package/dist/commands/epic-main.js +129 -126
- package/dist/commands/epic-next-main.js +85 -83
- package/dist/commands/eval-run.js +6 -7
- package/dist/commands/format-edited-cli.js +71 -46
- package/dist/commands/format.js +41 -56
- package/dist/commands/fresh-machine-cli.js +24 -7
- package/dist/commands/gh-usage-cli.js +22 -22
- package/dist/commands/git-followup-workflow.js +158 -158
- package/dist/commands/git-gh-checks-failed-main.js +23 -15
- package/dist/commands/git-workflow.js +52 -53
- package/dist/commands/github-release-cli.js +3 -3
- package/dist/commands/hook-ledger-cli.js +93 -94
- package/dist/commands/init-main.js +40 -40
- package/dist/commands/inputs.json +2042 -2002
- package/dist/commands/issue-ack-cli.js +28 -21
- package/dist/commands/issue-already-done-cli.js +107 -110
- package/dist/commands/issue-body-cli.js +71 -73
- package/dist/commands/issue-cite-main.js +35 -28
- package/dist/commands/issue-comment-main.js +36 -30
- package/dist/commands/issue-consolidate-cli.js +54 -54
- package/dist/commands/issue-file-main.js +274 -148
- package/dist/commands/issue-fold-existing-cli.js +126 -123
- package/dist/commands/issue-fold-main.js +57 -60
- package/dist/commands/issue-lint-main.js +59 -61
- package/dist/commands/issue-measured-cli.js +108 -110
- package/dist/commands/issue-plan-cli.js +156 -155
- package/dist/commands/issue-premise-unmet-cli.js +111 -113
- package/dist/commands/issue-priority-cli.js +38 -32
- package/dist/commands/issue-read-main.js +38 -33
- package/dist/commands/issue-release-class-cli.js +37 -31
- package/dist/commands/issue-release-main.js +35 -29
- package/dist/commands/issue-scout-main.js +123 -120
- package/dist/commands/issue-spill-main.js +149 -144
- package/dist/commands/issue-state-main.js +36 -31
- package/dist/commands/issue-tick-cli.js +37 -31
- package/dist/commands/josh-completion.js +21 -24
- package/dist/commands/lane-adopt-cli.js +53 -55
- package/dist/commands/lane-breakdown-cli.js +193 -172
- package/dist/commands/lane-cli.js +199 -180
- package/dist/commands/lane-launch-main.js +106 -56
- package/dist/commands/lane-limit-cli.js +119 -116
- package/dist/commands/lane-measure-cli.js +408 -245
- package/dist/commands/lane-pause-cli.js +51 -54
- package/dist/commands/lane-plan-cli.js +148 -147
- package/dist/commands/lane-resolve-cli.js +48 -50
- package/dist/commands/lane-restart-cli.js +185 -168
- package/dist/commands/lane-why-cli.js +121 -122
- package/dist/commands/lane-withdraw-cli.js +84 -86
- package/dist/commands/latest-corepack.js +3 -2
- package/dist/commands/latest-if-required-cli.js +12 -15
- package/dist/commands/latest-lane-guard-main.js +2 -3
- package/dist/commands/latest-scope-main.js +5 -7
- package/dist/commands/latest-update.js +3 -2
- package/dist/commands/lines-command.js +8 -10
- package/dist/commands/lint-parallel-main.js +65 -67
- package/dist/commands/lint-related.js +149 -133
- package/dist/commands/lint-rule.js +64 -66
- package/dist/commands/lockfile-policy.js +29 -32
- package/dist/commands/main-merge-main.js +23 -25
- package/dist/commands/main-sync-main.js +23 -24
- package/dist/commands/managed-config-scope-cli.js +11 -10
- package/dist/commands/measure-rerun-cli.js +31 -26
- package/dist/commands/metrics-command.js +97 -100
- package/dist/commands/observation-record-cli.js +24 -14
- package/dist/commands/observations-flush-cli.js +50 -52
- package/dist/commands/overrides-check.js +1 -1
- package/dist/commands/package-scout-cli.js +70 -73
- package/dist/commands/pin-verify-cli.js +21 -2
- package/dist/commands/plan-consumers-main.js +3 -4
- package/dist/commands/plan-scaffold-cli.js +145 -146
- package/dist/commands/pr-classification-main.js +22 -3
- package/dist/commands/pre-commit-lint.js +30 -34
- package/dist/commands/pre-commit-type-check.js +55 -55
- package/dist/commands/pre-push-unit.js +69 -70
- package/dist/commands/pretool-guard-cli.js +111 -113
- package/dist/commands/prevent-main-commit.js +2 -3
- package/dist/commands/project-profile-cli.js +24 -9
- package/dist/commands/propagate.js +31 -23
- package/dist/commands/prose-stale-cli.js +48 -42
- package/dist/commands/publishable-range-check.js +3 -3
- package/dist/commands/read-set-cli.js +58 -61
- package/dist/commands/refactor-scan-cli.js +8 -9
- package/dist/commands/release-cli.js +57 -57
- package/dist/commands/release-scope-main.js +41 -36
- package/dist/commands/rename-cli.js +64 -36
- package/dist/commands/repo-party-cli.js +3 -4
- package/dist/commands/report-template-cli.js +4 -5
- package/dist/commands/reserved-run.js +17 -20
- package/dist/commands/retrospective-cli.js +126 -127
- package/dist/commands/review-attest-cli.js +28 -20
- package/dist/commands/review-brief-main.js +184 -167
- package/dist/commands/review-findings-cli.js +23 -13
- package/dist/commands/review-pair-cli.js +180 -156
- package/dist/commands/review-record-main.js +171 -147
- package/dist/commands/review-round2-cli.js +89 -91
- package/dist/commands/review-stops-cli.js +51 -54
- package/dist/commands/review-submit-cli.js +184 -167
- package/dist/commands/rule-list.js +78 -80
- package/dist/commands/rule-value-cli.js +115 -116
- package/dist/commands/ruleset-check-cli.js +23 -6
- package/dist/commands/run-add-cli.js +115 -75
- package/dist/commands/run-board-main.js +172 -169
- package/dist/commands/run-carry-cli.js +182 -174
- package/dist/commands/run-chain-cli.js +184 -160
- package/dist/commands/run-cut-cli.js +206 -168
- package/dist/commands/run-ending-cli.js +51 -54
- package/dist/commands/run-entry-cli.js +230 -283
- package/dist/commands/run-event-cli.js +18 -21
- package/dist/commands/run-handoff-cli.js +75 -78
- package/dist/commands/run-handoff-lanes-cli.js +48 -51
- package/dist/commands/run-hold-main.js +105 -107
- package/dist/commands/run-liveness-cli.js +47 -49
- package/dist/commands/run-merge-main.js +159 -151
- package/dist/commands/run-next-cli.js +128 -129
- package/dist/commands/run-park-cli.js +137 -140
- package/dist/commands/run-pause-cli.js +190 -186
- package/dist/commands/run-pickup-cli.js +49 -52
- package/dist/commands/run-prep-main.js +124 -125
- package/dist/commands/run-prime-cli.js +175 -147
- package/dist/commands/run-progress-main.js +149 -146
- package/dist/commands/run-report-cli.js +60 -60
- package/dist/commands/run-review-cli.js +229 -214
- package/dist/commands/run-ship-cli.js +258 -252
- package/dist/commands/run-ship-evidence-cli.js +71 -72
- package/dist/commands/run-ship-lap-W66LTXJJ.js +28 -0
- package/dist/commands/run-ship-wait-main.js +83 -85
- package/dist/commands/run-split-cli.js +176 -172
- package/dist/commands/run-stale-main.js +72 -75
- package/dist/commands/run-status-cli.js +44 -44
- package/dist/commands/run-step-cli.js +213 -211
- package/dist/commands/run-tail-cli.js +23 -18
- package/dist/commands/run-tidy-main.js +67 -69
- package/dist/commands/run-wake-main.js +206 -187
- package/dist/commands/run-watcher-guard-cli.js +63 -66
- package/dist/commands/security-audit-main.js +21 -24
- package/dist/commands/security-audit-provision-main.js +9 -11
- package/dist/commands/selfcheck-cli.js +63 -57
- package/dist/commands/session-language-main.js +70 -73
- package/dist/commands/sonar-hotspots-cli.js +9 -8
- package/dist/commands/sonar-new-code-cli.js +3 -4
- package/dist/commands/split-assess-cli.js +55 -58
- package/dist/commands/split-child-recover-cli.js +38 -39
- package/dist/commands/start.js +64 -64
- package/dist/commands/stash-pop-main.js +4 -5
- package/dist/commands/stash-push-main.js +7 -9
- package/dist/commands/stop-guard.js +180 -176
- package/dist/commands/sync-main.js +30 -15
- package/dist/commands/telegram-test-main.js +29 -22
- package/dist/commands/test-declared.js +29 -15
- package/dist/commands/test-e2e-guard.js +54 -54
- package/dist/commands/test-pinned-main.js +57 -56
- package/dist/commands/test-reach-cli.js +40 -32
- package/dist/commands/test-red-main.js +12 -14
- package/dist/commands/test-related-Z6YY2GFH.js +113 -0
- package/dist/commands/test-related-main.js +89 -89
- package/dist/commands/test-unit-guard-main.js +37 -37
- package/dist/commands/time-cli.js +54 -57
- package/dist/commands/time-density-cli.js +26 -29
- package/dist/commands/tree-status-cli.js +6 -8
- package/dist/commands/type-check-command.js +26 -11
- package/dist/commands/ui-routes-cli.js +5 -6
- package/dist/commands/ui-shot-cli.js +1 -1
- package/dist/commands/uninstall.js +44 -43
- package/dist/commands/unused-members-KVKZDTXD.js +329 -0
- package/dist/commands/unused-members-cli.js +27 -12
- package/dist/commands/upstream-interrupt-main.js +159 -151
- package/dist/commands/verification-gate.js +85 -86
- package/dist/commands/version-check.js +25 -8
- package/dist/hooks/chunk-3SA3FIQC.js +6869 -0
- package/dist/hooks/chunk-46PTTMGE.js +1625 -0
- package/dist/hooks/chunk-5NIBRHWG.js +77 -0
- package/dist/hooks/chunk-76QKN2K3.js +258 -0
- package/dist/hooks/chunk-CHEKMGFP.js +321 -0
- package/dist/hooks/chunk-DCILEVDR.js +5173 -0
- package/dist/hooks/chunk-HVNGIM5W.js +5092 -0
- package/dist/hooks/chunk-L6IZZ2IL.js +11219 -0
- package/dist/hooks/chunk-UZXMFOVK.js +9170 -0
- package/dist/hooks/chunk-WCJ2GWYJ.js +1381 -0
- package/dist/hooks/chunk-YRKS5ZKE.js +1915 -0
- package/dist/hooks/codex-hook-adapter.js +11 -12
- package/dist/hooks/daemon.js +2140 -1387
- package/dist/hooks/format-edited.js +6 -6
- package/dist/hooks/inputs.json +512 -488
- package/dist/hooks/pretool-guard.js +8 -8
- package/dist/hooks/run-ship-lap-P5555IG7.js +8 -0
- package/dist/hooks/session-lang.js +10 -8
- package/dist/hooks/stop-guard.js +962 -669
- package/dist/inputs.json +73 -64
- package/dist/josh.js +1029 -577
- package/dist/registry-migrate.mjs +33938 -0
- package/dist/version/index.js +4251 -175
- package/package.json +4 -1
- package/prompts/collaboration-workflow/principles.md +4 -1
- package/prompts/collaboration-workflow/rule-delivery.md +1 -1
- package/scripts/agent/codex-launch-identity.ts +70 -0
- package/scripts/auto-ok/auto-ok-cli.ts +2 -0
- package/scripts/auto-ok/auto-ok-judge-write.ts +2 -0
- package/scripts/auto-ok/auto-ok-judge.ts +3 -1
- package/scripts/backlog/backlog-arrival.ts +1 -1
- package/scripts/backlog/backlog-budget.ts +5 -2
- package/scripts/backlog/backlog-defect-priority.ts +1 -1
- package/scripts/backlog/backlog-dispatch-bound.ts +17 -0
- package/scripts/backlog/backlog-drain-flush.ts +38 -3
- package/scripts/backlog/backlog-drive-cli.ts +1 -1
- package/scripts/backlog/backlog-drive-hold.ts +28 -5
- package/scripts/backlog/backlog-drive-launch.ts +37 -15
- package/scripts/backlog/backlog-drive-listing.ts +39 -23
- package/scripts/backlog/backlog-drive-retrospective-unit.ts +3 -2
- package/scripts/backlog/backlog-drive-split-unit.ts +1 -0
- package/scripts/backlog/backlog-hold-codes.ts +7 -0
- package/scripts/backlog/backlog-hold-text.ts +14 -1
- package/scripts/backlog/backlog-measure-close.ts +6 -0
- package/scripts/backlog/backlog-next-shared.ts +20 -2
- package/scripts/backlog/backlog-next.ts +24 -3
- package/scripts/backlog/backlog-offer-cli.ts +69 -16
- package/scripts/build/build-migration.ts +25 -0
- package/scripts/build/build.ts +2 -0
- package/scripts/epic/epic-classify.ts +6 -1
- package/scripts/epic/epic-live.ts +46 -0
- package/scripts/followup/followup-failed-tests.ts +71 -10
- package/scripts/followup/followup-job-rerun.ts +2 -2
- package/scripts/gate/change-scope-action.integration.test.ts +88 -0
- package/scripts/gate/change-scope-action.ts +2 -0
- package/scripts/gate/check-related-order.ts +6 -7
- package/scripts/gate/check-related.ts +18 -8
- package/scripts/gate/core-admission.ts +17 -30
- package/scripts/gate/core-budget-poll.ts +183 -0
- package/scripts/gate/core-budget-timing.ts +1 -1
- package/scripts/gate/core-budget.ts +24 -112
- package/scripts/gate/core-wait-record.ts +52 -7
- package/scripts/gate/machine-capacity.ts +6 -2
- package/scripts/gate/metrics-totals.ts +11 -0
- package/scripts/gate/path-glob.test.ts +18 -0
- package/scripts/gate/toolchain-inputs.consumer.test.ts +36 -0
- package/scripts/gh/fix-gh-packages-logic.ts +22 -15
- package/scripts/gh/gh-request-tally.ts +4 -0
- package/scripts/hooks/bash-revert.ts +79 -31
- package/scripts/hooks/format-edited-file.ts +6 -8
- package/scripts/hooks/implementation-shell.ts +3 -2
- package/scripts/init/distributed-paths.ts +18 -5
- package/scripts/init/init-actions.ts +16 -1
- package/scripts/init/init-bootstrap.ts +2 -0
- package/scripts/init/init-logic.ts +40 -8
- package/scripts/init/init.ts +11 -3
- package/scripts/issue/defect-rate-cli.ts +19 -13
- package/scripts/issue/issue-file-batch.ts +7 -3
- package/scripts/issue/issue-file-cli.ts +19 -6
- package/scripts/issue/issue-file-main.ts +6 -1
- package/scripts/issue/issue-file-pass.ts +17 -0
- package/scripts/issue/issue-file.ts +3 -0
- package/scripts/issue/issue-not-before.ts +9 -2
- package/scripts/issue/issue-observation-gate.ts +141 -0
- package/scripts/issue/issue-observation-prime.ts +83 -0
- package/scripts/issue/issue-publication-state.ts +61 -0
- package/scripts/issue/issue-publication.ts +144 -0
- package/scripts/issue/issue-sample-prime.ts +2 -0
- package/scripts/issue/issue-search-count.ts +26 -0
- package/scripts/issue/issue-search.ts +128 -3
- package/scripts/issue/issue-spill-cli.ts +4 -0
- package/scripts/issue/upstream-interrupt-cli.ts +21 -5
- package/scripts/josh/josh-commands-ai.ts +1 -1
- package/scripts/josh/josh-commands-development.ts +1 -1
- package/scripts/josh/josh-commands-issue-write.ts +9 -0
- package/scripts/josh/josh-commands-run.ts +6 -1
- package/scripts/josh/josh-commands-ship.ts +5 -5
- package/scripts/josh/josh-run.ts +5 -2
- package/scripts/josh/session-language-cli.ts +1 -1
- package/scripts/josh/shared-cache.ts +16 -1
- package/scripts/lane/lane-await.ts +15 -0
- package/scripts/lane/lane-cli.ts +2 -0
- package/scripts/lane/lane-dispatch-dependency.ts +102 -0
- package/scripts/lane/lane-dispatch-wait-stats.ts +239 -0
- package/scripts/lane/lane-dispatch.ts +44 -5
- package/scripts/lane/lane-early-push-count.ts +21 -0
- package/scripts/lane/lane-install.ts +15 -5
- package/scripts/lane/lane-launch-cli.ts +35 -14
- package/scripts/lane/lane-ledger-kind.ts +2 -0
- package/scripts/lane/lane-ledger-schema-ship.ts +5 -1
- package/scripts/lane/lane-ledger-schema.ts +15 -1
- package/scripts/lane/lane-ledger-write.ts +4 -1
- package/scripts/lane/lane-relaunch.ts +25 -2
- package/scripts/lane/lane-state-record.ts +2 -0
- package/scripts/lane/lane-state.ts +8 -1
- package/scripts/lane/lane-stats-tables.ts +2 -0
- package/scripts/lane/openai-lane-supervisor.ts +16 -1
- package/scripts/lib/inherited-scope.ts +48 -0
- package/scripts/lint/format-steps.ts +93 -0
- package/scripts/lint/format.ts +6 -49
- package/scripts/lint/lint-related-fix.ts +35 -0
- package/scripts/lint/lint-related.ts +22 -35
- package/scripts/propagate/propagate-steps.ts +9 -4
- package/scripts/registry-migration/migrate-cli.ts +50 -0
- package/scripts/registry-migration/migrate-files.ts +154 -0
- package/scripts/registry-migration/migrate-lock.ts +147 -0
- package/scripts/registry-migration/migrate.ts +235 -0
- package/scripts/registry-migration/npm-acquisition.ts +118 -0
- package/scripts/review/review-record-cli.ts +27 -13
- package/scripts/review/review-record-pinned.ts +15 -6
- package/scripts/run/add/run-add-cli.ts +21 -3
- package/scripts/run/add/run-add.ts +26 -9
- package/scripts/run/board/run-board-header.ts +4 -5
- package/scripts/run/board/run-board-layout.ts +2 -2
- package/scripts/run/board/run-board-read.ts +7 -1
- package/scripts/run/board/run-board-reason.ts +12 -0
- package/scripts/run/board/run-board-retry-wait.ts +35 -0
- package/scripts/run/board/run-board-roots.ts +25 -2
- package/scripts/run/board/run-board-seat.ts +9 -2
- package/scripts/run/board/run-board-setup.ts +19 -11
- package/scripts/run/board/run-board-status.ts +2 -0
- package/scripts/run/board/run-board-tick.ts +7 -1
- package/scripts/run/carry/run-carry-reclaim.ts +12 -2
- package/scripts/run/carry/run-carry-session.ts +48 -0
- package/scripts/run/carry/run-carry.ts +21 -14
- package/scripts/run/cut/run-cut-resume.ts +15 -3
- package/scripts/run/cut/run-cut.ts +1 -1
- package/scripts/run/detached-launch.ts +14 -5
- package/scripts/run/early-push-record.ts +6 -2
- package/scripts/run/event/run-event-setup.ts +2 -0
- package/scripts/run/event/run-event-stream-emit.ts +27 -7
- package/scripts/run/hold/run-hold-cli.ts +40 -5
- package/scripts/run/merge/run-merge-cut-release.ts +17 -0
- package/scripts/run/merge/run-merge-human-review.ts +6 -0
- package/scripts/run/merge/run-merge-steps.ts +4 -57
- package/scripts/run/merge/run-merge-waits.ts +54 -0
- package/scripts/run/prime/run-prime-cli.ts +16 -2
- package/scripts/run/review/run-review-cli.ts +5 -7
- package/scripts/run/review/run-review-early-push.ts +19 -8
- package/scripts/run/review/run-review-join-read.ts +33 -6
- package/scripts/run/review/run-review-pinned-remaining.ts +124 -0
- package/scripts/run/review/run-review-pinned-steps.ts +7 -1
- package/scripts/run/run-halfrun-resume.ts +49 -6
- package/scripts/run/run-headless.ts +3 -0
- package/scripts/run/run-pr-return.ts +14 -5
- package/scripts/run/run-repair-attempt.ts +219 -0
- package/scripts/run/ship/run-ship-lap.ts +5 -17
- package/scripts/run/ship/run-ship-pre-detach-pinned.ts +4 -13
- package/scripts/run/ship/run-ship-scoped.ts +66 -30
- package/scripts/run/startup/run-startup-schema.ts +31 -0
- package/scripts/run/startup/run-startup-store.ts +130 -0
- package/scripts/run/startup/run-startup.ts +119 -0
- package/scripts/run/wake/run-wake-codex.ts +144 -0
- package/scripts/run/wake/run-wake-driver.ts +32 -7
- package/scripts/run/wake/run-wake-handoff.ts +9 -8
- package/scripts/run/wake/run-wake-loop.ts +23 -3
- package/scripts/run/wake/run-wake-ports.ts +17 -3
- package/scripts/run/wake/run-wake-takeover.ts +6 -3
- package/scripts/run/wake/run-wake-window.ts +4 -1
- package/scripts/run/wake/run-wake.ts +5 -0
- package/scripts/sync/sync-ai-files.ts +17 -0
- package/scripts/sync/sync-configs.ts +11 -1
- package/scripts/sync/sync.ts +5 -1
- package/scripts/test/test-related-cap.ts +7 -3
- package/scripts/test/test-related-imports.ts +92 -0
- package/scripts/test/vitest-failure-summary.ts +7 -0
- package/scripts/version/npm-registry.ts +45 -7
- package/scripts/version/upgrade-shell-command.ts +34 -2
- package/templates/workflows/ci.yml +0 -15
- package/templates/workflows/github-release.yml +0 -5
- package/dist/commands/chunk-23GH6B3D.js +0 -333
- package/dist/commands/chunk-24ZDAWML.js +0 -48
- package/dist/commands/chunk-2BB5ZR2F.js +0 -128
- package/dist/commands/chunk-2BJJUTZA.js +0 -59
- package/dist/commands/chunk-2CXT6MBR.js +0 -51
- package/dist/commands/chunk-2DJLAUYB.js +0 -109
- package/dist/commands/chunk-2EZTYLO4.js +0 -179
- package/dist/commands/chunk-2FJJYCBD.js +0 -149
- package/dist/commands/chunk-2PHOLX62.js +0 -43
- package/dist/commands/chunk-2QM72JCJ.js +0 -338
- package/dist/commands/chunk-2VRITY55.js +0 -41
- package/dist/commands/chunk-2XAH3MHV.js +0 -23
- package/dist/commands/chunk-34KZDKQJ.js +0 -304
- package/dist/commands/chunk-352KLSFX.js +0 -67
- package/dist/commands/chunk-36LOGVJ7.js +0 -38
- package/dist/commands/chunk-3AEDZZNL.js +0 -223
- package/dist/commands/chunk-3B2HEFNO.js +0 -51
- package/dist/commands/chunk-3PEXBHRN.js +0 -33
- package/dist/commands/chunk-3Z425MM3.js +0 -61
- package/dist/commands/chunk-3ZOX4G4U.js +0 -88
- package/dist/commands/chunk-452HWOJ7.js +0 -395
- package/dist/commands/chunk-475EFIJV.js +0 -178
- package/dist/commands/chunk-47UZB54M.js +0 -73
- package/dist/commands/chunk-4DN4XVPL.js +0 -716
- package/dist/commands/chunk-4DVM57T7.js +0 -86
- package/dist/commands/chunk-4EADHJVC.js +0 -247
- package/dist/commands/chunk-4HERA2GY.js +0 -95
- package/dist/commands/chunk-4JI35CVO.js +0 -70
- package/dist/commands/chunk-4L4LNWZ7.js +0 -143
- package/dist/commands/chunk-4N32QKJZ.js +0 -170
- package/dist/commands/chunk-4NRSFLG7.js +0 -185
- package/dist/commands/chunk-4OKRPAUT.js +0 -98
- package/dist/commands/chunk-4PUKDAXL.js +0 -42
- package/dist/commands/chunk-4Q64PG46.js +0 -478
- package/dist/commands/chunk-4UDTQVDD.js +0 -278
- package/dist/commands/chunk-4WR2LEZL.js +0 -123
- package/dist/commands/chunk-4ZJOC6OK.js +0 -298
- package/dist/commands/chunk-4ZQM4I7R.js +0 -533
- package/dist/commands/chunk-54X37JEJ.js +0 -170
- package/dist/commands/chunk-56KW5EOK.js +0 -85
- package/dist/commands/chunk-5CG3XU3O.js +0 -74
- package/dist/commands/chunk-5ESZLHDZ.js +0 -514
- package/dist/commands/chunk-5FBRMARM.js +0 -578
- package/dist/commands/chunk-5RG4S66L.js +0 -47
- package/dist/commands/chunk-5UJGACVN.js +0 -137
- package/dist/commands/chunk-5Y7B7FDL.js +0 -44
- package/dist/commands/chunk-5Z6E5ZUV.js +0 -89
- package/dist/commands/chunk-5ZNUH4LV.js +0 -1722
- package/dist/commands/chunk-5ZTQX7OS.js +0 -125
- package/dist/commands/chunk-66NX6EXR.js +0 -29
- package/dist/commands/chunk-66TGK5XL.js +0 -84
- package/dist/commands/chunk-6CFHLMKM.js +0 -555
- package/dist/commands/chunk-6DDK5XWK.js +0 -74
- package/dist/commands/chunk-6GQX752S.js +0 -145
- package/dist/commands/chunk-6HRRZANN.js +0 -55
- package/dist/commands/chunk-6MAZ55GF.js +0 -1241
- package/dist/commands/chunk-6OP63TBT.js +0 -78
- package/dist/commands/chunk-6Q3XUCLM.js +0 -204
- package/dist/commands/chunk-6RUWU2SB.js +0 -45
- package/dist/commands/chunk-6UCWAFQY.js +0 -245
- package/dist/commands/chunk-6WKJ3GDA.js +0 -408
- package/dist/commands/chunk-6YURRFRU.js +0 -461
- package/dist/commands/chunk-6YVURZAJ.js +0 -350
- package/dist/commands/chunk-6Z4YZG7P.js +0 -169
- package/dist/commands/chunk-77BIN247.js +0 -122
- package/dist/commands/chunk-7ABHNNY3.js +0 -529
- package/dist/commands/chunk-7C7FOKJK.js +0 -115
- package/dist/commands/chunk-7HAGC6SW.js +0 -1062
- package/dist/commands/chunk-7KKUFLH5.js +0 -56
- package/dist/commands/chunk-7LJQMM2K.js +0 -102
- package/dist/commands/chunk-7MJYLUF4.js +0 -99
- package/dist/commands/chunk-7NHZCI5Y.js +0 -704
- package/dist/commands/chunk-7OQ56DVW.js +0 -239
- package/dist/commands/chunk-7VWPGTZO.js +0 -260
- package/dist/commands/chunk-7YZXS3AK.js +0 -30
- package/dist/commands/chunk-A4HOQKOG.js +0 -85
- package/dist/commands/chunk-A6T2N7VC.js +0 -159
- package/dist/commands/chunk-AAUDI7WJ.js +0 -250
- package/dist/commands/chunk-AC26ZUG5.js +0 -259
- package/dist/commands/chunk-ACZ52JPI.js +0 -140
- package/dist/commands/chunk-AJ65WNJB.js +0 -230
- package/dist/commands/chunk-AK7SEO4Y.js +0 -177
- package/dist/commands/chunk-AKK56GNX.js +0 -205
- package/dist/commands/chunk-AKQYYHP2.js +0 -461
- package/dist/commands/chunk-ALDAS2WG.js +0 -137
- package/dist/commands/chunk-ANUTT56I.js +0 -85
- package/dist/commands/chunk-AVVMDVGO.js +0 -68
- package/dist/commands/chunk-B3M5WSGN.js +0 -72
- package/dist/commands/chunk-B7ZNIEDV.js +0 -351
- package/dist/commands/chunk-BCUDQWYK.js +0 -77
- package/dist/commands/chunk-BF6YX4HE.js +0 -70
- package/dist/commands/chunk-BHRS7HAM.js +0 -272
- package/dist/commands/chunk-BIKGPT52.js +0 -29
- package/dist/commands/chunk-BJA5U4Q7.js +0 -75
- package/dist/commands/chunk-BMKWSWWE.js +0 -126
- package/dist/commands/chunk-BMTYUJNT.js +0 -59
- package/dist/commands/chunk-BRHPRDDV.js +0 -127
- package/dist/commands/chunk-BRUBX64M.js +0 -33
- package/dist/commands/chunk-BTZJDHQT.js +0 -46
- package/dist/commands/chunk-BYFC6MD2.js +0 -72
- package/dist/commands/chunk-BYGJ3BCJ.js +0 -803
- package/dist/commands/chunk-C2SEDMZ3.js +0 -238
- package/dist/commands/chunk-C54QXJD6.js +0 -4208
- package/dist/commands/chunk-C6QSVO5K.js +0 -56
- package/dist/commands/chunk-CBAKBWSZ.js +0 -332
- package/dist/commands/chunk-CFHRNTE5.js +0 -326
- package/dist/commands/chunk-CGLLAEKZ.js +0 -110
- package/dist/commands/chunk-CHKYPF5O.js +0 -82
- package/dist/commands/chunk-CJBW6BWG.js +0 -800
- package/dist/commands/chunk-CJKPF5DJ.js +0 -156
- package/dist/commands/chunk-CKUKK7JG.js +0 -252
- package/dist/commands/chunk-CMHGDCGN.js +0 -263
- package/dist/commands/chunk-CNGTHSUS.js +0 -750
- package/dist/commands/chunk-CP2J4RV2.js +0 -3987
- package/dist/commands/chunk-CQZI7RIK.js +0 -72
- package/dist/commands/chunk-CWCKCZS6.js +0 -188
- package/dist/commands/chunk-D5HIP4HT.js +0 -289
- package/dist/commands/chunk-D6D6WQR6.js +0 -125
- package/dist/commands/chunk-D7JRJI44.js +0 -297
- package/dist/commands/chunk-D7OAU32Z.js +0 -119
- package/dist/commands/chunk-DAAX7XDS.js +0 -1208
- package/dist/commands/chunk-DBKTFB5V.js +0 -18
- package/dist/commands/chunk-DEZF7QZZ.js +0 -184
- package/dist/commands/chunk-DMD74E3F.js +0 -39
- package/dist/commands/chunk-DPJVKTO4.js +0 -41
- package/dist/commands/chunk-DXJQHJQ4.js +0 -73
- package/dist/commands/chunk-DYZOOWVW.js +0 -912
- package/dist/commands/chunk-EBI2BAKQ.js +0 -47
- package/dist/commands/chunk-EDKOSZ3K.js +0 -88
- package/dist/commands/chunk-EFDVE5P5.js +0 -121
- package/dist/commands/chunk-EGIHAEMT.js +0 -72
- package/dist/commands/chunk-EKLU6QR7.js +0 -507
- package/dist/commands/chunk-ELY76WAR.js +0 -65
- package/dist/commands/chunk-EM3HAZF6.js +0 -52
- package/dist/commands/chunk-EMTZAGT5.js +0 -51
- package/dist/commands/chunk-ENKFCOVY.js +0 -472
- package/dist/commands/chunk-ERG4QRNG.js +0 -224
- package/dist/commands/chunk-EUGNQCYK.js +0 -139
- package/dist/commands/chunk-EW4NPUMQ.js +0 -363
- package/dist/commands/chunk-EWVR5AEX.js +0 -140
- package/dist/commands/chunk-EXDFKKMH.js +0 -113
- package/dist/commands/chunk-EXWB34R2.js +0 -238
- package/dist/commands/chunk-EYMPBHDN.js +0 -61
- package/dist/commands/chunk-EZ7IPKIH.js +0 -20
- package/dist/commands/chunk-EZSO25UZ.js +0 -80
- package/dist/commands/chunk-F6IQHZYY.js +0 -94
- package/dist/commands/chunk-FDS65XOJ.js +0 -212
- package/dist/commands/chunk-FFHEGWPK.js +0 -91
- package/dist/commands/chunk-FGL6DBZU.js +0 -71
- package/dist/commands/chunk-FHFWNNUC.js +0 -144
- package/dist/commands/chunk-FIUCHMCF.js +0 -32
- package/dist/commands/chunk-FJX7AENO.js +0 -74
- package/dist/commands/chunk-FKZ5E4JD.js +0 -97
- package/dist/commands/chunk-FMZWRDKH.js +0 -302
- package/dist/commands/chunk-FOKCRIAN.js +0 -67
- package/dist/commands/chunk-FQGWO2ZH.js +0 -43
- package/dist/commands/chunk-FROACLVU.js +0 -525
- package/dist/commands/chunk-FURNDIT3.js +0 -34
- package/dist/commands/chunk-FVDQNMP6.js +0 -93
- package/dist/commands/chunk-FVVZIJUC.js +0 -425
- package/dist/commands/chunk-FWU3H4TX.js +0 -17
- package/dist/commands/chunk-G3HBYHFA.js +0 -16
- package/dist/commands/chunk-G4E4M2P4.js +0 -299
- package/dist/commands/chunk-G5KSL2Q2.js +0 -151
- package/dist/commands/chunk-G6XC7V6Y.js +0 -58
- package/dist/commands/chunk-GCPP5XIG.js +0 -90
- package/dist/commands/chunk-GITT5A5A.js +0 -198
- package/dist/commands/chunk-GJYMI2CM.js +0 -48
- package/dist/commands/chunk-GLC47H7I.js +0 -285
- package/dist/commands/chunk-GUR54ELE.js +0 -328
- package/dist/commands/chunk-GW4UWR3O.js +0 -126
- package/dist/commands/chunk-GY4DMCKS.js +0 -306
- package/dist/commands/chunk-H6JQRHDC.js +0 -80
- package/dist/commands/chunk-HATKF6VX.js +0 -173
- package/dist/commands/chunk-HG2NZQD5.js +0 -135
- package/dist/commands/chunk-HH3CVIFU.js +0 -93
- package/dist/commands/chunk-HHMMGDMP.js +0 -469
- package/dist/commands/chunk-HI5WPM6C.js +0 -127
- package/dist/commands/chunk-HQGNXR6I.js +0 -245
- package/dist/commands/chunk-HTIDHEEN.js +0 -108
- package/dist/commands/chunk-HVCQYZVD.js +0 -38
- package/dist/commands/chunk-HWEZRNPL.js +0 -66
- package/dist/commands/chunk-HX3FFIO5.js +0 -74
- package/dist/commands/chunk-HXDTA5VU.js +0 -208
- package/dist/commands/chunk-I2KCGKJI.js +0 -107
- package/dist/commands/chunk-I63RNFFR.js +0 -213
- package/dist/commands/chunk-IAD4WLLI.js +0 -98
- package/dist/commands/chunk-IB5TT73I.js +0 -177
- package/dist/commands/chunk-IBAYXCMU.js +0 -156
- package/dist/commands/chunk-IF3EIFK4.js +0 -7515
- package/dist/commands/chunk-IGDJNXX2.js +0 -49
- package/dist/commands/chunk-ILGPZ47M.js +0 -33
- package/dist/commands/chunk-IYJEBWW5.js +0 -44
- package/dist/commands/chunk-J22PSIXR.js +0 -418
- package/dist/commands/chunk-J66YBAAM.js +0 -161
- package/dist/commands/chunk-J6WKZRV2.js +0 -391
- package/dist/commands/chunk-J7IO3AYH.js +0 -179
- package/dist/commands/chunk-JAKC2BHX.js +0 -88
- package/dist/commands/chunk-JCAQ7B6J.js +0 -124
- package/dist/commands/chunk-JHN6RCE6.js +0 -123
- package/dist/commands/chunk-JIGBNCDR.js +0 -88
- package/dist/commands/chunk-JJHWTFWQ.js +0 -76
- package/dist/commands/chunk-JJRKTWLK.js +0 -64
- package/dist/commands/chunk-JKOGWGQM.js +0 -92
- package/dist/commands/chunk-JM6EVOFN.js +0 -172
- package/dist/commands/chunk-JQXPLMCO.js +0 -81
- package/dist/commands/chunk-JV24VP2O.js +0 -81
- package/dist/commands/chunk-JVKXJ763.js +0 -45
- package/dist/commands/chunk-K275REYP.js +0 -37
- package/dist/commands/chunk-K4G3HOKS.js +0 -105
- package/dist/commands/chunk-K64EIHD2.js +0 -138
- package/dist/commands/chunk-KB3OQWDT.js +0 -71
- package/dist/commands/chunk-KCFOP5RI.js +0 -1310
- package/dist/commands/chunk-KGE4AS2Y.js +0 -134
- package/dist/commands/chunk-KIILCKQR.js +0 -220
- package/dist/commands/chunk-KK2SL42W.js +0 -241
- package/dist/commands/chunk-KKIMVXAP.js +0 -280
- package/dist/commands/chunk-KODXWMBX.js +0 -77
- package/dist/commands/chunk-KPSKWTOS.js +0 -208
- package/dist/commands/chunk-KVHNQHX3.js +0 -100
- package/dist/commands/chunk-KWYQR5MK.js +0 -269
- package/dist/commands/chunk-KXHXMERX.js +0 -214
- package/dist/commands/chunk-KZ5BBBMO.js +0 -271
- package/dist/commands/chunk-KZ7HD37E.js +0 -121
- package/dist/commands/chunk-KZSM5M5P.js +0 -89
- package/dist/commands/chunk-KZZWPUJW.js +0 -25
- package/dist/commands/chunk-L7DAL54N.js +0 -347
- package/dist/commands/chunk-LAR76BFA.js +0 -114
- package/dist/commands/chunk-LB557AHJ.js +0 -192
- package/dist/commands/chunk-LJXKVLYI.js +0 -229
- package/dist/commands/chunk-LOOFYHUM.js +0 -773
- package/dist/commands/chunk-LQXFVZTS.js +0 -13
- package/dist/commands/chunk-LT7QSHR4.js +0 -995
- package/dist/commands/chunk-LUXWDMKI.js +0 -426
- package/dist/commands/chunk-LWAXXZPS.js +0 -118
- package/dist/commands/chunk-LX7TIEMI.js +0 -1612
- package/dist/commands/chunk-LZ5QXE5N.js +0 -244
- package/dist/commands/chunk-M4UV3BEV.js +0 -313
- package/dist/commands/chunk-M6JDU5EK.js +0 -133
- package/dist/commands/chunk-MDLOETXL.js +0 -211
- package/dist/commands/chunk-MFBNNTBM.js +0 -44
- package/dist/commands/chunk-MGF64OHV.js +0 -32
- package/dist/commands/chunk-MI2OS6TL.js +0 -132
- package/dist/commands/chunk-MLW4S35K.js +0 -389
- package/dist/commands/chunk-MN425CU6.js +0 -63
- package/dist/commands/chunk-MPGJ4ONJ.js +0 -634
- package/dist/commands/chunk-MRORPFSO.js +0 -402
- package/dist/commands/chunk-MUGTOJUL.js +0 -319
- package/dist/commands/chunk-MVHPRYHE.js +0 -91
- package/dist/commands/chunk-MWO6FOSZ.js +0 -393
- package/dist/commands/chunk-MXC4IBZ7.js +0 -104
- package/dist/commands/chunk-N7QTMTST.js +0 -210
- package/dist/commands/chunk-NDBX7LSS.js +0 -32
- package/dist/commands/chunk-NEGJ77RV.js +0 -173
- package/dist/commands/chunk-NEGRE5VW.js +0 -101
- package/dist/commands/chunk-NFPD2P3V.js +0 -53
- package/dist/commands/chunk-NHIW7JE6.js +0 -335
- package/dist/commands/chunk-NILSN7A4.js +0 -158
- package/dist/commands/chunk-NOLFSPOB.js +0 -74
- package/dist/commands/chunk-NSAVEXVR.js +0 -353
- package/dist/commands/chunk-NT67QTZO.js +0 -65
- package/dist/commands/chunk-NU7W6QGT.js +0 -155
- package/dist/commands/chunk-NYWGJLBU.js +0 -19
- package/dist/commands/chunk-OAAVY2JK.js +0 -49
- package/dist/commands/chunk-OGS2DK7I.js +0 -47
- package/dist/commands/chunk-OHNP3QL2.js +0 -186
- package/dist/commands/chunk-OIPV3PWW.js +0 -870
- package/dist/commands/chunk-OIX2363L.js +0 -16
- package/dist/commands/chunk-OJ65BZBV.js +0 -646
- package/dist/commands/chunk-OKZWEVR4.js +0 -352
- package/dist/commands/chunk-OL6IF4JC.js +0 -20
- package/dist/commands/chunk-OMPRILFH.js +0 -29
- package/dist/commands/chunk-OOWGH2RG.js +0 -85
- package/dist/commands/chunk-OP2RFVLS.js +0 -102
- package/dist/commands/chunk-ORKVN2LO.js +0 -56
- package/dist/commands/chunk-OSBWXZJ4.js +0 -492
- package/dist/commands/chunk-OT3UMEWK.js +0 -47
- package/dist/commands/chunk-OVWPZDWP.js +0 -64
- package/dist/commands/chunk-OWYK2BEJ.js +0 -1222
- package/dist/commands/chunk-OX3VQLV2.js +0 -488
- package/dist/commands/chunk-OZJP77UM.js +0 -103
- package/dist/commands/chunk-OZZWRJQI.js +0 -246
- package/dist/commands/chunk-P3H3DKTE.js +0 -69
- package/dist/commands/chunk-P4D5RESF.js +0 -88
- package/dist/commands/chunk-P4KIQRSL.js +0 -119
- package/dist/commands/chunk-P5SOYWH2.js +0 -37
- package/dist/commands/chunk-P7FPXAHP.js +0 -29
- package/dist/commands/chunk-PE7B7242.js +0 -84
- package/dist/commands/chunk-PFO7EYAP.js +0 -45
- package/dist/commands/chunk-PHLOTUB7.js +0 -366
- package/dist/commands/chunk-PTNQCCIB.js +0 -41
- package/dist/commands/chunk-PTZEFQUX.js +0 -211
- package/dist/commands/chunk-Q5Q2QYVU.js +0 -112
- package/dist/commands/chunk-Q7EEIOAD.js +0 -120
- package/dist/commands/chunk-QABRNGQV.js +0 -88
- package/dist/commands/chunk-QAHFPCFR.js +0 -50
- package/dist/commands/chunk-QDFVVRQP.js +0 -92
- package/dist/commands/chunk-QGAERR7D.js +0 -99
- package/dist/commands/chunk-QHWJJ6X5.js +0 -53
- package/dist/commands/chunk-QJRVDE7T.js +0 -307
- package/dist/commands/chunk-QMDKDQKW.js +0 -114
- package/dist/commands/chunk-QOSC5RKD.js +0 -18
- package/dist/commands/chunk-QQ4CIYMF.js +0 -132
- package/dist/commands/chunk-QV5FKMOU.js +0 -80
- package/dist/commands/chunk-QWWTC3XR.js +0 -109
- package/dist/commands/chunk-QXQ56E56.js +0 -27
- package/dist/commands/chunk-R54Z2Z3X.js +0 -114
- package/dist/commands/chunk-R6QE5VJG.js +0 -46
- package/dist/commands/chunk-RG53UFNW.js +0 -418
- package/dist/commands/chunk-RGGEQM6G.js +0 -140
- package/dist/commands/chunk-RH6ZWJOA.js +0 -77
- package/dist/commands/chunk-RHKCWJQX.js +0 -62
- package/dist/commands/chunk-RKIAX4DZ.js +0 -191
- package/dist/commands/chunk-RLBFEHHC.js +0 -300
- package/dist/commands/chunk-RN2YDNLF.js +0 -229
- package/dist/commands/chunk-RRAIRS2T.js +0 -54
- package/dist/commands/chunk-RS764ZMU.js +0 -46
- package/dist/commands/chunk-RUIBQMOV.js +0 -38
- package/dist/commands/chunk-RUQY5TS3.js +0 -83
- package/dist/commands/chunk-RVUJ6F5L.js +0 -181
- package/dist/commands/chunk-RW64VHEB.js +0 -130
- package/dist/commands/chunk-RXYMJPJB.js +0 -114
- package/dist/commands/chunk-S4M6UWR2.js +0 -103
- package/dist/commands/chunk-SASX3W2M.js +0 -99
- package/dist/commands/chunk-SFNBUB6D.js +0 -110
- package/dist/commands/chunk-SJ2ZN575.js +0 -90
- package/dist/commands/chunk-SP7DKYGU.js +0 -1263
- package/dist/commands/chunk-SSL6A3Y4.js +0 -165
- package/dist/commands/chunk-SVAKCXZ7.js +0 -44
- package/dist/commands/chunk-SYOXIKB7.js +0 -705
- package/dist/commands/chunk-SZG5HDNP.js +0 -321
- package/dist/commands/chunk-T25S4QHL.js +0 -52
- package/dist/commands/chunk-T4F33UKZ.js +0 -114
- package/dist/commands/chunk-T4UYEHWG.js +0 -50
- package/dist/commands/chunk-TAEGXID2.js +0 -58
- package/dist/commands/chunk-TCBUX52E.js +0 -701
- package/dist/commands/chunk-TEPYEUYG.js +0 -585
- package/dist/commands/chunk-TFLHYC2F.js +0 -141
- package/dist/commands/chunk-TJKM56WJ.js +0 -109
- package/dist/commands/chunk-TLAB552K.js +0 -445
- package/dist/commands/chunk-TP6L4W3W.js +0 -82
- package/dist/commands/chunk-TR7WWYD5.js +0 -60
- package/dist/commands/chunk-TVZXG4Y4.js +0 -197
- package/dist/commands/chunk-TYNH2R66.js +0 -1150
- package/dist/commands/chunk-U3IVVR4W.js +0 -33
- package/dist/commands/chunk-U5P6G3UV.js +0 -77
- package/dist/commands/chunk-U7XU5RG3.js +0 -86
- package/dist/commands/chunk-UKBBWMLE.js +0 -1189
- package/dist/commands/chunk-ULVVGGTY.js +0 -64
- package/dist/commands/chunk-UNMSZGSG.js +0 -269
- package/dist/commands/chunk-URDT2O2K.js +0 -36
- package/dist/commands/chunk-UTHUX7VU.js +0 -88
- package/dist/commands/chunk-V4Z7G4UH.js +0 -73
- package/dist/commands/chunk-V5FD7DVV.js +0 -48
- package/dist/commands/chunk-VCPGFBMN.js +0 -655
- package/dist/commands/chunk-VGPIQNDB.js +0 -24
- package/dist/commands/chunk-VJE3RJAX.js +0 -23
- package/dist/commands/chunk-VK6D5CWA.js +0 -161
- package/dist/commands/chunk-VOF3N4WO.js +0 -114
- package/dist/commands/chunk-VQVPAVQ3.js +0 -45
- package/dist/commands/chunk-VV4TQYGD.js +0 -38
- package/dist/commands/chunk-W3FX7FYN.js +0 -84
- package/dist/commands/chunk-W7DRUOF7.js +0 -122
- package/dist/commands/chunk-WAEN2RTT.js +0 -161
- package/dist/commands/chunk-WCEUMOKK.js +0 -84
- package/dist/commands/chunk-WJ4NEDNI.js +0 -288
- package/dist/commands/chunk-WMMGXJXP.js +0 -92
- package/dist/commands/chunk-WOFLW2LX.js +0 -26
- package/dist/commands/chunk-WTH6NTXU.js +0 -128
- package/dist/commands/chunk-WWVYEHQT.js +0 -272
- package/dist/commands/chunk-X3TNPALI.js +0 -213
- package/dist/commands/chunk-XC6GG5JR.js +0 -78
- package/dist/commands/chunk-XDF25GSU.js +0 -536
- package/dist/commands/chunk-XFPEUYDV.js +0 -67
- package/dist/commands/chunk-XFWI6WHH.js +0 -60
- package/dist/commands/chunk-XGMRAKSL.js +0 -85
- package/dist/commands/chunk-XHGWMD3L.js +0 -104
- package/dist/commands/chunk-XKSUBUIH.js +0 -116
- package/dist/commands/chunk-XPBF5DG3.js +0 -419
- package/dist/commands/chunk-XUMYPESL.js +0 -160
- package/dist/commands/chunk-XXC32PVL.js +0 -541
- package/dist/commands/chunk-XXN2EZBY.js +0 -133
- package/dist/commands/chunk-XXNEY4B3.js +0 -110
- package/dist/commands/chunk-Y27PTXXI.js +0 -258
- package/dist/commands/chunk-Y4EBUI6M.js +0 -237
- package/dist/commands/chunk-YAU3LYNF.js +0 -60
- package/dist/commands/chunk-YDURQICF.js +0 -204
- package/dist/commands/chunk-YGFOGA7C.js +0 -1153
- package/dist/commands/chunk-YHJ2AJMA.js +0 -66
- package/dist/commands/chunk-YIA6FC3K.js +0 -78
- package/dist/commands/chunk-YM77CF4D.js +0 -183
- package/dist/commands/chunk-YNPRJCEO.js +0 -81
- package/dist/commands/chunk-YTBQAD5W.js +0 -170
- package/dist/commands/chunk-YVH2OLDS.js +0 -104
- package/dist/commands/chunk-Z3WGHIVB.js +0 -122
- package/dist/commands/chunk-ZAAHZY2A.js +0 -19
- package/dist/commands/chunk-ZBZ5DDCH.js +0 -1866
- package/dist/commands/chunk-ZLRUHSOP.js +0 -48
- package/dist/commands/chunk-ZNR75OXP.js +0 -444
- package/dist/commands/chunk-ZSOR4ISJ.js +0 -75
- package/dist/commands/chunk-ZVAIIHBE.js +0 -63
- package/dist/commands/chunk-ZYFHYQA7.js +0 -51
- package/dist/commands/chunk-ZZFFSQF4.js +0 -218
- package/dist/commands/chunk-ZZULXNC2.js +0 -47
- package/dist/commands/chunk-ZZXO6TFH.js +0 -232
- package/dist/commands/run-ship-lap-W5T2VHFC.js +0 -30
- package/dist/commands/test-related-ZCNC46MS.js +0 -113
- package/dist/commands/unused-members-STULPRBU.js +0 -331
- package/dist/hooks/chunk-5CUXGQT6.js +0 -8353
- package/dist/hooks/chunk-5R5YFQR5.js +0 -931
- package/dist/hooks/chunk-6RLY27FT.js +0 -232
- package/dist/hooks/chunk-6YGMIODI.js +0 -86
- package/dist/hooks/chunk-AO4TOV4V.js +0 -5026
- package/dist/hooks/chunk-FOW4B7OQ.js +0 -1795
- package/dist/hooks/chunk-G5WSPYJ6.js +0 -5663
- package/dist/hooks/chunk-HHIVWGHX.js +0 -6869
- package/dist/hooks/chunk-IURJANNZ.js +0 -1082
- package/dist/hooks/chunk-OV22V63P.js +0 -10980
- package/dist/hooks/chunk-SXABK6UV.js +0 -321
- package/dist/hooks/run-ship-lap-VCEOUHQI.js +0 -8
package/dist/hooks/stop-guard.js
CHANGED
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
#!/usr/bin/env tsx
|
|
2
2
|
import {
|
|
3
|
-
KIT_PACKAGE_NAME,
|
|
4
3
|
MAX_SCANNED,
|
|
5
4
|
OperationCancelledError,
|
|
6
5
|
SUMMARY_FIELDS,
|
|
7
6
|
backlog_overlap,
|
|
8
7
|
epic_busy,
|
|
9
|
-
gh_spawn,
|
|
10
8
|
git_branch,
|
|
11
9
|
git_error,
|
|
12
10
|
git_gh_blocked_by_graphql,
|
|
@@ -15,19 +13,16 @@ import {
|
|
|
15
13
|
git_gh_pr_too_large,
|
|
16
14
|
git_gh_repo,
|
|
17
15
|
git_stash,
|
|
18
|
-
hook_launch,
|
|
19
16
|
hook_ledger,
|
|
20
17
|
issue_read,
|
|
21
18
|
lane_background,
|
|
22
19
|
lane_park,
|
|
23
20
|
lane_plan,
|
|
24
21
|
last_prompt,
|
|
25
|
-
load,
|
|
26
22
|
markdown_section,
|
|
27
23
|
observation_ledger,
|
|
28
24
|
observation_ledger_home,
|
|
29
25
|
pre_gate_cut,
|
|
30
|
-
project_checks,
|
|
31
26
|
read_pull,
|
|
32
27
|
review_attest,
|
|
33
28
|
review_checkout,
|
|
@@ -37,23 +32,32 @@ import {
|
|
|
37
32
|
stop_rules,
|
|
38
33
|
tail_commands,
|
|
39
34
|
turn_filings
|
|
40
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-DCILEVDR.js";
|
|
41
36
|
import {
|
|
37
|
+
input_fingerprint,
|
|
38
|
+
lint_related_scope,
|
|
42
39
|
machine_capacity,
|
|
43
40
|
resolve_tsx_runner,
|
|
44
41
|
run_board_usage_rusage,
|
|
45
42
|
toolchain_inputs
|
|
46
|
-
} from "./chunk-
|
|
43
|
+
} from "./chunk-WCJ2GWYJ.js";
|
|
47
44
|
import {
|
|
45
|
+
KIT_PACKAGE_NAME,
|
|
48
46
|
find_local_bin_upwards,
|
|
49
47
|
gate_labels,
|
|
48
|
+
gh_spawn,
|
|
49
|
+
hook_launch,
|
|
50
50
|
issue_body_keys,
|
|
51
|
+
load,
|
|
52
|
+
project_checks,
|
|
51
53
|
test_declared_logic
|
|
52
|
-
} from "./chunk-
|
|
54
|
+
} from "./chunk-L6IZZ2IL.js";
|
|
53
55
|
import {
|
|
54
56
|
AUTO_OK_LABEL,
|
|
57
|
+
BREAKING_CHANGE_LABEL,
|
|
55
58
|
BUGFIX_LABEL,
|
|
56
59
|
BUG_LABEL,
|
|
60
|
+
DEFERRED_LABEL,
|
|
57
61
|
ENHANCEMENT_LABEL,
|
|
58
62
|
EPIC_LABEL,
|
|
59
63
|
GRAPHQL_PATH,
|
|
@@ -62,6 +66,7 @@ import {
|
|
|
62
66
|
ISSUE_FIELDS,
|
|
63
67
|
JOSH_TMP_DIRECTORY,
|
|
64
68
|
NEEDS_HUMAN_MERGE_LABEL,
|
|
69
|
+
NEEDS_HUMAN_REVIEW_LABEL,
|
|
65
70
|
NOT_BEFORE_LABEL,
|
|
66
71
|
NOT_DIRECTLY_RUNNABLE_LABELS,
|
|
67
72
|
PARKED_LABELS,
|
|
@@ -71,6 +76,7 @@ import {
|
|
|
71
76
|
PROCESS_ALIVE,
|
|
72
77
|
PROCESS_NONE,
|
|
73
78
|
PROCESS_UNKNOWN,
|
|
79
|
+
RELEASE_LABEL,
|
|
74
80
|
REPOSITORY_LABELS,
|
|
75
81
|
RUN_LANE_LABEL,
|
|
76
82
|
RUN_SOLO_LABEL,
|
|
@@ -78,12 +84,9 @@ import {
|
|
|
78
84
|
STATE_AND_RELATIONS_FIELDS,
|
|
79
85
|
agent_headless,
|
|
80
86
|
backlog_budget,
|
|
81
|
-
bounded_pool,
|
|
82
87
|
detached_launch,
|
|
83
88
|
gh_author_association,
|
|
84
|
-
git_gh_api_path,
|
|
85
89
|
git_gh_etag_read,
|
|
86
|
-
git_gh_exec,
|
|
87
90
|
git_gh_issue_graphql,
|
|
88
91
|
git_gh_issue_read,
|
|
89
92
|
git_gh_issue_rest,
|
|
@@ -95,60 +98,62 @@ import {
|
|
|
95
98
|
issue_fields_schema,
|
|
96
99
|
issue_state,
|
|
97
100
|
label_name_of,
|
|
98
|
-
lane_child_marker,
|
|
99
101
|
lane_handoff,
|
|
100
102
|
lane_process_table,
|
|
101
103
|
lane_registry,
|
|
102
104
|
lane_snapshot_trace,
|
|
103
|
-
parse_json,
|
|
104
|
-
parse_json_array_or_undefined,
|
|
105
|
-
parse_json_array_safe,
|
|
106
|
-
parse_json_object_or_undefined,
|
|
107
|
-
read_json_listing,
|
|
108
105
|
repo_party,
|
|
109
106
|
run_cut,
|
|
110
107
|
run_cut_handoff,
|
|
111
108
|
run_headless,
|
|
112
109
|
run_hold,
|
|
113
110
|
run_liveness,
|
|
114
|
-
shared_cache
|
|
115
|
-
|
|
116
|
-
} from "./chunk-5CUXGQT6.js";
|
|
111
|
+
shared_cache
|
|
112
|
+
} from "./chunk-HVNGIM5W.js";
|
|
117
113
|
import {
|
|
118
|
-
ESLINT_RELATED_CACHE_FILE,
|
|
119
|
-
ESLINT_RELATED_CACHE_FLAGS,
|
|
120
114
|
PACKAGE_JSON,
|
|
121
|
-
PRETTIER_RELATED_CACHE_FLAGS,
|
|
122
115
|
agent_profile_schema,
|
|
123
116
|
author_fields_schema,
|
|
124
117
|
blocked_by_schema,
|
|
118
|
+
bounded_pool,
|
|
125
119
|
change_base,
|
|
126
120
|
changed_paths,
|
|
127
121
|
epic_issue_schema,
|
|
122
|
+
git_gh_api_path,
|
|
123
|
+
git_gh_exec,
|
|
128
124
|
hook_decision,
|
|
129
125
|
issue_citation,
|
|
130
126
|
issue_cite,
|
|
131
127
|
issue_label_schema,
|
|
132
128
|
josh_environment_file,
|
|
133
129
|
lane_child_invocation,
|
|
130
|
+
lane_reap,
|
|
134
131
|
lane_spans,
|
|
135
132
|
lane_state,
|
|
136
133
|
open_issue_schema,
|
|
134
|
+
parse_json,
|
|
135
|
+
parse_json_array_or_undefined,
|
|
136
|
+
parse_json_array_safe,
|
|
137
|
+
parse_json_object_or_undefined,
|
|
137
138
|
poll,
|
|
138
139
|
process_owner_schema,
|
|
139
140
|
process_tools,
|
|
141
|
+
read_json_listing,
|
|
140
142
|
repository_lock,
|
|
141
143
|
review_stop_log,
|
|
142
144
|
run_event_scope,
|
|
143
145
|
run_event_stream,
|
|
144
146
|
run_event_stream_emit,
|
|
145
147
|
run_ship_stage,
|
|
148
|
+
run_startup,
|
|
149
|
+
run_startup_schema,
|
|
146
150
|
session_cite,
|
|
147
151
|
session_language,
|
|
148
152
|
shell_quote,
|
|
149
153
|
time_hook_transcript,
|
|
154
|
+
token_shape,
|
|
150
155
|
transcript_tail
|
|
151
|
-
} from "./chunk-
|
|
156
|
+
} from "./chunk-UZXMFOVK.js";
|
|
152
157
|
import {
|
|
153
158
|
timed_fetch
|
|
154
159
|
} from "./chunk-U3ON2GBN.js";
|
|
@@ -161,20 +166,21 @@ import {
|
|
|
161
166
|
} from "./chunk-LRD2ERRI.js";
|
|
162
167
|
import {
|
|
163
168
|
run_ship_lap
|
|
164
|
-
} from "./chunk-
|
|
169
|
+
} from "./chunk-5NIBRHWG.js";
|
|
165
170
|
import {
|
|
166
171
|
agent_provider,
|
|
167
172
|
agent_session_environment,
|
|
168
173
|
cli_flags,
|
|
169
174
|
durable_state,
|
|
170
175
|
issue_number_shape,
|
|
176
|
+
lane_child_marker,
|
|
171
177
|
lane_ledger_kind,
|
|
172
178
|
lane_ledger_write,
|
|
173
179
|
lane_paths,
|
|
174
180
|
process_identity,
|
|
175
181
|
run_carry,
|
|
176
182
|
run_invocation
|
|
177
|
-
} from "./chunk-
|
|
183
|
+
} from "./chunk-YRKS5ZKE.js";
|
|
178
184
|
import {
|
|
179
185
|
GH_API_TIMEOUT_MS,
|
|
180
186
|
LINT_TIMEOUT_MS,
|
|
@@ -206,8 +212,8 @@ async function carry_target() {
|
|
|
206
212
|
return repository === void 0 ? void 0 : run_carry.carry_path(repository);
|
|
207
213
|
}
|
|
208
214
|
function live_carry(target3) {
|
|
209
|
-
const
|
|
210
|
-
return
|
|
215
|
+
const read11 = run_carry.read_carry(target3);
|
|
216
|
+
return read11.kind === "carried" ? read11.carry : void 0;
|
|
211
217
|
}
|
|
212
218
|
async function current_carry() {
|
|
213
219
|
const target3 = await carry_target();
|
|
@@ -318,16 +324,16 @@ var lane_capacity = {
|
|
|
318
324
|
function is_never_merge_waiting() {
|
|
319
325
|
return false;
|
|
320
326
|
}
|
|
321
|
-
function occupied_lanes(lanes, idle2,
|
|
327
|
+
function occupied_lanes(lanes, idle2, records2, is_merge_waiting = is_never_merge_waiting) {
|
|
322
328
|
const live = lanes.filter((lane) => !lane.is_stranded);
|
|
323
329
|
const idle_issues = new Set(idle2(live));
|
|
324
330
|
return live.filter((lane) => {
|
|
325
|
-
const state =
|
|
331
|
+
const state = records2.get(lane.issue)?.state;
|
|
326
332
|
return !idle_issues.has(lane.issue) && state !== "paused" && !is_merge_waiting(lane.issue);
|
|
327
333
|
});
|
|
328
334
|
}
|
|
329
|
-
function unknown_lanes(lanes,
|
|
330
|
-
return lanes.filter((lane) => !lane.is_stranded && !
|
|
335
|
+
function unknown_lanes(lanes, records2) {
|
|
336
|
+
return lanes.filter((lane) => !lane.is_stranded && !records2.has(lane.issue)).map((lane) => lane.issue);
|
|
331
337
|
}
|
|
332
338
|
var backlog_occupied = { occupied_lanes, unknown_lanes };
|
|
333
339
|
|
|
@@ -540,6 +546,12 @@ function process_trace_default(issue) {
|
|
|
540
546
|
function is_process_running_default(issue) {
|
|
541
547
|
return process_trace_default(issue) === PROCESS_ALIVE;
|
|
542
548
|
}
|
|
549
|
+
async function other_process_trace(issue) {
|
|
550
|
+
if (lane_handoff.is_ship_running(issue, process.cwd())) return PROCESS_ALIVE;
|
|
551
|
+
const rows = await lane_process_table.read_table();
|
|
552
|
+
if (!rows?.some((row2) => row2.pid === process.pid)) return PROCESS_UNKNOWN;
|
|
553
|
+
return lane_reap.is_child_running(issue, lane_process_table.probes_of(rows)) ? PROCESS_ALIVE : PROCESS_NONE;
|
|
554
|
+
}
|
|
543
555
|
function is_shipped_default(issue, since_ms) {
|
|
544
556
|
return lane_handoff.is_ship_succeeded(issue, process.cwd(), since_ms);
|
|
545
557
|
}
|
|
@@ -658,6 +670,7 @@ var lane_await = {
|
|
|
658
670
|
is_process_running_default,
|
|
659
671
|
is_shipped_default,
|
|
660
672
|
parse_arguments,
|
|
673
|
+
other_process_trace,
|
|
661
674
|
process_trace_default,
|
|
662
675
|
wait_for_any
|
|
663
676
|
};
|
|
@@ -707,9 +720,9 @@ async function tree_reason(lane, probes) {
|
|
|
707
720
|
return await probes.is_tree_dirty(lane.directory) ? "it has uncommitted changes" : void 0;
|
|
708
721
|
}
|
|
709
722
|
async function commit_reason(lane, probes) {
|
|
710
|
-
const
|
|
711
|
-
if (
|
|
712
|
-
return
|
|
723
|
+
const count2 = await probes.unpushed_commits(lane.branch);
|
|
724
|
+
if (count2 === 0) return void 0;
|
|
725
|
+
return count2 === void 0 ? "its commits could not be counted" : `it has ${String(count2)} commit(s) that are on no remote`;
|
|
713
726
|
}
|
|
714
727
|
var CHECKS = [
|
|
715
728
|
child_reason,
|
|
@@ -756,15 +769,15 @@ async function occupancy_of(open, table5) {
|
|
|
756
769
|
const rows = await table5();
|
|
757
770
|
const issues = open.map((lane) => lane.issue);
|
|
758
771
|
const trace = { process_trace: await lane_snapshot_trace.traces_of(issues, rows) };
|
|
759
|
-
const
|
|
772
|
+
const records2 = await lane_state.read_states(issues);
|
|
760
773
|
const is_merge_waiting = await lane_snapshot_trace.merge_waits_of(issues, rows);
|
|
761
774
|
const occupied = backlog_occupied.occupied_lanes(
|
|
762
775
|
open,
|
|
763
776
|
(live) => lane_spent.idle_lanes(live, trace),
|
|
764
|
-
|
|
777
|
+
records2,
|
|
765
778
|
is_merge_waiting
|
|
766
779
|
);
|
|
767
|
-
const unknown = backlog_occupied.unknown_lanes(open,
|
|
780
|
+
const unknown = backlog_occupied.unknown_lanes(open, records2);
|
|
768
781
|
return { occupied, idle: lane_spent.idle_lanes(open, trace), unknown };
|
|
769
782
|
}
|
|
770
783
|
async function read(lanes, table5 = lane_process_table.read_table) {
|
|
@@ -783,9 +796,10 @@ var SUCCESS_EXIT_CODE = 0;
|
|
|
783
796
|
var NONZERO_EXIT = 1;
|
|
784
797
|
var FORWARDED_STDERR = ["pipe", "inherit"];
|
|
785
798
|
function extra_options(timeout_ms, environment) {
|
|
799
|
+
const child_environment = { ...run_startup.environment(), ...environment };
|
|
786
800
|
return {
|
|
787
801
|
...timeout_ms !== void 0 && { timeout: timeout_ms },
|
|
788
|
-
...
|
|
802
|
+
...Object.keys(child_environment).length > 0 && { env: child_environment }
|
|
789
803
|
};
|
|
790
804
|
}
|
|
791
805
|
async function run_with_options(args, should_forward_stderr, options) {
|
|
@@ -804,7 +818,7 @@ async function josh_run(args, should_forward_stderr = false, timeout_ms, environ
|
|
|
804
818
|
return await run_with_options(args, should_forward_stderr, extra_options(timeout_ms, environment));
|
|
805
819
|
}
|
|
806
820
|
async function josh_run_at(args, cwd) {
|
|
807
|
-
return await run_with_options(args, false, { cwd });
|
|
821
|
+
return await run_with_options(args, false, { ...extra_options(void 0, void 0), cwd });
|
|
808
822
|
}
|
|
809
823
|
function require_success(result, command) {
|
|
810
824
|
if (result.code === SUCCESS_EXIT_CODE) return;
|
|
@@ -1626,11 +1640,11 @@ function blockers_by_key(rows) {
|
|
|
1626
1640
|
}
|
|
1627
1641
|
function upstream_of(key2, blockers) {
|
|
1628
1642
|
const seen = /* @__PURE__ */ new Set([key2]);
|
|
1629
|
-
const
|
|
1630
|
-
for (let next =
|
|
1643
|
+
const pending2 = [...blockers.get(key2) ?? []];
|
|
1644
|
+
for (let next = pending2.pop(); next !== void 0; next = pending2.pop()) {
|
|
1631
1645
|
if (seen.has(next)) continue;
|
|
1632
1646
|
seen.add(next);
|
|
1633
|
-
|
|
1647
|
+
pending2.push(...blockers.get(next) ?? []);
|
|
1634
1648
|
}
|
|
1635
1649
|
seen.delete(key2);
|
|
1636
1650
|
return seen;
|
|
@@ -1707,7 +1721,9 @@ var early_push_schema = external_exports.object({
|
|
|
1707
1721
|
at: external_exports.string(),
|
|
1708
1722
|
issue: external_exports.number().optional(),
|
|
1709
1723
|
source: external_exports.enum(["review", "ship"]),
|
|
1710
|
-
result: external_exports.string()
|
|
1724
|
+
result: external_exports.string(),
|
|
1725
|
+
head: external_exports.string().optional(),
|
|
1726
|
+
slots: external_exports.number().optional()
|
|
1711
1727
|
});
|
|
1712
1728
|
var stop_schema = external_exports.object({
|
|
1713
1729
|
kind: external_exports.literal(KIND3.STOP),
|
|
@@ -1869,11 +1885,23 @@ var offerable_schema = external_exports.object({
|
|
|
1869
1885
|
is_offerable: external_exports.boolean()
|
|
1870
1886
|
});
|
|
1871
1887
|
var core_wait_schema = external_exports.object({
|
|
1872
|
-
kind: external_exports.
|
|
1888
|
+
kind: external_exports.enum([KIND4.CORE_WAIT, KIND4.CORE_ADMISSION]),
|
|
1873
1889
|
at: external_exports.string(),
|
|
1874
1890
|
command: external_exports.string(),
|
|
1875
1891
|
waited_ms: external_exports.number(),
|
|
1876
|
-
issue: external_exports.number().optional()
|
|
1892
|
+
issue: external_exports.number().optional(),
|
|
1893
|
+
admission_reason: external_exports.string().optional(),
|
|
1894
|
+
overflow: external_exports.boolean().optional(),
|
|
1895
|
+
budget_cores: external_exports.number().optional(),
|
|
1896
|
+
budget_memory_mb: external_exports.number().optional(),
|
|
1897
|
+
available_mb: external_exports.number().optional(),
|
|
1898
|
+
busy_cores: external_exports.number().optional(),
|
|
1899
|
+
requested_cores: external_exports.number().optional(),
|
|
1900
|
+
granted_cores: external_exports.number().optional(),
|
|
1901
|
+
memory_mb: external_exports.number().optional(),
|
|
1902
|
+
wait_reason: external_exports.string().optional(),
|
|
1903
|
+
admission_waited_ms: external_exports.number().optional(),
|
|
1904
|
+
memory_pressured: external_exports.boolean().optional()
|
|
1877
1905
|
});
|
|
1878
1906
|
var unit_file_schema = external_exports.object({ file: external_exports.string(), elapsed_ms: external_exports.number() });
|
|
1879
1907
|
var unit_files_schema = external_exports.object({
|
|
@@ -1952,6 +1980,7 @@ var push_miss_schema = external_exports.object({
|
|
|
1952
1980
|
var limit_schema = external_exports.object({ kind: external_exports.literal(KIND4.LIMIT), at: external_exports.string(), limit: external_exports.number() });
|
|
1953
1981
|
var entry_schema = external_exports.discriminatedUnion("kind", [
|
|
1954
1982
|
early_push_schema2,
|
|
1983
|
+
run_startup_schema.entry_schema,
|
|
1955
1984
|
merge_schema,
|
|
1956
1985
|
gate_schema,
|
|
1957
1986
|
load_schema2,
|
|
@@ -2022,10 +2051,10 @@ function next_tail(descriptor, snapshot2, previous) {
|
|
|
2022
2051
|
const length = readSync(descriptor, bytes, 0, bytes.length, from);
|
|
2023
2052
|
return grow(base, snapshot2, from, bytes.subarray(0, length));
|
|
2024
2053
|
}
|
|
2025
|
-
function read_tail(
|
|
2054
|
+
function read_tail(path12, previous) {
|
|
2026
2055
|
try {
|
|
2027
|
-
if (!stamp_file.is_own_regular_file(
|
|
2028
|
-
const descriptor = openSync(
|
|
2056
|
+
if (!stamp_file.is_own_regular_file(path12)) return void 0;
|
|
2057
|
+
const descriptor = openSync(path12, READ_FLAGS);
|
|
2029
2058
|
try {
|
|
2030
2059
|
return next_tail(descriptor, snapshot_of(fstatSync(descriptor)), previous);
|
|
2031
2060
|
} finally {
|
|
@@ -2036,20 +2065,20 @@ function read_tail(path15, previous) {
|
|
|
2036
2065
|
}
|
|
2037
2066
|
}
|
|
2038
2067
|
var tails = /* @__PURE__ */ new Map();
|
|
2039
|
-
function read2(
|
|
2040
|
-
const tail = read_tail(
|
|
2068
|
+
function read2(path12) {
|
|
2069
|
+
const tail = read_tail(path12, tails.get(path12));
|
|
2041
2070
|
if (tail === void 0) {
|
|
2042
|
-
tails.delete(
|
|
2071
|
+
tails.delete(path12);
|
|
2043
2072
|
return EMPTY;
|
|
2044
2073
|
}
|
|
2045
|
-
tails.set(
|
|
2074
|
+
tails.set(path12, tail);
|
|
2046
2075
|
return tail.entries;
|
|
2047
2076
|
}
|
|
2048
2077
|
var lane_ledger_tail = { read: read2 };
|
|
2049
2078
|
|
|
2050
2079
|
// scripts/lane/lane-ledger.ts
|
|
2051
|
-
function read_entries(
|
|
2052
|
-
return lane_ledger_tail.read(
|
|
2080
|
+
function read_entries(path12) {
|
|
2081
|
+
return lane_ledger_tail.read(path12);
|
|
2053
2082
|
}
|
|
2054
2083
|
var {
|
|
2055
2084
|
CI_WAIT_STAGE,
|
|
@@ -2308,9 +2337,9 @@ async function take(context = {}) {
|
|
|
2308
2337
|
return entry;
|
|
2309
2338
|
}
|
|
2310
2339
|
async function newest_load(ledger_path) {
|
|
2311
|
-
const
|
|
2312
|
-
if (
|
|
2313
|
-
return lane_ledger.read_entries(
|
|
2340
|
+
const path12 = ledger_path ?? await lane_ledger.target();
|
|
2341
|
+
if (path12 === void 0) return void 0;
|
|
2342
|
+
return lane_ledger.read_entries(path12).findLast((entry) => entry.kind === lane_ledger.KIND.LOAD);
|
|
2314
2343
|
}
|
|
2315
2344
|
function counter_growth(previous, current2) {
|
|
2316
2345
|
if (previous.booted_ms !== current2.booted_ms) return 0;
|
|
@@ -2454,15 +2483,15 @@ function peak(values) {
|
|
|
2454
2483
|
function lowest(values) {
|
|
2455
2484
|
return values.length === 0 ? void 0 : Math.min(...values);
|
|
2456
2485
|
}
|
|
2457
|
-
function is_working(
|
|
2458
|
-
return (
|
|
2486
|
+
function is_working(sample3) {
|
|
2487
|
+
return (sample3.lanes ?? 0) > 0;
|
|
2459
2488
|
}
|
|
2460
|
-
function sample_pairs(
|
|
2461
|
-
const sorted =
|
|
2489
|
+
function sample_pairs(samples2) {
|
|
2490
|
+
const sorted = samples2.toSorted((left, right) => Date.parse(left.at) - Date.parse(right.at));
|
|
2462
2491
|
return sorted.slice(1).map((next, index) => ({ sample: sorted[index] ?? next, next }));
|
|
2463
2492
|
}
|
|
2464
|
-
function elapsed_ms({ sample:
|
|
2465
|
-
return Date.parse(next.at) - Date.parse(
|
|
2493
|
+
function elapsed_ms({ sample: sample3, next }) {
|
|
2494
|
+
return Date.parse(next.at) - Date.parse(sample3.at);
|
|
2466
2495
|
}
|
|
2467
2496
|
function sum_hours(gaps) {
|
|
2468
2497
|
const active = gaps.filter((gap) => gap <= ACTIVE_GAP_MS).reduce((sum, gap) => sum + gap, 0);
|
|
@@ -2474,8 +2503,8 @@ function gap_hours(entries) {
|
|
|
2474
2503
|
instants.slice(1).map((instant, index) => instant - (instants[index] ?? instant))
|
|
2475
2504
|
);
|
|
2476
2505
|
}
|
|
2477
|
-
function sampled_hours(
|
|
2478
|
-
const gaps = sample_pairs(
|
|
2506
|
+
function sampled_hours(samples2) {
|
|
2507
|
+
const gaps = sample_pairs(samples2).filter(({ sample: sample3 }) => is_working(sample3)).map((pair) => elapsed_ms(pair));
|
|
2479
2508
|
return sum_hours(gaps);
|
|
2480
2509
|
}
|
|
2481
2510
|
function swap_rate(pair) {
|
|
@@ -2486,8 +2515,8 @@ function swap_rate(pair) {
|
|
|
2486
2515
|
return swapped / MB_PER_GB / (elapsed / MS_PER_HOUR);
|
|
2487
2516
|
}
|
|
2488
2517
|
function active_hours(entries) {
|
|
2489
|
-
const
|
|
2490
|
-
return
|
|
2518
|
+
const samples2 = entries.filter(is_load);
|
|
2519
|
+
return samples2.some((sample3) => is_working(sample3)) ? sampled_hours(samples2) : gap_hours(entries);
|
|
2491
2520
|
}
|
|
2492
2521
|
function gigabytes(megabytes) {
|
|
2493
2522
|
return megabytes === void 0 ? void 0 : megabytes / MB_PER_GB;
|
|
@@ -2527,23 +2556,23 @@ function gate_cells(entries) {
|
|
|
2527
2556
|
const minutes = entries.filter(is_gate).filter((entry) => entry.is_reused !== true).map((entry) => entry.elapsed_ms / MS_PER_MINUTE);
|
|
2528
2557
|
return [cell(median(minutes)), cell(peak(minutes))];
|
|
2529
2558
|
}
|
|
2530
|
-
function swap_cells(
|
|
2531
|
-
const pairs = sample_pairs(
|
|
2559
|
+
function swap_cells(samples2) {
|
|
2560
|
+
const pairs = sample_pairs(samples2);
|
|
2532
2561
|
const rates = pairs.map((pair) => swap_rate(pair)).filter(is_number);
|
|
2533
|
-
const working_rates = pairs.filter(({ sample:
|
|
2562
|
+
const working_rates = pairs.filter(({ sample: sample3 }) => is_working(sample3)).map((pair) => swap_rate(pair)).filter(is_number);
|
|
2534
2563
|
return [cell(peak(rates)), cell(mean(working_rates))];
|
|
2535
2564
|
}
|
|
2536
|
-
function load_cells(
|
|
2537
|
-
const working =
|
|
2538
|
-
const free =
|
|
2539
|
-
const working_free = working.map((
|
|
2565
|
+
function load_cells(samples2) {
|
|
2566
|
+
const working = samples2.filter(is_working);
|
|
2567
|
+
const free = samples2.map((sample3) => sample3.available_mb).filter(is_number);
|
|
2568
|
+
const working_free = working.map((sample3) => sample3.available_mb).filter(is_number);
|
|
2540
2569
|
return [
|
|
2541
|
-
cell(peak(
|
|
2542
|
-
cell(mean(working.map((
|
|
2543
|
-
...swap_cells(
|
|
2570
|
+
cell(peak(samples2.map((sample3) => sample3.load))),
|
|
2571
|
+
cell(mean(working.map((sample3) => sample3.load))),
|
|
2572
|
+
...swap_cells(samples2),
|
|
2544
2573
|
cell(gigabytes(lowest(free))),
|
|
2545
2574
|
cell(gigabytes(mean(working_free))),
|
|
2546
|
-
String(
|
|
2575
|
+
String(samples2.length)
|
|
2547
2576
|
];
|
|
2548
2577
|
}
|
|
2549
2578
|
function to_row(cells) {
|
|
@@ -3025,13 +3054,13 @@ function partners_of(files, added) {
|
|
|
3025
3054
|
}
|
|
3026
3055
|
function units_of(files, added) {
|
|
3027
3056
|
const artifacts = codex_hooks.GENERATED_SOURCES;
|
|
3028
|
-
const
|
|
3029
|
-
const partners = partners_of(
|
|
3030
|
-
return
|
|
3057
|
+
const sources2 = files.filter((file) => !files.includes(artifacts.get(file) ?? ""));
|
|
3058
|
+
const partners = partners_of(sources2, added);
|
|
3059
|
+
return sources2.flatMap((file) => {
|
|
3031
3060
|
const partner = partners.get(file);
|
|
3032
3061
|
const unit = partner === void 0 ? [file] : [file, partner];
|
|
3033
|
-
const generated = files.filter((
|
|
3034
|
-
return partner !== void 0 &&
|
|
3062
|
+
const generated = files.filter((path12) => unit.includes(artifacts.get(path12) ?? ""));
|
|
3063
|
+
return partner !== void 0 && sources2.indexOf(partner) < sources2.indexOf(file) ? [] : [[...unit, ...generated]];
|
|
3035
3064
|
});
|
|
3036
3065
|
}
|
|
3037
3066
|
function verdict_for(files, lines2, guide = DEFAULT_GUIDE) {
|
|
@@ -3150,8 +3179,8 @@ function is_estimate_line(text2) {
|
|
|
3150
3179
|
const trimmed = text2.trim();
|
|
3151
3180
|
return trimmed.startsWith(PREFIX) && issue_body_keys.size_counts(trimmed.slice(PREFIX.length).trim()) !== void 0;
|
|
3152
3181
|
}
|
|
3153
|
-
function stated_line(
|
|
3154
|
-
return markdown_section.unfenced_lines(
|
|
3182
|
+
function stated_line(record7) {
|
|
3183
|
+
return markdown_section.unfenced_lines(record7).find((text2) => is_estimate_line(text2))?.trim();
|
|
3155
3184
|
}
|
|
3156
3185
|
function declared_index(visible) {
|
|
3157
3186
|
const start2 = visible.findIndex((text2) => text2.trim() === BACKGROUND_HEADING3) + 1;
|
|
@@ -3173,16 +3202,16 @@ function restated(body, line) {
|
|
|
3173
3202
|
function is_epic(body) {
|
|
3174
3203
|
return markdown_section.has_line(body, EPIC_HEADING);
|
|
3175
3204
|
}
|
|
3176
|
-
function grown(
|
|
3177
|
-
return
|
|
3205
|
+
function grown(count2, axis, growth) {
|
|
3206
|
+
return count2 * declared_growth.factor(growth, axis);
|
|
3178
3207
|
}
|
|
3179
3208
|
function guide_for2(rate2) {
|
|
3180
3209
|
return split_assess.guide_for(IMPLEMENT_BUDGET, rate2);
|
|
3181
3210
|
}
|
|
3182
3211
|
function parse(body, rate2, growth) {
|
|
3183
|
-
const
|
|
3184
|
-
if (!
|
|
3185
|
-
const { files, lines: lines2 } =
|
|
3212
|
+
const read11 = estimate_schema.safeParse(issue_body_keys.size_counts(declared(body, PREFIX) ?? ""));
|
|
3213
|
+
if (!read11.success) return void 0;
|
|
3214
|
+
const { files, lines: lines2 } = read11.data;
|
|
3186
3215
|
return {
|
|
3187
3216
|
files,
|
|
3188
3217
|
lines: lines2,
|
|
@@ -3375,16 +3404,111 @@ var git_next_issues = {
|
|
|
3375
3404
|
fetch_next_issue_lines
|
|
3376
3405
|
};
|
|
3377
3406
|
|
|
3407
|
+
// scripts/lane/lane-early-push-count.ts
|
|
3408
|
+
var MULTI_SLOT_EARLY_PUSH = "multi-slot-early-push";
|
|
3409
|
+
var PUSHED = "pushed";
|
|
3410
|
+
var MULTI_SLOT_MINIMUM = 2;
|
|
3411
|
+
function multi_slot_pushed(entries) {
|
|
3412
|
+
return entries.filter(
|
|
3413
|
+
(entry) => entry.kind === "early-push" && entry.result === PUSHED && (entry.slots ?? 0) >= MULTI_SLOT_MINIMUM
|
|
3414
|
+
).length;
|
|
3415
|
+
}
|
|
3416
|
+
var lane_early_push_count = { MULTI_SLOT_EARLY_PUSH, multi_slot_pushed };
|
|
3417
|
+
|
|
3418
|
+
// scripts/issue/issue-observation-gate.ts
|
|
3419
|
+
var PREFIX2 = "<!-- josh:observation-wait";
|
|
3420
|
+
var DECLARATION2 = /^<!-- josh:observation-wait:v1 (?<url>https:\/\/github\.com\/(?<repo>[\w.-]+\/[\w.-]+)\/issues\/[1-9]\d*#issuecomment-(?<comment>[1-9]\d*)) (?<keys>[\w-]+(?:,[\w-]+)*) -->$/u;
|
|
3421
|
+
var LEDGER = / ledger:(?<metric>[\w-]+)>=(?<minimum>[1-9]\d*)(?= -->$)/u;
|
|
3422
|
+
var METRICS = /* @__PURE__ */ new Set([lane_early_push_count.MULTI_SLOT_EARLY_PUSH]);
|
|
3423
|
+
var EVIDENCE_HEADING = "## Observation evidence";
|
|
3424
|
+
var TASK = /^- \[(?<checked>[ xX])\] (?<key>[\w-]+): (?<description>.+)$/u;
|
|
3425
|
+
var EVIDENCE = /\[evidence\]\(https:\/\/github\.com\/[\w./#?=&%-]+\)$/u;
|
|
3426
|
+
var records = /* @__PURE__ */ new Map();
|
|
3427
|
+
var samples = /* @__PURE__ */ new Map();
|
|
3428
|
+
function is_evidenced(task) {
|
|
3429
|
+
return task?.["checked"]?.toLowerCase() === "x" && EVIDENCE.test(task["description"] ?? "");
|
|
3430
|
+
}
|
|
3431
|
+
function declarations(body = "") {
|
|
3432
|
+
return markdown_section.unfenced_lines(body).filter((line) => line.trimStart().startsWith(PREFIX2));
|
|
3433
|
+
}
|
|
3434
|
+
function ledger_of(line) {
|
|
3435
|
+
const groups = LEDGER.exec(line)?.groups;
|
|
3436
|
+
if (groups === void 0) return void 0;
|
|
3437
|
+
return { metric: String(groups["metric"]), minimum: Number(groups["minimum"]) };
|
|
3438
|
+
}
|
|
3439
|
+
function is_known(ledger2) {
|
|
3440
|
+
return ledger2 === void 0 || METRICS.has(ledger2.metric);
|
|
3441
|
+
}
|
|
3442
|
+
function source_of(line) {
|
|
3443
|
+
const trimmed = line.trim();
|
|
3444
|
+
const ledger2 = ledger_of(trimmed);
|
|
3445
|
+
if (!is_known(ledger2)) return void 0;
|
|
3446
|
+
const groups = DECLARATION2.exec(trimmed.replace(LEDGER, ""))?.groups;
|
|
3447
|
+
if (groups === void 0) return void 0;
|
|
3448
|
+
return {
|
|
3449
|
+
url: String(groups["url"]),
|
|
3450
|
+
repo: String(groups["repo"]),
|
|
3451
|
+
comment: String(groups["comment"]),
|
|
3452
|
+
keys: String(groups["keys"]).split(","),
|
|
3453
|
+
ledger: ledger2
|
|
3454
|
+
};
|
|
3455
|
+
}
|
|
3456
|
+
function is_sampled(ledger2) {
|
|
3457
|
+
if (ledger2 === void 0) return false;
|
|
3458
|
+
return (samples.get(ledger2.metric) ?? 0) >= ledger2.minimum;
|
|
3459
|
+
}
|
|
3460
|
+
function sources(bodies) {
|
|
3461
|
+
return bodies.flatMap((body) => declarations(body).flatMap((line) => source_of(line) ?? []));
|
|
3462
|
+
}
|
|
3463
|
+
function pending(source, body) {
|
|
3464
|
+
const lines2 = markdown_section.section_lines(body, EVIDENCE_HEADING).join("\n");
|
|
3465
|
+
const tasks = markdown_section.unfenced_lines(lines2).map((line) => TASK.exec(line)?.groups);
|
|
3466
|
+
return source.keys.filter((key2) => {
|
|
3467
|
+
const matches = tasks.filter((task2) => task2?.["key"] === key2);
|
|
3468
|
+
const [task] = matches;
|
|
3469
|
+
return matches.length !== 1 || !is_evidenced(task);
|
|
3470
|
+
});
|
|
3471
|
+
}
|
|
3472
|
+
function wait_for(line) {
|
|
3473
|
+
const source = source_of(line);
|
|
3474
|
+
if (source === void 0) {
|
|
3475
|
+
return {
|
|
3476
|
+
reason: "unknown observation condition; record a v1 evidence comment and required keys"
|
|
3477
|
+
};
|
|
3478
|
+
}
|
|
3479
|
+
if (is_sampled(source.ledger)) return void 0;
|
|
3480
|
+
const body = records.get(source.url);
|
|
3481
|
+
if (body === void 0) {
|
|
3482
|
+
return { reason: `observation evidence unread: ${source.keys.join(", ")}`, url: source.url };
|
|
3483
|
+
}
|
|
3484
|
+
const missing = pending(source, body);
|
|
3485
|
+
return missing.length === 0 ? void 0 : { reason: `observation evidence required: ${missing.join(", ")}`, url: source.url };
|
|
3486
|
+
}
|
|
3487
|
+
function wait_of(body) {
|
|
3488
|
+
return declarations(body).map((line) => wait_for(line)).find((wait) => wait !== void 0);
|
|
3489
|
+
}
|
|
3490
|
+
function record2(url, body) {
|
|
3491
|
+
records.set(url, body);
|
|
3492
|
+
}
|
|
3493
|
+
function record_sample(metric, count2) {
|
|
3494
|
+
samples.set(metric, count2);
|
|
3495
|
+
}
|
|
3496
|
+
function reset() {
|
|
3497
|
+
records.clear();
|
|
3498
|
+
samples.clear();
|
|
3499
|
+
}
|
|
3500
|
+
var issue_observation_gate = { sources, wait_of, record: record2, record_sample, reset };
|
|
3501
|
+
|
|
3378
3502
|
// scripts/issue/issue-sample-gate.ts
|
|
3379
3503
|
var BACKGROUND_HEADING4 = issue_body_keys.heading("background");
|
|
3380
|
-
var
|
|
3504
|
+
var PREFIX3 = issue_body_keys.prefix("sample_gate");
|
|
3381
3505
|
var CONDITION_PATTERN = /^#(?<cited>[1-9]\d*) (?<closing>を閉じる PR )?のマージ後 (?<count>[1-9]\d*) マージ$/u;
|
|
3382
3506
|
var VALUE_FORMAT = "#<PR> \u306E\u30DE\u30FC\u30B8\u5F8C <K> \u30DE\u30FC\u30B8";
|
|
3383
3507
|
var CLOSING_FORMAT = "#<issue> \u3092\u9589\u3058\u308B PR \u306E\u30DE\u30FC\u30B8\u5F8C <K> \u30DE\u30FC\u30B8";
|
|
3384
|
-
var
|
|
3508
|
+
var DECLARATION3 = `${PREFIX3} ${VALUE_FORMAT}`;
|
|
3385
3509
|
var MAX_COUNT = 30;
|
|
3386
|
-
var EXAMPLE2 = `${
|
|
3387
|
-
var MALFORMED2 = `\`${
|
|
3510
|
+
var EXAMPLE2 = `${PREFIX3} #5198 \u306E\u30DE\u30FC\u30B8\u5F8C 10 \u30DE\u30FC\u30B8`;
|
|
3511
|
+
var MALFORMED2 = `\`${PREFIX3}\` must read \`${VALUE_FORMAT}\` or \`${CLOSING_FORMAT}\` with K from 1 to ${String(MAX_COUNT)}
|
|
3388
3512
|
${EXAMPLE2}`;
|
|
3389
3513
|
var pull_by_key = /* @__PURE__ */ new Map();
|
|
3390
3514
|
function no_merges() {
|
|
@@ -3393,8 +3517,8 @@ function no_merges() {
|
|
|
3393
3517
|
var ledger = { merges: no_merges };
|
|
3394
3518
|
function declared_value(body) {
|
|
3395
3519
|
const background2 = markdown_section.section_lines(body, BACKGROUND_HEADING4).join("\n");
|
|
3396
|
-
const line = markdown_section.unfenced_lines(background2).map((text2) => text2.trim()).find((text2) => text2.startsWith(
|
|
3397
|
-
return line?.slice(
|
|
3520
|
+
const line = markdown_section.unfenced_lines(background2).map((text2) => text2.trim()).find((text2) => text2.startsWith(PREFIX3));
|
|
3521
|
+
return line?.slice(PREFIX3.length).trim();
|
|
3398
3522
|
}
|
|
3399
3523
|
function via_of(groups) {
|
|
3400
3524
|
return groups["closing"] === void 0 ? "pull" : "issue";
|
|
@@ -3415,14 +3539,14 @@ function key_of2({ cited: cited3, via }) {
|
|
|
3415
3539
|
return `${via}:${String(cited3)}`;
|
|
3416
3540
|
}
|
|
3417
3541
|
function is_well_formed(value) {
|
|
3418
|
-
const
|
|
3419
|
-
return
|
|
3542
|
+
const count2 = CONDITION_PATTERN.exec(value)?.groups?.["count"];
|
|
3543
|
+
return count2 !== void 0 && Number(count2) <= MAX_COUNT;
|
|
3420
3544
|
}
|
|
3421
3545
|
function problems3(body) {
|
|
3422
3546
|
const value = declared_value(body);
|
|
3423
3547
|
return value === void 0 || is_well_formed(value) ? [] : [MALFORMED2];
|
|
3424
3548
|
}
|
|
3425
|
-
function
|
|
3549
|
+
function record3(condition, pull) {
|
|
3426
3550
|
const key2 = key_of2(condition);
|
|
3427
3551
|
if (pull === void 0) pull_by_key.delete(key2);
|
|
3428
3552
|
else pull_by_key.set(key2, pull);
|
|
@@ -3443,16 +3567,16 @@ function merges_after({ merged_at, closes }) {
|
|
|
3443
3567
|
const since = Date.parse(merged_at);
|
|
3444
3568
|
return ledger.merges().filter((merge) => merge.issue !== closes && Date.parse(merge.at) > since).length;
|
|
3445
3569
|
}
|
|
3446
|
-
function
|
|
3570
|
+
function wait_of2(body) {
|
|
3447
3571
|
const condition = condition_of(body);
|
|
3448
3572
|
if (condition === void 0) return void 0;
|
|
3449
|
-
const { cited: cited3, via, count } = condition;
|
|
3573
|
+
const { cited: cited3, via, count: count2 } = condition;
|
|
3450
3574
|
const pull = pull_by_key.get(key_of2(condition));
|
|
3451
3575
|
if (pull === void 0) return { kind: "unread", cited: cited3, via };
|
|
3452
3576
|
const { merged_at, closes } = pull;
|
|
3453
3577
|
if (merged_at === void 0) return { kind: "unmerged", cited: cited3, via };
|
|
3454
3578
|
const counted2 = merges_after({ merged_at, closes });
|
|
3455
|
-
return counted2 >=
|
|
3579
|
+
return counted2 >= count2 ? void 0 : { kind: "short", cited: cited3, via, counted: counted2, needed: count2 };
|
|
3456
3580
|
}
|
|
3457
3581
|
function subject_of({ cited: cited3, via }) {
|
|
3458
3582
|
const plain = issue_cite.plain_for("linked", cited3);
|
|
@@ -3464,36 +3588,36 @@ function reason_of(wait) {
|
|
|
3464
3588
|
if (wait.kind === "unmerged") return `until ${subject} merges`;
|
|
3465
3589
|
return `${String(wait.counted)}/${String(wait.needed)} merges after ${subject}`;
|
|
3466
3590
|
}
|
|
3467
|
-
function
|
|
3591
|
+
function reset2() {
|
|
3468
3592
|
pull_by_key.clear();
|
|
3469
3593
|
ledger.merges = no_merges;
|
|
3470
3594
|
}
|
|
3471
3595
|
var issue_sample_gate = {
|
|
3472
|
-
DECLARATION:
|
|
3596
|
+
DECLARATION: DECLARATION3,
|
|
3473
3597
|
CLOSING_FORMAT,
|
|
3474
3598
|
cited_number,
|
|
3475
3599
|
cited_via,
|
|
3476
3600
|
problems: problems3,
|
|
3477
3601
|
reason_of,
|
|
3478
|
-
record:
|
|
3479
|
-
reset,
|
|
3602
|
+
record: record3,
|
|
3603
|
+
reset: reset2,
|
|
3480
3604
|
unread_of,
|
|
3481
3605
|
use_merges,
|
|
3482
|
-
wait_of
|
|
3606
|
+
wait_of: wait_of2
|
|
3483
3607
|
};
|
|
3484
3608
|
|
|
3485
3609
|
// scripts/issue/measure-declaration.ts
|
|
3486
3610
|
var BACKGROUND_HEADING5 = issue_body_keys.heading("background");
|
|
3487
|
-
var
|
|
3611
|
+
var PREFIX4 = issue_body_keys.prefix("measure_declaration");
|
|
3488
3612
|
var PREMISE_PREFIX = issue_body_keys.prefix("premise");
|
|
3489
3613
|
var ABSENT_PREFIX = issue_body_keys.prefix("measure_absent");
|
|
3490
3614
|
var ABSENT = `${ABSENT_PREFIX} <\u7406\u7531>`;
|
|
3491
3615
|
var SHAPE = "`<command>` <=|<|>=|> <number>";
|
|
3492
|
-
var
|
|
3616
|
+
var DECLARATION4 = `${PREFIX4} ${SHAPE}`;
|
|
3493
3617
|
var VALUE_PATTERN = /^`(?<command>[^`\s][^`]*)`\s*(?<operator><=|>=|<|>)\s*(?<threshold>-?\d+(?:\.\d+)?)$/u;
|
|
3494
3618
|
var NUMBER_PATTERN = /^-?\d+(?:\.\d+)?$/u;
|
|
3495
3619
|
var EXAMPLE_VALUE = "`pnpm josh lane:net 5168` <= 40";
|
|
3496
|
-
var EXAMPLE3 = `${
|
|
3620
|
+
var EXAMPLE3 = `${PREFIX4} ${EXAMPLE_VALUE}`;
|
|
3497
3621
|
var PLACEHOLDER_PATTERN = /<[^\s<>./][^<>./]*>/u;
|
|
3498
3622
|
var declaration_schema = external_exports.object({
|
|
3499
3623
|
command: external_exports.string().trim(),
|
|
@@ -3514,15 +3638,15 @@ function background_value(body, prefix) {
|
|
|
3514
3638
|
return background_values(body, prefix)[0];
|
|
3515
3639
|
}
|
|
3516
3640
|
function declared_value2(body) {
|
|
3517
|
-
return background_value(body,
|
|
3641
|
+
return background_value(body, PREFIX4);
|
|
3518
3642
|
}
|
|
3519
3643
|
function is_stated2(body) {
|
|
3520
3644
|
if (declared_value2(body) !== void 0) return true;
|
|
3521
3645
|
return (background_value(body, ABSENT_PREFIX) ?? "").length > 0;
|
|
3522
3646
|
}
|
|
3523
3647
|
function shaped(value) {
|
|
3524
|
-
const
|
|
3525
|
-
return
|
|
3648
|
+
const read11 = declaration_schema.safeParse(VALUE_PATTERN.exec(value)?.groups);
|
|
3649
|
+
return read11.success ? read11.data : void 0;
|
|
3526
3650
|
}
|
|
3527
3651
|
function placeholder_of(declaration) {
|
|
3528
3652
|
return PLACEHOLDER_PATTERN.exec(declaration.command)?.[0];
|
|
@@ -3554,7 +3678,7 @@ function premises(body) {
|
|
|
3554
3678
|
}
|
|
3555
3679
|
function problems4(body) {
|
|
3556
3680
|
const value = declared_value2(body);
|
|
3557
|
-
const declared2 = value === void 0 ? [] : value_problems(value,
|
|
3681
|
+
const declared2 = value === void 0 ? [] : value_problems(value, PREFIX4);
|
|
3558
3682
|
const premised = background_values(body, PREMISE_PREFIX).flatMap(
|
|
3559
3683
|
(premise) => value_problems(premise, PREMISE_PREFIX)
|
|
3560
3684
|
);
|
|
@@ -3575,9 +3699,9 @@ function format(declaration) {
|
|
|
3575
3699
|
}
|
|
3576
3700
|
var measure_declaration = {
|
|
3577
3701
|
ABSENT,
|
|
3578
|
-
DECLARATION:
|
|
3702
|
+
DECLARATION: DECLARATION4,
|
|
3579
3703
|
EXAMPLE: EXAMPLE3,
|
|
3580
|
-
PREFIX:
|
|
3704
|
+
PREFIX: PREFIX4,
|
|
3581
3705
|
PREMISE_PREFIX,
|
|
3582
3706
|
background_value,
|
|
3583
3707
|
format,
|
|
@@ -3590,27 +3714,27 @@ var measure_declaration = {
|
|
|
3590
3714
|
|
|
3591
3715
|
// scripts/issue/issue-not-before.ts
|
|
3592
3716
|
var BACKGROUND_HEADING6 = issue_body_keys.heading("background");
|
|
3593
|
-
var
|
|
3717
|
+
var PREFIX5 = issue_body_keys.prefix("not_before");
|
|
3594
3718
|
var DATE_PATTERN = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}Z$/u;
|
|
3595
3719
|
var ISO_TAIL = ":00.000Z";
|
|
3596
|
-
var EXAMPLE4 = `${
|
|
3597
|
-
var MALFORMED3 = `\`${
|
|
3720
|
+
var EXAMPLE4 = `${PREFIX5} 2099-01-01T09:00Z`;
|
|
3721
|
+
var MALFORMED3 = `\`${PREFIX5}\` must be a UTC time written YYYY-MM-DDTHH:MMZ
|
|
3598
3722
|
${EXAMPLE4}`;
|
|
3599
3723
|
var MAX_WAIT_DAYS = 7;
|
|
3600
3724
|
var DAY_MS = 864e5;
|
|
3601
3725
|
var MAX_WAIT_MS = MAX_WAIT_DAYS * DAY_MS;
|
|
3602
3726
|
var MINUTES_LENGTH = 16;
|
|
3603
|
-
var TOO_LATE = `\`${
|
|
3604
|
-
var BOTH = `a measurement follow-up declares one of \`${
|
|
3727
|
+
var TOO_LATE = `\`${PREFIX5}\` of a measurement follow-up must be at most ${String(MAX_WAIT_DAYS)} days after filing \u2014 wait on samples with \`${issue_sample_gate.DECLARATION}\` instead`;
|
|
3728
|
+
var BOTH = `a measurement follow-up declares one of \`${PREFIX5}\` and \`${issue_body_keys.prefix("sample_gate")}\`, not both \u2014 keep the condition`;
|
|
3605
3729
|
var HEADING_MARKS = /^#{1,6}\s+/u;
|
|
3606
3730
|
var STRAY_HEADINGS = [
|
|
3607
|
-
{ name: "\u5B9F\u65BD\u53EF\u80FD\u65E5", declaration: `${
|
|
3731
|
+
{ name: "\u5B9F\u65BD\u53EF\u80FD\u65E5", declaration: `${PREFIX5} YYYY-MM-DDTHH:MMZ` },
|
|
3608
3732
|
{ name: "\u5B9F\u65BD\u53EF\u80FD\u6761\u4EF6", declaration: issue_sample_gate.DECLARATION }
|
|
3609
3733
|
];
|
|
3610
3734
|
function declared_value3(body) {
|
|
3611
3735
|
const background2 = markdown_section.section_lines(body, BACKGROUND_HEADING6).join("\n");
|
|
3612
|
-
const line = markdown_section.unfenced_lines(background2).map((text2) => text2.trim()).find((text2) => text2.startsWith(
|
|
3613
|
-
return line?.slice(
|
|
3736
|
+
const line = markdown_section.unfenced_lines(background2).map((text2) => text2.trim()).find((text2) => text2.startsWith(PREFIX5));
|
|
3737
|
+
return line?.slice(PREFIX5.length).trim();
|
|
3614
3738
|
}
|
|
3615
3739
|
function is_valid2(value) {
|
|
3616
3740
|
if (!DATE_PATTERN.test(value)) return false;
|
|
@@ -3626,7 +3750,7 @@ function is_date_due(body, now) {
|
|
|
3626
3750
|
return date === void 0 || Date.parse(date) <= now;
|
|
3627
3751
|
}
|
|
3628
3752
|
function is_due(body, now = Date.now()) {
|
|
3629
|
-
return is_date_due(body, now) && issue_sample_gate.wait_of(body) === void 0;
|
|
3753
|
+
return is_date_due(body, now) && issue_sample_gate.wait_of(body) === void 0 && issue_observation_gate.wait_of(body) === void 0;
|
|
3630
3754
|
}
|
|
3631
3755
|
function waiting_ms(body, now = Date.now()) {
|
|
3632
3756
|
if (is_date_due(body, now)) return void 0;
|
|
@@ -3639,7 +3763,7 @@ function waiting_reason(body, now = Date.now()) {
|
|
|
3639
3763
|
const date = waiting_date(body, now);
|
|
3640
3764
|
if (date !== void 0) return `not before ${date}`;
|
|
3641
3765
|
const wait = issue_sample_gate.wait_of(body);
|
|
3642
|
-
return wait === void 0 ?
|
|
3766
|
+
return wait === void 0 ? issue_observation_gate.wait_of(body)?.reason : issue_sample_gate.reason_of(wait);
|
|
3643
3767
|
}
|
|
3644
3768
|
function stray_heading_problems(body) {
|
|
3645
3769
|
const headings2 = markdown_section.unfenced_lines(body).map((line) => line.trim()).filter((line) => HEADING_MARKS.test(line)).map((line) => line.replace(HEADING_MARKS, ""));
|
|
@@ -3655,7 +3779,7 @@ function measurement_wait_problems(body, now) {
|
|
|
3655
3779
|
if (date === void 0 || !measure_declaration.is_stated(body)) return [];
|
|
3656
3780
|
if (issue_sample_gate.cited_number(body) !== void 0) return [BOTH];
|
|
3657
3781
|
return Date.parse(date) > now + MAX_WAIT_MS ? [`${TOO_LATE}
|
|
3658
|
-
${
|
|
3782
|
+
${PREFIX5} ${latest_date(now)}`] : [];
|
|
3659
3783
|
}
|
|
3660
3784
|
function problems5(body, now = Date.now()) {
|
|
3661
3785
|
const value = declared_value3(body);
|
|
@@ -3669,6 +3793,143 @@ function problems5(body, now = Date.now()) {
|
|
|
3669
3793
|
}
|
|
3670
3794
|
var issue_not_before = { is_due, problems: problems5, waiting_date, waiting_ms, waiting_reason };
|
|
3671
3795
|
|
|
3796
|
+
// scripts/issue/issue-auto-ok.ts
|
|
3797
|
+
var BACKGROUND_HEADING7 = issue_body_keys.heading("background");
|
|
3798
|
+
var JUDGEMENT_NOT_NEEDED = issue_body_keys.line("judgement", "not_needed");
|
|
3799
|
+
var JUDGEMENT_NEEDED = issue_body_keys.line("judgement", "needed");
|
|
3800
|
+
var DECLARATION_PROBLEM2 = `declare under \`${BACKGROUND_HEADING7}\` whether a person's judgement (a policy decision, an external account, a human visual check) is needed: \`${JUDGEMENT_NOT_NEEDED}\` or \`${JUDGEMENT_NEEDED}\uFF08<which one>\uFF09\` \u2014 exactly one (\`issue-template.md\`)`;
|
|
3801
|
+
var DECISION_RULE_PREFIX = issue_body_keys.prefix("decision_rule");
|
|
3802
|
+
var DECISION_PROBLEM = `a decision rule citing a measurement Issue determines the choice; declare \`${JUDGEMENT_NOT_NEEDED}\` and record the applied result and reason in an Issue comment`;
|
|
3803
|
+
var OPTED_OUT = { is_applied: false, reason: "--no-auto-ok declared" };
|
|
3804
|
+
var CROSS_REPOSITORY = {
|
|
3805
|
+
is_applied: false,
|
|
3806
|
+
reason: "the Issue is filed to another repository"
|
|
3807
|
+
};
|
|
3808
|
+
var JUDGEMENT = {
|
|
3809
|
+
is_applied: false,
|
|
3810
|
+
reason: `the body declares \`${JUDGEMENT_NEEDED}\``
|
|
3811
|
+
};
|
|
3812
|
+
var APPLIED = {
|
|
3813
|
+
is_applied: true,
|
|
3814
|
+
reason: "no exclusion holds and the body declares no judgement is needed"
|
|
3815
|
+
};
|
|
3816
|
+
var CONSTRAINT_HEADING = issue_body_keys.heading("auto_execution_constraint");
|
|
3817
|
+
var CONSTRAINT_SOURCE = `${issue_body_keys.prefix("constraint_source")} user`;
|
|
3818
|
+
var CONSTRAINT_REFERENCE = `${issue_body_keys.prefix("constraint_reference")} `;
|
|
3819
|
+
var CONSTRAINT_INSTRUCTION = `${issue_body_keys.prefix("constraint_instruction")} `;
|
|
3820
|
+
var CONSTRAINT_FIELDS = [CONSTRAINT_REFERENCE, CONSTRAINT_INSTRUCTION];
|
|
3821
|
+
var CONSTRAINT_PROBLEM = `--no-auto-ok without an exclusion needs ${CONSTRAINT_HEADING}: ${CONSTRAINT_SOURCE}, ${CONSTRAINT_REFERENCE}<original user prompt or comment URL>, ${CONSTRAINT_INSTRUCTION}<verbatim prohibition>; verify the cited user instruction, not an agent inference or a later judgement. Kickoff ending at planning is not an opt-out.`;
|
|
3822
|
+
var USER_CONSTRAINT = {
|
|
3823
|
+
is_applied: false,
|
|
3824
|
+
reason: "a user prohibition is recorded under \u81EA\u52D5\u5B9F\u884C\u306E\u5236\u7D04"
|
|
3825
|
+
};
|
|
3826
|
+
function user_constraint_of(body) {
|
|
3827
|
+
const section = markdown_section.section_lines(body, CONSTRAINT_HEADING).join("\n");
|
|
3828
|
+
const lines2 = markdown_section.unfenced_lines(section).map((line) => line.trim());
|
|
3829
|
+
const has_fields = CONSTRAINT_FIELDS.every(
|
|
3830
|
+
(prefix) => lines2.some((line) => line.startsWith(prefix) && line.slice(prefix.length).trim() !== "")
|
|
3831
|
+
);
|
|
3832
|
+
return has_fields && lines2.includes(CONSTRAINT_SOURCE) ? USER_CONSTRAINT : void 0;
|
|
3833
|
+
}
|
|
3834
|
+
var EXCLUDED_LABELS = [
|
|
3835
|
+
[RELEASE_LABEL, "a release is Tier C"],
|
|
3836
|
+
[BREAKING_CHANGE_LABEL, "a breaking change needs a person to accept the migration"],
|
|
3837
|
+
[DEFERRED_LABEL, "the Issue is deferred"],
|
|
3838
|
+
[NEEDS_HUMAN_REVIEW_LABEL, "a person reviews the change before it lands"],
|
|
3839
|
+
[EPIC_LABEL, "an epic is opted in by a person, and that opts in every descendant"]
|
|
3840
|
+
];
|
|
3841
|
+
function exclusion_of(labels) {
|
|
3842
|
+
const found = EXCLUDED_LABELS.find(([label2]) => has_label_name(labels, label2));
|
|
3843
|
+
if (found === void 0) return void 0;
|
|
3844
|
+
return { is_applied: false, reason: `a \`${found[0]}\` Issue \u2014 ${found[1]}` };
|
|
3845
|
+
}
|
|
3846
|
+
function background_lines2(body) {
|
|
3847
|
+
const background2 = markdown_section.section_lines(body, BACKGROUND_HEADING7).join("\n");
|
|
3848
|
+
return markdown_section.unfenced_lines(background2).map((line) => line.trim());
|
|
3849
|
+
}
|
|
3850
|
+
function judgement_of(body) {
|
|
3851
|
+
const lines2 = background_lines2(body);
|
|
3852
|
+
const is_not_needed = lines2.some((line) => line.startsWith(JUDGEMENT_NOT_NEEDED));
|
|
3853
|
+
const is_needed = lines2.some((line) => line.startsWith(JUDGEMENT_NEEDED));
|
|
3854
|
+
return is_not_needed === is_needed ? void 0 : is_needed;
|
|
3855
|
+
}
|
|
3856
|
+
function declaration_problem(body) {
|
|
3857
|
+
return judgement_of(body) === void 0 ? DECLARATION_PROBLEM2 : void 0;
|
|
3858
|
+
}
|
|
3859
|
+
function decision_problem(body) {
|
|
3860
|
+
if (judgement_of(body) !== true) return void 0;
|
|
3861
|
+
const has_rule = background_lines2(body).some(
|
|
3862
|
+
(line) => line.startsWith(DECISION_RULE_PREFIX) && /#[1-9]\d*\b/u.test(line)
|
|
3863
|
+
);
|
|
3864
|
+
return has_rule ? DECISION_PROBLEM : void 0;
|
|
3865
|
+
}
|
|
3866
|
+
function body_decision(body) {
|
|
3867
|
+
return user_constraint_of(body) ?? (judgement_of(body) === false ? APPLIED : JUDGEMENT);
|
|
3868
|
+
}
|
|
3869
|
+
function decide(filing) {
|
|
3870
|
+
if (filing.is_opted_out) return OPTED_OUT;
|
|
3871
|
+
if (filing.is_cross_repository) return CROSS_REPOSITORY;
|
|
3872
|
+
return exclusion_of(filing.labels) ?? body_decision(filing.body);
|
|
3873
|
+
}
|
|
3874
|
+
function opt_out_problem(filing) {
|
|
3875
|
+
if (!filing.is_opted_out || user_constraint_of(filing.body) !== void 0) return void 0;
|
|
3876
|
+
const without_opt_out = decide({ ...filing, is_opted_out: false });
|
|
3877
|
+
return without_opt_out.is_applied ? CONSTRAINT_PROBLEM : void 0;
|
|
3878
|
+
}
|
|
3879
|
+
function line_of2(decision) {
|
|
3880
|
+
return `auto-ok: ${decision.is_applied ? "applied" : "not applied"} \u2014 ${decision.reason}`;
|
|
3881
|
+
}
|
|
3882
|
+
var issue_auto_ok = {
|
|
3883
|
+
declaration_problem,
|
|
3884
|
+
decide,
|
|
3885
|
+
decision_problem,
|
|
3886
|
+
exclusion_of,
|
|
3887
|
+
line_of: line_of2,
|
|
3888
|
+
opt_out_problem,
|
|
3889
|
+
user_constraint_of
|
|
3890
|
+
};
|
|
3891
|
+
|
|
3892
|
+
// scripts/issue/issue-publication-state.ts
|
|
3893
|
+
var PREFIX6 = "<!-- josh:publication ";
|
|
3894
|
+
var PATTERN = /<!-- josh:publication (?<record>[^\n]*?) -->/u;
|
|
3895
|
+
var schema = external_exports.object({ labels: external_exports.array(external_exports.string()) });
|
|
3896
|
+
function is_pending(body) {
|
|
3897
|
+
return body?.includes(PREFIX6) === true;
|
|
3898
|
+
}
|
|
3899
|
+
function prepare(body, labels) {
|
|
3900
|
+
if (is_pending(body)) throw new Error("Issue already contains a publication record");
|
|
3901
|
+
return `${body}
|
|
3902
|
+
|
|
3903
|
+
${PREFIX6}${JSON.stringify({ labels })} -->
|
|
3904
|
+
`;
|
|
3905
|
+
}
|
|
3906
|
+
function public_body(body) {
|
|
3907
|
+
return body.replace(PATTERN, "").trimEnd();
|
|
3908
|
+
}
|
|
3909
|
+
function intended_labels(body = "") {
|
|
3910
|
+
const record7 = PATTERN.exec(body)?.groups?.["record"];
|
|
3911
|
+
return schema.parse(JSON.parse(record7 ?? "null")).labels;
|
|
3912
|
+
}
|
|
3913
|
+
function labels_of(body, current2) {
|
|
3914
|
+
const intended = intended_labels(body);
|
|
3915
|
+
const labels = current2.filter((label2) => !has_label_name([label2], AUTO_OK_LABEL));
|
|
3916
|
+
const decision = issue_auto_ok.decide({
|
|
3917
|
+
is_opted_out: !has_label_name(intended, AUTO_OK_LABEL),
|
|
3918
|
+
is_cross_repository: false,
|
|
3919
|
+
body: public_body(body ?? ""),
|
|
3920
|
+
labels
|
|
3921
|
+
});
|
|
3922
|
+
return decision.is_applied ? [...labels, AUTO_OK_LABEL] : labels;
|
|
3923
|
+
}
|
|
3924
|
+
function creation(body, labels, is_prepared) {
|
|
3925
|
+
if (!is_prepared) return { body, labels };
|
|
3926
|
+
return {
|
|
3927
|
+
body: prepare(body, labels),
|
|
3928
|
+
labels: labels.filter((label2) => !has_label_name([label2], AUTO_OK_LABEL))
|
|
3929
|
+
};
|
|
3930
|
+
}
|
|
3931
|
+
var issue_publication_state = { is_pending, prepare, public_body, labels_of, creation };
|
|
3932
|
+
|
|
3672
3933
|
// scripts/git/git-closes-keyword.ts
|
|
3673
3934
|
var CLOSES_PATTERN = /closes\s+#(\d+)/iu;
|
|
3674
3935
|
function parse_closes_issue_number(body) {
|
|
@@ -3748,6 +4009,55 @@ var issue_closing_pr = {
|
|
|
3748
4009
|
read_closing_pr
|
|
3749
4010
|
};
|
|
3750
4011
|
|
|
4012
|
+
// scripts/issue/issue-observation-prime.ts
|
|
4013
|
+
var comment_schema = external_exports.object({
|
|
4014
|
+
...gh_author_association.author_fields_schema,
|
|
4015
|
+
body: external_exports.string(),
|
|
4016
|
+
html_url: external_exports.string()
|
|
4017
|
+
});
|
|
4018
|
+
async function read_ledger() {
|
|
4019
|
+
const path12 = await lane_ledger.target();
|
|
4020
|
+
return path12 === void 0 ? [] : lane_ledger.read_entries(path12);
|
|
4021
|
+
}
|
|
4022
|
+
async function read4(source) {
|
|
4023
|
+
const path12 = `${git_gh_api_path.issues_api_path(source.repo)}/comments/${source.comment}`;
|
|
4024
|
+
const raw = await git_gh_exec.exec_gh_api({ path: path12 });
|
|
4025
|
+
const comment = parse_json.parse_json_object_or_undefined(raw, comment_schema);
|
|
4026
|
+
if (comment?.html_url !== source.url) return void 0;
|
|
4027
|
+
const author = { ...gh_author_association.author_of(comment), repo: source.repo };
|
|
4028
|
+
return await gh_author_association.is_trusted(author) ? comment.body : void 0;
|
|
4029
|
+
}
|
|
4030
|
+
async function remember(source, read_source2) {
|
|
4031
|
+
try {
|
|
4032
|
+
issue_observation_gate.record(source.url, await read_source2(source));
|
|
4033
|
+
} catch {
|
|
4034
|
+
issue_observation_gate.record(source.url, void 0);
|
|
4035
|
+
}
|
|
4036
|
+
}
|
|
4037
|
+
async function sample2(sources2, read_entries2) {
|
|
4038
|
+
if (sources2.every((source) => source.ledger === void 0)) return;
|
|
4039
|
+
let entries = [];
|
|
4040
|
+
try {
|
|
4041
|
+
entries = await read_entries2();
|
|
4042
|
+
} catch {
|
|
4043
|
+
}
|
|
4044
|
+
issue_observation_gate.record_sample(
|
|
4045
|
+
lane_early_push_count.MULTI_SLOT_EARLY_PUSH,
|
|
4046
|
+
lane_early_push_count.multi_slot_pushed(entries)
|
|
4047
|
+
);
|
|
4048
|
+
}
|
|
4049
|
+
async function prime(bodies, read_source2 = read4, read_entries2 = read_ledger) {
|
|
4050
|
+
const sources2 = issue_observation_gate.sources(bodies);
|
|
4051
|
+
const unique2 = new Map(sources2.map((source) => [source.url, source]));
|
|
4052
|
+
await Promise.all([
|
|
4053
|
+
sample2(sources2, read_entries2),
|
|
4054
|
+
...[...unique2.values()].map(async (source) => {
|
|
4055
|
+
await remember(source, read_source2);
|
|
4056
|
+
})
|
|
4057
|
+
]);
|
|
4058
|
+
}
|
|
4059
|
+
var issue_observation_prime = { prime };
|
|
4060
|
+
|
|
3751
4061
|
// scripts/issue/issue-sample-prime.ts
|
|
3752
4062
|
async function read_as_issue(pr) {
|
|
3753
4063
|
const json = await git_gh_exec.exec_gh_api({ path: git_gh_api_path.issue_api_path(String(pr)) });
|
|
@@ -3781,32 +4091,33 @@ var DEFAULT_PORTS = {
|
|
|
3781
4091
|
closing: read_closing_source,
|
|
3782
4092
|
ledger_path: lane_ledger.target
|
|
3783
4093
|
};
|
|
3784
|
-
function merges_of(
|
|
4094
|
+
function merges_of(path12) {
|
|
3785
4095
|
return function merges() {
|
|
3786
|
-
if (
|
|
3787
|
-
return lane_ledger.read_entries(
|
|
4096
|
+
if (path12 === void 0) return [];
|
|
4097
|
+
return lane_ledger.read_entries(path12).filter((entry) => entry.kind === lane_ledger.KIND.MERGE);
|
|
3788
4098
|
};
|
|
3789
4099
|
}
|
|
3790
|
-
async function
|
|
3791
|
-
const
|
|
4100
|
+
async function remember2(condition, ports) {
|
|
4101
|
+
const read11 = condition.via === "pull" ? ports.pull : ports.closing;
|
|
3792
4102
|
try {
|
|
3793
|
-
issue_sample_gate.record(condition, await
|
|
4103
|
+
issue_sample_gate.record(condition, await read11(condition.cited));
|
|
3794
4104
|
} catch {
|
|
3795
4105
|
issue_sample_gate.record(condition, void 0);
|
|
3796
4106
|
}
|
|
3797
4107
|
}
|
|
3798
|
-
async function
|
|
4108
|
+
async function prime2(bodies, ports = DEFAULT_PORTS) {
|
|
4109
|
+
await issue_observation_prime.prime(bodies);
|
|
3799
4110
|
const unread = issue_sample_gate.unread_of(bodies);
|
|
3800
4111
|
if (unread.length === 0) return;
|
|
3801
4112
|
issue_sample_gate.use_merges(merges_of(await ports.ledger_path()));
|
|
3802
4113
|
await Promise.all(
|
|
3803
4114
|
unread.map(async (condition) => {
|
|
3804
|
-
await
|
|
4115
|
+
await remember2(condition, ports);
|
|
3805
4116
|
})
|
|
3806
4117
|
);
|
|
3807
4118
|
}
|
|
3808
4119
|
var issue_sample_prime = {
|
|
3809
|
-
prime,
|
|
4120
|
+
prime: prime2,
|
|
3810
4121
|
read_closing: read_closing_source,
|
|
3811
4122
|
read_source
|
|
3812
4123
|
};
|
|
@@ -3857,12 +4168,12 @@ function parse_options(argv2, usage = USAGE) {
|
|
|
3857
4168
|
return exclude.length === 0 ? {} : { exclude };
|
|
3858
4169
|
}
|
|
3859
4170
|
function parse_listing(raw, is_capped) {
|
|
3860
|
-
const
|
|
3861
|
-
if (
|
|
4171
|
+
const read11 = read_json_listing(raw, open_issue_schema);
|
|
4172
|
+
if (read11.kind !== "read") return { kind: read11.kind };
|
|
3862
4173
|
return {
|
|
3863
4174
|
kind: "read",
|
|
3864
|
-
issues:
|
|
3865
|
-
cutoff: cutoff_of(
|
|
4175
|
+
issues: read11.rows,
|
|
4176
|
+
cutoff: cutoff_of(read11.rows.length, LISTING_LIMIT, is_capped)
|
|
3866
4177
|
};
|
|
3867
4178
|
}
|
|
3868
4179
|
async function reads_without_blocked_by() {
|
|
@@ -3881,11 +4192,11 @@ async function fetch_opted_in() {
|
|
|
3881
4192
|
AUTO_OK_LABEL,
|
|
3882
4193
|
LISTING_LIMIT
|
|
3883
4194
|
);
|
|
3884
|
-
const
|
|
3885
|
-
if (
|
|
3886
|
-
const issues = await auto_ok_author.with_author_trust(
|
|
4195
|
+
const read11 = json === void 0 ? await classify_failed_read() : parse_listing(json, is_capped);
|
|
4196
|
+
if (read11.kind !== "read") return read11;
|
|
4197
|
+
const issues = await auto_ok_author.with_author_trust(read11.issues);
|
|
3887
4198
|
await issue_sample_prime.prime(issues.map((issue) => issue.body));
|
|
3888
|
-
return { ...
|
|
4199
|
+
return { ...read11, issues, is_unchanged: is_unchanged2 === true };
|
|
3889
4200
|
}
|
|
3890
4201
|
function is_page_complete(blocked_by) {
|
|
3891
4202
|
const nodes = blocked_by?.nodes ?? [];
|
|
@@ -3905,8 +4216,8 @@ async function read_open_epics() {
|
|
|
3905
4216
|
return void 0;
|
|
3906
4217
|
}
|
|
3907
4218
|
}
|
|
3908
|
-
async function fetch_tracking(
|
|
3909
|
-
if (
|
|
4219
|
+
async function fetch_tracking(count2) {
|
|
4220
|
+
if (count2 === 0) return { kind: "read", index: /* @__PURE__ */ new Map(), cutoff: NO_CUTOFF };
|
|
3910
4221
|
const open_epics = await read_open_epics();
|
|
3911
4222
|
if (open_epics === void 0) return { kind: "epics_unreadable" };
|
|
3912
4223
|
return {
|
|
@@ -3916,7 +4227,7 @@ async function fetch_tracking(count) {
|
|
|
3916
4227
|
};
|
|
3917
4228
|
}
|
|
3918
4229
|
function is_ready(issue, options) {
|
|
3919
|
-
return auto_ok_author.is_author_trusted(issue) && is_unblocked(issue) && issue_not_before.is_due(issue.body, options.now ?? Date.now());
|
|
4230
|
+
return !issue_publication_state.is_pending(issue.body) && auto_ok_author.is_author_trusted(issue) && is_unblocked(issue) && issue_not_before.is_due(issue.body, options.now ?? Date.now());
|
|
3920
4231
|
}
|
|
3921
4232
|
function is_runnable(issue, tracked, exclude, options = {}) {
|
|
3922
4233
|
if (tracked.has(issue.number)) return false;
|
|
@@ -3925,9 +4236,9 @@ function is_runnable(issue, tracked, exclude, options = {}) {
|
|
|
3925
4236
|
function pick_next(issues, tracked = /* @__PURE__ */ new Map(), exclude = [], options = {}) {
|
|
3926
4237
|
return git_next_issues.order(issues).find((issue) => is_runnable(issue, tracked, exclude, options));
|
|
3927
4238
|
}
|
|
3928
|
-
function none_reason(
|
|
3929
|
-
if (
|
|
3930
|
-
return `All ${String(
|
|
4239
|
+
function none_reason(count2) {
|
|
4240
|
+
if (count2 === 0) return NONE_OPTED_IN_MESSAGE;
|
|
4241
|
+
return `All ${String(count2)} open \`${AUTO_OK_LABEL}\` issue(s) are excluded \u2014 tracked by an opted-in epic, an epic itself, already in progress, parked, filed by an author without write access (waiting on a person), blocked by an open issue, not due until its start time, or the one just merged.`;
|
|
3931
4242
|
}
|
|
3932
4243
|
function truncation_note(cutoff, has_answer) {
|
|
3933
4244
|
const cause = truncated_cause(cutoff);
|
|
@@ -3954,16 +4265,16 @@ function report(context) {
|
|
|
3954
4265
|
console.info(String(next.number));
|
|
3955
4266
|
return SUCCESS_EXIT_CODE2;
|
|
3956
4267
|
}
|
|
3957
|
-
async function answer(
|
|
3958
|
-
const tracking = await fetch_tracking(
|
|
4268
|
+
async function answer(read11, exclude) {
|
|
4269
|
+
const tracking = await fetch_tracking(read11.issues.length);
|
|
3959
4270
|
if (tracking.kind !== "read") {
|
|
3960
4271
|
console.error(EPICS_UNREADABLE_MESSAGE);
|
|
3961
4272
|
return FAILURE_EXIT_CODE;
|
|
3962
4273
|
}
|
|
3963
4274
|
return report({
|
|
3964
|
-
issues:
|
|
3965
|
-
cutoff:
|
|
3966
|
-
tracked: epic_index.withheld_children(tracking.index,
|
|
4275
|
+
issues: read11.issues,
|
|
4276
|
+
cutoff: read11.cutoff,
|
|
4277
|
+
tracked: epic_index.withheld_children(tracking.index, read11.issues),
|
|
3967
4278
|
epic_cutoff: tracking.cutoff,
|
|
3968
4279
|
exclude
|
|
3969
4280
|
});
|
|
@@ -3979,12 +4290,12 @@ async function run(argv2) {
|
|
|
3979
4290
|
console.error(options.usage);
|
|
3980
4291
|
return FAILURE_EXIT_CODE;
|
|
3981
4292
|
}
|
|
3982
|
-
const
|
|
3983
|
-
if (
|
|
3984
|
-
console.error(READ_FAILURE_MESSAGES[
|
|
4293
|
+
const read11 = await fetch_opted_in();
|
|
4294
|
+
if (read11.kind !== "read") {
|
|
4295
|
+
console.error(READ_FAILURE_MESSAGES[read11.kind]);
|
|
3985
4296
|
return FAILURE_EXIT_CODE;
|
|
3986
4297
|
}
|
|
3987
|
-
return await answer(
|
|
4298
|
+
return await answer(read11, options.exclude);
|
|
3988
4299
|
}
|
|
3989
4300
|
var auto_ok_cli = {
|
|
3990
4301
|
USAGE,
|
|
@@ -4077,7 +4388,7 @@ function has_human_label(child) {
|
|
|
4077
4388
|
return has_parked_label(child.labels);
|
|
4078
4389
|
}
|
|
4079
4390
|
function is_waiting(child) {
|
|
4080
|
-
return has_label(child, IN_PROGRESS_LABEL) || !issue_not_before.is_due(child.body);
|
|
4391
|
+
return issue_publication_state.is_pending(child.body) || has_label(child, IN_PROGRESS_LABEL) || !issue_not_before.is_due(child.body);
|
|
4081
4392
|
}
|
|
4082
4393
|
function local_category(child) {
|
|
4083
4394
|
if (child.state === CLOSED3) return "done";
|
|
@@ -4151,19 +4462,19 @@ function is_ready2(node, context) {
|
|
|
4151
4462
|
return epic_graph.blockers_of(context.index, node).every((blocker) => !context.index.has(blocker) || context.memo.has(blocker));
|
|
4152
4463
|
}
|
|
4153
4464
|
function fill_memo(children, context) {
|
|
4154
|
-
const
|
|
4465
|
+
const pending2 = new Set(children.map((child) => epic_graph.key_of(child)));
|
|
4155
4466
|
function peel() {
|
|
4156
|
-
const ready = [...
|
|
4467
|
+
const ready = [...pending2].filter((node) => is_ready2(node, context));
|
|
4157
4468
|
for (const node of ready) {
|
|
4158
4469
|
const child = context.index.get(node);
|
|
4159
4470
|
if (child !== void 0) context.memo.set(node, compute_category(child, context));
|
|
4160
|
-
|
|
4471
|
+
pending2.delete(node);
|
|
4161
4472
|
}
|
|
4162
4473
|
return ready.length;
|
|
4163
4474
|
}
|
|
4164
4475
|
while (peel() > 0) {
|
|
4165
4476
|
}
|
|
4166
|
-
for (const node of
|
|
4477
|
+
for (const node of pending2) context.memo.set(node, "time");
|
|
4167
4478
|
}
|
|
4168
4479
|
function new_context(children, resolve4 = resolve_by_state, running = epic_outside_blocker.running_keys(children)) {
|
|
4169
4480
|
return {
|
|
@@ -4505,8 +4816,8 @@ async function read_each(issue_numbers, reader) {
|
|
|
4505
4816
|
);
|
|
4506
4817
|
return await Promise.all(
|
|
4507
4818
|
issue_numbers.map(async (issue_number) => {
|
|
4508
|
-
const
|
|
4509
|
-
const value =
|
|
4819
|
+
const read11 = reads.get(issue_number);
|
|
4820
|
+
const value = read11?.kind === "read" ? reader.from_json(read11.json) : await reader.read_rest(issue_number);
|
|
4510
4821
|
return [issue_number, value];
|
|
4511
4822
|
})
|
|
4512
4823
|
);
|
|
@@ -4637,11 +4948,11 @@ async function read_child_blockers(child, current_repo) {
|
|
|
4637
4948
|
);
|
|
4638
4949
|
}
|
|
4639
4950
|
async function fetch_epic_body(epic_number, scope) {
|
|
4640
|
-
const
|
|
4641
|
-
const body =
|
|
4951
|
+
const read11 = await git_gh_command.issue_get_body_classified(String(epic_number), scope);
|
|
4952
|
+
const body = read11.kind === "read" ? read11.text : void 0;
|
|
4642
4953
|
return {
|
|
4643
4954
|
body,
|
|
4644
|
-
body_failure:
|
|
4955
|
+
body_failure: read11.kind === "read" ? void 0 : read11,
|
|
4645
4956
|
child_numbers: epic_parse.parse_task_list_issue_numbers(body),
|
|
4646
4957
|
external: epic_parse.parse_external_task_list_children(body)
|
|
4647
4958
|
};
|
|
@@ -4661,11 +4972,11 @@ var NOT_READ = { child: void 0, is_unreachable: false };
|
|
|
4661
4972
|
async function read_rest(issue_number, scope) {
|
|
4662
4973
|
return await git_gh_command.issue_get_state_and_relations_classified(String(issue_number), scope);
|
|
4663
4974
|
}
|
|
4664
|
-
async function to_child_read(
|
|
4665
|
-
if (
|
|
4666
|
-
return { child: void 0, is_unreachable: git_gh_command.is_unreachable_read(
|
|
4975
|
+
async function to_child_read(read11, repo) {
|
|
4976
|
+
if (read11.kind !== "read") {
|
|
4977
|
+
return { child: void 0, is_unreachable: git_gh_command.is_unreachable_read(read11) };
|
|
4667
4978
|
}
|
|
4668
|
-
const parsed2 = epic_issue.parse_epic_issue(
|
|
4979
|
+
const parsed2 = epic_issue.parse_epic_issue(read11.json);
|
|
4669
4980
|
await issue_sample_prime.prime([parsed2?.body]);
|
|
4670
4981
|
return { child: parsed2 === void 0 ? void 0 : to_child(parsed2, repo), is_unreachable: false };
|
|
4671
4982
|
}
|
|
@@ -4676,22 +4987,22 @@ async function read_children(issue_numbers, repo, scope) {
|
|
|
4676
4987
|
read_rest: async (issue_number) => await read_rest(issue_number, scope)
|
|
4677
4988
|
});
|
|
4678
4989
|
const entries = await Promise.all(
|
|
4679
|
-
reads.map(async ([issue_number,
|
|
4990
|
+
reads.map(async ([issue_number, read11]) => [
|
|
4680
4991
|
issue_number,
|
|
4681
|
-
await to_child_read(
|
|
4992
|
+
await to_child_read(read11, repo)
|
|
4682
4993
|
])
|
|
4683
4994
|
);
|
|
4684
4995
|
return new Map(entries);
|
|
4685
4996
|
}
|
|
4686
4997
|
async function fetch_child(issue_number, repo, scope) {
|
|
4687
|
-
const
|
|
4688
|
-
return
|
|
4998
|
+
const read11 = await to_child_read(await read_rest(issue_number, scope), repo);
|
|
4999
|
+
return read11.child;
|
|
4689
5000
|
}
|
|
4690
5001
|
function to_children(reads) {
|
|
4691
|
-
return reads.map((
|
|
5002
|
+
return reads.map((read11) => read11.child).filter((child) => child !== void 0);
|
|
4692
5003
|
}
|
|
4693
5004
|
function count_unreachable(reads) {
|
|
4694
|
-
return reads.filter((
|
|
5005
|
+
return reads.filter((read11) => read11.is_unreachable).length;
|
|
4695
5006
|
}
|
|
4696
5007
|
function is_body_unreachable(failure) {
|
|
4697
5008
|
return failure !== void 0 && git_gh_command.is_unreachable_read(failure);
|
|
@@ -4713,7 +5024,7 @@ async function recheck_blockers(reads, child_numbers, known2, repo) {
|
|
|
4713
5024
|
const waited = epic_child_source.waited_closed(to_children(reads), known2, repo);
|
|
4714
5025
|
if (waited.size === 0) return reads;
|
|
4715
5026
|
const fresh = await read_children([...waited], repo);
|
|
4716
|
-
return reads.map((
|
|
5027
|
+
return reads.map((read11, index) => fresh.get(child_numbers[index] ?? 0) ?? read11);
|
|
4717
5028
|
}
|
|
4718
5029
|
async function fetch_children(child_numbers, repo, scope, source) {
|
|
4719
5030
|
const limited = child_numbers.slice(0, CHILD_LIMIT);
|
|
@@ -4811,8 +5122,8 @@ var epic_fetch = {
|
|
|
4811
5122
|
};
|
|
4812
5123
|
|
|
4813
5124
|
// scripts/epic/epic-report.ts
|
|
4814
|
-
function to_path_field(
|
|
4815
|
-
return
|
|
5125
|
+
function to_path_field(path12) {
|
|
5126
|
+
return path12 === void 0 ? {} : { path: path12 };
|
|
4816
5127
|
}
|
|
4817
5128
|
function bundle_by_repo(children, paths = /* @__PURE__ */ new Map()) {
|
|
4818
5129
|
const grouped2 = /* @__PURE__ */ new Map();
|
|
@@ -5004,16 +5315,16 @@ function parse_events(raw) {
|
|
|
5004
5315
|
if (events === void 0) throw new Error(UNPARSED_TIMELINE_MESSAGE);
|
|
5005
5316
|
return events;
|
|
5006
5317
|
}
|
|
5007
|
-
async function read_timeline(
|
|
5008
|
-
return parse_events(await git_gh_etag_read.read_listing(
|
|
5318
|
+
async function read_timeline(path12) {
|
|
5319
|
+
return parse_events(await git_gh_etag_read.read_listing(path12, TIMELINE_PAGE));
|
|
5009
5320
|
}
|
|
5010
5321
|
function is_in_progress_labeling(event) {
|
|
5011
5322
|
return event.event === LABELED_EVENT && event.label?.name.toLowerCase() === IN_PROGRESS_LABEL;
|
|
5012
5323
|
}
|
|
5013
5324
|
async function read_labeled_at(issue, repo) {
|
|
5014
5325
|
try {
|
|
5015
|
-
const
|
|
5016
|
-
const events = timeline_schema.parse(await read_timeline(
|
|
5326
|
+
const path12 = `${git_gh_api_path.issue_api_path(String(issue), repo)}/timeline?per_page=${String(TIMELINE_PAGE)}`;
|
|
5327
|
+
const events = timeline_schema.parse(await read_timeline(path12));
|
|
5017
5328
|
const at = events.findLast((event) => is_in_progress_labeling(event))?.created_at;
|
|
5018
5329
|
return typeof at === "string" ? { kind: "at", at } : { kind: "absent" };
|
|
5019
5330
|
} catch {
|
|
@@ -5081,7 +5392,7 @@ function reconcile(issues, lanes, room) {
|
|
|
5081
5392
|
};
|
|
5082
5393
|
return { read: holders.length > 0 ? { kind: "busy", issues: holders } : { kind: "idle" }, use };
|
|
5083
5394
|
}
|
|
5084
|
-
async function
|
|
5395
|
+
async function read5(reading2, is_this_checkout) {
|
|
5085
5396
|
if (!is_this_checkout || reading2.kind !== "busy") return { read: reading2 };
|
|
5086
5397
|
try {
|
|
5087
5398
|
const lanes = await lane_registry.list_lanes();
|
|
@@ -5091,7 +5402,7 @@ async function read4(reading2, is_this_checkout) {
|
|
|
5091
5402
|
return { read: reading2 };
|
|
5092
5403
|
}
|
|
5093
5404
|
}
|
|
5094
|
-
var epic_lane_occupancy = { read:
|
|
5405
|
+
var epic_lane_occupancy = { read: read5 };
|
|
5095
5406
|
|
|
5096
5407
|
// scripts/epic/epic-rank.ts
|
|
5097
5408
|
var CLOSED4 = "CLOSED";
|
|
@@ -5124,9 +5435,9 @@ function is_solo(child) {
|
|
|
5124
5435
|
function holder_of2(running) {
|
|
5125
5436
|
return running.find((issue) => is_solo(issue))?.number;
|
|
5126
5437
|
}
|
|
5127
|
-
function solo_holder(
|
|
5128
|
-
if (
|
|
5129
|
-
const running =
|
|
5438
|
+
function solo_holder(read11) {
|
|
5439
|
+
if (read11.kind !== "busy") return void 0;
|
|
5440
|
+
const running = read11.issues.map((issue) => ({
|
|
5130
5441
|
number: issue.number,
|
|
5131
5442
|
labels: (issue.labels ?? []).map((label2) => label2.name)
|
|
5132
5443
|
}));
|
|
@@ -5160,20 +5471,20 @@ function queue_of(children) {
|
|
|
5160
5471
|
const solo = children[index];
|
|
5161
5472
|
return solo === void 0 ? void 0 : { solo, index, behind: children.slice(index + 1) };
|
|
5162
5473
|
}
|
|
5163
|
-
function select_candidates(children,
|
|
5474
|
+
function select_candidates(children, read11, repo, occupied) {
|
|
5164
5475
|
const queue = queue_of(children);
|
|
5165
5476
|
if (queue === void 0) return first_of(children, children.length);
|
|
5166
5477
|
if (queue.index > 0) return first_of(children, queue.index);
|
|
5167
|
-
if (occupied === 0 &&
|
|
5478
|
+
if (occupied === 0 && read11.kind === "idle") return first_of(children, 1);
|
|
5168
5479
|
return none_of(children, waiting_message(queue.solo.number, repo));
|
|
5169
5480
|
}
|
|
5170
|
-
function select(children,
|
|
5171
|
-
if (
|
|
5172
|
-
return none_of(children, epic_busy.busy_reason(
|
|
5481
|
+
function select(children, read11, repo, occupied = epic_busy.occupied_lanes(read11)) {
|
|
5482
|
+
if (read11.kind === "unreadable" || read11.kind === "truncated") {
|
|
5483
|
+
return none_of(children, epic_busy.busy_reason(read11, repo, 0));
|
|
5173
5484
|
}
|
|
5174
|
-
const holder = solo_holder(
|
|
5485
|
+
const holder = solo_holder(read11);
|
|
5175
5486
|
if (holder !== void 0) return none_of(children, held_message(holder, repo));
|
|
5176
|
-
return select_candidates(children,
|
|
5487
|
+
return select_candidates(children, read11, repo, occupied);
|
|
5177
5488
|
}
|
|
5178
5489
|
function withhold(result, repo, selection) {
|
|
5179
5490
|
return {
|
|
@@ -5184,9 +5495,9 @@ function withhold(result, repo, selection) {
|
|
|
5184
5495
|
waiting: [...result.waiting, ...selection.withheld]
|
|
5185
5496
|
};
|
|
5186
5497
|
}
|
|
5187
|
-
function gate(result,
|
|
5498
|
+
function gate(result, read11, repo, selector = select) {
|
|
5188
5499
|
if (result.verdict !== "run") return { result };
|
|
5189
|
-
const selection = selector(epic_report.candidates_for_repo(result, repo),
|
|
5500
|
+
const selection = selector(epic_report.candidates_for_repo(result, repo), read11, repo);
|
|
5190
5501
|
const gated = withhold(result, repo, selection);
|
|
5191
5502
|
return selection.notice === void 0 ? { result: gated } : { result: gated, notice: selection.notice };
|
|
5192
5503
|
}
|
|
@@ -5227,11 +5538,11 @@ function stale_message(stale, repo) {
|
|
|
5227
5538
|
repo
|
|
5228
5539
|
);
|
|
5229
5540
|
}
|
|
5230
|
-
async function release(
|
|
5231
|
-
if (
|
|
5232
|
-
const stale = await find_stale(
|
|
5233
|
-
if (stale.length === 0) return { read:
|
|
5234
|
-
const holders =
|
|
5541
|
+
async function release(read11, repo) {
|
|
5542
|
+
if (read11.kind !== "busy") return { read: read11 };
|
|
5543
|
+
const stale = await find_stale(read11.issues);
|
|
5544
|
+
if (stale.length === 0) return { read: read11 };
|
|
5545
|
+
const holders = read11.issues.filter((issue) => !stale.includes(issue));
|
|
5235
5546
|
const released = holders.length > 0 ? { kind: "busy", issues: holders } : { kind: "idle" };
|
|
5236
5547
|
return { read: released, notice: stale_message(stale, repo) };
|
|
5237
5548
|
}
|
|
@@ -5279,18 +5590,18 @@ var WAIT_VERDICT = "wait";
|
|
|
5279
5590
|
var RUN_VERDICT = "run";
|
|
5280
5591
|
var NO_LANES3 = 0;
|
|
5281
5592
|
var ONE_LANE2 = 1;
|
|
5282
|
-
function is_held(
|
|
5283
|
-
return
|
|
5593
|
+
function is_held(read11) {
|
|
5594
|
+
return read11.kind === "unreadable" || read11.kind === "truncated";
|
|
5284
5595
|
}
|
|
5285
|
-
function free_lanes2(
|
|
5286
|
-
if (is_held(
|
|
5287
|
-
const holders = epic_busy.occupied_lanes(
|
|
5596
|
+
function free_lanes2(read11, limit, merge_waiting) {
|
|
5597
|
+
if (is_held(read11)) return NO_LANES3;
|
|
5598
|
+
const holders = epic_busy.occupied_lanes(read11);
|
|
5288
5599
|
return lane_capacity.free_lanes(limit, holders - merge_waiting, holders);
|
|
5289
5600
|
}
|
|
5290
|
-
async function merge_waiting_holders(
|
|
5291
|
-
if (
|
|
5601
|
+
async function merge_waiting_holders(read11, request) {
|
|
5602
|
+
if (read11.kind !== "busy" || !request.is_this_checkout) return NO_LANES3;
|
|
5292
5603
|
return await lane_snapshot_trace.count_merge_waiting(
|
|
5293
|
-
|
|
5604
|
+
read11.issues.map((issue) => String(issue.number))
|
|
5294
5605
|
);
|
|
5295
5606
|
}
|
|
5296
5607
|
async function room_in(occupancy, request) {
|
|
@@ -5309,15 +5620,15 @@ function wanted_of(request, free) {
|
|
|
5309
5620
|
function withheld_message(repo) {
|
|
5310
5621
|
return `No runnable child in ${repo}: every candidate was withheld when its blocker relations were confirmed \u2014 the reason for each is above.`;
|
|
5311
5622
|
}
|
|
5312
|
-
function offered_notice(children,
|
|
5623
|
+
function offered_notice(children, read11, request, ages) {
|
|
5313
5624
|
if (children.length === NO_LANES3) return withheld_message(request.repo);
|
|
5314
|
-
if (
|
|
5315
|
-
return epic_busy.occupancy_message(
|
|
5625
|
+
if (read11.kind !== "busy") return "";
|
|
5626
|
+
return epic_busy.occupancy_message(read11.issues, request.repo, request.limit, ages);
|
|
5316
5627
|
}
|
|
5317
|
-
async function holder_ages(
|
|
5318
|
-
if (
|
|
5628
|
+
async function holder_ages(read11, repo) {
|
|
5629
|
+
if (read11.kind !== "busy") return /* @__PURE__ */ new Map();
|
|
5319
5630
|
return await epic_label_age.read_ages(
|
|
5320
|
-
|
|
5631
|
+
read11.issues.map((issue) => issue.number),
|
|
5321
5632
|
repo,
|
|
5322
5633
|
/* @__PURE__ */ new Date()
|
|
5323
5634
|
);
|
|
@@ -5362,17 +5673,17 @@ async function collect(pools, wanted) {
|
|
|
5362
5673
|
return { children, verdict: children.length > NO_LANES3 ? RUN_VERDICT : verdict };
|
|
5363
5674
|
}
|
|
5364
5675
|
function solo_offer(answer4, occupancy, request, ages) {
|
|
5365
|
-
const { read:
|
|
5676
|
+
const { read: read11, use } = occupancy;
|
|
5366
5677
|
const { offered, notice: notice2 = "" } = epic_solo.select(
|
|
5367
5678
|
answer4.children,
|
|
5368
|
-
|
|
5679
|
+
read11,
|
|
5369
5680
|
request.repo,
|
|
5370
5681
|
use?.occupied
|
|
5371
5682
|
);
|
|
5372
5683
|
if (offered.length === NO_LANES3 && answer4.children.length > NO_LANES3) {
|
|
5373
5684
|
return { children: [], verdict: WAIT_VERDICT, notice: notice2 };
|
|
5374
5685
|
}
|
|
5375
|
-
return { ...answer4, children: offered, notice: offered_notice(offered,
|
|
5686
|
+
return { ...answer4, children: offered, notice: offered_notice(offered, read11, request, ages) };
|
|
5376
5687
|
}
|
|
5377
5688
|
function triage_offer(pools, request) {
|
|
5378
5689
|
if (!request.is_all_lanes) return void 0;
|
|
@@ -5401,9 +5712,9 @@ async function offer_after_triage(pools, request) {
|
|
|
5401
5712
|
);
|
|
5402
5713
|
if (released.notice !== void 0) console.error(released.notice);
|
|
5403
5714
|
const occupancy = await epic_lane_occupancy.read(released.read, request.is_this_checkout);
|
|
5404
|
-
const { read:
|
|
5715
|
+
const { read: read11 } = occupancy;
|
|
5405
5716
|
const free = await room_in(occupancy, request);
|
|
5406
|
-
const ages = await holder_ages(
|
|
5717
|
+
const ages = await holder_ages(read11, request.repo);
|
|
5407
5718
|
if (free === NO_LANES3) {
|
|
5408
5719
|
return {
|
|
5409
5720
|
children: [],
|
|
@@ -5594,7 +5905,7 @@ function unreadable_anomaly(snapshot2) {
|
|
|
5594
5905
|
function is_order_declared(body, links) {
|
|
5595
5906
|
return links.length > 0 || epic_parse.has_unordered_declaration(body);
|
|
5596
5907
|
}
|
|
5597
|
-
function
|
|
5908
|
+
function decide2(snapshot2, paths = /* @__PURE__ */ new Map(), running) {
|
|
5598
5909
|
const links = epic_parse.parse_dependency_links(snapshot2.body);
|
|
5599
5910
|
const unreadable = body_anomaly(snapshot2) ?? unreadable_anomaly(snapshot2);
|
|
5600
5911
|
const anomalies = unreadable === void 0 ? epic_graph.find_anomalies(
|
|
@@ -5683,16 +5994,16 @@ async function report_epics(views, options, current_repo) {
|
|
|
5683
5994
|
);
|
|
5684
5995
|
return await report2(views, request, current_repo);
|
|
5685
5996
|
}
|
|
5686
|
-
function views_of(reads, running = epic_outside_blocker.running_keys(reads.flatMap((
|
|
5997
|
+
function views_of(reads, running = epic_outside_blocker.running_keys(reads.flatMap((read11) => read11.snapshot.children))) {
|
|
5687
5998
|
const paths = repo_discovery.discover_repositories(PROJECT_ROOT);
|
|
5688
5999
|
epic_cross_repo.reset_publish_cache();
|
|
5689
6000
|
epic_classify.reset_reported();
|
|
5690
6001
|
return epic_next_views.settle_views(
|
|
5691
6002
|
running,
|
|
5692
|
-
(settled) => reads.map((
|
|
5693
|
-
...
|
|
6003
|
+
(settled) => reads.map((read11) => ({
|
|
6004
|
+
...read11,
|
|
5694
6005
|
running: settled,
|
|
5695
|
-
result:
|
|
6006
|
+
result: decide2(read11.snapshot, paths, settled)
|
|
5696
6007
|
}))
|
|
5697
6008
|
);
|
|
5698
6009
|
}
|
|
@@ -5730,7 +6041,7 @@ var epic_next = {
|
|
|
5730
6041
|
views_of,
|
|
5731
6042
|
run: run2,
|
|
5732
6043
|
run_epics,
|
|
5733
|
-
decide,
|
|
6044
|
+
decide: decide2,
|
|
5734
6045
|
report: report2
|
|
5735
6046
|
};
|
|
5736
6047
|
|
|
@@ -5801,23 +6112,23 @@ var issue_not_before_label = { change_of, sweep, sync, with_label: with_label2 }
|
|
|
5801
6112
|
|
|
5802
6113
|
// scripts/lane/lane-implement-rate-read.ts
|
|
5803
6114
|
var PERIOD_DAYS = 3;
|
|
5804
|
-
async function
|
|
5805
|
-
const
|
|
5806
|
-
return
|
|
6115
|
+
async function read_ledger2(context) {
|
|
6116
|
+
const path12 = context.ledger_path ?? await lane_ledger.target();
|
|
6117
|
+
return path12 === void 0 ? [] : lane_ledger.read_entries(path12);
|
|
5807
6118
|
}
|
|
5808
6119
|
async function implement_rate(context = {}, now_ms = Date.now()) {
|
|
5809
6120
|
const window = lane_stats.window_of(PERIOD_DAYS, now_ms);
|
|
5810
|
-
return lane_implement_rate.rate(await
|
|
6121
|
+
return lane_implement_rate.rate(await read_ledger2(context), window);
|
|
5811
6122
|
}
|
|
5812
6123
|
async function measurements(context = {}, now_ms = Date.now()) {
|
|
5813
|
-
const entries = await
|
|
6124
|
+
const entries = await read_ledger2(context);
|
|
5814
6125
|
const window = lane_stats.window_of(PERIOD_DAYS, now_ms);
|
|
5815
6126
|
return {
|
|
5816
6127
|
implement_rate: lane_implement_rate.rate(entries, window),
|
|
5817
6128
|
growth: lane_size_stats.ratios(entries, window)
|
|
5818
6129
|
};
|
|
5819
6130
|
}
|
|
5820
|
-
var lane_implement_rate_read = { PERIOD_DAYS, implement_rate, measurements, read_ledger };
|
|
6131
|
+
var lane_implement_rate_read = { PERIOD_DAYS, implement_rate, measurements, read_ledger: read_ledger2 };
|
|
5821
6132
|
|
|
5822
6133
|
// scripts/lane/lane-ledger-archive.ts
|
|
5823
6134
|
import {
|
|
@@ -5848,9 +6159,9 @@ function archive_of(ledger2) {
|
|
|
5848
6159
|
return `${ledger2.replace(LEDGER_SUFFIX_PATTERN, "")}${ARCHIVE_SUFFIX}`;
|
|
5849
6160
|
}
|
|
5850
6161
|
function is_past(line, cutoff_ms) {
|
|
5851
|
-
const
|
|
5852
|
-
if (
|
|
5853
|
-
return Date.parse(
|
|
6162
|
+
const record7 = record_schema.safeParse(json_value.parse_or_undefined(line)).data;
|
|
6163
|
+
if (record7 === void 0 || record7.kind === KIND6.MERGE) return false;
|
|
6164
|
+
return Date.parse(record7.at) < cutoff_ms;
|
|
5854
6165
|
}
|
|
5855
6166
|
function partition(text2, cutoff_ms) {
|
|
5856
6167
|
const archived = [];
|
|
@@ -5864,8 +6175,8 @@ function partition(text2, cutoff_ms) {
|
|
|
5864
6175
|
}
|
|
5865
6176
|
function bytes_past(descriptor, from) {
|
|
5866
6177
|
const buffer = Buffer.alloc(Math.max(fstatSync2(descriptor).size - from, 0));
|
|
5867
|
-
const
|
|
5868
|
-
return buffer.subarray(0,
|
|
6178
|
+
const read11 = readSync2(descriptor, buffer, 0, buffer.length, from);
|
|
6179
|
+
return buffer.subarray(0, read11);
|
|
5869
6180
|
}
|
|
5870
6181
|
function append_text(target3, text2) {
|
|
5871
6182
|
const descriptor = openSync2(target3, APPEND_FLAGS, LEDGER_FILE_MODE);
|
|
@@ -5897,9 +6208,9 @@ function move(ledger2, moved) {
|
|
|
5897
6208
|
}
|
|
5898
6209
|
}
|
|
5899
6210
|
function rotate_open(ledger2, descriptor, cutoff_ms) {
|
|
5900
|
-
const
|
|
5901
|
-
const end =
|
|
5902
|
-
const split = partition(
|
|
6211
|
+
const read11 = bytes_past(descriptor, 0);
|
|
6212
|
+
const end = read11.lastIndexOf(LINE_SEPARATOR3) + 1;
|
|
6213
|
+
const split = partition(read11.toString("utf8", 0, end), cutoff_ms);
|
|
5903
6214
|
if (split.count === 0) return 0;
|
|
5904
6215
|
const carried = move(ledger2, { ...split, descriptor, end });
|
|
5905
6216
|
const late = bytes_past(descriptor, carried);
|
|
@@ -6304,7 +6615,7 @@ function causes_cell(waits2) {
|
|
|
6304
6615
|
count: all.filter((each) => each === cause).length
|
|
6305
6616
|
}));
|
|
6306
6617
|
const ranked = counted2.toSorted((left, right) => right.count - left.count);
|
|
6307
|
-
return ranked.length === 0 ? NO_CAUSES : ranked.map(({ cause, count }) => `${cause} ${String(
|
|
6618
|
+
return ranked.length === 0 ? NO_CAUSES : ranked.map(({ cause, count: count2 }) => `${cause} ${String(count2)}`).join(", ");
|
|
6308
6619
|
}
|
|
6309
6620
|
function reason_row(reason2, waits2) {
|
|
6310
6621
|
const of_reason = waits2.filter((wait) => wait.reason === reason2);
|
|
@@ -6574,7 +6885,7 @@ var lane_net_time = {
|
|
|
6574
6885
|
};
|
|
6575
6886
|
|
|
6576
6887
|
// scripts/lane/lane-net-read.ts
|
|
6577
|
-
var { implement_rate: implement_rate2, measurements: measurements2, read_ledger:
|
|
6888
|
+
var { implement_rate: implement_rate2, measurements: measurements2, read_ledger: read_ledger3 } = lane_implement_rate_read;
|
|
6578
6889
|
async function read_events(context) {
|
|
6579
6890
|
if (context.events_path !== void 0) return run_event_stream.read_events(context.events_path);
|
|
6580
6891
|
return await run_event_stream_emit.all_events();
|
|
@@ -6594,7 +6905,7 @@ var lane_net_read = {
|
|
|
6594
6905
|
measurements: measurements2,
|
|
6595
6906
|
net_minutes_of,
|
|
6596
6907
|
read_events,
|
|
6597
|
-
read_ledger:
|
|
6908
|
+
read_ledger: read_ledger3,
|
|
6598
6909
|
read_records
|
|
6599
6910
|
};
|
|
6600
6911
|
|
|
@@ -6615,7 +6926,7 @@ var GATE_PATHS = [
|
|
|
6615
6926
|
"cspell.config"
|
|
6616
6927
|
];
|
|
6617
6928
|
function names_gate_path(body) {
|
|
6618
|
-
return GATE_PATHS.some((
|
|
6929
|
+
return GATE_PATHS.some((path12) => body.includes(path12));
|
|
6619
6930
|
}
|
|
6620
6931
|
function lane_reason(child) {
|
|
6621
6932
|
if (!has_label_name(child.labels, BUG_LABEL)) return `it carries no \`${BUG_LABEL}\` label`;
|
|
@@ -6922,6 +7233,13 @@ var FIRST_PAGE = 1;
|
|
|
6922
7233
|
var SECOND_PAGE = 2;
|
|
6923
7234
|
var SEARCH_RESULT_CEILING = 1e3;
|
|
6924
7235
|
var PAGE_CONCURRENCY = 4;
|
|
7236
|
+
var WINDOW_READ_LIMIT = 15;
|
|
7237
|
+
var MS_PER_SECOND2 = 1e3;
|
|
7238
|
+
var MS_PER_DAY4 = 864e5;
|
|
7239
|
+
var SPLIT_DIVISOR = 2;
|
|
7240
|
+
function skips_pages(first, should_split) {
|
|
7241
|
+
return should_split && first.total_count > SEARCH_RESULT_CEILING;
|
|
7242
|
+
}
|
|
6925
7243
|
var search_item_schema = external_exports.object({
|
|
6926
7244
|
number: external_exports.number().optional(),
|
|
6927
7245
|
title: external_exports.string().optional(),
|
|
@@ -6946,9 +7264,10 @@ async function read_page(query, page) {
|
|
|
6946
7264
|
const raw = await git_gh_exec.exec_gh_api({ path: search_path(query, page) });
|
|
6947
7265
|
return parse_json.parse_json_object_or_undefined(raw, search_page_schema);
|
|
6948
7266
|
}
|
|
6949
|
-
async function read_pages(query) {
|
|
7267
|
+
async function read_pages(query, should_split = false) {
|
|
6950
7268
|
const first = await read_page(query, FIRST_PAGE);
|
|
6951
7269
|
if (first === void 0) return void 0;
|
|
7270
|
+
if (skips_pages(first, should_split)) return [first];
|
|
6952
7271
|
const rest_numbers = Array.from(
|
|
6953
7272
|
{ length: Math.max(page_count(first) - FIRST_PAGE, 0) },
|
|
6954
7273
|
(_value, index) => index + SECOND_PAGE
|
|
@@ -6973,7 +7292,46 @@ function to_result(pages) {
|
|
|
6973
7292
|
const issues = pages.flatMap((page) => page.items.map((item) => to_issue(item)));
|
|
6974
7293
|
const total2 = pages[0]?.total_count ?? 0;
|
|
6975
7294
|
const is_incomplete = pages.some((page) => page.incomplete_results);
|
|
6976
|
-
|
|
7295
|
+
const numbers = issues.map((issue) => issue.number).filter((number) => number > 0);
|
|
7296
|
+
const has_duplicates = new Set(numbers).size !== numbers.length;
|
|
7297
|
+
return { issues, is_capped: is_incomplete || total2 !== issues.length || has_duplicates };
|
|
7298
|
+
}
|
|
7299
|
+
function window_query(window) {
|
|
7300
|
+
const original_start = Date.parse(window.qualifier.split(">=").at(-1) ?? "");
|
|
7301
|
+
if (window.is_open && window.start === original_start) return window.query;
|
|
7302
|
+
const start2 = new Date(window.start).toISOString().replace(".000Z", "Z");
|
|
7303
|
+
const end = new Date(window.end - MS_PER_SECOND2).toISOString().replace(".000Z", "Z");
|
|
7304
|
+
const range = window.is_open ? `>=${start2}` : `${start2}..${end}`;
|
|
7305
|
+
return window.query.replace(
|
|
7306
|
+
window.qualifier,
|
|
7307
|
+
() => `${window.qualifier.split(":", 1)[0] ?? ""}:${range}`
|
|
7308
|
+
);
|
|
7309
|
+
}
|
|
7310
|
+
function merge_windows(results, total2) {
|
|
7311
|
+
const issues = results.flatMap((result) => result.issues);
|
|
7312
|
+
const unique2 = new Map(issues.map((issue) => [issue.number, issue]));
|
|
7313
|
+
const is_capped = results.some((result) => result.is_capped) || unique2.size !== total2 || unique2.size !== issues.length;
|
|
7314
|
+
return { issues: [...unique2.values()], is_capped };
|
|
7315
|
+
}
|
|
7316
|
+
async function split_window(window, budget, total2, read11) {
|
|
7317
|
+
const middle = Math.floor((window.start + window.end) / SPLIT_DIVISOR / MS_PER_SECOND2) * MS_PER_SECOND2;
|
|
7318
|
+
const left = await read11({ ...window, end: middle, is_open: false }, budget);
|
|
7319
|
+
if (left === void 0) return void 0;
|
|
7320
|
+
const right = await read11({ ...window, start: middle }, budget);
|
|
7321
|
+
return right === void 0 ? void 0 : merge_windows([left, right], total2);
|
|
7322
|
+
}
|
|
7323
|
+
function can_split(first, window) {
|
|
7324
|
+
return !first.incomplete_results && first.total_count > SEARCH_RESULT_CEILING && window.end - window.start > MS_PER_SECOND2;
|
|
7325
|
+
}
|
|
7326
|
+
async function read_window(window, budget) {
|
|
7327
|
+
if (budget.remaining === 0) return { issues: [], is_capped: true };
|
|
7328
|
+
budget.remaining -= 1;
|
|
7329
|
+
const pages = await read_pages(window_query(window), true);
|
|
7330
|
+
if (pages === void 0) return void 0;
|
|
7331
|
+
const result = to_result(pages);
|
|
7332
|
+
const [first] = pages;
|
|
7333
|
+
if (first === void 0 || !can_split(first, window)) return result;
|
|
7334
|
+
return await split_window(window, budget, first.total_count, read_window);
|
|
6977
7335
|
}
|
|
6978
7336
|
async function search(query) {
|
|
6979
7337
|
try {
|
|
@@ -6983,7 +7341,41 @@ async function search(query) {
|
|
|
6983
7341
|
return void 0;
|
|
6984
7342
|
}
|
|
6985
7343
|
}
|
|
6986
|
-
|
|
7344
|
+
function rate_qualifier(query) {
|
|
7345
|
+
return /\b(?:created|closed):>=\d{4}-\d{2}-\d{2}\b/u.exec(query)?.[0];
|
|
7346
|
+
}
|
|
7347
|
+
async function search_complete(query, now_ms = Date.now()) {
|
|
7348
|
+
const qualifier = rate_qualifier(query);
|
|
7349
|
+
if (qualifier === void 0) return await search(query);
|
|
7350
|
+
const start2 = Date.parse(qualifier.split(">=").at(-1) ?? "");
|
|
7351
|
+
const now = (Math.floor(now_ms / MS_PER_DAY4) + 1) * MS_PER_DAY4;
|
|
7352
|
+
const end = Math.max(now, start2 + MS_PER_SECOND2);
|
|
7353
|
+
try {
|
|
7354
|
+
return await read_window(
|
|
7355
|
+
{ query, qualifier, start: start2, end, is_open: true },
|
|
7356
|
+
{ remaining: WINDOW_READ_LIMIT }
|
|
7357
|
+
);
|
|
7358
|
+
} catch {
|
|
7359
|
+
return void 0;
|
|
7360
|
+
}
|
|
7361
|
+
}
|
|
7362
|
+
var issue_search = { search, search_complete, search_path };
|
|
7363
|
+
|
|
7364
|
+
// scripts/issue/issue-search-count.ts
|
|
7365
|
+
var count_schema = external_exports.object({
|
|
7366
|
+
total_count: external_exports.number().int().nonnegative(),
|
|
7367
|
+
incomplete_results: external_exports.literal(false)
|
|
7368
|
+
});
|
|
7369
|
+
async function count(query) {
|
|
7370
|
+
const parameters = new URLSearchParams({ q: query, per_page: "1" });
|
|
7371
|
+
try {
|
|
7372
|
+
const raw = await git_gh_exec.exec_gh_api({ path: `search/issues?${parameters.toString()}` });
|
|
7373
|
+
return parse_json.parse_json_object_or_undefined(raw, count_schema)?.total_count;
|
|
7374
|
+
} catch {
|
|
7375
|
+
return void 0;
|
|
7376
|
+
}
|
|
7377
|
+
}
|
|
7378
|
+
var issue_search_count = { count };
|
|
6987
7379
|
|
|
6988
7380
|
// scripts/issue/defect-rate-cli.ts
|
|
6989
7381
|
var MS_PER_MINUTE2 = 6e4;
|
|
@@ -6999,28 +7391,31 @@ var defect_rate_schema = external_exports.object({
|
|
|
6999
7391
|
enhancements: external_exports.number(),
|
|
7000
7392
|
is_capped: external_exports.boolean()
|
|
7001
7393
|
});
|
|
7002
|
-
async function measure_uncached(repo, days, since) {
|
|
7394
|
+
async function measure_uncached(repo, days, since, now_ms) {
|
|
7003
7395
|
const [filed, completed] = await Promise.all([
|
|
7004
|
-
issue_search.
|
|
7005
|
-
|
|
7396
|
+
issue_search.search_complete(defect_rate.filed_query(repo, since), now_ms),
|
|
7397
|
+
issue_search_count.count(defect_rate.completed_query(repo, since))
|
|
7006
7398
|
]);
|
|
7007
7399
|
if (filed === void 0 || completed === void 0) return void 0;
|
|
7008
|
-
|
|
7009
|
-
return defect_rate.measure({
|
|
7400
|
+
return {
|
|
7010
7401
|
days,
|
|
7011
7402
|
since,
|
|
7012
|
-
|
|
7013
|
-
|
|
7014
|
-
is_capped
|
|
7015
|
-
}
|
|
7403
|
+
defects: filed.issues.filter((issue) => defect_rate.is_defect(issue)).length,
|
|
7404
|
+
enhancements: completed,
|
|
7405
|
+
is_capped: filed.is_capped
|
|
7406
|
+
};
|
|
7016
7407
|
}
|
|
7017
7408
|
async function measure_window(repo, days, now_ms) {
|
|
7018
7409
|
const since = defect_rate.window_start(now_ms, days);
|
|
7019
7410
|
const key2 = [repo, String(days), since].join(" ");
|
|
7020
|
-
return await
|
|
7021
|
-
|
|
7022
|
-
async () => await
|
|
7023
|
-
|
|
7411
|
+
return await run_startup.phase(
|
|
7412
|
+
"defect rate",
|
|
7413
|
+
async () => await shared_cache.remember(
|
|
7414
|
+
{ slot: RATE_CACHE, key: key2, schema: defect_rate_schema },
|
|
7415
|
+
async () => await measure_uncached(repo, days, since, now_ms),
|
|
7416
|
+
now_ms
|
|
7417
|
+
),
|
|
7418
|
+
{ edge_of: (value) => value === void 0 ? "failed" : "done" }
|
|
7024
7419
|
);
|
|
7025
7420
|
}
|
|
7026
7421
|
var defect_rate_cli = { RATE_CACHE, measure_window };
|
|
@@ -7033,7 +7428,7 @@ function above_message(measured) {
|
|
|
7033
7428
|
return `The defect rate ${defect_rate.rate_text(measured)} is above its baseline ${String(defect_rate.BASELINE_RATE)}, so among issues the ranking keys tie, defects are offered first and new mechanisms last.`;
|
|
7034
7429
|
}
|
|
7035
7430
|
function should_defer_mechanisms(measured) {
|
|
7036
|
-
if (measured === void 0) {
|
|
7431
|
+
if (measured === void 0 || measured.is_capped) {
|
|
7037
7432
|
console.error(UNMEASURED_MESSAGE);
|
|
7038
7433
|
return false;
|
|
7039
7434
|
}
|
|
@@ -7364,11 +7759,11 @@ function yielded_keys(context, directory) {
|
|
|
7364
7759
|
);
|
|
7365
7760
|
return new Set(yielded2.map(({ number }) => epic_graph.key_of({ number, repo: context.repo })));
|
|
7366
7761
|
}
|
|
7367
|
-
async function gate_scope(context,
|
|
7762
|
+
async function gate_scope(context, read11 = IDLE) {
|
|
7368
7763
|
const { issues } = context.opted_in;
|
|
7369
7764
|
const directory = process.cwd();
|
|
7370
7765
|
const declared2 = await backlog_plan_comment.declared_of(issues, directory);
|
|
7371
|
-
const holders = backlog_overlap.running_numbers(
|
|
7766
|
+
const holders = backlog_overlap.running_numbers(read11);
|
|
7372
7767
|
return {
|
|
7373
7768
|
standalone: standalone_keys2(context),
|
|
7374
7769
|
declared: lane_plan.with_holder_plans(declared2, holders, directory),
|
|
@@ -7651,8 +8046,8 @@ function shorten(text2) {
|
|
|
7651
8046
|
function to_hit(output_line) {
|
|
7652
8047
|
const groups = GREP_LINE.exec(output_line)?.groups;
|
|
7653
8048
|
if (groups === void 0) return void 0;
|
|
7654
|
-
const { path:
|
|
7655
|
-
return { path:
|
|
8049
|
+
const { path: path12, line, text: text2 } = groups;
|
|
8050
|
+
return { path: path12, line, excerpt: shorten(text2) };
|
|
7656
8051
|
}
|
|
7657
8052
|
function parse3(stdout) {
|
|
7658
8053
|
const hits = stdout.split("\n").map((line) => to_hit(line));
|
|
@@ -7738,8 +8133,8 @@ async function grep(target3) {
|
|
|
7738
8133
|
async function find_files(target3) {
|
|
7739
8134
|
try {
|
|
7740
8135
|
const stdout = await git_spawn.read(["ls-files", "--", `${FILE_PATHSPEC}${target3}`]);
|
|
7741
|
-
const paths = stdout.split("\n").filter((
|
|
7742
|
-
return paths.slice(0, MAX_FILES_PER_TARGET).map((
|
|
8136
|
+
const paths = stdout.split("\n").filter((path12) => path12 !== "");
|
|
8137
|
+
return paths.slice(0, MAX_FILES_PER_TARGET).map((path12) => ({ path: path12, ...FILE_HIT }));
|
|
7743
8138
|
} catch {
|
|
7744
8139
|
return [];
|
|
7745
8140
|
}
|
|
@@ -8163,22 +8558,22 @@ function offer_order(result, repo, yielded2 = /* @__PURE__ */ new Set()) {
|
|
|
8163
8558
|
}
|
|
8164
8559
|
function select2(input2) {
|
|
8165
8560
|
const ranked = yielded_first(rank3(input2.candidates, input2.pool), input2.yielded ?? /* @__PURE__ */ new Set());
|
|
8166
|
-
const { read:
|
|
8167
|
-
const gated = epic_solo.select(ranked,
|
|
8561
|
+
const { read: read11, repo, lanes } = input2;
|
|
8562
|
+
const gated = epic_solo.select(ranked, read11, repo);
|
|
8168
8563
|
const separated = backlog_overlap.separate(gated, input2.declared ?? /* @__PURE__ */ new Map(), {
|
|
8169
|
-
read:
|
|
8564
|
+
read: read11,
|
|
8170
8565
|
repo,
|
|
8171
8566
|
lanes
|
|
8172
8567
|
});
|
|
8173
8568
|
return cap(separated, input2.standalone, input2.limit ?? git_next_issues.DISPLAY_LIMIT);
|
|
8174
8569
|
}
|
|
8175
|
-
function gate2(result,
|
|
8570
|
+
function gate2(result, read11, repo, scope) {
|
|
8176
8571
|
const pool = everything_in(result);
|
|
8177
8572
|
return epic_solo.gate(
|
|
8178
8573
|
result,
|
|
8179
|
-
|
|
8574
|
+
read11,
|
|
8180
8575
|
repo,
|
|
8181
|
-
(candidates) => select2({ candidates, pool, read:
|
|
8576
|
+
(candidates) => select2({ candidates, pool, read: read11, repo, ...scope })
|
|
8182
8577
|
);
|
|
8183
8578
|
}
|
|
8184
8579
|
var backlog_rank = { everything_in, gate: gate2, offer_order, rank_result, select: select2 };
|
|
@@ -8307,24 +8702,24 @@ function references_in(text2, repo, section) {
|
|
|
8307
8702
|
return parse_references3(text2, repo).map((number) => ({ number, section }));
|
|
8308
8703
|
}
|
|
8309
8704
|
function signal_references(body, repo = "") {
|
|
8310
|
-
const
|
|
8705
|
+
const read11 = [
|
|
8311
8706
|
...references_in(acceptance_section(body), repo, "acceptance criteria"),
|
|
8312
8707
|
...references_in(parent_references(body), repo, "parent line")
|
|
8313
8708
|
];
|
|
8314
|
-
return
|
|
8315
|
-
return
|
|
8709
|
+
return read11.filter((reference, index) => {
|
|
8710
|
+
return read11.findIndex((other) => other.number === reference.number) === index;
|
|
8316
8711
|
});
|
|
8317
8712
|
}
|
|
8318
8713
|
function collect_blockers(index, node) {
|
|
8319
8714
|
const seen = /* @__PURE__ */ new Set();
|
|
8320
|
-
const
|
|
8321
|
-
while (
|
|
8322
|
-
const current2 =
|
|
8715
|
+
const pending2 = [...epic_graph.blockers_of(index, node)];
|
|
8716
|
+
while (pending2.length > 0) {
|
|
8717
|
+
const current2 = pending2.pop() ?? node;
|
|
8323
8718
|
if (seen.has(current2)) {
|
|
8324
8719
|
continue;
|
|
8325
8720
|
}
|
|
8326
8721
|
seen.add(current2);
|
|
8327
|
-
|
|
8722
|
+
pending2.push(...epic_graph.blockers_of(index, current2));
|
|
8328
8723
|
}
|
|
8329
8724
|
return seen;
|
|
8330
8725
|
}
|
|
@@ -8345,10 +8740,10 @@ var epic_audit_logic = {
|
|
|
8345
8740
|
};
|
|
8346
8741
|
|
|
8347
8742
|
// scripts/run/pause/run-pause-comment.ts
|
|
8348
|
-
var
|
|
8743
|
+
var comment_schema2 = external_exports.object({ body: external_exports.string().nullish() });
|
|
8349
8744
|
async function has_comment(request) {
|
|
8350
8745
|
const json = await git_gh_issue_read.issue_list_comments(request.issue);
|
|
8351
|
-
const rows = json === void 0 ? void 0 : parse_json_array_or_undefined(json,
|
|
8746
|
+
const rows = json === void 0 ? void 0 : parse_json_array_or_undefined(json, comment_schema2);
|
|
8352
8747
|
if (rows === void 0) {
|
|
8353
8748
|
throw new Error(`the comments on ${session_cite.issue(request.issue)} could not be read`);
|
|
8354
8749
|
}
|
|
@@ -8369,11 +8764,11 @@ var OPEN_PULLS_QUERY = "/pulls?state=open&per_page=100";
|
|
|
8369
8764
|
var PULL_FILTER = '.[] | {body: (.body // "")}';
|
|
8370
8765
|
var ALIAS_PREFIX2 = "i";
|
|
8371
8766
|
var pull_schema = external_exports.object({ body: external_exports.string() });
|
|
8372
|
-
var
|
|
8767
|
+
var comment_schema3 = external_exports.looseObject({ body: external_exports.string().nullish() });
|
|
8373
8768
|
var page_info_schema = external_exports.looseObject({ hasPreviousPage: external_exports.boolean() });
|
|
8374
8769
|
var comments_schema = external_exports.looseObject({
|
|
8375
8770
|
pageInfo: page_info_schema,
|
|
8376
|
-
nodes: external_exports.array(
|
|
8771
|
+
nodes: external_exports.array(comment_schema3)
|
|
8377
8772
|
});
|
|
8378
8773
|
var issue_node_schema = external_exports.looseObject({ comments: comments_schema }).nullable();
|
|
8379
8774
|
var repository_schema2 = external_exports.record(external_exports.string(), issue_node_schema);
|
|
@@ -8461,7 +8856,7 @@ async function read_signals(result, repo) {
|
|
|
8461
8856
|
]);
|
|
8462
8857
|
return { stashed, paused, open_pr };
|
|
8463
8858
|
}
|
|
8464
|
-
async function
|
|
8859
|
+
async function read6(result, repo) {
|
|
8465
8860
|
if (result.verdict !== "run") return result;
|
|
8466
8861
|
const signals = await read_signals(result, repo);
|
|
8467
8862
|
const candidates = result.candidates.map((bundle) => ({
|
|
@@ -8470,7 +8865,7 @@ async function read5(result, repo) {
|
|
|
8470
8865
|
}));
|
|
8471
8866
|
return { ...result, candidates, waiting: enrich_children(result.waiting, repo, signals) };
|
|
8472
8867
|
}
|
|
8473
|
-
var backlog_resumable = { read:
|
|
8868
|
+
var backlog_resumable = { read: read6 };
|
|
8474
8869
|
|
|
8475
8870
|
// scripts/backlog/backlog-next.ts
|
|
8476
8871
|
var FAILURE_EXIT_CODE3 = 1;
|
|
@@ -8522,7 +8917,7 @@ function settled_views(reads, running, context) {
|
|
|
8522
8917
|
function views_from(reads, context, untrusted) {
|
|
8523
8918
|
if (reads.length === 0) return [];
|
|
8524
8919
|
const graphs = backlog_pool.trusted_graphs(
|
|
8525
|
-
reads.map((
|
|
8920
|
+
reads.map((read11) => read11.snapshot.children),
|
|
8526
8921
|
untrusted
|
|
8527
8922
|
);
|
|
8528
8923
|
return settled_views(
|
|
@@ -8538,7 +8933,7 @@ async function resolve(context) {
|
|
|
8538
8933
|
console.error(refusal3);
|
|
8539
8934
|
return void 0;
|
|
8540
8935
|
}
|
|
8541
|
-
const children = reads.flatMap((
|
|
8936
|
+
const children = reads.flatMap((read11) => read11.snapshot.children);
|
|
8542
8937
|
const untrusted = await auto_ok_author.untrusted_child_keys(children, context.repo);
|
|
8543
8938
|
const ordered = await backlog_defect_priority.prioritize(
|
|
8544
8939
|
combine(views_from(reads, context, untrusted), context, untrusted),
|
|
@@ -8550,19 +8945,28 @@ function is_transport_failure(result) {
|
|
|
8550
8945
|
if (result.verdict !== "error") return false;
|
|
8551
8946
|
return result.anomalies.some((anomaly) => anomaly.is_unreachable === true);
|
|
8552
8947
|
}
|
|
8553
|
-
async function
|
|
8948
|
+
async function gate_ready(result, context) {
|
|
8554
8949
|
if (result.verdict !== "run") return result;
|
|
8555
8950
|
const { repo } = context;
|
|
8556
|
-
const { read:
|
|
8951
|
+
const { read: read11, notice: notice2 } = await epic_solo_stale.release(
|
|
8557
8952
|
await epic_busy.read_repository(repo),
|
|
8558
8953
|
repo
|
|
8559
8954
|
);
|
|
8560
8955
|
if (notice2 !== void 0) console.error(notice2);
|
|
8561
|
-
const scope = await backlog_gate_scope.gate_scope(context,
|
|
8562
|
-
const gated = backlog_rank.gate(result,
|
|
8956
|
+
const scope = await backlog_gate_scope.gate_scope(context, read11);
|
|
8957
|
+
const gated = backlog_rank.gate(result, read11, repo, scope);
|
|
8563
8958
|
if (gated.notice !== void 0) console.error(gated.notice);
|
|
8564
8959
|
return gated.result;
|
|
8565
8960
|
}
|
|
8961
|
+
function result_edge(value) {
|
|
8962
|
+
if (value === void 0 || value.verdict === "error") return "failed";
|
|
8963
|
+
return value.verdict === "wait" || value.verdict === "stop" ? "waiting" : "done";
|
|
8964
|
+
}
|
|
8965
|
+
async function gate_solo(result, context) {
|
|
8966
|
+
return await run_startup.phase("eligibility", async () => await gate_ready(result, context), {
|
|
8967
|
+
edge_of: result_edge
|
|
8968
|
+
});
|
|
8969
|
+
}
|
|
8566
8970
|
async function answer_held(result, context, untriaged2) {
|
|
8567
8971
|
const pre_gate = backlog_next_report.without_untriaged(result, context.repo);
|
|
8568
8972
|
const gated = await gate_solo(pre_gate, context);
|
|
@@ -8570,7 +8974,13 @@ async function answer_held(result, context, untriaged2) {
|
|
|
8570
8974
|
return await backlog_next_report.report_held(gated, context, untriaged2);
|
|
8571
8975
|
}
|
|
8572
8976
|
async function answer_pool(context) {
|
|
8573
|
-
const resolved = await
|
|
8977
|
+
const resolved = await run_startup.phase(
|
|
8978
|
+
"candidate eligibility",
|
|
8979
|
+
async () => await resolve(context),
|
|
8980
|
+
{
|
|
8981
|
+
edge_of: result_edge
|
|
8982
|
+
}
|
|
8983
|
+
);
|
|
8574
8984
|
if (resolved === void 0) return FAILURE_EXIT_CODE3;
|
|
8575
8985
|
if (is_transport_failure(resolved)) {
|
|
8576
8986
|
await backlog_next_offer.record_retry(context);
|
|
@@ -8611,7 +9021,9 @@ async function run3(argv2) {
|
|
|
8611
9021
|
console.error(options.usage);
|
|
8612
9022
|
return FAILURE_EXIT_CODE3;
|
|
8613
9023
|
}
|
|
8614
|
-
const opted_in = await auto_ok_cli.fetch_opted_in
|
|
9024
|
+
const opted_in = await run_startup.phase("candidate listing", auto_ok_cli.fetch_opted_in, {
|
|
9025
|
+
edge_of: (value) => value.kind === "read" ? "done" : "failed"
|
|
9026
|
+
});
|
|
8615
9027
|
if (opted_in.kind !== "read") {
|
|
8616
9028
|
console.error(READ_FAILURES[opted_in.kind]);
|
|
8617
9029
|
return FAILURE_EXIT_CODE3;
|
|
@@ -8646,6 +9058,13 @@ function is_kept2(result) {
|
|
|
8646
9058
|
if (result.code !== SUCCESS_EXIT_CODE5) return false;
|
|
8647
9059
|
return !result.out.split("\n").includes(backlog_next.VERDICT_TOKENS.retry);
|
|
8648
9060
|
}
|
|
9061
|
+
function edge_of(result) {
|
|
9062
|
+
const [token = ""] = result.out.split("\n", 1);
|
|
9063
|
+
const { error, retry, wait, stop, triage } = backlog_next.VERDICT_TOKENS;
|
|
9064
|
+
const is_failed = [error, retry].includes(token);
|
|
9065
|
+
if (is_failed || result.code !== SUCCESS_EXIT_CODE5) return "failed";
|
|
9066
|
+
return [wait, stop, triage].includes(token) ? "waiting" : "done";
|
|
9067
|
+
}
|
|
8649
9068
|
function replay(result, should_forward_stderr) {
|
|
8650
9069
|
if (should_forward_stderr && result.err !== void 0 && result.err !== "") {
|
|
8651
9070
|
console.error(result.err);
|
|
@@ -8662,16 +9081,23 @@ function kept_until(key2, now_ms) {
|
|
|
8662
9081
|
if (deadline !== void 0) return deadline > now_ms ? kept : void 0;
|
|
8663
9082
|
return kept;
|
|
8664
9083
|
}
|
|
8665
|
-
async function
|
|
9084
|
+
async function read7(argv2, should_forward_stderr = false, timeout_ms) {
|
|
8666
9085
|
const key2 = await stream_key(argv2);
|
|
8667
9086
|
const now_ms = Date.now();
|
|
8668
9087
|
const kept = kept_until(key2, now_ms);
|
|
8669
9088
|
if (kept !== void 0) return replay(kept, should_forward_stderr);
|
|
8670
|
-
const result = await
|
|
9089
|
+
const result = await run_startup.phase(
|
|
9090
|
+
"candidate cache fill",
|
|
9091
|
+
async () => {
|
|
9092
|
+
run_startup.metric("cache", "fill", `${NEXT_CACHE.prefix}:${key2}`);
|
|
9093
|
+
return await josh_command.josh_run(argv2, should_forward_stderr, timeout_ms);
|
|
9094
|
+
},
|
|
9095
|
+
{ edge_of }
|
|
9096
|
+
);
|
|
8671
9097
|
if (is_kept2(result)) shared_cache.write(NEXT_CACHE, key2, result, now_ms);
|
|
8672
9098
|
return result;
|
|
8673
9099
|
}
|
|
8674
|
-
var backlog_next_shared = { NEXT_CACHE, read:
|
|
9100
|
+
var backlog_next_shared = { NEXT_CACHE, edge_of, read: read7, stream_key };
|
|
8675
9101
|
|
|
8676
9102
|
// scripts/backlog/backlog-hold-codes.ts
|
|
8677
9103
|
var OFFER_PREFIX = "offer";
|
|
@@ -8680,17 +9106,22 @@ var REASON_SEPARATOR = ":";
|
|
|
8680
9106
|
var USAGE_LIMIT_REASON = "usage-limit";
|
|
8681
9107
|
var MEMORY_REASON = "memory";
|
|
8682
9108
|
var DRIVERLESS_PREFIX = "driverless:";
|
|
9109
|
+
var WATCH_VERDICT = "watch";
|
|
9110
|
+
var DRAINED_REASON = "drained";
|
|
8683
9111
|
var backlog_hold_codes = {
|
|
9112
|
+
DRAINED_REASON,
|
|
8684
9113
|
DRIVERLESS_PREFIX,
|
|
8685
9114
|
HAND_BACK_PREFIX,
|
|
8686
9115
|
MEMORY_REASON,
|
|
8687
9116
|
OFFER_PREFIX,
|
|
8688
9117
|
REASON_SEPARATOR,
|
|
8689
|
-
USAGE_LIMIT_REASON
|
|
9118
|
+
USAGE_LIMIT_REASON,
|
|
9119
|
+
WATCH_VERDICT
|
|
8690
9120
|
};
|
|
8691
9121
|
|
|
8692
9122
|
// scripts/backlog/backlog-hold-text.ts
|
|
8693
9123
|
var {
|
|
9124
|
+
DRAINED_REASON: DRAINED_REASON2,
|
|
8694
9125
|
DRIVERLESS_PREFIX: DRIVERLESS_PREFIX2,
|
|
8695
9126
|
HAND_BACK_PREFIX: HAND_BACK_PREFIX2,
|
|
8696
9127
|
MEMORY_REASON: MEMORY_REASON2,
|
|
@@ -8706,8 +9137,10 @@ var HAND_BACK_TEXT = /* @__PURE__ */ new Map([
|
|
|
8706
9137
|
["merge", "the driver paused after a merge; the session restarts it"],
|
|
8707
9138
|
["launch", "a lane launch failed; the session restarts the driver"],
|
|
8708
9139
|
["offer", "the backlog offer failed; the session restarts the driver"],
|
|
8709
|
-
["window", "the run's time window closed; the session restarts the driver"]
|
|
9140
|
+
["window", "the run's time window closed; the session restarts the driver"],
|
|
9141
|
+
[DRAINED_REASON2, "the backlog had nothing to start; the session restarts the driver"]
|
|
8710
9142
|
]);
|
|
9143
|
+
var PERSON_HAND_BACKS = /* @__PURE__ */ new Set(["judge", "triage"]);
|
|
8711
9144
|
var OFFER_TEXT = /* @__PURE__ */ new Map([
|
|
8712
9145
|
["solo", "a run:solo issue must finish first"],
|
|
8713
9146
|
["blocked", "every queued issue is blocked"],
|
|
@@ -8758,7 +9191,12 @@ function text_of2(code) {
|
|
|
8758
9191
|
}
|
|
8759
9192
|
return prefixed_text(code) ?? whole_text(code) ?? code;
|
|
8760
9193
|
}
|
|
8761
|
-
|
|
9194
|
+
function is_driver_restart(code) {
|
|
9195
|
+
const own = code.startsWith(DRIVERLESS_PREFIX2) ? code.slice(DRIVERLESS_PREFIX2.length) : code;
|
|
9196
|
+
const reason2 = rest_after(own, HAND_BACK_PREFIX2);
|
|
9197
|
+
return reason2 !== void 0 && !PERSON_HAND_BACKS.has(reason2);
|
|
9198
|
+
}
|
|
9199
|
+
var backlog_hold_text = { is_driver_restart, text_of: text_of2 };
|
|
8762
9200
|
|
|
8763
9201
|
// scripts/backlog/backlog-stalled.ts
|
|
8764
9202
|
var STALL_THRESHOLD_MINUTES = 10;
|
|
@@ -8849,8 +9287,8 @@ async function count_in2(room) {
|
|
|
8849
9287
|
return { limit: limit.limit, free: free_of(limit.limit, room.use) };
|
|
8850
9288
|
}
|
|
8851
9289
|
async function free_lanes_beside(lanes) {
|
|
8852
|
-
const
|
|
8853
|
-
return
|
|
9290
|
+
const count2 = await count_in2(await lane_room2(lanes));
|
|
9291
|
+
return count2?.free;
|
|
8854
9292
|
}
|
|
8855
9293
|
async function free_under(limit) {
|
|
8856
9294
|
return free_of(limit, await lane_use());
|
|
@@ -8958,8 +9396,8 @@ async function real_emit_stall(text2) {
|
|
|
8958
9396
|
return await run_event_stream_emit.emit_once_since(STALL, text2, CHILD_LAUNCH);
|
|
8959
9397
|
}
|
|
8960
9398
|
async function read_real_ledger() {
|
|
8961
|
-
const
|
|
8962
|
-
return
|
|
9399
|
+
const path12 = await lane_ledger.target();
|
|
9400
|
+
return path12 === void 0 ? [] : lane_ledger.read_entries(path12);
|
|
8963
9401
|
}
|
|
8964
9402
|
async function real_mark_offerable(is_offerable) {
|
|
8965
9403
|
await lane_ledger_write.record_offerable(is_offerable);
|
|
@@ -9404,10 +9842,10 @@ function read_chunk(source, buffer) {
|
|
|
9404
9842
|
function read_all(source = DESCRIPTOR_SOURCE) {
|
|
9405
9843
|
const buffer = new Uint8Array(CHUNK_BYTES);
|
|
9406
9844
|
const chunks = [];
|
|
9407
|
-
let
|
|
9408
|
-
while (
|
|
9409
|
-
if (
|
|
9410
|
-
|
|
9845
|
+
let count2 = read_chunk(source, buffer);
|
|
9846
|
+
while (count2 !== 0) {
|
|
9847
|
+
if (count2 !== void 0) chunks.push(Buffer.from(buffer.subarray(0, count2)));
|
|
9848
|
+
count2 = read_chunk(source, buffer);
|
|
9411
9849
|
}
|
|
9412
9850
|
return Buffer.concat(chunks).toString("utf8");
|
|
9413
9851
|
}
|
|
@@ -9612,9 +10050,9 @@ async function run_cli() {
|
|
|
9612
10050
|
var telegram_test = { fetch_repo_name, fetch_issue_title, resolve_context, run_cli, send_values };
|
|
9613
10051
|
|
|
9614
10052
|
// scripts/run/run-cli-fault.ts
|
|
9615
|
-
async function directory_of2(where,
|
|
10053
|
+
async function directory_of2(where, read11) {
|
|
9616
10054
|
try {
|
|
9617
|
-
return await
|
|
10055
|
+
return await read11();
|
|
9618
10056
|
} catch (error) {
|
|
9619
10057
|
error_text.trace_swallowed(where, error);
|
|
9620
10058
|
return void 0;
|
|
@@ -9629,21 +10067,24 @@ var run_cli_fault = { directory_of: directory_of2, message: message2 };
|
|
|
9629
10067
|
var MARKED = "marked";
|
|
9630
10068
|
var FOREIGN = "foreign";
|
|
9631
10069
|
var UNREADABLE2 = "unreadable";
|
|
9632
|
-
function hold_of(
|
|
9633
|
-
return
|
|
10070
|
+
function hold_of(read11) {
|
|
10071
|
+
return read11.kind === "held" || read11.kind === "stale" ? read11.hold : void 0;
|
|
9634
10072
|
}
|
|
9635
|
-
function
|
|
9636
|
-
const hold = hold_of(
|
|
9637
|
-
return
|
|
10073
|
+
function is_stop_record(read11, issue) {
|
|
10074
|
+
const hold = hold_of(read11);
|
|
10075
|
+
return hold?.issue === issue && hold.is_halfrun_stop === true;
|
|
9638
10076
|
}
|
|
9639
|
-
function
|
|
9640
|
-
|
|
10077
|
+
function is_halfrun_stop(read11, issue, is_dirty) {
|
|
10078
|
+
return is_dirty && is_stop_record(read11, issue);
|
|
10079
|
+
}
|
|
10080
|
+
function is_own_record(read11, issue) {
|
|
10081
|
+
const hold = hold_of(read11);
|
|
9641
10082
|
return hold === void 0 || hold.issue === issue || hold.issue === run_hold.UNNUMBERED_ISSUE;
|
|
9642
10083
|
}
|
|
9643
10084
|
function mark_stop_at(target3, issue, mark2 = run_hold.HALFRUN_STOP_FIELDS) {
|
|
9644
|
-
const
|
|
9645
|
-
if (
|
|
9646
|
-
if (!is_own_record(
|
|
10085
|
+
const read11 = run_hold.read_hold(target3);
|
|
10086
|
+
if (read11.kind === "unreadable") return UNREADABLE2;
|
|
10087
|
+
if (!is_own_record(read11, issue)) return FOREIGN;
|
|
9647
10088
|
run_hold.release_hold(target3);
|
|
9648
10089
|
return run_hold.create_stop_hold(target3, issue, mark2) ? MARKED : FOREIGN;
|
|
9649
10090
|
}
|
|
@@ -9651,6 +10092,27 @@ function take_over(target3, issue) {
|
|
|
9651
10092
|
run_hold.release_hold(target3);
|
|
9652
10093
|
return run_hold.create_hold(target3, issue, /* @__PURE__ */ new Date(), true);
|
|
9653
10094
|
}
|
|
10095
|
+
function reopen_at(target3, issue) {
|
|
10096
|
+
const read11 = run_hold.read_hold(target3);
|
|
10097
|
+
if (read11.kind === "unreadable") return UNREADABLE2;
|
|
10098
|
+
if (!is_stop_record(read11, issue)) return FOREIGN;
|
|
10099
|
+
run_hold.release_hold(target3);
|
|
10100
|
+
return run_hold.create_hold(target3, issue) ? MARKED : FOREIGN;
|
|
10101
|
+
}
|
|
10102
|
+
async function resume_lane(issue, command) {
|
|
10103
|
+
const lane = await lane_state.read_state(issue);
|
|
10104
|
+
if (lane?.state === "human-review") {
|
|
10105
|
+
await lane_state.record_change({ issue, state: "running", command });
|
|
10106
|
+
}
|
|
10107
|
+
}
|
|
10108
|
+
async function reopen(target3, issue) {
|
|
10109
|
+
const mark2 = reopen_at(target3, issue);
|
|
10110
|
+
if (mark2 === MARKED) await resume_lane(issue, "run:hold --halfrun-round");
|
|
10111
|
+
return mark2;
|
|
10112
|
+
}
|
|
10113
|
+
function no_stop_message(issue) {
|
|
10114
|
+
return `run:hold: this tree holds no stopped \`halfrun\` of ${session_cite.issue(issue)} \u2014 a fix round re-opens only that record.`;
|
|
10115
|
+
}
|
|
9654
10116
|
function adopt_at(target3, issue, is_dirty) {
|
|
9655
10117
|
if (!is_halfrun_stop(run_hold.read_hold(target3), issue, is_dirty)) return false;
|
|
9656
10118
|
return take_over(target3, issue);
|
|
@@ -9663,7 +10125,7 @@ async function hold_target() {
|
|
|
9663
10125
|
return void 0;
|
|
9664
10126
|
}
|
|
9665
10127
|
}
|
|
9666
|
-
async function
|
|
10128
|
+
async function is_pending2(issue) {
|
|
9667
10129
|
const target3 = await hold_target();
|
|
9668
10130
|
if (target3 === void 0) return false;
|
|
9669
10131
|
return is_halfrun_stop(run_hold.read_hold(target3), issue, await run_hold.is_tree_dirty());
|
|
@@ -9672,10 +10134,7 @@ async function adopt(issue) {
|
|
|
9672
10134
|
const target3 = await hold_target();
|
|
9673
10135
|
if (target3 === void 0) return false;
|
|
9674
10136
|
const is_adopted = adopt_at(target3, issue, await run_hold.is_tree_dirty());
|
|
9675
|
-
|
|
9676
|
-
if (lane?.state === "human-review") {
|
|
9677
|
-
await lane_state.record_change({ issue, state: "running", command: "run:entry" });
|
|
9678
|
-
}
|
|
10137
|
+
if (is_adopted) await resume_lane(issue, "run:entry");
|
|
9679
10138
|
return is_adopted;
|
|
9680
10139
|
}
|
|
9681
10140
|
var run_halfrun_resume = {
|
|
@@ -9686,8 +10145,11 @@ var run_halfrun_resume = {
|
|
|
9686
10145
|
adopt_at,
|
|
9687
10146
|
hold_of,
|
|
9688
10147
|
hold_target,
|
|
9689
|
-
is_pending,
|
|
10148
|
+
is_pending: is_pending2,
|
|
9690
10149
|
mark_stop_at,
|
|
10150
|
+
no_stop_message,
|
|
10151
|
+
reopen,
|
|
10152
|
+
reopen_at,
|
|
9691
10153
|
take_over
|
|
9692
10154
|
};
|
|
9693
10155
|
|
|
@@ -9799,12 +10261,12 @@ var PRRUN_GATE = "prrun-gate";
|
|
|
9799
10261
|
function is_untouched(facts) {
|
|
9800
10262
|
return facts.head === facts.stop_head && facts.pr_head === facts.stop_head && !facts.is_dirty;
|
|
9801
10263
|
}
|
|
9802
|
-
function
|
|
10264
|
+
function decide3(facts) {
|
|
9803
10265
|
if (facts.is_merged) return PRRUN_MERGED;
|
|
9804
10266
|
return is_untouched(facts) ? PRRUN_MERGE : PRRUN_GATE;
|
|
9805
10267
|
}
|
|
9806
|
-
function stop_head_of(
|
|
9807
|
-
const hold = run_halfrun_resume.hold_of(
|
|
10268
|
+
function stop_head_of(read11, issue) {
|
|
10269
|
+
const hold = run_halfrun_resume.hold_of(read11);
|
|
9808
10270
|
return hold?.issue === issue ? hold.prrun_stop_head : void 0;
|
|
9809
10271
|
}
|
|
9810
10272
|
async function read_merge_state() {
|
|
@@ -9828,7 +10290,7 @@ async function resume_token(issue) {
|
|
|
9828
10290
|
const target3 = await run_halfrun_resume.hold_target();
|
|
9829
10291
|
if (target3 === void 0) return void 0;
|
|
9830
10292
|
const stop_head = stop_head_of(run_hold.read_hold(target3), issue);
|
|
9831
|
-
return stop_head === void 0 ? void 0 :
|
|
10293
|
+
return stop_head === void 0 ? void 0 : decide3(await read_facts(stop_head));
|
|
9832
10294
|
}
|
|
9833
10295
|
async function adopt2(issue) {
|
|
9834
10296
|
const target3 = await run_halfrun_resume.hold_target();
|
|
@@ -9846,37 +10308,12 @@ var run_prrun_resume = {
|
|
|
9846
10308
|
PRRUN_MERGE,
|
|
9847
10309
|
PRRUN_MERGED,
|
|
9848
10310
|
adopt: adopt2,
|
|
9849
|
-
decide:
|
|
10311
|
+
decide: decide3,
|
|
9850
10312
|
mark_stop_at: mark_stop_at2,
|
|
9851
10313
|
resume_token,
|
|
9852
10314
|
stop_head_of
|
|
9853
10315
|
};
|
|
9854
10316
|
|
|
9855
|
-
// scripts/gate/input-fingerprint.ts
|
|
9856
|
-
import { readFileSync as readFileSync2 } from "node:fs";
|
|
9857
|
-
import path6 from "node:path";
|
|
9858
|
-
var ABSENT2 = "absent";
|
|
9859
|
-
function of_content(content) {
|
|
9860
|
-
return stamp_file.digest(content);
|
|
9861
|
-
}
|
|
9862
|
-
function of_entries(entries) {
|
|
9863
|
-
return of_content([...entries].toSorted((left, right) => left.localeCompare(right)).join("\n"));
|
|
9864
|
-
}
|
|
9865
|
-
function of_file(file_path) {
|
|
9866
|
-
try {
|
|
9867
|
-
return of_content(readFileSync2(file_path));
|
|
9868
|
-
} catch {
|
|
9869
|
-
return ABSENT2;
|
|
9870
|
-
}
|
|
9871
|
-
}
|
|
9872
|
-
function of_files(root, relatives) {
|
|
9873
|
-
const sorted = [...new Set(relatives)].toSorted((left, right) => left.localeCompare(right));
|
|
9874
|
-
return Object.fromEntries(
|
|
9875
|
-
sorted.map((relative) => [relative, of_file(path6.join(root, relative))])
|
|
9876
|
-
);
|
|
9877
|
-
}
|
|
9878
|
-
var input_fingerprint = { ABSENT: ABSENT2, of_entries, of_file, of_files };
|
|
9879
|
-
|
|
9880
10317
|
// scripts/review/review-tree.ts
|
|
9881
10318
|
var ABSENT_DIGEST = input_fingerprint.ABSENT;
|
|
9882
10319
|
function tree_of(root, paths) {
|
|
@@ -10019,8 +10456,8 @@ var ACCEPTANCE_MAP_HEADING = "PR \u672C\u6587\u306E\u53D7\u3051\u5165\u308C\u676
|
|
|
10019
10456
|
var REMOVED_TESTS_HEADING = "PR \u672C\u6587\u306E\u6D88\u3048\u305F\u30C6\u30B9\u30C8\u306E\u51E6\u7F6E";
|
|
10020
10457
|
var CHILD_SUMMARY_PATH = ".claude/skills/workflow-commands/backlogrun-child.md";
|
|
10021
10458
|
var CHILD_SUMMARY_HEADING = "What the summary carries, and how long it may be";
|
|
10022
|
-
function section_pointer(
|
|
10023
|
-
return `${
|
|
10459
|
+
function section_pointer(path12, heading) {
|
|
10460
|
+
return `${path12} \u2192 "${heading}" (read it: pnpm josh doc:section ${path12} '${heading}')`;
|
|
10024
10461
|
}
|
|
10025
10462
|
function pointer(heading) {
|
|
10026
10463
|
return section_pointer(REPORT_FORMAT_PATH, heading);
|
|
@@ -10236,8 +10673,8 @@ function split_text(text2, budget) {
|
|
|
10236
10673
|
}
|
|
10237
10674
|
return current2.length > 0 ? [...parts, current2] : parts;
|
|
10238
10675
|
}
|
|
10239
|
-
function part_header(relative, index,
|
|
10240
|
-
return `# ${relative} \u2014 part ${String(index + 1)} of ${String(
|
|
10676
|
+
function part_header(relative, index, count2) {
|
|
10677
|
+
return `# ${relative} \u2014 part ${String(index + 1)} of ${String(count2)}${LINE_BREAK}`;
|
|
10241
10678
|
}
|
|
10242
10679
|
function part_texts(relative, diff, cap2) {
|
|
10243
10680
|
const budget = Math.max(1, cap2 - part_header(relative, diff.length, diff.length).length);
|
|
@@ -10259,7 +10696,7 @@ function reading_block(parts, cap2) {
|
|
|
10259
10696
|
var review_diff_parts = { body_of, part_texts, reading_block, split_text };
|
|
10260
10697
|
|
|
10261
10698
|
// scripts/review/review-finding-ledger.ts
|
|
10262
|
-
var
|
|
10699
|
+
var PREFIX7 = { code: "- rf:", interaction: "- ri:" };
|
|
10263
10700
|
var FIELD_SEPARATOR3 = " | ";
|
|
10264
10701
|
var FIELD_COUNT = 5;
|
|
10265
10702
|
var DISPOSED_FIELD_COUNT = FIELD_COUNT + 1;
|
|
@@ -10309,24 +10746,24 @@ function split_disposition(positional) {
|
|
|
10309
10746
|
function issue_field(issue) {
|
|
10310
10747
|
return issue_cite.plain_for("github", issue);
|
|
10311
10748
|
}
|
|
10312
|
-
function
|
|
10313
|
-
return `${
|
|
10749
|
+
function line_of3(fields, kind) {
|
|
10750
|
+
return `${PREFIX7[kind]}${fields.join(FIELD_SEPARATOR3)}`;
|
|
10314
10751
|
}
|
|
10315
10752
|
function finding_line(finding, date, issue, kind = "code") {
|
|
10316
10753
|
const fields = [finding.category, finding.severity, finding.file, date, issue_field(issue)];
|
|
10317
|
-
return
|
|
10754
|
+
return line_of3(
|
|
10318
10755
|
finding.disposition === void 0 ? fields : [...fields, finding.disposition],
|
|
10319
10756
|
kind
|
|
10320
10757
|
);
|
|
10321
10758
|
}
|
|
10322
10759
|
function zero_round_line(date, issue, kind = "code") {
|
|
10323
|
-
return
|
|
10760
|
+
return line_of3([NONE4, NONE4, NO_FILE, date, issue_field(issue)], kind);
|
|
10324
10761
|
}
|
|
10325
10762
|
function is_finding_line(line, kind = "code") {
|
|
10326
|
-
return line.trimStart().startsWith(
|
|
10763
|
+
return line.trimStart().startsWith(PREFIX7[kind]);
|
|
10327
10764
|
}
|
|
10328
10765
|
function fields_of(line, kind = "code") {
|
|
10329
|
-
return line.trimStart().slice(
|
|
10766
|
+
return line.trimStart().slice(PREFIX7[kind].length).split(FIELD_SEPARATOR3);
|
|
10330
10767
|
}
|
|
10331
10768
|
function well_formed_fields(line, kind = "code") {
|
|
10332
10769
|
const fields = fields_of(line, kind);
|
|
@@ -10352,7 +10789,7 @@ function tally(content) {
|
|
|
10352
10789
|
return counts;
|
|
10353
10790
|
}
|
|
10354
10791
|
function category_counts(content) {
|
|
10355
|
-
return [...tally(content)].map(([category,
|
|
10792
|
+
return [...tally(content)].map(([category, count2]) => ({ category, count: count2 })).toSorted(
|
|
10356
10793
|
(left, right) => right.count - left.count || left.category.localeCompare(right.category)
|
|
10357
10794
|
);
|
|
10358
10795
|
}
|
|
@@ -10466,21 +10903,21 @@ var review_finding_text = {
|
|
|
10466
10903
|
};
|
|
10467
10904
|
|
|
10468
10905
|
// scripts/gate/verification-inputs.ts
|
|
10469
|
-
import { readFileSync as
|
|
10470
|
-
import
|
|
10906
|
+
import { readFileSync as readFileSync3 } from "node:fs";
|
|
10907
|
+
import path7 from "node:path";
|
|
10471
10908
|
|
|
10472
10909
|
// eslint/config-fingerprint.js
|
|
10473
10910
|
import { createHash as createHash2 } from "node:crypto";
|
|
10474
|
-
import { readFileSync as
|
|
10911
|
+
import { readFileSync as readFileSync2, realpathSync, statSync as statSync4 } from "node:fs";
|
|
10475
10912
|
import { createRequire as createRequire2 } from "node:module";
|
|
10476
|
-
import
|
|
10913
|
+
import path6 from "node:path";
|
|
10477
10914
|
import { fileURLToPath, pathToFileURL as pathToFileURL2 } from "node:url";
|
|
10478
10915
|
import { resolve as resolve3 } from "import-meta-resolve";
|
|
10479
10916
|
import ts from "typescript";
|
|
10480
10917
|
var HASH_ALGORITHM = "sha256";
|
|
10481
10918
|
var FINGERPRINT_LENGTH = 32;
|
|
10482
10919
|
var SETTINGS_KEY = "kit_config_fingerprint";
|
|
10483
|
-
var PRESET_DIRECTORY =
|
|
10920
|
+
var PRESET_DIRECTORY = path6.dirname(fileURLToPath(import.meta.url));
|
|
10484
10921
|
var PRESET_ENTRY = "base.js";
|
|
10485
10922
|
var MODULE_EXTENSIONS = [".js", ".mjs", ".cjs", ".ts", ".mts", ".cts"];
|
|
10486
10923
|
var CONFIG_ENTRY_NAMES = MODULE_EXTENSIONS.map((extension) => `eslint.config${extension}`);
|
|
@@ -10490,22 +10927,22 @@ function is_file(file) {
|
|
|
10490
10927
|
function module_candidates(target3) {
|
|
10491
10928
|
const typed = target3.replace(/\.([cm]?)js$/u, ".$1ts");
|
|
10492
10929
|
const bare = MODULE_EXTENSIONS.map((extension) => `${target3}${extension}`);
|
|
10493
|
-
const indexes = MODULE_EXTENSIONS.map((extension) =>
|
|
10930
|
+
const indexes = MODULE_EXTENSIONS.map((extension) => path6.join(target3, `index${extension}`));
|
|
10494
10931
|
return [target3, typed, ...bare, ...indexes];
|
|
10495
10932
|
}
|
|
10496
10933
|
function resolve_module(target3) {
|
|
10497
10934
|
return module_candidates(target3).find((candidate) => is_file(candidate));
|
|
10498
10935
|
}
|
|
10499
10936
|
function is_inside(relative_path) {
|
|
10500
|
-
return relative_path !== "" && !relative_path.startsWith("..") && !
|
|
10937
|
+
return relative_path !== "" && !relative_path.startsWith("..") && !path6.isAbsolute(relative_path);
|
|
10501
10938
|
}
|
|
10502
10939
|
function is_local_module(target3) {
|
|
10503
|
-
return
|
|
10940
|
+
return path6.isAbsolute(target3) && (!target3.split(path6.sep).includes("node_modules") || is_inside(path6.relative(PRESET_DIRECTORY, target3)));
|
|
10504
10941
|
}
|
|
10505
10942
|
function keep_path_spelling(file, target3) {
|
|
10506
|
-
const directory =
|
|
10507
|
-
const relative =
|
|
10508
|
-
return
|
|
10943
|
+
const directory = path6.dirname(file);
|
|
10944
|
+
const relative = path6.relative(realpathSync(directory), target3);
|
|
10945
|
+
return path6.resolve(directory, relative);
|
|
10509
10946
|
}
|
|
10510
10947
|
function resolve_es_module(specifier, file) {
|
|
10511
10948
|
const url = resolve3(specifier, pathToFileURL2(file).href);
|
|
@@ -10523,7 +10960,7 @@ function resolve_package_import(file, specifier, resolver) {
|
|
|
10523
10960
|
}
|
|
10524
10961
|
}
|
|
10525
10962
|
function resolve_import(file, specifier) {
|
|
10526
|
-
const relative = specifier.startsWith(".") ? [resolve_module(
|
|
10963
|
+
const relative = specifier.startsWith(".") ? [resolve_module(path6.resolve(path6.dirname(file), specifier))] : [];
|
|
10527
10964
|
return [
|
|
10528
10965
|
...relative,
|
|
10529
10966
|
...resolve_package_import(file, specifier, resolve_es_module),
|
|
@@ -10531,41 +10968,41 @@ function resolve_import(file, specifier) {
|
|
|
10531
10968
|
];
|
|
10532
10969
|
}
|
|
10533
10970
|
function list_imports(file) {
|
|
10534
|
-
const source =
|
|
10971
|
+
const source = readFileSync2(file, "utf8");
|
|
10535
10972
|
return ts.preProcessFile(source, true, true).importedFiles.flatMap((entry) => resolve_import(file, entry.fileName)).filter((resolved) => resolved !== void 0);
|
|
10536
10973
|
}
|
|
10537
|
-
function visit_module(file, reached,
|
|
10974
|
+
function visit_module(file, reached, pending2) {
|
|
10538
10975
|
if (reached.has(file) || !is_file(file)) return;
|
|
10539
10976
|
reached.add(file);
|
|
10540
|
-
|
|
10977
|
+
pending2.push(...list_imports(file));
|
|
10541
10978
|
}
|
|
10542
10979
|
function list_reachable_modules(entries) {
|
|
10543
10980
|
const reached = /* @__PURE__ */ new Set();
|
|
10544
|
-
const
|
|
10545
|
-
while (
|
|
10981
|
+
const pending2 = [...entries];
|
|
10982
|
+
while (pending2.length > 0) visit_module(pending2.pop(), reached, pending2);
|
|
10546
10983
|
return reached;
|
|
10547
10984
|
}
|
|
10548
10985
|
function list_config_entries(project_root) {
|
|
10549
|
-
return CONFIG_ENTRY_NAMES.map((name) =>
|
|
10986
|
+
return CONFIG_ENTRY_NAMES.map((name) => path6.join(project_root, name)).filter(
|
|
10550
10987
|
(file) => is_file(file)
|
|
10551
10988
|
);
|
|
10552
10989
|
}
|
|
10553
10990
|
function default_entries(directory, project_root) {
|
|
10554
10991
|
const project_entries = project_root === void 0 ? [] : list_config_entries(project_root);
|
|
10555
|
-
return [
|
|
10992
|
+
return [path6.join(directory, PRESET_ENTRY), ...project_entries];
|
|
10556
10993
|
}
|
|
10557
10994
|
function compare_source_names(left, right) {
|
|
10558
10995
|
if (left === right) return 0;
|
|
10559
10996
|
return left < right ? -1 : 1;
|
|
10560
10997
|
}
|
|
10561
10998
|
function list_config_sources(directory, entries) {
|
|
10562
|
-
return [...list_reachable_modules(entries)].map((file) =>
|
|
10999
|
+
return [...list_reachable_modules(entries)].map((file) => path6.relative(directory, file)).filter((relative_path) => is_inside(relative_path)).map((relative_path) => relative_path.split(path6.sep).join("/")).toSorted(compare_source_names);
|
|
10563
11000
|
}
|
|
10564
11001
|
function compute_config_fingerprint(directory = PRESET_DIRECTORY, entries = default_entries(directory)) {
|
|
10565
11002
|
const digest = createHash2(HASH_ALGORITHM);
|
|
10566
11003
|
for (const relative_path of list_config_sources(directory, entries)) {
|
|
10567
11004
|
digest.update(`${relative_path}\0`);
|
|
10568
|
-
digest.update(
|
|
11005
|
+
digest.update(readFileSync2(path6.join(directory, relative_path)));
|
|
10569
11006
|
digest.update("\0");
|
|
10570
11007
|
}
|
|
10571
11008
|
return digest.digest("hex").slice(0, FINGERPRINT_LENGTH);
|
|
@@ -10582,177 +11019,13 @@ var config_fingerprint = {
|
|
|
10582
11019
|
list_reachable_modules
|
|
10583
11020
|
};
|
|
10584
11021
|
|
|
10585
|
-
// scripts/lint/lint-related-scope.ts
|
|
10586
|
-
import path9 from "node:path";
|
|
10587
|
-
|
|
10588
|
-
// scripts/git/changed-file-scope.ts
|
|
10589
|
-
import path8 from "node:path";
|
|
10590
|
-
var UNREADABLE_REASON = "the changed files could not be read";
|
|
10591
|
-
var LISTED_FILE_LIMIT = 10;
|
|
10592
|
-
async function repository_root_or_cwd() {
|
|
10593
|
-
try {
|
|
10594
|
-
return await git_command.repository_root();
|
|
10595
|
-
} catch {
|
|
10596
|
-
return process.cwd();
|
|
10597
|
-
}
|
|
10598
|
-
}
|
|
10599
|
-
async function read_changed_files2(root) {
|
|
10600
|
-
try {
|
|
10601
|
-
const relative_paths = await changed_paths.read_changed_paths(false);
|
|
10602
|
-
return relative_paths.map((relative) => path8.join(root, relative));
|
|
10603
|
-
} catch {
|
|
10604
|
-
return void 0;
|
|
10605
|
-
}
|
|
10606
|
-
}
|
|
10607
|
-
function select_files(paths, inputs) {
|
|
10608
|
-
return paths.filter(
|
|
10609
|
-
(file_path) => inputs.is_selectable(file_path) && inputs.is_present(file_path)
|
|
10610
|
-
);
|
|
10611
|
-
}
|
|
10612
|
-
function all_scope(reason2) {
|
|
10613
|
-
return { mode: "all", files: [], reason: reason2 };
|
|
10614
|
-
}
|
|
10615
|
-
function resolve_scope(paths, inputs) {
|
|
10616
|
-
if (paths === void 0) return all_scope(UNREADABLE_REASON);
|
|
10617
|
-
const files = select_files(paths, inputs);
|
|
10618
|
-
if (files.length === 0) return all_scope(inputs.nothing_reason);
|
|
10619
|
-
return { mode: "related", files, reason: `${String(files.length)} changed file(s)` };
|
|
10620
|
-
}
|
|
10621
|
-
function format_file_list(files, root) {
|
|
10622
|
-
const listed = files.slice(0, LISTED_FILE_LIMIT).map((file) => ` - ${path8.relative(root, file)}`);
|
|
10623
|
-
const hidden = files.length - listed.length;
|
|
10624
|
-
if (hidden > 0) listed.push(` \u2026 and ${String(hidden)} more`);
|
|
10625
|
-
return listed.join("\n");
|
|
10626
|
-
}
|
|
10627
|
-
function describe_scope(scope, root, vocabulary) {
|
|
10628
|
-
if (scope.mode === "all") {
|
|
10629
|
-
return `${vocabulary.label}: ${scope.reason} \u2014 ${vocabulary.fallback_suffix}.`;
|
|
10630
|
-
}
|
|
10631
|
-
return `${vocabulary.label}: ${scope.reason} \u2014 ${vocabulary.narrowed_suffix}.
|
|
10632
|
-
${format_file_list(scope.files, root)}`;
|
|
10633
|
-
}
|
|
10634
|
-
var ARGV_START = 2;
|
|
10635
|
-
var FLAG_PREFIX = "-";
|
|
10636
|
-
function is_flag(argument) {
|
|
10637
|
-
return argument.startsWith(FLAG_PREFIX);
|
|
10638
|
-
}
|
|
10639
|
-
function explicit_files_of(command_arguments) {
|
|
10640
|
-
return command_arguments.filter((argument) => !is_flag(argument));
|
|
10641
|
-
}
|
|
10642
|
-
function flags_of(command_arguments) {
|
|
10643
|
-
return command_arguments.filter((argument) => is_flag(argument));
|
|
10644
|
-
}
|
|
10645
|
-
async function resolve_command_scope(request) {
|
|
10646
|
-
const explicit_files = explicit_files_of(request.command_arguments);
|
|
10647
|
-
if (explicit_files.length === 0) {
|
|
10648
|
-
return resolve_scope(await read_changed_files2(request.root), request.inputs);
|
|
10649
|
-
}
|
|
10650
|
-
return resolve_scope(
|
|
10651
|
-
explicit_files.map((file) => path8.resolve(file)),
|
|
10652
|
-
request.inputs
|
|
10653
|
-
);
|
|
10654
|
-
}
|
|
10655
|
-
function report_unusable_arguments(command_arguments, scope, label2) {
|
|
10656
|
-
const narrowed = new Set(scope.files);
|
|
10657
|
-
const unusable = explicit_files_of(command_arguments).filter(
|
|
10658
|
-
(file) => !narrowed.has(path8.resolve(file))
|
|
10659
|
-
);
|
|
10660
|
-
if (unusable.length === 0) return;
|
|
10661
|
-
process.stdout.write(`${label2}: ignored \u2014 not a file this check reads: ${unusable.join(" ")}
|
|
10662
|
-
`);
|
|
10663
|
-
}
|
|
10664
|
-
var changed_file_scope = {
|
|
10665
|
-
ARGV_START,
|
|
10666
|
-
LISTED_FILE_LIMIT,
|
|
10667
|
-
UNREADABLE_REASON,
|
|
10668
|
-
describe_scope,
|
|
10669
|
-
flags_of,
|
|
10670
|
-
format_file_list,
|
|
10671
|
-
is_flag,
|
|
10672
|
-
read_changed_files: read_changed_files2,
|
|
10673
|
-
report_unusable_arguments,
|
|
10674
|
-
repository_root_or_cwd,
|
|
10675
|
-
resolve_command_scope,
|
|
10676
|
-
resolve_scope,
|
|
10677
|
-
select_files
|
|
10678
|
-
};
|
|
10679
|
-
|
|
10680
|
-
// scripts/lint/lint-related-scope.ts
|
|
10681
|
-
var LINTABLE_EXTENSIONS = /* @__PURE__ */ new Set([
|
|
10682
|
-
".ts",
|
|
10683
|
-
".tsx",
|
|
10684
|
-
".mts",
|
|
10685
|
-
".cts",
|
|
10686
|
-
".js",
|
|
10687
|
-
".jsx",
|
|
10688
|
-
".mjs",
|
|
10689
|
-
".cjs",
|
|
10690
|
-
".svelte",
|
|
10691
|
-
".vue",
|
|
10692
|
-
".md",
|
|
10693
|
-
".mdx",
|
|
10694
|
-
".json",
|
|
10695
|
-
".jsonc",
|
|
10696
|
-
".json5",
|
|
10697
|
-
".yaml",
|
|
10698
|
-
".yml",
|
|
10699
|
-
".css",
|
|
10700
|
-
".scss",
|
|
10701
|
-
".less",
|
|
10702
|
-
".html",
|
|
10703
|
-
".graphql",
|
|
10704
|
-
".gql"
|
|
10705
|
-
]);
|
|
10706
|
-
var NOTHING_LINTABLE_REASON = "no changed file is one prettier or eslint reads";
|
|
10707
|
-
var COMMAND_NAME = "lint:related";
|
|
10708
|
-
var COMMAND_LABEL = `josh ${COMMAND_NAME}`;
|
|
10709
|
-
var VOCABULARY = {
|
|
10710
|
-
label: COMMAND_LABEL,
|
|
10711
|
-
fallback_suffix: "checking the whole tree instead",
|
|
10712
|
-
narrowed_suffix: "checking only them"
|
|
10713
|
-
};
|
|
10714
|
-
var PRETTIER_ARGS = ["exec", "prettier", "--check", "--ignore-unknown"];
|
|
10715
|
-
var ESLINT_ARGS = ["exec", "eslint"];
|
|
10716
|
-
var ESLINT_SCOPED_FLAGS = ["--no-warn-ignored"];
|
|
10717
|
-
function is_lintable(file_path) {
|
|
10718
|
-
return LINTABLE_EXTENSIONS.has(path9.extname(file_path));
|
|
10719
|
-
}
|
|
10720
|
-
function scope_inputs(is_present2) {
|
|
10721
|
-
return { is_present: is_present2, is_selectable: is_lintable, nothing_reason: NOTHING_LINTABLE_REASON };
|
|
10722
|
-
}
|
|
10723
|
-
function describe_scope2(scope, root) {
|
|
10724
|
-
return changed_file_scope.describe_scope(scope, root, VOCABULARY);
|
|
10725
|
-
}
|
|
10726
|
-
var RELATED_CACHES = {
|
|
10727
|
-
eslint_file: ESLINT_RELATED_CACHE_FILE,
|
|
10728
|
-
eslint_flags: ESLINT_RELATED_CACHE_FLAGS,
|
|
10729
|
-
prettier_flags: PRETTIER_RELATED_CACHE_FLAGS
|
|
10730
|
-
};
|
|
10731
|
-
function prettier_arguments(files, caches = RELATED_CACHES, directory = process.cwd()) {
|
|
10732
|
-
const targets = project_checks.prettier_targets(directory, files);
|
|
10733
|
-
return [...PRETTIER_ARGS, ...targets, ...caches.prettier_flags];
|
|
10734
|
-
}
|
|
10735
|
-
function eslint_arguments(files, caches = RELATED_CACHES) {
|
|
10736
|
-
return [...ESLINT_ARGS, ...files, ...caches.eslint_flags, ...ESLINT_SCOPED_FLAGS];
|
|
10737
|
-
}
|
|
10738
|
-
var lint_related_scope = {
|
|
10739
|
-
COMMAND_LABEL,
|
|
10740
|
-
NOTHING_LINTABLE_REASON,
|
|
10741
|
-
RELATED_CACHES,
|
|
10742
|
-
describe_scope: describe_scope2,
|
|
10743
|
-
eslint_arguments,
|
|
10744
|
-
is_lintable,
|
|
10745
|
-
prettier_arguments,
|
|
10746
|
-
scope_inputs
|
|
10747
|
-
};
|
|
10748
|
-
|
|
10749
11022
|
// scripts/gate/verification-inputs.ts
|
|
10750
11023
|
var GIT_IGNORE = ".gitignore";
|
|
10751
11024
|
var PRETTIER_IGNORE = ".prettierignore";
|
|
10752
11025
|
var PRETTIER_IGNORE_FILES = [GIT_IGNORE, PRETTIER_IGNORE];
|
|
10753
11026
|
var MANIFEST = "package.json";
|
|
10754
11027
|
var TOOLCHAIN_FILES = /* @__PURE__ */ new Set([
|
|
10755
|
-
...toolchain_inputs.PACKAGE_FILES.map((relative) =>
|
|
11028
|
+
...toolchain_inputs.PACKAGE_FILES.map((relative) => path7.basename(relative)),
|
|
10756
11029
|
".editorconfig",
|
|
10757
11030
|
...PRETTIER_IGNORE_FILES
|
|
10758
11031
|
]);
|
|
@@ -10777,9 +11050,9 @@ var SOURCE_EXTENSIONS = /* @__PURE__ */ new Set([
|
|
|
10777
11050
|
]);
|
|
10778
11051
|
var MARKDOWN_EXTENSION = ".md";
|
|
10779
11052
|
var COMMON_ENV = ["NODE_ENV"];
|
|
10780
|
-
var
|
|
11053
|
+
var ABSENT2 = "absent";
|
|
10781
11054
|
function is_source(relative) {
|
|
10782
|
-
return SOURCE_EXTENSIONS.has(
|
|
11055
|
+
return SOURCE_EXTENSIONS.has(path7.extname(relative));
|
|
10783
11056
|
}
|
|
10784
11057
|
async function is_lint_input(relative, is_ignored) {
|
|
10785
11058
|
if (is_source(relative)) return true;
|
|
@@ -10790,14 +11063,14 @@ async function is_source_input(relative) {
|
|
|
10790
11063
|
return is_source(relative);
|
|
10791
11064
|
}
|
|
10792
11065
|
async function is_metrics_input(relative) {
|
|
10793
|
-
return is_source(relative) ||
|
|
11066
|
+
return is_source(relative) || path7.extname(relative) === MARKDOWN_EXTENSION;
|
|
10794
11067
|
}
|
|
10795
11068
|
function configures_toolchain(relative) {
|
|
10796
|
-
const name =
|
|
11069
|
+
const name = path7.basename(relative);
|
|
10797
11070
|
return TOOLCHAIN_FILES.has(name) || name.startsWith(PRETTIER_CONFIG_PREFIX);
|
|
10798
11071
|
}
|
|
10799
11072
|
function names_any(relative, prefixes) {
|
|
10800
|
-
const name =
|
|
11073
|
+
const name = path7.basename(relative);
|
|
10801
11074
|
return configures_toolchain(relative) || prefixes.some((prefix) => name.startsWith(prefix));
|
|
10802
11075
|
}
|
|
10803
11076
|
function configures_compiler(relative) {
|
|
@@ -10809,7 +11082,7 @@ function configures_tests(relative) {
|
|
|
10809
11082
|
function read_lint_config_modules(root) {
|
|
10810
11083
|
const entries = config_fingerprint.list_config_entries(root);
|
|
10811
11084
|
const modules = [...config_fingerprint.list_reachable_modules(entries)];
|
|
10812
|
-
return new Set(modules.map((file) =>
|
|
11085
|
+
return new Set(modules.map((file) => path7.relative(root, file).split(path7.sep).join("/")));
|
|
10813
11086
|
}
|
|
10814
11087
|
var lint_config_modules_by_root = /* @__PURE__ */ new Map();
|
|
10815
11088
|
function lint_config_modules(root) {
|
|
@@ -10878,23 +11151,23 @@ function configures(label2, relatives, root = PROJECT_ROOT) {
|
|
|
10878
11151
|
function tool_version(root, tool) {
|
|
10879
11152
|
try {
|
|
10880
11153
|
const manifest = JSON.parse(
|
|
10881
|
-
|
|
11154
|
+
readFileSync3(path7.join(root, "node_modules", tool, MANIFEST), "utf8")
|
|
10882
11155
|
);
|
|
10883
|
-
return typeof manifest === "object" && manifest !== null && "version" in manifest ? String(manifest.version) :
|
|
11156
|
+
return typeof manifest === "object" && manifest !== null && "version" in manifest ? String(manifest.version) : ABSENT2;
|
|
10884
11157
|
} catch {
|
|
10885
|
-
return
|
|
11158
|
+
return ABSENT2;
|
|
10886
11159
|
}
|
|
10887
11160
|
}
|
|
10888
11161
|
function entries_of2(declaration, root, environment) {
|
|
10889
11162
|
return [
|
|
10890
11163
|
...declaration.tools.map((tool) => `tool:${tool}=${tool_version(root, tool)}`),
|
|
10891
|
-
...declaration.env.map((name) => `env:${name}=${environment[name] ??
|
|
11164
|
+
...declaration.env.map((name) => `env:${name}=${environment[name] ?? ABSENT2}`)
|
|
10892
11165
|
];
|
|
10893
11166
|
}
|
|
10894
11167
|
function fingerprint(labels, root = PROJECT_ROOT, environment = process.env) {
|
|
10895
|
-
const
|
|
11168
|
+
const declarations3 = labels.flatMap((label2) => DECLARATIONS.get(label2) ?? []);
|
|
10896
11169
|
const entries = new Set(
|
|
10897
|
-
|
|
11170
|
+
declarations3.flatMap((declaration) => entries_of2(declaration, root, environment))
|
|
10898
11171
|
);
|
|
10899
11172
|
return input_fingerprint.of_entries(entries);
|
|
10900
11173
|
}
|
|
@@ -11000,7 +11273,7 @@ var round_schema = external_exports.object({
|
|
|
11000
11273
|
function target2(root) {
|
|
11001
11274
|
return stamp_file.stamp_path("josh-review-fix-round-", root);
|
|
11002
11275
|
}
|
|
11003
|
-
function
|
|
11276
|
+
function read8(root) {
|
|
11004
11277
|
const raw = stamp_file.read_stamp_text(target2(root)) ?? "";
|
|
11005
11278
|
return round_schema.safeParse(json_value.parse_or_undefined(raw)).data;
|
|
11006
11279
|
}
|
|
@@ -11012,7 +11285,7 @@ function snapshot(round) {
|
|
|
11012
11285
|
}
|
|
11013
11286
|
}
|
|
11014
11287
|
function resume(checkout) {
|
|
11015
|
-
const round =
|
|
11288
|
+
const round = read8(checkout.root);
|
|
11016
11289
|
const stamp = round === void 0 ? void 0 : snapshot(round);
|
|
11017
11290
|
if (stamp === void 0 || !review_attest.is_briefed_since(stamp.taken_at, checkout.root)) {
|
|
11018
11291
|
return void 0;
|
|
@@ -11039,7 +11312,7 @@ function correspondence(previous, current2) {
|
|
|
11039
11312
|
(row2) => `- rx:${JSON.stringify({ round: current2.id, previous: previous?.id, ...row2, status: review_finding_ledger.is_closing(row2.disposition) ? "resolved" : row2.status })}`
|
|
11040
11313
|
);
|
|
11041
11314
|
}
|
|
11042
|
-
function
|
|
11315
|
+
function prepare2(issue, findings, root) {
|
|
11043
11316
|
const stamp = review_stamps.briefed_stamp.read();
|
|
11044
11317
|
if (stamp === void 0 || !review_attest.is_briefed_since(stamp.taken_at, root)) return void 0;
|
|
11045
11318
|
return {
|
|
@@ -11053,7 +11326,7 @@ function save(round, root) {
|
|
|
11053
11326
|
stamp_file.write_stamp(target2(root), round);
|
|
11054
11327
|
}
|
|
11055
11328
|
function lines(round, root) {
|
|
11056
|
-
return round === void 0 ? [] : correspondence(
|
|
11329
|
+
return round === void 0 ? [] : correspondence(read8(root), round);
|
|
11057
11330
|
}
|
|
11058
11331
|
function record_reasons(issue, findings) {
|
|
11059
11332
|
review_stop_log.record({
|
|
@@ -11070,8 +11343,8 @@ function record_reasons(issue, findings) {
|
|
|
11070
11343
|
var review_fix_round = {
|
|
11071
11344
|
correspondence,
|
|
11072
11345
|
lines,
|
|
11073
|
-
prepare,
|
|
11074
|
-
read:
|
|
11346
|
+
prepare: prepare2,
|
|
11347
|
+
read: read8,
|
|
11075
11348
|
record_reasons,
|
|
11076
11349
|
resume,
|
|
11077
11350
|
save,
|
|
@@ -11080,32 +11353,32 @@ var review_fix_round = {
|
|
|
11080
11353
|
|
|
11081
11354
|
// scripts/review/review-readers-scan.ts
|
|
11082
11355
|
var HUNK_HEADER = /^@@ -\d+(?:,\d+)? \+(?<start>\d+)(?:,(?<count>\d+))? @@/u;
|
|
11083
|
-
var
|
|
11356
|
+
var DECLARATION5 = /^(?:export\s+)?(?:async\s+)?(?:function\*?|const|let|class|type|interface|enum)\s+(?<name>\w+)/u;
|
|
11084
11357
|
var EXPORT_LIST = /^export\s+(?:type\s+)?\{(?<names>[^}]*)\}/gmu;
|
|
11085
11358
|
var IDENTIFIER = /^(?:type\s+)?(?<name>\w+)/u;
|
|
11086
11359
|
var DIRECT_EXPORT = /^export\s/u;
|
|
11087
11360
|
var LIST_SEPARATOR3 = ",";
|
|
11088
11361
|
var PREAMBLE = /^(?:\s*$|\s*\/[/*]|\s+\*)/u;
|
|
11089
11362
|
var TWO = 2;
|
|
11090
|
-
function to_range(start2,
|
|
11091
|
-
return Array.from({ length:
|
|
11363
|
+
function to_range(start2, count2) {
|
|
11364
|
+
return Array.from({ length: count2 }, (_unused, offset) => start2 + offset);
|
|
11092
11365
|
}
|
|
11093
11366
|
function hunk_lines(header3) {
|
|
11094
11367
|
const groups = HUNK_HEADER.exec(header3)?.groups;
|
|
11095
11368
|
if (groups === void 0) return [];
|
|
11096
11369
|
const start2 = Number(groups["start"]);
|
|
11097
|
-
const
|
|
11098
|
-
return
|
|
11370
|
+
const count2 = groups["count"] === void 0 ? 1 : Number(groups["count"]);
|
|
11371
|
+
return count2 === 0 ? [start2] : to_range(start2, count2);
|
|
11099
11372
|
}
|
|
11100
11373
|
function changed_lines(diff) {
|
|
11101
11374
|
return diff.split("\n").flatMap((line) => hunk_lines(line));
|
|
11102
11375
|
}
|
|
11103
11376
|
function to_declaration(text2, index) {
|
|
11104
|
-
const name =
|
|
11377
|
+
const name = DECLARATION5.exec(text2)?.groups?.["name"];
|
|
11105
11378
|
if (name === void 0) return void 0;
|
|
11106
11379
|
return { name, line: index + 1, is_exported: DIRECT_EXPORT.test(text2) };
|
|
11107
11380
|
}
|
|
11108
|
-
function
|
|
11381
|
+
function declarations2(source) {
|
|
11109
11382
|
const found = source.split("\n").map((text2, index) => to_declaration(text2, index));
|
|
11110
11383
|
return found.filter((entry) => entry !== void 0);
|
|
11111
11384
|
}
|
|
@@ -11141,7 +11414,7 @@ function range_end(texts, next) {
|
|
|
11141
11414
|
return end;
|
|
11142
11415
|
}
|
|
11143
11416
|
function touched(source, lines2) {
|
|
11144
|
-
const found =
|
|
11417
|
+
const found = declarations2(source);
|
|
11145
11418
|
const texts = source.split("\n");
|
|
11146
11419
|
return found.filter((declaration, index) => {
|
|
11147
11420
|
const end = range_end(texts, found[index + 1]?.line);
|
|
@@ -11169,7 +11442,7 @@ function edited(source, diff) {
|
|
|
11169
11442
|
return found_targets.filter((entry) => entry.target !== void 0);
|
|
11170
11443
|
}
|
|
11171
11444
|
function reachable_names(source) {
|
|
11172
|
-
const found =
|
|
11445
|
+
const found = declarations2(source);
|
|
11173
11446
|
const direct = found.filter((declaration) => declaration.is_exported).map((entry) => entry.name);
|
|
11174
11447
|
const exported = /* @__PURE__ */ new Set([...exported_names(source), ...direct]);
|
|
11175
11448
|
const members = [...namespaces(source, exported).values()].flat();
|
|
@@ -11178,7 +11451,7 @@ function reachable_names(source) {
|
|
|
11178
11451
|
}
|
|
11179
11452
|
var review_readers_scan = {
|
|
11180
11453
|
changed_lines,
|
|
11181
|
-
declarations,
|
|
11454
|
+
declarations: declarations2,
|
|
11182
11455
|
edited,
|
|
11183
11456
|
exported_names,
|
|
11184
11457
|
reachable_names
|
|
@@ -11186,8 +11459,8 @@ var review_readers_scan = {
|
|
|
11186
11459
|
|
|
11187
11460
|
// scripts/review/review-round-one-blobs.ts
|
|
11188
11461
|
import { existsSync as existsSync2 } from "node:fs";
|
|
11189
|
-
import
|
|
11190
|
-
var
|
|
11462
|
+
import path8 from "node:path";
|
|
11463
|
+
var ABSENT3 = review_tree.ABSENT_DIGEST;
|
|
11191
11464
|
var SUCCESS_EXIT_CODE6 = 0;
|
|
11192
11465
|
var NUL = "\0";
|
|
11193
11466
|
var NEWLINE = "\n";
|
|
@@ -11200,16 +11473,16 @@ function repository_root() {
|
|
|
11200
11473
|
return git_spawn_sync.read(["rev-parse", "--show-toplevel"]);
|
|
11201
11474
|
}
|
|
11202
11475
|
function hash_paths(root, paths, flags) {
|
|
11203
|
-
const present = paths.filter((relative) => existsSync2(
|
|
11476
|
+
const present = paths.filter((relative) => existsSync2(path8.join(root, relative)));
|
|
11204
11477
|
const output2 = present.length === 0 ? "" : git_spawn_sync.read(["hash-object", ...flags, "--", ...present], { cwd: root });
|
|
11205
11478
|
if (output2 === void 0) return void 0;
|
|
11206
11479
|
const hashes = output2.split(NEWLINE);
|
|
11207
|
-
const hashed = new Map(present.map((relative, index) => [relative, hashes[index] ??
|
|
11208
|
-
return Object.fromEntries(paths.map((relative) => [relative, hashed.get(relative) ??
|
|
11480
|
+
const hashed = new Map(present.map((relative, index) => [relative, hashes[index] ?? ABSENT3]));
|
|
11481
|
+
return Object.fromEntries(paths.map((relative) => [relative, hashed.get(relative) ?? ABSENT3]));
|
|
11209
11482
|
}
|
|
11210
11483
|
function parse_entry(entry) {
|
|
11211
11484
|
const tab = entry.indexOf(TAB);
|
|
11212
|
-
return [entry.slice(tab + 1), entry.slice(0, tab).split(SPACE)[OID_FIELD] ??
|
|
11485
|
+
return [entry.slice(tab + 1), entry.slice(0, tab).split(SPACE)[OID_FIELD] ?? ABSENT3];
|
|
11213
11486
|
}
|
|
11214
11487
|
function blobs_at(commit, paths, root) {
|
|
11215
11488
|
const result = git_spawn_sync.run(["ls-tree", "-r", "-z", commit, "--", ...paths], { cwd: root });
|
|
@@ -11219,7 +11492,7 @@ function blobs_at(commit, paths, root) {
|
|
|
11219
11492
|
);
|
|
11220
11493
|
}
|
|
11221
11494
|
function merged_blob({ base, round_one, moved }, root) {
|
|
11222
|
-
if ([base, round_one, moved].includes(
|
|
11495
|
+
if ([base, round_one, moved].includes(ABSENT3)) return void 0;
|
|
11223
11496
|
return git_spawn_sync.read(["merge-file", "--object-id", round_one, base, moved], { cwd: root });
|
|
11224
11497
|
}
|
|
11225
11498
|
function carried_blob(sides, root) {
|
|
@@ -11228,11 +11501,11 @@ function carried_blob(sides, root) {
|
|
|
11228
11501
|
return merged_blob(sides, root);
|
|
11229
11502
|
}
|
|
11230
11503
|
function sides_of(relative, readings) {
|
|
11231
|
-
const base = readings.before[relative] ??
|
|
11504
|
+
const base = readings.before[relative] ?? ABSENT3;
|
|
11232
11505
|
return {
|
|
11233
11506
|
base,
|
|
11234
11507
|
round_one: readings.blobs[relative] ?? base,
|
|
11235
|
-
moved: readings.after[relative] ??
|
|
11508
|
+
moved: readings.after[relative] ?? ABSENT3
|
|
11236
11509
|
};
|
|
11237
11510
|
}
|
|
11238
11511
|
function carried_answer(relative, readings, root) {
|
|
@@ -11287,7 +11560,7 @@ function unmoved_between(from, to, paths, root) {
|
|
|
11287
11560
|
const before = blobs_at(from, paths, root);
|
|
11288
11561
|
const after = blobs_at(to, paths, root);
|
|
11289
11562
|
if (before === void 0 || after === void 0) return void 0;
|
|
11290
|
-
return paths.filter((relative) => (before[relative] ??
|
|
11563
|
+
return paths.filter((relative) => (before[relative] ?? ABSENT3) === (after[relative] ?? ABSENT3));
|
|
11291
11564
|
}
|
|
11292
11565
|
function unmoved({ from, to, paths }) {
|
|
11293
11566
|
const root = repository_root();
|
|
@@ -11363,9 +11636,9 @@ function block2(round, paths, root) {
|
|
|
11363
11636
|
var review_fix_hunks = { block: block2, resumed_block, RESUMED_HEADING };
|
|
11364
11637
|
|
|
11365
11638
|
// scripts/review/review-code-tree.ts
|
|
11366
|
-
import { readFileSync as
|
|
11639
|
+
import { readFileSync as readFileSync4 } from "node:fs";
|
|
11367
11640
|
import { createRequire as createRequire3 } from "node:module";
|
|
11368
|
-
import
|
|
11641
|
+
import path9 from "node:path";
|
|
11369
11642
|
|
|
11370
11643
|
// scripts/review/comment-ranges.ts
|
|
11371
11644
|
var COMMENT_OPENINGS = ["//", "/*"];
|
|
@@ -11510,7 +11783,7 @@ function is_source2(relative) {
|
|
|
11510
11783
|
}
|
|
11511
11784
|
function load_typescript(root) {
|
|
11512
11785
|
try {
|
|
11513
|
-
return createRequire3(
|
|
11786
|
+
return createRequire3(path9.join(root, PACKAGE_JSON))(TYPESCRIPT_MODULE);
|
|
11514
11787
|
} catch {
|
|
11515
11788
|
return void 0;
|
|
11516
11789
|
}
|
|
@@ -11524,7 +11797,7 @@ function inert_digest(api) {
|
|
|
11524
11797
|
}
|
|
11525
11798
|
function code_digest(digest, root, relative) {
|
|
11526
11799
|
try {
|
|
11527
|
-
return digest(
|
|
11800
|
+
return digest(readFileSync4(path9.join(root, relative), "utf8"), relative);
|
|
11528
11801
|
} catch {
|
|
11529
11802
|
return void 0;
|
|
11530
11803
|
}
|
|
@@ -11549,12 +11822,12 @@ function tree_of2(root, paths, api = load_typescript(root)) {
|
|
|
11549
11822
|
if (api === void 0) return {};
|
|
11550
11823
|
return digests_of(root, paths, (text2, relative) => text_digest(api, text2, relative));
|
|
11551
11824
|
}
|
|
11552
|
-
async function
|
|
11825
|
+
async function read9(paths, root) {
|
|
11553
11826
|
return tree_of2(root ?? await git_command.repository_root(), paths);
|
|
11554
11827
|
}
|
|
11555
|
-
async function
|
|
11828
|
+
async function record4(paths, base, target3, root) {
|
|
11556
11829
|
try {
|
|
11557
|
-
review_stamps.round_one_code_stamp.write(await
|
|
11830
|
+
review_stamps.round_one_code_stamp.write(await read9(paths, root), target3, base);
|
|
11558
11831
|
} catch {
|
|
11559
11832
|
review_stamps.clear_round_one_code(target3);
|
|
11560
11833
|
}
|
|
@@ -11572,18 +11845,18 @@ async function inert_since(base, paths, root, api) {
|
|
|
11572
11845
|
if (typescript === void 0) return [];
|
|
11573
11846
|
const digest = inert_digest(typescript);
|
|
11574
11847
|
const tree = digests_of(checkout, paths, digest);
|
|
11575
|
-
const
|
|
11848
|
+
const sources2 = Object.keys(tree);
|
|
11576
11849
|
const digests = await Promise.all(
|
|
11577
|
-
|
|
11850
|
+
sources2.map(async (relative) => await base_digest(digest, base, relative))
|
|
11578
11851
|
);
|
|
11579
|
-
return
|
|
11852
|
+
return sources2.filter((relative, index) => digests[index] === tree[relative]);
|
|
11580
11853
|
}
|
|
11581
11854
|
var review_code_tree = {
|
|
11582
11855
|
comment_only,
|
|
11583
11856
|
inert_since,
|
|
11584
11857
|
load_typescript,
|
|
11585
|
-
read:
|
|
11586
|
-
record:
|
|
11858
|
+
read: read9,
|
|
11859
|
+
record: record4,
|
|
11587
11860
|
tree_of: tree_of2
|
|
11588
11861
|
};
|
|
11589
11862
|
|
|
@@ -11656,8 +11929,8 @@ var INERT_PATHS = [
|
|
|
11656
11929
|
];
|
|
11657
11930
|
var INERT_PREFIXES = [];
|
|
11658
11931
|
var INERT_SUFFIXES = [".code-workspace"];
|
|
11659
|
-
function is_inert(
|
|
11660
|
-
const normalized2 =
|
|
11932
|
+
function is_inert(path12) {
|
|
11933
|
+
const normalized2 = path12.trim();
|
|
11661
11934
|
return INERT_PATHS.includes(normalized2) || INERT_PREFIXES.some((prefix) => normalized2.startsWith(prefix)) || INERT_SUFFIXES.some((suffix) => normalized2.endsWith(suffix));
|
|
11662
11935
|
}
|
|
11663
11936
|
function is_reduced_path(relative) {
|
|
@@ -11667,13 +11940,13 @@ function is_tiny(changed_lines2) {
|
|
|
11667
11940
|
return changed_lines2 !== void 0 && changed_lines2 >= 0 && changed_lines2 <= TINY_CHANGE_LINES;
|
|
11668
11941
|
}
|
|
11669
11942
|
function level_for(paths, changed_lines2) {
|
|
11670
|
-
const changed = paths.map((
|
|
11943
|
+
const changed = paths.map((path12) => path12.trim()).filter((path12) => path12 !== "");
|
|
11671
11944
|
if (changed.length === 0) return DEFAULT_LEVEL;
|
|
11672
11945
|
if (changed.every((relative) => is_reduced_path(relative))) return REDUCED_LEVEL;
|
|
11673
11946
|
return is_tiny(changed_lines2) ? REDUCED_LEVEL : DEFAULT_LEVEL;
|
|
11674
11947
|
}
|
|
11675
11948
|
function deciding_paths(paths) {
|
|
11676
|
-
return paths.map((
|
|
11949
|
+
return paths.map((path12) => path12.trim()).filter((path12) => path12 !== "" && !is_reduced_path(path12));
|
|
11677
11950
|
}
|
|
11678
11951
|
function format_reason(paths, level) {
|
|
11679
11952
|
if (level === REDUCED_LEVEL) {
|
|
@@ -11768,7 +12041,7 @@ function fix_delta(input2, snapshot2) {
|
|
|
11768
12041
|
}
|
|
11769
12042
|
return input2.carried_delta?.(snapshot2);
|
|
11770
12043
|
}
|
|
11771
|
-
function
|
|
12044
|
+
function decide4(input2) {
|
|
11772
12045
|
if (!input2.is_round_one_closed) {
|
|
11773
12046
|
return required(CODE.OPEN_FINDING, input2.open_reason ?? OPEN_FINDING_REASON);
|
|
11774
12047
|
}
|
|
@@ -11790,7 +12063,7 @@ function parse_json2(text2) {
|
|
|
11790
12063
|
var review_round2 = {
|
|
11791
12064
|
BASE_MOVED_REASON,
|
|
11792
12065
|
CODE,
|
|
11793
|
-
decide:
|
|
12066
|
+
decide: decide4,
|
|
11794
12067
|
EMPTY_DELTA_REASON_PREFIX,
|
|
11795
12068
|
empty_reason,
|
|
11796
12069
|
INERT_DELTA_REASON_PREFIX,
|
|
@@ -11904,7 +12177,7 @@ function parse_round(argv2) {
|
|
|
11904
12177
|
function from_brief(brief, fallback = "1") {
|
|
11905
12178
|
return brief.split("\n").includes(FINAL_LINE) ? "2" : fallback;
|
|
11906
12179
|
}
|
|
11907
|
-
function
|
|
12180
|
+
function record5(round, root) {
|
|
11908
12181
|
const pointer2 = review_attest.read_pointer(root);
|
|
11909
12182
|
if (pointer2 === void 0) return;
|
|
11910
12183
|
stamp_file.write_text_stamp(stamp_file.stamp_path(ROUND_PREFIX2, pointer2.nonce), String(round));
|
|
@@ -11917,7 +12190,7 @@ function current(root) {
|
|
|
11917
12190
|
var review_round = {
|
|
11918
12191
|
current,
|
|
11919
12192
|
from_brief,
|
|
11920
|
-
record:
|
|
12193
|
+
record: record5,
|
|
11921
12194
|
parse_round,
|
|
11922
12195
|
FINAL_LINE,
|
|
11923
12196
|
FULL_CHANGE_FLAG,
|
|
@@ -11925,8 +12198,8 @@ var review_round = {
|
|
|
11925
12198
|
};
|
|
11926
12199
|
|
|
11927
12200
|
// scripts/review/review-untouched-readers.ts
|
|
11928
|
-
import { readFileSync as
|
|
11929
|
-
import
|
|
12201
|
+
import { readFileSync as readFileSync5 } from "node:fs";
|
|
12202
|
+
import path10 from "node:path";
|
|
11930
12203
|
var SOURCE_FILE = /\.(?:ts|js)$/u;
|
|
11931
12204
|
var SEARCH_PATHS = ["*.ts", "*.js", "*.svelte", ":(exclude)*.snap"];
|
|
11932
12205
|
var WORD_FLAG = "-w";
|
|
@@ -11944,7 +12217,7 @@ async function file_edits(request, relative) {
|
|
|
11944
12217
|
const diff = await git_spawn.read(["-C", root, "diff", "-U0", "--no-color", base, "--", relative]);
|
|
11945
12218
|
if (diff.length === 0) return { relative, edits: [] };
|
|
11946
12219
|
try {
|
|
11947
|
-
const source =
|
|
12220
|
+
const source = readFileSync5(path10.join(root, relative), "utf8");
|
|
11948
12221
|
return { relative, edits: review_readers_scan.edited(source, diff) };
|
|
11949
12222
|
} catch {
|
|
11950
12223
|
return { relative, edits: [] };
|
|
@@ -11958,10 +12231,10 @@ async function readers_of(request, entry, edit) {
|
|
|
11958
12231
|
const found = await git_grep_hits.search(edit.target, [WORD_FLAG], pathspecs, request.root);
|
|
11959
12232
|
return { target: edit.target, origin: `${entry.relative}:${String(edit.line)}`, ...found };
|
|
11960
12233
|
}
|
|
11961
|
-
async function
|
|
11962
|
-
const
|
|
12234
|
+
async function read10(request) {
|
|
12235
|
+
const sources2 = request.paths.filter((relative) => SOURCE_FILE.test(relative));
|
|
11963
12236
|
const files = await Promise.all(
|
|
11964
|
-
|
|
12237
|
+
sources2.map(async (relative) => await file_edits(request, relative))
|
|
11965
12238
|
);
|
|
11966
12239
|
const pairs = files.flatMap((entry) => entry.edits.map((edit) => ({ entry, edit })));
|
|
11967
12240
|
const capped2 = pairs.slice(0, MAX_NAMES);
|
|
@@ -11999,7 +12272,7 @@ var review_untouched_readers = {
|
|
|
11999
12272
|
HEADING: HEADING3,
|
|
12000
12273
|
MAX_NAMES,
|
|
12001
12274
|
OMITTED_TAIL,
|
|
12002
|
-
read:
|
|
12275
|
+
read: read10,
|
|
12003
12276
|
READ_FAILED
|
|
12004
12277
|
};
|
|
12005
12278
|
|
|
@@ -12112,8 +12385,8 @@ function dropped_line(root, dropped) {
|
|
|
12112
12385
|
return `Not in this change, so not a target here \u2014 the comparison offered them and \`git diff\` does not list them:
|
|
12113
12386
|
${format_paths2(root, dropped)}`;
|
|
12114
12387
|
}
|
|
12115
|
-
function carried_line(root, base,
|
|
12116
|
-
return `${String(
|
|
12388
|
+
function carried_line(root, base, count2) {
|
|
12389
|
+
return `${String(count2)} further file(s) this change touches are byte-identical to round 1 and were read there, so they are deliberately out of scope. Reconcile before you report: \`git -C ${root} diff --name-only ${base}\` plus the untracked files beside it is this change, and every path in it is either a target above or one of those.`;
|
|
12117
12390
|
}
|
|
12118
12391
|
function reconciliation(root, base, scope) {
|
|
12119
12392
|
return [
|
|
@@ -12225,7 +12498,7 @@ var review_brief = {
|
|
|
12225
12498
|
};
|
|
12226
12499
|
|
|
12227
12500
|
// scripts/test/test-e2e-stamp.ts
|
|
12228
|
-
function
|
|
12501
|
+
function record6(tree, target3) {
|
|
12229
12502
|
try {
|
|
12230
12503
|
review_stamps.e2e_stamp.write(tree.files, target3, tree.base);
|
|
12231
12504
|
} catch {
|
|
@@ -12239,7 +12512,7 @@ function is_current(tree, source) {
|
|
|
12239
12512
|
async function is_current_tree() {
|
|
12240
12513
|
return is_current(await gate_tree.read_gate_tree());
|
|
12241
12514
|
}
|
|
12242
|
-
var test_e2e_stamp = { is_current, is_current_tree, record:
|
|
12515
|
+
var test_e2e_stamp = { is_current, is_current_tree, record: record6 };
|
|
12243
12516
|
|
|
12244
12517
|
// scripts/run/hold/run-hold-adopt.ts
|
|
12245
12518
|
var ADOPTED = "adopted";
|
|
@@ -12247,9 +12520,9 @@ var NO_RECORD = "none";
|
|
|
12247
12520
|
var FOREIGN2 = "foreign";
|
|
12248
12521
|
var UNREADABLE3 = "unreadable";
|
|
12249
12522
|
function rekey(target3, issue) {
|
|
12250
|
-
const
|
|
12251
|
-
if (
|
|
12252
|
-
const hold = run_halfrun_resume.hold_of(
|
|
12523
|
+
const read11 = run_hold.read_hold(target3);
|
|
12524
|
+
if (read11.kind === "unreadable") return UNREADABLE3;
|
|
12525
|
+
const hold = run_halfrun_resume.hold_of(read11);
|
|
12253
12526
|
if (hold === void 0) return NO_RECORD;
|
|
12254
12527
|
if (hold.issue !== run_hold.UNNUMBERED_ISSUE && hold.issue !== issue) return FOREIGN2;
|
|
12255
12528
|
stamp_file.write_stamp(target3, { ...hold, issue });
|
|
@@ -12286,10 +12559,10 @@ async function stale_block(hold, issue) {
|
|
|
12286
12559
|
if (is_own_unstopped(hold, issue)) return void 0;
|
|
12287
12560
|
return await run_hold.is_tree_dirty() ? run_hold.uncommitted_message(hold) : void 0;
|
|
12288
12561
|
}
|
|
12289
|
-
async function blocking_message(
|
|
12290
|
-
if (
|
|
12291
|
-
if (
|
|
12292
|
-
return
|
|
12562
|
+
async function blocking_message(read11, issue) {
|
|
12563
|
+
if (read11.kind === "held") return held_block(read11.hold, issue);
|
|
12564
|
+
if (read11.kind === "unreadable") return run_hold.unreadable_message();
|
|
12565
|
+
return read11.kind === "stale" ? await stale_block(read11.hold, issue) : void 0;
|
|
12293
12566
|
}
|
|
12294
12567
|
var run_hold_block = { blocking_message };
|
|
12295
12568
|
|
|
@@ -12433,11 +12706,12 @@ var RELEASE_FLAG = "--release";
|
|
|
12433
12706
|
var FORCE_FLAG = "--force";
|
|
12434
12707
|
var FULLRUN_FLAG = "--fullrun";
|
|
12435
12708
|
var HALFRUN_STOP_FLAG = "--halfrun-stop";
|
|
12709
|
+
var HALFRUN_ROUND_FLAG = "--halfrun-round";
|
|
12436
12710
|
var PRRUN_STOP_FLAG = "--prrun-stop";
|
|
12437
12711
|
var HUMAN_REVIEW_STOP_FLAG = "--human-review-stop";
|
|
12438
12712
|
var ADOPT_FLAG = "--adopt";
|
|
12439
12713
|
var MAX_CLAIM_ARGUMENTS = 2;
|
|
12440
|
-
var USAGE5 = "Usage: josh run:hold [<issue-number> [--fullrun | --halfrun-stop | --human-review-stop | --prrun-stop]] | josh run:hold --adopt <issue-number> | josh run:release [<issue-number> | --force]";
|
|
12714
|
+
var USAGE5 = "Usage: josh run:hold [<issue-number> [--fullrun | --halfrun-stop | --halfrun-round | --human-review-stop | --prrun-stop]] | josh run:hold --adopt <issue-number> | josh run:release [<issue-number> | --force]";
|
|
12441
12715
|
var COMMAND = "run:hold";
|
|
12442
12716
|
var HOLD_VERDICT = "hold";
|
|
12443
12717
|
var BUSY_VERDICT = "busy";
|
|
@@ -12451,6 +12725,7 @@ var HALFRUN_STOP_KIND = "halfrun-stop";
|
|
|
12451
12725
|
var HUMAN_REVIEW_STOP_KIND = "human-review-stop";
|
|
12452
12726
|
var PRRUN_STOP_KIND = "prrun-stop";
|
|
12453
12727
|
var ADOPT_KIND = "adopt";
|
|
12728
|
+
var HALFRUN_ROUND_KIND = "halfrun-round";
|
|
12454
12729
|
var STOP_KINDS = /* @__PURE__ */ new Set([
|
|
12455
12730
|
HALFRUN_STOP_KIND,
|
|
12456
12731
|
HUMAN_REVIEW_STOP_KIND,
|
|
@@ -12459,6 +12734,10 @@ var STOP_KINDS = /* @__PURE__ */ new Set([
|
|
|
12459
12734
|
function is_stop_request(request) {
|
|
12460
12735
|
return STOP_KINDS.has(request.kind);
|
|
12461
12736
|
}
|
|
12737
|
+
var TAKE_OVER_KINDS = /* @__PURE__ */ new Set([ADOPT_KIND, HALFRUN_ROUND_KIND]);
|
|
12738
|
+
function is_take_over_request(request) {
|
|
12739
|
+
return TAKE_OVER_KINDS.has(request.kind);
|
|
12740
|
+
}
|
|
12462
12741
|
var FORCE_RELEASE_REQUEST = { kind: FORCE_RELEASE_KIND };
|
|
12463
12742
|
function release_request(claimant) {
|
|
12464
12743
|
return { kind: "release", claimant };
|
|
@@ -12472,6 +12751,7 @@ function numbered_claim(issue, flag2) {
|
|
|
12472
12751
|
if (flag2 === void 0) return { kind: "claim", issue };
|
|
12473
12752
|
const stop_kind = STOP_KIND_BY_FLAG.get(flag2);
|
|
12474
12753
|
if (stop_kind !== void 0) return { kind: stop_kind, issue };
|
|
12754
|
+
if (flag2 === HALFRUN_ROUND_FLAG) return { kind: HALFRUN_ROUND_KIND, issue };
|
|
12475
12755
|
return flag2 === FULLRUN_FLAG ? { kind: "claim", issue, is_fullrun: true } : void 0;
|
|
12476
12756
|
}
|
|
12477
12757
|
function parse_claim(argv2) {
|
|
@@ -12523,9 +12803,9 @@ function replace_stale(target3, request, hold) {
|
|
|
12523
12803
|
run_hold.release_hold(target3);
|
|
12524
12804
|
return take_free_tree(target3, request);
|
|
12525
12805
|
}
|
|
12526
|
-
function take_tree(target3, request,
|
|
12527
|
-
if (
|
|
12528
|
-
return
|
|
12806
|
+
function take_tree(target3, request, read11) {
|
|
12807
|
+
if (read11.kind === "held") return report_hold();
|
|
12808
|
+
return read11.kind === "stale" ? replace_stale(target3, request, read11.hold) : take_free_tree(target3, request);
|
|
12529
12809
|
}
|
|
12530
12810
|
function report_preflight(decision) {
|
|
12531
12811
|
console.error(`${decision.reason}
|
|
@@ -12545,10 +12825,10 @@ async function claim2(target3, request, is_linked) {
|
|
|
12545
12825
|
async () => await preflight_gate(request.issue, is_linked)
|
|
12546
12826
|
);
|
|
12547
12827
|
if (gate3 !== void 0) return gate3;
|
|
12548
|
-
const
|
|
12549
|
-
const blocked = await run_hold_block.blocking_message(
|
|
12828
|
+
const read11 = run_hold.read_hold(target3);
|
|
12829
|
+
const blocked = await run_hold_block.blocking_message(read11, request.issue);
|
|
12550
12830
|
if (blocked !== void 0) return report_busy(blocked);
|
|
12551
|
-
const code = await run_ship_lap.timed("take_tree", async () => take_tree(target3, request,
|
|
12831
|
+
const code = await run_ship_lap.timed("take_tree", async () => take_tree(target3, request, read11));
|
|
12552
12832
|
if (code === SUCCESS_EXIT_CODE7) run_maintenance.sweep();
|
|
12553
12833
|
return code;
|
|
12554
12834
|
}
|
|
@@ -12564,10 +12844,10 @@ function report_unreadable_record() {
|
|
|
12564
12844
|
return report5(run_hold.unreadable_message(), UNKNOWN_VERDICT, FAILURE_EXIT_CODE6);
|
|
12565
12845
|
}
|
|
12566
12846
|
function release_record(target3, claimant) {
|
|
12567
|
-
const
|
|
12568
|
-
if (
|
|
12569
|
-
if (
|
|
12570
|
-
if (!run_hold.is_own_hold(
|
|
12847
|
+
const read11 = run_hold.read_hold(target3);
|
|
12848
|
+
if (read11.kind === "free") return remove_record(target3, false);
|
|
12849
|
+
if (read11.kind === "unreadable") return report_unreadable_record();
|
|
12850
|
+
if (!run_hold.is_own_hold(read11.hold, claimant)) return report_held2(read11.hold);
|
|
12571
12851
|
return remove_record(target3, true);
|
|
12572
12852
|
}
|
|
12573
12853
|
async function release2(target3, claimant) {
|
|
@@ -12577,11 +12857,11 @@ async function release2(target3, claimant) {
|
|
|
12577
12857
|
return code;
|
|
12578
12858
|
}
|
|
12579
12859
|
function force_release(target3) {
|
|
12580
|
-
const
|
|
12581
|
-
if (
|
|
12582
|
-
console.error(run_hold.forced_release_message(
|
|
12860
|
+
const read11 = run_hold.read_hold(target3);
|
|
12861
|
+
if (read11.kind === "held" || read11.kind === "stale") {
|
|
12862
|
+
console.error(run_hold.forced_release_message(read11.hold));
|
|
12583
12863
|
}
|
|
12584
|
-
return remove_record(target3,
|
|
12864
|
+
return remove_record(target3, read11.kind !== "free");
|
|
12585
12865
|
}
|
|
12586
12866
|
function report_unknown() {
|
|
12587
12867
|
return report5(run_hold.unknown_message(), UNKNOWN_VERDICT, FAILURE_EXIT_CODE6);
|
|
@@ -12631,9 +12911,19 @@ async function adopt4(target3, issue) {
|
|
|
12631
12911
|
}
|
|
12632
12912
|
return report5(run_hold_adopt.foreign_message(issue), BUSY_VERDICT, FAILURE_EXIT_CODE6);
|
|
12633
12913
|
}
|
|
12914
|
+
async function reopen_round(target3, issue) {
|
|
12915
|
+
const result = await run_halfrun_resume.reopen(target3, issue);
|
|
12916
|
+
if (result === run_halfrun_resume.MARKED) return report_hold();
|
|
12917
|
+
if (result === run_halfrun_resume.UNREADABLE) return report_unreadable_record();
|
|
12918
|
+
return report5(run_halfrun_resume.no_stop_message(issue), BUSY_VERDICT, FAILURE_EXIT_CODE6);
|
|
12919
|
+
}
|
|
12920
|
+
async function take_over2(target3, request) {
|
|
12921
|
+
const { kind, issue } = request;
|
|
12922
|
+
return kind === ADOPT_KIND ? await adopt4(target3, issue) : await reopen_round(target3, issue);
|
|
12923
|
+
}
|
|
12634
12924
|
async function dispatch(request, target3, is_linked) {
|
|
12635
12925
|
if (request.kind === "claim") return await claim2(target3, request, is_linked);
|
|
12636
|
-
if (request
|
|
12926
|
+
if (is_take_over_request(request)) return await take_over2(target3, request);
|
|
12637
12927
|
if (is_stop_request(request)) return await mark_stop(target3, request);
|
|
12638
12928
|
if (request.kind === FORCE_RELEASE_KIND) return force_release(target3);
|
|
12639
12929
|
return await release2(target3, request.claimant);
|
|
@@ -12913,7 +13203,7 @@ var run_cut_report = {
|
|
|
12913
13203
|
};
|
|
12914
13204
|
|
|
12915
13205
|
// scripts/run/carry/run-carry-ended.ts
|
|
12916
|
-
import
|
|
13206
|
+
import path11 from "node:path";
|
|
12917
13207
|
var ENDED_PREFIX = durable_state.PREFIX.ENDED;
|
|
12918
13208
|
var TRANSCRIPT_SUFFIX = ".jsonl";
|
|
12919
13209
|
var ended_run_schema = external_exports.object({
|
|
@@ -12928,17 +13218,17 @@ function ended_path(git_directory) {
|
|
|
12928
13218
|
return durable_state.path(ENDED_PREFIX, git_directory);
|
|
12929
13219
|
}
|
|
12930
13220
|
function session_of(transcript) {
|
|
12931
|
-
return transcript === void 0 ? void 0 :
|
|
13221
|
+
return transcript === void 0 ? void 0 : path11.basename(transcript, TRANSCRIPT_SUFFIX);
|
|
12932
13222
|
}
|
|
12933
13223
|
function stop_of(transcript, stopped) {
|
|
12934
13224
|
return stopped === void 0 ? {} : { stopped, session: session_of(transcript) };
|
|
12935
13225
|
}
|
|
12936
|
-
function record_ended(target3,
|
|
12937
|
-
if (
|
|
12938
|
-
const { invocation, started_at, owner_transcript } =
|
|
13226
|
+
function record_ended(target3, read11, now = /* @__PURE__ */ new Date(), stopped) {
|
|
13227
|
+
if (read11.kind !== "carried") return;
|
|
13228
|
+
const { invocation, started_at, owner_transcript } = read11.carry;
|
|
12939
13229
|
const ended_at = now.toISOString();
|
|
12940
13230
|
stamp_file.replace_stamp(target3, {
|
|
12941
|
-
...
|
|
13231
|
+
...read11.carry.scheduler_provider && { scheduler_provider: read11.carry.scheduler_provider },
|
|
12942
13232
|
invocation,
|
|
12943
13233
|
started_at,
|
|
12944
13234
|
ended_at,
|
|
@@ -12981,6 +13271,7 @@ var run_wake_schema = process_owner_schema.extend({
|
|
|
12981
13271
|
started_at: external_exports.string(),
|
|
12982
13272
|
woke: external_exports.number(),
|
|
12983
13273
|
woke_at: external_exports.string().optional(),
|
|
13274
|
+
launch_at: external_exports.string().optional(),
|
|
12984
13275
|
// Every optional `RunWake` field must be listed: `z.object` strips undeclared ones on the round trip.
|
|
12985
13276
|
attempts: external_exports.number().optional(),
|
|
12986
13277
|
woke_pid: external_exports.number().optional(),
|
|
@@ -13007,7 +13298,7 @@ function decide_not_handed_off(input2) {
|
|
|
13007
13298
|
if (input2.is_owner_live) return WAIT_DECISION;
|
|
13008
13299
|
return decide_launch(input2);
|
|
13009
13300
|
}
|
|
13010
|
-
function
|
|
13301
|
+
function decide5(input2) {
|
|
13011
13302
|
if (input2.read.kind !== "carried") return { kind: "stop", reason: STOP_REASONS[input2.read.kind] };
|
|
13012
13303
|
if (input2.read.carry.is_handed_off !== true) return decide_not_handed_off(input2);
|
|
13013
13304
|
return decide_launch(input2);
|
|
@@ -13048,6 +13339,7 @@ function carried_state(existing, invocation) {
|
|
|
13048
13339
|
return {
|
|
13049
13340
|
woke: existing.woke,
|
|
13050
13341
|
woke_at: existing.woke_at,
|
|
13342
|
+
launch_at: existing.launch_at,
|
|
13051
13343
|
attempts: existing.attempts,
|
|
13052
13344
|
woke_pid: existing.woke_pid,
|
|
13053
13345
|
spawned: existing.spawned,
|
|
@@ -13090,6 +13382,7 @@ function count_claim(wake) {
|
|
|
13090
13382
|
return {
|
|
13091
13383
|
...wake,
|
|
13092
13384
|
woke,
|
|
13385
|
+
launch_at: wake.woke_at ?? wake.launch_at,
|
|
13093
13386
|
woke_at: void 0,
|
|
13094
13387
|
attempts: void 0,
|
|
13095
13388
|
idle_since: void 0
|
|
@@ -13121,7 +13414,7 @@ var run_wake = {
|
|
|
13121
13414
|
claim: claim3,
|
|
13122
13415
|
count_claim,
|
|
13123
13416
|
count_wake,
|
|
13124
|
-
decide:
|
|
13417
|
+
decide: decide5,
|
|
13125
13418
|
fresh_wake,
|
|
13126
13419
|
is_supervisor_live,
|
|
13127
13420
|
mark_idle,
|
|
@@ -13203,11 +13496,11 @@ var DEFAULT_PORTS4 = {
|
|
|
13203
13496
|
notify_stranded: real_notify_stranded
|
|
13204
13497
|
};
|
|
13205
13498
|
function input_at(ports, targets) {
|
|
13206
|
-
const
|
|
13207
|
-
if (
|
|
13499
|
+
const read11 = ports.read_carry(targets.carry);
|
|
13500
|
+
if (read11.kind !== "carried") return void 0;
|
|
13208
13501
|
return {
|
|
13209
|
-
read:
|
|
13210
|
-
is_owner_live: ports.is_owner_live(
|
|
13502
|
+
read: read11,
|
|
13503
|
+
is_owner_live: ports.is_owner_live(read11.carry),
|
|
13211
13504
|
supervisor: ports.supervisor_liveness(ports.read_wake(targets.wake))
|
|
13212
13505
|
};
|
|
13213
13506
|
}
|
|
@@ -13245,11 +13538,11 @@ function ports_with(same_process) {
|
|
|
13245
13538
|
};
|
|
13246
13539
|
}
|
|
13247
13540
|
function is_left_stranded(run6, ports = DEFAULT_PORTS4) {
|
|
13248
|
-
const
|
|
13249
|
-
if (
|
|
13541
|
+
const read11 = ports.read_carry(run6.carry_target);
|
|
13542
|
+
if (read11.kind !== "carried") return !ports.has_ended(run6.ended_target, run6.started_at);
|
|
13250
13543
|
return run_stranded.is_stranded({
|
|
13251
|
-
read:
|
|
13252
|
-
is_owner_live: run_carry.is_held_by_another(
|
|
13544
|
+
read: read11,
|
|
13545
|
+
is_owner_live: run_carry.is_held_by_another(read11.carry, ports.is_owner_live),
|
|
13253
13546
|
supervisor: run_stranded.GONE
|
|
13254
13547
|
});
|
|
13255
13548
|
}
|
|
@@ -13353,8 +13646,8 @@ async function carried_owner_live() {
|
|
|
13353
13646
|
try {
|
|
13354
13647
|
const directory = await run_carry.repository_directory();
|
|
13355
13648
|
if (directory === void 0) return void 0;
|
|
13356
|
-
const
|
|
13357
|
-
return
|
|
13649
|
+
const read11 = run_carry.read_carry(run_carry.carry_path(directory));
|
|
13650
|
+
return read11.kind === "carried" ? run_carry.is_owner_live(read11.carry) : void 0;
|
|
13358
13651
|
} catch {
|
|
13359
13652
|
return void 0;
|
|
13360
13653
|
}
|