@xgent-ai/skills 0.7.5 → 0.7.6
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/hooks/xgent-statusline.js +32 -18
- package/README.md +61 -35
- package/bin/phoenix-diagram.js +14 -0
- package/bin/xgent-skills.js +132 -240
- package/dist/phoenix-diagram/LICENSE +21 -0
- package/dist/phoenix-diagram/NOTICE.md +34 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/005fc765ddc5115da796cca915baa9557abae13ff35e0a47c47affc56f6c414d.txt +272 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/010492e490b92ec85db01daad2a290ea5959f29314a1c4ff25e7a172e223abf9.txt +18 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/01c266bced4a434da0051174d6bee16a4c82cf634e2679b6155d40d75012390f.txt +3 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/0218327e7a480793ffdd4eb792379a9709e5c135c7ba267f709d6f6d4d70af0a.txt +201 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/02bb8c3b4e70190e3986c0404ad2fd8d639b4f534252d82379cc1b502b6d1812.txt +191 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/0444c6991eead6822f7b9102e654448d51624431119546492e8b231db42c48bb.txt +25 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/0552c898248eadfc130df0c0e8f6f82776fcb3f1dd5a5af2fa991b5baff9367a.txt +21 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/0ab4d106b6faac07fb6a051815fd1b4d862d730895e2d7d7358c2f13565e7a38.txt +20 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/0b28172679e0009b655da42797c03fd163a3379d5cfa67ba1f1655e974a2a1a9.txt +25 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/0d3f7c086c6b6cf3ea4aac714e9aa3e1fb02e355ce35bd21c56acf8d04390885.txt +21 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/0dd882e53de11566d50f8e8e2d5a651bcf3fabee4987d70f306233cf39094ba7.txt +21 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/0f96a83840e146e43c0ec96a22ec1f392e0680e6c1226e6f3ba87e0740af850f.txt +21 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/117829c3ca21efb132d81a44b55363d395ab8eea18526873bc828da4c0e5f038.txt +21 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/123a331b5dbf04c30097fa43b8f858bc85df671fe776de498d01f3d6b7c1f69e.txt +25 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/1a2f5c12ddc934d58956aa5dbdd3255fe55fd957633ab7d0d39e4f0daa73f7df.txt +26 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/1f256ecad192880510e84ad60474eab7589218784b9a50bc7ceee34c2b91f1d5.txt +373 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/1f485f0d6125658861351e3d6084ea90fefe78f89450be9915044b7c56d5a75a.txt +15 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/209fbbe0ad52d9235e37badf9cadfe4dbdc87203179c0899e738b39ade42177b.txt +26 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/20c7855c364d57ea4c97889a5e8d98470a9952dade37bd9248b9a54431670e5e.txt +25 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/20fe7b00e904ed690e3b9fd6073784d3fc428141dbd10b81c01fd143d0797f58.txt +176 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/219920e865eee70b7dcfc948a86b099e7f4fe2de01bcca2ca9a20c0a033f2b59.txt +7 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/23860c2a7b5d96b21569afedf033469bab9fe14a1b24a35068b8641c578ce24d.txt +7 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/23f18e03dc49df91622fe2a76176497404e46ced8a715d9d2b67a7446571cca3.txt +23 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/268872b9816f90fd8e85db5a28d33f8150ebb8dd016653fb39ef1f94f2686bc5.txt +220 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/27995d58ad5c1145c1a8cd86244ce844886958a35eb2b78c6b772748669999ac.txt +25 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/28a9529c7d0bb4dc51f4bf5c116a3d16ef247a052f7591466768ddf563fd1cf5.txt +428 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/29e9fe5074bd27e0e5d5d110394fbbcd841baee2651a3c4b4560a632702cede4.txt +26 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/30fefc3a7d6a0041541858293bcbea2dde4caa4c0a5802f996a7f7e8c0085652.txt +23 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/3521672491a3479422d5fe1aca6645dd2984090f85da6e5205abfb18fb7a6897.txt +25 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/35242e7a83f69875e6edeff02291e688c97caafe2f8902e4e19b49d3e78b4cab.txt +176 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/36516aefdc84c5d5a1e7485425913a22dbda69eb1930c5e84d6ae4972b5194b9.txt +23 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/375bdbf54d6584debb4bcc5bce1c9dcfdd581f977c9a8469113dbdf208f4c927.txt +131 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/378f5840b258e2779c39418f3f2d7b2ba96f1c7917dd6be0713f88305dbda397.txt +25 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/391a5396cec6230bfabd4ef4eb2350eb895bc5efce377a2218f5702ed020d3e3.txt +20 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/39712155836e5c10ef1b07037b606e4ad2d633e72205d162fdd7e2290aa54f15.txt +21 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/3bb1e548250b3acc43febde65a5cdba9f2e0a3288018aa41f009a3c59ffab51a.txt +390 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/3bc70e239e91272782006c638fc0452a714d384224f11f0923036b7be07cf9b5.txt +21 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/3f3d9e0024b1921b067d6f7f88deb4a60cbe7a78e76c64e3f1d7fc3b779b9d04.txt +373 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/3f941b3b89cf7b8370ceb83cc76d2120d471b58735d8ca60238a751a48d7f72f.txt +359 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/3fa4ca83dcc9237839b1bdeb2e6d16bdfb5ec0c5ce42b24694d8bbf0dcbef72c.txt +25 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/42fa16951ce7f24b5a467a40e5b449a1d41e662f97ca779864f053f39e097737.txt +26 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/4455bf75a91154108304cb283e0fea9948c14f13e20d60887cf2552449dea3b1.txt +21 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/451167c55c0fa447cc2d5632714f5e3c567fe4f1e1badefab2c1333852198aca.txt +542 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/45f522cacecb1023856e46df79ca625dfc550c94910078bd8aec6e02880b3d42.txt +25 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/45fd05c4865e7c350b98ad7ac50e1b15462d49af4a91e9b0c9dd933dc9a69742.txt +201 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/4789210f4df8abc03fce1cddd9c2ba517f184840687f2815d741de282c1aa93a.txt +228 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/4cada0bd02ea3692eee6f16400d86c6508bbd3bafb2b65fed0419f36d4f83e8f.txt +25 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/516b24e051bf5630880ebbd55c40a25ce9552ebaf8970a53e8976eb70e522406.txt +201 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/553fffcd9b1cb158bc3e9edc35da85ca5c3b3d7d2e61c883ebcfa8a65814b583.txt +13 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/5757a1f28eff735a8b5e7425478f367812d71e974530f5bedd01219480965f4a.txt +51 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/5b698ca13897be3afdb7174256fa1574f8c6892b8bea1a66dd6469d3fe27885a.txt +19 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/5e05b024f653a5ce199e77cbbbd42fb5553562ec714b819421ed0c3e552a75d7.txt +25 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/60a7062291b01ba068f300612cdbdc20382ac1d4934f07bcdd7167c15299f309.txt +25 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/62065228e42caebca7e7d7db1204cbb867033de5982ca4009928915e4095f3a3.txt +25 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/62c7a1e35f56406896d7aa7ca52d0cc0d272ac022b5d2796e7d6905db8a3636a.txt +176 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/6485b8ed310d3f0340bf1ad1f47645069ce4069dcc6bb46c7d5c6faf41de1fdb.txt +25 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/65f94e99ddaf4f5d1782a6dae23f35d4293a9a01444a13135a6887017d353cee.txt +25 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/6df43f6f4b5d4587f3d8d71e45532c688fd168afa5fe89d571cb32fa09c4ef51.txt +187 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/709e3175b4212f7b13aa93971c9f62ff8c69ec45ad8c6532a7e0c41d7a7d6f8c.txt +25 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/71674605ec4c087fe9eb534e3e4f9e26eb2e4aabcd76a29fd156c6a844d44b3d.txt +21 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/7365cc8878a1d7ce155a58c4ca09c3d7a6be413efa5334a80ea842912b669349.txt +25 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/7abd9b6960dcf7d4d0a48606a5b71bfe37d472db68d70637f3a58a56785f1621.txt +13 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/7b63ecd5f1902af1b63729947373683c32745c16a10e8e6292e2e2dcd7e90ae0.txt +25 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/7ca6700600dfa9c9497bf5556365067daa802c871ea78239f129309c7a2048f7.txt +21 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/7cfafc877eccc46c0e346ccbaa5c51bb6b894d2b818e617d970211e232785ad4.txt +15 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/7e12e5df4bae12cb21581ba157ced20e1986a0508dd10d0e8a4ab9a4cf94e85c.txt +24 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/7e5886959f67f8c75063a9d55cd3cb08c5a8cbea9a944fa1df2d4ae038f53721.txt +21 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/7fea0ee51a4ca5d5cea7464135fd55e8b09caf3a61da3d451ac8a22af95c033f.txt +20 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/8173d5c29b4f956d532781d2b86e4e30f83e6b7878dce18c919451d6ba707c90.txt +201 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/83c1763356e822adde0a2cae748d938a73fdc263849ccff6b27776dff213bd32.txt +24 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/86dd7f026f916daf7511e39951ad8ea8cf55a8db67ae64060dacf829761c18f3.txt +25 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/8a35369f3ca263b3c62fbb5032947e53b6bfebc6c8a4d1bb982de1c069f6fba5.txt +21 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/8b43ce8accd61e9d370b5ca9e9c4f953279b5c239926c62315b40e24df51b726.txt +25 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/8bb1b50b0e5c9399ae33bd35fab2769010fa6c14e8860c729a52295d84896b7a.txt +201 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/8bce3b45e49ecd1461f223b46de133d8f62cd39f745cfdaf81bee554b908bd42.txt +21 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/8c7516d4b27b1e495be5e38b612298b63de48d05f49cdac94f70f3cd70f8864b.txt +25 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/9046848b63a5c92bff14e4accca80bd987e0623b74adf9226ce5198d312b79d5.txt +30 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/90eb64f0279b0d9432accfa6023ff803bc4965212383697eee27a0f426d5f8d5.txt +12 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/9117d922e667125508dde62b02c1f57ed22f5ad21eb536aa2e2d99e1c796e639.txt +25 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/9387c2d197e2370a740ca457dae1662c56de56b811ee4862024343961307f9bf.txt +19 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/946c9835d8034d24404f8cfec5f4654cee5dad17e944afc3d06d742cf2882831.txt +240 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/95bd3988beee069fa2848f648dab43cc6e0b2add2ad6bcb17360caf749802bcc.txt +176 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/9ba9550ad48438d0836ddab3da480b3b69ffa0aac7b7878b5a0039e7ab429411.txt +396 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/9d185ac6703c4b0453974c0d85e9eee43e6941009296bb1f5eb0b54e2329e9f3.txt +202 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/9e0dfd2dd4173a530e238cb6adb37aa78c34c6bc7444e0e10c1ab5d8881f63ba.txt +25 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/9f2ae19ef94ba82887729a4a1617ff25eede56611dd21a4b2c6f797df30fca33.txt +2013 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/9fa38f610a00115dd1f612bdd3559e3b381ea579538b6ff25a5899da250a5fce.txt +21 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/a00511478c83ebb464ef19d840f061c7444adc4636bb561900e75c5808cfc6cc.txt +21 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/a2010f343487d3f7618affe54f789f5487602331c0a8d03f49e9a7c547cf0499.txt +121 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/a5dea80c1f383cb5f80a6bb0da5e55a2beb9f24adb123ce6300af2cbaaa3bf65.txt +19 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2.txt +201 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/a825bd853ab71619a4923d7b4311221427848070ff44d990da39b0b274c1683f.txt +21 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/a9040321c3712d8fd0b09cf52b17445de04a23a10165049ae187cd39e5c86be5.txt +201 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/aaff376532ea30a0cd5330b9502ad4a4c8bf769c539c87ffe78819d188a18ebf.txt +201 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/ae9baa7beea910273c2f384c2a6b721fb7bd02bda3436074a1072e4ee689f985.txt +25 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/b1181a40b2a7b25cf66fd01481713bc1005df082c53ef73e851e55071b102744.txt +19 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/b38f11f6096706e6de553dabe2a7ed142d59b6fa8c97e290c67496154745cdd5.txt +25 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/b3d734001a94efff3579978d953391aa7115f877657d25eb54037a43875d078a.txt +9 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/b40930bbcf80744c86c46a12bc9da056641d722716c378f5659b9e555ef833e1.txt +201 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/b4eb00df6e2a4d22518fcaa6a2b4646f249b3a3c9814509b22bd2091f1392ff1.txt +27 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/b68ad1a3367b825447089e1f8d6829b97f47a89eb78d2f4ebaef4672f5606186.txt +22 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/b7e650f3fce5c53249d1cdc608b54df156a97edd636cf9d23498d0cfe7aec63e.txt +19 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/c09aae9d3c77b531f56351a9947bc7446511d6b025b3255312d3e3442a9a7583.txt +21 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/c16f8dcf1a368b83be78d826ea23de4079fe1b4469a0ab9ee20563f37ff3d44b.txt +201 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/c2cfccb812fe482101a8f04597dfc5a9991a6b2748266c47ac91b6a5aae15383.txt +21 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/c30152c94a6d75e021adbc52b3a52470366a46edb917e17deae3259251af244c.txt +42 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/c394e3bda1f3b9378f30a7cab11242887eeeafc73c7bef36a0fe13e09691e18b.txt +17 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/c71d239df91726fc519c6eb72d318ec65820627232b2f796219e87dcf35d0ab4.txt +201 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/c962ee4d1d05ddc138b202b2540219ebc57893fcf97b364852094a9a94ce1365.txt +7 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/c9a75f18b9ab2927829a208fc6aa2cf4e63b8420887ba29cdb265d6619ae82d5.txt +25 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/cfc7749b96f63bd31c3c42b5c471bf756814053e847c10f3eb003417bc523d30.txt +202 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/d1fc1bc0d155df60b2e7705b6b2ae02a05c96f948e1cec6e2fb86360b09f346b.txt +29 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/d5c22aa3118d240e877ad41c5d9fa232f9c77d757d4aac0c2f943afc0a95e0ef.txt +25 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/d5fca2653c88ad02d197faead77e22b80c70636b5bec6e02f2805f389a21b86d.txt +10 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/db11fec9946737df39ca3898d9cd8c10ec6f6c3a884a6802b0ad0b81b4e8f23a.txt +1 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/dc91f8200e4b2a1f9261035d4c18c33c246911a6c0f7b543d75347e61b249cff.txt +25 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/ddea4e94a1c35ed9826e54e13a5b50b8f81b21665a00ca07c8861f1859e56b6b.txt +14 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/e271993808fec50ab29350b39539cdec611a9103f827e0aa26d61da70e2d33f8.txt +61 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/e66c269d4819aaab34b49ef5220c4ddab6756f21bb5180761a4eb8561f2b7bbd.txt +438 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/ecc269ef87fd38a1d98e30bfac9ba964a9dbd9315c3770fed98d4d7cb5882055.txt +25 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/efcfee7981ff72431fffb06925cad00a23dce079ed4354f61030ad5abdb78829.txt +22 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/f025ccfb7dfb6bdfedc75ca0f67acc69e6fb4998143d834f7c2f38a29989680f.txt +13 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/f367c1b8e1aa262435251e442901da4607b4650e0e63a026f5044473ecfb90f2.txt +46 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/f51ac2c59a222f7476ce507ca879960e2b64ea64bb2786eefdbeb7b0b538d1b7.txt +25 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/f7715d38a3fa1b4ac97c5729740752505a39cb92ee83ab5b102aeb5eaa7cdea4.txt +25 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/f7db81051789b729fea528a63ec4c938fdcb93d9d61d97dc8cc2e9df6d47f2a1.txt +39 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/f9c4c77baa3828004ee54b8a4f2db2e88ed44a6237a493965bf551fac0fcb62d.txt +17 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/fab3dd6bdab226f1c08630b1dd917e11fcb4ec5e1e020e2c16f83a0a13863e85.txt +373 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/fb77f0a9c53e473abe5103c8632ef9f0f2874d4fb3f17cb2d8c661aab9cee9d7.txt +25 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/ff8f68cb076caf8cefe7a6430d4ac086ce6af2ca8ce2c4e5a2004d4552ef52a2.txt +25 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/ff92bed461f50338dd703a9ba9aee496a425957873df1d91192776e4bdf5dda7.txt +74 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/rust-std-1.99.1/COPYRIGHT-library.html +29357 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/rust-std-1.99.1/licenses/Apache-2.0.txt +73 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/rust-std-1.99.1/licenses/BSD-2-Clause.txt +9 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/rust-std-1.99.1/licenses/CC-BY-SA-4.0.txt +427 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/rust-std-1.99.1/licenses/GCC-exception-3.1.txt +30 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/rust-std-1.99.1/licenses/GPL-2.0-only.txt +133 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/rust-std-1.99.1/licenses/GPL-3.0-or-later.txt +202 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/rust-std-1.99.1/licenses/ISC.txt +7 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/rust-std-1.99.1/licenses/LLVM-exception.txt +15 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/rust-std-1.99.1/licenses/MIT.txt +9 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/rust-std-1.99.1/licenses/NCSA.txt +29 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/rust-std-1.99.1/licenses/OFL-1.1.txt +43 -0
- package/dist/phoenix-diagram/THIRD-PARTY-LICENSES/rust-std-1.99.1/licenses/Unicode-3.0.txt +39 -0
- package/dist/phoenix-diagram/THIRD-PARTY-NOTICES.md +210 -0
- package/dist/phoenix-diagram/THIRD-PARTY.json +5459 -0
- package/dist/phoenix-diagram/VERSION.json +39 -0
- package/dist/phoenix-diagram/bundle/ENGINE.json +39 -0
- package/dist/phoenix-diagram/bundle/SKILL.md +109 -0
- package/dist/phoenix-diagram/bundle/examples/minimal.architecture.json +11 -0
- package/dist/phoenix-diagram/bundle/examples/minimal.class.json +23 -0
- package/dist/phoenix-diagram/bundle/examples/minimal.dataflow.json +11 -0
- package/dist/phoenix-diagram/bundle/examples/minimal.erd.json +25 -0
- package/dist/phoenix-diagram/bundle/examples/minimal.lifecycle.json +11 -0
- package/dist/phoenix-diagram/bundle/examples/minimal.sequence.json +13 -0
- package/dist/phoenix-diagram/bundle/examples/minimal.timeline.json +15 -0
- package/dist/phoenix-diagram/bundle/examples/minimal.tree.json +13 -0
- package/dist/phoenix-diagram/bundle/examples/minimal.waterfall.json +12 -0
- package/dist/phoenix-diagram/bundle/examples/minimal.workflow.json +12 -0
- package/dist/phoenix-diagram/bundle/manifest.json +253 -0
- package/dist/phoenix-diagram/bundle/references/architecture-compare.md +111 -0
- package/dist/phoenix-diagram/bundle/references/authoring-defaults.md +42 -0
- package/dist/phoenix-diagram/bundle/references/brand-marks.md +52 -0
- package/dist/phoenix-diagram/bundle/references/compatibility.md +22 -0
- package/dist/phoenix-diagram/bundle/references/delivery-contract.md +127 -0
- package/dist/phoenix-diagram/bundle/references/extending-types.md +14 -0
- package/dist/phoenix-diagram/bundle/references/migration.md +57 -0
- package/dist/phoenix-diagram/bundle/references/preview.md +45 -0
- package/dist/phoenix-diagram/bundle/references/repository-authoring.md +29 -0
- package/dist/phoenix-diagram/bundle/references/viewer-runtime.md +27 -0
- package/dist/phoenix-diagram/bundle/schemas/README.md +23 -0
- package/dist/phoenix-diagram/bundle/schemas/architecture.schema.json +329 -0
- package/dist/phoenix-diagram/bundle/schemas/class.schema.json +348 -0
- package/dist/phoenix-diagram/bundle/schemas/common.schema.json +358 -0
- package/{skills/archify → dist/phoenix-diagram/bundle}/schemas/dataflow.schema.json +36 -8
- package/dist/phoenix-diagram/bundle/schemas/erd.schema.json +384 -0
- package/dist/phoenix-diagram/bundle/schemas/lifecycle.schema.json +202 -0
- package/{skills/archify → dist/phoenix-diagram/bundle}/schemas/sequence.schema.json +41 -10
- package/dist/phoenix-diagram/bundle/schemas/timeline.schema.json +170 -0
- package/dist/phoenix-diagram/bundle/schemas/tree.schema.json +144 -0
- package/dist/phoenix-diagram/bundle/schemas/waterfall.schema.json +150 -0
- package/{skills/archify → dist/phoenix-diagram/bundle}/schemas/workflow.schema.json +42 -10
- package/dist/phoenix-diagram/bundle/scripts/phoenix-bootstrap.cjs +589 -0
- package/dist/phoenix-diagram/bundle/scripts/phoenix-diagram +6 -0
- package/dist/phoenix-diagram/bundle/scripts/phoenix-launcher.cjs +10 -0
- package/dist/phoenix-ui/THIRD-PARTY.json +164 -158
- package/dist/phoenix-ui/VERSION.json +17 -17
- package/dist/phoenix-ui/bundle/blobs/00727f7b333a7be8ac7740aa257a3a3f691db8ae545a6afab2b787acab5e88df +46 -0
- package/dist/phoenix-ui/bundle/blobs/{547e3c89d5b8feeddd67e43131fd84b95253eb42bf7d730b4e471dba011f6e51 → 00f4a6a630f31eb05fbdd5725e4a294233d24574bd70f4f32f4597d8256a7c1c} +0 -4
- package/dist/phoenix-ui/bundle/blobs/{41400e182e2180a567923d58bfa935d2799a54f2a747b2c5813c3884c84f768b → 04057592e18ea9dd3c4edcac14cde3fa5b75239c2552d4459db8e047068f61a8} +6 -7
- package/dist/phoenix-ui/bundle/blobs/{34571f7d46632205d518d15cb008457494dfad745c6b483bb11d63ca3a22ac48 → 0cb3bf26e1980b0e530373fb32edbe5864a171492a04e2abe1952ffe78bff231} +6 -7
- package/dist/phoenix-ui/bundle/blobs/{852d2943678a76c33b2f7a090d2ca6c152cd120e9ae62775fcc91519b9289011 → 0e684572eb98d24b39cd70fa23e66c163178f5a11756dcf8a98fe2335636b33f} +6 -3
- package/dist/phoenix-ui/bundle/blobs/{d17b3a454146e74ef4ecf69d7b72a8fa45c4fe1c695dffb0d36690b653cd2d8f → 10553c45c7bf38e527a57a281c4365152a768b4dd7ef597ff34ae841e9ff7d41} +6 -7
- package/dist/phoenix-ui/bundle/blobs/{e49257c0fd32b195cccb16fbfda769c007be6b38f25aceefecd23cfff9366cec → 125bc7030d7f2ba789d7b1d5f474af34f8902b764e7bc351b98f1f6f55779929} +6 -3
- package/dist/phoenix-ui/bundle/blobs/{74dbcbbad6c3831e95abb38775dd488c59ae9f1d44a95f5fd4bc0051577488fa → 13cf6c054ed424e2eb639ea12d20a4aa2b1c85eeb00afa8cbd8a30c6c22aadd8} +1 -1
- package/dist/phoenix-ui/bundle/blobs/1832ff9624cebd30370eb0e806665c656ac879215f93d33bcc0750baa47459dc +46 -0
- package/dist/phoenix-ui/bundle/blobs/{8e7de5ca347036a07f5f1e9cab942d8ff378d029bc101fa6d126406f3298c9db → 1864a10c29e7062cca5e49d1790dc7d9d8ea777bfa2ab6fd941635965cd0084d} +1 -1
- package/dist/phoenix-ui/bundle/blobs/{784722b72224a7005a80cdcd6408dd2b25b23fd9619d0f6c8788f7ac681fad4c → 1ecc81de39d28b85b95e797bcc338d4213a50231c3315a741d14571fd22c844f} +6 -7
- package/dist/phoenix-ui/bundle/blobs/{b8c614dc7c2eb30ee0f864fec116dbcafb39e5a199dce66d0c1a88b13f76265a → 2079e4146039a8dadf19a39237cbdc0b8b54ea1fa16d320716c2cbf58161c835} +1 -1
- package/dist/phoenix-ui/bundle/blobs/{dba6e4a09c5d752e5ddebe7c2c1aefc9c4b2a84e01a3178599579778ed2d09e9 → 2813aa68c0804a7fe061d88201d8a684cac9987b48511e1e2cbfe0a869a67a82} +6 -7
- package/dist/phoenix-ui/bundle/blobs/{2889c2817b5079abff254bb6d13f92dbde0fabc38be4acc7d20e613eef5e5829 → 2873e340be947c83c3d03520139b73524fd166a34063d2693d3b711021ea5b87} +6 -7
- package/dist/phoenix-ui/bundle/blobs/{64c4aa2d1c24ae5028e987498ac544020d48600a51d9654b2df562681ba480f2 → 298ef41899acefa056eccf2345378078832db6d868d2377f471f896d5c1599f9} +6 -14
- package/dist/phoenix-ui/bundle/blobs/{1b7174a6f3f49a8efc8f7fa74ff84cf8960e2646b9bc976e4129a7c8ad608faa → 2b5cef2a14a5b1256ec6de9172a4f57f227948ced1921ef86e899f48524d7fb8} +1 -1
- package/dist/phoenix-ui/bundle/blobs/{f148f630f43f3c91cf10feeda5a3c21448ca0683ce82d0fe763c1b43dee584d6 → 2d376cbbf7ec1e262614aac4f1b200e8f60e86e940c7137a2a26788bc857e509} +6 -7
- package/dist/phoenix-ui/bundle/blobs/2e5985a6eb339d70cfa25f6d2b420a0ef286caa8467f0226eb841702ec438d0b +46 -0
- package/dist/phoenix-ui/bundle/blobs/{7e199833376de5d2b6e088ee2965b448f94da842f28ccbd707e1cc3a295147c8 → 3322d691bf7b578b38723576df6b266993b2afb9e567b0cd1ded898ffe1dc17e} +1 -1
- package/dist/phoenix-ui/bundle/blobs/{f82bfc4c6bc9169d4978d5e16fb925f6e152fdd21dc6a2fae719dfdc1645581f → 3625c5c2750f117021232ce81c1e39ac5ef7c21445729327b88cf54dfc937df0} +6 -3
- package/dist/phoenix-ui/bundle/blobs/{2ceacad745665f79fd7ad5565646426a36a1b508c0469b931d0f202fad45a80b → 36310febe3e7bd4c9b21407603f2a04afefdc87b7821758bb47098b1b2876765} +6 -3
- package/dist/phoenix-ui/bundle/blobs/{24d92a176573768bfffaf8f9c6483e58bceb5bf2a095d1cdf3d3a2c0bcda0707 → 3a9c2daf4ef284ca83b0e7f6fef3a5300e273c32b20769e090463cb8a8b0b06f} +1 -1
- package/dist/phoenix-ui/bundle/blobs/{153e377c44b162cf0074698a61716db7f664db78f5635efa926bed484de4f54c → 3ce1a44efe39b93e7a39307c6a5e5f514e938fbae818e358986b4db1b05883ca} +1 -1
- package/dist/phoenix-ui/bundle/blobs/{ad8ad0b7acf6c88ef9ce0ee1a640c2200da77821f0d97d605d4f1d4a10e5897a → 403fcde498d75abec7844ee31434201152ac229f7675772164d69563f0572da4} +1 -1
- package/dist/phoenix-ui/bundle/blobs/{e8ee6c08e94b80324173d89d6f4cdc5b4829ea6858b3a11fc186588a490cada4 → 45d0e7eff0923c40296e971318756617944c4f1c97f03126cd74c0f8c629f8a4} +3 -1
- package/dist/phoenix-ui/bundle/blobs/{e23dabf908842be08751fc4e7f3b586e8c6b1ca0fc30303ec5317c77f83dcf26 → 4c0f396bfa85171f61972d3f3765733318769bb53fe06d2cdcb5d7f64578b5b8} +1 -1
- package/dist/phoenix-ui/bundle/blobs/{a5517d32c1539c388c47c00879a0d807ed2989647bfa8c0844ef22328f75f5be → 4f6563876e0e0cc51c38a06767b8800eb3238611e9fdd11e5ff9dd487c742e74} +1 -1
- package/dist/phoenix-ui/bundle/blobs/{a9d2203acd45ca33a13d5c68b02b23ed512425ac15f0e8438318ed124b43729d → 4fcada229d0c689c1a493d13184145a81ff40c498e882142ae390bda8e5b2492} +15 -0
- package/dist/phoenix-ui/bundle/blobs/5293adc55cf66068b6df20468ad9e91433fd1c48e75d66c86f874aca951a8fb9 +46 -0
- package/dist/phoenix-ui/bundle/blobs/{96e2e6bd4fcf9a2c6da65fb029f96d9176308fae2efd9d8653d3b8d838960e07 → 5436f0301ec258f3badcc6842019ee29a9b870d2727dc425fbc9cc0f4f88a284} +3 -1
- package/dist/phoenix-ui/bundle/blobs/{d0f4939e86a62b0ca437d51a997ceba7e77d64566b7fa8ca2747487e31ca819d → 54a09a4afdffca3cc135e5007716ea684dc1ed7a78349de859225c55a2fed810} +6 -7
- package/dist/phoenix-ui/bundle/blobs/{d5102701d41f7c6195d410a873f742ac72c428b04196e47df5555c5ccaf80504 → 55277fa15eb4bd2f09bf7bb24c4e79df417b06654b1e10f502c7928b192fd7cc} +6 -3
- package/dist/phoenix-ui/bundle/blobs/{878064e46af4e4109bab405f965e4149bee40bbe8912ffede10b74cec6cff027 → 567c3f42394f9aee9b048a001016a7ba9d8773d78027f8c995c379886634e719} +6 -3
- package/dist/phoenix-ui/bundle/blobs/57c8f33a7401f918566b8a4883871a69ef2223438c51f158c67f69e3250be465 +46 -0
- package/dist/phoenix-ui/bundle/blobs/{bc29e115fd337dda2cc7fc70b868dc18e426b08ec186fd270fcfe96bb2efaa5d → 61450dbef64859e3136cd17ae3e997134d5df5721d96985c4e07367f38522129} +6 -3
- package/dist/phoenix-ui/bundle/blobs/{e3c1e925be0b2deb0e3765b83ab94b86560292364f275e98bb23a8bdf2c2e049 → 656bbfda3e72b40d53b5832293dc8700ad8a784e804a6246271bf0ea23527822} +1 -1
- package/dist/phoenix-ui/bundle/blobs/{ffcaa5c58e779ec74d18bfc3013ad8003f6e7a23f629c1a3b878618961a8b6a3 → 68b454a99ba72c3b9b93ed96c4267847297169f6a5bf321b20e60d637c271068} +6 -3
- package/dist/phoenix-ui/bundle/blobs/68e44832c82b873b0aeb2da56def7b1de5f612c019445e5e28238c690124cbbe +46 -0
- package/dist/phoenix-ui/bundle/blobs/{45bbd4a8e02ca0012216c5c68e1dcd655ae0046bd50ba4295ef1f58ec4a0957c → 6b8d4c71355429a0b16bf367163fea46103a0a99b4e34f87608a39d85b1b980a} +6 -3
- package/dist/phoenix-ui/bundle/blobs/{264815d0080e4862715a4f82542e66241c6563f07259d32aed4a17bbc329b9cc → 6cef874722442de7c60ea96f4221dc54cc4250a270cd05a1e818b58c5b43e232} +6 -7
- package/dist/phoenix-ui/bundle/blobs/{2028a857c0476324a4256faf66693e2a869275e53a88d2b182a28b62c2a17893 → 7181f1f4c452c4345695f9100f6deb610f54f4c55f126043433a65b8491fc680} +6 -7
- package/dist/phoenix-ui/bundle/blobs/{ccb76aabba47938d518a5d46a09d7e70c4a9222bc391e163763f2a7f12d30437 → 75850a8c9d2a8259f71ef1f86dd5d1325415227c1887e81a3467ae1ee400979f} +1 -1
- package/dist/phoenix-ui/bundle/blobs/{4b03cdb5b17d534b5c7e84b079c066f59e8b60b9e454671a453867c4aeb9920d → 77bcc6c2d6ac00a8bfead3b6c6b5fc69f4b60bf086ebbc89271e1b23003168c9} +1 -1
- package/dist/phoenix-ui/bundle/blobs/{9520e25a381c82af6f46e175b7c347d1dc513d933dd6cf8c52570c72abb4ca7f → 792552563745d208594cf4ade19110f2c811a0e1a2661ae1ef43a185ccff5a69} +1 -1
- package/dist/phoenix-ui/bundle/blobs/{f7c8af35acf71a96056afb6afcff6a3ea42f65561f02652d04e11ad9ece9b8e9 → 7acd9b6f2f61b509c6a518508b8b52c2f0de67cdea4fd3f3d383b3ce8b38cf5e} +6 -7
- package/dist/phoenix-ui/bundle/blobs/7bacc1e3da7e8b7127ca3f8f69a2422098b9b2d23fbedefc56dfe76117c1c0e3 +46 -0
- package/dist/phoenix-ui/bundle/blobs/{78662176c1d31cec2d640f70df203f93cc1aec604cfc31619f4d2c62ab78861b → 8078b804bea630ed9c4ea07ec2f8ac92aba4128725860a66599eda90390d98f6} +6 -3
- package/dist/phoenix-ui/bundle/blobs/{2291169748fe0c4c80634dff3083e7464f82d4358b9b2186759b316e612d466f → 88b150cb804bc141b80a5687a091f61b99627155c465a27adb88546ef615af92} +6 -3
- package/dist/phoenix-ui/bundle/blobs/{bde88bf5ac59d744440d9b65f95ceaae01c803b101d48e6afd644a06eeb5de63 → 90f8b07ec12b78e633e306322cda58415aea70d8e0f9ff85bd439361c01dabe1} +6 -3
- package/dist/phoenix-ui/bundle/blobs/{486145071d3445e82774f1b39b2bb15986ce52277e798a31ef7e9c27afb42af3 → 95b2944686e8258a655c3b5e6db68593e24e5199354e46aac553918ea2c0f55a} +1 -1
- package/dist/phoenix-ui/bundle/blobs/{a1998e37084c11f496d4970f86a85d5a6375bbeaa4797b9f42bbac2d44048d23 → 979639f0e8859d600a8db57e733566d9ad37ff8258c3e05a6f9c0f3008e92373} +1 -1
- package/dist/phoenix-ui/bundle/blobs/{3173293607055ea6e1a153ec6f51fb8154782157c8a61abf411da1f41be61728 → 9eaaa00049844060f842fe7fb73cc8edc4be5225cf38a96f33bda3ffc381456c} +6 -7
- package/dist/phoenix-ui/bundle/blobs/{69086f7cb235b35ccc230e1f2da41cbb10cea8f0636b6d4514672113a3adc2cb → a420bbda622399399a6b5c7c3614dcaebc6c62faceaf7b3c83c97db53d26b165} +1 -1
- package/dist/phoenix-ui/bundle/blobs/a63054b8920905045753facece83f154bf806158c6f46ef380036e7a82d4fde5 +46 -0
- package/dist/phoenix-ui/bundle/blobs/{e802e4f7bdc89050a9c0f2ca506e1d493a2316e6e810c0336c57aa073717ef3e → a63788c764b0e4fdcbc029d46093016310edcbcf702d62688e5aaac7ddeee6fd} +3 -1
- package/dist/phoenix-ui/bundle/blobs/{827a211ea03d2cb44b4ea1bc81ba1a6dc51a87fa16d6692997c4e4751241c815 → acfc4c26b135d5b27fc0930738486c9d43d379704102fab45564320180942e4b} +4 -2
- package/dist/phoenix-ui/bundle/blobs/{8da14f3eabac53c990a66e721387367b46cb676cc4204e8c67d6f88c95a6217f → ad243ca615349127aa422bccc1a6604ad17149735659087ca5bab3c5fae97f4e} +6 -7
- package/dist/phoenix-ui/bundle/blobs/b63931066e2b2623d012e1a3c1a0769cc43ed6640460c3899669b45539d6a20d +46 -0
- package/dist/phoenix-ui/bundle/blobs/{bb65af58ecc3e0c0093dc9a705a7ab643035e4e592c3adb93583c82d1aef1f51 → bde793ab5ad776f7e6f6d25ce2b838c1b5022054a1dad5502a873423eb0ad917} +6 -7
- package/dist/phoenix-ui/bundle/blobs/{8de7c97949b0bc4194b3be7645e4b13e9419767927482d01cf19476f6cbeda14 → c0a70ab2889e5c16e1f09249aefad948ce352c42cfe2b5afb758a4524e1b21b6} +6 -3
- package/dist/phoenix-ui/bundle/blobs/{60b2914df394800688c4e20f4eb34e117cd430df9954cf4d48574734507723f4 → c9ee9006ae6c0194a5d39a9f0cb275c52d74a71ea3f6dc2b4c1c7bd89f48a2c0} +1 -1
- package/dist/phoenix-ui/bundle/blobs/{6d8315e307eab11d3236935daf7267746cce6da3b51296e6999651ac97bda3a3 → cadc2daefcf238aab981fa56388381d3d5ab9c0686bb9dd8187035c9933dfcee} +6 -3
- package/dist/phoenix-ui/bundle/blobs/{d7b744fcc95164d96d9f811a93e2e8a374887146eb762ef775f3d3c7f27abc8d → cbea5728b90f58ff047be6ec4f14eed9d63c7148f5db99b5f147d2f17b472317} +1 -1
- package/dist/phoenix-ui/bundle/blobs/d408a4fea71b656aa8a5f6b5c037815a6e4229df336629ebddf4b5c85ed82fac +46 -0
- package/dist/phoenix-ui/bundle/blobs/{6ff950a5729ad9ea480ddf8c1b489b1c84189bbf7d6034b3b5a98e7c11a28cec → d9ae0c782d8a77787561536c0d7bc3b61175d59303f3cb8c20796f85140c6984} +1 -1
- package/dist/phoenix-ui/bundle/blobs/{1d53e2226465b1047faec7cda2e743e61540ea69e073a3a4057e8d86b277405f → e2932d63eb7f52a82960a19ba79bc800ef4f212164e098f96dee7a4326302f38} +1 -1
- package/dist/phoenix-ui/bundle/blobs/{fa576f6655b235bdea535198647305b7a3855e810180cbdf5d4c246c03c7d190 → e381bcfec42ac541d574011460600cf0818aa0e3362e8c6d205b4157890bf821} +6 -7
- package/dist/phoenix-ui/bundle/blobs/{8fbce5b4859e6011afa83b1c07c4436589cd7181f9cb997538f4c27f196d0d34 → e415657d8725d9b60ece42cc18581da177c42fc47cb11e501db722a5f524ecf7} +6 -7
- package/dist/phoenix-ui/bundle/blobs/{546a8428a2d8628bb3496fadb8c36a6dd65a33464291f214ceb581828f37081b → e46d63e5f8a6ead1d44c8b6302a0c7247af8585b975ab5715518381777622ede} +6 -3
- package/dist/phoenix-ui/bundle/blobs/ee63b3f9b354d69443d05ea4a338af56546897335ace7533546e10be56ea2207 +46 -0
- package/dist/phoenix-ui/bundle/blobs/{c23617601e9c4d97b775c175a5ce1642c40459b157d0821609fe1d253b83ced8 → ef7d57633252f4604749447608850e299c277f7dd1a32776685df0724b1051c8} +6 -7
- package/dist/phoenix-ui/bundle/blobs/{0581c8428246f43c5374393878a29e38f2b1865df87e6f13f2309b8eae54e76f → f0652c6ce41e6949133360178f192ea4ee9f6129a018c7a8b6652870c2330392} +1 -1
- package/dist/phoenix-ui/bundle/blobs/{cfac9eaf96481a8874391e5cecc6149abea1f1f19622f77f1ebb9e1876720e91 → f06c9d797ca2ac8c6a49d3dcd2e99d1b4df8bc9637a49c7e80f3161f49d06b1b} +4 -2
- package/dist/phoenix-ui/bundle/blobs/{d50780cb0a345051ae3fb12c5f8249a5dac9324d6a1963f04d03aaf769ffc27c → f077545caeb3ecb9f51a3f703a09736ca924869f4b4345c1b1ffbd9bf927a287} +6 -3
- package/dist/phoenix-ui/bundle/blobs/f781c5874bcd79ebe1b3b012275b9af7eae6c4867e9a16e29bb3d3ed3dc1940b +46 -0
- package/dist/phoenix-ui/bundle/blobs/fa10c0c926997387c89b7c1070e25b1b2b53ee891741e3c450a89ec6c6dcaf7d +46 -0
- package/dist/phoenix-ui/bundle/blobs/fb1a36ab7116b0c6709b89720cdded29d80982114c2f87cad614e01e126270dd +46 -0
- package/dist/phoenix-ui/bundle/blobs/fbd3214fc12ba70d9c69a995742ba73dc5365823af63afdc93c0c8a8f0c484af +46 -0
- package/dist/phoenix-ui/bundle/blobs/{77682e9d63b484f94a699f2c0b393e4540797d311362c384a3d643aec11d6985 → fea19b8381ec10ff8ed1923a336332974bbb552227ed215e7ddaaf0ec0112c1d} +1 -1
- package/dist/phoenix-ui/bundle/manifest.json +126 -126
- package/docs/phoenix-diagram.md +173 -0
- package/docs/phoenix-ui.md +40 -12
- package/package.json +14 -10
- package/skills/agi-mode/SKILL.md +3 -1
- package/skills/agi-mode/assets/sdlc/event.md +4 -5
- package/skills/agi-mode/assets/sdlc/object-status.md +1 -1
- package/skills/agi-mode/assets/sdlc/protocol.md +4 -2
- package/skills/agi-mode/evals/scenarios.md +108 -3
- package/skills/agi-mode/playbooks/authoring-a-skill.md +13 -2
- package/skills/agi-mode/playbooks/eval.md +19 -3
- package/skills/agi-mode/playbooks/hillclimb.md +4 -2
- package/skills/agi-mode/playbooks/reflection.md +1 -1
- package/skills/agi-mode/playbooks/sdlc.md +10 -6
- package/skills/agi-mode/playbooks/what-next.md +6 -2
- package/skills/agi-mode/references/eval-protocol.md +13 -4
- package/skills/agi-mode/references/interface-design.md +1 -0
- package/skills/agi-mode/references/remote-evolution.md +178 -0
- package/skills/agi-mode/references/skill-evolution.md +2 -0
- package/skills/agi-mode/scripts/evolution/compare.py +569 -0
- package/skills/agi-mode/scripts/evolution/evolution.py +2886 -0
- package/skills/agi-mode/scripts/evolution/examples/public-smoke.json +128 -0
- package/skills/agi-mode/scripts/evolution/examples/quality-calibration.json +128 -0
- package/skills/agi-mode/scripts/evolution/examples/quality-rubric.json +133 -0
- package/skills/agi-mode/scripts/evolution/protocol.py +1586 -0
- package/skills/agi-mode/scripts/evolution/pyproject.toml +16 -0
- package/skills/agi-mode/scripts/evolution/quality.py +689 -0
- package/skills/agi-mode/scripts/evolution/remote.py +2303 -0
- package/skills/agi-mode/scripts/evolution/tests/support.py +201 -0
- package/skills/agi-mode/scripts/evolution/tests/test_apply.py +643 -0
- package/skills/agi-mode/scripts/evolution/tests/test_bounded_exploration.py +236 -0
- package/skills/agi-mode/scripts/evolution/tests/test_bundles.py +414 -0
- package/skills/agi-mode/scripts/evolution/tests/test_calibration.py +460 -0
- package/skills/agi-mode/scripts/evolution/tests/test_compare.py +377 -0
- package/skills/agi-mode/scripts/evolution/tests/test_protocol.py +357 -0
- package/skills/agi-mode/scripts/evolution/tests/test_quality.py +647 -0
- package/skills/agi-mode/scripts/evolution/tests/test_remote.py +857 -0
- package/skills/agi-mode/scripts/evolution/tests/test_search.py +1109 -0
- package/skills/agi-mode/scripts/evolution/tests/test_typesafe.py +624 -0
- package/skills/agi-mode/scripts/evolution/tests/test_verifier_context.py +132 -0
- package/skills/agi-mode/scripts/evolution/typesafe_worker.py +145 -0
- package/skills/agi-mode/scripts/evolution/uv.lock +2548 -0
- package/skills/apply-code-review/SKILL.md +1 -0
- package/skills/apply-code-review/agents/openai.yaml +2 -0
- package/skills/apply-doc-review/SKILL.md +1 -0
- package/skills/apply-doc-review/agents/openai.yaml +2 -0
- package/skills/apply-ui-review/SKILL.md +1 -0
- package/skills/apply-ui-review/agents/openai.yaml +2 -0
- package/skills/autoresearch/SKILL.md +1 -0
- package/skills/clean-artifacts/SKILL.md +52 -0
- package/skills/clean-artifacts/agents/openai.yaml +4 -0
- package/skills/clean-artifacts/evals/scenarios.md +13 -0
- package/skills/clean-artifacts/references/history-cleanup.md +41 -0
- package/skills/crd/SKILL.md +100 -65
- package/skills/crd/assets/cr-template.md +15 -0
- package/skills/crd-respond/SKILL.md +17 -5
- package/skills/crd-respond/agents/openai.yaml +2 -2
- package/skills/crd-respond/assets/response-template.md +7 -0
- package/skills/crd-respond/evals/scenarios.md +7 -0
- package/skills/create-verification-skill/SKILL.md +1 -0
- package/skills/debugging/SKILL.md +1 -0
- package/skills/design-md/SKILL.md +1 -0
- package/skills/design-reference/SKILL.md +6 -2
- package/skills/design-reference/evals/scenarios.md +4 -0
- package/skills/dev-plan/SKILL.md +11 -6
- package/skills/dev-plan/references/execution-workflow.md +1 -1
- package/skills/dev-plan/references/plan-skeleton.md +234 -69
- package/skills/dev-plan/scripts/check_plan.py +1 -1
- package/skills/documentation-writer/SKILL.md +19 -14
- package/skills/documentation-writer/references/architecture.md +6 -2
- package/skills/documentation-writer/references/user-manual.md +2 -2
- package/skills/elintp/SKILL.md +12 -6
- package/skills/experience-capture/SKILL.md +1 -0
- package/skills/gdpr-compliant/SKILL.md +1 -0
- package/skills/kpi-dashboard-design/SKILL.md +1 -0
- package/skills/landing-page-conversion-audit/SKILL.md +1 -0
- package/skills/mcp-release-qa/SKILL.md +2 -1
- package/skills/meeting-minutes/SKILL.md +1 -0
- package/skills/optimize-agents-md/SKILL.md +128 -0
- package/skills/optimize-agents-md/assets/coding-principles.md +118 -0
- package/skills/phoenix-diagram/ENGINE.json +39 -0
- package/skills/phoenix-diagram/SKILL.md +109 -0
- package/skills/phoenix-diagram/examples/legacy.agent-tool-call.workflow.json +94 -0
- package/skills/phoenix-diagram/examples/legacy.async-job-roundtrip.sequence.json +61 -0
- package/skills/phoenix-diagram/examples/legacy.deployment-release.lifecycle.json +49 -0
- package/skills/phoenix-diagram/examples/legacy.product-analytics.dataflow.json +76 -0
- package/skills/{archify/test/fixtures/v1-baseline/web-app.architecture.json → phoenix-diagram/examples/legacy.web-app.architecture.json} +16 -11
- package/skills/phoenix-diagram/examples/minimal.architecture.json +11 -0
- package/skills/phoenix-diagram/examples/minimal.class.json +23 -0
- package/skills/phoenix-diagram/examples/minimal.dataflow.json +11 -0
- package/skills/phoenix-diagram/examples/minimal.erd.json +25 -0
- package/skills/phoenix-diagram/examples/minimal.lifecycle.json +11 -0
- package/skills/phoenix-diagram/examples/minimal.sequence.json +13 -0
- package/skills/phoenix-diagram/examples/minimal.timeline.json +15 -0
- package/skills/phoenix-diagram/examples/minimal.tree.json +13 -0
- package/skills/phoenix-diagram/examples/minimal.waterfall.json +12 -0
- package/skills/phoenix-diagram/examples/minimal.workflow.json +12 -0
- package/skills/phoenix-diagram/references/architecture-compare.md +111 -0
- package/skills/phoenix-diagram/references/authoring-defaults.md +42 -0
- package/skills/phoenix-diagram/references/brand-marks.md +52 -0
- package/skills/phoenix-diagram/references/compatibility.md +22 -0
- package/skills/phoenix-diagram/references/delivery-contract.md +127 -0
- package/skills/phoenix-diagram/references/extending-types.md +14 -0
- package/skills/phoenix-diagram/references/migration.md +57 -0
- package/skills/phoenix-diagram/references/preview.md +45 -0
- package/skills/phoenix-diagram/references/repository-authoring.md +29 -0
- package/skills/phoenix-diagram/references/viewer-runtime.md +27 -0
- package/skills/phoenix-diagram/schemas/README.md +23 -0
- package/skills/phoenix-diagram/schemas/architecture.schema.json +329 -0
- package/skills/phoenix-diagram/schemas/class.schema.json +348 -0
- package/skills/phoenix-diagram/schemas/common.schema.json +358 -0
- package/skills/{archify/schemas/lifecycle.schema.json → phoenix-diagram/schemas/dataflow.schema.json} +63 -58
- package/skills/phoenix-diagram/schemas/erd.schema.json +384 -0
- package/skills/phoenix-diagram/schemas/lifecycle.schema.json +202 -0
- package/skills/phoenix-diagram/schemas/sequence.schema.json +254 -0
- package/skills/phoenix-diagram/schemas/timeline.schema.json +170 -0
- package/skills/phoenix-diagram/schemas/tree.schema.json +144 -0
- package/skills/phoenix-diagram/schemas/waterfall.schema.json +150 -0
- package/skills/phoenix-diagram/schemas/workflow.schema.json +460 -0
- package/skills/phoenix-diagram/scripts/phoenix-bootstrap.cjs +589 -0
- package/skills/phoenix-diagram/scripts/phoenix-diagram +6 -0
- package/skills/phoenix-diagram/scripts/phoenix-launcher.cjs +10 -0
- package/skills/phoenix-ui/GENERATED.json +255 -240
- package/skills/phoenix-ui/SKILL.md +7 -4
- package/skills/phoenix-ui/evals/scenarios.md +8 -1
- package/skills/phoenix-ui/reference/craft-floor.md +3 -1
- package/skills/phoenix-ui/reference/critique.md +6 -14
- package/skills/phoenix-ui/reference/init.md +1 -1
- package/skills/phoenix-ui/reference/live.md +1 -1
- package/skills/phoenix-ui/reference/operate.md +15 -0
- package/skills/phoenix-ui/scripts/ENGINE.json +17 -17
- package/skills/phoenix-ui/scripts/phoenix-bootstrap.cjs +0 -4
- package/skills/portal-app-exchange/SKILL.md +1 -0
- package/skills/portal-dev-setup/SKILL.md +71 -12
- package/skills/portal-dev-setup/scripts/onebox.sh +69 -6
- package/skills/portal-external-app/SKILL.md +55 -16
- package/skills/portal-external-app/references/config-placement.md +108 -2
- package/skills/portal-external-app/references/registration-and-onebox.md +56 -2
- package/skills/portal-logging/SKILL.md +1 -0
- package/skills/portal-micro-app/SKILL.md +2 -1
- package/skills/portal-micro-app/references/sdk-reference.md +3 -1
- package/skills/prd/SKILL.md +238 -159
- package/skills/prd/evals/scenarios.md +13 -0
- package/skills/prd/references/prd-skeleton.md +14 -4
- package/skills/react/SKILL.md +1 -0
- package/skills/resolve-blocked/SKILL.md +46 -19
- package/skills/resolve-blocked/agents/openai.yaml +2 -2
- package/skills/resolve-blocked/evals/scenarios.md +22 -0
- package/skills/resolve-blocked/references/decisions-contract.md +7 -4
- package/skills/review-code/SKILL.md +308 -46
- package/skills/review-code/agents/openai.yaml +2 -0
- package/skills/review-dev-plan/SKILL.md +88 -33
- package/skills/review-dev-plan/agents/openai.yaml +2 -0
- package/skills/review-dev-plan/references/report-contract.md +53 -19
- package/skills/review-dev-plan/references/review-lenses.md +2 -1
- package/skills/review-prd/SKILL.md +90 -34
- package/skills/review-prd/agents/openai.yaml +2 -0
- package/skills/review-prd/references/report-contract.md +54 -18
- package/skills/review-prd-dev-gaps/SKILL.md +1 -0
- package/skills/review-prd-dev-gaps/agents/openai.yaml +2 -0
- package/skills/review-ui/SKILL.md +369 -71
- package/skills/review-ui/agents/openai.yaml +2 -0
- package/skills/review-ui/evals/scenarios.md +2 -0
- package/skills/rust/SKILL.md +76 -84
- package/skills/rust/references/api-design.md +97 -0
- package/skills/rust/references/{chapter_10.md → async-tokio.md} +42 -18
- package/skills/rust/references/behavioral-patterns.md +49 -0
- package/skills/rust/references/bevy.md +95 -0
- package/skills/rust/references/{chapter_02.md → clippy-and-linting.md} +26 -15
- package/skills/rust/references/{chapter_01.md → coding-idioms.md} +58 -7
- package/skills/rust/references/crates-and-dependencies.md +66 -0
- package/skills/rust/references/{chapter_08.md → documentation.md} +30 -3
- package/skills/rust/references/{chapter_04.md → error-handling.md} +32 -6
- package/skills/rust/references/{chapter_06.md → generics-and-dispatch.md} +28 -11
- package/skills/rust/references/macros.md +45 -0
- package/skills/rust/references/{chapter_03.md → performance.md} +25 -2
- package/skills/rust/references/{chapter_09.md → pointers-and-ownership.md} +37 -17
- package/skills/rust/references/{chapter_05.md → testing.md} +18 -2
- package/skills/rust/references/{chapter_07.md → type-state.md} +5 -1
- package/skills/rust/references/unsafe-and-ffi.md +56 -0
- package/skills/rust-port/SKILL.md +144 -0
- package/skills/rust-review/SKILL.md +177 -0
- package/skills/security-audit/SKILL.md +1 -0
- package/skills/spec-human-decision/SKILL.md +1 -0
- package/skills/sql-optimization/SKILL.md +1 -0
- package/skills/story-points/SKILL.md +1 -0
- package/skills/swarm/SKILL.md +1 -0
- package/skills/test-plan/SKILL.md +1 -0
- package/skills/ui-loop/SKILL.md +39 -0
- package/skills/ui-loop/agents/openai.yaml +3 -0
- package/skills/ui-pattern-research/SKILL.md +1 -0
- package/skills/use-llm-gateway/SKILL.md +58 -0
- package/skills/use-llm-gateway/agents/openai.yaml +4 -0
- package/skills/use-llm-gateway/references/api.md +129 -0
- package/skills/use-llm-gateway/references/recovery.md +86 -0
- package/skills/use-prompt-dsl/SKILL.md +165 -0
- package/skills/use-prompt-dsl/references/examples.md +726 -0
- package/skills/use-prompt-dsl/references/language.md +938 -0
- package/skills/use-rustify-docs/SKILL.md +60 -0
- package/skills/use-rustify-docs/agents/openai.yaml +4 -0
- package/skills/use-rustify-docs/references/rustify-docs.md +138 -0
- package/skills/use-task-gateway/SKILL.md +60 -0
- package/skills/use-task-gateway/agents/openai.yaml +3 -0
- package/skills/use-task-gateway/references/authentication.md +75 -0
- package/skills/use-task-gateway/references/task-api.md +121 -0
- package/skills/use-task-gateway/references/workers.md +85 -0
- package/skills/use-task-gateway/references/workflow-actions.md +66 -0
- package/skills/use-workflow-service/SKILL.md +57 -0
- package/skills/use-workflow-service/agents/openai.yaml +3 -0
- package/skills/use-workflow-service/references/action-provider.md +84 -0
- package/skills/use-workflow-service/references/authentication.md +76 -0
- package/skills/use-workflow-service/references/authoring.md +62 -0
- package/skills/use-workflow-service/references/mcp.md +47 -0
- package/skills/use-workflow-service/references/open-api.md +88 -0
- package/skills/use-workflow-service/references/orchestration-choice.md +63 -0
- package/skills/working-with-mbx/SKILL.md +1 -0
- package/skills/working-with-mise/SKILL.md +1 -0
- package/skills/xgent-app-release/SKILL.md +114 -16
- package/skills/xgent-app-release/references/build-and-package.md +2 -1
- package/skills/xgent-app-release/references/publish-api.md +6 -1
- package/skills/xgent-app-release/references/troubleshooting.md +2 -1
- package/skills/xgent-app-release/references/verify-preflight.mjs +21 -1
- package/skills/xgent-app-release/scripts/preflight.mjs +42 -3
- package/skills/xgent-image-push/SKILL.md +1 -0
- package/skills/xgent-init/SKILL.md +1 -0
- package/docs/claude-context-goal-guard.md +0 -124
- package/docs/codex-context-goal-guard.md +0 -109
- package/hooks/claude/context-goal-guard.js +0 -139
- package/hooks/claude/settings.example.json +0 -26
- package/hooks/codex/context-goal-guard.py +0 -189
- package/hooks/codex/hooks.example.json +0 -26
- package/skills/archify/SKILL.md +0 -137
- package/skills/archify/assets/template.html +0 -14937
- package/skills/archify/bin/archify.mjs +0 -2139
- package/skills/archify/bin/open-artifact.mjs +0 -86
- package/skills/archify/bin/preview.mjs +0 -653
- package/skills/archify/bin/visual-check.mjs +0 -829
- package/skills/archify/brand-marks/README.md +0 -31
- package/skills/archify/brand-marks/catalog.json +0 -131
- package/skills/archify/delta/architecture-delta.mjs +0 -1232
- package/skills/archify/examples/agent-run.lifecycle.json +0 -60
- package/skills/archify/examples/brand-aware-delivery.architecture.json +0 -47
- package/skills/archify/examples/cache-miss-request.sequence.json +0 -82
- package/skills/archify/examples/checkout-platform.base.architecture.json +0 -31
- package/skills/archify/examples/checkout-platform.head.architecture.json +0 -31
- package/skills/archify/examples/dataflow-product-analytics.html +0 -15048
- package/skills/archify/examples/event-stream.dataflow.json +0 -57
- package/skills/archify/examples/incident-response.workflow.json +0 -64
- package/skills/archify/examples/lifecycle-agent-run.html +0 -14983
- package/skills/archify/examples/production-deployment.architecture.json +0 -71
- package/skills/archify/examples/release-delivery.workflow.json +0 -62
- package/skills/archify/examples/sequence-cache-miss-request.html +0 -15063
- package/skills/archify/examples/web-app-rendered.html +0 -15012
- package/skills/archify/examples/workflow-agent-tool-call-rendered.html +0 -15054
- package/skills/archify/migrations/workflow-v2.mjs +0 -279
- package/skills/archify/package-lock.json +0 -149
- package/skills/archify/package.json +0 -39
- package/skills/archify/recipes/scenarios.mjs +0 -391
- package/skills/archify/references/authoring-contract.md +0 -247
- package/skills/archify/references/brand-marks.md +0 -65
- package/skills/archify/references/delivery-contract.md +0 -138
- package/skills/archify/references/viewer-runtime.md +0 -45
- package/skills/archify/renderers/architecture/grid.mjs +0 -62
- package/skills/archify/renderers/architecture/render-architecture.mjs +0 -1078
- package/skills/archify/renderers/dataflow/README.md +0 -104
- package/skills/archify/renderers/dataflow/render-dataflow.mjs +0 -483
- package/skills/archify/renderers/lifecycle/README.md +0 -115
- package/skills/archify/renderers/lifecycle/render-lifecycle.mjs +0 -561
- package/skills/archify/renderers/sequence/README.md +0 -114
- package/skills/archify/renderers/sequence/render-sequence.mjs +0 -464
- package/skills/archify/renderers/shared/brand-marks.mjs +0 -563
- package/skills/archify/renderers/shared/cli.mjs +0 -218
- package/skills/archify/renderers/shared/desktop-readability.mjs +0 -26
- package/skills/archify/renderers/shared/diagnostics.mjs +0 -160
- package/skills/archify/renderers/shared/engineering-profiles.mjs +0 -157
- package/skills/archify/renderers/shared/generated-brand-marks.mjs +0 -2003
- package/skills/archify/renderers/shared/generated-validators.mjs +0 -13
- package/skills/archify/renderers/shared/geometry.mjs +0 -1423
- package/skills/archify/renderers/shared/i18n.mjs +0 -595
- package/skills/archify/renderers/shared/layout-report.mjs +0 -40
- package/skills/archify/renderers/shared/legend.mjs +0 -217
- package/skills/archify/renderers/shared/output-path.mjs +0 -340
- package/skills/archify/renderers/shared/repository-evidence.mjs +0 -239
- package/skills/archify/renderers/shared/repository-location.mjs +0 -58
- package/skills/archify/renderers/shared/text-fit.mjs +0 -49
- package/skills/archify/renderers/shared/utils.mjs +0 -232
- package/skills/archify/renderers/shared/validator.mjs +0 -86
- package/skills/archify/renderers/workflow/README.md +0 -223
- package/skills/archify/renderers/workflow/render-workflow.mjs +0 -35
- package/skills/archify/renderers/workflow/workflow-compiler.mjs +0 -4400
- package/skills/archify/renderers/workflow/workflow-migration-geometry.mjs +0 -144
- package/skills/archify/schemas/README.md +0 -211
- package/skills/archify/schemas/architecture.schema.json +0 -178
- package/skills/archify/schemas/common.schema.json +0 -115
- package/skills/archify/scripts/check-render-output.mjs +0 -916
- package/skills/archify/scripts/check-update.mjs +0 -1667
- package/skills/archify/scripts/generate-brand-marks.mjs +0 -141
- package/skills/archify/scripts/generate-validators.mjs +0 -66
- package/skills/archify/scripts/render-examples.mjs +0 -26
- package/skills/archify/scripts/update-contract.mjs +0 -182
- package/skills/archify/skill-release.json +0 -10
- package/skills/archify/test/adaptive-reader-layout.test.mjs +0 -86
- package/skills/archify/test/animation.test.mjs +0 -179
- package/skills/archify/test/architecture-compare-recovery.test.mjs +0 -157
- package/skills/archify/test/architecture-delta-markers.test.mjs +0 -137
- package/skills/archify/test/architecture-delta.test.mjs +0 -705
- package/skills/archify/test/artifact-receipt-flush.test.mjs +0 -126
- package/skills/archify/test/authored-reachability.test.mjs +0 -95
- package/skills/archify/test/authoring-safety-contract.test.mjs +0 -54
- package/skills/archify/test/automatic-port-spread.test.mjs +0 -376
- package/skills/archify/test/base-input-compatibility.test.mjs +0 -42
- package/skills/archify/test/brand-marks.test.mjs +0 -678
- package/skills/archify/test/chapter-delta-preview.test.mjs +0 -157
- package/skills/archify/test/chapter-handoff.test.mjs +0 -97
- package/skills/archify/test/chapter-rail.test.mjs +0 -86
- package/skills/archify/test/checkout-line-endings.test.mjs +0 -72
- package/skills/archify/test/ci-scope.test.mjs +0 -59
- package/skills/archify/test/clean-skill-staging.test.mjs +0 -440
- package/skills/archify/test/cli-output-types.test.mjs +0 -201
- package/skills/archify/test/cli.test.mjs +0 -986
- package/skills/archify/test/community-proof-intake.test.mjs +0 -125
- package/skills/archify/test/cursor-onboarding.test.mjs +0 -74
- package/skills/archify/test/degraded.test.mjs +0 -161
- package/skills/archify/test/delivery-contract.test.mjs +0 -52
- package/skills/archify/test/desktop-reader-browser.test.mjs +0 -80
- package/skills/archify/test/diagram-guide.test.mjs +0 -92
- package/skills/archify/test/engineering-profile.test.mjs +0 -209
- package/skills/archify/test/export-browser.test.mjs +0 -305
- package/skills/archify/test/export-cleanup-browser.test.mjs +0 -294
- package/skills/archify/test/finder-browser.test.mjs +0 -274
- package/skills/archify/test/finder.test.mjs +0 -104
- package/skills/archify/test/fixtures/automatic-routing-node-border-clearance.workflow.json +0 -40
- package/skills/archify/test/fixtures/fail-migration-cleanup.mjs +0 -17
- package/skills/archify/test/fixtures/issue-126/custom-widths.workflow.json +0 -18
- package/skills/archify/test/fixtures/issue-126/explicit-route.workflow.json +0 -28
- package/skills/archify/test/fixtures/issue-126/explicit-viewbox.workflow.json +0 -19
- package/skills/archify/test/fixtures/issue-126/labels.workflow.json +0 -18
- package/skills/archify/test/fixtures/v1-baseline/agent-run.lifecycle.json +0 -64
- package/skills/archify/test/fixtures/v1-baseline/agent-tool-call.workflow.json +0 -88
- package/skills/archify/test/fixtures/v1-baseline/cache-miss-request.sequence.json +0 -75
- package/skills/archify/test/fixtures/v1-baseline/event-stream.dataflow.json +0 -57
- package/skills/archify/test/fixtures/v1-baseline/product-analytics.dataflow.json +0 -70
- package/skills/archify/test/fixtures/v1-baseline/production-deployment.architecture.json +0 -71
- package/skills/archify/test/fixtures/v1-workflow-700x400.workflow.json +0 -22
- package/skills/archify/test/fixtures/v1-workflow-explicit-coordinates.workflow.json +0 -47
- package/skills/archify/test/focus-browser.test.mjs +0 -226
- package/skills/archify/test/gallery.test.mjs +0 -130
- package/skills/archify/test/generate-validators.test.mjs +0 -59
- package/skills/archify/test/generate-viewer.test.mjs +0 -165
- package/skills/archify/test/generated-artifact-xml.test.mjs +0 -88
- package/skills/archify/test/geometry.test.mjs +0 -739
- package/skills/archify/test/golden.mjs +0 -207
- package/skills/archify/test/grid.test.mjs +0 -47
- package/skills/archify/test/guide-page.test.mjs +0 -85
- package/skills/archify/test/guide.test.mjs +0 -81
- package/skills/archify/test/guided-views-browser.test.mjs +0 -460
- package/skills/archify/test/guided-views.test.mjs +0 -144
- package/skills/archify/test/helpers/desktop-browser.mjs +0 -48
- package/skills/archify/test/helpers/offline-fonts.mjs +0 -76
- package/skills/archify/test/helpers/viewer-click.mjs +0 -72
- package/skills/archify/test/helpers/xml.mjs +0 -37
- package/skills/archify/test/i18n.test.mjs +0 -422
- package/skills/archify/test/intent-trace-browser.test.mjs +0 -284
- package/skills/archify/test/intent-trace.test.mjs +0 -111
- package/skills/archify/test/landing.test.mjs +0 -97
- package/skills/archify/test/layout-rules.test.mjs +0 -1498
- package/skills/archify/test/legend-contract.test.mjs +0 -404
- package/skills/archify/test/motion-governor-browser.test.mjs +0 -342
- package/skills/archify/test/motion-governor.test.mjs +0 -111
- package/skills/archify/test/offline-font-browser.test.mjs +0 -210
- package/skills/archify/test/offline-self-containment.test.mjs +0 -80
- package/skills/archify/test/open-artifact.test.mjs +0 -118
- package/skills/archify/test/ordinary-model-floor.test.mjs +0 -1052
- package/skills/archify/test/output-path.test.mjs +0 -587
- package/skills/archify/test/presentation.test.mjs +0 -71
- package/skills/archify/test/preset-tryon.test.mjs +0 -113
- package/skills/archify/test/preview-contract.test.mjs +0 -40
- package/skills/archify/test/preview.test.mjs +0 -530
- package/skills/archify/test/proof-aperture.test.mjs +0 -78
- package/skills/archify/test/reach-share-card.test.mjs +0 -149
- package/skills/archify/test/reader-layout-browser.test.mjs +0 -320
- package/skills/archify/test/readme-showcase.test.mjs +0 -319
- package/skills/archify/test/real-repository-proof.test.mjs +0 -209
- package/skills/archify/test/relationship-direct-explorer.test.mjs +0 -115
- package/skills/archify/test/relationship-lens.test.mjs +0 -128
- package/skills/archify/test/relationship-permalink.test.mjs +0 -130
- package/skills/archify/test/relationship-pulse.test.mjs +0 -122
- package/skills/archify/test/release-identity.test.mjs +0 -476
- package/skills/archify/test/release-package-gates.test.mjs +0 -750
- package/skills/archify/test/render-output-checks.test.mjs +0 -588
- package/skills/archify/test/renderer-diagnostic-boundary.test.mjs +0 -107
- package/skills/archify/test/repair-receipt.test.mjs +0 -181
- package/skills/archify/test/repository-evidence-replacement.test.mjs +0 -136
- package/skills/archify/test/repository-evidence.test.mjs +0 -605
- package/skills/archify/test/repository-language-metadata.test.mjs +0 -67
- package/skills/archify/test/route-journey.test.mjs +0 -125
- package/skills/archify/test/route-probe-browser.test.mjs +0 -363
- package/skills/archify/test/route-probe.test.mjs +0 -114
- package/skills/archify/test/route-share-card.test.mjs +0 -163
- package/skills/archify/test/semantic-camera.test.mjs +0 -88
- package/skills/archify/test/semantic-flow.test.mjs +0 -90
- package/skills/archify/test/semantic-legend-gateway.test.mjs +0 -156
- package/skills/archify/test/semantic-lens-browser.test.mjs +0 -372
- package/skills/archify/test/semantic-lens.test.mjs +0 -103
- package/skills/archify/test/semantic-passport.test.mjs +0 -99
- package/skills/archify/test/semantic-radar.test.mjs +0 -735
- package/skills/archify/test/semantic-zoom.test.mjs +0 -86
- package/skills/archify/test/sequence-column-fit.test.mjs +0 -137
- package/skills/archify/test/settled-flow.test.mjs +0 -97
- package/skills/archify/test/share-card-export.test.mjs +0 -132
- package/skills/archify/test/site-language-continuity.test.mjs +0 -569
- package/skills/archify/test/site-language-integration.mjs +0 -9
- package/skills/archify/test/skill-metadata.test.mjs +0 -84
- package/skills/archify/test/stable-update-manifest.test.mjs +0 -167
- package/skills/archify/test/start-page.test.mjs +0 -312
- package/skills/archify/test/story-beat-navigator.test.mjs +0 -103
- package/skills/archify/test/story-carrier.test.mjs +0 -90
- package/skills/archify/test/story-director-strip.test.mjs +0 -91
- package/skills/archify/test/story-follow-camera.test.mjs +0 -103
- package/skills/archify/test/story-horizon.test.mjs +0 -91
- package/skills/archify/test/story-moment-link.test.mjs +0 -93
- package/skills/archify/test/story-shelf.test.mjs +0 -84
- package/skills/archify/test/story-trail.test.mjs +0 -81
- package/skills/archify/test/toolbar-polish.test.mjs +0 -57
- package/skills/archify/test/update-contract.test.mjs +0 -133
- package/skills/archify/test/update-notifier.test.mjs +0 -3317
- package/skills/archify/test/v1-compatibility.test.mjs +0 -329
- package/skills/archify/test/vertical-edge.test.mjs +0 -68
- package/skills/archify/test/viewer-camera-browser.test.mjs +0 -395
- package/skills/archify/test/viewer-chrome-layout.test.mjs +0 -1104
- package/skills/archify/test/viewer-identifiers-browser.test.mjs +0 -135
- package/skills/archify/test/visual-check.test.mjs +0 -400
- package/skills/archify/test/webm-artifact.smoke.mjs +0 -1855
- package/skills/archify/test/workflow-compiler-hard-contract.test.mjs +0 -2136
- package/skills/archify/test/workflow-compiler.test.mjs +0 -1163
- package/skills/archify/test/workflow-migration.test.mjs +0 -620
- package/skills/archify/test/workflow-semantic-contract.test.mjs +0 -131
- /package/{skills/archify/THIRD_PARTY_NOTICES.md → dist/phoenix-diagram/THIRD-PARTY-LICENSES/0b7fb59365dc21c93b0f62526d74ee913aeec9ae532c112bc76afa7edcd56e14.txt} +0 -0
- /package/{skills/archify/LICENSE → dist/phoenix-diagram/THIRD-PARTY-LICENSES/b799ab081703e7821ae5096d2c1abdf14bbdc75e8ea1c4045998c36ed6db9706.txt} +0 -0
- /package/{skills/archify/assets/JetBrainsMono-OFL.txt → dist/phoenix-diagram/THIRD-PARTY-LICENSES/c1ab7c666206842a02b35b30770dac0d7a10156ed401c9defc3f02a754d89e90.txt} +0 -0
- /package/{skills/archify/examples/agent-tool-call.workflow.json → dist/phoenix-diagram/bundle/examples/legacy.agent-tool-call.workflow.json} +0 -0
- /package/{skills/archify/examples/async-job-roundtrip.sequence.json → dist/phoenix-diagram/bundle/examples/legacy.async-job-roundtrip.sequence.json} +0 -0
- /package/{skills/archify/examples/deployment-release.lifecycle.json → dist/phoenix-diagram/bundle/examples/legacy.deployment-release.lifecycle.json} +0 -0
- /package/{skills/archify/examples/product-analytics.dataflow.json → dist/phoenix-diagram/bundle/examples/legacy.product-analytics.dataflow.json} +0 -0
- /package/{skills/archify/examples/web-app.architecture.json → dist/phoenix-diagram/bundle/examples/legacy.web-app.architecture.json} +0 -0
|
@@ -1,2136 +0,0 @@
|
|
|
1
|
-
import { test } from 'node:test';
|
|
2
|
-
import assert from 'node:assert/strict';
|
|
3
|
-
|
|
4
|
-
import { compileWorkflow } from '../renderers/workflow/workflow-compiler.mjs';
|
|
5
|
-
|
|
6
|
-
function clone(value) {
|
|
7
|
-
return JSON.parse(JSON.stringify(value));
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
function workflow({ lanes, nodes, edges }) {
|
|
11
|
-
return {
|
|
12
|
-
schema_version: 2,
|
|
13
|
-
diagram_type: 'workflow',
|
|
14
|
-
meta: {
|
|
15
|
-
title: 'Workflow compiler hard-contract fixture',
|
|
16
|
-
legend: { mode: 'hidden' },
|
|
17
|
-
},
|
|
18
|
-
lanes,
|
|
19
|
-
nodes,
|
|
20
|
-
edges,
|
|
21
|
-
};
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
function oneLaneWorkflow(edges) {
|
|
25
|
-
return workflow({
|
|
26
|
-
lanes: [{ id: 'main', label: 'M' }],
|
|
27
|
-
nodes: [
|
|
28
|
-
{ id: 'a', lane: 'main', col: 0, type: 'backend', label: 'A' },
|
|
29
|
-
{ id: 'b', lane: 'main', col: 2, type: 'backend', label: 'B' },
|
|
30
|
-
],
|
|
31
|
-
edges,
|
|
32
|
-
});
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
function nestedOutsideRightCorridorWorkflow() {
|
|
36
|
-
return workflow({
|
|
37
|
-
lanes: [0, 1, 2, 3].map((index) => ({ id: `l${index}`, label: `Lane ${index}` })),
|
|
38
|
-
nodes: [
|
|
39
|
-
{ id: 'outer-from', lane: 'l0', col: 0, type: 'backend', label: 'Outer from' },
|
|
40
|
-
{ id: 'inner-from', lane: 'l1', col: 0, type: 'backend', label: 'Inner from' },
|
|
41
|
-
{ id: 'inner-to', lane: 'l2', col: 2, type: 'database', label: 'Inner to' },
|
|
42
|
-
{ id: 'outer-to', lane: 'l3', col: 2, type: 'database', label: 'Outer to' },
|
|
43
|
-
],
|
|
44
|
-
edges: [
|
|
45
|
-
{
|
|
46
|
-
id: 'outer',
|
|
47
|
-
from: 'outer-from',
|
|
48
|
-
to: 'outer-to',
|
|
49
|
-
route: 'outside-right',
|
|
50
|
-
channelX: 800,
|
|
51
|
-
fromSide: 'right',
|
|
52
|
-
toSide: 'right',
|
|
53
|
-
},
|
|
54
|
-
{
|
|
55
|
-
id: 'inner',
|
|
56
|
-
from: 'inner-from',
|
|
57
|
-
to: 'inner-to',
|
|
58
|
-
route: 'outside-right',
|
|
59
|
-
channelX: 800,
|
|
60
|
-
fromSide: 'right',
|
|
61
|
-
toSide: 'right',
|
|
62
|
-
},
|
|
63
|
-
],
|
|
64
|
-
});
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
function crossingAtForwardCollinearViaWorkflow({ pinHorizontal = false } = {}) {
|
|
68
|
-
return workflow({
|
|
69
|
-
lanes: [
|
|
70
|
-
{ id: 'top', label: 'Top' },
|
|
71
|
-
{ id: 'middle', label: 'Middle' },
|
|
72
|
-
{ id: 'bottom', label: 'Bottom' },
|
|
73
|
-
],
|
|
74
|
-
nodes: [
|
|
75
|
-
{ id: 'left', lane: 'middle', col: 0, type: 'backend', label: 'Left' },
|
|
76
|
-
{ id: 'right', lane: 'middle', col: 4, type: 'backend', label: 'Right' },
|
|
77
|
-
{ id: 'above', lane: 'top', col: 2, type: 'backend', label: 'Above' },
|
|
78
|
-
{ id: 'below', lane: 'bottom', col: 2, type: 'backend', label: 'Below' },
|
|
79
|
-
],
|
|
80
|
-
edges: [
|
|
81
|
-
{
|
|
82
|
-
id: pinHorizontal ? 'a-pinned' : 'a-auto',
|
|
83
|
-
from: 'left',
|
|
84
|
-
to: 'right',
|
|
85
|
-
...(pinHorizontal ? { via: [[334, 243]] } : {}),
|
|
86
|
-
},
|
|
87
|
-
{
|
|
88
|
-
id: 'z-pinned',
|
|
89
|
-
from: 'above',
|
|
90
|
-
to: 'below',
|
|
91
|
-
via: [[334, 243]],
|
|
92
|
-
},
|
|
93
|
-
],
|
|
94
|
-
});
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
function oneLaneAnchors() {
|
|
98
|
-
const result = compileWorkflow({ workflow: oneLaneWorkflow([]), qualityProfile: 'standard' });
|
|
99
|
-
assert.equal(result.ok, true, JSON.stringify(result.diagnostics, null, 2));
|
|
100
|
-
const source = result.receipt.nodes.find(({ id }) => id === 'a');
|
|
101
|
-
const target = result.receipt.nodes.find(({ id }) => id === 'b');
|
|
102
|
-
assert.ok(source && target);
|
|
103
|
-
return {
|
|
104
|
-
start: [source.x + source.width, source.y + source.height / 2],
|
|
105
|
-
end: [target.x, target.y + target.height / 2],
|
|
106
|
-
};
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
function assertExplicitPinConflict(result, context) {
|
|
110
|
-
assert.equal(result.ok, false, `${context} must not produce an SVG`);
|
|
111
|
-
assert.equal(result.svg, undefined);
|
|
112
|
-
assert.ok(Array.isArray(result.diagnostics) && result.diagnostics.length > 0);
|
|
113
|
-
assert.ok(
|
|
114
|
-
result.diagnostics.some(({ code }) => code === 'workflow/explicit-pin-conflict'),
|
|
115
|
-
`${context} must report workflow/explicit-pin-conflict:\n${JSON.stringify(result.diagnostics, null, 2)}`,
|
|
116
|
-
);
|
|
117
|
-
assert.deepEqual(result.receipt.diagnostics, result.diagnostics);
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
function assertSupportedFixesNameChangedEdge(diagnostic, edgeIds) {
|
|
121
|
-
assert.ok(diagnostic.supportedFixes.length > 0, JSON.stringify(diagnostic, null, 2));
|
|
122
|
-
for (const fix of diagnostic.supportedFixes) {
|
|
123
|
-
assert.ok(
|
|
124
|
-
edgeIds.some((edgeId) => fix.includes(`edge "${edgeId}"`)),
|
|
125
|
-
`supported fix must name its changed edge (${edgeIds.join(', ')}): ${fix}`,
|
|
126
|
-
);
|
|
127
|
-
}
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
function assertOrthogonal(points) {
|
|
131
|
-
for (let index = 0; index < points.length - 1; index += 1) {
|
|
132
|
-
const [x1, y1] = points[index];
|
|
133
|
-
const [x2, y2] = points[index + 1];
|
|
134
|
-
assert.ok(x1 === x2 || y1 === y2, `segment ${index} must be orthogonal`);
|
|
135
|
-
assert.notDeepEqual(points[index], points[index + 1], `segment ${index} must be non-zero`);
|
|
136
|
-
}
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
function routeContainsChannel(points, field, value) {
|
|
140
|
-
return points.slice(0, -1).some((start, index) => {
|
|
141
|
-
const end = points[index + 1];
|
|
142
|
-
if (field === 'channelX') {
|
|
143
|
-
return start[0] === value && end[0] === value && start[1] !== end[1];
|
|
144
|
-
}
|
|
145
|
-
return start[1] === value && end[1] === value && start[0] !== end[0];
|
|
146
|
-
});
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
function segmentMeetsRect(start, end, rect, clearance = 2) {
|
|
150
|
-
const left = rect.x - clearance;
|
|
151
|
-
const right = rect.x + rect.width + clearance;
|
|
152
|
-
const top = rect.y - clearance;
|
|
153
|
-
const bottom = rect.y + rect.height + clearance;
|
|
154
|
-
if (start[1] === end[1]) {
|
|
155
|
-
return start[1] >= top && start[1] <= bottom
|
|
156
|
-
&& Math.max(start[0], end[0]) >= left
|
|
157
|
-
&& Math.min(start[0], end[0]) <= right;
|
|
158
|
-
}
|
|
159
|
-
if (start[0] === end[0]) {
|
|
160
|
-
return start[0] >= left && start[0] <= right
|
|
161
|
-
&& Math.max(start[1], end[1]) >= top
|
|
162
|
-
&& Math.min(start[1], end[1]) <= bottom;
|
|
163
|
-
}
|
|
164
|
-
return true;
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
test('readable-v2 auto routing selects a feasible corridor around a same-lane obstacle', () => {
|
|
168
|
-
const document = workflow({
|
|
169
|
-
lanes: [{ id: 'main', label: 'Main' }],
|
|
170
|
-
nodes: [
|
|
171
|
-
{ id: 'a', lane: 'main', col: 0, type: 'backend', label: 'A' },
|
|
172
|
-
{ id: 'obstacle', lane: 'main', col: 2, type: 'database', label: 'Obstacle' },
|
|
173
|
-
{ id: 'b', lane: 'main', col: 5, type: 'backend', label: 'B' },
|
|
174
|
-
],
|
|
175
|
-
edges: [{ id: 'ab', from: 'a', to: 'b' }],
|
|
176
|
-
});
|
|
177
|
-
|
|
178
|
-
const result = compileWorkflow({ workflow: document, qualityProfile: 'standard' });
|
|
179
|
-
assert.equal(
|
|
180
|
-
result.ok,
|
|
181
|
-
true,
|
|
182
|
-
`a feasible automatic corridor must compile:\n${JSON.stringify(result.diagnostics, null, 2)}`,
|
|
183
|
-
);
|
|
184
|
-
|
|
185
|
-
const points = result.receipt.edges.find(({ id }) => id === 'ab')?.points;
|
|
186
|
-
const obstacle = result.receipt.nodes.find(({ id }) => id === 'obstacle');
|
|
187
|
-
assert.ok(points && obstacle);
|
|
188
|
-
assert.ok(points.length >= 3, 'the route must bend around the intervening node');
|
|
189
|
-
assertOrthogonal(points);
|
|
190
|
-
for (let index = 0; index < points.length - 1; index += 1) {
|
|
191
|
-
assert.equal(
|
|
192
|
-
segmentMeetsRect(points[index], points[index + 1], obstacle),
|
|
193
|
-
false,
|
|
194
|
-
`segment ${index} must clear the unrelated obstacle`,
|
|
195
|
-
);
|
|
196
|
-
}
|
|
197
|
-
});
|
|
198
|
-
|
|
199
|
-
test('readable-v2 evaluates automatic endpoint sides against the complete labeled route', () => {
|
|
200
|
-
const document = workflow({
|
|
201
|
-
lanes: [{ id: 'source', label: 'Source' }, { id: 'target', label: 'Target' }],
|
|
202
|
-
nodes: [
|
|
203
|
-
{ id: 'a', lane: 'source', col: 0, type: 'backend', label: 'A' },
|
|
204
|
-
{ id: 'b', lane: 'target', col: 1, type: 'backend', label: 'B' },
|
|
205
|
-
],
|
|
206
|
-
edges: [{ id: 'ab', from: 'a', to: 'b', label: 'L'.repeat(50) }],
|
|
207
|
-
});
|
|
208
|
-
|
|
209
|
-
const result = compileWorkflow({ workflow: document, qualityProfile: 'standard' });
|
|
210
|
-
assert.equal(result.ok, true, JSON.stringify(result.diagnostics, null, 2));
|
|
211
|
-
assert.deepEqual(result.receipt.viewBox, [768, 404]);
|
|
212
|
-
assert.deepEqual(result.receipt.edges[0].points, [
|
|
213
|
-
[94, 145], [94, 166], [214, 166], [214, 217],
|
|
214
|
-
]);
|
|
215
|
-
});
|
|
216
|
-
|
|
217
|
-
test('readable-v2 retries automatic endpoint sides against already planned routes', () => {
|
|
218
|
-
const document = workflow({
|
|
219
|
-
lanes: [0, 1, 2].map((index) => ({ id: `l${index}`, label: `Lane ${index}` })),
|
|
220
|
-
nodes: [
|
|
221
|
-
{ id: 'a', lane: 'l0', col: 2, type: 'backend', label: 'A' },
|
|
222
|
-
{ id: 'b', lane: 'l0', col: 3, type: 'backend', label: 'B', yOffset: -1 },
|
|
223
|
-
{ id: 'c', lane: 'l2', col: 4, type: 'backend', label: 'C' },
|
|
224
|
-
],
|
|
225
|
-
edges: [
|
|
226
|
-
{ id: 'e0', from: 'a', to: 'b', label: 'L'.repeat(17) },
|
|
227
|
-
{ id: 'e1', from: 'a', to: 'c' },
|
|
228
|
-
],
|
|
229
|
-
});
|
|
230
|
-
|
|
231
|
-
const first = compileWorkflow({ workflow: document, qualityProfile: 'standard' });
|
|
232
|
-
const second = compileWorkflow({ workflow: clone(document), qualityProfile: 'standard' });
|
|
233
|
-
assert.equal(first.ok, true, JSON.stringify(first.diagnostics, null, 2));
|
|
234
|
-
assert.equal(second.ok, true, JSON.stringify(second.diagnostics, null, 2));
|
|
235
|
-
assert.equal(second.svg, first.svg);
|
|
236
|
-
assert.equal(JSON.stringify(second.receipt), JSON.stringify(first.receipt));
|
|
237
|
-
assertOrthogonal(first.receipt.edges.find(({ id }) => id === 'e1').points);
|
|
238
|
-
});
|
|
239
|
-
|
|
240
|
-
test('readable-v2 expands an outside corridor for deterministic labeled fan-out', () => {
|
|
241
|
-
const document = workflow({
|
|
242
|
-
lanes: Array.from({ length: 5 }, (_, index) => ({
|
|
243
|
-
id: `l${index}`,
|
|
244
|
-
label: `Lane ${index}`,
|
|
245
|
-
})),
|
|
246
|
-
nodes: [
|
|
247
|
-
{ id: 'hub', lane: 'l0', col: 0, type: 'backend', label: 'Hub', width: 64 },
|
|
248
|
-
{ id: 't0', lane: 'l1', col: 2, type: 'external', label: 'T0', width: 160 },
|
|
249
|
-
{ id: 't1', lane: 'l2', col: 4, type: 'database', label: 'T1', width: 160 },
|
|
250
|
-
{ id: 't2', lane: 'l3', col: 3, type: 'external', label: 'T2', width: 64 },
|
|
251
|
-
{ id: 't3', lane: 'l4', col: 4, type: 'database', label: 'T3', width: 120 },
|
|
252
|
-
],
|
|
253
|
-
edges: [
|
|
254
|
-
{ id: 'e0', from: 'hub', to: 't0', label: 'A'.repeat(80) },
|
|
255
|
-
{ id: 'e1', from: 'hub', to: 't1', label: 'B'.repeat(80) },
|
|
256
|
-
{ id: 'e2', from: 'hub', to: 't2', label: 'C'.repeat(12) },
|
|
257
|
-
{ id: 'e3', from: 'hub', to: 't3', label: 'D'.repeat(24) },
|
|
258
|
-
],
|
|
259
|
-
});
|
|
260
|
-
|
|
261
|
-
const first = compileWorkflow({ workflow: document, qualityProfile: 'standard' });
|
|
262
|
-
const second = compileWorkflow({ workflow: clone(document), qualityProfile: 'standard' });
|
|
263
|
-
assert.equal(first.ok, true, JSON.stringify(first.diagnostics, null, 2));
|
|
264
|
-
assert.deepEqual(second, first);
|
|
265
|
-
const route = first.receipt.edges.find(({ id }) => id === 'e3')?.points;
|
|
266
|
-
assert.ok(route);
|
|
267
|
-
assertOrthogonal(route);
|
|
268
|
-
assert.ok(
|
|
269
|
-
Math.max(...route.map(([x]) => x)) > 764,
|
|
270
|
-
`the final fan-out edge must escape the occupied route/label region: ${JSON.stringify(route)}`,
|
|
271
|
-
);
|
|
272
|
-
});
|
|
273
|
-
|
|
274
|
-
test('readable-v2 expands an outside corridor without moving the lane geometry', () => {
|
|
275
|
-
const document = workflow({
|
|
276
|
-
lanes: Array.from({ length: 5 }, (_, index) => ({
|
|
277
|
-
id: `l${index}`,
|
|
278
|
-
label: `Lane ${index}`,
|
|
279
|
-
})),
|
|
280
|
-
nodes: [
|
|
281
|
-
{ id: 'hub', lane: 'l0', col: 1, type: 'backend', label: 'Hub', width: 92 },
|
|
282
|
-
{ id: 't0', lane: 'l1', col: 2, type: 'external', label: 'T0', width: 120 },
|
|
283
|
-
{ id: 't1', lane: 'l2', col: 1, type: 'database', label: 'T1', width: 160 },
|
|
284
|
-
{ id: 't2', lane: 'l3', col: 1, type: 'external', label: 'T2', width: 120 },
|
|
285
|
-
{ id: 't3', lane: 'l4', col: 2, type: 'database', label: 'T3', width: 120 },
|
|
286
|
-
],
|
|
287
|
-
edges: [
|
|
288
|
-
{ id: 'e0', from: 'hub', to: 't0', label: 'A'.repeat(120) },
|
|
289
|
-
{ id: 'e1', from: 'hub', to: 't1', label: 'B'.repeat(48) },
|
|
290
|
-
{ id: 'e2', from: 'hub', to: 't2', label: 'C'.repeat(24) },
|
|
291
|
-
{ id: 'e3', from: 'hub', to: 't3', label: 'D'.repeat(84) },
|
|
292
|
-
],
|
|
293
|
-
});
|
|
294
|
-
|
|
295
|
-
const first = compileWorkflow({ workflow: document, qualityProfile: 'showcase' });
|
|
296
|
-
const second = compileWorkflow({ workflow: clone(document), qualityProfile: 'showcase' });
|
|
297
|
-
assert.equal(first.ok, true, JSON.stringify(first.diagnostics, null, 2));
|
|
298
|
-
assert.deepEqual(second, first);
|
|
299
|
-
const route = first.receipt.edges.find(({ id }) => id === 'e3')?.points;
|
|
300
|
-
assert.ok(route);
|
|
301
|
-
assertOrthogonal(route);
|
|
302
|
-
assert.ok(Math.max(...route.map(([x]) => x)) > 1200, JSON.stringify(route));
|
|
303
|
-
assert.ok(first.receipt.viewBox[0] < 1400, JSON.stringify(first.receipt.viewBox));
|
|
304
|
-
});
|
|
305
|
-
|
|
306
|
-
test('readable-v2 may expand an unlabeled edge around already placed labels', () => {
|
|
307
|
-
const document = workflow({
|
|
308
|
-
lanes: Array.from({ length: 4 }, (_, index) => ({
|
|
309
|
-
id: `l${index}`,
|
|
310
|
-
label: `Lane ${index}`,
|
|
311
|
-
})),
|
|
312
|
-
nodes: [
|
|
313
|
-
{ id: 'hub', lane: 'l0', col: 0, type: 'backend', label: 'Hub', width: 120 },
|
|
314
|
-
{ id: 't0', lane: 'l1', col: 1, type: 'backend', label: 'T0', width: 92, yOffset: -4 },
|
|
315
|
-
{ id: 't1', lane: 'l2', col: 3, type: 'backend', label: 'T1', width: 92, yOffset: 4 },
|
|
316
|
-
{ id: 't2', lane: 'l3', col: 1, type: 'external', label: 'T2', width: 120, yOffset: -4 },
|
|
317
|
-
{ id: 't3', lane: 'l1', col: 5, type: 'backend', label: 'T3', width: 92, yOffset: -12 },
|
|
318
|
-
{ id: 't4', lane: 'l2', col: 1, type: 'backend', label: 'T4', width: 120, yOffset: -12 },
|
|
319
|
-
],
|
|
320
|
-
edges: [
|
|
321
|
-
{ id: 'e00', from: 'hub', to: 't0', label: 'Z'.repeat(80) },
|
|
322
|
-
{ id: 'e01', from: 'hub', to: 't1', label: 'Q'.repeat(120) },
|
|
323
|
-
{ id: 'e02', from: 'hub', to: 't2', label: 'Q'.repeat(120) },
|
|
324
|
-
{ id: 'e03', from: 'hub', to: 't3', label: 'Z'.repeat(80) },
|
|
325
|
-
{ id: 'e04', from: 'hub', to: 't4' },
|
|
326
|
-
],
|
|
327
|
-
});
|
|
328
|
-
|
|
329
|
-
const first = compileWorkflow({ workflow: document, qualityProfile: 'standard' });
|
|
330
|
-
const second = compileWorkflow({ workflow: clone(document), qualityProfile: 'standard' });
|
|
331
|
-
assert.equal(first.ok, true, JSON.stringify(first.diagnostics, null, 2));
|
|
332
|
-
assert.deepEqual(second, first);
|
|
333
|
-
const route = first.receipt.edges.find(({ id }) => id === 'e04')?.points;
|
|
334
|
-
assert.ok(route);
|
|
335
|
-
assertOrthogonal(route);
|
|
336
|
-
assert.ok(Math.max(...route.map(([x]) => x)) > 764, JSON.stringify(route));
|
|
337
|
-
|
|
338
|
-
const boundedDocument = clone(document);
|
|
339
|
-
boundedDocument.meta.viewBox = [1378, 692];
|
|
340
|
-
const bounded = compileWorkflow({ workflow: boundedDocument, qualityProfile: 'standard' });
|
|
341
|
-
assert.equal(bounded.ok, true, JSON.stringify(bounded.diagnostics, null, 2));
|
|
342
|
-
assert.deepEqual(bounded.receipt.viewBox, [1378, 692]);
|
|
343
|
-
});
|
|
344
|
-
|
|
345
|
-
test('readable-v2 feeds a measured outside-channel constraint back into layout', () => {
|
|
346
|
-
const document = workflow({
|
|
347
|
-
lanes: [{ id: 'source', label: 'Source' }, { id: 'target', label: 'Target' }],
|
|
348
|
-
nodes: [
|
|
349
|
-
{ id: 'a', lane: 'source', col: 0, type: 'backend', label: 'A' },
|
|
350
|
-
{ id: 'b', lane: 'target', col: 0, type: 'backend', label: 'B' },
|
|
351
|
-
],
|
|
352
|
-
edges: [{ id: 'ab', from: 'a', to: 'b', label: 'L'.repeat(120) }],
|
|
353
|
-
});
|
|
354
|
-
document.meta.quality_profile = 'showcase';
|
|
355
|
-
|
|
356
|
-
const first = compileWorkflow({ workflow: document });
|
|
357
|
-
const second = compileWorkflow({ workflow: clone(document) });
|
|
358
|
-
assert.equal(first.ok, true, JSON.stringify(first.diagnostics, null, 2));
|
|
359
|
-
assert.deepEqual(first.receipt.viewBox, [780, 404]);
|
|
360
|
-
assert.deepEqual(first.receipt.requiredViewBox, [780, 404]);
|
|
361
|
-
assert.deepEqual(first.receipt.edges[0].points, [
|
|
362
|
-
[140, 119], [764, 119], [764, 243], [140, 243],
|
|
363
|
-
]);
|
|
364
|
-
assert.deepEqual(
|
|
365
|
-
{ x: first.receipt.labels[0].x, y: first.receipt.labels[0].y },
|
|
366
|
-
{ x: 452, y: 109 },
|
|
367
|
-
);
|
|
368
|
-
assert.equal(second.svg, first.svg);
|
|
369
|
-
assert.equal(JSON.stringify(second.receipt), JSON.stringify(first.receipt));
|
|
370
|
-
});
|
|
371
|
-
|
|
372
|
-
test('readable-v2 feeds a measured adjacent-rank gutter back into layout', () => {
|
|
373
|
-
const document = workflow({
|
|
374
|
-
lanes: [{ id: 'l0', label: 'Lane 0' }, { id: 'l1', label: 'Lane 1' }],
|
|
375
|
-
nodes: [
|
|
376
|
-
{ id: 'a', lane: 'l0', col: 0, type: 'backend', label: 'A' },
|
|
377
|
-
{ id: 'obstacle', lane: 'l0', col: 1, type: 'database', label: 'Obstacle' },
|
|
378
|
-
{ id: 'b', lane: 'l1', col: 1, type: 'backend', label: 'B' },
|
|
379
|
-
],
|
|
380
|
-
edges: [{ id: 'ab', from: 'a', to: 'b', fromSide: 'right', toSide: 'left' }],
|
|
381
|
-
});
|
|
382
|
-
|
|
383
|
-
const result = compileWorkflow({ workflow: document, qualityProfile: 'standard' });
|
|
384
|
-
assert.equal(result.ok, true, JSON.stringify(result.diagnostics, null, 2));
|
|
385
|
-
assert.deepEqual(result.receipt.columns.slice(0, 2), [94, 218]);
|
|
386
|
-
assert.deepEqual(result.receipt.edges[0].points, [
|
|
387
|
-
[140, 119], [156, 119], [156, 243], [172, 243],
|
|
388
|
-
]);
|
|
389
|
-
});
|
|
390
|
-
|
|
391
|
-
test('readable-v2 feeds a measured lane gap back into layout', () => {
|
|
392
|
-
const document = workflow({
|
|
393
|
-
lanes: [0, 1, 2].map((index) => ({ id: `l${index}`, label: `Lane ${index}` })),
|
|
394
|
-
nodes: [0, 1, 2].map((index) => ({
|
|
395
|
-
id: `n${index}`, lane: `l${index}`, col: 5, type: 'backend', label: `N${index}`,
|
|
396
|
-
})),
|
|
397
|
-
edges: [
|
|
398
|
-
{
|
|
399
|
-
id: 'e0', from: 'n1', to: 'n2', fromSide: 'bottom', toSide: 'right', label: 'LLLLLLLLLL',
|
|
400
|
-
},
|
|
401
|
-
{
|
|
402
|
-
id: 'e2', from: 'n2', to: 'n1', fromSide: 'left', toSide: 'right', label: 'x',
|
|
403
|
-
},
|
|
404
|
-
],
|
|
405
|
-
});
|
|
406
|
-
|
|
407
|
-
const result = compileWorkflow({ workflow: document, qualityProfile: 'showcase' });
|
|
408
|
-
assert.equal(result.ok, true, JSON.stringify(result.diagnostics, null, 2));
|
|
409
|
-
assert.deepEqual(result.receipt.columns, [94, 214, 334, 454, 574, 694]);
|
|
410
|
-
assert.deepEqual(result.receipt.nodes.map(({ id, y }) => ({ id, y })), [
|
|
411
|
-
{ id: 'n0', y: 93 }, { id: 'n1', y: 229 }, { id: 'n2', y: 365 },
|
|
412
|
-
]);
|
|
413
|
-
assert.deepEqual(result.receipt.edges.map(({ id, points }) => ({ id, points })), [
|
|
414
|
-
{
|
|
415
|
-
id: 'e0',
|
|
416
|
-
points: [[694, 281], [694, 308], [756, 308], [756, 391], [740, 391]],
|
|
417
|
-
},
|
|
418
|
-
{
|
|
419
|
-
id: 'e2',
|
|
420
|
-
points: [[648, 391], [632, 391], [632, 172], [756, 172], [756, 255], [740, 255]],
|
|
421
|
-
},
|
|
422
|
-
]);
|
|
423
|
-
assert.deepEqual(result.receipt.requiredViewBox, [772, 552]);
|
|
424
|
-
});
|
|
425
|
-
|
|
426
|
-
for (const { name, makeDocument } of [
|
|
427
|
-
{
|
|
428
|
-
name: 'duplicate authored via points',
|
|
429
|
-
makeDocument: () => {
|
|
430
|
-
const { start } = oneLaneAnchors();
|
|
431
|
-
const pin = [start[0] + 60, start[1]];
|
|
432
|
-
return oneLaneWorkflow([{
|
|
433
|
-
id: 'ab', from: 'a', to: 'b', via: [pin, [...pin]],
|
|
434
|
-
}]);
|
|
435
|
-
},
|
|
436
|
-
},
|
|
437
|
-
{
|
|
438
|
-
name: 'diagonal authored via geometry',
|
|
439
|
-
makeDocument: () => {
|
|
440
|
-
const { start } = oneLaneAnchors();
|
|
441
|
-
return oneLaneWorkflow([{
|
|
442
|
-
id: 'ab', from: 'a', to: 'b', via: [[start[0] + 60, start[1] + 31]],
|
|
443
|
-
}]);
|
|
444
|
-
},
|
|
445
|
-
},
|
|
446
|
-
]) {
|
|
447
|
-
test(`readable-v2 rejects ${name} with a typed explicit-pin diagnostic`, () => {
|
|
448
|
-
const result = compileWorkflow({ workflow: makeDocument(), qualityProfile: 'standard' });
|
|
449
|
-
assertExplicitPinConflict(result, name);
|
|
450
|
-
});
|
|
451
|
-
}
|
|
452
|
-
|
|
453
|
-
test('readable-v2 duplicate evidence excludes a compatible channel assertion', () => {
|
|
454
|
-
const document = oneLaneWorkflow([{
|
|
455
|
-
id: 'ab',
|
|
456
|
-
from: 'a',
|
|
457
|
-
to: 'b',
|
|
458
|
-
via: [[200, 119], [200, 180], [200, 180], [260, 180], [260, 119]],
|
|
459
|
-
channelY: 180,
|
|
460
|
-
}]);
|
|
461
|
-
const result = compileWorkflow({ workflow: document, qualityProfile: 'standard' });
|
|
462
|
-
assertExplicitPinConflict(result, 'duplicate via with compatible channelY');
|
|
463
|
-
const diagnostic = result.diagnostics[0];
|
|
464
|
-
assert.equal(diagnostic.evidence.invariant, 'non-zero route segments');
|
|
465
|
-
assert.deepEqual(diagnostic.evidence.conflictingPins, [{
|
|
466
|
-
edge: 'ab', field: 'via', path: '/edges/0/via',
|
|
467
|
-
value: [[200, 119], [200, 180], [200, 180], [260, 180], [260, 119]],
|
|
468
|
-
}]);
|
|
469
|
-
assert.ok(diagnostic.supportedFixes.length > 0, JSON.stringify(diagnostic, null, 2));
|
|
470
|
-
});
|
|
471
|
-
|
|
472
|
-
test('readable-v2 obstacle evidence excludes a compatible channel assertion', () => {
|
|
473
|
-
const document = workflow({
|
|
474
|
-
lanes: [{ id: 'main', label: 'Main' }],
|
|
475
|
-
nodes: [
|
|
476
|
-
{ id: 'a', lane: 'main', col: 0, type: 'backend', label: 'A' },
|
|
477
|
-
{ id: 'obstacle', lane: 'main', col: 1, type: 'database', label: 'Obstacle' },
|
|
478
|
-
{ id: 'b', lane: 'main', col: 2, type: 'backend', label: 'B' },
|
|
479
|
-
],
|
|
480
|
-
edges: [{
|
|
481
|
-
id: 'ab',
|
|
482
|
-
from: 'a',
|
|
483
|
-
to: 'b',
|
|
484
|
-
via: [[156, 119], [156, 180], [200, 180], [200, 119], [276, 119]],
|
|
485
|
-
channelY: 180,
|
|
486
|
-
}],
|
|
487
|
-
});
|
|
488
|
-
const result = compileWorkflow({ workflow: document, qualityProfile: 'standard' });
|
|
489
|
-
assertExplicitPinConflict(result, 'node collision with compatible channelY');
|
|
490
|
-
const diagnostic = result.diagnostics[0];
|
|
491
|
-
assert.equal(diagnostic.evidence.invariant, 'node clearance');
|
|
492
|
-
assert.deepEqual(diagnostic.evidence.conflictingPins, [{
|
|
493
|
-
edge: 'ab', field: 'via', path: '/edges/0/via',
|
|
494
|
-
value: [[156, 119], [156, 180], [200, 180], [200, 119], [276, 119]],
|
|
495
|
-
}]);
|
|
496
|
-
assert.ok(diagnostic.supportedFixes.length > 0, JSON.stringify(diagnostic, null, 2));
|
|
497
|
-
});
|
|
498
|
-
|
|
499
|
-
test('readable-v2 infers omitted endpoint sides around an authored via', () => {
|
|
500
|
-
const expected = [[94, 93], [94, 77], [334, 77], [334, 93]];
|
|
501
|
-
for (const qualityProfile of ['standard', 'showcase']) {
|
|
502
|
-
for (const sides of [
|
|
503
|
-
{},
|
|
504
|
-
{ fromSide: 'top' },
|
|
505
|
-
{ toSide: 'top' },
|
|
506
|
-
{ fromSide: 'top', toSide: 'top' },
|
|
507
|
-
]) {
|
|
508
|
-
const document = oneLaneWorkflow([{
|
|
509
|
-
id: 'ab', from: 'a', to: 'b', via: [[94, 77], [334, 77]], ...sides,
|
|
510
|
-
}]);
|
|
511
|
-
const result = compileWorkflow({ workflow: document, qualityProfile });
|
|
512
|
-
assert.equal(result.ok, true, JSON.stringify(result.diagnostics, null, 2));
|
|
513
|
-
assert.deepEqual(result.receipt.edges[0].points, expected);
|
|
514
|
-
}
|
|
515
|
-
}
|
|
516
|
-
|
|
517
|
-
const restricted = oneLaneWorkflow([{
|
|
518
|
-
id: 'ab',
|
|
519
|
-
from: 'a',
|
|
520
|
-
to: 'b',
|
|
521
|
-
fromSide: 'right',
|
|
522
|
-
via: [[94, 77], [334, 77]],
|
|
523
|
-
}]);
|
|
524
|
-
assertExplicitPinConflict(
|
|
525
|
-
compileWorkflow({ workflow: restricted, qualityProfile: 'standard' }),
|
|
526
|
-
'authored fromSide must remain a hard restriction',
|
|
527
|
-
);
|
|
528
|
-
|
|
529
|
-
const duplicate = oneLaneWorkflow([{
|
|
530
|
-
id: 'ab',
|
|
531
|
-
from: 'a',
|
|
532
|
-
to: 'b',
|
|
533
|
-
via: [[94, 77], [94, 77], [334, 77]],
|
|
534
|
-
}]);
|
|
535
|
-
const duplicateResult = compileWorkflow({ workflow: duplicate, qualityProfile: 'standard' });
|
|
536
|
-
assertExplicitPinConflict(duplicateResult, 'inferred top ports around duplicate via geometry');
|
|
537
|
-
assert.equal(duplicateResult.diagnostics[0].evidence.invariant, 'non-zero route segments');
|
|
538
|
-
assert.deepEqual(duplicateResult.diagnostics[0].evidence.from, [94, 77]);
|
|
539
|
-
assert.deepEqual(duplicateResult.diagnostics[0].evidence.to, [94, 77]);
|
|
540
|
-
});
|
|
541
|
-
|
|
542
|
-
test('readable-v2 reports an infeasible authored target side with its verified single-pin repair', () => {
|
|
543
|
-
const document = workflow({
|
|
544
|
-
lanes: [{ id: 'top', label: 'Top' }, { id: 'bottom', label: 'Bottom' }],
|
|
545
|
-
nodes: [
|
|
546
|
-
{ id: 'a', lane: 'top', col: 0, type: 'backend', label: 'A' },
|
|
547
|
-
{ id: 'b', lane: 'bottom', col: 0, type: 'backend', label: 'B' },
|
|
548
|
-
],
|
|
549
|
-
edges: [{ id: 'ab', from: 'a', to: 'b', toSide: 'top' }],
|
|
550
|
-
});
|
|
551
|
-
document.groups = [{
|
|
552
|
-
id: 'g', label: 'Very long group label', lane: 'bottom', fromCol: 0, toCol: 0,
|
|
553
|
-
}];
|
|
554
|
-
|
|
555
|
-
const result = compileWorkflow({ workflow: document, qualityProfile: 'showcase' });
|
|
556
|
-
|
|
557
|
-
assert.equal(result.ok, false);
|
|
558
|
-
assert.equal(result.svg, undefined);
|
|
559
|
-
assert.equal(result.diagnostics.length, 1, JSON.stringify(result.diagnostics, null, 2));
|
|
560
|
-
const [diagnostic] = result.diagnostics;
|
|
561
|
-
assert.equal(diagnostic.code, 'workflow/explicit-pin-conflict');
|
|
562
|
-
assert.deepEqual(diagnostic.subject, {
|
|
563
|
-
diagramType: 'workflow',
|
|
564
|
-
edge: 'ab',
|
|
565
|
-
from: 'a',
|
|
566
|
-
to: 'b',
|
|
567
|
-
path: '/edges/0/toSide',
|
|
568
|
-
});
|
|
569
|
-
assert.equal(
|
|
570
|
-
diagnostic.evidence.invariant,
|
|
571
|
-
'readable route feasibility with authored endpoint sides',
|
|
572
|
-
);
|
|
573
|
-
assert.deepEqual(diagnostic.evidence.conflictingPins, [{
|
|
574
|
-
edge: 'ab',
|
|
575
|
-
field: 'toSide',
|
|
576
|
-
path: '/edges/0/toSide',
|
|
577
|
-
value: 'top',
|
|
578
|
-
}]);
|
|
579
|
-
assert.deepEqual(diagnostic.supportedFixes, [
|
|
580
|
-
'remove toSide from edge "ab" so readable-v2 can replan the remaining endpoint-side pins',
|
|
581
|
-
]);
|
|
582
|
-
assert.deepEqual(result.receipt.diagnostics, result.diagnostics);
|
|
583
|
-
|
|
584
|
-
const repaired = clone(document);
|
|
585
|
-
delete repaired.edges[0].toSide;
|
|
586
|
-
const verified = compileWorkflow({ workflow: repaired, qualityProfile: 'showcase' });
|
|
587
|
-
assert.equal(verified.ok, true, JSON.stringify(verified.diagnostics, null, 2));
|
|
588
|
-
});
|
|
589
|
-
|
|
590
|
-
test('readable-v2 reports via and fromSide as a minimal conflict with two verified repairs', () => {
|
|
591
|
-
const document = oneLaneWorkflow([{
|
|
592
|
-
id: 'ab',
|
|
593
|
-
from: 'a',
|
|
594
|
-
to: 'b',
|
|
595
|
-
fromSide: 'right',
|
|
596
|
-
toSide: 'top',
|
|
597
|
-
via: [[20, 119], [20, 50], [334, 50]],
|
|
598
|
-
}]);
|
|
599
|
-
|
|
600
|
-
const result = compileWorkflow({ workflow: document, qualityProfile: 'standard' });
|
|
601
|
-
|
|
602
|
-
assert.equal(result.ok, false);
|
|
603
|
-
assert.equal(result.svg, undefined);
|
|
604
|
-
assert.equal(result.diagnostics.length, 1, JSON.stringify(result.diagnostics, null, 2));
|
|
605
|
-
const [diagnostic] = result.diagnostics;
|
|
606
|
-
assert.equal(diagnostic.code, 'workflow/explicit-pin-conflict');
|
|
607
|
-
assert.equal(diagnostic.evidence.invariant, 'perpendicular endpoint-side direction');
|
|
608
|
-
assert.deepEqual(diagnostic.evidence.conflictingPins, [
|
|
609
|
-
{
|
|
610
|
-
edge: 'ab',
|
|
611
|
-
field: 'fromSide',
|
|
612
|
-
path: '/edges/0/fromSide',
|
|
613
|
-
value: 'right',
|
|
614
|
-
},
|
|
615
|
-
{
|
|
616
|
-
edge: 'ab',
|
|
617
|
-
field: 'via',
|
|
618
|
-
path: '/edges/0/via',
|
|
619
|
-
value: [[20, 119], [20, 50], [334, 50]],
|
|
620
|
-
},
|
|
621
|
-
]);
|
|
622
|
-
assert.deepEqual(diagnostic.supportedFixes, [
|
|
623
|
-
'remove fromSide from edge "ab" and replan the remaining explicit pins',
|
|
624
|
-
'remove via from edge "ab" and replan the remaining explicit pins',
|
|
625
|
-
]);
|
|
626
|
-
|
|
627
|
-
for (const field of ['fromSide', 'via']) {
|
|
628
|
-
const repaired = clone(document);
|
|
629
|
-
delete repaired.edges[0][field];
|
|
630
|
-
const verified = compileWorkflow({ workflow: repaired, qualityProfile: 'standard' });
|
|
631
|
-
assert.equal(
|
|
632
|
-
verified.ok,
|
|
633
|
-
true,
|
|
634
|
-
`removing ${field} must recompile:\n${JSON.stringify(verified.diagnostics, null, 2)}`,
|
|
635
|
-
);
|
|
636
|
-
}
|
|
637
|
-
});
|
|
638
|
-
|
|
639
|
-
test('readable-v2 infers endpoint sides for auto channel pins', () => {
|
|
640
|
-
const cases = [
|
|
641
|
-
{
|
|
642
|
-
edge: { channelY: 77 },
|
|
643
|
-
document: oneLaneWorkflow([]),
|
|
644
|
-
expected: [[94, 93], [94, 77], [334, 77], [334, 93]],
|
|
645
|
-
},
|
|
646
|
-
{
|
|
647
|
-
edge: { channelX: 20 },
|
|
648
|
-
document: workflow({
|
|
649
|
-
lanes: [{ id: 'l0', label: 'L0' }, { id: 'l1', label: 'L1' }],
|
|
650
|
-
nodes: [
|
|
651
|
-
{ id: 'a', lane: 'l0', col: 0, type: 'backend', label: 'A' },
|
|
652
|
-
{ id: 'b', lane: 'l1', col: 2, type: 'backend', label: 'B' },
|
|
653
|
-
],
|
|
654
|
-
edges: [],
|
|
655
|
-
}),
|
|
656
|
-
expected: [[48, 119], [20, 119], [20, 243], [288, 243]],
|
|
657
|
-
},
|
|
658
|
-
{
|
|
659
|
-
edge: { channelX: 20, channelY: 181 },
|
|
660
|
-
document: workflow({
|
|
661
|
-
lanes: [{ id: 'l0', label: 'L0' }, { id: 'l1', label: 'L1' }],
|
|
662
|
-
nodes: [
|
|
663
|
-
{ id: 'a', lane: 'l0', col: 0, type: 'backend', label: 'A' },
|
|
664
|
-
{ id: 'b', lane: 'l1', col: 2, type: 'backend', label: 'B' },
|
|
665
|
-
],
|
|
666
|
-
edges: [],
|
|
667
|
-
}),
|
|
668
|
-
expected: [[48, 119], [20, 119], [20, 181], [334, 181], [334, 217]],
|
|
669
|
-
},
|
|
670
|
-
];
|
|
671
|
-
|
|
672
|
-
for (const qualityProfile of ['standard', 'showcase']) {
|
|
673
|
-
for (const fixture of cases) {
|
|
674
|
-
fixture.document.edges = [{ id: 'ab', from: 'a', to: 'b', ...fixture.edge }];
|
|
675
|
-
const result = compileWorkflow({ workflow: clone(fixture.document), qualityProfile });
|
|
676
|
-
assert.equal(result.ok, true, JSON.stringify(result.diagnostics, null, 2));
|
|
677
|
-
assert.deepEqual(result.receipt.edges[0].points, fixture.expected);
|
|
678
|
-
for (const [field, value] of Object.entries(fixture.edge)) {
|
|
679
|
-
assert.ok(routeContainsChannel(result.receipt.edges[0].points, field, value));
|
|
680
|
-
}
|
|
681
|
-
}
|
|
682
|
-
}
|
|
683
|
-
});
|
|
684
|
-
|
|
685
|
-
test('readable-v2 treats an omitted preset side as a solver choice', () => {
|
|
686
|
-
const crossLane = (route, extra = {}) => workflow({
|
|
687
|
-
lanes: [{ id: 'l0', label: 'X' }, { id: 'l1', label: 'Y' }],
|
|
688
|
-
nodes: [
|
|
689
|
-
{ id: 'a', lane: 'l0', col: 0, type: 'backend', label: 'A' },
|
|
690
|
-
{ id: 'b', lane: 'l1', col: 2, type: 'backend', label: 'B' },
|
|
691
|
-
],
|
|
692
|
-
edges: [{ id: 'ab', from: 'a', to: 'b', route, ...extra }],
|
|
693
|
-
});
|
|
694
|
-
const cases = [
|
|
695
|
-
{
|
|
696
|
-
route: 'straight',
|
|
697
|
-
document: oneLaneWorkflow([{ id: 'ab', from: 'a', to: 'b', route: 'straight' }]),
|
|
698
|
-
expected: [[140, 119], [288, 119]],
|
|
699
|
-
},
|
|
700
|
-
{ route: 'drop', document: crossLane('drop'), expected: [[94, 145], [94, 166], [334, 166], [334, 217]] },
|
|
701
|
-
{ route: 'outside-right', document: crossLane('outside-right'), expected: [[140, 119], [764, 119], [764, 243], [380, 243]] },
|
|
702
|
-
{ route: 'return-left', document: crossLane('return-left'), expected: [[48, 119], [20, 119], [20, 243], [288, 243]] },
|
|
703
|
-
{ route: 'bottom-channel', document: crossLane('bottom-channel'), expected: [[94, 145], [94, 301], [334, 301], [334, 269]] },
|
|
704
|
-
{ route: 'up-channel', document: crossLane('up-channel'), expected: [[94, 93], [94, 65], [334, 65], [334, 217]] },
|
|
705
|
-
{ route: 'outside-right partial', document: crossLane('outside-right', { fromSide: 'right' }), expected: [[140, 119], [764, 119], [764, 243], [380, 243]] },
|
|
706
|
-
];
|
|
707
|
-
|
|
708
|
-
for (const fixture of cases) {
|
|
709
|
-
const result = compileWorkflow({ workflow: fixture.document, qualityProfile: 'standard' });
|
|
710
|
-
assert.equal(result.ok, true, `${fixture.route}: ${JSON.stringify(result.diagnostics, null, 2)}`);
|
|
711
|
-
assert.deepEqual(result.receipt.edges[0].points, fixture.expected);
|
|
712
|
-
}
|
|
713
|
-
});
|
|
714
|
-
|
|
715
|
-
test('readable-v2 treats an infeasible route preset as a candidate-family conflict, not a coordinate pin', () => {
|
|
716
|
-
const document = workflow({
|
|
717
|
-
lanes: [{ id: 'source', label: 'Source' }, { id: 'target', label: 'Target' }],
|
|
718
|
-
nodes: [
|
|
719
|
-
{ id: 'a', lane: 'source', col: 0, type: 'backend', label: 'A' },
|
|
720
|
-
{ id: 'b', lane: 'target', col: 2, type: 'backend', label: 'B' },
|
|
721
|
-
],
|
|
722
|
-
edges: [{ id: 'ab', from: 'a', to: 'b', route: 'straight' }],
|
|
723
|
-
});
|
|
724
|
-
|
|
725
|
-
const result = compileWorkflow({ workflow: document, qualityProfile: 'standard' });
|
|
726
|
-
assert.equal(result.ok, false);
|
|
727
|
-
assert.equal(result.svg, undefined);
|
|
728
|
-
const diagnostic = result.diagnostics.find(({ code }) => code === 'workflow/route-preset-conflict');
|
|
729
|
-
assert.ok(diagnostic);
|
|
730
|
-
assert.ok(result.diagnostics.every(({ code }) => code !== 'workflow/explicit-pin-conflict'));
|
|
731
|
-
assert.ok(diagnostic.supportedFixes.length > 0);
|
|
732
|
-
assert.ok(diagnostic.supportedFixes.every((fix) => /^set edge |^remove route /.test(fix)));
|
|
733
|
-
for (const fix of diagnostic.supportedFixes) {
|
|
734
|
-
const repaired = clone(document);
|
|
735
|
-
const preset = fix.match(/verified preset "([^"]+)"/)?.[1];
|
|
736
|
-
if (preset) repaired.edges[0].route = preset;
|
|
737
|
-
else delete repaired.edges[0].route;
|
|
738
|
-
const verified = compileWorkflow({ workflow: repaired, qualityProfile: 'standard' });
|
|
739
|
-
assert.equal(verified.ok, true, `advertised fix must recompile: ${fix}`);
|
|
740
|
-
}
|
|
741
|
-
});
|
|
742
|
-
|
|
743
|
-
test('readable-v2 never accepts a same-lane drop through the preset-only fallback', () => {
|
|
744
|
-
const document = oneLaneWorkflow([{
|
|
745
|
-
id: 'ab',
|
|
746
|
-
from: 'a',
|
|
747
|
-
to: 'b',
|
|
748
|
-
route: 'drop',
|
|
749
|
-
fromSide: 'top',
|
|
750
|
-
toSide: 'top',
|
|
751
|
-
}]);
|
|
752
|
-
document.nodes.forEach((node) => { node.yOffset = 20; });
|
|
753
|
-
|
|
754
|
-
for (const qualityProfile of ['standard', 'showcase']) {
|
|
755
|
-
const result = compileWorkflow({ workflow: clone(document), qualityProfile });
|
|
756
|
-
assert.equal(result.ok, false);
|
|
757
|
-
assert.equal(result.svg, undefined);
|
|
758
|
-
assert.ok(result.diagnostics.some(({ code }) => code === 'workflow/route-preset-conflict'));
|
|
759
|
-
assert.ok(result.diagnostics.every(({ code }) => code !== 'workflow/explicit-pin-conflict'));
|
|
760
|
-
}
|
|
761
|
-
});
|
|
762
|
-
|
|
763
|
-
test('readable-v2 never silently ignores coordinate pins that conflict with a route preset', () => {
|
|
764
|
-
const cases = [
|
|
765
|
-
{
|
|
766
|
-
name: 'straight with channelY',
|
|
767
|
-
document: oneLaneWorkflow([{
|
|
768
|
-
id: 'ab', from: 'a', to: 'b', route: 'straight', channelY: 300,
|
|
769
|
-
}]),
|
|
770
|
-
},
|
|
771
|
-
{
|
|
772
|
-
name: 'straight with channelX',
|
|
773
|
-
document: oneLaneWorkflow([{
|
|
774
|
-
id: 'ab', from: 'a', to: 'b', route: 'straight', channelX: 300,
|
|
775
|
-
}]),
|
|
776
|
-
},
|
|
777
|
-
{
|
|
778
|
-
name: 'drop with channelX',
|
|
779
|
-
document: workflow({
|
|
780
|
-
lanes: [{ id: 'source', label: 'Source' }, { id: 'target', label: 'Target' }],
|
|
781
|
-
nodes: [
|
|
782
|
-
{ id: 'a', lane: 'source', col: 0, type: 'backend', label: 'A' },
|
|
783
|
-
{ id: 'b', lane: 'target', col: 0, type: 'backend', label: 'B' },
|
|
784
|
-
],
|
|
785
|
-
edges: [{ id: 'ab', from: 'a', to: 'b', route: 'drop', channelX: 777 }],
|
|
786
|
-
}),
|
|
787
|
-
},
|
|
788
|
-
...[
|
|
789
|
-
['outside-right', 'channelY'],
|
|
790
|
-
['return-left', 'channelY'],
|
|
791
|
-
['bottom-channel', 'channelX'],
|
|
792
|
-
['up-channel', 'channelX'],
|
|
793
|
-
].map(([route, field]) => ({
|
|
794
|
-
name: `${route} with ${field}`,
|
|
795
|
-
document: oneLaneWorkflow([{
|
|
796
|
-
id: 'ab', from: 'a', to: 'b', route, [field]: 300,
|
|
797
|
-
}]),
|
|
798
|
-
})),
|
|
799
|
-
];
|
|
800
|
-
|
|
801
|
-
for (const { name, document } of cases) {
|
|
802
|
-
let result;
|
|
803
|
-
assert.doesNotThrow(() => {
|
|
804
|
-
result = compileWorkflow({ workflow: document, qualityProfile: 'standard' });
|
|
805
|
-
}, `${name} must stay inside the public compiler result boundary`);
|
|
806
|
-
assertExplicitPinConflict(result, name);
|
|
807
|
-
const diagnostic = result.diagnostics.find(({ code }) => code === 'workflow/explicit-pin-conflict');
|
|
808
|
-
assert.equal(diagnostic.evidence.route, document.edges[0].route);
|
|
809
|
-
assert.ok(diagnostic.evidence.conflictingPins.length > 0);
|
|
810
|
-
}
|
|
811
|
-
});
|
|
812
|
-
|
|
813
|
-
test('readable-v2 preset compatibility reports both authored causal paths and verified repairs', () => {
|
|
814
|
-
const document = oneLaneWorkflow([{
|
|
815
|
-
id: 'ab', from: 'a', to: 'b', route: 'straight', channelY: 300,
|
|
816
|
-
}]);
|
|
817
|
-
const result = compileWorkflow({ workflow: document, qualityProfile: 'standard' });
|
|
818
|
-
assertExplicitPinConflict(result, 'straight preset with channelY');
|
|
819
|
-
const diagnostic = result.diagnostics[0];
|
|
820
|
-
assert.equal(diagnostic.evidence.invariant, 'route preset compatibility');
|
|
821
|
-
assert.deepEqual(diagnostic.evidence.conflictingPins, [
|
|
822
|
-
{
|
|
823
|
-
edge: 'ab', field: 'route', path: '/edges/0/route', value: 'straight',
|
|
824
|
-
},
|
|
825
|
-
{
|
|
826
|
-
edge: 'ab', field: 'channelY', path: '/edges/0/channelY', value: 300,
|
|
827
|
-
},
|
|
828
|
-
]);
|
|
829
|
-
assert.deepEqual(diagnostic.supportedFixes, [
|
|
830
|
-
'remove route from edge "ab" and keep the remaining verified route assertions',
|
|
831
|
-
'remove channelY from edge "ab" and keep the remaining verified route assertions',
|
|
832
|
-
]);
|
|
833
|
-
|
|
834
|
-
for (const field of ['route', 'channelY']) {
|
|
835
|
-
const repaired = clone(document);
|
|
836
|
-
delete repaired.edges[0][field];
|
|
837
|
-
const verified = compileWorkflow({ workflow: repaired, qualityProfile: 'standard' });
|
|
838
|
-
assert.equal(
|
|
839
|
-
verified.ok,
|
|
840
|
-
true,
|
|
841
|
-
`removing ${field} must recompile:\n${JSON.stringify(verified.diagnostics, null, 2)}`,
|
|
842
|
-
);
|
|
843
|
-
}
|
|
844
|
-
});
|
|
845
|
-
|
|
846
|
-
test('readable-v2 rejects a raw via that does not belong to its route preset family', () => {
|
|
847
|
-
const { start, end } = oneLaneAnchors();
|
|
848
|
-
const document = oneLaneWorkflow([{
|
|
849
|
-
id: 'ab',
|
|
850
|
-
from: 'a',
|
|
851
|
-
to: 'b',
|
|
852
|
-
route: 'straight',
|
|
853
|
-
via: [
|
|
854
|
-
[start[0] + 20, start[1]],
|
|
855
|
-
[start[0] + 20, start[1] + 40],
|
|
856
|
-
[end[0] - 20, start[1] + 40],
|
|
857
|
-
[end[0] - 20, end[1]],
|
|
858
|
-
],
|
|
859
|
-
}]);
|
|
860
|
-
|
|
861
|
-
const result = compileWorkflow({ workflow: document, qualityProfile: 'standard' });
|
|
862
|
-
assertExplicitPinConflict(result, 'straight preset with a detouring via');
|
|
863
|
-
const diagnostic = result.diagnostics.find(({ code }) => code === 'workflow/explicit-pin-conflict');
|
|
864
|
-
assert.equal(diagnostic.evidence.route, 'straight');
|
|
865
|
-
assert.equal(diagnostic.evidence.invariant, 'route preset compatibility');
|
|
866
|
-
});
|
|
867
|
-
|
|
868
|
-
for (const fixture of [
|
|
869
|
-
{
|
|
870
|
-
preset: 'straight',
|
|
871
|
-
lanes: [{ id: 'main', label: 'Main' }],
|
|
872
|
-
nodes: [
|
|
873
|
-
{ id: 'a', lane: 'main', col: 0, type: 'backend', label: 'A' },
|
|
874
|
-
{ id: 'b', lane: 'main', col: 2, type: 'backend', label: 'B' },
|
|
875
|
-
],
|
|
876
|
-
edge: { via: [[180, 119], [240, 119]] },
|
|
877
|
-
expected: [[140, 119], [180, 119], [240, 119], [288, 119]],
|
|
878
|
-
},
|
|
879
|
-
{
|
|
880
|
-
preset: 'drop',
|
|
881
|
-
lanes: [{ id: 'source', label: 'Source' }, { id: 'target', label: 'Target' }],
|
|
882
|
-
nodes: [
|
|
883
|
-
{ id: 'a', lane: 'source', col: 0, type: 'backend', label: 'A' },
|
|
884
|
-
{ id: 'b', lane: 'target', col: 2, type: 'backend', label: 'B' },
|
|
885
|
-
],
|
|
886
|
-
edge: { fromSide: 'bottom', toSide: 'top', via: [[94, 181], [334, 181]] },
|
|
887
|
-
expected: [[94, 145], [94, 181], [334, 181], [334, 217]],
|
|
888
|
-
},
|
|
889
|
-
{
|
|
890
|
-
preset: 'outside-right',
|
|
891
|
-
lanes: [{ id: 'source', label: 'Source' }, { id: 'target', label: 'Target' }],
|
|
892
|
-
nodes: [
|
|
893
|
-
{ id: 'a', lane: 'source', col: 0, type: 'backend', label: 'A' },
|
|
894
|
-
{ id: 'b', lane: 'target', col: 2, type: 'backend', label: 'B' },
|
|
895
|
-
],
|
|
896
|
-
edge: { fromSide: 'right', toSide: 'right', via: [[720, 119], [720, 243]] },
|
|
897
|
-
expected: [[140, 119], [720, 119], [720, 243], [380, 243]],
|
|
898
|
-
},
|
|
899
|
-
{
|
|
900
|
-
preset: 'return-left',
|
|
901
|
-
lanes: [{ id: 'source', label: 'Source' }, { id: 'target', label: 'Target' }],
|
|
902
|
-
nodes: [
|
|
903
|
-
{ id: 'a', lane: 'source', col: 0, type: 'backend', label: 'A' },
|
|
904
|
-
{ id: 'b', lane: 'target', col: 2, type: 'backend', label: 'B' },
|
|
905
|
-
],
|
|
906
|
-
edge: { fromSide: 'left', toSide: 'left', via: [[20, 119], [20, 243]] },
|
|
907
|
-
expected: [[48, 119], [20, 119], [20, 243], [288, 243]],
|
|
908
|
-
},
|
|
909
|
-
{
|
|
910
|
-
preset: 'bottom-channel',
|
|
911
|
-
lanes: [{ id: 'main', label: 'Main' }],
|
|
912
|
-
nodes: [
|
|
913
|
-
{ id: 'a', lane: 'main', col: 0, type: 'backend', label: 'A' },
|
|
914
|
-
{ id: 'b', lane: 'main', col: 2, type: 'backend', label: 'B' },
|
|
915
|
-
],
|
|
916
|
-
edge: { fromSide: 'bottom', toSide: 'bottom', via: [[94, 200], [334, 200]] },
|
|
917
|
-
expected: [[94, 145], [94, 200], [334, 200], [334, 145]],
|
|
918
|
-
},
|
|
919
|
-
{
|
|
920
|
-
preset: 'up-channel',
|
|
921
|
-
lanes: [{ id: 'main', label: 'M' }],
|
|
922
|
-
nodes: [
|
|
923
|
-
{ id: 'a', lane: 'main', col: 0, type: 'backend', label: 'A' },
|
|
924
|
-
{ id: 'b', lane: 'main', col: 2, type: 'backend', label: 'B' },
|
|
925
|
-
],
|
|
926
|
-
edge: { fromSide: 'top', toSide: 'top', via: [[94, 20], [334, 20]] },
|
|
927
|
-
expected: [[94, 93], [94, 20], [334, 20], [334, 93]],
|
|
928
|
-
},
|
|
929
|
-
]) {
|
|
930
|
-
test(`readable-v2 preserves a compatible ${fixture.preset} via without normalization`, () => {
|
|
931
|
-
const document = workflow({
|
|
932
|
-
lanes: fixture.lanes,
|
|
933
|
-
nodes: fixture.nodes,
|
|
934
|
-
edges: [{
|
|
935
|
-
id: 'ab', from: 'a', to: 'b', route: fixture.preset, ...fixture.edge,
|
|
936
|
-
}],
|
|
937
|
-
});
|
|
938
|
-
const result = compileWorkflow({ workflow: document, qualityProfile: 'standard' });
|
|
939
|
-
assert.equal(result.ok, true, JSON.stringify(result.diagnostics, null, 2));
|
|
940
|
-
assert.deepEqual(result.receipt.edges[0].points, fixture.expected);
|
|
941
|
-
});
|
|
942
|
-
}
|
|
943
|
-
|
|
944
|
-
test('readable-v2 keeps a compatible channel pin authoritative inside its route preset', () => {
|
|
945
|
-
const document = workflow({
|
|
946
|
-
lanes: [{ id: 'source', label: 'Source' }, { id: 'target', label: 'Target' }],
|
|
947
|
-
nodes: [
|
|
948
|
-
{ id: 'a', lane: 'source', col: 0, type: 'backend', label: 'A' },
|
|
949
|
-
{ id: 'b', lane: 'target', col: 2, type: 'backend', label: 'B' },
|
|
950
|
-
],
|
|
951
|
-
edges: [{
|
|
952
|
-
id: 'ab',
|
|
953
|
-
from: 'a',
|
|
954
|
-
to: 'b',
|
|
955
|
-
route: 'drop',
|
|
956
|
-
channelY: 181,
|
|
957
|
-
fromSide: 'bottom',
|
|
958
|
-
toSide: 'top',
|
|
959
|
-
}],
|
|
960
|
-
});
|
|
961
|
-
|
|
962
|
-
const result = compileWorkflow({ workflow: document, qualityProfile: 'standard' });
|
|
963
|
-
assert.equal(result.ok, true, JSON.stringify(result.diagnostics, null, 2));
|
|
964
|
-
const points = result.receipt.edges.find(({ id }) => id === 'ab').points;
|
|
965
|
-
assert.ok(
|
|
966
|
-
points.slice(0, -1).some((point, index) => (
|
|
967
|
-
point[1] === 181 && points[index + 1][1] === 181
|
|
968
|
-
)),
|
|
969
|
-
`the final path must contain the authored channelY: ${JSON.stringify(points)}`,
|
|
970
|
-
);
|
|
971
|
-
});
|
|
972
|
-
|
|
973
|
-
for (const fixture of [
|
|
974
|
-
{
|
|
975
|
-
preset: 'outside-right', field: 'channelX', value: 720,
|
|
976
|
-
lanes: [{ id: 'source', label: 'Source' }, { id: 'target', label: 'Target' }],
|
|
977
|
-
nodes: [
|
|
978
|
-
{ id: 'a', lane: 'source', col: 0, type: 'backend', label: 'A' },
|
|
979
|
-
{ id: 'b', lane: 'target', col: 2, type: 'backend', label: 'B' },
|
|
980
|
-
],
|
|
981
|
-
sides: { fromSide: 'right', toSide: 'right' },
|
|
982
|
-
},
|
|
983
|
-
{
|
|
984
|
-
preset: 'return-left', field: 'channelX', value: 20,
|
|
985
|
-
lanes: [{ id: 'source', label: 'Source' }, { id: 'target', label: 'Target' }],
|
|
986
|
-
nodes: [
|
|
987
|
-
{ id: 'a', lane: 'source', col: 0, type: 'backend', label: 'A' },
|
|
988
|
-
{ id: 'b', lane: 'target', col: 2, type: 'backend', label: 'B' },
|
|
989
|
-
],
|
|
990
|
-
sides: { fromSide: 'left', toSide: 'left' },
|
|
991
|
-
},
|
|
992
|
-
{
|
|
993
|
-
preset: 'bottom-channel', field: 'channelY', value: 200,
|
|
994
|
-
lanes: [{ id: 'main', label: 'Main' }],
|
|
995
|
-
nodes: [
|
|
996
|
-
{ id: 'a', lane: 'main', col: 0, type: 'backend', label: 'A' },
|
|
997
|
-
{ id: 'b', lane: 'main', col: 2, type: 'backend', label: 'B' },
|
|
998
|
-
],
|
|
999
|
-
sides: { fromSide: 'bottom', toSide: 'bottom' },
|
|
1000
|
-
},
|
|
1001
|
-
{
|
|
1002
|
-
preset: 'up-channel', field: 'channelY', value: 20,
|
|
1003
|
-
lanes: [{ id: 'main', label: 'Main' }],
|
|
1004
|
-
nodes: [
|
|
1005
|
-
{ id: 'a', lane: 'main', col: 0, type: 'backend', label: 'A' },
|
|
1006
|
-
{ id: 'b', lane: 'main', col: 2, type: 'backend', label: 'B' },
|
|
1007
|
-
],
|
|
1008
|
-
sides: { fromSide: 'top', toSide: 'top' },
|
|
1009
|
-
},
|
|
1010
|
-
]) {
|
|
1011
|
-
test(`readable-v2 keeps ${fixture.field} authoritative for ${fixture.preset}`, () => {
|
|
1012
|
-
const document = workflow({
|
|
1013
|
-
lanes: fixture.lanes,
|
|
1014
|
-
nodes: fixture.nodes,
|
|
1015
|
-
edges: [{
|
|
1016
|
-
id: 'ab',
|
|
1017
|
-
from: 'a',
|
|
1018
|
-
to: 'b',
|
|
1019
|
-
route: fixture.preset,
|
|
1020
|
-
[fixture.field]: fixture.value,
|
|
1021
|
-
...fixture.sides,
|
|
1022
|
-
}],
|
|
1023
|
-
});
|
|
1024
|
-
const result = compileWorkflow({ workflow: document, qualityProfile: 'standard' });
|
|
1025
|
-
assert.equal(result.ok, true, JSON.stringify(result.diagnostics, null, 2));
|
|
1026
|
-
const points = result.receipt.edges[0].points;
|
|
1027
|
-
assert.ok(routeContainsChannel(points, fixture.field, fixture.value));
|
|
1028
|
-
});
|
|
1029
|
-
}
|
|
1030
|
-
|
|
1031
|
-
for (const fixture of [
|
|
1032
|
-
{
|
|
1033
|
-
preset: 'outside-right', field: 'channelX', value: 20,
|
|
1034
|
-
sides: { fromSide: 'left', toSide: 'left' },
|
|
1035
|
-
crossLane: true,
|
|
1036
|
-
},
|
|
1037
|
-
{
|
|
1038
|
-
preset: 'return-left', field: 'channelX', value: 720,
|
|
1039
|
-
sides: { fromSide: 'right', toSide: 'right' },
|
|
1040
|
-
crossLane: true,
|
|
1041
|
-
},
|
|
1042
|
-
{
|
|
1043
|
-
preset: 'bottom-channel', field: 'channelY', value: 20,
|
|
1044
|
-
sides: { fromSide: 'top', toSide: 'top' },
|
|
1045
|
-
},
|
|
1046
|
-
{
|
|
1047
|
-
preset: 'up-channel', field: 'channelY', value: 340,
|
|
1048
|
-
sides: { fromSide: 'bottom', toSide: 'bottom' },
|
|
1049
|
-
},
|
|
1050
|
-
{
|
|
1051
|
-
preset: 'drop', field: 'channelY', value: 20,
|
|
1052
|
-
sides: { fromSide: 'top', toSide: 'top' },
|
|
1053
|
-
},
|
|
1054
|
-
]) {
|
|
1055
|
-
test(`readable-v2 rejects ${fixture.preset} when its channel belongs to another route family`, () => {
|
|
1056
|
-
for (const qualityProfile of ['standard', 'showcase']) {
|
|
1057
|
-
const edges = [{
|
|
1058
|
-
id: 'ab',
|
|
1059
|
-
from: 'a',
|
|
1060
|
-
to: 'b',
|
|
1061
|
-
route: fixture.preset,
|
|
1062
|
-
[fixture.field]: fixture.value,
|
|
1063
|
-
...fixture.sides,
|
|
1064
|
-
}];
|
|
1065
|
-
const document = fixture.crossLane
|
|
1066
|
-
? workflow({
|
|
1067
|
-
lanes: [{ id: 'source', label: 'Source' }, { id: 'target', label: 'Target' }],
|
|
1068
|
-
nodes: [
|
|
1069
|
-
{ id: 'a', lane: 'source', col: 0, type: 'backend', label: 'A' },
|
|
1070
|
-
{ id: 'b', lane: 'target', col: 2, type: 'backend', label: 'B' },
|
|
1071
|
-
],
|
|
1072
|
-
edges,
|
|
1073
|
-
})
|
|
1074
|
-
: oneLaneWorkflow(edges);
|
|
1075
|
-
const result = compileWorkflow({ workflow: document, qualityProfile });
|
|
1076
|
-
assertExplicitPinConflict(result, `${fixture.preset} ${fixture.field} under ${qualityProfile}`);
|
|
1077
|
-
const diagnostic = result.diagnostics.find(({ code }) => (
|
|
1078
|
-
code === 'workflow/explicit-pin-conflict'
|
|
1079
|
-
));
|
|
1080
|
-
assert.equal(diagnostic.evidence.invariant, 'route preset compatibility');
|
|
1081
|
-
}
|
|
1082
|
-
});
|
|
1083
|
-
}
|
|
1084
|
-
|
|
1085
|
-
test('readable-v2 treats channels beside via as assertions over the authored path', () => {
|
|
1086
|
-
const { start, end } = oneLaneAnchors();
|
|
1087
|
-
const document = oneLaneWorkflow([{
|
|
1088
|
-
id: 'ab',
|
|
1089
|
-
from: 'a',
|
|
1090
|
-
to: 'b',
|
|
1091
|
-
channelX: start[0] + 40,
|
|
1092
|
-
channelY: start[1] + 61,
|
|
1093
|
-
via: [
|
|
1094
|
-
[start[0] + 40, start[1]],
|
|
1095
|
-
[start[0] + 40, start[1] + 61],
|
|
1096
|
-
[end[0] - 48, start[1] + 61],
|
|
1097
|
-
[end[0] - 48, end[1]],
|
|
1098
|
-
],
|
|
1099
|
-
}]);
|
|
1100
|
-
|
|
1101
|
-
const matching = compileWorkflow({ workflow: document, qualityProfile: 'standard' });
|
|
1102
|
-
assert.equal(matching.ok, true, JSON.stringify(matching.diagnostics, null, 2));
|
|
1103
|
-
assert.deepEqual(matching.receipt.edges[0].points, [start, ...document.edges[0].via, end]);
|
|
1104
|
-
|
|
1105
|
-
const mismatched = clone(document);
|
|
1106
|
-
mismatched.edges[0].channelX += 1;
|
|
1107
|
-
const result = compileWorkflow({ workflow: mismatched, qualityProfile: 'standard' });
|
|
1108
|
-
assertExplicitPinConflict(result, 'via missing its asserted channelX');
|
|
1109
|
-
const diagnostic = result.diagnostics.find(({ code }) => code === 'workflow/explicit-pin-conflict');
|
|
1110
|
-
assert.equal(diagnostic.evidence.invariant, 'channel pin preservation');
|
|
1111
|
-
assert.deepEqual(
|
|
1112
|
-
diagnostic.evidence.conflictingPins.map(({ edge, field, path }) => ({ edge, field, path })),
|
|
1113
|
-
[
|
|
1114
|
-
{ edge: 'ab', field: 'via', path: '/edges/0/via' },
|
|
1115
|
-
{ edge: 'ab', field: 'channelX', path: '/edges/0/channelX' },
|
|
1116
|
-
],
|
|
1117
|
-
);
|
|
1118
|
-
|
|
1119
|
-
const nearButNotExact = clone(document);
|
|
1120
|
-
nearButNotExact.edges[0].channelX += 0.00005;
|
|
1121
|
-
const nearResult = compileWorkflow({
|
|
1122
|
-
workflow: nearButNotExact,
|
|
1123
|
-
qualityProfile: 'standard',
|
|
1124
|
-
});
|
|
1125
|
-
assertExplicitPinConflict(nearResult, 'channel assertions must preserve exact authored numbers');
|
|
1126
|
-
assert.equal(nearResult.diagnostics[0].evidence.invariant, 'channel pin preservation');
|
|
1127
|
-
});
|
|
1128
|
-
|
|
1129
|
-
test('readable-v2 reports via and channelY as a minimal assertion conflict with two verified repairs', () => {
|
|
1130
|
-
const document = oneLaneWorkflow([{
|
|
1131
|
-
id: 'ab',
|
|
1132
|
-
from: 'a',
|
|
1133
|
-
to: 'b',
|
|
1134
|
-
via: [[94, 77], [334, 77]],
|
|
1135
|
-
channelY: 200,
|
|
1136
|
-
}]);
|
|
1137
|
-
|
|
1138
|
-
const result = compileWorkflow({ workflow: document, qualityProfile: 'standard' });
|
|
1139
|
-
|
|
1140
|
-
assert.equal(result.ok, false);
|
|
1141
|
-
assert.equal(result.svg, undefined);
|
|
1142
|
-
assert.equal(result.diagnostics.length, 1, JSON.stringify(result.diagnostics, null, 2));
|
|
1143
|
-
const [diagnostic] = result.diagnostics;
|
|
1144
|
-
assert.equal(diagnostic.code, 'workflow/explicit-pin-conflict');
|
|
1145
|
-
assert.equal(diagnostic.evidence.invariant, 'channel pin preservation');
|
|
1146
|
-
assert.deepEqual(diagnostic.evidence.conflictingPins, [
|
|
1147
|
-
{
|
|
1148
|
-
edge: 'ab',
|
|
1149
|
-
field: 'via',
|
|
1150
|
-
path: '/edges/0/via',
|
|
1151
|
-
value: [[94, 77], [334, 77]],
|
|
1152
|
-
},
|
|
1153
|
-
{
|
|
1154
|
-
edge: 'ab',
|
|
1155
|
-
field: 'channelY',
|
|
1156
|
-
path: '/edges/0/channelY',
|
|
1157
|
-
value: 200,
|
|
1158
|
-
},
|
|
1159
|
-
]);
|
|
1160
|
-
assert.deepEqual(diagnostic.supportedFixes, [
|
|
1161
|
-
'remove via from edge "ab" and replan the remaining explicit route assertions',
|
|
1162
|
-
'remove channelY from edge "ab" and replan the remaining explicit route assertions',
|
|
1163
|
-
]);
|
|
1164
|
-
|
|
1165
|
-
for (const field of ['via', 'channelY']) {
|
|
1166
|
-
const repaired = clone(document);
|
|
1167
|
-
delete repaired.edges[0][field];
|
|
1168
|
-
const verified = compileWorkflow({ workflow: repaired, qualityProfile: 'standard' });
|
|
1169
|
-
assert.equal(
|
|
1170
|
-
verified.ok,
|
|
1171
|
-
true,
|
|
1172
|
-
`removing ${field} must recompile:\n${JSON.stringify(verified.diagnostics, null, 2)}`,
|
|
1173
|
-
);
|
|
1174
|
-
}
|
|
1175
|
-
});
|
|
1176
|
-
|
|
1177
|
-
test('readable-v2 reports conflicts between absolute label and route pins as typed geometry', () => {
|
|
1178
|
-
const document = workflow({
|
|
1179
|
-
lanes: [{ id: 'top', label: 'Top' }, { id: 'bottom', label: 'Bottom' }],
|
|
1180
|
-
nodes: [
|
|
1181
|
-
{ id: 'a', lane: 'top', col: 0, type: 'backend', label: 'A' },
|
|
1182
|
-
{ id: 'b', lane: 'top', col: 4, type: 'backend', label: 'B' },
|
|
1183
|
-
{ id: 'c', lane: 'bottom', col: 0, type: 'backend', label: 'C' },
|
|
1184
|
-
{ id: 'd', lane: 'bottom', col: 4, type: 'backend', label: 'D' },
|
|
1185
|
-
],
|
|
1186
|
-
edges: [
|
|
1187
|
-
{ id: 'labelpin', from: 'a', to: 'b', label: 'PIN', labelAt: [334, 243] },
|
|
1188
|
-
{ id: 'routepin', from: 'c', to: 'd', via: [[334, 243]] },
|
|
1189
|
-
],
|
|
1190
|
-
});
|
|
1191
|
-
|
|
1192
|
-
const result = compileWorkflow({ workflow: document, qualityProfile: 'showcase' });
|
|
1193
|
-
assertExplicitPinConflict(result, 'labelAt crossing an authored via');
|
|
1194
|
-
const diagnostic = result.diagnostics[0];
|
|
1195
|
-
assert.equal(diagnostic.evidence.invariant, 'explicit label-route clearance');
|
|
1196
|
-
assert.deepEqual(diagnostic.evidence.conflictingPins.map(({ edge, field }) => ({ edge, field })), [
|
|
1197
|
-
{ edge: 'labelpin', field: 'labelAt' },
|
|
1198
|
-
{ edge: 'routepin', field: 'via' },
|
|
1199
|
-
]);
|
|
1200
|
-
assert.equal(diagnostic.evidence.clearancePx, 0);
|
|
1201
|
-
assertSupportedFixesNameChangedEdge(diagnostic, ['labelpin', 'routepin']);
|
|
1202
|
-
assert.ok(
|
|
1203
|
-
diagnostic.supportedFixes.some((fix) => fix.includes('edge "routepin"')),
|
|
1204
|
-
`a routepin repair must identify routepin: ${diagnostic.supportedFixes}`,
|
|
1205
|
-
);
|
|
1206
|
-
assert.doesNotMatch(diagnostic.supportedFixes.join('\n'), /remove (?:one |the )?label(?!At)/i);
|
|
1207
|
-
});
|
|
1208
|
-
|
|
1209
|
-
test('readable-v2 derives label-route pins from joint verified removals when route plans first', () => {
|
|
1210
|
-
const document = workflow({
|
|
1211
|
-
lanes: [{ id: 'top', label: 'Top' }, { id: 'bottom', label: 'Bottom' }],
|
|
1212
|
-
nodes: [
|
|
1213
|
-
{ id: 'a', lane: 'top', col: 0, type: 'backend', label: 'A' },
|
|
1214
|
-
{ id: 'b', lane: 'top', col: 4, type: 'backend', label: 'B' },
|
|
1215
|
-
{ id: 'c', lane: 'bottom', col: 0, type: 'backend', label: 'C' },
|
|
1216
|
-
{ id: 'd', lane: 'bottom', col: 4, type: 'backend', label: 'D' },
|
|
1217
|
-
],
|
|
1218
|
-
edges: [
|
|
1219
|
-
{ id: 'a-route', from: 'c', to: 'd', via: [[334, 243]] },
|
|
1220
|
-
{ id: 'z-label', from: 'a', to: 'b', label: 'PIN', labelAt: [334, 243] },
|
|
1221
|
-
],
|
|
1222
|
-
});
|
|
1223
|
-
document.meta.quality_profile = 'showcase';
|
|
1224
|
-
|
|
1225
|
-
const result = compileWorkflow({ workflow: document });
|
|
1226
|
-
assertExplicitPinConflict(result, 'route-first joint label-route conflict');
|
|
1227
|
-
const diagnostic = result.diagnostics[0];
|
|
1228
|
-
assert.equal(diagnostic.evidence.invariant, 'explicit label-route clearance');
|
|
1229
|
-
assert.deepEqual(diagnostic.evidence.conflictingPins, [{
|
|
1230
|
-
edge: 'z-label', field: 'labelAt', path: '/edges/1/labelAt', value: [334, 243],
|
|
1231
|
-
}]);
|
|
1232
|
-
assert.ok(diagnostic.supportedFixes.length > 0, JSON.stringify(diagnostic, null, 2));
|
|
1233
|
-
for (const fix of diagnostic.supportedFixes) {
|
|
1234
|
-
const replacement = fix.match(/^set labelAt on edge "z-label" to \[(-?\d+(?:\.\d+)?), (-?\d+(?:\.\d+)?)\]$/);
|
|
1235
|
-
assert.ok(replacement, `route removal is not causal and must not be advertised: ${fix}`);
|
|
1236
|
-
const repaired = clone(document);
|
|
1237
|
-
repaired.edges[1].labelAt = replacement.slice(1).map(Number);
|
|
1238
|
-
const verified = compileWorkflow({ workflow: repaired });
|
|
1239
|
-
assert.equal(verified.ok, true, `advertised label repair must recompile: ${fix}\n${JSON.stringify(verified.diagnostics, null, 2)}`);
|
|
1240
|
-
}
|
|
1241
|
-
});
|
|
1242
|
-
|
|
1243
|
-
test('readable-v2 derives both causal pins when label plans before the authored route', () => {
|
|
1244
|
-
const document = workflow({
|
|
1245
|
-
lanes: [{ id: 'top', label: 'Top' }, { id: 'bottom', label: 'Bottom' }],
|
|
1246
|
-
nodes: [
|
|
1247
|
-
{ id: 'a', lane: 'top', col: 0, type: 'backend', label: 'A' },
|
|
1248
|
-
{ id: 'b', lane: 'top', col: 4, type: 'backend', label: 'B' },
|
|
1249
|
-
{ id: 'c', lane: 'bottom', col: 0, type: 'backend', label: 'C' },
|
|
1250
|
-
{ id: 'd', lane: 'bottom', col: 4, type: 'backend', label: 'D' },
|
|
1251
|
-
],
|
|
1252
|
-
edges: [
|
|
1253
|
-
{ id: 'z-route', from: 'c', to: 'd', via: [[334, 243]] },
|
|
1254
|
-
{ id: 'a-label', from: 'a', to: 'b', label: 'PIN', labelAt: [334, 243] },
|
|
1255
|
-
],
|
|
1256
|
-
});
|
|
1257
|
-
document.meta.quality_profile = 'showcase';
|
|
1258
|
-
|
|
1259
|
-
const result = compileWorkflow({ workflow: document });
|
|
1260
|
-
assertExplicitPinConflict(result, 'label-first joint label-route conflict');
|
|
1261
|
-
const diagnostic = result.diagnostics[0];
|
|
1262
|
-
assert.deepEqual(diagnostic.evidence.conflictingPins, [
|
|
1263
|
-
{ edge: 'a-label', field: 'labelAt', path: '/edges/1/labelAt', value: [334, 243] },
|
|
1264
|
-
{ edge: 'z-route', field: 'via', path: '/edges/0/via', value: [[334, 243]] },
|
|
1265
|
-
]);
|
|
1266
|
-
assert.ok(
|
|
1267
|
-
diagnostic.supportedFixes.some((fix) => fix.startsWith('set labelAt on edge "a-label"')),
|
|
1268
|
-
JSON.stringify(diagnostic.supportedFixes, null, 2),
|
|
1269
|
-
);
|
|
1270
|
-
assert.ok(
|
|
1271
|
-
diagnostic.supportedFixes.includes('remove via from edge "z-route" so readable-v2 can replan the remaining authored label-route pins'),
|
|
1272
|
-
JSON.stringify(diagnostic.supportedFixes, null, 2),
|
|
1273
|
-
);
|
|
1274
|
-
});
|
|
1275
|
-
|
|
1276
|
-
test('readable-v2 classifies an authored labelAt colliding with an earlier automatic route', () => {
|
|
1277
|
-
const document = workflow({
|
|
1278
|
-
lanes: [{ id: 'top', label: 'Top' }, { id: 'bottom', label: 'Bottom' }],
|
|
1279
|
-
nodes: [
|
|
1280
|
-
{ id: 'a', lane: 'top', col: 0, type: 'backend', label: 'A' },
|
|
1281
|
-
{ id: 'b', lane: 'top', col: 4, type: 'backend', label: 'B' },
|
|
1282
|
-
{ id: 'c', lane: 'bottom', col: 0, type: 'backend', label: 'C' },
|
|
1283
|
-
{ id: 'd', lane: 'bottom', col: 4, type: 'backend', label: 'D' },
|
|
1284
|
-
],
|
|
1285
|
-
edges: [
|
|
1286
|
-
{ id: 'a-route', from: 'c', to: 'd' },
|
|
1287
|
-
{ id: 'z-label', from: 'a', to: 'b', label: 'PIN', labelAt: [334, 243] },
|
|
1288
|
-
],
|
|
1289
|
-
});
|
|
1290
|
-
document.meta.quality_profile = 'showcase';
|
|
1291
|
-
|
|
1292
|
-
const result = compileWorkflow({ workflow: document });
|
|
1293
|
-
assertExplicitPinConflict(result, 'labelAt colliding with an earlier automatic route');
|
|
1294
|
-
const diagnostic = result.diagnostics[0];
|
|
1295
|
-
assert.equal(diagnostic.evidence.invariant, 'explicit label-route clearance');
|
|
1296
|
-
assert.equal(diagnostic.subject.path, '/edges/1/labelAt');
|
|
1297
|
-
assert.deepEqual(diagnostic.evidence.conflictingPins, [{
|
|
1298
|
-
edge: 'z-label',
|
|
1299
|
-
field: 'labelAt',
|
|
1300
|
-
path: '/edges/1/labelAt',
|
|
1301
|
-
value: [334, 243],
|
|
1302
|
-
}]);
|
|
1303
|
-
assert.deepEqual(diagnostic.evidence.labelAt, [334, 243]);
|
|
1304
|
-
assert.deepEqual(diagnostic.evidence.collidedRoute, {
|
|
1305
|
-
edge: 'a-route',
|
|
1306
|
-
from: 'c',
|
|
1307
|
-
to: 'd',
|
|
1308
|
-
points: [[140, 243], [528, 243]],
|
|
1309
|
-
});
|
|
1310
|
-
assert.deepEqual(diagnostic.evidence.routeSegment, {
|
|
1311
|
-
from: [140, 243],
|
|
1312
|
-
to: [528, 243],
|
|
1313
|
-
});
|
|
1314
|
-
|
|
1315
|
-
for (const fix of diagnostic.supportedFixes) {
|
|
1316
|
-
const replacement = fix.match(/^set labelAt on edge "z-label" to \[(-?\d+(?:\.\d+)?), (-?\d+(?:\.\d+)?)\]$/);
|
|
1317
|
-
assert.ok(replacement, `only a concrete labelAt alternative may be advertised: ${fix}`);
|
|
1318
|
-
const repaired = clone(document);
|
|
1319
|
-
repaired.edges[1].labelAt = replacement.slice(1).map(Number);
|
|
1320
|
-
const verified = compileWorkflow({ workflow: repaired });
|
|
1321
|
-
assert.equal(verified.ok, true, `advertised labelAt alternative must recompile: ${fix}\n${JSON.stringify(verified.diagnostics, null, 2)}`);
|
|
1322
|
-
}
|
|
1323
|
-
});
|
|
1324
|
-
|
|
1325
|
-
test('readable-v2 classifies an automatic label colliding with a later authored route', () => {
|
|
1326
|
-
const document = workflow({
|
|
1327
|
-
lanes: [
|
|
1328
|
-
{ id: 'top', label: 'Top' },
|
|
1329
|
-
{ id: 'mid', label: 'Mid' },
|
|
1330
|
-
{ id: 'bottom', label: 'Bottom' },
|
|
1331
|
-
],
|
|
1332
|
-
nodes: [
|
|
1333
|
-
{ id: 'a', lane: 'mid', col: 0, type: 'backend', label: 'A' },
|
|
1334
|
-
{ id: 'b', lane: 'mid', col: 4, type: 'backend', label: 'B' },
|
|
1335
|
-
{ id: 'c', lane: 'top', col: 2, type: 'backend', label: 'C' },
|
|
1336
|
-
{ id: 'd', lane: 'bottom', col: 2, type: 'backend', label: 'D' },
|
|
1337
|
-
],
|
|
1338
|
-
edges: [
|
|
1339
|
-
{ id: 'a-label', from: 'a', to: 'b', label: 'AUTO' },
|
|
1340
|
-
{ id: 'z-route', from: 'c', to: 'd', via: [[334, 243]] },
|
|
1341
|
-
],
|
|
1342
|
-
});
|
|
1343
|
-
document.meta.quality_profile = 'showcase';
|
|
1344
|
-
|
|
1345
|
-
const result = compileWorkflow({ workflow: document });
|
|
1346
|
-
assertExplicitPinConflict(result, 'automatic label colliding with a later authored route');
|
|
1347
|
-
const diagnostic = result.diagnostics[0];
|
|
1348
|
-
assert.equal(diagnostic.evidence.invariant, 'explicit label-route clearance');
|
|
1349
|
-
assert.equal(diagnostic.subject.path, '/edges/1/via');
|
|
1350
|
-
assert.deepEqual(diagnostic.evidence.conflictingPins, [{
|
|
1351
|
-
edge: 'z-route',
|
|
1352
|
-
field: 'via',
|
|
1353
|
-
path: '/edges/1/via',
|
|
1354
|
-
value: [[334, 243]],
|
|
1355
|
-
}]);
|
|
1356
|
-
assert.deepEqual(diagnostic.evidence.collidedRoute, {
|
|
1357
|
-
edge: 'z-route',
|
|
1358
|
-
from: 'c',
|
|
1359
|
-
to: 'd',
|
|
1360
|
-
points: [[334, 145], [334, 243], [334, 341]],
|
|
1361
|
-
});
|
|
1362
|
-
assert.deepEqual(diagnostic.evidence.routeSegment, {
|
|
1363
|
-
from: [334, 145],
|
|
1364
|
-
to: [334, 341],
|
|
1365
|
-
});
|
|
1366
|
-
|
|
1367
|
-
assert.ok(diagnostic.supportedFixes.length > 0, JSON.stringify(diagnostic, null, 2));
|
|
1368
|
-
for (const fix of diagnostic.supportedFixes) {
|
|
1369
|
-
assert.equal(
|
|
1370
|
-
fix,
|
|
1371
|
-
'remove via from edge "z-route" so readable-v2 can replan the remaining authored route assertions',
|
|
1372
|
-
);
|
|
1373
|
-
const repaired = clone(document);
|
|
1374
|
-
delete repaired.edges[1].via;
|
|
1375
|
-
const verified = compileWorkflow({ workflow: repaired });
|
|
1376
|
-
assert.equal(verified.ok, true, `advertised route alternative must recompile: ${fix}\n${JSON.stringify(verified.diagnostics, null, 2)}`);
|
|
1377
|
-
}
|
|
1378
|
-
});
|
|
1379
|
-
|
|
1380
|
-
test('readable-v2 classifies an authored labelAt colliding with an earlier automatic label', () => {
|
|
1381
|
-
const document = oneLaneWorkflow([
|
|
1382
|
-
{ id: 'a-auto', from: 'a', to: 'b', label: 'AUTO' },
|
|
1383
|
-
{ id: 'z-pin', from: 'a', to: 'b', label: 'PIN', labelAt: [214, 119] },
|
|
1384
|
-
]);
|
|
1385
|
-
document.meta.quality_profile = 'showcase';
|
|
1386
|
-
|
|
1387
|
-
const result = compileWorkflow({ workflow: document });
|
|
1388
|
-
assertExplicitPinConflict(result, 'labelAt colliding with an earlier automatic label');
|
|
1389
|
-
const diagnostic = result.diagnostics[0];
|
|
1390
|
-
assert.equal(diagnostic.evidence.invariant, 'explicit label-label clearance');
|
|
1391
|
-
assert.equal(diagnostic.subject.path, '/edges/1/labelAt');
|
|
1392
|
-
assert.deepEqual(diagnostic.evidence.conflictingPins, [{
|
|
1393
|
-
edge: 'z-pin',
|
|
1394
|
-
field: 'labelAt',
|
|
1395
|
-
path: '/edges/1/labelAt',
|
|
1396
|
-
value: [214, 119],
|
|
1397
|
-
}]);
|
|
1398
|
-
assert.deepEqual(diagnostic.evidence.labelRects.map(({ edge, ...rect }) => ({ edge, ...rect })), [
|
|
1399
|
-
{ edge: 'z-pin', x: 199, y: 109, width: 30, height: 14 },
|
|
1400
|
-
{ edge: 'a-auto', x: 199, y: 99, width: 30, height: 14 },
|
|
1401
|
-
]);
|
|
1402
|
-
|
|
1403
|
-
for (const fix of diagnostic.supportedFixes) {
|
|
1404
|
-
const replacement = fix.match(/^set labelAt on edge "z-pin" to \[(-?\d+(?:\.\d+)?), (-?\d+(?:\.\d+)?)\]$/);
|
|
1405
|
-
assert.ok(replacement, `only a concrete labelAt alternative may be advertised: ${fix}`);
|
|
1406
|
-
const repaired = clone(document);
|
|
1407
|
-
repaired.edges[1].labelAt = replacement.slice(1).map(Number);
|
|
1408
|
-
const verified = compileWorkflow({ workflow: repaired });
|
|
1409
|
-
assert.equal(verified.ok, true, `advertised labelAt alternative must recompile: ${fix}\n${JSON.stringify(verified.diagnostics, null, 2)}`);
|
|
1410
|
-
}
|
|
1411
|
-
});
|
|
1412
|
-
|
|
1413
|
-
test('readable-v2 derives the causal labelAt from joint verified label removals', () => {
|
|
1414
|
-
const document = workflow({
|
|
1415
|
-
lanes: [{ id: 'top', label: 'Top' }, { id: 'bottom', label: 'Bottom' }],
|
|
1416
|
-
nodes: [
|
|
1417
|
-
{ id: 'a', lane: 'top', col: 0, type: 'backend', label: 'A' },
|
|
1418
|
-
{ id: 'b', lane: 'top', col: 4, type: 'backend', label: 'B' },
|
|
1419
|
-
{ id: 'c', lane: 'bottom', col: 0, type: 'backend', label: 'C' },
|
|
1420
|
-
{ id: 'd', lane: 'bottom', col: 4, type: 'backend', label: 'D' },
|
|
1421
|
-
],
|
|
1422
|
-
edges: [
|
|
1423
|
-
{ id: 'a-label', from: 'a', to: 'b', label: 'FIRST', labelAt: [334, 119] },
|
|
1424
|
-
{ id: 'z-label', from: 'c', to: 'd', label: 'SECOND', labelAt: [334, 119] },
|
|
1425
|
-
],
|
|
1426
|
-
});
|
|
1427
|
-
document.meta.quality_profile = 'showcase';
|
|
1428
|
-
|
|
1429
|
-
const result = compileWorkflow({ workflow: document });
|
|
1430
|
-
assertExplicitPinConflict(result, 'joint causal label-label conflict');
|
|
1431
|
-
const diagnostic = result.diagnostics[0];
|
|
1432
|
-
assert.equal(diagnostic.evidence.invariant, 'explicit label-label clearance');
|
|
1433
|
-
assert.deepEqual(diagnostic.evidence.conflictingPins, [{
|
|
1434
|
-
edge: 'z-label', field: 'labelAt', path: '/edges/1/labelAt', value: [334, 119],
|
|
1435
|
-
}]);
|
|
1436
|
-
assert.ok(diagnostic.supportedFixes.length > 0, JSON.stringify(diagnostic, null, 2));
|
|
1437
|
-
for (const fix of diagnostic.supportedFixes) {
|
|
1438
|
-
const replacement = fix.match(/^set labelAt on edge "z-label" to \[(-?\d+(?:\.\d+)?), (-?\d+(?:\.\d+)?)\]$/);
|
|
1439
|
-
assert.ok(replacement, `only the causal label pin may be changed: ${fix}`);
|
|
1440
|
-
const repaired = clone(document);
|
|
1441
|
-
repaired.edges[1].labelAt = replacement.slice(1).map(Number);
|
|
1442
|
-
const verified = compileWorkflow({ workflow: repaired });
|
|
1443
|
-
assert.equal(verified.ok, true, `advertised label repair must recompile: ${fix}\n${JSON.stringify(verified.diagnostics, null, 2)}`);
|
|
1444
|
-
}
|
|
1445
|
-
});
|
|
1446
|
-
|
|
1447
|
-
test('readable-v2 reports conflicts between two absolute label pins without deleting semantics', () => {
|
|
1448
|
-
const document = oneLaneWorkflow([
|
|
1449
|
-
{
|
|
1450
|
-
id: 'one', from: 'a', to: 'b', label: 'ONE', via: [[214, 119]], labelAt: [214, 80],
|
|
1451
|
-
},
|
|
1452
|
-
{
|
|
1453
|
-
id: 'two', from: 'a', to: 'b', label: 'TWO', via: [[214, 119]], labelAt: [214, 80],
|
|
1454
|
-
},
|
|
1455
|
-
]);
|
|
1456
|
-
|
|
1457
|
-
for (const qualityProfile of ['standard', 'showcase']) {
|
|
1458
|
-
const result = compileWorkflow({ workflow: clone(document), qualityProfile });
|
|
1459
|
-
assertExplicitPinConflict(result, `overlapping labelAt pins under ${qualityProfile}`);
|
|
1460
|
-
const diagnostic = result.diagnostics[0];
|
|
1461
|
-
assert.equal(diagnostic.evidence.invariant, 'explicit label-label clearance');
|
|
1462
|
-
assert.deepEqual(diagnostic.evidence.conflictingPins.map(({ edge, field }) => ({ edge, field })), [
|
|
1463
|
-
{ edge: 'one', field: 'labelAt' },
|
|
1464
|
-
{ edge: 'two', field: 'labelAt' },
|
|
1465
|
-
]);
|
|
1466
|
-
assertSupportedFixesNameChangedEdge(diagnostic, ['one', 'two']);
|
|
1467
|
-
assert.doesNotMatch(diagnostic.supportedFixes.join('\n'), /remove (?:one |the )?label(?!At)/i);
|
|
1468
|
-
}
|
|
1469
|
-
});
|
|
1470
|
-
|
|
1471
|
-
test('readable-v2 reports showcase crossings between two absolute route pins', () => {
|
|
1472
|
-
const document = workflow({
|
|
1473
|
-
lanes: [
|
|
1474
|
-
{ id: 'top', label: 'Top' },
|
|
1475
|
-
{ id: 'middle', label: 'Middle' },
|
|
1476
|
-
{ id: 'bottom', label: 'Bottom' },
|
|
1477
|
-
],
|
|
1478
|
-
nodes: [
|
|
1479
|
-
{ id: 'left', lane: 'middle', col: 0, type: 'backend', label: 'Left' },
|
|
1480
|
-
{ id: 'right', lane: 'middle', col: 4, type: 'backend', label: 'Right' },
|
|
1481
|
-
{ id: 'above', lane: 'top', col: 2, type: 'backend', label: 'Above' },
|
|
1482
|
-
{ id: 'below', lane: 'bottom', col: 2, type: 'backend', label: 'Below' },
|
|
1483
|
-
],
|
|
1484
|
-
edges: [
|
|
1485
|
-
{ id: 'horizontal', from: 'left', to: 'right', via: [[250, 243]] },
|
|
1486
|
-
{ id: 'vertical', from: 'above', to: 'below', via: [[334, 200]] },
|
|
1487
|
-
],
|
|
1488
|
-
});
|
|
1489
|
-
|
|
1490
|
-
const result = compileWorkflow({ workflow: document, qualityProfile: 'showcase' });
|
|
1491
|
-
assertExplicitPinConflict(result, 'two crossing absolute routes');
|
|
1492
|
-
const [diagnostic] = result.diagnostics;
|
|
1493
|
-
assert.equal(diagnostic.evidence.invariant, 'explicit route-route crossing');
|
|
1494
|
-
assert.deepEqual(diagnostic.evidence.point, [334, 243]);
|
|
1495
|
-
assertSupportedFixesNameChangedEdge(diagnostic, ['horizontal', 'vertical']);
|
|
1496
|
-
assert.ok(
|
|
1497
|
-
diagnostic.supportedFixes.some((fix) => fix.includes('edge "vertical"')),
|
|
1498
|
-
`a vertical repair must identify vertical: ${diagnostic.supportedFixes}`,
|
|
1499
|
-
);
|
|
1500
|
-
});
|
|
1501
|
-
|
|
1502
|
-
test('readable-v2 catches an automatic route crossing exactly at an authored straight-through via', () => {
|
|
1503
|
-
const document = crossingAtForwardCollinearViaWorkflow();
|
|
1504
|
-
const standard = compileWorkflow({ workflow: clone(document), qualityProfile: 'standard' });
|
|
1505
|
-
assert.equal(standard.ok, true, JSON.stringify(standard.diagnostics, null, 2));
|
|
1506
|
-
assert.deepEqual(
|
|
1507
|
-
standard.receipt.edges.find(({ id }) => id === 'z-pinned').points,
|
|
1508
|
-
[[334, 145], [334, 243], [334, 341]],
|
|
1509
|
-
'analysis must not remove the authored via from the receipt',
|
|
1510
|
-
);
|
|
1511
|
-
|
|
1512
|
-
const result = compileWorkflow({ workflow: document, qualityProfile: 'showcase' });
|
|
1513
|
-
assertExplicitPinConflict(result, 'an automatic route crossing at an authored straight-through via');
|
|
1514
|
-
const diagnostic = result.diagnostics.find(({ code }) => code === 'workflow/explicit-pin-conflict');
|
|
1515
|
-
assert.equal(diagnostic.evidence.invariant, 'explicit route-route crossing');
|
|
1516
|
-
assert.deepEqual(diagnostic.evidence.point, [334, 243]);
|
|
1517
|
-
assert.deepEqual(diagnostic.evidence.conflictingPins, [{
|
|
1518
|
-
edge: 'z-pinned',
|
|
1519
|
-
field: 'via',
|
|
1520
|
-
path: '/edges/1/via',
|
|
1521
|
-
value: [[334, 243]],
|
|
1522
|
-
}]);
|
|
1523
|
-
assert.equal(diagnostic.subject.edge, 'z-pinned');
|
|
1524
|
-
assert.equal(diagnostic.subject.path, '/edges/1/via');
|
|
1525
|
-
assertSupportedFixesNameChangedEdge(diagnostic, ['z-pinned']);
|
|
1526
|
-
});
|
|
1527
|
-
|
|
1528
|
-
test('readable-v2 catches two pinned routes crossing exactly at their straight-through vias', () => {
|
|
1529
|
-
const document = crossingAtForwardCollinearViaWorkflow({ pinHorizontal: true });
|
|
1530
|
-
const standard = compileWorkflow({ workflow: clone(document), qualityProfile: 'standard' });
|
|
1531
|
-
assert.equal(standard.ok, true, JSON.stringify(standard.diagnostics, null, 2));
|
|
1532
|
-
assert.deepEqual(
|
|
1533
|
-
standard.receipt.edges.map(({ id, points }) => ({ id, points })),
|
|
1534
|
-
[
|
|
1535
|
-
{ id: 'a-pinned', points: [[140, 243], [334, 243], [528, 243]] },
|
|
1536
|
-
{ id: 'z-pinned', points: [[334, 145], [334, 243], [334, 341]] },
|
|
1537
|
-
],
|
|
1538
|
-
'analysis must retain both authored straight-through vias in the receipt',
|
|
1539
|
-
);
|
|
1540
|
-
|
|
1541
|
-
const result = compileWorkflow({ workflow: document, qualityProfile: 'showcase' });
|
|
1542
|
-
assertExplicitPinConflict(result, 'two pinned routes crossing at straight-through vias');
|
|
1543
|
-
const diagnostic = result.diagnostics.find(({ code }) => code === 'workflow/explicit-pin-conflict');
|
|
1544
|
-
assert.equal(diagnostic.evidence.invariant, 'explicit route-route crossing');
|
|
1545
|
-
assert.deepEqual(diagnostic.evidence.point, [334, 243]);
|
|
1546
|
-
assert.deepEqual(diagnostic.evidence.conflictingPins, [
|
|
1547
|
-
{ edge: 'a-pinned', field: 'via', path: '/edges/0/via', value: [[334, 243]] },
|
|
1548
|
-
{ edge: 'z-pinned', field: 'via', path: '/edges/1/via', value: [[334, 243]] },
|
|
1549
|
-
]);
|
|
1550
|
-
assertSupportedFixesNameChangedEdge(diagnostic, ['a-pinned', 'z-pinned']);
|
|
1551
|
-
});
|
|
1552
|
-
|
|
1553
|
-
test('readable-v2 classifies a side-only authored route crossing an automatic route', () => {
|
|
1554
|
-
const document = workflow({
|
|
1555
|
-
lanes: ['l0', 'l1', 'l2'].map((id) => ({ id, label: id })),
|
|
1556
|
-
nodes: [
|
|
1557
|
-
{ id: 'n00', lane: 'l0', col: 0, type: 'backend', label: 'N00' },
|
|
1558
|
-
{ id: 'n01', lane: 'l0', col: 1, type: 'backend', label: 'N01' },
|
|
1559
|
-
{ id: 'n02', lane: 'l0', col: 2, type: 'backend', label: 'N02' },
|
|
1560
|
-
{ id: 'n11', lane: 'l1', col: 1, type: 'backend', label: 'N11' },
|
|
1561
|
-
],
|
|
1562
|
-
edges: [
|
|
1563
|
-
{ id: 'a-auto', from: 'n00', to: 'n01' },
|
|
1564
|
-
{ id: 'z-side', from: 'n02', to: 'n11', fromSide: 'top', toSide: 'left' },
|
|
1565
|
-
],
|
|
1566
|
-
});
|
|
1567
|
-
document.meta.quality_profile = 'showcase';
|
|
1568
|
-
|
|
1569
|
-
const result = compileWorkflow({ workflow: document });
|
|
1570
|
-
assertExplicitPinConflict(result, 'side-only route crossing an automatic route');
|
|
1571
|
-
const diagnostic = result.diagnostics[0];
|
|
1572
|
-
assert.equal(diagnostic.evidence.invariant, 'explicit route-route crossing');
|
|
1573
|
-
assert.ok(diagnostic.evidence.conflictingPins.length > 0);
|
|
1574
|
-
assert.ok(diagnostic.evidence.conflictingPins.every(({ edge, field, path, value }) => (
|
|
1575
|
-
edge === 'z-side'
|
|
1576
|
-
&& ['fromSide', 'toSide'].includes(field)
|
|
1577
|
-
&& path === `/edges/1/${field}`
|
|
1578
|
-
&& value === document.edges[1][field]
|
|
1579
|
-
)), JSON.stringify(diagnostic.evidence.conflictingPins, null, 2));
|
|
1580
|
-
assert.ok(diagnostic.supportedFixes.length > 0, JSON.stringify(diagnostic, null, 2));
|
|
1581
|
-
|
|
1582
|
-
for (const fix of diagnostic.supportedFixes) {
|
|
1583
|
-
const removal = fix.match(/^remove (fromSide|toSide)(?: and (fromSide|toSide))? from edge "z-side" /);
|
|
1584
|
-
assert.ok(removal, `supported fix must be a concrete side-pin removal: ${fix}`);
|
|
1585
|
-
const repaired = clone(document);
|
|
1586
|
-
for (const field of removal.slice(1).filter(Boolean)) delete repaired.edges[1][field];
|
|
1587
|
-
const verified = compileWorkflow({ workflow: repaired });
|
|
1588
|
-
assert.equal(verified.ok, true, `advertised side-pin repair must recompile: ${fix}\n${JSON.stringify(verified.diagnostics, null, 2)}`);
|
|
1589
|
-
}
|
|
1590
|
-
});
|
|
1591
|
-
|
|
1592
|
-
test('readable-v2 classifies a side-only authored route sharing an automatic corridor', () => {
|
|
1593
|
-
const document = workflow({
|
|
1594
|
-
lanes: ['l0', 'l1', 'l2'].map((id) => ({ id, label: id })),
|
|
1595
|
-
nodes: [
|
|
1596
|
-
{ id: 'n00', lane: 'l0', col: 0, type: 'backend', label: 'N00' },
|
|
1597
|
-
{ id: 'n02', lane: 'l0', col: 2, type: 'backend', label: 'N02' },
|
|
1598
|
-
{ id: 'n01', lane: 'l0', col: 1, type: 'backend', label: 'N01' },
|
|
1599
|
-
{ id: 'n03', lane: 'l0', col: 3, type: 'backend', label: 'N03' },
|
|
1600
|
-
],
|
|
1601
|
-
edges: [
|
|
1602
|
-
{ id: 'a-auto', from: 'n00', to: 'n02' },
|
|
1603
|
-
{ id: 'z-side', from: 'n01', to: 'n03', fromSide: 'bottom', toSide: 'top' },
|
|
1604
|
-
],
|
|
1605
|
-
});
|
|
1606
|
-
document.meta.quality_profile = 'showcase';
|
|
1607
|
-
|
|
1608
|
-
const result = compileWorkflow({ workflow: document });
|
|
1609
|
-
assertExplicitPinConflict(result, 'side-only route sharing an automatic corridor');
|
|
1610
|
-
const diagnostic = result.diagnostics[0];
|
|
1611
|
-
assert.equal(diagnostic.evidence.invariant, 'explicit route-route corridor clearance');
|
|
1612
|
-
assert.deepEqual(diagnostic.evidence.overlapStart, [214, 161]);
|
|
1613
|
-
assert.deepEqual(diagnostic.evidence.overlapEnd, [334, 161]);
|
|
1614
|
-
assert.equal(diagnostic.evidence.overlapLengthPx, 120);
|
|
1615
|
-
assert.ok(diagnostic.evidence.conflictingPins.length > 0);
|
|
1616
|
-
assert.ok(diagnostic.evidence.conflictingPins.every(({ edge, field, path, value }) => (
|
|
1617
|
-
edge === 'z-side'
|
|
1618
|
-
&& ['fromSide', 'toSide'].includes(field)
|
|
1619
|
-
&& path === `/edges/1/${field}`
|
|
1620
|
-
&& value === document.edges[1][field]
|
|
1621
|
-
)), JSON.stringify(diagnostic.evidence.conflictingPins, null, 2));
|
|
1622
|
-
assert.ok(diagnostic.supportedFixes.length > 0, JSON.stringify(diagnostic, null, 2));
|
|
1623
|
-
|
|
1624
|
-
for (const fix of diagnostic.supportedFixes) {
|
|
1625
|
-
const removal = fix.match(/^remove (fromSide|toSide)(?: and (fromSide|toSide))? from edge "z-side" /);
|
|
1626
|
-
assert.ok(removal, `supported fix must be a concrete side-pin removal: ${fix}`);
|
|
1627
|
-
const repaired = clone(document);
|
|
1628
|
-
for (const field of removal.slice(1).filter(Boolean)) delete repaired.edges[1][field];
|
|
1629
|
-
const verified = compileWorkflow({ workflow: repaired });
|
|
1630
|
-
assert.equal(verified.ok, true, `advertised side-pin repair must recompile: ${fix}\n${JSON.stringify(verified.diagnostics, null, 2)}`);
|
|
1631
|
-
}
|
|
1632
|
-
});
|
|
1633
|
-
|
|
1634
|
-
test('readable-v2 classifies a preset-only route sharing an automatic corridor', () => {
|
|
1635
|
-
const document = workflow({
|
|
1636
|
-
lanes: [{ id: 'l0', label: 'l0' }, { id: 'l1', label: 'l1' }],
|
|
1637
|
-
nodes: [
|
|
1638
|
-
{ id: 'n00', lane: 'l0', col: 0, type: 'backend', label: 'N00' },
|
|
1639
|
-
{ id: 'n11', lane: 'l1', col: 1, type: 'backend', label: 'N11' },
|
|
1640
|
-
{ id: 'n01', lane: 'l0', col: 1, type: 'backend', label: 'N01' },
|
|
1641
|
-
{ id: 'n02', lane: 'l0', col: 2, type: 'backend', label: 'N02' },
|
|
1642
|
-
],
|
|
1643
|
-
edges: [
|
|
1644
|
-
{ id: 'a-auto', from: 'n00', to: 'n11' },
|
|
1645
|
-
{ id: 'z-route', from: 'n01', to: 'n02', route: 'bottom-channel' },
|
|
1646
|
-
],
|
|
1647
|
-
});
|
|
1648
|
-
document.meta.quality_profile = 'showcase';
|
|
1649
|
-
|
|
1650
|
-
const result = compileWorkflow({ workflow: document });
|
|
1651
|
-
assertExplicitPinConflict(result, 'preset-only route sharing an automatic corridor');
|
|
1652
|
-
const diagnostic = result.diagnostics[0];
|
|
1653
|
-
assert.equal(diagnostic.evidence.invariant, 'explicit route-route corridor clearance');
|
|
1654
|
-
assert.deepEqual(diagnostic.subject, {
|
|
1655
|
-
diagramType: 'workflow',
|
|
1656
|
-
edge: 'z-route',
|
|
1657
|
-
from: 'n01',
|
|
1658
|
-
to: 'n02',
|
|
1659
|
-
path: '/edges/1/route',
|
|
1660
|
-
});
|
|
1661
|
-
assert.deepEqual(diagnostic.evidence.conflictingPins, [{
|
|
1662
|
-
edge: 'z-route',
|
|
1663
|
-
field: 'route',
|
|
1664
|
-
path: '/edges/1/route',
|
|
1665
|
-
value: 'bottom-channel',
|
|
1666
|
-
}]);
|
|
1667
|
-
assert.deepEqual(diagnostic.evidence.overlapStart, [214, 166]);
|
|
1668
|
-
assert.deepEqual(diagnostic.evidence.overlapEnd, [214, 177]);
|
|
1669
|
-
assert.equal(diagnostic.evidence.overlapLengthPx, 11);
|
|
1670
|
-
assert.deepEqual(diagnostic.supportedFixes, [
|
|
1671
|
-
'remove route from edge "z-route" so readable-v2 can replan the remaining authored route assertions',
|
|
1672
|
-
]);
|
|
1673
|
-
|
|
1674
|
-
const repaired = clone(document);
|
|
1675
|
-
delete repaired.edges[1].route;
|
|
1676
|
-
const verified = compileWorkflow({ workflow: repaired });
|
|
1677
|
-
assert.equal(verified.ok, true, JSON.stringify(verified.diagnostics, null, 2));
|
|
1678
|
-
});
|
|
1679
|
-
|
|
1680
|
-
test('readable-v2 reports unknown edge endpoints with a precise semantic diagnostic', () => {
|
|
1681
|
-
const document = oneLaneWorkflow([{ id: 'ab', from: 'a', to: 'ghost' }]);
|
|
1682
|
-
const result = compileWorkflow({ workflow: document, qualityProfile: 'standard' });
|
|
1683
|
-
assert.equal(result.ok, false);
|
|
1684
|
-
assert.equal(result.diagnostics.length, 1);
|
|
1685
|
-
assert.equal(result.diagnostics[0].code, 'workflow/unknown-edge-endpoint');
|
|
1686
|
-
assert.equal(result.diagnostics[0].subject.edge, 'ab');
|
|
1687
|
-
assert.equal(result.diagnostics[0].subject.path, '/edges/0/to');
|
|
1688
|
-
assert.deepEqual(result.diagnostics[0].evidence, {
|
|
1689
|
-
endpoint: 'target',
|
|
1690
|
-
unknownNodeId: 'ghost',
|
|
1691
|
-
availableNodeIds: ['a', 'b'],
|
|
1692
|
-
});
|
|
1693
|
-
});
|
|
1694
|
-
|
|
1695
|
-
test('unknown endpoint diagnostics retain the authored edge pointer after canonical sorting', () => {
|
|
1696
|
-
const document = oneLaneWorkflow([
|
|
1697
|
-
{ id: 'z-valid', from: 'a', to: 'b' },
|
|
1698
|
-
{ id: 'a-invalid', from: 'a', to: 'ghost' },
|
|
1699
|
-
]);
|
|
1700
|
-
|
|
1701
|
-
const result = compileWorkflow({ workflow: document, qualityProfile: 'standard' });
|
|
1702
|
-
|
|
1703
|
-
assert.equal(result.ok, false);
|
|
1704
|
-
assert.equal(result.svg, undefined);
|
|
1705
|
-
assert.equal(result.diagnostics.length, 1);
|
|
1706
|
-
const [diagnostic] = result.diagnostics;
|
|
1707
|
-
assert.equal(diagnostic.code, 'workflow/unknown-edge-endpoint');
|
|
1708
|
-
assert.equal(diagnostic.subject.edge, 'a-invalid');
|
|
1709
|
-
assert.equal(diagnostic.subject.path, '/edges/1/to');
|
|
1710
|
-
assert.equal(diagnostic.evidence.endpoint, 'target');
|
|
1711
|
-
assert.equal(diagnostic.evidence.unknownNodeId, 'ghost');
|
|
1712
|
-
assert.ok(diagnostic.supportedFixes.length > 0);
|
|
1713
|
-
});
|
|
1714
|
-
|
|
1715
|
-
test('unknown node lane diagnostics retain the authored node pointer after canonical sorting', () => {
|
|
1716
|
-
const document = oneLaneWorkflow([]);
|
|
1717
|
-
document.nodes[0].lane = 'ghost';
|
|
1718
|
-
|
|
1719
|
-
const result = compileWorkflow({ workflow: document, qualityProfile: 'standard' });
|
|
1720
|
-
|
|
1721
|
-
assert.equal(result.ok, false);
|
|
1722
|
-
assert.equal(result.svg, undefined);
|
|
1723
|
-
assert.equal(result.diagnostics.length, 1);
|
|
1724
|
-
const [diagnostic] = result.diagnostics;
|
|
1725
|
-
assert.equal(diagnostic.code, 'workflow/unknown-node-lane');
|
|
1726
|
-
assert.equal(diagnostic.subject.node, 'a');
|
|
1727
|
-
assert.equal(diagnostic.subject.path, '/nodes/0/lane');
|
|
1728
|
-
assert.deepEqual(diagnostic.evidence, {
|
|
1729
|
-
unknownLaneId: 'ghost',
|
|
1730
|
-
availableLaneIds: ['main'],
|
|
1731
|
-
});
|
|
1732
|
-
assert.ok(diagnostic.supportedFixes.length > 0);
|
|
1733
|
-
});
|
|
1734
|
-
|
|
1735
|
-
for (const fixture of [
|
|
1736
|
-
{
|
|
1737
|
-
name: 'lane id',
|
|
1738
|
-
code: 'workflow/duplicate-lane-id',
|
|
1739
|
-
expectedSubject: { lane: 'main', path: '/lanes/1/id' },
|
|
1740
|
-
expectedEvidence: {
|
|
1741
|
-
duplicateLaneId: 'main',
|
|
1742
|
-
firstPath: '/lanes/0/id',
|
|
1743
|
-
duplicatePath: '/lanes/1/id',
|
|
1744
|
-
},
|
|
1745
|
-
mutate(document) {
|
|
1746
|
-
document.lanes.push({ id: 'main', label: 'Duplicate Main' });
|
|
1747
|
-
},
|
|
1748
|
-
},
|
|
1749
|
-
{
|
|
1750
|
-
name: 'node id',
|
|
1751
|
-
code: 'workflow/duplicate-node-id',
|
|
1752
|
-
expectedSubject: { node: 'a', path: '/nodes/2/id' },
|
|
1753
|
-
expectedEvidence: {
|
|
1754
|
-
duplicateNodeId: 'a',
|
|
1755
|
-
firstPath: '/nodes/0/id',
|
|
1756
|
-
duplicatePath: '/nodes/2/id',
|
|
1757
|
-
},
|
|
1758
|
-
mutate(document) {
|
|
1759
|
-
document.nodes.push({
|
|
1760
|
-
id: 'a', lane: 'main', col: 4, type: 'database', label: 'Duplicate A',
|
|
1761
|
-
});
|
|
1762
|
-
},
|
|
1763
|
-
},
|
|
1764
|
-
]) {
|
|
1765
|
-
test(`duplicate ${fixture.name} diagnostics name both authored source pointers`, () => {
|
|
1766
|
-
const document = oneLaneWorkflow([]);
|
|
1767
|
-
fixture.mutate(document);
|
|
1768
|
-
|
|
1769
|
-
const result = compileWorkflow({ workflow: document, qualityProfile: 'standard' });
|
|
1770
|
-
|
|
1771
|
-
assert.equal(result.ok, false);
|
|
1772
|
-
assert.equal(result.svg, undefined);
|
|
1773
|
-
assert.equal(result.diagnostics.length, 1);
|
|
1774
|
-
const [diagnostic] = result.diagnostics;
|
|
1775
|
-
assert.equal(diagnostic.code, fixture.code);
|
|
1776
|
-
assert.deepEqual(
|
|
1777
|
-
diagnostic.subject,
|
|
1778
|
-
{ diagramType: 'workflow', ...fixture.expectedSubject },
|
|
1779
|
-
);
|
|
1780
|
-
assert.deepEqual(diagnostic.evidence, fixture.expectedEvidence);
|
|
1781
|
-
assert.ok(diagnostic.supportedFixes.length > 0);
|
|
1782
|
-
});
|
|
1783
|
-
}
|
|
1784
|
-
|
|
1785
|
-
test('showcase rejects nested authored outside-right corridors while standard permits them', () => {
|
|
1786
|
-
const document = nestedOutsideRightCorridorWorkflow();
|
|
1787
|
-
|
|
1788
|
-
const standard = compileWorkflow({ workflow: clone(document), qualityProfile: 'standard' });
|
|
1789
|
-
assert.equal(standard.ok, true, JSON.stringify(standard.diagnostics, null, 2));
|
|
1790
|
-
|
|
1791
|
-
const showcase = compileWorkflow({ workflow: clone(document), qualityProfile: 'showcase' });
|
|
1792
|
-
assertExplicitPinConflict(showcase, 'nested authored outside-right corridors');
|
|
1793
|
-
const diagnostic = showcase.diagnostics.find(({ code }) => (
|
|
1794
|
-
code === 'workflow/explicit-pin-conflict'
|
|
1795
|
-
));
|
|
1796
|
-
assertSupportedFixesNameChangedEdge(diagnostic, ['inner', 'outer']);
|
|
1797
|
-
assert.deepEqual(
|
|
1798
|
-
diagnostic.evidence.conflictingPins.map(({ edge, field, value }) => ({ edge, field, value })),
|
|
1799
|
-
[{ edge: 'inner', field: 'channelX', value: 800 }],
|
|
1800
|
-
);
|
|
1801
|
-
assert.deepEqual(diagnostic.supportedFixes, [
|
|
1802
|
-
'remove channelX from edge "inner" so readable-v2 can replan the remaining authored route assertions',
|
|
1803
|
-
]);
|
|
1804
|
-
const repaired = clone(document);
|
|
1805
|
-
delete repaired.edges.find(({ id }) => id === 'inner').channelX;
|
|
1806
|
-
const verified = compileWorkflow({ workflow: repaired, qualityProfile: 'showcase' });
|
|
1807
|
-
assert.equal(verified.ok, true, JSON.stringify(verified.diagnostics, null, 2));
|
|
1808
|
-
});
|
|
1809
|
-
|
|
1810
|
-
test('an explicit standard profile overrides an ambient showcase profile', () => {
|
|
1811
|
-
const document = nestedOutsideRightCorridorWorkflow();
|
|
1812
|
-
document.meta.quality_profile = 'showcase';
|
|
1813
|
-
const previousProfile = process.env.ARCHIFY_QUALITY_PROFILE;
|
|
1814
|
-
|
|
1815
|
-
try {
|
|
1816
|
-
process.env.ARCHIFY_QUALITY_PROFILE = 'showcase';
|
|
1817
|
-
const result = compileWorkflow({ workflow: document, qualityProfile: 'standard' });
|
|
1818
|
-
assert.equal(
|
|
1819
|
-
result.ok,
|
|
1820
|
-
true,
|
|
1821
|
-
`the explicit standard profile must win:\n${JSON.stringify(result.diagnostics, null, 2)}`,
|
|
1822
|
-
);
|
|
1823
|
-
assert.match(result.svg, /data-quality-profile="standard"/);
|
|
1824
|
-
} finally {
|
|
1825
|
-
if (previousProfile === undefined) delete process.env.ARCHIFY_QUALITY_PROFILE;
|
|
1826
|
-
else process.env.ARCHIFY_QUALITY_PROFILE = previousProfile;
|
|
1827
|
-
}
|
|
1828
|
-
});
|
|
1829
|
-
|
|
1830
|
-
test('readable-v2 never advertises an unverified blocking-node repair', () => {
|
|
1831
|
-
const document = workflow({
|
|
1832
|
-
lanes: [{ id: 'main', label: 'Main' }],
|
|
1833
|
-
nodes: [{ id: 'a', lane: 'main', col: 0, type: 'backend', label: 'A' }],
|
|
1834
|
-
edges: [{ id: 'self', from: 'a', to: 'a' }],
|
|
1835
|
-
});
|
|
1836
|
-
|
|
1837
|
-
const result = compileWorkflow({ workflow: document, qualityProfile: 'standard' });
|
|
1838
|
-
assert.equal(result.ok, false);
|
|
1839
|
-
const diagnostic = result.diagnostics.find(({ code }) => code === 'workflow/solver-budget-exhausted');
|
|
1840
|
-
assert.ok(diagnostic, JSON.stringify(result.diagnostics, null, 2));
|
|
1841
|
-
assert.deepEqual(diagnostic.supportedFixes, []);
|
|
1842
|
-
});
|
|
1843
|
-
|
|
1844
|
-
for (const { name, makeVia } of [
|
|
1845
|
-
{
|
|
1846
|
-
name: 'a 4px endpoint stub',
|
|
1847
|
-
makeVia: ({ start, end }) => [
|
|
1848
|
-
[start[0] + 4, start[1]],
|
|
1849
|
-
[start[0] + 4, start[1] + 41],
|
|
1850
|
-
[end[0], start[1] + 41],
|
|
1851
|
-
],
|
|
1852
|
-
},
|
|
1853
|
-
{
|
|
1854
|
-
name: 'a 12px interior turn segment',
|
|
1855
|
-
makeVia: ({ start }) => [
|
|
1856
|
-
[start[0] + 20, start[1]],
|
|
1857
|
-
[start[0] + 20, start[1] + 31],
|
|
1858
|
-
[start[0] + 32, start[1] + 31],
|
|
1859
|
-
[start[0] + 32, start[1]],
|
|
1860
|
-
],
|
|
1861
|
-
},
|
|
1862
|
-
]) {
|
|
1863
|
-
test(`standard profile rejects ${name} as a hard route constraint`, () => {
|
|
1864
|
-
const via = makeVia(oneLaneAnchors());
|
|
1865
|
-
const result = compileWorkflow({
|
|
1866
|
-
workflow: oneLaneWorkflow([{ id: 'ab', from: 'a', to: 'b', via }]),
|
|
1867
|
-
qualityProfile: 'standard',
|
|
1868
|
-
});
|
|
1869
|
-
assert.equal(result.ok, false, `${name} must be invalid in standard as well as showcase`);
|
|
1870
|
-
assert.ok(Array.isArray(result.diagnostics) && result.diagnostics.length > 0);
|
|
1871
|
-
});
|
|
1872
|
-
}
|
|
1873
|
-
|
|
1874
|
-
test('readable-v2 reports collapsed channel pins without escaping the compiler boundary', () => {
|
|
1875
|
-
const { start } = oneLaneAnchors();
|
|
1876
|
-
for (const pin of [
|
|
1877
|
-
{ channelX: start[0] },
|
|
1878
|
-
{ channelY: start[1] },
|
|
1879
|
-
]) {
|
|
1880
|
-
let result;
|
|
1881
|
-
assert.doesNotThrow(() => {
|
|
1882
|
-
result = compileWorkflow({
|
|
1883
|
-
workflow: oneLaneWorkflow([{ id: 'ab', from: 'a', to: 'b', ...pin }]),
|
|
1884
|
-
qualityProfile: 'standard',
|
|
1885
|
-
});
|
|
1886
|
-
});
|
|
1887
|
-
assertExplicitPinConflict(result, JSON.stringify(pin));
|
|
1888
|
-
assert.ok(result.diagnostics.some(({ evidence }) => (
|
|
1889
|
-
evidence?.invariant === 'non-zero route segments'
|
|
1890
|
-
)));
|
|
1891
|
-
}
|
|
1892
|
-
});
|
|
1893
|
-
|
|
1894
|
-
test('parallel anonymous edges remain byte-deterministic when their input order changes', () => {
|
|
1895
|
-
const document = oneLaneWorkflow([
|
|
1896
|
-
{ from: 'a', to: 'b', variant: 'default', role: 'main' },
|
|
1897
|
-
{ from: 'a', to: 'b', variant: 'dashed', role: 'async' },
|
|
1898
|
-
]);
|
|
1899
|
-
const reordered = clone(document);
|
|
1900
|
-
reordered.edges.reverse();
|
|
1901
|
-
|
|
1902
|
-
const first = compileWorkflow({ workflow: document, qualityProfile: 'standard' });
|
|
1903
|
-
const second = compileWorkflow({ workflow: reordered, qualityProfile: 'standard' });
|
|
1904
|
-
assert.equal(first.ok, true, JSON.stringify(first.diagnostics, null, 2));
|
|
1905
|
-
assert.equal(second.ok, true, JSON.stringify(second.diagnostics, null, 2));
|
|
1906
|
-
assert.equal(second.svg, first.svg);
|
|
1907
|
-
assert.equal(JSON.stringify(second.receipt), JSON.stringify(first.receipt));
|
|
1908
|
-
});
|
|
1909
|
-
|
|
1910
|
-
test('compileWorkflow returns a diagnostic result instead of throwing when meta is absent', () => {
|
|
1911
|
-
const document = oneLaneWorkflow([]);
|
|
1912
|
-
delete document.meta;
|
|
1913
|
-
|
|
1914
|
-
const result = compileWorkflow({ workflow: document, qualityProfile: 'standard' });
|
|
1915
|
-
assert.equal(result.ok, false);
|
|
1916
|
-
assert.equal(result.svg, undefined);
|
|
1917
|
-
assert.ok(Array.isArray(result.diagnostics) && result.diagnostics.length > 0);
|
|
1918
|
-
});
|
|
1919
|
-
|
|
1920
|
-
test('compileWorkflow returns typed failures for non-document public inputs without throwing', () => {
|
|
1921
|
-
for (const input of [undefined, null, [], {}]) {
|
|
1922
|
-
const result = compileWorkflow({ workflow: input });
|
|
1923
|
-
assert.equal(result.ok, false);
|
|
1924
|
-
assert.equal(result.svg, undefined);
|
|
1925
|
-
assert.ok(Array.isArray(result.diagnostics) && result.diagnostics.length > 0);
|
|
1926
|
-
assert.ok(result.diagnostics.every(({ code }) => code !== 'internal/unclassified'));
|
|
1927
|
-
assert.ok(result.diagnostics.every(({ supportedFixes }) => (
|
|
1928
|
-
Array.isArray(supportedFixes) && supportedFixes.length === 0
|
|
1929
|
-
)));
|
|
1930
|
-
assert.deepEqual(result.receipt.diagnostics, result.diagnostics);
|
|
1931
|
-
}
|
|
1932
|
-
});
|
|
1933
|
-
|
|
1934
|
-
test('compileWorkflow enforces the canonical workflow schema at its public boundary', () => {
|
|
1935
|
-
for (const { expectedCode, mutate, qualityProfile } of [
|
|
1936
|
-
{ expectedCode: 'schema/additionalProperties', mutate: (document) => { document.unsupported = true; } },
|
|
1937
|
-
{ expectedCode: 'schema/enum', mutate: (document) => { document.nodes[0].type = 'bogus'; } },
|
|
1938
|
-
{ expectedCode: 'schema/minimum', mutate: (document) => { document.nodes[0].width = 31; } },
|
|
1939
|
-
{ expectedCode: 'schema/required', mutate: (document) => { delete document.nodes[0].label; } },
|
|
1940
|
-
{ expectedCode: 'schema/enum', mutate: () => {}, qualityProfile: 'impossible' },
|
|
1941
|
-
]) {
|
|
1942
|
-
const document = oneLaneWorkflow([]);
|
|
1943
|
-
mutate(document);
|
|
1944
|
-
const result = compileWorkflow({ workflow: document, qualityProfile });
|
|
1945
|
-
assert.equal(result.ok, false);
|
|
1946
|
-
assert.equal(result.svg, undefined);
|
|
1947
|
-
assert.ok(
|
|
1948
|
-
result.diagnostics.some(({ code }) => code === expectedCode),
|
|
1949
|
-
JSON.stringify(result.diagnostics, null, 2),
|
|
1950
|
-
);
|
|
1951
|
-
assert.ok(result.diagnostics.every(({ code }) => code !== 'internal/unclassified'));
|
|
1952
|
-
assert.ok(result.diagnostics.every(({ supportedFixes }) => (
|
|
1953
|
-
Array.isArray(supportedFixes) && supportedFixes.length === 0
|
|
1954
|
-
)));
|
|
1955
|
-
assert.deepEqual(result.receipt.diagnostics, result.diagnostics);
|
|
1956
|
-
}
|
|
1957
|
-
});
|
|
1958
|
-
|
|
1959
|
-
test('readable-v2 rejects a negative absolute label pin without an explicit viewBox', () => {
|
|
1960
|
-
const document = oneLaneWorkflow([{
|
|
1961
|
-
id: 'ab', from: 'a', to: 'b', label: 'pinned', labelAt: [-20, 80],
|
|
1962
|
-
}]);
|
|
1963
|
-
const result = compileWorkflow({ workflow: document, qualityProfile: 'standard' });
|
|
1964
|
-
assert.equal(result.ok, false);
|
|
1965
|
-
assert.equal(result.svg, undefined);
|
|
1966
|
-
assert.equal(result.diagnostics.length, 1, JSON.stringify(result.diagnostics, null, 2));
|
|
1967
|
-
const [diagnostic] = result.diagnostics;
|
|
1968
|
-
assert.equal(diagnostic.code, 'workflow/explicit-pin-conflict');
|
|
1969
|
-
assert.deepEqual(diagnostic.subject, {
|
|
1970
|
-
diagramType: 'workflow',
|
|
1971
|
-
edge: 'ab',
|
|
1972
|
-
from: 'a',
|
|
1973
|
-
to: 'b',
|
|
1974
|
-
path: '/edges/0/labelAt',
|
|
1975
|
-
});
|
|
1976
|
-
assert.equal(diagnostic.evidence.invariant, 'viewBox-origin containment');
|
|
1977
|
-
assert.deepEqual(diagnostic.evidence.conflictingPins, [{
|
|
1978
|
-
edge: 'ab',
|
|
1979
|
-
field: 'labelAt',
|
|
1980
|
-
path: '/edges/0/labelAt',
|
|
1981
|
-
value: [-20, 80],
|
|
1982
|
-
}]);
|
|
1983
|
-
assert.deepEqual(diagnostic.evidence.offendingRect, {
|
|
1984
|
-
x: -39.4,
|
|
1985
|
-
y: 70,
|
|
1986
|
-
width: 38.8,
|
|
1987
|
-
height: 14,
|
|
1988
|
-
});
|
|
1989
|
-
assert.deepEqual(result.receipt.diagnostics, result.diagnostics);
|
|
1990
|
-
|
|
1991
|
-
assert.ok(diagnostic.supportedFixes.length > 0);
|
|
1992
|
-
for (const fix of diagnostic.supportedFixes) {
|
|
1993
|
-
const repaired = clone(document);
|
|
1994
|
-
const target = repaired.edges.find(({ id }) => fix.includes(`edge "${id}"`));
|
|
1995
|
-
assert.ok(target, `supported fix must name an existing edge: ${fix}`);
|
|
1996
|
-
const replacement = fix.match(/^set labelAt on edge "[^"]+" to \[(-?\d+(?:\.\d+)?), (-?\d+(?:\.\d+)?)\]$/);
|
|
1997
|
-
if (replacement) {
|
|
1998
|
-
target.labelAt = replacement.slice(1).map(Number);
|
|
1999
|
-
} else {
|
|
2000
|
-
assert.match(fix, /^remove labelAt from edge "[^"]+" /);
|
|
2001
|
-
delete target.labelAt;
|
|
2002
|
-
}
|
|
2003
|
-
const verified = compileWorkflow({ workflow: repaired, qualityProfile: 'standard' });
|
|
2004
|
-
assert.equal(verified.ok, true, `advertised fix must recompile: ${fix}\n${JSON.stringify(verified.diagnostics, null, 2)}`);
|
|
2005
|
-
}
|
|
2006
|
-
});
|
|
2007
|
-
|
|
2008
|
-
test('readable-v2 rejects an explicit channel that crosses the measured legend', () => {
|
|
2009
|
-
const document = oneLaneWorkflow([{
|
|
2010
|
-
id: 'ab',
|
|
2011
|
-
from: 'a',
|
|
2012
|
-
to: 'b',
|
|
2013
|
-
route: 'bottom-channel',
|
|
2014
|
-
channelY: 200,
|
|
2015
|
-
fromSide: 'bottom',
|
|
2016
|
-
toSide: 'bottom',
|
|
2017
|
-
}]);
|
|
2018
|
-
document.meta.legend = { mode: 'all' };
|
|
2019
|
-
const result = compileWorkflow({ workflow: document, qualityProfile: 'standard' });
|
|
2020
|
-
assertExplicitPinConflict(result, 'legend-crossing channelY');
|
|
2021
|
-
assert.ok(result.diagnostics.some(({ evidence }) => evidence?.invariant === 'legend clearance'));
|
|
2022
|
-
});
|
|
2023
|
-
|
|
2024
|
-
test('readable-v2 explicit-pin diagnostics name the first intersected node and segment', () => {
|
|
2025
|
-
const document = workflow({
|
|
2026
|
-
lanes: [{ id: 'main', label: 'Main' }],
|
|
2027
|
-
nodes: [
|
|
2028
|
-
{ id: 'a', lane: 'main', col: 0, type: 'backend', label: 'A' },
|
|
2029
|
-
{ id: 'obstacle', lane: 'main', col: 1, type: 'database', label: 'Obstacle' },
|
|
2030
|
-
{ id: 'b', lane: 'main', col: 2, type: 'backend', label: 'B' },
|
|
2031
|
-
],
|
|
2032
|
-
edges: [{
|
|
2033
|
-
id: 'ab',
|
|
2034
|
-
from: 'a',
|
|
2035
|
-
to: 'b',
|
|
2036
|
-
fromSide: 'right',
|
|
2037
|
-
toSide: 'left',
|
|
2038
|
-
via: [[200, 119], [260, 119]],
|
|
2039
|
-
}],
|
|
2040
|
-
});
|
|
2041
|
-
|
|
2042
|
-
const result = compileWorkflow({ workflow: document, qualityProfile: 'standard' });
|
|
2043
|
-
assertExplicitPinConflict(result, 'unrelated node collision');
|
|
2044
|
-
const diagnostic = result.diagnostics.find(({ code }) => code === 'workflow/explicit-pin-conflict');
|
|
2045
|
-
assert.equal(diagnostic.evidence.invariant, 'node clearance');
|
|
2046
|
-
assert.deepEqual({
|
|
2047
|
-
obstacleNode: diagnostic.evidence.obstacleNode,
|
|
2048
|
-
obstacleRole: diagnostic.evidence.obstacleRole,
|
|
2049
|
-
segmentIndex: diagnostic.evidence.segmentIndex,
|
|
2050
|
-
from: diagnostic.evidence.from,
|
|
2051
|
-
to: diagnostic.evidence.to,
|
|
2052
|
-
clearancePx: diagnostic.evidence.clearancePx,
|
|
2053
|
-
}, {
|
|
2054
|
-
obstacleNode: 'obstacle',
|
|
2055
|
-
obstacleRole: 'unrelated',
|
|
2056
|
-
segmentIndex: 0,
|
|
2057
|
-
from: [140, 119],
|
|
2058
|
-
to: [200, 119],
|
|
2059
|
-
clearancePx: 2,
|
|
2060
|
-
});
|
|
2061
|
-
});
|
|
2062
|
-
|
|
2063
|
-
test('fixed-v1 publishes only repairs that survive complete replanning', () => {
|
|
2064
|
-
const document = {
|
|
2065
|
-
schema_version: 1,
|
|
2066
|
-
diagram_type: 'workflow',
|
|
2067
|
-
meta: { title: 'Verified fixes', legend: { mode: 'hidden' } },
|
|
2068
|
-
lanes: [{ id: 'main', label: 'Main' }],
|
|
2069
|
-
groups: [{ id: 'target-only', label: 'Target', lane: 'main', fromCol: 2, toCol: 2 }],
|
|
2070
|
-
nodes: [
|
|
2071
|
-
{ id: 'a', lane: 'main', col: 1, type: 'backend', label: 'A' },
|
|
2072
|
-
{ id: 'b', lane: 'main', col: 2, type: 'backend', label: 'B' },
|
|
2073
|
-
],
|
|
2074
|
-
edges: [{ id: 'ab', from: 'a', to: 'b' }],
|
|
2075
|
-
};
|
|
2076
|
-
|
|
2077
|
-
const result = compileWorkflow({ workflow: document, qualityProfile: 'standard' });
|
|
2078
|
-
assert.equal(result.ok, false);
|
|
2079
|
-
const diagnostic = result.diagnostics.find(({ code }) => code === 'workflow/column-capacity');
|
|
2080
|
-
assert.ok(diagnostic);
|
|
2081
|
-
assert.ok(
|
|
2082
|
-
diagnostic.supportedFixes.every((fix) => !/^move node /.test(fix)),
|
|
2083
|
-
`moving the group's only node must not be advertised as verified: ${diagnostic.supportedFixes}`,
|
|
2084
|
-
);
|
|
2085
|
-
});
|
|
2086
|
-
|
|
2087
|
-
test('fixed-v1 verifies the exact serialized values in every rounded-width repair', () => {
|
|
2088
|
-
const document = {
|
|
2089
|
-
schema_version: 1,
|
|
2090
|
-
diagram_type: 'workflow',
|
|
2091
|
-
meta: { title: 'Rounded verified widths', legend: { mode: 'hidden' } },
|
|
2092
|
-
lanes: [{ id: 'main', label: 'M' }],
|
|
2093
|
-
nodes: [
|
|
2094
|
-
{ id: 'a', lane: 'main', col: 1, type: 'backend', label: 'A', width: 52.006 },
|
|
2095
|
-
{ id: 'b', lane: 'main', col: 2, type: 'backend', label: 'B', width: 51.995 },
|
|
2096
|
-
],
|
|
2097
|
-
edges: [{ id: 'ab', from: 'a', to: 'b' }],
|
|
2098
|
-
};
|
|
2099
|
-
|
|
2100
|
-
const result = compileWorkflow({ workflow: document, qualityProfile: 'standard' });
|
|
2101
|
-
|
|
2102
|
-
assert.equal(result.ok, false);
|
|
2103
|
-
assert.equal(result.diagnostics.length, 1, JSON.stringify(result.diagnostics, null, 2));
|
|
2104
|
-
const [diagnostic] = result.diagnostics;
|
|
2105
|
-
assert.equal(diagnostic.code, 'workflow/column-capacity');
|
|
2106
|
-
assert.deepEqual(diagnostic.evidence.nodeWidthsPx, [52.006, 51.995]);
|
|
2107
|
-
assert.ok(diagnostic.supportedFixes.length > 0);
|
|
2108
|
-
assert.ok(
|
|
2109
|
-
diagnostic.supportedFixes.includes('set node widths "a"=52px and "b"=51.99px'),
|
|
2110
|
-
JSON.stringify(diagnostic.supportedFixes, null, 2),
|
|
2111
|
-
);
|
|
2112
|
-
|
|
2113
|
-
for (const fix of diagnostic.supportedFixes) {
|
|
2114
|
-
const repaired = clone(document);
|
|
2115
|
-
if (fix === 'migrate this workflow to schema_version 2') {
|
|
2116
|
-
repaired.schema_version = 2;
|
|
2117
|
-
} else {
|
|
2118
|
-
const move = fix.match(/^move node "([^"]+)" to verified free column (\d+)$/);
|
|
2119
|
-
const widths = [...fix.matchAll(/"([^"]+)"=([\d.]+)px/g)];
|
|
2120
|
-
if (move) {
|
|
2121
|
-
repaired.nodes.find(({ id }) => id === move[1]).col = Number(move[2]);
|
|
2122
|
-
} else {
|
|
2123
|
-
assert.ok(widths.length > 0, `unsupported advertised repair: ${fix}`);
|
|
2124
|
-
for (const [, nodeId, width] of widths) {
|
|
2125
|
-
repaired.nodes.find(({ id }) => id === nodeId).width = Number(width);
|
|
2126
|
-
}
|
|
2127
|
-
}
|
|
2128
|
-
}
|
|
2129
|
-
const verified = compileWorkflow({ workflow: repaired, qualityProfile: 'standard' });
|
|
2130
|
-
assert.equal(
|
|
2131
|
-
verified.ok,
|
|
2132
|
-
true,
|
|
2133
|
-
`advertised fix must recompile: ${fix}\n${JSON.stringify(verified.diagnostics, null, 2)}`,
|
|
2134
|
-
);
|
|
2135
|
-
}
|
|
2136
|
-
});
|