Sync VCC Plus 3.7.1 build 67 source
Refresh reviewed MCP output export, four-drive owned playtests, bounded BASIC readiness, and pinned CMOC 0.1.101 source/patches. Preserve independent source-edition identity, empty libraries, notices and privacy boundaries. Validated 74 export/privacy checks, pinned dependency sources, and an independent unsigned universal Release build. A subsequent documentation-only correction removes an excluded qualification link; all build inputs remain identical.
This commit is contained in:
1 parent
4abc194001
commit
5534005799
54 files changed
+2930
-415
No files matched your search
+122
-97
@@ -22,9 +22,9 @@
|
||||
"sha256": "7c7f385dd5c84d440b6134a7c850024bb72b84742f83725abbdcb1b7d59d4935"
|
||||
},
|
||||
"RELEASES.md": {
|
||||
"bytes": 15659,
|
||||
"bytes": 16920,
|
||||
"mode": "0644",
|
||||
"sha256": "42a0479de6257f8bc4c728792e7700cb655516f98190d04d5b92a7d344b05dd2"
|
||||
"sha256": "7105c6e01c8f2f69fbf04dc02b15af37d69ec344682c1fc947cce41379c26d86"
|
||||
},
|
||||
"docs/WHITE_PAPER_EVIDENCE.md": {
|
||||
"bytes": 2442,
|
||||
@@ -57,9 +57,9 @@
|
||||
"sha256": "80a4c553da8ff3eb4df7464ca0663c221b39604345c2c5f3ba3e0f06e8bd9aab"
|
||||
},
|
||||
"docs/development/CMOC_RUNTIME.md": {
|
||||
"bytes": 8749,
|
||||
"bytes": 9247,
|
||||
"mode": "0644",
|
||||
"sha256": "c76871a76088b08e8c47110f596631f0cc426a73adb75f956c0abe508a6de9f7"
|
||||
"sha256": "2f253b1f8ece8da50d23899f51b23d8877a371dd4a82d84c54027a5d1012017a"
|
||||
},
|
||||
"docs/development/CMOC_SOURCE_DEBUGGING.md": {
|
||||
"bytes": 17907,
|
||||
@@ -72,9 +72,9 @@
|
||||
"sha256": "5b4746bc68ea2e93c5bb1f5d54aa063fb409557b6ba2b085118225a304ed841b"
|
||||
},
|
||||
"docs/development/MCP_BANKED_PLAYTEST.md": {
|
||||
"bytes": 24663,
|
||||
"bytes": 24945,
|
||||
"mode": "0644",
|
||||
"sha256": "75f1b3c0977ffc536a0cb47f46f554c10c06a34d5b7a2a58458d997c1493c480"
|
||||
"sha256": "2e45126b15ecdd309993c96fbeac28401d5462e83b7bf05b6d02a21fd1bfcede"
|
||||
},
|
||||
"docs/development/MCP_BUILD45_VALIDATION.md": {
|
||||
"bytes": 1836,
|
||||
@@ -92,9 +92,9 @@
|
||||
"sha256": "ddb8e4979b5573cff809a6fda8c9b961fcbd3dfc0fd7f8bce4dcd1814782e2f4"
|
||||
},
|
||||
"docs/development/MCP_PLAYTEST_MEDIA.md": {
|
||||
"bytes": 9578,
|
||||
"bytes": 12624,
|
||||
"mode": "0644",
|
||||
"sha256": "cffb200d9efc5ff9e85720e66aeb1693f1cfc88f99d5a675b1afb7ee7e3af09c"
|
||||
"sha256": "cc1c3902f7aaa8696345173daf5b5be1546e05a071a2b11d8c60402ab47f46ee"
|
||||
},
|
||||
"docs/development/MCP_PLAYTEST_PROCESSORS.md": {
|
||||
"bytes": 3943,
|
||||
@@ -429,7 +429,7 @@
|
||||
"docs/white-paper-evidence.json": {
|
||||
"bytes": 18421,
|
||||
"mode": "0644",
|
||||
"sha256": "8ab1249e778db9435e9d270ecb5deb1320fc62c86e37670efbba48c621952f7e"
|
||||
"sha256": "6e8400aeb103bd320a791e8330a6c0cf2fd5d3a363091f1428665299d1b28bbe"
|
||||
},
|
||||
"examples/assembly/Dispatch/layout.link": {
|
||||
"bytes": 35,
|
||||
@@ -992,9 +992,9 @@
|
||||
"sha256": "bb231c70175bcc3acb0b1efe55f84c8b0daadf5bae51d9f423c6725688bdb34c"
|
||||
},
|
||||
"platforms/macos/App/BASICDevelopmentModel.swift": {
|
||||
"bytes": 31524,
|
||||
"bytes": 31615,
|
||||
"mode": "0644",
|
||||
"sha256": "37303762a3737fb65f19da732068640e67023cac587be6b3b4569b60f8aed3d3"
|
||||
"sha256": "1b634aeeffeccfc2eee6e7f0130e46c9be8bdf7db25c9569947085f9335e7915"
|
||||
},
|
||||
"platforms/macos/App/BASICDevelopmentView.swift": {
|
||||
"bytes": 51022,
|
||||
@@ -1042,9 +1042,9 @@
|
||||
"sha256": "1cff64a2401713b838a02bcf759951a8875f44572c915f8d7775349c89476d16"
|
||||
},
|
||||
"platforms/macos/App/CMOCBuildService.swift": {
|
||||
"bytes": 124358,
|
||||
"bytes": 127754,
|
||||
"mode": "0644",
|
||||
"sha256": "1cf1d98b9023481a73ff1ffbdde991f6811029a9c01374307383634845130898"
|
||||
"sha256": "a3beba72660bd5c226f4c67a5fe66b0616463f0c07d3e5807ce84e63169444d4"
|
||||
},
|
||||
"platforms/macos/App/CMOCCallStack.swift": {
|
||||
"bytes": 7305,
|
||||
@@ -1092,9 +1092,9 @@
|
||||
"sha256": "00bae07672616be9df02c2612727aab60cb386e3985780bab8c3b3240fe1699b"
|
||||
},
|
||||
"platforms/macos/App/CMOCProjectInputs.swift": {
|
||||
"bytes": 16205,
|
||||
"bytes": 16240,
|
||||
"mode": "0644",
|
||||
"sha256": "8c38bb3feb3fd227dfee8333a86784881ad0fe88c5dbb5ff7abb9cc15250291d"
|
||||
"sha256": "650b3833ea4d777b38cb32c2d75eb0c49c537845a9e46a46233a42834068ac42"
|
||||
},
|
||||
"platforms/macos/App/CMOCSourceMap.swift": {
|
||||
"bytes": 70070,
|
||||
@@ -1311,10 +1311,15 @@
|
||||
"mode": "0644",
|
||||
"sha256": "b0379b3be3b2794bdbde5b33e70b33e422868e02b370925447b0b0976d95f154"
|
||||
},
|
||||
"platforms/macos/App/MCPCMOC.swift": {
|
||||
"bytes": 143524,
|
||||
"platforms/macos/App/MCPBuildExport.swift": {
|
||||
"bytes": 15780,
|
||||
"mode": "0644",
|
||||
"sha256": "1078432a8cf8e0696c4c660f6d2b3cff11ff38eee36688f781aa8e652d3915c2"
|
||||
"sha256": "34d3036daba52dd36a47a39a0deeb6d57bb497e6db0c0573418f2e97ed7b2476"
|
||||
},
|
||||
"platforms/macos/App/MCPCMOC.swift": {
|
||||
"bytes": 155769,
|
||||
"mode": "0644",
|
||||
"sha256": "2da087293fce37f97104c5ce69c88669c367cfbc6a94b40e5b9eabdcdd521021"
|
||||
},
|
||||
"platforms/macos/App/MCPCMOCGuest.swift": {
|
||||
"bytes": 11824,
|
||||
@@ -1352,9 +1357,9 @@
|
||||
"sha256": "5af349cb795b7a852d3cea3ca6a251d21408d2c452f8b243f9ce83b5f77b1e82"
|
||||
},
|
||||
"platforms/macos/App/MCPPlaytest.swift": {
|
||||
"bytes": 73624,
|
||||
"bytes": 94063,
|
||||
"mode": "0644",
|
||||
"sha256": "7fdd7c5a17538961e70a0f4b5abdf1fd84a3c91a1e9775aeef2e5a22d3cadf2b"
|
||||
"sha256": "b8a18e09e673305e5731784dfda76d368b677bcfa285670c2e48f5253490aa8d"
|
||||
},
|
||||
"platforms/macos/App/MCPTransport.swift": {
|
||||
"bytes": 6503,
|
||||
@@ -1372,9 +1377,9 @@
|
||||
"sha256": "8ea7ca3fa1ba23a23cac4f35636f184263af0031a87352ca9cd398987a657ca2"
|
||||
},
|
||||
"platforms/macos/App/MachineModel.swift": {
|
||||
"bytes": 179328,
|
||||
"bytes": 180774,
|
||||
"mode": "0644",
|
||||
"sha256": "ea316035ffba5a4c6efebc982ded86ff90232af7f42668bb836af7ff3108fa75"
|
||||
"sha256": "147e04094c7e2932683ecb0e1ddac8dc38aadcd35a5f4da3234b7075aa2f3302"
|
||||
},
|
||||
"platforms/macos/App/MachineSettings.swift": {
|
||||
"bytes": 1020,
|
||||
@@ -2582,9 +2587,9 @@
|
||||
"sha256": "67e42ce73be848711b4325e9c33349a4ae91e5d4e284ffd60ba8fa93465d4be6"
|
||||
},
|
||||
"platforms/macos/Tests/AssemblyBuildServiceTests.swift": {
|
||||
"bytes": 13007,
|
||||
"bytes": 13034,
|
||||
"mode": "0644",
|
||||
"sha256": "833f65745905b08e5f8176380ebb85ee8e8437c8071484c90cccdc5513d21ecd"
|
||||
"sha256": "814cde680f99fe157893f7b2b6c8badf3e123a9bb11b527f1cad1b1c29415868"
|
||||
},
|
||||
"platforms/macos/Tests/AssemblyDevelopmentTests.swift": {
|
||||
"bytes": 20449,
|
||||
@@ -2597,9 +2602,9 @@
|
||||
"sha256": "5c3a5b7c246d8f3f7b4586988e1a546bde5ebd4d2346f559afca700b90f0017d"
|
||||
},
|
||||
"platforms/macos/Tests/BASICBridgeTests.swift": {
|
||||
"bytes": 95121,
|
||||
"bytes": 102953,
|
||||
"mode": "0644",
|
||||
"sha256": "f7a99fccdf28e89f9eb1fa23dc5625f2f2852bcc75ab5563f7c75ddccf001a45"
|
||||
"sha256": "0ede59bca98669654f31dddf1ab86270f102402b48be1f1ad3578d8d745b2a42"
|
||||
},
|
||||
"platforms/macos/Tests/BASICReferenceTests.swift": {
|
||||
"bytes": 36086,
|
||||
@@ -2622,14 +2627,14 @@
|
||||
"sha256": "97973847ad1145732fc35b7026e65b943e59810be28a2c3001acf6d5f362880e"
|
||||
},
|
||||
"platforms/macos/Tests/CMOCBuildServiceTests.swift": {
|
||||
"bytes": 149570,
|
||||
"bytes": 150430,
|
||||
"mode": "0644",
|
||||
"sha256": "e0fe976afa12b0b97f4eef8f4116e41f50e9e0114b186932190df2add02afff4"
|
||||
"sha256": "1abf934ab68e7eba0ee11f776dc204a460ab65fa40776a718cbe73c841d32539"
|
||||
},
|
||||
"platforms/macos/Tests/CMOCCallStackIntegrationTests.swift": {
|
||||
"bytes": 12319,
|
||||
"bytes": 12346,
|
||||
"mode": "0644",
|
||||
"sha256": "38594e9441d16d1ea63f1f5f43e1f4444ccdf8121e579b8b038103075472b864"
|
||||
"sha256": "fdedcbac19e71268c71b53dadff0fcb46cc3381e936aff5a7316071dad650eec"
|
||||
},
|
||||
"platforms/macos/Tests/CMOCCallStackTests.swift": {
|
||||
"bytes": 9964,
|
||||
@@ -2647,9 +2652,9 @@
|
||||
"sha256": "a1656f6158d41493b493fd3824a635a4cf6d490fa843c7dd9347d3119f584fc5"
|
||||
},
|
||||
"platforms/macos/Tests/CMOCDevelopmentTests.swift": {
|
||||
"bytes": 51528,
|
||||
"bytes": 51717,
|
||||
"mode": "0644",
|
||||
"sha256": "c85c2f2fe3d0a87a818aaa6fdd75df87ec3c2114cc57ac96dbb6f43578119b11"
|
||||
"sha256": "2a0ac67e8fad394186a7fe209b3612ccbe137ae49cbde36820cd5510dae29edd"
|
||||
},
|
||||
"platforms/macos/Tests/CMOCEditingTests.swift": {
|
||||
"bytes": 5773,
|
||||
@@ -2657,9 +2662,9 @@
|
||||
"sha256": "540a91eac826b221474dd5f5399399912a1b34bef2c53796ff6dcc566d5edaa1"
|
||||
},
|
||||
"platforms/macos/Tests/CMOCFloatingPointIntegrationTests.swift": {
|
||||
"bytes": 10878,
|
||||
"bytes": 10905,
|
||||
"mode": "0644",
|
||||
"sha256": "f76cc0654177efb69e3f45de6b4346eaf2411b2caf1f90dfecf8a2902b10fe15"
|
||||
"sha256": "95a0a8cd1111847a259e7933c0397873f0b3cccf6f918d3f5ac0bedefc389f9a"
|
||||
},
|
||||
"platforms/macos/Tests/CMOCFloatingPointTests.swift": {
|
||||
"bytes": 5908,
|
||||
@@ -2672,9 +2677,9 @@
|
||||
"sha256": "5ba6d00f3e2270a0a75b0a0dc7d0a3f1f7e458c8bbd1452a7fbccdef4822c197"
|
||||
},
|
||||
"platforms/macos/Tests/CMOCNavigationTests.swift": {
|
||||
"bytes": 22825,
|
||||
"bytes": 22852,
|
||||
"mode": "0644",
|
||||
"sha256": "049b38ed90d114e7383f8a00d8fae0f79d9821c2989f839b84147a9067ced453"
|
||||
"sha256": "2ebff44a6e1e31796b7ece43dc136aa9275687c209dbf8c4b5cfabe256f5ea38"
|
||||
},
|
||||
"platforms/macos/Tests/CMOCOwnedCallContextTests.swift": {
|
||||
"bytes": 15332,
|
||||
@@ -2692,24 +2697,24 @@
|
||||
"sha256": "552c2f3f15bcacd9dc8c784a7b6de179629e16a68368d1f1cd78b6240d5ecaa7"
|
||||
},
|
||||
"platforms/macos/Tests/CMOCSourceDebugTests.swift": {
|
||||
"bytes": 19851,
|
||||
"bytes": 19878,
|
||||
"mode": "0644",
|
||||
"sha256": "5ad14f4c620211c331c984fcd9e3a6eb4d34c01c348cef73a58cbe6e702af24e"
|
||||
"sha256": "a9036e1dbc6d6170dc6bd981059fda6122ef299394e1db502ddd7197bc7e63f0"
|
||||
},
|
||||
"platforms/macos/Tests/CMOCSourceMapTests.swift": {
|
||||
"bytes": 99755,
|
||||
"bytes": 99836,
|
||||
"mode": "0644",
|
||||
"sha256": "5ec68e186f49e6e1f000317fbf142898ee4a410f71da7d238d7ee50cb7ec4df7"
|
||||
"sha256": "6ee8a14e0dc1412b7f0fb6084557643fd90bed320085f9fd38089999cced11a5"
|
||||
},
|
||||
"platforms/macos/Tests/CMOCVariableDebugTests.swift": {
|
||||
"bytes": 41433,
|
||||
"bytes": 41514,
|
||||
"mode": "0644",
|
||||
"sha256": "953e7da020ee55676a5afc666f1b10042ccff56cbd3a6f89771db4b04a8b3a7c"
|
||||
"sha256": "2c30fbbab9c2c0c67302ee949548ae7ef5c86ea45e6a82fcacf4750b34d1a6bd"
|
||||
},
|
||||
"platforms/macos/Tests/CMOCVariableTreeIntegrationTests.swift": {
|
||||
"bytes": 12880,
|
||||
"bytes": 12907,
|
||||
"mode": "0644",
|
||||
"sha256": "a7d3256e81b08619a8b99a0fae8c49d68d8a5e4868ea1c13aee5c3e6e3312583"
|
||||
"sha256": "d4b0484ed5506e236920e49501780e5e9272c018c65c8b48b4886a9cbc20d1cf"
|
||||
},
|
||||
"platforms/macos/Tests/CMOCVariableTreeTests.swift": {
|
||||
"bytes": 10128,
|
||||
@@ -2717,9 +2722,9 @@
|
||||
"sha256": "2990e60392219dabb9c45957f5db2732f343351c31d7829cb9093fb7b3758af7"
|
||||
},
|
||||
"platforms/macos/Tests/CMOCWorkflowHardeningTests.swift": {
|
||||
"bytes": 13530,
|
||||
"bytes": 13584,
|
||||
"mode": "0644",
|
||||
"sha256": "a92932f0f937b3af6811fce44b2441cb4904210527ccf03650fb098657706b7b"
|
||||
"sha256": "22e2fa2504063838da16c23014f547b9ec6626b3819c0c3f62342254191da860"
|
||||
},
|
||||
"platforms/macos/Tests/CMOCWorkspaceRecoveryTests.swift": {
|
||||
"bytes": 15617,
|
||||
@@ -2996,20 +3001,25 @@
|
||||
"mode": "0644",
|
||||
"sha256": "eb0bc1ed6da4e567afc3418ea292ed3f2e879528d4a46a8dfdd62ca99f78d8de"
|
||||
},
|
||||
"platforms/macos/Tests/MCPCallContextAccessTests.swift": {
|
||||
"bytes": 41657,
|
||||
"platforms/macos/Tests/MCPBuildExportTests.swift": {
|
||||
"bytes": 23488,
|
||||
"mode": "0644",
|
||||
"sha256": "59d08f1a994cf7c876685b3b0a2b85222e1b0980aa5d7a06a598d203f4649b57"
|
||||
"sha256": "d1835721a872f01965788bb2241472d198b7661cad0753ba3d790f61f7a8ec46"
|
||||
},
|
||||
"platforms/macos/Tests/MCPCallContextAccessTests.swift": {
|
||||
"bytes": 42133,
|
||||
"mode": "0644",
|
||||
"sha256": "85b0f386f555c5c6499400973d974b6294c41e7d604b0a5ed25e9c22a9330b0b"
|
||||
},
|
||||
"platforms/macos/Tests/MCPDebuggerInspectionTests.swift": {
|
||||
"bytes": 14065,
|
||||
"bytes": 14119,
|
||||
"mode": "0644",
|
||||
"sha256": "c378b4b3b605781e3e02903b3bf1ebda174bb8976488be471fde0b77ebb2716a"
|
||||
"sha256": "f598debfbe4817fe389700a214021c7e3fd51846b9754edacce1a011610c6e04"
|
||||
},
|
||||
"platforms/macos/Tests/MCPPlaytestTests.swift": {
|
||||
"bytes": 167266,
|
||||
"bytes": 203838,
|
||||
"mode": "0644",
|
||||
"sha256": "59adea534014540eaf59eef98871179cd14f2c6049d5c619170f57837033cbeb"
|
||||
"sha256": "30cd4fbd481a547f74bfb7b2e4de978c0647b5f88b9ea6a814826dac9bc181b1"
|
||||
},
|
||||
"platforms/macos/Tests/MCPProjectRefreshTests.swift": {
|
||||
"bytes": 17605,
|
||||
@@ -3072,9 +3082,9 @@
|
||||
"sha256": "9f0752e2cc416b7979f87e5444ebc9f01e7a670b3ed154bc0598d472ebba897f"
|
||||
},
|
||||
"platforms/macos/Tests/SoftwareLibraryCuratedLaunchTests.swift": {
|
||||
"bytes": 17902,
|
||||
"bytes": 17929,
|
||||
"mode": "0644",
|
||||
"sha256": "1bd5ec49b060961817af7cc44b66ad5c1dbb94c9f23e0765eec3fcaa4cb8cd8d"
|
||||
"sha256": "c8c8a379cc9cb3aad2625d362bb2fa3185ba85c058968f681afcf2d02dd66a40"
|
||||
},
|
||||
"platforms/macos/Tests/SoftwareLibraryInstallerTests.swift": {
|
||||
"bytes": 13321,
|
||||
@@ -3102,9 +3112,9 @@
|
||||
"sha256": "467aecf71bf7bbcccc274093730a087f3b9e96ac4a27562749612007f2988af0"
|
||||
},
|
||||
"platforms/macos/Tests/SoftwareLibraryPublishedGameTests.swift": {
|
||||
"bytes": 29275,
|
||||
"bytes": 53367,
|
||||
"mode": "0644",
|
||||
"sha256": "5516783ed1333b1350d6618d35ba81b58caaa3e602bb5c90249ee8ccc2831a12"
|
||||
"sha256": "977f5a8babe101d65151243f39f4e81892e64f4460f35a85595a28ac6bc02b42"
|
||||
},
|
||||
"platforms/macos/Tests/SoftwareLibrarySourceImporterTests.swift": {
|
||||
"bytes": 14990,
|
||||
@@ -3132,14 +3142,14 @@
|
||||
"sha256": "85c13429e98581b679c8410b03724860fedf00de962de63bea3b19e165ec6a3c"
|
||||
},
|
||||
"platforms/macos/Tools/MCP/MCPProjectTools.h": {
|
||||
"bytes": 26711,
|
||||
"bytes": 30269,
|
||||
"mode": "0644",
|
||||
"sha256": "c4a2a9effa9bd84bff23024ed7d52d7a133d9064599de6691408b9a715eaddfe"
|
||||
"sha256": "e8ba4fbe410d33cee36bb69c77821fe00cd6181465606c6bbe52d3dc4b0116a3"
|
||||
},
|
||||
"platforms/macos/Tools/MCP/main.mm": {
|
||||
"bytes": 37128,
|
||||
"bytes": 37648,
|
||||
"mode": "0644",
|
||||
"sha256": "9df3bf0ba49604f2000fb7a04d7b40c9c054947ae6130c164c3d8b0c16e698e7"
|
||||
"sha256": "a6d6f92da5720c11eee485d8fa50de6ad80aeae85560ee73352e1ba9cc72e571"
|
||||
},
|
||||
"platforms/macos/Tools/MCP/test-helper.py": {
|
||||
"bytes": 75034,
|
||||
@@ -3152,9 +3162,9 @@
|
||||
"sha256": "e834117bfbd780f71c9447e7007a33725449320ee380d3b8c26ed3d7d4523c03"
|
||||
},
|
||||
"platforms/macos/Tools/Playtest/main.mm": {
|
||||
"bytes": 52461,
|
||||
"bytes": 56632,
|
||||
"mode": "0644",
|
||||
"sha256": "9b2ee92ed622d98bd189099c1cfe17046362f5d72f5b278a28460f1b946c58da"
|
||||
"sha256": "4fa04d6a14f5da9c7d47314769e2d5cb1861e3b816e270cd3413ca72df2a5e58"
|
||||
},
|
||||
"platforms/macos/Tools/bundle-manual-library.py": {
|
||||
"bytes": 4772,
|
||||
@@ -3202,9 +3212,9 @@
|
||||
"sha256": "e89c62748e14b121426cb98204d7b4fef9ee2ba6189e10b905b3f7e355720f64"
|
||||
},
|
||||
"platforms/macos/Tools/prepare-toolchain.py": {
|
||||
"bytes": 6804,
|
||||
"bytes": 6901,
|
||||
"mode": "0644",
|
||||
"sha256": "b19428b17e91214ba5b36c9d6a1bce8143828e699d56f405b3df00c2568279f6"
|
||||
"sha256": "f710dc2c12747033ee2eec24d94d97d591ed20c66646de4883e0fb9d9c5c83bc"
|
||||
},
|
||||
"platforms/macos/Tools/test_development_templates.py": {
|
||||
"bytes": 3217,
|
||||
@@ -3217,14 +3227,14 @@
|
||||
"sha256": "2c86f35bc0d0d0f898583a4bc8f1dc5004ac065b2f55df41976cd50e90533c97"
|
||||
},
|
||||
"platforms/macos/UITests/InteractionTests.swift": {
|
||||
"bytes": 335595,
|
||||
"bytes": 343145,
|
||||
"mode": "0644",
|
||||
"sha256": "2a17d4b2fcee5845bbabe4b35ea732d2dfc9c54906666c1268b0e2e0710353ff"
|
||||
"sha256": "a13d27c457a00aa19ab09674c6fc94500eefcc5def596f7d6bad7f084c7fc17c"
|
||||
},
|
||||
"platforms/macos/VCC.xcodeproj/project.pbxproj": {
|
||||
"bytes": 180154,
|
||||
"bytes": 180891,
|
||||
"mode": "0644",
|
||||
"sha256": "52979940cd638a315f56377eebede21f83141cff125bb2e29f4d88ade19bc5ba"
|
||||
"sha256": "9c4e059b2737798507bb99dc5dfd58c996b383c34f1e54dfbd5bc85400666031"
|
||||
},
|
||||
"platforms/macos/VCC.xcodeproj/xcshareddata/xcschemes/VCCCoreChecks.xcscheme": {
|
||||
"bytes": 2337,
|
||||
@@ -3232,14 +3242,14 @@
|
||||
"sha256": "1a6c3863d4e4494202fb9702e6c86e4a500f507e03276788bfe997a2f1e03278"
|
||||
},
|
||||
"platforms/macos/VCC.xcodeproj/xcshareddata/xcschemes/VCCMac.xcscheme": {
|
||||
"bytes": 2325,
|
||||
"bytes": 2335,
|
||||
"mode": "0644",
|
||||
"sha256": "0fc8e048b6c0dbbe492138283e74e67b167ae27f03bb60e89995ddf697fdc3db"
|
||||
"sha256": "848cfa5d92e52775c6adbb9ae867829bfbe52a8e879073f0144bac5daa0fb1fd"
|
||||
},
|
||||
"platforms/macos/VCC.xcodeproj/xcshareddata/xcschemes/VCCUITests.xcscheme": {
|
||||
"bytes": 2446,
|
||||
"bytes": 2456,
|
||||
"mode": "0644",
|
||||
"sha256": "41bc86e0fc2acff458cac416a88a2ad8ac79669fa0d9e18b4f7773535a90d582"
|
||||
"sha256": "8d784469f08dc5afb4474e692df1380d0450e6e6741c8fb701367aa8d561d73a"
|
||||
},
|
||||
"platforms/windows/Audio.cpp": {
|
||||
"bytes": 10080,
|
||||
@@ -5371,6 +5381,21 @@
|
||||
"mode": "0644",
|
||||
"sha256": "32fa5459d4519924bc2ec1b2e0859482d978a84ab6ecc6d71166484833934608"
|
||||
},
|
||||
"tests/toolchain/cmoc-0.1.101/check.py": {
|
||||
"bytes": 2975,
|
||||
"mode": "0644",
|
||||
"sha256": "f47bd2aee0e1f1e953a783499083b671fd21bd806505243a4839952861d38e9f"
|
||||
},
|
||||
"tests/toolchain/cmoc-0.1.101/handler-addresses.c": {
|
||||
"bytes": 1719,
|
||||
"mode": "0644",
|
||||
"sha256": "f66d02795f137374692e06b6b353a781cd6162ec2ef04f32d7c87db96241c201"
|
||||
},
|
||||
"tests/toolchain/cmoc-0.1.101/qualification.c": {
|
||||
"bytes": 1811,
|
||||
"mode": "0644",
|
||||
"sha256": "10b13061ff20e183e9756e564304513c5d26bd4ff097ba92d71b024c4888caf3"
|
||||
},
|
||||
"tests/toolchain/expedition-demo/check.py": {
|
||||
"bytes": 3230,
|
||||
"mode": "0644",
|
||||
@@ -5452,9 +5477,9 @@
|
||||
"sha256": "85c5f67b4504983229c765940eda45492beb6cd81f18d57b12b53d4177792e34"
|
||||
},
|
||||
"tests/toolchain/indexed-arguments/check-rule.py": {
|
||||
"bytes": 1511,
|
||||
"bytes": 2179,
|
||||
"mode": "0644",
|
||||
"sha256": "7b5c2a08c59a1a4d54b21d8a27811601d84f7d4be77d15f4654fa0e12b11a672"
|
||||
"sha256": "94f73006f0704341891bb20005d99f0d27bdddd008f5da93a9f05f8872a18e49"
|
||||
},
|
||||
"tests/toolchain/indexed-arguments/check.py": {
|
||||
"bytes": 2216,
|
||||
@@ -5462,9 +5487,9 @@
|
||||
"sha256": "1a921c7d801a0b938aca9651695d9ba83099461d2bf5309c0d17c8262c4058fc"
|
||||
},
|
||||
"tests/toolchain/indexed-arguments/optimizer-rule.cpp": {
|
||||
"bytes": 1781,
|
||||
"bytes": 1842,
|
||||
"mode": "0644",
|
||||
"sha256": "571007ed721c09916cd844142a1e56125c06aea7bb09ddb1b0dc3df0c305fad5"
|
||||
"sha256": "51d6362b933bc636fb038dbc6eba9b04dcd747a61d2fce2af3fb4329fb0313df"
|
||||
},
|
||||
"tests/toolchain/indexed-arguments/qualification.c": {
|
||||
"bytes": 1969,
|
||||
@@ -5769,17 +5794,17 @@
|
||||
"third_party/manifests/cmoc-make-dependencies.patch": {
|
||||
"bytes": 5874,
|
||||
"mode": "0644",
|
||||
"sha256": "e21ef9e60c338d660d0716386c40f7ef496f74e08cefb104e66053b89ccc51b8"
|
||||
"sha256": "d0e616034f7ce9dd7f4b1c7c68e661ca0a9f8a8c14052a2612723e13d3beb9e5"
|
||||
},
|
||||
"third_party/manifests/cmoc-source-only.patch": {
|
||||
"bytes": 3821,
|
||||
"mode": "0644",
|
||||
"sha256": "b20ec7d762c793c8baf120924f3d3e1b7d7d238bd8950b2e511062da6a6f4614"
|
||||
"sha256": "2b2714004bd8067fe5e905e9eaa66b10f06e2d0ef832ef3e3696025b03ca4e2b"
|
||||
},
|
||||
"third_party/manifests/cmoc.json": {
|
||||
"bytes": 101346,
|
||||
"bytes": 102090,
|
||||
"mode": "0644",
|
||||
"sha256": "17d6b9a919b95d1b683f44af5dae5f0d2d9d97f0a63b9a023c18417781eb750f"
|
||||
"sha256": "e5f742fabf786b1c60cf2883081e402b3454d1a1f34e5a24d22e22428f25795c"
|
||||
},
|
||||
"third_party/manifests/coco-letters.json": {
|
||||
"bytes": 5528,
|
||||
@@ -5942,9 +5967,9 @@
|
||||
"sha256": "0fd0139efcc700529931036c7e9cab83cf56004dce94b272fb7d291b92f65253"
|
||||
},
|
||||
"tools/toolchain/build-coco-letters.py": {
|
||||
"bytes": 1886,
|
||||
"bytes": 2083,
|
||||
"mode": "0644",
|
||||
"sha256": "c7c3c8482d2903fcd46fa0ceab729a9132d530e9486688b1a29b4cf99ebddb8c"
|
||||
"sha256": "398312c282d0f64d975d6bcb9de0b556c7ee7e44277ee40f09b2e9c9eb9a7699"
|
||||
},
|
||||
"tools/toolchain/build-perl.py": {
|
||||
"bytes": 1931,
|
||||
@@ -5952,9 +5977,9 @@
|
||||
"sha256": "b7a72d210df83fab0be7f5667c702f28c80affa176ac5f903857ae5edd447569"
|
||||
},
|
||||
"tools/toolchain/build-runtime.py": {
|
||||
"bytes": 5528,
|
||||
"bytes": 5633,
|
||||
"mode": "0644",
|
||||
"sha256": "aa0de1a3dc18b26b047ca88069d19d2a981e0b5e5ac3251b362313b19a33d2f1"
|
||||
"sha256": "41875a532ed5c9a24610faa553ca1607de95b5742fa2081d38fec91c7e2d8a10"
|
||||
},
|
||||
"tools/toolchain/build.py": {
|
||||
"bytes": 5747,
|
||||
@@ -5962,9 +5987,9 @@
|
||||
"sha256": "072dfd12fbee00c4558fb56cbda0144fef65db505a2f6274737fe0dd22a4f71b"
|
||||
},
|
||||
"tools/toolchain/check.py": {
|
||||
"bytes": 4647,
|
||||
"bytes": 4801,
|
||||
"mode": "0644",
|
||||
"sha256": "6f7dde1c241660538b3945fb550c75114d6ec0fc2748cd4f0feb51ae0c7f1fbf"
|
||||
"sha256": "2a90eb0e6e3188245de4525cd00b62b9f4371065af56c4fab309586cbdfca7af"
|
||||
},
|
||||
"tools/toolchain/cmoc-runtime.sh": {
|
||||
"bytes": 888,
|
||||
@@ -5982,9 +6007,9 @@
|
||||
"sha256": "2a44cc4021200502e3144f134cd3806c1ed9ffd860d7a9d88f2fea8ec7893684"
|
||||
},
|
||||
"tools/toolchain/patches/README.md": {
|
||||
"bytes": 8085,
|
||||
"bytes": 7861,
|
||||
"mode": "0644",
|
||||
"sha256": "b7a3e3068f2b6ed0abb7b0695abb128a14639a7fe6590504d5d4806928a7c788"
|
||||
"sha256": "96fc7b3884bc038d36c8f531670f20f9318e692ba8af00499467172849e31294"
|
||||
},
|
||||
"tools/toolchain/patches/cmoc-add-zero-flags.patch": {
|
||||
"bytes": 3095,
|
||||
@@ -6012,9 +6037,9 @@
|
||||
"sha256": "b4c0be753b3d68fead830575d6fa4e407aa0920e93e69ea809bfb28c766a263a"
|
||||
},
|
||||
"tools/toolchain/patches/writecocofile-before-dir.patch": {
|
||||
"bytes": 1567,
|
||||
"bytes": 1369,
|
||||
"mode": "0644",
|
||||
"sha256": "8d8d459ccea4966135d4e65b4a5e8c48898a974243b448c2066db1f158a33025"
|
||||
"sha256": "5a691b297e222a6fbb00ac10dadde7fd8999af2508cc9888aa422185e1cfcc7e"
|
||||
},
|
||||
"tools/toolchain/perl-launcher.c": {
|
||||
"bytes": 1179,
|
||||
@@ -6022,9 +6047,9 @@
|
||||
"sha256": "e72a89dfaeca4365ecdb11d0d5c75ff7e314907acc66ca7720b1d1b1d1f5383b"
|
||||
},
|
||||
"tools/toolchain/prepare-coco-letters-project.py": {
|
||||
"bytes": 4980,
|
||||
"bytes": 5058,
|
||||
"mode": "0644",
|
||||
"sha256": "514f1e865ad925a9f74ffe7942b362834353097d37699274c9ba49bdba66a436"
|
||||
"sha256": "96476d8e3a8fc2ace828eb4040c5fb2b755b5e6e1caa03c788e9c728980d76d4"
|
||||
},
|
||||
"tools/toolchain/runtime_inputs.py": {
|
||||
"bytes": 1654,
|
||||
@@ -6057,9 +6082,9 @@
|
||||
"sha256": "818d910da0302fabf3006d7d91113510102ae83a1769d756ad5fc3d8bcc3723c"
|
||||
},
|
||||
"tools/toolchain/verify-runtime.py": {
|
||||
"bytes": 20867,
|
||||
"bytes": 22001,
|
||||
"mode": "0644",
|
||||
"sha256": "0cbeec7c1fb5b14c9c33e96045ea5c228b2f3ca5a33f130123d4284796a50a73"
|
||||
"sha256": "344e2c96706ceb799bbb38b2358247521034220589568e1a23d3f70e55c2259b"
|
||||
},
|
||||
"tools/toolchain/verify-sources.py": {
|
||||
"bytes": 1298,
|
||||
@@ -6067,8 +6092,8 @@
|
||||
"sha256": "e7062472943ca987e4d0b59b67af85637f6a031ea9595a9159f62fe8f2499cef"
|
||||
}
|
||||
},
|
||||
"policy_version": 7,
|
||||
"recipe_sha256": "4f13c9841bf4d90e4fdd54d410df6bfdd1ba3b6bf75be14a88582d6e3043e8ee",
|
||||
"policy_version": 8,
|
||||
"recipe_sha256": "7a3131f3876340c154ed028177ba667b56dbfaf655c60326b8bdb2fa33cefcf6",
|
||||
"repository": "VCCPlus/VCCPlusOSS",
|
||||
"schema_version": 1,
|
||||
"source_history": "Independent distribution history; private Git metadata excluded"
|
||||
|
||||
+23
-1
@@ -2,7 +2,29 @@
|
||||
|
||||
> VCC Plus OSS retains the shared emulator and development capabilities. This calendar also describes prepared software collections, the full manual library, and separately distributed companion applications. Those payloads are not bundled with the OSS source edition; compatible user-supplied content and external applications have their own preparation requirements.
|
||||
|
||||
Current version **3.7.0**
|
||||
Current version **3.7.1**
|
||||
|
||||
## 3.7.1 — Build, Playtest and Deliver
|
||||
|
||||
Edition date: November 17, 2026
|
||||
|
||||
**Deliver the build you tested.** A newly reviewed C Assistant connection can
|
||||
export selected declared products from an exact successful build to an approved
|
||||
folder. Separate Release and Debug deliveries retain their original artifact
|
||||
identities, sizes and SHA-256 digests without another build. Existing files are
|
||||
never silently replaced; delivery permission remains separate from playtesting.
|
||||
|
||||
**Test more than one floppy.** Fresh multi-drive connections can insert or eject
|
||||
reviewed private media in FD0 through FD3, with per-drive hashes, provenance,
|
||||
protection and read/write activity. Writable disks are retained independently.
|
||||
The existing FD0 workflow remains compatible, and all exchanges preserve the
|
||||
normal ownership, paused-machine, idle-controller and disk-change safeguards.
|
||||
|
||||
**Build with CMOC 0.1.101.** The updated compiler retains VCC Plus's debug
|
||||
metadata and optimizer corrections while adopting upstream fixes. Disk-allocation
|
||||
options have explicit compatibility semantics; experimental dead-instruction
|
||||
removal remains off. Reviewed BASIC runs also tolerate a bounded, pre-mutation
|
||||
prompt-readiness retry without relaxing source, machine or media identity checks.
|
||||
|
||||
## 3.7.0 — Personal Libraries and CoCo Capture
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
| Tool or directory | Purpose |
|
||||
| --- | --- |
|
||||
| `bin/make` | GNU Make 4.4.1: ordinary, recursive, incremental and parallel Makefile builds. |
|
||||
| `bin/cmoc`, `libexec/cmoc` | Relocatable wrapper/native CMOC 0.1.100 compiler. |
|
||||
| `bin/cmoc`, `libexec/cmoc` | Relocatable wrapper/native CMOC 0.1.101 compiler in the development source tree. |
|
||||
| `bin/cpp`, `bin/mcpp` | Native CMOC adapter and mcpp 2.7.2 preprocessor. |
|
||||
| `bin/lwasm`, `bin/lwlink`, `bin/lwar` | LWTools 4.25 assembler, linker and archive tool. |
|
||||
| `bin/writecocofile` | CMOC's native disk-image insertion utility. |
|
||||
@@ -23,10 +23,17 @@ The compiler wrapper creates a temporary space-free alias for target headers/lib
|
||||
|
||||
The maintained `cmoc-make-dependencies.patch` escapes generated Make dependency targets/prerequisites and decodes quoted preprocessor paths in both CMOC readers. The adapter quotes raw path characters emitted by mcpp. This covers real SDK header paths inside a relocated `VCC Plus.app`, including parent directories containing spaces, quotes, `#` and `$`. `verify-runtime.py` exercises both `--deps-only` and `--deps`, automatic inclusion/regeneration, changed-header rebuilding and no-op builds on both architectures.
|
||||
|
||||
The bundled CMOC 0.1.100 optimizer preserves accumulator-indexed addresses when simplifying byte subtraction and comparisons. The runtime manifest records `vccIndexedByteSubtractionFix: 1`. The change takes effect when a project is recompiled. [Compiler patch and regression](../../tools/toolchain/patches/README.md)
|
||||
The CMOC 0.1.101 development optimizer preserves accumulator-indexed addresses when simplifying byte subtraction and comparisons. The runtime manifest records `vccIndexedByteSubtractionFix: 1`. The change takes effect when a project is recompiled. [Compiler patch and regression](../../tools/toolchain/patches/README.md)
|
||||
|
||||
The runtime manifest records `vccAddZeroFlagsFix: 1` for correct logical negation of integer results at `-O2`. Recompile existing guest programs to pick up the fix. [Logical negation regression](../../tools/toolchain/patches/README.md)
|
||||
|
||||
CMOC 0.1.101 provides upstream `writecocofile --allocate-before-dir`: try free
|
||||
granules 33 down to 0, then 34 through 67. The VCC Plus `--allocate-forward`
|
||||
compatibility alias retains ascending 0-through-67 allocation. Both can continue
|
||||
above the directory. Existing recipes that depend on the earlier VCC Plus layout
|
||||
must select the explicit forward alias; do not assume the identical old option
|
||||
name preserves physical layout. The last allocation option wins.
|
||||
|
||||
App staging adds a deterministic payload hash to the installed manifest. Workspace caches therefore invalidate when the compiler, helpers or headers change, even with the same upstream version.
|
||||
|
||||
Native project builds pass `MAKE=make` with the bundled tools first on PATH. This keeps recursive `$(MAKE)` recipes working when the actual application path contains spaces. The runtime regression includes a recursive child Makefile.
|
||||
|
||||
@@ -117,7 +117,7 @@ Use the live tool catalog and `get_capabilities` as the contract:
|
||||
| --- | --- |
|
||||
| `list_playtest_disks` | List retained primary boot disks scoped to the current project, with opaque IDs, hashes and artifact provenance. |
|
||||
| `list_playtest_media` (fresh media grant) | List the current artifact's reviewed disk products and, optionally, an owned run's private copies and compatible retained histories. |
|
||||
| `exchange_playtest_media` (fresh media grant) | Insert/eject a listed private FD0 copy at a paused, idle guest without reset or time advance; retain the old bytes before replacement. |
|
||||
| `exchange_playtest_media` (fresh media grant) | Insert/eject a listed private copy at a paused, idle guest without reset or time advance; fresh multi-drive grants select FD0–FD3 and insert-time protection; retain old bytes before replacement. |
|
||||
| `start_playtest` | Supply current project, revision, artifact and request IDs. Optionally select `processor: "MC6809"` (default) or `"HD6309"`, a retained disk by ID and exact hash, or name `stop_function` with `stop_kind: "c_line"` (default) or `"function_entry"`. |
|
||||
| `playtest_input` | Send steps of named physical `keys` held for `fields`, with optional complete standard `joysticks` snapshots on fresh joystick grants. Omitted ports center and release. |
|
||||
| `get_playtest_input` (toolset 9 joystick grant) | Read actual owned input and clock without advancing; input receipts also carry per-step delivery traces. |
|
||||
@@ -128,14 +128,16 @@ Use the live tool catalog and `get_capabilities` as the contract:
|
||||
| `get_debug_snapshot` | At a verified C or function stop, read its honest stop kind, module/physical identity, registers, permitted memory ranges and named watches. |
|
||||
| `read_debug_memory` | Read an advertised range from the same immutable stopped snapshot, up to 256 bytes. |
|
||||
| `get_call_context` (fresh toolset 10) | Read exactly 64 bytes at the paused owned guest’s actual S, with caller/integer-argument interpretation only where compiled evidence proves it. Supply the same run and snapshot IDs. |
|
||||
| `restart_playtest` | Cold restart the owned machine, retain its writable disk, and repeat the boot commands. |
|
||||
| `stop_playtest` | End the worker and retain its test disk in the app's development results. |
|
||||
| `restart_playtest` | Cold restart the owned machine, preserve all selected drives/copies/protection, and repeat the boot commands. |
|
||||
| `stop_playtest` | Freeze and independently retain every test disk before ending the worker. |
|
||||
|
||||
[Bounded call context](MCP_CALL_CONTEXT.md) explains raw versus proven values, fresh grants and snapshot invalidation.
|
||||
Disk exchange covers `playtestDisks` declarations,
|
||||
private writable sets, correct/wrong/empty media tests and explicit multi-disk
|
||||
resumption. `restart_playtest` keeps the currently inserted disk; it does not
|
||||
choose the primary disk automatically.
|
||||
resumption, four-drive receipts and transferred-byte activity. Fresh multi-drive
|
||||
grants use toolset 13+ with `playtestMultiDrive: true`; older media grants keep
|
||||
FD0-only behavior. `restart_playtest` preserves the mount map rather than moving
|
||||
the primary disk to FD0; ensure the intended boot disk is present there.
|
||||
|
||||
Development [debug evidence and diagnostics](MCP_DEBUG_EVIDENCE.md) extend these
|
||||
receipts to ordinary verified custom-Make artifacts. Flat code uses verified
|
||||
|
||||
@@ -5,6 +5,9 @@ A fresh C connection with **Allow Disposable Playtests** can advertise
|
||||
`exchange_playtest_media` tools. Check live discovery and `get_capabilities`
|
||||
before planning exchanges. Existing connections keep their original schemas;
|
||||
new tools require a newly reviewed connection and a restarted client helper.
|
||||
Fresh multi-drive grants additionally declare strict Boolean
|
||||
`playtestMultiDrive: true` with toolset 13 or later. Legacy media grants retain
|
||||
their FD0-only schema; an app update does not expand an old connection.
|
||||
This feature operates only on an owned disposable guest, never the ordinary
|
||||
shared run or personal mounted media.
|
||||
|
||||
@@ -61,11 +64,32 @@ counts and a truncation flag identify omitted history. `list_playtest_disks`
|
||||
keeps its older primary-boot-disk-only contract. Additional world/data disks
|
||||
are not advertised as primary boot selections.
|
||||
|
||||
The drive is **FD0**. No tool accepts a host pathname, another drive number,
|
||||
arbitrary bytes, another project's disks or a personal guest. Product IDs bind
|
||||
On a fresh multi-drive connection, `exchange_playtest_media` accepts integer
|
||||
`drive` 0–3 for **FD0–FD3**; omission means FD0. Legacy media connections remain
|
||||
FD0-only. No tool accepts a host pathname, arbitrary bytes, another project's
|
||||
disks or a personal guest. Product IDs bind
|
||||
to the current artifact, not just a filename. Listing and insertion recheck the
|
||||
project/revision/artifact and any retained disk's exact provenance and bytes.
|
||||
|
||||
## Read a coherent four-drive receipt
|
||||
|
||||
Fresh multi-drive results carry `media_contract_version: 2` and a `drives` array
|
||||
with exactly four bounded observations. Each row identifies numeric `drive`,
|
||||
`label` (`FD0` through `FD3`), `inserted`/`disk_present`, current `media_id`, byte
|
||||
count, original/current hashes, generation, dirty state and effective protection.
|
||||
The host associates the row with product/base provenance, media key and available
|
||||
retained identities. A media inventory row's nullable `drive` identifies current
|
||||
placement; product identity remains independent of placement.
|
||||
|
||||
`disk_reads` and `disk_writes` count guest-transferred data bytes over the worker's
|
||||
lifetime. `mount_read_bytes` and `mount_write_bytes` reset at a media-generation
|
||||
change. They are not counts of completed Save commands. Use guest save/reload,
|
||||
exact before/after hashes and the relevant generation's activity together. A
|
||||
rewritten identical value can have activity without a changed content hash.
|
||||
Read-only listing/capture does not advance emulation. Established top-level disk
|
||||
fields continue to describe FD0; top-level retained primary fields still identify
|
||||
the reviewed primary product even when it was moved to another drive.
|
||||
|
||||
## Exchange at a guest prompt
|
||||
|
||||
1. Boot the primary disk through the project's declared commands.
|
||||
@@ -75,16 +99,30 @@ project/revision/artifact and any retained disk's exact provenance and bytes.
|
||||
4. Insert a listed private copy with its exact current hash:
|
||||
|
||||
```json
|
||||
{"run_id":"<owned run>","request_id":"insert-data-1","action":"insert","media_id":"<listed media ID>","media_sha256":"<listed current SHA-256>"}
|
||||
{"run_id":"<owned run>","request_id":"insert-data-1","action":"insert","drive":1,"media_id":"<listed media ID>","media_sha256":"<listed current SHA-256>"}
|
||||
```
|
||||
|
||||
To leave FD0 empty, omit both selection fields:
|
||||
This example leaves Home in FD0 and inserts Data in FD1. To leave FD1 empty,
|
||||
omit both selection fields and name that drive:
|
||||
|
||||
```json
|
||||
{"run_id":"<owned run>","request_id":"eject-data-1","action":"eject"}
|
||||
{"run_id":"<owned run>","request_id":"eject-data-1","action":"eject","drive":1}
|
||||
```
|
||||
|
||||
An exchange also requires an idle floppy controller. A paused CPU or stopped
|
||||
`drive` must be a whole number from 0 through 3; booleans, fractional numbers and
|
||||
out-of-range values are refused. A fresh multi-drive insert also accepts strict
|
||||
Boolean `write_protected`. Omission preserves that copy's current setting; false
|
||||
cannot remove format-imposed protection. Eject forbids this option and the
|
||||
media/hash insertion fields. Protection belongs to the private copy and survives
|
||||
exchange, restart and retention independently of its content hash.
|
||||
|
||||
The same writable private copy cannot be mounted in two drives at once. Eject
|
||||
then insert to move it; matching bytes alone do not make two independent copies
|
||||
the same object. An exchange affects only its target drive and never changes
|
||||
BASIC's current/default drive.
|
||||
|
||||
An exchange also requires an idle shared floppy controller, including activity
|
||||
associated with a different drive. A paused CPU or stopped
|
||||
motor alone does not prove an incomplete guest transaction has finished. The
|
||||
app refuses an exchange while a command is pending; it never cancels the guest's
|
||||
disk I/O to force a swap. Continue through the guest's normal recovery path and
|
||||
@@ -97,14 +135,16 @@ provenance, stale-ownership or retention refusal before commit leaves the old
|
||||
paused disk and its dirty bytes intact. The same private copy is reused when switching back.
|
||||
|
||||
Exchanges do not reset the guest, advance its field clock, type keys or modify
|
||||
RAM/registers. The response reports `previous_media`, retained snapshot identity,
|
||||
RAM/registers. The response reports `target_drive`, `previous_media`, retained snapshot identity,
|
||||
new selection, `media_generation`, hashes, dirty state and the unchanged clock,
|
||||
with `guest_advanced: false` and `guest_reset: false`. Normal input resumes the
|
||||
guest so it can read the newly inserted disk itself. Capture the framebuffer
|
||||
and inspect the game's response; a successful mount is not proof that the game
|
||||
accepted the media.
|
||||
|
||||
Reuse a request ID only with the identical selection. The cached receipt prevents
|
||||
Reuse a request ID only with the identical selection, target drive and explicit
|
||||
protection choice. An omitted drive and explicit drive 0 are normalized to the
|
||||
same selection. The cached receipt prevents
|
||||
a retry from performing another exchange; different arguments conflict. Exchanges
|
||||
consume the existing owned mutation-request budget, not emulated fields. The
|
||||
normal input, audio, startup and ownership limits remain in force.
|
||||
@@ -142,12 +182,18 @@ place; do not create another request to repeat an uncertain operation in that ru
|
||||
## Save, restart and retain every disk
|
||||
|
||||
For a one-drive application, insert Home at its save prompt, use its real Save
|
||||
command, then insert Data to continue. `restart_playtest` cold-boots the currently
|
||||
inserted private disk through the declared commands; it keeps all the other
|
||||
private copies and their changes. Insert the boot disk first when the current
|
||||
data disk cannot boot. Restart does not automatically choose another disk.
|
||||
command, then insert Data to continue. A multi-drive application can instead
|
||||
keep Home in FD0 and Data in FD1 and decide its own save routing.
|
||||
`restart_playtest` cold-boots through the declared commands while preserving
|
||||
all current drive assignments, bytes and protection. Ensure FD0 contains the
|
||||
intended boot disk before a DOS boot. Restart does not secretly move the primary
|
||||
product to FD0 or choose a bootable disk. Startup mount maps are not part of
|
||||
this interface: insert into other drives through explicit paused exchanges.
|
||||
|
||||
`stop_playtest` retains every disk in the owned set, even when FD0 is empty.
|
||||
`stop_playtest` freezes the mounted state coherently and drains the four drives
|
||||
through separate bounded exports before worker exit. It retains every disk in
|
||||
the owned set, including ejected copies and when FD0 is empty. A combined reply
|
||||
does not concatenate four full disk images across the 1 MiB transport limit.
|
||||
`retained_media` returns an individual immutable disk ID/hash and product
|
||||
provenance for each. The established top-level `retained_disk_id` and
|
||||
`retained_disk_sha256` refer to the primary Home copy. Cleanup remains possible
|
||||
|
||||
@@ -140,7 +140,7 @@
|
||||
},
|
||||
{
|
||||
"path": "docs/development/CMOC_RUNTIME.md",
|
||||
"export_sha256": "c76871a76088b08e8c47110f596631f0cc426a73adb75f956c0abe508a6de9f7",
|
||||
"export_sha256": "2f253b1f8ece8da50d23899f51b23d8877a371dd4a82d84c54027a5d1012017a",
|
||||
"selected_headings": [
|
||||
{
|
||||
"heading": "Runtime contract",
|
||||
@@ -230,7 +230,7 @@
|
||||
},
|
||||
{
|
||||
"path": "docs/development/MCP_BANKED_PLAYTEST.md",
|
||||
"export_sha256": "75f1b3c0977ffc536a0cb47f46f554c10c06a34d5b7a2a58458d997c1493c480",
|
||||
"export_sha256": "2e45126b15ecdd309993c96fbeac28401d5462e83b7bf05b6d02a21fd1bfcede",
|
||||
"selected_headings": [
|
||||
{
|
||||
"heading": "Build evidence for packed programs",
|
||||
|
||||
@@ -487,7 +487,8 @@ final class BASICDevelopmentModel: ObservableObject {
|
||||
}
|
||||
guard reviewIsCurrent?() != false, source == text else { return nil }
|
||||
guard let snapshot = await machine.loadBASICSource(text, run: run, breakpoints: breakpoints,
|
||||
review: prior.map { ($0, existing) }) else { message = machine.fileError ?? "BASIC transfer failed."; return nil }
|
||||
review: prior.map { ($0, existing) },
|
||||
reviewIsCurrent: reviewIsCurrent) else { message = machine.fileError ?? "BASIC transfer failed."; return nil }
|
||||
machine.basicWorkspaceOwner = workspaceID
|
||||
let loadedSource = reviewIsCurrent == nil ? await machine.readBASICSource() : snapshot.assistantLoadedSource
|
||||
guard machine.basicWorkspaceOwner == workspaceID, source == text else { return nil }
|
||||
|
||||
@@ -507,6 +507,8 @@ struct CMOCProjectConfiguration: Codable, Equatable, Sendable {
|
||||
/// Additional build-produced floppy images reviewed for owned disk exchange.
|
||||
/// These are outputs, not source inputs or arbitrary files to mount.
|
||||
var playtestDisks: [String] = []
|
||||
/// Concrete additional delivery files; outputDirectories are never export permissions.
|
||||
var exportOutputs: [String] = []
|
||||
var launchMode: CMOCLaunchMode = .quickload
|
||||
var launchCommands: [String] = []
|
||||
var configurations = [CMOCBuildConfiguration(name: "Debug"), CMOCBuildConfiguration(name: "Release", makeArguments: ["VCC_CONFIGURATION=Release"])]
|
||||
@@ -521,7 +523,7 @@ struct CMOCProjectConfiguration: Codable, Equatable, Sendable {
|
||||
var outputDirectories: [String] = []
|
||||
var makefileSettings: CMOCMakefileSettings? = nil
|
||||
init() {}
|
||||
enum CodingKeys: CodingKey { case entrySource, makefile, buildTarget, cleanTarget, diskTarget, binary, diskImage, debugManifest, playtestDisks, launchMode, launchCommands, configurations, jobs, makefileSettings, bundledLibraries, buildSupportDirectories, resourceInputs, generatedInputs, outputDirectories }
|
||||
enum CodingKeys: CodingKey { case entrySource, makefile, buildTarget, cleanTarget, diskTarget, binary, diskImage, debugManifest, playtestDisks, exportOutputs, launchMode, launchCommands, configurations, jobs, makefileSettings, bundledLibraries, buildSupportDirectories, resourceInputs, generatedInputs, outputDirectories }
|
||||
init(from decoder: Decoder) throws {
|
||||
self.init()
|
||||
let c = try decoder.container(keyedBy: CodingKeys.self)
|
||||
@@ -534,6 +536,7 @@ struct CMOCProjectConfiguration: Codable, Equatable, Sendable {
|
||||
diskImage = try c.decodeIfPresent(String.self, forKey: .diskImage)
|
||||
debugManifest = try c.decodeIfPresent(String.self, forKey: .debugManifest)
|
||||
playtestDisks = try c.decodeIfPresent([String].self, forKey: .playtestDisks) ?? []
|
||||
exportOutputs = try c.decodeIfPresent([String].self, forKey: .exportOutputs) ?? []
|
||||
launchMode = try c.decodeIfPresent(CMOCLaunchMode.self, forKey: .launchMode) ?? launchMode
|
||||
launchCommands = try c.decodeIfPresent([String].self, forKey: .launchCommands) ?? []
|
||||
configurations = try c.decodeIfPresent([CMOCBuildConfiguration].self, forKey: .configurations) ?? configurations
|
||||
@@ -554,6 +557,7 @@ struct CMOCProjectConfiguration: Codable, Equatable, Sendable {
|
||||
try c.encodeIfPresent(diskImage, forKey: .diskImage); try c.encode(launchMode, forKey: .launchMode)
|
||||
try c.encodeIfPresent(debugManifest, forKey: .debugManifest)
|
||||
if !playtestDisks.isEmpty { try c.encode(playtestDisks, forKey: .playtestDisks) }
|
||||
if !exportOutputs.isEmpty { try c.encode(exportOutputs, forKey: .exportOutputs) }
|
||||
try c.encode(launchCommands, forKey: .launchCommands); try c.encode(configurations, forKey: .configurations)
|
||||
try c.encode(jobs, forKey: .jobs); try c.encodeIfPresent(makefileSettings, forKey: .makefileSettings)
|
||||
if !bundledLibraries.isEmpty { try c.encode(bundledLibraries, forKey: .bundledLibraries) }
|
||||
@@ -592,7 +596,23 @@ struct CMOCProjectConfiguration: Codable, Equatable, Sendable {
|
||||
throw CMOCBuildError.message("Additional playtest disks need distinct project-relative .dsk or .os9 output paths, separate from inputs and primary outputs.")
|
||||
}
|
||||
}
|
||||
let concreteOutputs = ([binary, diskImage, debugManifest].compactMap { $0 } + playtestDisks +
|
||||
let exportPaths = [binary, diskImage, debugManifest].compactMap { $0 } + playtestDisks + exportOutputs
|
||||
guard exportPaths.count <= 64,
|
||||
Set(exportPaths.map { $0.lowercased() }).count == exportPaths.count else {
|
||||
throw CMOCBuildError.message("Declare at most 64 distinct concrete delivery outputs.")
|
||||
}
|
||||
for path in exportOutputs {
|
||||
try CMOCProject.validateRelativePath(path)
|
||||
guard !occupiedRoles.contains(path.lowercased()), path.split(separator: "/").count <= 32,
|
||||
!path.split(separator: "/").contains(where: { [".git", ".hg", ".svn"].contains($0.lowercased()) }) else {
|
||||
throw CMOCBuildError.message("Delivery outputs must be concrete generated files, separate from project inputs.")
|
||||
}
|
||||
}
|
||||
let lowerExportPaths = exportPaths.map { $0.lowercased() }
|
||||
guard !lowerExportPaths.contains(where: { path in lowerExportPaths.contains(where: { $0.hasPrefix(path + "/") }) }) else {
|
||||
throw CMOCBuildError.message("Delivery output paths cannot overlap directories and files.")
|
||||
}
|
||||
let concreteOutputs = ([binary, diskImage, debugManifest].compactMap { $0 } + playtestDisks + exportOutputs +
|
||||
(makefileSettings?.generatedResources.flatMap(\.outputs) ?? [])).map { $0.lowercased() }
|
||||
let ordinaryInputs = [entrySource, makefile, CMOCProject.configurationFilename] + resourceInputs
|
||||
let explicitInputs = ordinaryInputs + generatedInputs
|
||||
@@ -820,7 +840,7 @@ struct CMOCProject: Equatable, Sendable {
|
||||
for ext in ["map", "link"] { excluded.insert((stem + "." + ext).lowercased()) }
|
||||
}
|
||||
if let disk = configuration.diskImage { excluded.insert(disk.lowercased()) }
|
||||
excluded.formUnion(configuration.playtestDisks.map { $0.lowercased() })
|
||||
excluded.formUnion((configuration.playtestDisks + configuration.exportOutputs).map { $0.lowercased() })
|
||||
if let manifest = configuration.debugManifest { excluded.insert(manifest.lowercased()) }
|
||||
if let recipe = configuration.makefileSettings {
|
||||
for path in recipe.generatedResources.flatMap(\.outputs) { excluded.insert(path.lowercased()) }
|
||||
@@ -976,6 +996,20 @@ struct CMOCPlaytestDiskProduct: Codable, Equatable, Sendable {
|
||||
let byteCount: Int
|
||||
}
|
||||
|
||||
/// A concrete delivery product frozen at successful build completion.
|
||||
struct CMOCBuildOutputProduct: Codable, Equatable, Sendable {
|
||||
let relativePath: String
|
||||
let byteCount: Int
|
||||
let sha256: String
|
||||
func identifier(artifactID: UUID) -> String {
|
||||
CMOCProject.sha256(Data((artifactID.uuidString + "\n" + relativePath).utf8))
|
||||
}
|
||||
func fields(artifactID: UUID) -> [String: Any] {
|
||||
["output_id": identifier(artifactID: artifactID), "path": relativePath,
|
||||
"bytes": byteCount, "sha256": sha256]
|
||||
}
|
||||
}
|
||||
|
||||
struct CMOCBuildArtifact: Sendable {
|
||||
let id: UUID
|
||||
let directory: URL
|
||||
@@ -998,6 +1032,7 @@ struct CMOCBuildArtifact: Sendable {
|
||||
let playtestDiskProducts: [CMOCPlaytestDiskProduct]
|
||||
let debugManifestRelativePath: String?
|
||||
let outputPaths: [String]
|
||||
let exportProducts: [CMOCBuildOutputProduct]
|
||||
let configurationName: String
|
||||
let action: CMOCBuildAction
|
||||
var hasBinary: Bool { binaryRelativePath != nil && !binaryData.isEmpty }
|
||||
@@ -1016,7 +1051,7 @@ struct CMOCBuildArtifact: Sendable {
|
||||
entrySourcePath: String = "main.c", binaryRelativePath: String? = "main.bin", diskRelativePath: String? = nil,
|
||||
outputPaths: [String] = [], configurationName: String = "Debug", action: CMOCBuildAction = .build,
|
||||
debugManifestRelativePath: String? = nil, diskSHA256: String? = nil, buildOutput: CMOCBuildOutput? = nil,
|
||||
playtestDiskProducts: [CMOCPlaytestDiskProduct] = []) {
|
||||
playtestDiskProducts: [CMOCPlaytestDiskProduct] = [], exportProducts: [CMOCBuildOutputProduct] = []) {
|
||||
self.id = id; self.directory = directory; self.source = source; self.sourceData = sourceData; self.sourceSHA256 = sourceSHA256
|
||||
self.binaryData = binaryData; self.buildLog = buildLog; self.buildOutput = buildOutput; self.sources = sources ?? [entrySourcePath: sourceData]
|
||||
self.sourceHashes = self.sources.mapValues(CMOCProject.sha256)
|
||||
@@ -1026,6 +1061,7 @@ struct CMOCBuildArtifact: Sendable {
|
||||
self.debugManifestRelativePath = debugManifestRelativePath
|
||||
self.diskSHA256 = diskSHA256
|
||||
self.playtestDiskProducts = playtestDiskProducts
|
||||
self.exportProducts = exportProducts
|
||||
self.configurationName = configurationName; self.action = action
|
||||
}
|
||||
func matches(source: String) -> Bool { sourceSHA256 == CMOCProject.sha256(Data(source.utf8)) }
|
||||
@@ -1588,10 +1624,11 @@ final class CMOCBuildService: @unchecked Sendable {
|
||||
let supportKey = CMOCProject.sha256(try libraryEncoder.encode(supportIdentity))
|
||||
// A newly reviewed media declaration cannot inherit an incidental old
|
||||
// image from an earlier cache. Empty declarations retain legacy keys.
|
||||
let exportKey = settings.exportOutputs.isEmpty ? "" : "\nexport-outputs:" + CMOCProject.sha256(try libraryEncoder.encode(settings.exportOutputs))
|
||||
let playtestMediaKey = settings.playtestDisks.isEmpty ? "" :
|
||||
"\nplaytest-disks:" + CMOCProject.sha256(try libraryEncoder.encode(settings.playtestDisks))
|
||||
let cacheKey = CMOCProject.sha256(Data((project.directory.resolvingSymlinksInPath().path + "\n" + name + "\n" +
|
||||
configuration.makeArguments.joined(separator: "\n") + "\n" + libraryKey + "\n" + supportKey + "\n" + toolchain.path + "\n" + CMOCProject.sha256(manifest) + playtestMediaKey).utf8))
|
||||
configuration.makeArguments.joined(separator: "\n") + "\n" + libraryKey + "\n" + supportKey + "\n" + toolchain.path + "\n" + CMOCProject.sha256(manifest) + playtestMediaKey + exportKey).utf8))
|
||||
let cache = try incrementalWorkspaceRoot().appendingPathComponent(cacheKey)
|
||||
let workspace = cache.appendingPathComponent("project")
|
||||
let indexURL = cache.appendingPathComponent("inputs.json")
|
||||
@@ -1750,6 +1787,19 @@ final class CMOCBuildService: @unchecked Sendable {
|
||||
sha256: CMOCProject.sha256(data), byteCount: data.count))
|
||||
}
|
||||
}
|
||||
var exportProducts: [CMOCBuildOutputProduct] = []
|
||||
if requiresProducts {
|
||||
let declared = [binaryPath, diskPath, settings.debugManifest.flatMap { products[$0] == nil ? nil : $0 }].compactMap { $0 } + settings.playtestDisks + settings.exportOutputs
|
||||
var total = 0
|
||||
for path in declared {
|
||||
guard let data = products[path], data.count <= CMOCProject.maximumFileBytes,
|
||||
total <= 128 * 1024 * 1024 - data.count else {
|
||||
throw CMOCBuildError.validation(message: "Make did not produce a bounded declared delivery file: " + path, log: log, capture: combinedOutput)
|
||||
}
|
||||
total += data.count
|
||||
exportProducts.append(CMOCBuildOutputProduct(relativePath: path, byteCount: data.count, sha256: CMOCProject.sha256(data)))
|
||||
}
|
||||
}
|
||||
try control.checkCancellation(log: log)
|
||||
let id = UUID()
|
||||
let result = buildRoot.appendingPathComponent(id.uuidString)
|
||||
@@ -1773,7 +1823,7 @@ final class CMOCBuildService: @unchecked Sendable {
|
||||
binaryRelativePath: binaryPath, diskRelativePath: diskPath, outputPaths: products.keys.sorted(), configurationName: name, action: action,
|
||||
debugManifestRelativePath: settings.debugManifest,
|
||||
diskSHA256: diskPath.flatMap { products[$0] }.map(CMOCProject.sha256), buildOutput: combinedOutput,
|
||||
playtestDiskProducts: playtestDiskProducts)
|
||||
playtestDiskProducts: playtestDiskProducts, exportProducts: exportProducts)
|
||||
try buildHistory.record(artifact, project: project.directory)
|
||||
frozen = true; succeeded = true
|
||||
return artifact
|
||||
@@ -1831,7 +1881,8 @@ final class CMOCBuildService: @unchecked Sendable {
|
||||
let physicalDirectory = URL(fileURLWithPath: String(cString: physicalPath), isDirectory: true)
|
||||
free(physicalPath)
|
||||
let artifact = CMOCBuildArtifact(id: id, directory: physicalDirectory, source: source,
|
||||
sourceData: sourceData, sourceSHA256: CMOCProject.sha256(sourceData), binaryData: binary, buildLog: output.text, buildOutput: control.capturedOutput)
|
||||
sourceData: sourceData, sourceSHA256: CMOCProject.sha256(sourceData), binaryData: binary, buildLog: output.text, buildOutput: control.capturedOutput,
|
||||
exportProducts: [CMOCBuildOutputProduct(relativePath: "main.bin", byteCount: binary.count, sha256: CMOCProject.sha256(binary))])
|
||||
try control.checkCancellation()
|
||||
try buildHistory.record(artifact, project: project.directory)
|
||||
succeeded = true
|
||||
|
||||
@@ -97,7 +97,7 @@ struct CMOCProjectInputManifest: Equatable, Sendable {
|
||||
let effective = CMOCProject(directory: project.directory, configuration: configuration)
|
||||
let recipe = configuration.makefileSettings
|
||||
let generatedOutputs = Set(recipe?.generatedResources.flatMap(\.outputs) ?? [])
|
||||
var products = generatedOutputs.union(configuration.playtestDisks)
|
||||
var products = generatedOutputs.union(configuration.playtestDisks).union(configuration.exportOutputs)
|
||||
for path in [configuration.binary, configuration.diskImage, configuration.debugManifest].compactMap({ $0 }) {
|
||||
products.insert(path)
|
||||
}
|
||||
|
||||
@@ -0,0 +1,272 @@
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
import Foundation
|
||||
import Darwin
|
||||
|
||||
/// A connection-scoped, revocable write grant. It never follows a user-selected
|
||||
/// path supplied over MCP: the destination was selected in the native app.
|
||||
final class MCPBuildExporter: @unchecked Sendable {
|
||||
static let maximumFiles = 64
|
||||
static let maximumSetBytes = 128 * 1024 * 1024
|
||||
static let maximumSessionBytes = 512 * 1024 * 1024
|
||||
static let maximumRequests = 64
|
||||
struct Identity: Equatable, Sendable {
|
||||
let device: dev_t
|
||||
let inode: ino_t
|
||||
init(_ value: stat) { device = value.st_dev; inode = value.st_ino }
|
||||
}
|
||||
struct Source: Sendable {
|
||||
let artifactID: UUID
|
||||
let directory: URL
|
||||
let products: [CMOCBuildOutputProduct]
|
||||
let identity: Identity
|
||||
init(_ artifact: CMOCBuildArtifact) throws {
|
||||
artifactID = artifact.id; directory = artifact.directory; products = artifact.exportProducts
|
||||
let fd = try MCPBuildExporter.directory(artifact.directory)
|
||||
defer { close(fd) }
|
||||
identity = try MCPBuildExporter.identity(fd)
|
||||
}
|
||||
}
|
||||
struct Delivery: Sendable {
|
||||
let directory: String
|
||||
let products: [CMOCBuildOutputProduct]
|
||||
}
|
||||
let destinationID = UUID().uuidString
|
||||
private let root: URL
|
||||
private let rootIdentity: Identity
|
||||
private let state = NSLock()
|
||||
private var valid = true
|
||||
// Only used by authored race/failure fixtures, never populated by public input.
|
||||
var beforeCommit: (@Sendable () throws -> Void)?
|
||||
var afterFile: (@Sendable (Int) throws -> Void)?
|
||||
|
||||
init(destination: URL) throws {
|
||||
root = destination.standardizedFileURL
|
||||
let fd = try Self.directory(root); defer { close(fd) }
|
||||
rootIdentity = try Self.identity(fd)
|
||||
}
|
||||
func invalidate() { state.lock(); valid = false; state.unlock() }
|
||||
private func check() throws {
|
||||
try Task.checkCancellation()
|
||||
state.lock(); defer { state.unlock() }
|
||||
guard valid else { throw Self.failure("access_denied") }
|
||||
}
|
||||
private static func failure(_ text: String) -> CMOCBuildError { .message(text) }
|
||||
private static func identity(_ descriptor: Int32) throws -> Identity {
|
||||
var value = stat()
|
||||
guard fstat(descriptor, &value) == 0, value.st_mode & S_IFMT == S_IFDIR else {
|
||||
throw failure("export_directory_unavailable")
|
||||
}
|
||||
return Identity(value)
|
||||
}
|
||||
/// Follow only Apple's standard /tmp and /var aliases, never arbitrary links.
|
||||
private static func canonicalPath(_ url: URL) -> String {
|
||||
let path = url.standardizedFileURL.path
|
||||
return path == "/tmp" || path.hasPrefix("/tmp/") || path == "/var" || path.hasPrefix("/var/") ? "/private" + path : path
|
||||
}
|
||||
private static func directory(_ url: URL) throws -> Int32 {
|
||||
let normalized = canonicalPath(url)
|
||||
guard normalized.hasPrefix("/") else { throw failure("invalid_export_directory") }
|
||||
var held = open("/", O_RDONLY | O_DIRECTORY | O_NOFOLLOW | O_CLOEXEC)
|
||||
guard held >= 0 else { throw failure("export_directory_unavailable") }
|
||||
do {
|
||||
for component in normalized.split(separator: "/") {
|
||||
let next = openat(held, String(component), O_RDONLY | O_DIRECTORY | O_NOFOLLOW | O_CLOEXEC)
|
||||
guard next >= 0 else { throw failure("export_directory_changed_or_linked") }
|
||||
close(held); held = next
|
||||
}
|
||||
return held
|
||||
} catch { close(held); throw error }
|
||||
}
|
||||
private func destination() throws -> Int32 {
|
||||
try check()
|
||||
let fd = try Self.directory(root)
|
||||
do {
|
||||
guard try Self.identity(fd) == rootIdentity else { throw Self.failure("export_destination_changed") }
|
||||
return fd
|
||||
} catch { close(fd); throw error }
|
||||
}
|
||||
private func source(_ value: Source) throws -> Int32 {
|
||||
try check()
|
||||
let fd = try Self.directory(value.directory)
|
||||
do {
|
||||
guard try Self.identity(fd) == value.identity else { throw Self.failure("export_artifact_changed") }
|
||||
return fd
|
||||
} catch { close(fd); throw error }
|
||||
}
|
||||
private static func parent(_ root: Int32, path: String, create: Bool) throws -> (Int32, String) {
|
||||
try CMOCProject.validateRelativePath(path)
|
||||
let components = path.split(separator: "/").map(String.init)
|
||||
guard components.count <= 32, components.allSatisfy({ $0.utf8.count <= 255 }) else { throw failure("invalid_export_path") }
|
||||
var held = dup(root)
|
||||
guard held >= 0 else { throw failure("export_directory_unavailable") }
|
||||
do {
|
||||
for component in components.dropLast() {
|
||||
if create, mkdirat(held, component, 0o700) != 0, errno != EEXIST { throw failure("export_write_failed") }
|
||||
let next = openat(held, component, O_RDONLY | O_DIRECTORY | O_NOFOLLOW | O_CLOEXEC)
|
||||
guard next >= 0 else { throw failure("export_path_changed_or_linked") }
|
||||
close(held); held = next
|
||||
}
|
||||
return (held, components.last!)
|
||||
} catch { close(held); throw error }
|
||||
}
|
||||
private func read(_ product: CMOCBuildOutputProduct, from directory: Int32) throws -> Data {
|
||||
try check()
|
||||
guard (0...CMOCProject.maximumFileBytes).contains(product.byteCount) else { throw Self.failure("export_output_too_large") }
|
||||
let (parent, leaf) = try Self.parent(directory, path: product.relativePath, create: false)
|
||||
defer { close(parent) }
|
||||
let fd = openat(parent, leaf, O_RDONLY | O_NOFOLLOW | O_NONBLOCK | O_CLOEXEC)
|
||||
guard fd >= 0 else { throw Self.failure("export_output_unavailable") }
|
||||
let file = FileHandle(fileDescriptor: fd, closeOnDealloc: true)
|
||||
defer { try? file.close() }
|
||||
var before = stat()
|
||||
guard fstat(fd, &before) == 0, before.st_mode & S_IFMT == S_IFREG, before.st_nlink == 1,
|
||||
before.st_size == off_t(product.byteCount) else { throw Self.failure("export_output_changed_or_linked") }
|
||||
var data = Data()
|
||||
while data.count < product.byteCount {
|
||||
try check()
|
||||
let chunk = try file.read(upToCount: min(65536, product.byteCount - data.count)) ?? Data()
|
||||
guard !chunk.isEmpty else { throw Self.failure("export_output_changed") }
|
||||
data.append(chunk)
|
||||
}
|
||||
var after = stat(), named = stat()
|
||||
guard fstat(fd, &after) == 0, Identity(before) == Identity(after), before.st_size == after.st_size,
|
||||
before.st_mtimespec.tv_sec == after.st_mtimespec.tv_sec, before.st_mtimespec.tv_nsec == after.st_mtimespec.tv_nsec,
|
||||
fstatat(parent, leaf, &named, AT_SYMLINK_NOFOLLOW) == 0,
|
||||
named.st_mode & S_IFMT == S_IFREG, named.st_nlink == 1, Identity(named) == Identity(after),
|
||||
CMOCProject.sha256(data) == product.sha256 else { throw Self.failure("export_output_changed") }
|
||||
return data
|
||||
}
|
||||
private func verifyContents(_ descriptor: Int32, products: [CMOCBuildOutputProduct], flush: Bool = false) throws {
|
||||
let expected = Set(products.map(\.relativePath))
|
||||
var observed: Set<String> = []
|
||||
var visited = 0
|
||||
func walk(_ fd: Int32, prefix: String, depth: Int) throws {
|
||||
try check()
|
||||
guard depth <= 32 else { throw Self.failure("export_delivery_changed") }
|
||||
let copy = dup(fd)
|
||||
guard copy >= 0, let stream = fdopendir(copy) else {
|
||||
if copy >= 0 { close(copy) }; throw Self.failure("export_delivery_changed")
|
||||
}
|
||||
defer { closedir(stream) }
|
||||
while let entry = readdir(stream) {
|
||||
let name = withUnsafePointer(to: &entry.pointee.d_name) {
|
||||
$0.withMemoryRebound(to: CChar.self, capacity: Int(entry.pointee.d_namlen) + 1) { String(cString: $0) }
|
||||
}
|
||||
if name == "." || name == ".." { continue }
|
||||
visited += 1
|
||||
guard visited <= Self.maximumFiles * 33 else { throw Self.failure("export_delivery_changed") }
|
||||
let path = prefix.isEmpty ? name : prefix + "/" + name
|
||||
var info = stat()
|
||||
guard fstatat(fd, name, &info, AT_SYMLINK_NOFOLLOW) == 0 else { throw Self.failure("export_delivery_changed") }
|
||||
if info.st_mode & S_IFMT == S_IFDIR {
|
||||
guard expected.contains(where: { $0.hasPrefix(path + "/") }) else { throw Self.failure("export_delivery_changed") }
|
||||
let child = openat(fd, name, O_RDONLY | O_DIRECTORY | O_NOFOLLOW | O_CLOEXEC)
|
||||
guard child >= 0 else { throw Self.failure("export_delivery_changed") }
|
||||
defer { close(child) }
|
||||
try walk(child, prefix: path, depth: depth + 1)
|
||||
} else {
|
||||
guard info.st_mode & S_IFMT == S_IFREG, info.st_nlink == 1, expected.contains(path) else { throw Self.failure("export_delivery_changed") }
|
||||
observed.insert(path)
|
||||
}
|
||||
}
|
||||
if flush, fsync(fd) != 0 { throw Self.failure("export_write_failed") }
|
||||
}
|
||||
try walk(descriptor, prefix: "", depth: 0)
|
||||
guard observed == expected else { throw Self.failure("export_delivery_changed") }
|
||||
for product in products { _ = try read(product, from: descriptor) }
|
||||
}
|
||||
/// Creates a complete new set with an exclusive atomic directory rename.
|
||||
/// No existing delivery is removed or repaired. The caller binds Source and
|
||||
/// the request ID to the original connection/build/revision before calling.
|
||||
func export(source value: Source, products: [CMOCBuildOutputProduct], setName: String) throws -> Delivery {
|
||||
guard !products.isEmpty, products.count <= Self.maximumFiles,
|
||||
Set(products.map { $0.relativePath.lowercased() }).count == products.count,
|
||||
products.allSatisfy({ value.products.contains($0) && (0...CMOCProject.maximumFileBytes).contains($0.byteCount) }),
|
||||
products.reduce(0, { $0 + $1.byteCount }) <= Self.maximumSetBytes,
|
||||
setName.hasPrefix("VCC-"), setName.utf8.count < 200, !setName.contains("/") else { throw Self.failure("invalid_export_selection") }
|
||||
let sourcePath = Self.canonicalPath(value.directory), destinationPath = Self.canonicalPath(root)
|
||||
guard destinationPath != sourcePath, !destinationPath.hasPrefix(sourcePath + "/") else { throw Self.failure("export_destination_overlaps_artifact") }
|
||||
let destination = try destination(), source = try source(value)
|
||||
defer { close(destination); close(source) }
|
||||
let stageName = ".vccplus-export-" + UUID().uuidString
|
||||
guard mkdirat(destination, stageName, 0o700) == 0 else { throw Self.failure("export_write_failed") }
|
||||
let stage = openat(destination, stageName, O_RDONLY | O_DIRECTORY | O_NOFOLLOW | O_CLOEXEC)
|
||||
guard stage >= 0 else { throw Self.failure("export_write_failed") }
|
||||
defer { close(stage) }
|
||||
var created: [(String, Identity)] = []
|
||||
var committed = false
|
||||
defer {
|
||||
if !committed {
|
||||
// Remove only this transaction's unchanged files; never recursively
|
||||
// erase unexpected files planted in a failed staging directory.
|
||||
for (path, identity) in created.reversed() {
|
||||
if let (parent, leaf) = try? Self.parent(stage, path: path, create: false) {
|
||||
var named = stat()
|
||||
if fstatat(parent, leaf, &named, AT_SYMLINK_NOFOLLOW) == 0, Identity(named) == identity { _ = unlinkat(parent, leaf, 0) }
|
||||
close(parent)
|
||||
}
|
||||
}
|
||||
let directories = Set(products.flatMap { product -> [String] in
|
||||
let parts = product.relativePath.split(separator: "/"); return (1..<parts.count).map { parts.prefix($0).joined(separator: "/") }
|
||||
}).sorted { $0.count > $1.count }
|
||||
for path in directories {
|
||||
if let (parent, leaf) = try? Self.parent(stage, path: path, create: false) { _ = unlinkat(parent, leaf, AT_REMOVEDIR); close(parent) }
|
||||
}
|
||||
_ = unlinkat(destination, stageName, AT_REMOVEDIR)
|
||||
}
|
||||
}
|
||||
for (index, product) in products.enumerated() {
|
||||
let checkDestination = try self.destination(); close(checkDestination)
|
||||
let checkSource = try self.source(value); close(checkSource)
|
||||
let bytes = try read(product, from: source)
|
||||
let (parent, leaf) = try Self.parent(stage, path: product.relativePath, create: true)
|
||||
defer { close(parent) }
|
||||
let fd = openat(parent, leaf, O_WRONLY | O_CREAT | O_EXCL | O_NOFOLLOW | O_CLOEXEC, 0o600)
|
||||
guard fd >= 0 else { throw Self.failure("export_write_failed") }
|
||||
let file = FileHandle(fileDescriptor: fd, closeOnDealloc: true)
|
||||
defer { try? file.close() }
|
||||
var info = stat()
|
||||
guard fstat(fd, &info) == 0 else { throw Self.failure("export_write_failed") }
|
||||
created.append((product.relativePath, Identity(info)))
|
||||
for offset in stride(from: 0, to: bytes.count, by: 65536) {
|
||||
try check()
|
||||
try file.write(contentsOf: bytes.subdata(in: offset..<min(bytes.count, offset + 65536)))
|
||||
}
|
||||
guard fsync(fd) == 0 else { throw Self.failure("export_write_failed") }
|
||||
try afterFile?(index)
|
||||
}
|
||||
// Verify the actual staged bytes and source hashes again before commit.
|
||||
for product in products { _ = try read(product, from: stage); _ = try read(product, from: source) }
|
||||
try beforeCommit?()
|
||||
try verifyContents(stage, products: products, flush: true)
|
||||
for product in products { _ = try read(product, from: source) }
|
||||
let currentDestination = try self.destination(), currentSource = try self.source(value)
|
||||
defer { close(currentDestination); close(currentSource) }
|
||||
var stageInfo = stat(), namedStage = stat()
|
||||
guard fstat(stage, &stageInfo) == 0, fstatat(destination, stageName, &namedStage, AT_SYMLINK_NOFOLLOW) == 0,
|
||||
namedStage.st_mode & S_IFMT == S_IFDIR, Identity(stageInfo) == Identity(namedStage) else { throw Self.failure("export_staging_changed") }
|
||||
try check()
|
||||
// Revocation cannot race between the final authority check and rename.
|
||||
state.lock()
|
||||
guard valid, !Task.isCancelled else { state.unlock(); throw Self.failure("access_denied") }
|
||||
let renamed = renameatx_np(destination, stageName, destination, setName, UInt32(RENAME_EXCL))
|
||||
let renameError = errno
|
||||
if renamed == 0 { committed = true }
|
||||
state.unlock()
|
||||
guard renamed == 0 else {
|
||||
throw Self.failure(renameError == EEXIST ? "export_destination_conflict" : "export_commit_failed")
|
||||
}
|
||||
// The staged file data was flushed before rename; never delete an exposed
|
||||
// delivery to roll back a directory-flush failure.
|
||||
guard fsync(destination) == 0 else { throw Self.failure("export_commit_uncertain") }
|
||||
return Delivery(directory: setName, products: products)
|
||||
}
|
||||
func verify(_ delivery: Delivery) throws {
|
||||
let destination = try destination(); defer { close(destination) }
|
||||
let directory = openat(destination, delivery.directory, O_RDONLY | O_DIRECTORY | O_NOFOLLOW | O_CLOEXEC)
|
||||
guard directory >= 0 else { throw Self.failure("export_delivery_changed") }
|
||||
defer { close(directory) }
|
||||
try verifyContents(directory, products: delivery.products)
|
||||
let current = try self.destination(); close(current)
|
||||
}
|
||||
}
|
||||
@@ -94,7 +94,7 @@ struct MCPProjectRefreshRecord {
|
||||
let next = offset + bounded.items.count
|
||||
return (bounded.items, next < entries.count ? next : nil, bounded.truncated)
|
||||
}
|
||||
static let safeTools: Set<String> = ["get_capabilities", "get_machine_status", "get_build", "get_build_log", "get_project_refresh", "read_project_inputs", "refresh_project", "read_project_file", "get_proposal"]
|
||||
static let safeTools: Set<String> = ["get_capabilities", "get_machine_status", "get_build", "get_build_log", "get_project_refresh", "read_project_inputs", "refresh_project", "read_project_file", "get_proposal", "export_build_outputs", "get_build_export"]
|
||||
}
|
||||
|
||||
/// The grant binds reviewed drafts and build artifacts to one selected project.
|
||||
@@ -152,9 +152,42 @@ final class MCPCMOC: ObservableObject {
|
||||
private var approvedRecipeID: String?
|
||||
@Published var allowProjectMakefile = false
|
||||
@Published var allowPlaytests = false
|
||||
@Published var allowBuildExport = false
|
||||
@Published fileprivate private(set) var exportFolderName: String?
|
||||
private var selectedExportDirectory: URL?
|
||||
fileprivate var buildExporter: MCPBuildExporter?
|
||||
private var exportSources: [String: (revision: Int, configuration: String, source: MCPBuildExporter.Source)] = [:]
|
||||
private struct ExportRecord {
|
||||
let identity: String
|
||||
let base: [String: Any]
|
||||
var status = "exporting"
|
||||
var delivery: MCPBuildExporter.Delivery?
|
||||
var reason: String?
|
||||
var fields: [String: Any] {
|
||||
var value = base
|
||||
value["status"] = status; value["busy"] = status == "exporting"
|
||||
if let delivery {
|
||||
value["delivery_directory"] = delivery.directory
|
||||
let artifactID = UUID(uuidString: base["artifact_id"] as? String ?? "")!
|
||||
value["outputs"] = delivery.products.map { product -> [String: Any] in
|
||||
var fields = product.fields(artifactID: artifactID)
|
||||
fields["relative_filename"] = delivery.directory + "/" + product.relativePath
|
||||
return fields
|
||||
}
|
||||
}
|
||||
if let reason { value["error"] = reason }
|
||||
return value
|
||||
}
|
||||
}
|
||||
private var exportRecords: [String: ExportRecord] = [:]
|
||||
private var exportRequests: [String: String] = [:]
|
||||
private var exportWork: Task<Void, Never>?
|
||||
private var exporting = false
|
||||
private var exportReservedBytes = 0
|
||||
fileprivate private(set) var playtestsApproved = false
|
||||
private var callContextApproved = false
|
||||
private var playtestMediaApproved = false
|
||||
private var playtestMultiDriveApproved = false
|
||||
#if DEBUG
|
||||
private var regressionPlaytestHelper: URL?
|
||||
private var regressionStarterKit: StarterKit?
|
||||
@@ -376,9 +409,11 @@ final class MCPCMOC: ObservableObject {
|
||||
|
||||
#if DEBUG
|
||||
func exportCallContextRegression(_ model: CMOCDevelopmentModel, at destination: URL, playtests: Bool = true,
|
||||
helperURL: URL? = nil, roms: URL? = nil) async throws {
|
||||
helperURL: URL? = nil, roms: URL? = nil, exportFolder: URL? = nil) async throws {
|
||||
allowProjectMakefile = true
|
||||
allowPlaytests = playtests
|
||||
allowBuildExport = exportFolder != nil; selectedExportDirectory = exportFolder
|
||||
exportFolderName = exportFolder?.lastPathComponent
|
||||
try await grant(model, at: destination)
|
||||
regressionPlaytestHelper = helperURL
|
||||
regressionStarterKit = roms.map { StarterKit(directory: $0) }
|
||||
@@ -401,7 +436,7 @@ final class MCPCMOC: ObservableObject {
|
||||
|
||||
private func sanitized(_ text: String) -> String {
|
||||
var result = text
|
||||
for root in [scratch, model?.project?.directory].compactMap({ $0 }) {
|
||||
for root in [scratch, model?.project?.directory, selectedExportDirectory].compactMap({ $0 }) {
|
||||
result = result.replacingOccurrences(of: root.path, with: "<project>")
|
||||
}
|
||||
return String(result.prefix(2000))
|
||||
@@ -588,6 +623,8 @@ final class MCPCMOC: ObservableObject {
|
||||
presentationIsCurrent: (@MainActor () -> Bool)? = nil) async throws {
|
||||
let id = model.assistantProjectID, ticket = UUID(), secret = UUID().uuidString + UUID().uuidString
|
||||
let approvedPlaytests = allowPlaytests
|
||||
let approvedExport = allowBuildExport, approvedExportDirectory = selectedExportDirectory
|
||||
if approvedExport && approvedExportDirectory == nil { throw problem("Choose a delivery folder before sharing build export access.") }
|
||||
let cleanup = revoke()
|
||||
session = ticket
|
||||
pendingModel = model
|
||||
@@ -597,6 +634,7 @@ final class MCPCMOC: ObservableObject {
|
||||
guard let project = model.project else { throw problem("project_unavailable") }
|
||||
let scope = try MCPCMOCProject(project: project, files: model.files.map(\.relativePath), customMake: allowProjectMakefile)
|
||||
let captured = try await capture(model, scope: scope, updatedScope: true, expandedSupport: true)
|
||||
let exporter = try await Task.detached { try approvedExport ? MCPBuildExporter(destination: approvedExportDirectory!) : nil }.value
|
||||
guard session == ticket, model.assistantProjectID == id, presentationIsCurrent?() != false else { throw problem("stale_revision") }
|
||||
let dir = FileManager.default.temporaryDirectory.appendingPathComponent("vcc-c-project-" + UUID().uuidString)
|
||||
let handler: MCPTransport.Handler = { [weak self] data in
|
||||
@@ -607,7 +645,7 @@ final class MCPCMOC: ObservableObject {
|
||||
try FileManager.default.createDirectory(at: dir, withIntermediateDirectories: false, attributes: [.posixPermissions: 0o700])
|
||||
do {
|
||||
let server = try MCPTransport(handler: handler)
|
||||
let bytes = try JSONSerialization.data(withJSONObject: ["token": secret, "kind": "cmoc", "toolset": 12, "playtestVideo": approvedPlaytests, "playtestMedia": approvedPlaytests, "playtestCallContext": approvedPlaytests, "projectRefresh": true, "projectDiagnostics": true, "playtestAudio": approvedPlaytests, "playtestProcessors": approvedPlaytests, "playtestJoysticks": approvedPlaytests, "customMake": scope.customMake, "playtest": approvedPlaytests, "canPropose": true,
|
||||
let bytes = try JSONSerialization.data(withJSONObject: ["token": secret, "kind": "cmoc", "toolset": 13, "buildExport": approvedExport, "playtestMultiDrive": approvedPlaytests, "playtestVideo": approvedPlaytests, "playtestMedia": approvedPlaytests, "playtestCallContext": approvedPlaytests, "projectRefresh": true, "projectDiagnostics": true, "playtestAudio": approvedPlaytests, "playtestProcessors": approvedPlaytests, "playtestJoysticks": approvedPlaytests, "customMake": scope.customMake, "playtest": approvedPlaytests, "canPropose": true,
|
||||
"socket": server.unixPath, "port": Int(server.port), "version": 1])
|
||||
return (server, try MCPGrantFile(create: destination, data: bytes))
|
||||
} catch { try? FileManager.default.removeItem(at: dir); throw error }
|
||||
@@ -616,12 +654,14 @@ final class MCPCMOC: ObservableObject {
|
||||
Task.detached { server.stop(); file.remove(); try? FileManager.default.removeItem(at: dir) }
|
||||
throw problem("stale_revision")
|
||||
}
|
||||
self.buildExporter = exporter
|
||||
self.server = server; self.file = file; token = secret; projectID = id; self.model = model
|
||||
scratch = dir; service = CMOCBuildService(toolchain: model.service.toolchain, buildRoot: dir.appendingPathComponent("Builds"))
|
||||
snapshot = captured.live; diskSnapshot = captured.disk; workspaceEpoch = captured.epoch; makeSnapshot = captured.make; approvedInputs = captured.manifest; revision = 0
|
||||
self.playtestsApproved = approvedPlaytests
|
||||
self.callContextApproved = approvedPlaytests
|
||||
self.playtestMediaApproved = approvedPlaytests
|
||||
self.playtestMultiDriveApproved = approvedPlaytests
|
||||
self.scope = captured.scope; templateDirectives = captured.directives; approvedRecipeID = captured.make?.recipeID
|
||||
active = true; status = "Connected to " + (model.project?.directory.lastPathComponent ?? "Hello Disk")
|
||||
}
|
||||
@@ -629,8 +669,11 @@ final class MCPCMOC: ObservableObject {
|
||||
@discardableResult func revoke() -> Task<Void, Never> {
|
||||
let playtestCleanup = playtest?.invalidate()
|
||||
let old = server, grant = file, dir = scratch, work = buildTask, guest = runTask
|
||||
buildExporter?.invalidate(); buildExporter = nil
|
||||
let exportTask = exportWork; exportTask?.cancel(); exportWork = nil
|
||||
exportRecords.removeAll(); exportRequests.removeAll(); exportSources.removeAll(); exporting = false; exportReservedBytes = 0
|
||||
session = UUID(); token = ""; projectID = nil; active = false; model = nil; pendingModel = nil
|
||||
callContextApproved = false; playtestMediaApproved = false
|
||||
callContextApproved = false; playtestMediaApproved = false; playtestMultiDriveApproved = false
|
||||
#if DEBUG
|
||||
regressionPlaytestHelper = nil; regressionStarterKit = nil
|
||||
#endif
|
||||
@@ -649,7 +692,7 @@ final class MCPCMOC: ObservableObject {
|
||||
await startupCleanup?.value
|
||||
await playtestCleanup?.value
|
||||
old?.stop(); grant?.remove()
|
||||
await work?.value; await guest?.value
|
||||
await work?.value; await guest?.value; await exportTask?.value
|
||||
if let dir { try? FileManager.default.removeItem(at: dir) }
|
||||
}
|
||||
}
|
||||
@@ -698,7 +741,7 @@ final class MCPCMOC: ObservableObject {
|
||||
if let latestRefreshID, let record = refreshRecords[latestRefreshID] { fields["refresh"] = projectRefreshFields(record) }
|
||||
result = fields
|
||||
case "get_capabilities" where args.isEmpty:
|
||||
result = ["tools": Self.tools + (callContextApproved ? ["get_call_context"] : []) + (playtestMediaApproved ? ["list_playtest_media", "exchange_playtest_media"] : []) + (playtestsApproved ? ["list_playtest_disks", "start_playtest", "playtest_input", "get_playtest_input", "playtest_debug", "capture_playtest", "capture_playtest_graphics", "capture_playtest_audio", "start_playtest_video", "stop_playtest_video", "read_playtest_video", "restart_playtest", "stop_playtest"] : []), "playtest_media_exchange": playtestMediaApproved, "playtest_media_drive": "FD0", "playtest_media_maximum_disks": 9, "playtest_media_maximum_disk_bytes": 512 * 1024, "call_context": callContextApproved, "call_context_maximum_stack_bytes": 64, "input_diagnostics": true, "playtest_joystick_input": playtestsApproved, "playtest_joystick_interfaces": playtestsApproved ? ["standard"] : [], "playtest_joystick_axis_min": 0, "playtest_joystick_axis_max": 16383, "playtest_joystick_axis_center": 8191, "owned_playtests": playtestsApproved, "async_playtest_start": playtestsApproved, "retained_playtest_disks": playtestsApproved, "period_key": playtestsApproved, "graphics_buffer_capture": playtestsApproved, "custom_gime_canvases": playtestsApproved, "source_only_debugging": playtestsApproved, "verified_flat_debugging": playtestsApproved, "video_capture": playtestsApproved, "video_capture_maximum_fields": 3600, "video_capture_maximum_clips": 4, "video_capture_maximum_bytes": 64 * 1024 * 1024, "video_capture_retained_maximum_bytes": 256 * 1024 * 1024, "video_capture_chunk_maximum_bytes": 65536, "video_capture_guest_only": true, "video_capture_optional_audio": true, "video_capture_ui_cues": false, "audio_capture": playtestsApproved, "audio_capture_maximum_fields": 120, "audio_capture_maximum_clips": 16, "audio_capture_maximum_bytes": 4 * 1024 * 1024, "build_diagnostics": true, "project_refresh": true, "input_status": refreshProblem ?? "approved", "changed_input_paths": Array(observedInputChanges.prefix(128)).map(\.path), "changed_input_paths_total": observedInputChanges.count, "changed_input_paths_truncated": observedInputChanges.count > 128, "kind": "cmoc", "app": "VCC Plus OSS",
|
||||
result = ["tools": Self.tools + (buildExporter != nil ? ["export_build_outputs", "get_build_export"] : []) + (callContextApproved ? ["get_call_context"] : []) + (playtestMediaApproved ? ["list_playtest_media", "exchange_playtest_media"] : []) + (playtestsApproved ? ["list_playtest_disks", "start_playtest", "playtest_input", "get_playtest_input", "playtest_debug", "capture_playtest", "capture_playtest_graphics", "capture_playtest_audio", "start_playtest_video", "stop_playtest_video", "read_playtest_video", "restart_playtest", "stop_playtest"] : []), "build_output_export": buildExporter != nil, "export_destinations": buildExporter.map { [["destination_id": $0.destinationID, "kind": "approved_folder"]] } ?? [], "export_maximum_files": MCPBuildExporter.maximumFiles, "export_maximum_file_bytes": CMOCProject.maximumFileBytes, "export_maximum_set_bytes": MCPBuildExporter.maximumSetBytes, "export_maximum_session_bytes": MCPBuildExporter.maximumSessionBytes, "export_maximum_requests": MCPBuildExporter.maximumRequests, "playtest_media_exchange": playtestMediaApproved, "playtest_media_drive": "FD0", "playtest_media_drives": playtestMultiDriveApproved ? [0, 1, 2, 3] : [0], "playtest_media_version": playtestMultiDriveApproved ? 2 : 1, "playtest_media_write_protection": playtestMultiDriveApproved, "playtest_media_maximum_disks": 9, "playtest_media_maximum_disk_bytes": 512 * 1024, "call_context": callContextApproved, "call_context_maximum_stack_bytes": 64, "input_diagnostics": true, "playtest_joystick_input": playtestsApproved, "playtest_joystick_interfaces": playtestsApproved ? ["standard"] : [], "playtest_joystick_axis_min": 0, "playtest_joystick_axis_max": 16383, "playtest_joystick_axis_center": 8191, "owned_playtests": playtestsApproved, "async_playtest_start": playtestsApproved, "retained_playtest_disks": playtestsApproved, "period_key": playtestsApproved, "graphics_buffer_capture": playtestsApproved, "custom_gime_canvases": playtestsApproved, "source_only_debugging": playtestsApproved, "verified_flat_debugging": playtestsApproved, "video_capture": playtestsApproved, "video_capture_maximum_fields": 3600, "video_capture_maximum_clips": 4, "video_capture_maximum_bytes": 64 * 1024 * 1024, "video_capture_retained_maximum_bytes": 256 * 1024 * 1024, "video_capture_chunk_maximum_bytes": 65536, "video_capture_guest_only": true, "video_capture_optional_audio": true, "video_capture_ui_cues": false, "audio_capture": playtestsApproved, "audio_capture_maximum_fields": 120, "audio_capture_maximum_clips": 16, "audio_capture_maximum_bytes": 4 * 1024 * 1024, "build_diagnostics": true, "project_refresh": true, "input_status": refreshProblem ?? "approved", "changed_input_paths": Array(observedInputChanges.prefix(128)).map(\.path), "changed_input_paths_total": observedInputChanges.count, "changed_input_paths_truncated": observedInputChanges.count > 128, "kind": "cmoc", "app": "VCC Plus OSS",
|
||||
"mutation_request_limit": MCPPlaytest.mutationRequestLimit, "stop_retention_exempt": true,
|
||||
"playtest_processors": playtestsApproved ? ["MC6809", "HD6309"] : [],
|
||||
"playtest_default_processor": "MC6809", "playtest_processor_selection": playtestsApproved,
|
||||
@@ -722,6 +765,12 @@ final class MCPCMOC: ObservableObject {
|
||||
facts["run_requirement"] = playtestsApproved ? "Owned playtests may cold-boot a copy of the current artifact disk or a selected retained test disk in an isolated 512 KB MC6809 or HD6309 worker. MC6809 is the default; the guest controls HD6309 execution mode. Debug evidence stays bound to the current artifact and is checked against runtime bytes." : "Start in VCC Plus; source debugging requires a verified map matching the delivered binary."
|
||||
return pack(["result": facts])
|
||||
}
|
||||
case "export_build_outputs":
|
||||
result = try await exportBuildOutputs(args, projectID: id, owner: owner)
|
||||
case "get_build_export":
|
||||
guard args.count == 2, args["project_id"] as? String == id, buildExporter != nil,
|
||||
let exportID = args["export_id"] as? String, let record = exportRecords[exportID] else { throw problem("unknown_export") }
|
||||
result = record.fields
|
||||
case "get_machine_status" where args.isEmpty:
|
||||
let observed = await model.machine.mcpReadinessSnapshot()
|
||||
let tools = CMOCBuildService.requiredExecutables + ["mcpp"] +
|
||||
@@ -1098,6 +1147,7 @@ final class MCPCMOC: ObservableObject {
|
||||
var origin = "verified_artifact"
|
||||
var originArtifactID: String? = artifact.id.uuidString
|
||||
var originArtifactDiskSHA256: String? = expectedDisk
|
||||
var selectedWriteProtected: Bool?
|
||||
if let retainedID, let retainedSHA {
|
||||
start.updatePhase("reading_retained_disk")
|
||||
let saved = try await MCPPlaytestDiskStore.load(directory: storage.directory, id: retainedID,
|
||||
@@ -1105,12 +1155,13 @@ final class MCPCMOC: ObservableObject {
|
||||
selectedDisk = saved.data; origin = saved.record.provenance.origin
|
||||
originArtifactID = saved.record.provenance.originArtifactID
|
||||
originArtifactDiskSHA256 = saved.record.provenance.originArtifactDiskSHA256
|
||||
selectedWriteProtected = saved.record.provenance.writeProtected
|
||||
}
|
||||
guard current() else { throw problem("stale_run") }
|
||||
let provenance = MCPPlaytestDiskStore.Provenance(projectKey: storage.key, artifactID: artifact.id.uuidString,
|
||||
artifactDiskSHA256: expectedDisk, parentDiskID: retainedID, origin: origin,
|
||||
originArtifactID: originArtifactID, originArtifactDiskSHA256: originArtifactDiskSHA256,
|
||||
mediaKey: playtestMediaApproved ? "primary" : nil, mediaBaseSHA256: playtestMediaApproved ? expectedDisk : nil)
|
||||
mediaKey: playtestMediaApproved ? "primary" : nil, mediaBaseSHA256: playtestMediaApproved ? expectedDisk : nil, writeProtected: selectedWriteProtected)
|
||||
var media: [MCPPlaytestMedium]?
|
||||
if playtestMediaApproved {
|
||||
var selected = try await artifactMedia(artifact, projectKey: storage.key, primaryData: payload.2)
|
||||
@@ -1128,7 +1179,7 @@ final class MCPCMOC: ObservableObject {
|
||||
let origin = MCPPlaytestDiskStore.Provenance(projectKey: storage.key, artifactID: artifact.id.uuidString,
|
||||
artifactDiskSHA256: expectedDisk, parentDiskID: diskID, origin: prior.origin,
|
||||
originArtifactID: prior.originArtifactID, originArtifactDiskSHA256: prior.originArtifactDiskSHA256,
|
||||
mediaKey: item.key, mediaBaseSHA256: item.baseSHA256)
|
||||
mediaKey: item.key, mediaBaseSHA256: item.baseSHA256, writeProtected: prior.writeProtected)
|
||||
selected[index] = MCPPlaytestMedium(id: item.id, name: item.name, key: item.key,
|
||||
baseSHA256: item.baseSHA256, data: copy.data, provenance: origin)
|
||||
}
|
||||
@@ -1151,7 +1202,7 @@ final class MCPCMOC: ObservableObject {
|
||||
bootCommands: scope.configuration.launchCommands.joined(separator: "\n") + "\n",
|
||||
projectID: projectID!.uuidString, revision: revision, artifactID: artifact.id.uuidString, modules: modules, stopAt: stop, stopModule: stopModule, flatGuards: flatGuards, cpu: processor.workerCPU, helperURL: helperURL,
|
||||
retentionDirectory: storage.directory, diskProvenance: provenance, resumedDiskID: retainedID,
|
||||
graphicsBuffers: graphicsBuffers, runID: start.runID, media: media)
|
||||
graphicsBuffers: graphicsBuffers, runID: start.runID, media: media, multiDrive: playtestMultiDriveApproved)
|
||||
guard current() else { await owned.invalidate().value; throw problem("stale_run") }
|
||||
playtest = owned
|
||||
start.updatePhase("capturing_initial_state")
|
||||
@@ -1387,6 +1438,63 @@ final class MCPCMOC: ObservableObject {
|
||||
return Int(exactly: n)
|
||||
}
|
||||
|
||||
private func exportBuildOutputs(_ arguments: [String: Any], projectID: String, owner: UUID) async throws -> [String: Any] {
|
||||
guard arguments.count == 7, Set(arguments.keys) == ["project_id", "build_id", "artifact_id", "revision", "destination_id", "output_ids", "request_id"],
|
||||
arguments["project_id"] as? String == projectID, let exporter = buildExporter,
|
||||
arguments["destination_id"] as? String == exporter.destinationID,
|
||||
let buildID = arguments["build_id"] as? String, builds[buildID]?["status"] as? String == "succeeded", let source = exportSources[buildID],
|
||||
arguments["artifact_id"] as? String == source.source.artifactID.uuidString,
|
||||
int(arguments["revision"]) == source.revision,
|
||||
let outputs = arguments["output_ids"] as? [String], !outputs.isEmpty,
|
||||
outputs.count <= MCPBuildExporter.maximumFiles, Set(outputs).count == outputs.count,
|
||||
outputs.allSatisfy({ $0.utf8.count == 64 && $0.utf8.allSatisfy { (48...57).contains($0) || (97...102).contains($0) } }),
|
||||
let request = arguments["request_id"] as? String, (1...128).contains(request.utf8.count) else { throw problem("invalid_export_selection") }
|
||||
let catalog = Dictionary(uniqueKeysWithValues: source.source.products.map { ($0.identifier(artifactID: source.source.artifactID), $0) })
|
||||
let selected = try outputs.sorted().map { id -> CMOCBuildOutputProduct in
|
||||
guard let product = catalog[id] else { throw problem("undeclared_export_output") }; return product
|
||||
}
|
||||
let identityData = try JSONSerialization.data(withJSONObject: ["build_id": buildID, "artifact_id": source.source.artifactID.uuidString,
|
||||
"revision": source.revision, "destination_id": exporter.destinationID, "outputs": outputs.sorted()], options: [.sortedKeys])
|
||||
let identity = CMOCProject.sha256(identityData)
|
||||
if let exportID = exportRequests[request], let record = exportRecords[exportID] {
|
||||
guard record.identity == identity else { throw problem("request_id_conflict") }
|
||||
if let delivery = record.delivery {
|
||||
guard !exporting else { throw problem("export_busy_or_limit") }
|
||||
exporting = true
|
||||
defer { if session == owner { exporting = false } }
|
||||
let work = Task.detached { try exporter.verify(delivery) }
|
||||
try await withTaskCancellationHandler(operation: { try await work.value }, onCancel: { work.cancel() })
|
||||
guard session == owner, active, buildExporter === exporter else { throw problem("access_denied") }
|
||||
}
|
||||
return record.fields
|
||||
}
|
||||
let count = selected.reduce(0) { $0 + $1.byteCount }
|
||||
guard !exporting, exportRecords.count < MCPBuildExporter.maximumRequests,
|
||||
count <= MCPBuildExporter.maximumSetBytes,
|
||||
exportReservedBytes <= MCPBuildExporter.maximumSessionBytes - count else { throw problem("export_busy_or_limit") }
|
||||
let exportID = UUID().uuidString
|
||||
let name = "VCC-" + source.source.artifactID.uuidString + "-" + String(CMOCProject.sha256(Data(request.utf8)).prefix(16))
|
||||
let record = ExportRecord(identity: identity, base: ["project_id": projectID, "build_id": buildID,
|
||||
"artifact_id": source.source.artifactID.uuidString, "revision": source.revision, "configuration": source.configuration,
|
||||
"destination_id": exporter.destinationID, "request_id": request, "export_id": exportID, "poll_tool": "get_build_export"])
|
||||
exportRequests[request] = exportID; exportRecords[exportID] = record
|
||||
exportReservedBytes += count; exporting = true
|
||||
exportWork = Task {
|
||||
let work = Task.detached { try exporter.export(source: source.source, products: selected, setName: name) }
|
||||
do {
|
||||
let delivery = try await withTaskCancellationHandler(operation: { try await work.value }, onCancel: { work.cancel() })
|
||||
guard active, session == owner, buildExporter === exporter else { return }
|
||||
exportRecords[exportID]?.delivery = delivery; exportRecords[exportID]?.status = "completed"
|
||||
} catch {
|
||||
guard active, session == owner, buildExporter === exporter else { return }
|
||||
exportRecords[exportID]?.status = error is CancellationError ? "cancelled" : "failed"
|
||||
exportRecords[exportID]?.reason = sanitized(error.localizedDescription)
|
||||
}
|
||||
if session == owner { exporting = false; exportWork = nil }
|
||||
}
|
||||
return record.fields
|
||||
}
|
||||
|
||||
private func buildRecord(_ id: String) -> [String: Any]? {
|
||||
guard var record = builds[id] else { return nil }
|
||||
if record["revision"] as? Int != revision || refreshProblem != nil { record["status"] = "stale" }
|
||||
@@ -1445,6 +1553,12 @@ final class MCPCMOC: ObservableObject {
|
||||
}.value
|
||||
guard session == owner, revision == expected, refreshProblem == nil, readyArtifact?.value.id == artifact.id else { throw problem("stale_revision") }
|
||||
result["source_debugging"] = evidence
|
||||
result["exportable_outputs"] = artifact.exportProducts.map { $0.fields(artifactID: artifact.id) }
|
||||
if buildExporter != nil {
|
||||
let source = try await Task.detached { try MCPBuildExporter.Source(artifact) }.value
|
||||
guard session == owner, active else { throw problem("access_denied") }
|
||||
exportSources[id] = (expected, artifact.configurationName, source)
|
||||
}
|
||||
result["playtest_disk_products"] = artifact.playtestDiskProducts.map {
|
||||
["media_id": MCPPlaytestMedium.identifier(artifactID: artifact.id.uuidString, key: "disk:" + $0.relativePath),
|
||||
"path": $0.relativePath, "bytes": $0.byteCount, "sha256": $0.sha256] as [String: Any]
|
||||
@@ -1712,11 +1826,31 @@ final class MCPCMOC: ObservableObject {
|
||||
view: MCPCMOCConsent(host: self, model: model))
|
||||
consentPanel = w; consentModel = model; w.makeKeyAndOrderFront(nil)
|
||||
}
|
||||
fileprivate func chooseExportDirectory(_ model: CMOCDevelopmentModel) {
|
||||
guard let owner = consentPanel, consentModel === model, !active, owner.isVisible, owner.attachedSheet == nil else { return }
|
||||
let project = model.assistantProjectID, generation = session
|
||||
let picker = NSOpenPanel(); picker.canChooseDirectories = true; picker.canChooseFiles = false
|
||||
picker.allowsMultipleSelection = false; picker.canCreateDirectories = true
|
||||
picker.title = "Choose Build Delivery Folder"; picker.prompt = "Approve Folder"
|
||||
picker.message = "Allow this connection to create new build-delivery sets here. Existing files are never replaced."
|
||||
picker.beginSheetModal(for: owner) { [weak self, weak owner, weak model] response in
|
||||
Task { @MainActor in
|
||||
guard let self, let owner, let model, self.consentPanel === owner, self.consentModel === model,
|
||||
owner.isVisible, !self.active, self.session == generation, model.assistantProjectID == project,
|
||||
response == .OK, let url = picker.url else { return }
|
||||
do {
|
||||
_ = try await Task.detached { try MCPBuildExporter(destination: url) }.value
|
||||
guard self.session == generation, !self.active, self.consentModel === model else { return }
|
||||
self.selectedExportDirectory = url; self.exportFolderName = url.lastPathComponent
|
||||
} catch { self.status = "Could not approve that delivery folder. " + error.localizedDescription }
|
||||
}
|
||||
}
|
||||
}
|
||||
fileprivate func exportGrant(_ model: CMOCDevelopmentModel) {
|
||||
guard let owner = consentPanel, consentModel === model, owner.isVisible,
|
||||
!owner.isMiniaturized, owner.attachedSheet == nil else { return }
|
||||
let project = model.assistantProjectID, generation = session
|
||||
let approvedMake = allowProjectMakefile, approvedPlaytests = allowPlaytests
|
||||
let approvedMake = allowProjectMakefile, approvedPlaytests = allowPlaytests, approvedExport = allowBuildExport, approvedFolder = selectedExportDirectory
|
||||
let picker = NSSavePanel(); picker.title = "Share C Project for Reviewed Changes"
|
||||
picker.message = "Choose a new private connection file for the local assistant."
|
||||
picker.nameFieldStringValue = "VCC Plus OSS C Connection.json"
|
||||
@@ -1726,7 +1860,8 @@ final class MCPCMOC: ObservableObject {
|
||||
@MainActor func currentPresentation() -> Bool {
|
||||
self.consentPanel === owner && self.consentModel === model && owner.isVisible &&
|
||||
!owner.isMiniaturized && model.assistantProjectID == project &&
|
||||
self.allowProjectMakefile == approvedMake && self.allowPlaytests == approvedPlaytests
|
||||
self.allowProjectMakefile == approvedMake && self.allowPlaytests == approvedPlaytests &&
|
||||
self.allowBuildExport == approvedExport && self.selectedExportDirectory == approvedFolder
|
||||
}
|
||||
guard currentPresentation(), self.session == generation else { return }
|
||||
defer { if currentPresentation() { owner.makeKeyAndOrderFront(nil) } }
|
||||
@@ -1872,11 +2007,22 @@ private struct MCPCMOCConsent: View {
|
||||
if !host.active {
|
||||
Toggle("Allow Disposable Playtests", isOn: $host.allowPlaytests)
|
||||
if host.allowPlaytests {
|
||||
Text("Allow the assistant to launch this project's built disk or resume a retained test disk in a separate 512 KB 6809 or 6309 CoCo, hold key combinations and standard joystick axes and buttons, read input diagnostics, capture its screen, declared graphics buffers and guest audio, record bounded MP4 gameplay clips with optional CoCo audio, inspect verified program stops and shared data, read up to 64 bytes at the paused test guest’s stack pointer with caller and argument interpretations only when verified, and restart its own writable test disks. Reviewed additional disk products can be inserted or ejected in the paused, idle test drive without a reset or advancing time; each private writable copy is retained. The guest controls 6309 execution mode. Audio capture advances the test guest. Mac windows, microphone and capture feedback cues are excluded. Retained originals and your current CoCo and media are preserved. Access ends when this connection or build changes.").font(.callout)
|
||||
Text("Allow the assistant to launch this project's built disk or resume a retained test disk in a separate 512 KB 6809 or 6309 CoCo, hold key combinations and standard joystick axes and buttons, read input diagnostics, capture its screen, declared graphics buffers and guest audio, record bounded MP4 gameplay clips with optional CoCo audio, inspect verified program stops and shared data, read up to 64 bytes at the paused test guest’s stack pointer with caller and argument interpretations only when verified, and restart its own writable test disks. Reviewed additional disk products can be inserted or ejected in any of four paused test drives while the shared controller is idle without a reset or advancing time; each private writable copy is retained. The guest controls 6309 execution mode. Audio capture advances the test guest. Mac windows, microphone and capture feedback cues are excluded. Retained originals and your current CoCo and media are preserved. Access ends when this connection or build changes.").font(.callout)
|
||||
}
|
||||
if host.allowPlaytests, let media = model.project?.configuration.playtestDisks, !media.isEmpty {
|
||||
Text("Additional playtest disks: " + media.joined(separator: ", ")).font(.callout).textSelection(.enabled)
|
||||
}
|
||||
Toggle("Allow Build Output Export", isOn: $host.allowBuildExport)
|
||||
if host.allowBuildExport {
|
||||
Text("Allow delivery of this connection's declared build products to one folder you approve. Each delivery creates a new set with verified original hashes; existing files are never replaced. Older successful builds remain selectable until access is revoked.").font(.callout)
|
||||
HStack {
|
||||
Button("Choose Delivery Folder…") { host.chooseExportDirectory(model) }
|
||||
Text(host.exportFolderName ?? "No delivery folder selected").font(.callout)
|
||||
}
|
||||
if let paths = model.project?.configuration.exportOutputs, !paths.isEmpty {
|
||||
Text("Additional delivery outputs: " + paths.joined(separator: ", ")).font(.callout).textSelection(.enabled)
|
||||
}
|
||||
}
|
||||
Toggle("Use Project Makefile", isOn: $host.allowProjectMakefile)
|
||||
if host.allowProjectMakefile {
|
||||
Text("Allow builds using this project's existing Makefile and declared configurations. Make recipes and compiler inputs can execute local commands, just as Build does. Recipe or support-file changes require native review through project refresh.").font(.callout)
|
||||
@@ -1892,7 +2038,8 @@ private struct MCPCMOCConsent: View {
|
||||
}
|
||||
Text("The assistant's model provider may receive the shared files and diagnostics.").font(.callout)
|
||||
if host.active {
|
||||
if host.playtestsApproved { Text("Disposable playtests and bounded read-only call context are enabled for this connection. Each test uses a separate CoCo and its own disk copies. Paused-drive media exchange is available for this connection's reviewed disk products.").font(.callout) }
|
||||
if host.buildExporter != nil { Text("Build output export is enabled for the approved delivery folder. Revoke access to end this permission.").font(.callout) }
|
||||
if host.playtestsApproved { Text("Disposable playtests and bounded read-only call context are enabled for this connection. Each test uses a separate CoCo and its own disk copies. Drive-targeted FD0–FD3 media exchange and insert-time write protection are available for this connection's reviewed disk products.").font(.callout) }
|
||||
if let url = host.grantURL {
|
||||
MCPChatGPTSetup(grantURL: url, firstPrompt: "Identify my shared VCC Plus C project and read its entry source. Describe its target and what the CoCo program does.")
|
||||
}
|
||||
@@ -1903,7 +2050,7 @@ private struct MCPCMOCConsent: View {
|
||||
Button("Run C Build…") { Task { await host.run(selectedRun) } }.disabled(selectedRun == nil || host.running || host.building)
|
||||
}
|
||||
}
|
||||
} else { Button("Save Private Connection…") { host.exportGrant(model) } }
|
||||
} else { Button("Save Private Connection…") { host.exportGrant(model) }.disabled(host.allowBuildExport && host.exportFolderName == nil) }
|
||||
if !host.runStatus.isEmpty { Text(host.runStatus).font(.callout).textSelection(.enabled) }
|
||||
Text(host.status).font(.callout).textSelection(.enabled)
|
||||
}.padding(18).frame(maxWidth: .infinity, alignment: .leading)
|
||||
|
||||
@@ -59,15 +59,23 @@ struct MCPPlaytestDiskStore: Sendable {
|
||||
let originArtifactDiskSHA256: String?
|
||||
let mediaKey: String?
|
||||
let mediaBaseSHA256: String?
|
||||
let writeProtected: Bool?
|
||||
|
||||
init(projectKey: String?, artifactID: String?, artifactDiskSHA256: String?, parentDiskID: String? = nil,
|
||||
origin: String = "verified_artifact", originArtifactID: String? = nil, originArtifactDiskSHA256: String? = nil,
|
||||
mediaKey: String? = nil, mediaBaseSHA256: String? = nil) {
|
||||
mediaKey: String? = nil, mediaBaseSHA256: String? = nil, writeProtected: Bool? = nil) {
|
||||
self.projectKey = projectKey; self.artifactID = artifactID; self.artifactDiskSHA256 = artifactDiskSHA256
|
||||
self.parentDiskID = parentDiskID; self.origin = origin
|
||||
self.originArtifactID = originArtifactID ?? (origin == "verified_artifact" ? artifactID : nil)
|
||||
self.originArtifactDiskSHA256 = originArtifactDiskSHA256 ?? (origin == "verified_artifact" ? artifactDiskSHA256 : nil)
|
||||
self.mediaKey = mediaKey; self.mediaBaseSHA256 = mediaBaseSHA256
|
||||
self.mediaKey = mediaKey; self.mediaBaseSHA256 = mediaBaseSHA256; self.writeProtected = writeProtected
|
||||
}
|
||||
|
||||
func protecting(_ enabled: Bool) -> Self {
|
||||
Self(projectKey: projectKey, artifactID: artifactID, artifactDiskSHA256: artifactDiskSHA256,
|
||||
parentDiskID: parentDiskID, origin: origin, originArtifactID: originArtifactID,
|
||||
originArtifactDiskSHA256: originArtifactDiskSHA256, mediaKey: mediaKey,
|
||||
mediaBaseSHA256: mediaBaseSHA256, writeProtected: enabled)
|
||||
}
|
||||
|
||||
var publicFields: [String: Any] {
|
||||
@@ -76,6 +84,8 @@ struct MCPPlaytestDiskStore: Sendable {
|
||||
"origin_artifact_id": originArtifactID as Any? ?? NSNull(),
|
||||
"origin_artifact_disk_sha256": originArtifactDiskSHA256 as Any? ?? NSNull()]
|
||||
if let parentDiskID { fields["parent_disk_id"] = parentDiskID }
|
||||
fields["write_protected"] = writeProtected ?? false
|
||||
fields["write_protection_recorded"] = writeProtected != nil
|
||||
fields["media_key"] = mediaKey ?? "primary"
|
||||
fields["media_base_sha256"] = (mediaBaseSHA256 ?? artifactDiskSHA256) as Any? ?? NSNull()
|
||||
return fields
|
||||
@@ -485,11 +495,19 @@ final class MCPPlaytest {
|
||||
let source: MCPPlaytestMedium
|
||||
var data: Data
|
||||
var dirty = false
|
||||
var writeProtected = false
|
||||
var retained: MCPPlaytestDiskStore.Record?
|
||||
var pendingRecordID: String?
|
||||
}
|
||||
private var media: [String: MediumState]?
|
||||
private var mediaOrder: [String] = []
|
||||
private let multiDrive: Bool
|
||||
private var mountedMediaIDs: [String?] = Array(repeating: nil, count: 4)
|
||||
private var pendingMediaDrive: Int?
|
||||
private var lastSafeMediaExports: [Int: [String: Any]] = [:]
|
||||
private var frozenDriveExports = Set<Int>()
|
||||
private var mediaFreezeAcknowledged = false
|
||||
private var mediaStopDrained = false
|
||||
private var mountedMediaID: String?
|
||||
private var mediaExchangeTask: Task<[String: Any], Error>?
|
||||
private var mediaFailures: [String: (Data, String)] = [:]
|
||||
@@ -499,16 +517,17 @@ final class MCPPlaytest {
|
||||
|
||||
private init(worker: Worker, projectID: String, revision: Int, artifactID: String, retentionDirectory: URL,
|
||||
diskProvenance: MCPPlaytestDiskStore.Provenance, resumedDiskID: String?, runID: String,
|
||||
processor: MCPPlaytestProcessor, media: [MCPPlaytestMedium]?,
|
||||
processor: MCPPlaytestProcessor, media: [MCPPlaytestMedium]?, multiDrive: Bool,
|
||||
videoArtifactWillVerify: (@Sendable (URL) throws -> Void)?) {
|
||||
self.runID = runID
|
||||
self.worker = worker; self.projectID = projectID; self.revision = revision; self.artifactID = artifactID
|
||||
self.retentionDirectory = retentionDirectory; self.diskProvenance = diskProvenance; self.resumedDiskID = resumedDiskID
|
||||
self.processor = processor
|
||||
self.processor = processor; self.multiDrive = multiDrive
|
||||
self.videoArtifactWillVerify = videoArtifactWillVerify
|
||||
if let media {
|
||||
self.media = Dictionary(uniqueKeysWithValues: media.map { ($0.id, MediumState(source: $0, data: $0.data)) })
|
||||
self.media = Dictionary(uniqueKeysWithValues: media.map { ($0.id, MediumState(source: $0, data: $0.data, writeProtected: $0.provenance.writeProtected ?? false)) })
|
||||
self.mediaOrder = media.map(\.id); self.mountedMediaID = media.first?.id
|
||||
self.mountedMediaIDs[0] = media.first?.id
|
||||
}
|
||||
}
|
||||
|
||||
@@ -517,7 +536,7 @@ final class MCPPlaytest {
|
||||
modules: [[String: Any]] = [], stopAt: UInt16? = nil, stopModule: String? = nil, flatGuards: [[String: Any]] = [], cpu: String = "6809", helperURL: URL? = nil, retentionDirectory: URL? = nil,
|
||||
diskProvenance: MCPPlaytestDiskStore.Provenance? = nil, resumedDiskID: String? = nil,
|
||||
graphicsBuffers: [[String: Any]] = [], runID: String = UUID().uuidString,
|
||||
media: [MCPPlaytestMedium]? = nil,
|
||||
media: [MCPPlaytestMedium]? = nil, multiDrive: Bool = false,
|
||||
videoArtifactWillVerify: (@Sendable (URL) throws -> Void)? = nil) async throws -> MCPPlaytest {
|
||||
guard let reservedID = UUID(uuidString: runID) else { throw failure("invalid_playtest_run_id") }
|
||||
guard systemROM.count == 32768, diskROM.count == 8192, !disk.isEmpty, disk.count <= 512 * 1024,
|
||||
@@ -561,12 +580,18 @@ final class MCPPlaytest {
|
||||
let test = MCPPlaytest(worker: worker, projectID: projectID, revision: revision, artifactID: artifactID,
|
||||
retentionDirectory: retentionDirectory ?? AppIdentity.supportDirectory.appendingPathComponent("Development Runs/Assistant Playtests"),
|
||||
diskProvenance: provenance, resumedDiskID: resumedDiskID.map { UUID(uuidString: $0)!.uuidString }, runID: reservedID.uuidString,
|
||||
processor: cpu == "6309" ? .hd6309 : .mc6809, media: media, videoArtifactWillVerify: videoArtifactWillVerify)
|
||||
processor: cpu == "6309" ? .hd6309 : .mc6809, media: media, multiDrive: multiDrive, videoArtifactWillVerify: videoArtifactWillVerify)
|
||||
var setup: [String: Any] = ["op": "init", "system_rom": systemROM.base64EncodedString(),
|
||||
"disk_rom": diskROM.base64EncodedString(), "disk": disk.base64EncodedString(),
|
||||
"boot_keys": paste.chords.map { NSNumber(value: $0) }, "modules": modules, "cpu": cpu,
|
||||
"graphics_buffers": graphicsBuffers, "flat_guards": flatGuards]
|
||||
if let media { setup["media_id"] = media[0].id }
|
||||
if let protection = provenance.writeProtected { setup["write_protected"] = protection }
|
||||
if multiDrive {
|
||||
guard media != nil else { await test.invalidate().value; throw failure("invalid_playtest_media") }
|
||||
setup["multi_drive"] = true
|
||||
setup["write_protected"] = media?.first?.provenance.writeProtected ?? false
|
||||
}
|
||||
if let stopAt {
|
||||
guard (modules.isEmpty && !flatGuards.isEmpty && stopModule == nil) ||
|
||||
(!modules.isEmpty && flatGuards.isEmpty && stopModule != nil) else {
|
||||
@@ -665,7 +690,237 @@ final class MCPPlaytest {
|
||||
}
|
||||
}
|
||||
|
||||
private func driveRow(_ status: [String: Any], drive: Int) throws -> [String: Any] {
|
||||
guard let rows = status["drives"] as? [[String: Any]], rows.count == 4,
|
||||
rows.enumerated().allSatisfy({ index, row in
|
||||
guard let number = row["drive"] as? NSNumber, CFGetTypeID(number) != CFBooleanGetTypeID() else { return false }
|
||||
return number.doubleValue == Double(index)
|
||||
}) else { throw Self.failure("invalid_playtest_media_reply") }
|
||||
return rows[drive]
|
||||
}
|
||||
|
||||
private func multiMediaFields(status: [String: Any]) -> [String: Any] {
|
||||
var fields = status
|
||||
let workerRows = status["drives"] as? [[String: Any]] ?? []
|
||||
fields["media_contract_version"] = 2
|
||||
fields["drive"] = "FD0" // Existing top-level compatibility field.
|
||||
fields["drives"] = (0..<4).map { drive -> [String: Any] in
|
||||
var row = workerRows.count == 4 ? workerRows[drive] : ["drive": drive, "label": "FD\(drive)", "unavailable": true]
|
||||
if let id = row["media_id"] as? String, let item = media?[id] {
|
||||
row["base_sha256"] = item.source.baseSHA256
|
||||
row["media_sha256"] = row["disk_sha256"]
|
||||
row["media_key"] = item.source.key
|
||||
row["name"] = item.source.name
|
||||
row["provenance"] = item.source.provenance.protecting(row["write_protected"] as? Bool ?? item.writeProtected).publicFields
|
||||
row["modified_from_artifact"] = row["disk_sha256"] as? String != item.source.baseSHA256
|
||||
let retained = item.retained
|
||||
row["retained"] = retained?.diskSHA256 == row["disk_sha256"] as? String && retained?.provenance.writeProtected == row["write_protected"] as? Bool
|
||||
if let retained { row["retained_disk"] = retained.publicFields }
|
||||
}
|
||||
return row
|
||||
}
|
||||
fields["media"] = mediaOrder.compactMap { id -> [String: Any]? in
|
||||
guard let item = media?[id] else { return nil }
|
||||
let mounted = workerRows.first { $0["media_id"] as? String == id && $0["disk_present"] as? Bool == true }
|
||||
let hash = mounted?["disk_sha256"] as? String ?? CMOCProject.sha256(item.data)
|
||||
let protection = mounted?["write_protected"] as? Bool ?? item.writeProtected
|
||||
var row: [String: Any] = ["media_id": id, "name": item.source.name, "media_key": item.source.key,
|
||||
"base_sha256": item.source.baseSHA256, "media_sha256": hash, "byte_count": item.data.count,
|
||||
"inserted": mounted != nil, "drive": mounted?["drive"] as Any? ?? NSNull(),
|
||||
"dirty": mounted?["disk_dirty"] as? Bool ?? item.dirty, "write_protected": protection,
|
||||
"provenance": item.source.provenance.protecting(protection).publicFields,
|
||||
"modified_from_artifact": hash != item.source.baseSHA256,
|
||||
"retained": item.retained?.diskSHA256 == hash && item.retained?.provenance.writeProtected == protection]
|
||||
if let retained = item.retained { row["retained_disk"] = retained.publicFields }
|
||||
if let parent = item.source.provenance.parentDiskID { row["resumed_from_disk_id"] = parent }
|
||||
if status["media_selection_uncertain"] as? Bool == true { row["placement_uncertain"] = true }
|
||||
return row
|
||||
}
|
||||
return fields
|
||||
}
|
||||
|
||||
/// One bounded worker message contains one drive's bytes plus a coherent
|
||||
/// four-drive metadata observation. Never concatenate four disk payloads.
|
||||
private func receiveMultiMediaExport(_ status: [String: Any], drive: Int) throws {
|
||||
let row = try driveRow(status, drive: drive)
|
||||
guard let exported = status["exported_drive"] as? [String: Any], NSDictionary(dictionary: exported).isEqual(to: row),
|
||||
let present = row["disk_present"] as? Bool, let hash = row["disk_sha256"] as? String,
|
||||
let protection = row["write_protected"] as? Bool else { throw Self.failure("invalid_playtest_media_reply") }
|
||||
let id = row["media_id"] as? String
|
||||
let pendingMatches = mediaCommitPending && pendingMediaDrive == drive && id == pendingMediaSelection
|
||||
guard id == mountedMediaIDs[drive] || pendingMatches else { throw Self.failure("invalid_playtest_media_reply") }
|
||||
if !present {
|
||||
guard id == nil, hash.isEmpty, status["disk_base64"] == nil,
|
||||
(row["byte_count"] as? NSNumber)?.intValue == 0 else { throw Self.failure("invalid_playtest_media_reply") }
|
||||
mountedMediaIDs[drive] = nil
|
||||
} else {
|
||||
guard let id, var item = media?[id], let encoded = status["disk_base64"] as? String,
|
||||
let bytes = Data(base64Encoded: encoded), !bytes.isEmpty, bytes.count <= 512 * 1024,
|
||||
bytes.count == (row["byte_count"] as? NSNumber)?.intValue,
|
||||
CMOCProject.sha256(bytes) == hash else { throw Self.failure("invalid_playtest_media_reply") }
|
||||
if item.data != bytes || item.writeProtected != protection { item.pendingRecordID = nil }
|
||||
item.data = bytes; item.dirty = row["disk_dirty"] as? Bool ?? false; item.writeProtected = protection
|
||||
media?[id] = item; mountedMediaIDs[drive] = id
|
||||
}
|
||||
mountedMediaID = mountedMediaIDs[0]
|
||||
}
|
||||
|
||||
private func exchangeMultiMedia(_ selected: String?, expectedSHA: String?, drive: Int,
|
||||
writeProtected: Bool?, isCurrent: (() -> Bool)?) async throws -> [String: Any] {
|
||||
guard valid, isCurrent?() != false else { throw Self.failure("stale_run") }
|
||||
if let selected {
|
||||
guard media?[selected] != nil else { throw Self.failure("invalid_playtest_media_selection") }
|
||||
guard !mountedMediaIDs.enumerated().contains(where: { $0.offset != drive && $0.element == selected }) else {
|
||||
throw Self.failure("playtest_media_already_inserted")
|
||||
}
|
||||
}
|
||||
var frozen: [Int: [String: Any]] = [:]
|
||||
for index in 0..<4 {
|
||||
let snapshot = try await worker.request(["op": "export_media", "drive": index])
|
||||
try receiveMultiMediaExport(snapshot, drive: index)
|
||||
if let first = frozen[0] {
|
||||
for key in ["field_clock", "cycles", "generation", "boot", "pc"] {
|
||||
guard let a = first[key] as? NSNumber, let b = snapshot[key] as? NSNumber, a == b else {
|
||||
throw WorkerTransportFailure(reason: "playtest_media_advanced_guest")
|
||||
}
|
||||
}
|
||||
}
|
||||
frozen[index] = snapshot
|
||||
}
|
||||
guard let before = frozen[drive] else { throw Self.failure("invalid_playtest_media_reply") }
|
||||
let oldRow = try driveRow(before, drive: drive), expectedOldID = mountedMediaIDs[drive]
|
||||
guard valid, isCurrent?() != false, let generation = oldRow["media_generation"] as? NSNumber,
|
||||
let oldHash = oldRow["disk_sha256"] as? String else { throw Self.failure("stale_playtest_media") }
|
||||
if let selected, let item = media?[selected], expectedSHA != CMOCProject.sha256(item.data) {
|
||||
throw Self.failure("playtest_media_hash_mismatch")
|
||||
}
|
||||
var old: [String: Any] = ["media_id": expectedOldID as Any? ?? NSNull(), "media_sha256": oldHash,
|
||||
"drive": drive, "dirty": oldRow["disk_dirty"] as? Bool ?? false, "retained": false,
|
||||
"write_protected": oldRow["write_protected"] as? Bool ?? false]
|
||||
if let expectedOldID {
|
||||
let retained = try await retainMedium(expectedOldID)
|
||||
old["retained"] = true; old["retained_disk"] = retained.publicFields
|
||||
}
|
||||
guard valid, isCurrent?() != false, mountedMediaIDs[drive] == expectedOldID else { throw Self.failure("stale_run") }
|
||||
var request: [String: Any] = ["op": "exchange_media", "drive": drive,
|
||||
"expected_media_generation": generation, "expected_disk_sha256": oldHash]
|
||||
if let selected, let item = media?[selected] {
|
||||
request["media_id"] = selected; request["disk_base64"] = item.data.base64EncodedString()
|
||||
request["write_protected"] = writeProtected ?? item.writeProtected
|
||||
}
|
||||
lastSafeMediaExports = frozen
|
||||
mediaCommitPending = true; pendingMediaDrive = drive; pendingMediaSelection = selected
|
||||
let after: [String: Any]
|
||||
do { after = try await worker.request(request) }
|
||||
catch let error as WorkerRejection { mediaCommitPending = false; pendingMediaDrive = nil; pendingMediaSelection = nil; throw error }
|
||||
// Acknowledged commit is authoritative even if the grant expires now.
|
||||
mountedMediaIDs[drive] = selected; mountedMediaID = mountedMediaIDs[0]
|
||||
mediaCommitPending = false; pendingMediaDrive = nil; pendingMediaSelection = nil
|
||||
let next = try driveRow(after, drive: drive)
|
||||
let selectedSHA = selected.flatMap { media?[$0] }.map { CMOCProject.sha256($0.data) } ?? ""
|
||||
guard next["disk_sha256"] as? String == selectedSHA, next["media_id"] as? String == selected,
|
||||
next["disk_present"] as? Bool == (selected != nil),
|
||||
(next["media_generation"] as? NSNumber)?.intValue == generation.intValue + 1,
|
||||
after["previous_disk_sha256"] as? String == oldHash else { throw WorkerTransportFailure(reason: "invalid_playtest_media_reply") }
|
||||
if let selected, var item = media?[selected], let effective = next["write_protected"] as? Bool {
|
||||
if effective != item.writeProtected { item.pendingRecordID = nil }
|
||||
item.writeProtected = effective; media?[selected] = item
|
||||
}
|
||||
for index in 0..<4 where index != drive {
|
||||
guard NSDictionary(dictionary: try driveRow(before, drive: index)).isEqual(to: try driveRow(after, drive: index)) else {
|
||||
throw WorkerTransportFailure(reason: "playtest_unrelated_drive_changed")
|
||||
}
|
||||
}
|
||||
for key in ["field_clock", "cycles", "generation", "boot", "pc"] {
|
||||
guard let a = before[key] as? NSNumber, let b = after[key] as? NSNumber, a == b else { throw WorkerTransportFailure(reason: "playtest_media_advanced_guest") }
|
||||
}
|
||||
var result = mediaFields(status: after)
|
||||
result["target_drive"] = drive; result["previous_media"] = old
|
||||
result["exchange"] = selected == nil ? "ejected" : "inserted"
|
||||
result["guest_advanced"] = false; result["guest_reset"] = false
|
||||
return result
|
||||
}
|
||||
|
||||
private func performMultiMediaPersistence() async throws -> [String: Any] {
|
||||
if let pending = mediaExchangeTask { _ = await pending.result }
|
||||
if finished, let finalReceipt { return finalReceipt }
|
||||
if !mediaFreezeAcknowledged {
|
||||
do {
|
||||
var result = try await worker.request(["op": "stop"])
|
||||
guard result["media_frozen"] as? Bool == true else { throw Self.failure("invalid_playtest_media_reply") }
|
||||
_ = try driveRow(result, drive: 0)
|
||||
mediaFreezeAcknowledged = true; exportedStatus = result
|
||||
guard let primary = mediaOrder.first, let bytes = media?[primary]?.data else { throw Self.failure("invalid_playtest_media") }
|
||||
exportedDisk = bytes // Retry marker, not a claim that all drives were drained.
|
||||
do { try await retainVideoMetadata(result) }
|
||||
catch { result["video_retention_error"] = "The video artifact could not be verified; disk retention continues."; exportedStatus = result }
|
||||
} catch let error as WorkerTransportFailure {
|
||||
// Only a fully observed paused four-drive export can recover a
|
||||
// lost exchange reply. It is never substituted after execution.
|
||||
guard lastSafeMediaExports.count == 4, let before = lastSafeMediaExports[0] else { throw error }
|
||||
var result = before
|
||||
result.removeValue(forKey: "disk_base64"); result.removeValue(forKey: "exported_drive")
|
||||
result["media_selection_uncertain"] = true
|
||||
result["uncertain_drives"] = pendingMediaDrive.map { [$0] } ?? Array(0..<4)
|
||||
if var rows = result["drives"] as? [[String: Any]] {
|
||||
for index in (pendingMediaDrive.map { [$0] } ?? Array(0..<4)) {
|
||||
rows[index]["media_id"] = NSNull(); rows[index]["disk_present"] = NSNull()
|
||||
rows[index]["inserted"] = NSNull(); rows[index]["selection_uncertain"] = true
|
||||
rows[index]["disk_sha256"] = NSNull(); rows[index]["media_generation"] = NSNull()
|
||||
mountedMediaIDs[index] = nil
|
||||
}
|
||||
result["drives"] = rows
|
||||
if pendingMediaDrive == nil || pendingMediaDrive == 0 {
|
||||
result["media_id"] = NSNull(); result["disk_present"] = NSNull(); result["disk_sha256"] = NSNull()
|
||||
}
|
||||
}
|
||||
mountedMediaID = mountedMediaIDs[0]
|
||||
exportedStatus = result; mediaFreezeAcknowledged = true; mediaStopDrained = true
|
||||
frozenDriveExports = Set(0..<4)
|
||||
exportedDisk = mediaOrder.first.flatMap { media?[$0]?.data }
|
||||
}
|
||||
}
|
||||
do {
|
||||
for drive in 0..<4 where !frozenDriveExports.contains(drive) {
|
||||
let result = try await worker.request(["op": "export_media", "drive": drive])
|
||||
try receiveMultiMediaExport(result, drive: drive)
|
||||
// Each reply must match the STOP observation, with no execution
|
||||
// or selection change while bounded exports are drained.
|
||||
guard let frozen = exportedStatus,
|
||||
NSDictionary(dictionary: try driveRow(frozen, drive: drive)).isEqual(to: try driveRow(result, drive: drive)) else {
|
||||
throw Self.failure("playtest_frozen_media_changed")
|
||||
}
|
||||
frozenDriveExports.insert(drive)
|
||||
}
|
||||
if !mediaStopDrained {
|
||||
do { _ = try await worker.request(["op": "finish_stop"]) }
|
||||
catch is WorkerTransportFailure { /* Every mounted disk was already drained and verified. */ }
|
||||
mediaStopDrained = true
|
||||
}
|
||||
var retained: [[String: Any]] = []
|
||||
for id in mediaOrder {
|
||||
let record = try await retainMedium(id)
|
||||
var fields = record.publicFields; fields["media_id"] = id; fields["name"] = media?[id]?.source.name
|
||||
retained.append(fields)
|
||||
}
|
||||
guard let primary = mediaOrder.first, let record = media?[primary]?.retained else { throw Self.failure("playtest_disk_export_failed") }
|
||||
retainedDiskRecord = record; retainedDiskURL = try MCPPlaytestDiskStore.diskURL(directory: retentionDirectory, id: record.id)
|
||||
var result = mediaFields(status: exportedStatus ?? [:])
|
||||
result["disk_retained"] = true; result["retained_disk_id"] = record.id
|
||||
result["retained_disk_sha256"] = record.diskSHA256; result["retained_disk"] = record.publicFields
|
||||
result["retained_media"] = retained; result["status"] = "stopped"
|
||||
finished = true; retentionError = nil; worker.close()
|
||||
let receipt = scoped(result); finalReceipt = receipt
|
||||
exportedDisk = nil; exportedStatus = nil; Self.pendingRetentions.removeValue(forKey: runID)
|
||||
return receipt
|
||||
} catch {
|
||||
retentionError = error.localizedDescription; Self.pendingRetentions[runID] = self
|
||||
throw error
|
||||
}
|
||||
}
|
||||
|
||||
private func mediaFields(status: [String: Any]) -> [String: Any] {
|
||||
if multiDrive { return multiMediaFields(status: status) }
|
||||
var fields = status
|
||||
let actualID = status["media_id"] == nil ? mountedMediaID : status["media_id"] as? String
|
||||
let present = status["disk_present"] as? Bool ?? (mountedMediaID != nil)
|
||||
@@ -689,6 +944,7 @@ final class MCPPlaytest {
|
||||
/// Only called with a bounded, complete export from the app-owned helper.
|
||||
/// Keep these bytes even if the lease was revoked while the pipe was read.
|
||||
private func receiveMediaExport(_ status: [String: Any]) throws {
|
||||
if multiDrive { try receiveMultiMediaExport(status, drive: 0); return }
|
||||
guard media != nil, let present = status["disk_present"] as? Bool else { throw Self.failure("invalid_playtest_media_reply") }
|
||||
if !present {
|
||||
guard (mountedMediaID == nil || (mediaCommitPending && pendingMediaSelection == nil)),
|
||||
@@ -713,11 +969,22 @@ final class MCPPlaytest {
|
||||
private func retainMedium(_ id: String) async throws -> MCPPlaytestDiskStore.Record {
|
||||
guard var item = media?[id] else { throw Self.failure("invalid_playtest_media_selection") }
|
||||
let hash = CMOCProject.sha256(item.data)
|
||||
if let existing = item.retained, existing.diskSHA256 == hash { return existing }
|
||||
if let existing = item.retained, existing.diskSHA256 == hash,
|
||||
!multiDrive || existing.provenance.writeProtected == item.writeProtected {
|
||||
guard let projectKey = existing.provenance.projectKey,
|
||||
let artifactHash = existing.provenance.artifactDiskSHA256 else { throw Self.failure("invalid_playtest_disk_provenance") }
|
||||
let loaded = try await MCPPlaytestDiskStore.load(directory: retentionDirectory, id: existing.id,
|
||||
expectedSHA256: hash, projectKey: projectKey, artifactDiskSHA256: artifactHash,
|
||||
mediaKey: existing.provenance.mediaKey ?? "primary", mediaBaseSHA256: existing.provenance.mediaBaseSHA256)
|
||||
guard loaded.record.id == existing.id, loaded.record.runID == existing.runID,
|
||||
loaded.record.provenance == existing.provenance, loaded.record.diskSHA256 == existing.diskSHA256,
|
||||
loaded.record.byteCount == existing.byteCount, loaded.data == item.data else { throw Self.failure("retained_disk_changed") }
|
||||
return existing
|
||||
}
|
||||
let recordID = item.pendingRecordID ?? UUID().uuidString
|
||||
item.pendingRecordID = recordID; media?[id] = item
|
||||
let stored = try await MCPPlaytestDiskStore.save(directory: retentionDirectory, runID: runID,
|
||||
data: item.data, provenance: item.source.provenance, recordID: recordID)
|
||||
data: item.data, provenance: multiDrive ? item.source.provenance.protecting(item.writeProtected) : item.source.provenance, recordID: recordID)
|
||||
// The paused worker and serialized owner cannot change this medium
|
||||
// during the off-main-thread durable write.
|
||||
guard var current = media?[id], current.data == item.data else { throw Self.failure("playtest_media_changed") }
|
||||
@@ -725,7 +992,9 @@ final class MCPPlaytest {
|
||||
return stored
|
||||
}
|
||||
|
||||
private func exchangeMedia(_ selected: String?, expectedSHA: String?, isCurrent: (() -> Bool)?) async throws -> [String: Any] {
|
||||
private func exchangeMedia(_ selected: String?, expectedSHA: String?, isCurrent: (() -> Bool)?,
|
||||
drive: Int = 0, writeProtected: Bool? = nil) async throws -> [String: Any] {
|
||||
if multiDrive { return try await exchangeMultiMedia(selected, expectedSHA: expectedSHA, drive: drive, writeProtected: writeProtected, isCurrent: isCurrent) }
|
||||
guard valid, isCurrent?() != false else { throw Self.failure("stale_run") }
|
||||
let before = try await worker.request(["op": "export_media"])
|
||||
let expectedOldID = mountedMediaID
|
||||
@@ -751,6 +1020,7 @@ final class MCPPlaytest {
|
||||
"expected_disk_sha256": oldHash]
|
||||
if let selected, let item = media?[selected] {
|
||||
request["media_id"] = selected; request["disk_base64"] = item.data.base64EncodedString()
|
||||
if let protection = item.source.provenance.writeProtected { request["write_protected"] = protection }
|
||||
}
|
||||
lastSafeMediaExport = before
|
||||
mediaCommitPending = true; pendingMediaSelection = selected
|
||||
@@ -781,6 +1051,7 @@ final class MCPPlaytest {
|
||||
}
|
||||
|
||||
private func performMediaPersistence() async throws -> [String: Any] {
|
||||
if multiDrive { return try await performMultiMediaPersistence() }
|
||||
if let pending = mediaExchangeTask { _ = await pending.result }
|
||||
if finished, let finalReceipt { return finalReceipt }
|
||||
if exportedDisk == nil {
|
||||
@@ -835,6 +1106,8 @@ final class MCPPlaytest {
|
||||
/// The host rechecks project/revision/artifact identity before dispatching.
|
||||
/// Cached write receipts are still bound to this live lease, never replayed.
|
||||
func reply(_ tool: String, arguments: [String: Any], isCurrent: (() -> Bool)? = nil) async throws -> [String: Any] {
|
||||
var arguments = arguments
|
||||
if tool == "exchange_playtest_media", multiDrive, arguments["drive"] == nil { arguments["drive"] = 0 }
|
||||
guard valid, arguments["run_id"] as? String == runID else { throw Self.failure("stale_run") }
|
||||
guard !busy else { throw Self.failure("playtest_busy") }
|
||||
busy = true
|
||||
@@ -903,10 +1176,22 @@ final class MCPPlaytest {
|
||||
}
|
||||
if tool == "exchange_playtest_media" {
|
||||
guard media != nil, let action = arguments["action"] as? String,
|
||||
["insert", "eject"].contains(action),
|
||||
Set(arguments.keys) == (action == "insert" ? ["run_id", "request_id", "action", "media_id", "media_sha256"] : ["run_id", "request_id", "action"]) else {
|
||||
throw Self.failure("invalid_arguments")
|
||||
}
|
||||
["insert", "eject"].contains(action) else { throw Self.failure("invalid_arguments") }
|
||||
var required: Set<String> = action == "insert" ? ["run_id", "request_id", "action", "media_id", "media_sha256"] : ["run_id", "request_id", "action"]
|
||||
if multiDrive { required.insert("drive") }
|
||||
let optional: Set<String> = multiDrive && action == "insert" ? ["write_protected"] : []
|
||||
guard required.isSubset(of: Set(arguments.keys)), Set(arguments.keys).isSubset(of: required.union(optional)) else { throw Self.failure("invalid_arguments") }
|
||||
let drive: Int
|
||||
if multiDrive {
|
||||
guard let value = arguments["drive"] as? NSNumber, CFGetTypeID(value) != CFBooleanGetTypeID(),
|
||||
value.doubleValue.isFinite, value.doubleValue == Double(value.intValue), (0...3).contains(value.intValue) else { throw Self.failure("invalid_arguments") }
|
||||
drive = value.intValue
|
||||
} else { drive = 0 }
|
||||
let protection: Bool?
|
||||
if let value = arguments["write_protected"] {
|
||||
guard let number = value as? NSNumber, CFGetTypeID(number) == CFBooleanGetTypeID() else { throw Self.failure("invalid_arguments") }
|
||||
protection = number.boolValue
|
||||
} else { protection = nil }
|
||||
let selected: String?
|
||||
if action == "insert" {
|
||||
guard let id = arguments["media_id"] as? String, media?[id] != nil,
|
||||
@@ -918,7 +1203,7 @@ final class MCPPlaytest {
|
||||
} else { selected = nil }
|
||||
mutationRequestsAccepted += 1
|
||||
accepted[requestID] = (signature, scoped(["request_id": requestID, "status": "interrupted"]))
|
||||
let exchange = Task { try await self.exchangeMedia(selected, expectedSHA: arguments["media_sha256"] as? String, isCurrent: isCurrent) }
|
||||
let exchange = Task { try await self.exchangeMedia(selected, expectedSHA: arguments["media_sha256"] as? String, isCurrent: isCurrent, drive: drive, writeProtected: protection) }
|
||||
mediaExchangeTask = exchange
|
||||
defer { mediaExchangeTask = nil }
|
||||
var result: [String: Any]
|
||||
@@ -1045,7 +1330,7 @@ final class MCPPlaytest {
|
||||
}
|
||||
}
|
||||
do {
|
||||
lastSafeMediaExport = nil
|
||||
lastSafeMediaExport = nil; lastSafeMediaExports.removeAll()
|
||||
var result = try await worker.request(request)
|
||||
guard valid else { throw Self.failure("stale_run") }
|
||||
try await retainVideoMetadata(result)
|
||||
@@ -1089,7 +1374,7 @@ final class MCPPlaytest {
|
||||
guard !busy else { throw Self.failure("playtest_busy") }
|
||||
busy = true
|
||||
defer { busy = false }
|
||||
if let operation = request["op"] as? String, ["continue", "step", "stop_at"].contains(operation) { lastSafeMediaExport = nil }
|
||||
if let operation = request["op"] as? String, ["continue", "step", "stop_at"].contains(operation) { lastSafeMediaExport = nil; lastSafeMediaExports.removeAll() }
|
||||
let result = try await worker.request(request)
|
||||
guard valid else { throw Self.failure("stale_run") }
|
||||
try await retainVideoMetadata(result)
|
||||
@@ -1097,7 +1382,7 @@ final class MCPPlaytest {
|
||||
}
|
||||
|
||||
private func scoped(_ result: [String: Any]) -> [String: Any] {
|
||||
var result = result
|
||||
var result = multiDrive && media != nil ? mediaFields(status: result) : result
|
||||
result["run_id"] = runID; result["project_id"] = projectID
|
||||
result["revision"] = revision; result["artifact_id"] = artifactID
|
||||
result["requested_processor"] = processor.rawValue
|
||||
@@ -1122,7 +1407,8 @@ final class MCPPlaytest {
|
||||
result["boot_disk_provenance"] = diskProvenance.publicFields
|
||||
if let id = mountedMediaID, let current = media?[id] {
|
||||
result["disk_origin"] = current.source.provenance.origin
|
||||
result["disk_provenance"] = current.source.provenance.publicFields
|
||||
let currentProtection = (result["drives"] as? [[String: Any]])?.first?["write_protected"] as? Bool ?? current.writeProtected
|
||||
result["disk_provenance"] = multiDrive ? current.source.provenance.protecting(currentProtection).publicFields : current.source.provenance.publicFields
|
||||
} else {
|
||||
result["disk_origin"] = NSNull(); result["disk_provenance"] = NSNull()
|
||||
}
|
||||
|
||||
@@ -1227,7 +1227,8 @@ final class MachineModel: ObservableObject {
|
||||
}
|
||||
|
||||
func loadBASICSource(_ source: String, run: Bool, breakpoints: Set<Int> = [],
|
||||
review: (expected: VCCMachineSnapshot, existing: String)? = nil) async -> VCCMachineSnapshot? {
|
||||
review: (expected: VCCMachineSnapshot, existing: String)? = nil,
|
||||
reviewIsCurrent: (() -> Bool)? = nil) async -> VCCMachineSnapshot? {
|
||||
guard !busy, !diskSaving, state != .closed else {
|
||||
fileError = "The machine is busy. Try the BASIC transfer again when it is ready."
|
||||
return nil
|
||||
@@ -1235,6 +1236,14 @@ final class MachineModel: ObservableObject {
|
||||
busy = true; inputEpoch += 1; fileError = nil
|
||||
defer { busy = false }
|
||||
let points = breakpoints.sorted().map { NSNumber(value: $0) }
|
||||
let retryDeadline = ContinuousClock.now.advanced(by: .seconds(2))
|
||||
while true {
|
||||
if review != nil {
|
||||
guard reviewIsCurrent?() != false, !Task.isCancelled else {
|
||||
fileError = Task.isCancelled ? "The BASIC transfer was cancelled." : "The approved revision or connection changed."
|
||||
return nil
|
||||
}
|
||||
}
|
||||
let result = await diskStep { completion in
|
||||
if let review {
|
||||
controller.assistantLoad(source: source, breakpoints: points, expected: review.expected, existing: review.existing, completion: completion)
|
||||
@@ -1242,11 +1251,25 @@ final class MachineModel: ObservableObject {
|
||||
controller.basicLoadSource(source, run: run, breakpoints: points, completion: completion)
|
||||
}
|
||||
}
|
||||
if let error = result.errorMessage { fileError = error; return nil }
|
||||
if let error = result.errorMessage {
|
||||
// A running ROM can leave its input loop between readiness and
|
||||
// loading. This exact core refusal precedes every mutation;
|
||||
// each retry rechecks the same reviewed machine/source/media.
|
||||
guard review != nil, reviewIsCurrent != nil,
|
||||
error == "Wait at the BASIC OK prompt before loading or running from the editor; use BREAK to stop the current program first",
|
||||
ContinuousClock.now.advanced(by: .milliseconds(45)) < retryDeadline else {
|
||||
fileError = error; return nil
|
||||
}
|
||||
do { try await Task.sleep(for: .milliseconds(45)) }
|
||||
catch { fileError = "The BASIC transfer was cancelled."; return nil }
|
||||
guard ContinuousClock.now < retryDeadline else { fileError = error; return nil }
|
||||
continue // Approval and cancellation are rechecked after the wait.
|
||||
}
|
||||
binaryName = nil
|
||||
if run { focusRequest += 1 }
|
||||
return result
|
||||
}
|
||||
}
|
||||
func configureBASICBreakpoints(_ lines: Set<Int>, source: String) async -> Bool {
|
||||
guard !busy, !diskSaving, state != .closed else { return false }
|
||||
busy = true; defer { busy = false }
|
||||
|
||||
@@ -16,8 +16,8 @@ final class AssemblyBuildServiceTests: XCTestCase {
|
||||
override func setUpWithError() throws {
|
||||
root = FileManager.default.temporaryDirectory.appendingPathComponent("Assembly tests " + UUID().uuidString)
|
||||
try FileManager.default.createDirectory(at: root, withIntermediateDirectories: true)
|
||||
runtime = URL(fileURLWithPath: #filePath).deletingLastPathComponent().deletingLastPathComponent()
|
||||
.appendingPathComponent("LocalResources/ToolchainBundle")
|
||||
runtime = vccQualificationToolchain(URL(fileURLWithPath: #filePath).deletingLastPathComponent().deletingLastPathComponent()
|
||||
.appendingPathComponent("LocalResources/ToolchainBundle"))
|
||||
try XCTSkipUnless(FileManager.default.isExecutableFile(atPath: runtime.appendingPathComponent("bin/lwasm").path),
|
||||
"Stage the bundled LWTools runtime for assembly workflow tests.")
|
||||
}
|
||||
|
||||
@@ -1,9 +1,15 @@
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
import XCTest
|
||||
import AppKit
|
||||
|
||||
/// The interpreter is the tokenizer oracle. Optional private ROMs never enter Git.
|
||||
@MainActor
|
||||
final class BASICBridgeTests: XCTestCase {
|
||||
override func setUp() async throws {
|
||||
try await super.setUp()
|
||||
await MainActor.run { _ = NSApplication.shared }
|
||||
}
|
||||
|
||||
private func command(_ body: (@escaping @Sendable (VCCMachineSnapshot) -> Void) -> Void) async -> VCCMachineSnapshot {
|
||||
await withCheckedContinuation { continuation in body { continuation.resume(returning: $0) } }
|
||||
}
|
||||
@@ -184,7 +190,121 @@ final class BASICBridgeTests: XCTestCase {
|
||||
}
|
||||
}
|
||||
|
||||
func testReviewedBASICLoadRetriesOnlyPromptRefusalAndPreservesReviewAuthority() async throws {
|
||||
_ = NSApplication.shared
|
||||
let mac = URL(fileURLWithPath: #filePath).deletingLastPathComponent().deletingLastPathComponent()
|
||||
let roms = mac.appendingPathComponent("LocalResources/ROMs")
|
||||
for file in ["coco3.rom", "disk11.rom"] {
|
||||
try XCTSkipUnless(FileManager.default.fileExists(atPath: roms.appendingPathComponent(file).path), "Stage private BASIC ROMs")
|
||||
}
|
||||
let suite = "ReviewedBASICRetry-" + UUID().uuidString
|
||||
let root = FileManager.default.temporaryDirectory.appendingPathComponent(suite)
|
||||
try FileManager.default.createDirectory(at: root, withIntermediateDirectories: true)
|
||||
let defaults = try XCTUnwrap(UserDefaults(suiteName: suite))
|
||||
defer { defaults.removePersistentDomain(forName: suite); try? FileManager.default.removeItem(at: root) }
|
||||
let controller = VCCMachineController()
|
||||
let machine = MachineModel(diskStore: .init(url: root.appendingPathComponent("drives.json")), controller: controller,
|
||||
displayDefaults: defaults, inputStore: .init(url: root.appendingPathComponent("input.json")))
|
||||
do {
|
||||
for _ in 0..<300 where machine.busy { try await Task.sleep(for: .milliseconds(20)) }
|
||||
for use6309 in [false, true] {
|
||||
try await MCPBASICRun.bootFixture(machine, romDirectory: roms, use6309: use6309)
|
||||
let emptySource = await machine.readBASICSource()
|
||||
let existing = try XCTUnwrap(emptySource)
|
||||
let initial = await machine.mcpMachineSnapshot()
|
||||
// Held Shift deterministically causes the exact read-only core
|
||||
// refusal. Release only when approval is checked after that
|
||||
// refused attempt and its retry wait, never before dispatch.
|
||||
controller.setKeyboardMask(CocoKeyboard.shift)
|
||||
var approvalChecks = 0
|
||||
let loaded = await machine.loadBASICSource("10 GOTO 10\n", run: true,
|
||||
review: (initial, existing), reviewIsCurrent: {
|
||||
approvalChecks += 1
|
||||
if approvalChecks == 2 { controller.setKeyboardMask(0) }
|
||||
return true
|
||||
})
|
||||
XCTAssertGreaterThanOrEqual(approvalChecks, 2)
|
||||
let started = try XCTUnwrap(loaded, machine.fileError ?? "Reviewed retry failed")
|
||||
XCTAssertEqual(started.generation, initial.generation)
|
||||
XCTAssertEqual(started.debuggerProgramRevision, initial.debuggerProgramRevision + 1,
|
||||
"Only the successful queue transaction may install the program")
|
||||
try await settle(controller)
|
||||
let source = await machine.readBASICSource()
|
||||
let runningSource = try XCTUnwrap(source)
|
||||
let expected = await machine.mcpMachineSnapshot()
|
||||
let original = try await programBytes(controller)
|
||||
let replacement = "10 PRINT 99\n"
|
||||
|
||||
var staleChecks = 0
|
||||
let stale = await machine.loadBASICSource(replacement, run: true, review: (initial, runningSource),
|
||||
reviewIsCurrent: { staleChecks += 1; return true })
|
||||
XCTAssertNil(stale); XCTAssertEqual(staleChecks, 1)
|
||||
XCTAssertEqual(machine.fileError, "The CoCo or its loaded program changed. Start a new reviewed run.")
|
||||
|
||||
var sourceChecks = 0
|
||||
let changedSource = await machine.loadBASICSource(replacement, run: true,
|
||||
review: (expected, runningSource + "20 REM NOT REVIEWED\n"),
|
||||
reviewIsCurrent: { sourceChecks += 1; return true })
|
||||
XCTAssertNil(changedSource); XCTAssertEqual(sourceChecks, 1)
|
||||
XCTAssertEqual(machine.fileError, "The program in BASIC memory changed. Review it before continuing.")
|
||||
|
||||
var revokedChecks = 0
|
||||
let revoked = await machine.loadBASICSource(replacement, run: true, review: (expected, runningSource),
|
||||
reviewIsCurrent: { revokedChecks += 1; return revokedChecks == 1 })
|
||||
XCTAssertNil(revoked); XCTAssertEqual(revokedChecks, 2)
|
||||
XCTAssertEqual(machine.fileError, "The approved revision or connection changed.")
|
||||
|
||||
var cancelledChecks = 0
|
||||
let cancelled = Task { @MainActor in
|
||||
await machine.loadBASICSource(replacement, run: true, review: (expected, runningSource),
|
||||
reviewIsCurrent: {
|
||||
cancelledChecks += 1
|
||||
if cancelledChecks == 2 { withUnsafeCurrentTask { $0?.cancel() } }
|
||||
return true
|
||||
})
|
||||
}
|
||||
let cancelledResult = await cancelled.value
|
||||
XCTAssertNil(cancelledResult); XCTAssertEqual(cancelledChecks, 2)
|
||||
XCTAssertEqual(machine.fileError, "The BASIC transfer was cancelled.")
|
||||
|
||||
var boundedChecks = 0
|
||||
let clock = ContinuousClock()
|
||||
let began = clock.now
|
||||
let bounded = await machine.loadBASICSource(replacement, run: true, review: (expected, runningSource),
|
||||
reviewIsCurrent: { boundedChecks += 1; return true })
|
||||
XCTAssertNil(bounded); XCTAssertGreaterThan(boundedChecks, 2)
|
||||
XCTAssertLessThan(clock.now - began, .seconds(3), "An executing program must not cause unbounded retry")
|
||||
XCTAssertEqual(machine.fileError, "Wait at the BASIC OK prompt before loading or running from the editor; use BREAK to stop the current program first")
|
||||
|
||||
controller.setKeyboardMask(CocoKeyboard.shift)
|
||||
let legacyBegan = clock.now
|
||||
let legacy = await machine.loadBASICSource(replacement, run: true, review: (expected, runningSource))
|
||||
controller.setKeyboardMask(0)
|
||||
XCTAssertNil(legacy)
|
||||
XCTAssertLessThan(clock.now - legacyBegan, .seconds(1), "A review tuple without live approval must remain a single attempt")
|
||||
XCTAssertEqual(machine.fileError, "Wait at the BASIC OK prompt before loading or running from the editor; use BREAK to stop the current program first")
|
||||
|
||||
var ordinaryChecks = 0
|
||||
let ordinary = await machine.loadBASICSource(replacement, run: true,
|
||||
reviewIsCurrent: { ordinaryChecks += 1; return true })
|
||||
XCTAssertNil(ordinary); XCTAssertEqual(ordinaryChecks, 0, "Ordinary loading remains a single unreviewed operation")
|
||||
let after = await machine.mcpMachineSnapshot()
|
||||
XCTAssertEqual(after.generation, expected.generation)
|
||||
XCTAssertEqual(after.debuggerProgramRevision, expected.debuggerProgramRevision)
|
||||
let preserved = try await programBytes(controller)
|
||||
XCTAssertEqual(preserved, original)
|
||||
XCTAssertEqual(after.disks.first?.name, expected.disks.first?.name)
|
||||
XCTAssertEqual(after.disks.first?.mounted, expected.disks.first?.mounted)
|
||||
}
|
||||
} catch {
|
||||
await withCheckedContinuation { done in machine.shutdown { done.resume() } }
|
||||
throw error
|
||||
}
|
||||
await withCheckedContinuation { done in machine.shutdown { done.resume() } }
|
||||
}
|
||||
|
||||
func testReviewedBASICRunChecksRealMenuColorsPromptAndStaleSource() async throws {
|
||||
_ = NSApplication.shared // This fixture also runs alone in Apple's hostless XCTest runner.
|
||||
let mac = URL(fileURLWithPath: #filePath).deletingLastPathComponent().deletingLastPathComponent()
|
||||
let roms = mac.appendingPathComponent("LocalResources/ROMs")
|
||||
for file in ["coco3.rom", "disk11.rom"] {
|
||||
@@ -310,7 +430,7 @@ final class BASICBridgeTests: XCTestCase {
|
||||
|
||||
func testPlanetEditorStartersAcceptKeyboardAndReturnToBASIC() async throws {
|
||||
let mac = URL(fileURLWithPath: #filePath).deletingLastPathComponent().deletingLastPathComponent()
|
||||
let tools = mac.appendingPathComponent("LocalResources/ToolchainBundle")
|
||||
let tools = vccQualificationToolchain(mac.appendingPathComponent("LocalResources/ToolchainBundle"))
|
||||
try XCTSkipUnless(FileManager.default.isExecutableFile(atPath: tools.appendingPathComponent("bin/lwasm").path))
|
||||
try XCTSkipUnless(FileManager.default.isExecutableFile(atPath: tools.appendingPathComponent("bin/cmoc").path))
|
||||
let root = FileManager.default.temporaryDirectory.appendingPathComponent(UUID().uuidString)
|
||||
@@ -377,7 +497,7 @@ final class BASICBridgeTests: XCTestCase {
|
||||
|
||||
func testExportedBootDisksRunByDOSAndByTheirManualCommands() async throws {
|
||||
let mac = URL(fileURLWithPath: #filePath).deletingLastPathComponent().deletingLastPathComponent()
|
||||
let tools = mac.appendingPathComponent("LocalResources/ToolchainBundle")
|
||||
let tools = vccQualificationToolchain(mac.appendingPathComponent("LocalResources/ToolchainBundle"))
|
||||
try XCTSkipUnless(FileManager.default.isExecutableFile(atPath: tools.appendingPathComponent("bin/cmoc").path))
|
||||
let service = AssemblyBuildService(toolchain: tools)
|
||||
let root = FileManager.default.temporaryDirectory.appendingPathComponent(UUID().uuidString)
|
||||
@@ -440,7 +560,7 @@ final class BASICBridgeTests: XCTestCase {
|
||||
|
||||
func testAssembledProgramRunsInAllBASICPresetsAndFromDiskBASICExport() async throws {
|
||||
let mac = URL(fileURLWithPath: #filePath).deletingLastPathComponent().deletingLastPathComponent()
|
||||
let tools = mac.appendingPathComponent("LocalResources/ToolchainBundle")
|
||||
let tools = vccQualificationToolchain(mac.appendingPathComponent("LocalResources/ToolchainBundle"))
|
||||
try XCTSkipUnless(FileManager.default.isExecutableFile(atPath: tools.appendingPathComponent("bin/lwasm").path),
|
||||
"Stage the local universal toolchain")
|
||||
let service = AssemblyBuildService(toolchain: tools)
|
||||
|
||||
@@ -3,6 +3,17 @@ import XCTest
|
||||
import AppKit
|
||||
import SwiftUI
|
||||
|
||||
/// Explicit test-only input keeps compiler qualification away from normal app staging.
|
||||
/// Xcode forwards TEST_RUNNER_VCC_TEST_TOOLCHAIN_DIR to this environment variable.
|
||||
func vccQualificationToolchain(_ fallback: URL) -> URL {
|
||||
guard let path = ProcessInfo.processInfo.environment["VCC_TEST_TOOLCHAIN_DIR"] else { return fallback }
|
||||
XCTAssertTrue(path.hasPrefix("/"), "Compiler qualification requires an absolute runtime path")
|
||||
let candidate = URL(fileURLWithPath: path, isDirectory: true)
|
||||
XCTAssertTrue(FileManager.default.isExecutableFile(atPath: candidate.appendingPathComponent("bin/cmoc").path),
|
||||
"Explicit compiler qualification input is unavailable; do not silently use another runtime")
|
||||
return candidate
|
||||
}
|
||||
|
||||
final class CMOCBuildServiceTests: XCTestCase {
|
||||
private var folder: URL!
|
||||
override func setUpWithError() throws {
|
||||
@@ -146,8 +157,8 @@ final class CMOCBuildServiceTests: XCTestCase {
|
||||
}
|
||||
|
||||
func testAssistantBuildsOrdinarySourcesWithOnlyItsOwnRecipe() async throws {
|
||||
let runtime = URL(fileURLWithPath: #filePath).deletingLastPathComponent().deletingLastPathComponent()
|
||||
.appendingPathComponent("LocalResources/ToolchainBundle")
|
||||
let runtime = vccQualificationToolchain(URL(fileURLWithPath: #filePath).deletingLastPathComponent().deletingLastPathComponent()
|
||||
.appendingPathComponent("LocalResources/ToolchainBundle"))
|
||||
guard FileManager.default.isExecutableFile(atPath: runtime.appendingPathComponent("bin/cmoc").path) else {
|
||||
throw XCTSkip("Stage the bundled CMOC tools")
|
||||
}
|
||||
@@ -609,7 +620,7 @@ final class CMOCBuildServiceTests: XCTestCase {
|
||||
}
|
||||
|
||||
func testRealBundledToolsExposeCompilerAssemblerLinkerAndMakeFailures() async throws {
|
||||
let runtime = URL(fileURLWithPath: #filePath).deletingLastPathComponent().deletingLastPathComponent().appendingPathComponent("LocalResources/ToolchainBundle")
|
||||
let runtime = vccQualificationToolchain(URL(fileURLWithPath: #filePath).deletingLastPathComponent().deletingLastPathComponent().appendingPathComponent("LocalResources/ToolchainBundle"))
|
||||
try XCTSkipUnless(CMOCBuildService.requiredExecutables.allSatisfy {
|
||||
FileManager.default.isExecutableFile(atPath: runtime.appendingPathComponent("bin/" + $0).path)
|
||||
}, "Stage the bundled CMOC/LWTools/Make runtime")
|
||||
@@ -1205,7 +1216,7 @@ final class CMOCBuildServiceTests: XCTestCase {
|
||||
|
||||
func testBundledLibrariesBuildUnmodifiedCoCoLettersMakefile() async throws {
|
||||
let repo = URL(fileURLWithPath: #filePath).deletingLastPathComponent().deletingLastPathComponent().deletingLastPathComponent().deletingLastPathComponent()
|
||||
let runtime = repo.appendingPathComponent("platforms/macos/LocalResources/ToolchainBundle")
|
||||
let runtime = vccQualificationToolchain(repo.appendingPathComponent("platforms/macos/LocalResources/ToolchainBundle"))
|
||||
try XCTSkipUnless(FileManager.default.fileExists(atPath: runtime.appendingPathComponent("share/cmoc/lib/libdskcon-standalone.a").path), "Stage the optional standalone disk library")
|
||||
let root = folder.appendingPathComponent("CoCo Letters")
|
||||
try FileManager.default.copyItem(at: repo.appendingPathComponent("third_party/examples/coco-letters"), to: root)
|
||||
@@ -1418,7 +1429,7 @@ final class CMOCBuildServiceTests: XCTestCase {
|
||||
XCTAssertEqual(artifact.sources["main.c"], Data(CMOCProject.starterSource.utf8))
|
||||
}
|
||||
func testGeneratedMakefileBuildsMultipleCFilesDependenciesResourcesAndDiskWithBundledTools() async throws {
|
||||
let runtime = URL(fileURLWithPath: #filePath).deletingLastPathComponent().deletingLastPathComponent().appendingPathComponent("LocalResources/ToolchainBundle")
|
||||
let runtime = vccQualificationToolchain(URL(fileURLWithPath: #filePath).deletingLastPathComponent().deletingLastPathComponent().appendingPathComponent("LocalResources/ToolchainBundle"))
|
||||
guard FileManager.default.isExecutableFile(atPath: runtime.appendingPathComponent("bin/perl").path) else { throw XCTSkip("Stage the complete bundled compiler and Perl runtime") }
|
||||
var generated = CMOCMakefileSettings()
|
||||
generated.sources = ["main.c", "src/game.c", "generated/data.c"]
|
||||
|
||||
@@ -18,7 +18,7 @@ final class CMOCCallStackIntegrationTests: XCTestCase {
|
||||
}
|
||||
private func fixture(optimized: Bool = false) async throws -> Fixture {
|
||||
let resources = URL(fileURLWithPath: #filePath).deletingLastPathComponent().deletingLastPathComponent().appendingPathComponent("LocalResources")
|
||||
let toolchain = resources.appendingPathComponent("ToolchainBundle")
|
||||
let toolchain = vccQualificationToolchain(resources.appendingPathComponent("ToolchainBundle"))
|
||||
let rom = resources.appendingPathComponent("ROMs/coco3.rom")
|
||||
try XCTSkipUnless(FileManager.default.isExecutableFile(atPath: toolchain.appendingPathComponent("bin/cmoc").path)
|
||||
&& FileManager.default.fileExists(atPath: rom.path), "Local licensed CoCo ROM and staged toolchain are required")
|
||||
|
||||
@@ -131,7 +131,7 @@ final class CMOCDevelopmentTests: XCTestCase {
|
||||
}
|
||||
@MainActor func testCompiledEditedProgramStopsAtVerifiedCLineOnBothCPUs() async throws {
|
||||
let resources = URL(fileURLWithPath: #filePath).deletingLastPathComponent().deletingLastPathComponent().appendingPathComponent("LocalResources")
|
||||
let toolchain = resources.appendingPathComponent("ToolchainBundle")
|
||||
let toolchain = vccQualificationToolchain(resources.appendingPathComponent("ToolchainBundle"))
|
||||
let romURL = resources.appendingPathComponent("ROMs/coco3.rom")
|
||||
try XCTSkipUnless(FileManager.default.isExecutableFile(atPath: toolchain.appendingPathComponent("bin/cmoc").path)
|
||||
&& FileManager.default.fileExists(atPath: romURL.path), "Local licensed CoCo ROM and staged toolchain are required")
|
||||
@@ -178,7 +178,7 @@ final class CMOCDevelopmentTests: XCTestCase {
|
||||
@MainActor private func checkDiskAPIRoundTrip(standalone: Bool) async throws {
|
||||
let mac = URL(fileURLWithPath: #filePath).deletingLastPathComponent().deletingLastPathComponent()
|
||||
let resources = mac.appendingPathComponent("LocalResources")
|
||||
let toolchain = resources.appendingPathComponent("ToolchainBundle")
|
||||
let toolchain = vccQualificationToolchain(resources.appendingPathComponent("ToolchainBundle"))
|
||||
let romURL = resources.appendingPathComponent("ROMs/coco3.rom")
|
||||
let diskROMURL = resources.appendingPathComponent("ROMs/disk11.rom")
|
||||
try XCTSkipUnless(FileManager.default.fileExists(atPath: toolchain.appendingPathComponent("share/cmoc/lib/libdecbfile.a").path)
|
||||
@@ -321,9 +321,9 @@ final class CMOCDevelopmentTests: XCTestCase {
|
||||
}
|
||||
@MainActor func testCallerSelectionPreservesExecutionAndResetsOnStepOrStaleSource() async throws {
|
||||
let mac = URL(fileURLWithPath: #filePath).deletingLastPathComponent().deletingLastPathComponent()
|
||||
let staged = mac.appendingPathComponent("LocalResources/ToolchainBundle")
|
||||
let staged = vccQualificationToolchain(mac.appendingPathComponent("LocalResources/ToolchainBundle"))
|
||||
let bundled = Bundle.main.resourceURL!.appendingPathComponent("Toolchain")
|
||||
let toolchain = FileManager.default.isExecutableFile(atPath: bundled.appendingPathComponent("bin/cmoc").path) ? bundled : staged
|
||||
let toolchain = vccQualificationToolchain(FileManager.default.isExecutableFile(atPath: bundled.appendingPathComponent("bin/cmoc").path) ? bundled : staged)
|
||||
let romURL = mac.appendingPathComponent("LocalResources/ROMs/coco3.rom")
|
||||
try XCTSkipUnless(FileManager.default.isExecutableFile(atPath: toolchain.appendingPathComponent("bin/cmoc").path)
|
||||
&& FileManager.default.fileExists(atPath: romURL.path), "Stage the local compiler and CoCo ROM")
|
||||
@@ -488,7 +488,7 @@ final class CMOCDevelopmentTests: XCTestCase {
|
||||
@MainActor func testDefaultHelloDiskLaunchRunsWithoutImplicitBreakpointAndHonorsExplicitStops() async throws {
|
||||
let mac = URL(fileURLWithPath: #filePath).deletingLastPathComponent().deletingLastPathComponent()
|
||||
let resources = mac.appendingPathComponent("LocalResources")
|
||||
let tools = resources.appendingPathComponent("ToolchainBundle")
|
||||
let tools = vccQualificationToolchain(resources.appendingPathComponent("ToolchainBundle"))
|
||||
let rom = resources.appendingPathComponent("ROMs/coco3.rom"), diskROM = resources.appendingPathComponent("ROMs/disk11.rom")
|
||||
try XCTSkipUnless(FileManager.default.isExecutableFile(atPath: tools.appendingPathComponent("bin/cmoc").path) &&
|
||||
FileManager.default.fileExists(atPath: rom.path) && FileManager.default.fileExists(atPath: diskROM.path), "Stage local tools and ROMs")
|
||||
@@ -599,9 +599,9 @@ final class CMOCDevelopmentTests: XCTestCase {
|
||||
|
||||
@MainActor func testRealBuildMappingBecomesStaleWhenEditorChanges() async throws {
|
||||
let bundled = Bundle.main.resourceURL!.appendingPathComponent("Toolchain")
|
||||
let staged = URL(fileURLWithPath: #filePath).deletingLastPathComponent().deletingLastPathComponent()
|
||||
.appendingPathComponent("LocalResources/ToolchainBundle")
|
||||
let toolchain = FileManager.default.isExecutableFile(atPath: bundled.appendingPathComponent("bin/cmoc").path) ? bundled : staged
|
||||
let staged = vccQualificationToolchain(URL(fileURLWithPath: #filePath).deletingLastPathComponent().deletingLastPathComponent()
|
||||
.appendingPathComponent("LocalResources/ToolchainBundle"))
|
||||
let toolchain = vccQualificationToolchain(FileManager.default.isExecutableFile(atPath: bundled.appendingPathComponent("bin/cmoc").path) ? bundled : staged)
|
||||
try XCTSkipUnless(FileManager.default.isExecutableFile(atPath: toolchain.appendingPathComponent("bin/cmoc").path),
|
||||
"This integration check requires the bundled development toolchain")
|
||||
let folder = FileManager.default.temporaryDirectory.appendingPathComponent("CMOCDevelopmentTests-\(UUID().uuidString)")
|
||||
|
||||
@@ -18,7 +18,7 @@ final class CMOCFloatingPointIntegrationTests: XCTestCase {
|
||||
}
|
||||
private func fixture() async throws -> Fixture {
|
||||
let resources = URL(fileURLWithPath: #filePath).deletingLastPathComponent().deletingLastPathComponent().appendingPathComponent("LocalResources")
|
||||
let toolchain = resources.appendingPathComponent("ToolchainBundle")
|
||||
let toolchain = vccQualificationToolchain(resources.appendingPathComponent("ToolchainBundle"))
|
||||
let rom = resources.appendingPathComponent("ROMs/coco3.rom")
|
||||
try XCTSkipUnless(FileManager.default.isExecutableFile(atPath: toolchain.appendingPathComponent("bin/cmoc").path)
|
||||
&& FileManager.default.fileExists(atPath: rom.path), "Local licensed CoCo ROM and staged toolchain are required")
|
||||
|
||||
@@ -191,7 +191,7 @@ final class CMOCNavigationTests: XCTestCase {
|
||||
}
|
||||
@MainActor func testReferenceNavigationKeepsSuccessfulBuildIdentity() async throws {
|
||||
let resources = URL(fileURLWithPath: #filePath).deletingLastPathComponent().deletingLastPathComponent().appendingPathComponent("LocalResources")
|
||||
let toolchain = resources.appendingPathComponent("ToolchainBundle")
|
||||
let toolchain = vccQualificationToolchain(resources.appendingPathComponent("ToolchainBundle"))
|
||||
try XCTSkipUnless(FileManager.default.isExecutableFile(atPath: toolchain.appendingPathComponent("bin/cmoc").path), "Staged toolchain required")
|
||||
let root = FileManager.default.temporaryDirectory.appendingPathComponent("CMOCNavigationBuild-" + UUID().uuidString)
|
||||
try FileManager.default.createDirectory(at: root, withIntermediateDirectories: true)
|
||||
|
||||
@@ -19,7 +19,7 @@ final class CMOCSourceDebugTests: XCTestCase {
|
||||
}
|
||||
private func fixture() async throws -> Fixture {
|
||||
let resources = URL(fileURLWithPath: #filePath).deletingLastPathComponent().deletingLastPathComponent().appendingPathComponent("LocalResources")
|
||||
let toolchain = resources.appendingPathComponent("ToolchainBundle")
|
||||
let toolchain = vccQualificationToolchain(resources.appendingPathComponent("ToolchainBundle"))
|
||||
let rom = resources.appendingPathComponent("ROMs/coco3.rom")
|
||||
try XCTSkipUnless(FileManager.default.isExecutableFile(atPath: toolchain.appendingPathComponent("bin/cmoc").path)
|
||||
&& FileManager.default.fileExists(atPath: rom.path), "Local licensed CoCo ROM and staged toolchain are required")
|
||||
|
||||
@@ -1046,7 +1046,7 @@ final class CMOCMultiFileExecutionTests: XCTestCase {
|
||||
@MainActor func testHelloDiskDOSAndLOADMRunTheSameProgramOnBothCPUs() async throws {
|
||||
let mac = URL(fileURLWithPath: #filePath).deletingLastPathComponent().deletingLastPathComponent()
|
||||
let resources = mac.appendingPathComponent("LocalResources")
|
||||
let runtime = resources.appendingPathComponent("ToolchainBundle")
|
||||
let runtime = vccQualificationToolchain(resources.appendingPathComponent("ToolchainBundle"))
|
||||
let romURL = resources.appendingPathComponent("ROMs/coco3.rom"), diskROMURL = resources.appendingPathComponent("ROMs/disk11.rom")
|
||||
try XCTSkipUnless(FileManager.default.isExecutableFile(atPath: runtime.appendingPathComponent("bin/cmoc").path) && FileManager.default.fileExists(atPath: romURL.path) && FileManager.default.fileExists(atPath: diskROMURL.path), "Stage local tools and ROMs")
|
||||
let root = FileManager.default.temporaryDirectory.appendingPathComponent("CMOCHelloDOS-" + UUID().uuidString)
|
||||
@@ -1100,7 +1100,7 @@ final class CMOCMultiFileExecutionTests: XCTestCase {
|
||||
|
||||
@MainActor func testMultiFileQuickloadAndDiskBootStopAtVerifiedSourceOnBothCPUs() async throws {
|
||||
let mac = URL(fileURLWithPath: #filePath).deletingLastPathComponent().deletingLastPathComponent()
|
||||
let resources = mac.appendingPathComponent("LocalResources"), toolchain = resources.appendingPathComponent("ToolchainBundle")
|
||||
let resources = mac.appendingPathComponent("LocalResources"), toolchain = vccQualificationToolchain(resources.appendingPathComponent("ToolchainBundle"))
|
||||
let romURL = resources.appendingPathComponent("ROMs/coco3.rom"), diskROMURL = resources.appendingPathComponent("ROMs/disk11.rom")
|
||||
try XCTSkipUnless(FileManager.default.isExecutableFile(atPath: toolchain.appendingPathComponent("bin/cmoc").path) &&
|
||||
FileManager.default.fileExists(atPath: romURL.path) && FileManager.default.fileExists(atPath: diskROMURL.path),
|
||||
@@ -1240,7 +1240,7 @@ final class CMOCLiveBreakpointModelTests: XCTestCase {
|
||||
}
|
||||
@MainActor func testPausedLiveToggleKeepsInstructionUpdatesAndRejectsUnobservedMemoryEdits() async throws {
|
||||
let resources = URL(fileURLWithPath: #filePath).deletingLastPathComponent().deletingLastPathComponent().appendingPathComponent("LocalResources")
|
||||
let toolchain = resources.appendingPathComponent("ToolchainBundle"), romURL = resources.appendingPathComponent("ROMs/coco3.rom")
|
||||
let toolchain = vccQualificationToolchain(resources.appendingPathComponent("ToolchainBundle")), romURL = resources.appendingPathComponent("ROMs/coco3.rom")
|
||||
try XCTSkipUnless(FileManager.default.isExecutableFile(atPath: toolchain.appendingPathComponent("bin/cmoc").path) &&
|
||||
FileManager.default.fileExists(atPath: romURL.path), "Staged tools and a licensed local CoCo ROM are required")
|
||||
let folder = FileManager.default.temporaryDirectory.appendingPathComponent("CMOCLiveBreakpoints-" + UUID().uuidString)
|
||||
|
||||
@@ -263,8 +263,8 @@ final class CMOCVariableDebugTests: XCTestCase {
|
||||
XCTAssertThrowsError(try parse(floating(5, String(repeating: "x", count: 129))))
|
||||
}
|
||||
func testCompilerTagsActualFloatingFormatsIncludingNestedTypes() throws {
|
||||
let runtime = URL(fileURLWithPath: #filePath).deletingLastPathComponent().deletingLastPathComponent()
|
||||
.appendingPathComponent("LocalResources/ToolchainBundle")
|
||||
let runtime = vccQualificationToolchain(URL(fileURLWithPath: #filePath).deletingLastPathComponent().deletingLastPathComponent()
|
||||
.appendingPathComponent("LocalResources/ToolchainBundle"))
|
||||
let compiler = runtime.appendingPathComponent("bin/cmoc")
|
||||
try XCTSkipUnless(FileManager.default.isExecutableFile(atPath: compiler.path), "Staged compiler required")
|
||||
let root = FileManager.default.temporaryDirectory.appendingPathComponent("CMOCFloatFormats-" + UUID().uuidString)
|
||||
@@ -318,7 +318,7 @@ final class CMOCVariableDebugTests: XCTestCase {
|
||||
}
|
||||
func testMetadataPathsDoNotDependOnLiveIncrementalWorkspaceLifetime() async throws {
|
||||
let resources = URL(fileURLWithPath: #filePath).deletingLastPathComponent().deletingLastPathComponent().appendingPathComponent("LocalResources")
|
||||
let toolchain = resources.appendingPathComponent("ToolchainBundle")
|
||||
let toolchain = vccQualificationToolchain(resources.appendingPathComponent("ToolchainBundle"))
|
||||
try XCTSkipUnless(FileManager.default.isExecutableFile(atPath: toolchain.appendingPathComponent("bin/cmoc").path), "Staged compiler required")
|
||||
let root = FileManager.default.temporaryDirectory.appendingPathComponent("CMOCMetadataLive-" + UUID().uuidString)
|
||||
try FileManager.default.createDirectory(at: root, withIntermediateDirectories: true)
|
||||
@@ -348,7 +348,7 @@ final class CMOCVariableDebugTests: XCTestCase {
|
||||
func testLongCompilerTypeRecordsUseOnlyVerifiedMatchingAssembly() async throws {
|
||||
let resources = URL(fileURLWithPath: #filePath).deletingLastPathComponent().deletingLastPathComponent()
|
||||
.appendingPathComponent("LocalResources")
|
||||
let toolchain = resources.appendingPathComponent("ToolchainBundle")
|
||||
let toolchain = vccQualificationToolchain(resources.appendingPathComponent("ToolchainBundle"))
|
||||
try XCTSkipUnless(FileManager.default.isExecutableFile(atPath: toolchain.appendingPathComponent("bin/cmoc").path), "Staged compiler required")
|
||||
let root = FileManager.default.temporaryDirectory.appendingPathComponent("CMOCLongMetadata-" + UUID().uuidString)
|
||||
try FileManager.default.createDirectory(at: root, withIntermediateDirectories: true)
|
||||
|
||||
@@ -18,7 +18,7 @@ final class CMOCVariableTreeIntegrationTests: XCTestCase {
|
||||
}
|
||||
private func fixture() async throws -> Fixture {
|
||||
let resources = URL(fileURLWithPath: #filePath).deletingLastPathComponent().deletingLastPathComponent().appendingPathComponent("LocalResources")
|
||||
let toolchain = resources.appendingPathComponent("ToolchainBundle")
|
||||
let toolchain = vccQualificationToolchain(resources.appendingPathComponent("ToolchainBundle"))
|
||||
let rom = resources.appendingPathComponent("ROMs/coco3.rom")
|
||||
try XCTSkipUnless(FileManager.default.isExecutableFile(atPath: toolchain.appendingPathComponent("bin/cmoc").path)
|
||||
&& FileManager.default.fileExists(atPath: rom.path), "Local licensed CoCo ROM and staged toolchain are required")
|
||||
|
||||
@@ -16,7 +16,7 @@ final class CMOCWorkflowHardeningTests: XCTestCase {
|
||||
return try XCTUnwrap(value)
|
||||
}
|
||||
@MainActor func testFailedCancelledAndCleanBuildsKeepLastRunnableAndLoadedIdentity() async throws {
|
||||
let toolchain = resources.appendingPathComponent("ToolchainBundle")
|
||||
let toolchain = vccQualificationToolchain(resources.appendingPathComponent("ToolchainBundle"))
|
||||
let rom = resources.appendingPathComponent("ROMs/coco3.rom")
|
||||
try XCTSkipUnless(FileManager.default.isExecutableFile(atPath: toolchain.appendingPathComponent("bin/cmoc").path)
|
||||
&& FileManager.default.fileExists(atPath: rom.path), "Staged toolchain and local CoCo ROM required")
|
||||
@@ -102,7 +102,7 @@ final class CMOCWorkflowHardeningTests: XCTestCase {
|
||||
}
|
||||
}
|
||||
@MainActor func testMissingOpenFilesPreserveTextAndInvalidateBuildWithoutRecreatingFiles() async throws {
|
||||
let toolchain = resources.appendingPathComponent("ToolchainBundle")
|
||||
let toolchain = vccQualificationToolchain(resources.appendingPathComponent("ToolchainBundle"))
|
||||
try XCTSkipUnless(FileManager.default.isExecutableFile(atPath: toolchain.appendingPathComponent("bin/cmoc").path), "Staged toolchain required")
|
||||
let root = FileManager.default.temporaryDirectory.appendingPathComponent("CMOCMissingFiles-\(UUID().uuidString)")
|
||||
try FileManager.default.createDirectory(at: root, withIntermediateDirectories: true)
|
||||
|
||||
@@ -0,0 +1,321 @@
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
import Foundation
|
||||
import AppKit
|
||||
import Darwin
|
||||
import XCTest
|
||||
|
||||
final class MCPBuildExportTests: XCTestCase {
|
||||
private var root: URL!
|
||||
override func setUpWithError() throws {
|
||||
root = FileManager.default.temporaryDirectory.appendingPathComponent("VCC export tests " + UUID().uuidString)
|
||||
try FileManager.default.createDirectory(at: root, withIntermediateDirectories: false)
|
||||
}
|
||||
override func tearDownWithError() throws { if let root { try? FileManager.default.removeItem(at: root) } }
|
||||
private func artifact(_ name: String = "Artifact", files: [String: Data] = ["GAME.BIN": Data([0,1,2]), "HOME.DSK": Data(repeating: 1, count: 161280), "DATA.DSK": Data(repeating: 2, count: 161280), "COCOMAN.dsk": Data(repeating: 1, count: 161280)]) throws -> CMOCBuildArtifact {
|
||||
let directory = root.appendingPathComponent(name)
|
||||
try FileManager.default.createDirectory(at: directory, withIntermediateDirectories: false)
|
||||
for (path,data) in files {
|
||||
let url = directory.appendingPathComponent(path)
|
||||
try FileManager.default.createDirectory(at: url.deletingLastPathComponent(), withIntermediateDirectories: true)
|
||||
try data.write(to: url)
|
||||
}
|
||||
let source = Data("int main(void){return 0;}".utf8)
|
||||
try source.write(to: directory.appendingPathComponent("main.c"))
|
||||
return CMOCBuildArtifact(id: UUID(), directory: directory, source: String(decoding: source, as: UTF8.self), sourceData: source,
|
||||
sourceSHA256: CMOCProject.sha256(source), binaryData: files["GAME.BIN"] ?? Data(), buildLog: "",
|
||||
outputPaths: Array(files.keys) + ["main.c"],
|
||||
exportProducts: files.map { CMOCBuildOutputProduct(relativePath: $0.key, byteCount: $0.value.count, sha256: CMOCProject.sha256($0.value)) }.sorted { $0.relativePath < $1.relativePath })
|
||||
}
|
||||
private func destination(_ name: String = "Deliveries") throws -> URL {
|
||||
let url = root.appendingPathComponent(name)
|
||||
try FileManager.default.createDirectory(at: url, withIntermediateDirectories: false)
|
||||
return url
|
||||
}
|
||||
func testSeparateExactSetsPreserveAliasesAndOriginalIdentity() throws {
|
||||
let release = try artifact("Release"), debug = try artifact("Debug", files: ["GAME.BIN":Data([4,5,6]),"HOME.DSK":Data(repeating:3,count:161280),"DATA.DSK":Data(repeating:4,count:161280),"COCOMAN.dsk":Data(repeating:3,count:161280)])
|
||||
let folder = try destination(), exporter = try MCPBuildExporter(destination: folder)
|
||||
for (name,artifact) in [("VCC-Release",release),("VCC-Debug",debug)] {
|
||||
let source = try MCPBuildExporter.Source(artifact)
|
||||
XCTAssertEqual(source.artifactID,artifact.id)
|
||||
let delivery = try exporter.export(source: source, products: artifact.exportProducts, setName: name)
|
||||
try exporter.verify(delivery)
|
||||
for product in delivery.products {
|
||||
let bytes=try Data(contentsOf:folder.appendingPathComponent(name).appendingPathComponent(product.relativePath))
|
||||
XCTAssertEqual(bytes.count,product.byteCount);XCTAssertEqual(CMOCProject.sha256(bytes),product.sha256)
|
||||
}
|
||||
XCTAssertEqual(try Data(contentsOf:folder.appendingPathComponent(name+"/HOME.DSK")),try Data(contentsOf:folder.appendingPathComponent(name+"/COCOMAN.dsk")))
|
||||
XCTAssertThrowsError(try exporter.export(source:source,products:artifact.exportProducts,setName:name))
|
||||
}
|
||||
XCTAssertNotEqual(release.exportProducts.first?.identifier(artifactID:release.id),debug.exportProducts.first?.identifier(artifactID:debug.id))
|
||||
}
|
||||
func testUndeclaredAndTraversalSelectionsNeverCopySource() throws {
|
||||
let artifact=try artifact(),exporter=try MCPBuildExporter(destination:destination()),source=try MCPBuildExporter.Source(artifact)
|
||||
for path in ["main.c","../outside","/etc/passwd"] {
|
||||
let product=CMOCBuildOutputProduct(relativePath:path,byteCount:1,sha256:CMOCProject.sha256(Data([0])))
|
||||
XCTAssertThrowsError(try exporter.export(source:source,products:[product],setName:"VCC-Invalid"))
|
||||
}
|
||||
XCTAssertThrowsError(try exporter.export(source:source,products:artifact.exportProducts,setName:"VCC-../escape"))
|
||||
}
|
||||
func testChangedOutputAndLinkedLeafAreRejected() throws {
|
||||
let artifact=try artifact(),source=try MCPBuildExporter.Source(artifact),exporter=try MCPBuildExporter(destination:destination())
|
||||
let output=artifact.directory.appendingPathComponent("GAME.BIN")
|
||||
try Data([9,9,9]).write(to:output)
|
||||
XCTAssertThrowsError(try exporter.export(source:source,products:artifact.exportProducts,setName:"VCC-Changed"))
|
||||
try FileManager.default.removeItem(at:output)
|
||||
let external=root.appendingPathComponent("outside.bin");try Data([0,1,2]).write(to:external)
|
||||
try FileManager.default.createSymbolicLink(at:output,withDestinationURL:external)
|
||||
XCTAssertThrowsError(try exporter.export(source:source,products:artifact.exportProducts,setName:"VCC-Linked"))
|
||||
try FileManager.default.removeItem(at:output)
|
||||
try FileManager.default.linkItem(at:external,to:output)
|
||||
XCTAssertThrowsError(try exporter.export(source:source,products:artifact.exportProducts,setName:"VCC-HardLinked"))
|
||||
XCTAssertEqual(try Data(contentsOf:external),Data([0,1,2]))
|
||||
}
|
||||
func testLinkedParentAndReplacedArtifactDirectoryAreRejected() throws {
|
||||
let artifact=try artifact(files:["nested/GAME.BIN":Data([1])]),source=try MCPBuildExporter.Source(artifact)
|
||||
let exporter=try MCPBuildExporter(destination:destination())
|
||||
let parent=artifact.directory.appendingPathComponent("nested"),moved=root.appendingPathComponent("moved")
|
||||
try FileManager.default.moveItem(at:parent,to:moved)
|
||||
try FileManager.default.createSymbolicLink(at:parent,withDestinationURL:moved)
|
||||
XCTAssertThrowsError(try exporter.export(source:source,products:artifact.exportProducts,setName:"VCC-Parent"))
|
||||
let movedArtifact=root.appendingPathComponent("Old Artifact")
|
||||
try FileManager.default.moveItem(at:artifact.directory,to:movedArtifact)
|
||||
try FileManager.default.createDirectory(at:artifact.directory,withIntermediateDirectories:false)
|
||||
XCTAssertThrowsError(try exporter.export(source:source,products:artifact.exportProducts,setName:"VCC-Replaced"))
|
||||
}
|
||||
func testChangedAndLinkedDestinationAreRejected() throws {
|
||||
let artifact=try artifact(),source=try MCPBuildExporter.Source(artifact),folder=try destination()
|
||||
let exporter=try MCPBuildExporter(destination:folder),moved=root.appendingPathComponent("Old Delivery Folder")
|
||||
try FileManager.default.moveItem(at:folder,to:moved)
|
||||
try FileManager.default.createDirectory(at:folder,withIntermediateDirectories:false)
|
||||
XCTAssertThrowsError(try exporter.export(source:source,products:artifact.exportProducts,setName:"VCC-Replaced"))
|
||||
try FileManager.default.removeItem(at:folder)
|
||||
try FileManager.default.createSymbolicLink(at:folder,withDestinationURL:moved)
|
||||
XCTAssertThrowsError(try MCPBuildExporter(destination:folder))
|
||||
XCTAssertThrowsError(try exporter.export(source:source,products:artifact.exportProducts,setName:"VCC-Linked"))
|
||||
}
|
||||
func testReplacementBetweenStagingAndCommitDoesNotPublish() throws {
|
||||
let artifact=try artifact(),source=try MCPBuildExporter.Source(artifact),folder=try destination(),moved=root.appendingPathComponent("Moved")
|
||||
let exporter=try MCPBuildExporter(destination:folder)
|
||||
exporter.beforeCommit = {
|
||||
try FileManager.default.moveItem(at:folder,to:moved)
|
||||
try FileManager.default.createDirectory(at:folder,withIntermediateDirectories:false)
|
||||
}
|
||||
XCTAssertThrowsError(try exporter.export(source:source,products:artifact.exportProducts,setName:"VCC-Race"))
|
||||
XCTAssertFalse(FileManager.default.fileExists(atPath:folder.appendingPathComponent("VCC-Race").path))
|
||||
XCTAssertFalse(FileManager.default.fileExists(atPath:moved.appendingPathComponent("VCC-Race").path))
|
||||
}
|
||||
func testRevocationBeforeCommitAndPartialFailureKeepPriorData() throws {
|
||||
let artifact=try artifact(),source=try MCPBuildExporter.Source(artifact),folder=try destination()
|
||||
let prior=folder.appendingPathComponent("prior.txt");try Data("keep".utf8).write(to:prior)
|
||||
let exporter=try MCPBuildExporter(destination:folder)
|
||||
exporter.beforeCommit = { exporter.invalidate() }
|
||||
XCTAssertThrowsError(try exporter.export(source:source,products:artifact.exportProducts,setName:"VCC-Revoked"))
|
||||
let failing=try MCPBuildExporter(destination:folder)
|
||||
failing.afterFile = { _ in throw POSIXError(.ENOSPC) }
|
||||
XCTAssertThrowsError(try failing.export(source:source,products:artifact.exportProducts,setName:"VCC-Failed"))
|
||||
XCTAssertEqual(try FileManager.default.contentsOfDirectory(atPath:folder.path),["prior.txt"])
|
||||
XCTAssertEqual(try Data(contentsOf:prior),Data("keep".utf8))
|
||||
}
|
||||
func testRetryVerificationRefusesChangedMissingExtraOrLinkedDeliveredBytes() throws {
|
||||
let artifact=try artifact(),source=try MCPBuildExporter.Source(artifact),folder=try destination(),exporter=try MCPBuildExporter(destination:folder)
|
||||
let delivery=try exporter.export(source:source,products:artifact.exportProducts,setName:"VCC-Delivery")
|
||||
let product=folder.appendingPathComponent("VCC-Delivery/GAME.BIN")
|
||||
try Data([7,7,7]).write(to:product)
|
||||
XCTAssertThrowsError(try exporter.verify(delivery))
|
||||
try Data([0,1,2]).write(to:product)
|
||||
try exporter.verify(delivery)
|
||||
let extra=folder.appendingPathComponent("VCC-Delivery/unrequested.txt");try Data([1]).write(to:extra)
|
||||
XCTAssertThrowsError(try exporter.verify(delivery))
|
||||
try FileManager.default.removeItem(at:extra);try FileManager.default.removeItem(at:product)
|
||||
XCTAssertThrowsError(try exporter.verify(delivery))
|
||||
try FileManager.default.createSymbolicLink(at:product,withDestinationURL:artifact.directory.appendingPathComponent("GAME.BIN"))
|
||||
XCTAssertThrowsError(try exporter.verify(delivery))
|
||||
}
|
||||
func testConcurrentDestinationConflictCannotReplacePriorSet() throws {
|
||||
let artifact=try artifact(),source=try MCPBuildExporter.Source(artifact),folder=try destination(),exporter=try MCPBuildExporter(destination:folder)
|
||||
let prior=folder.appendingPathComponent("VCC-Conflict")
|
||||
exporter.beforeCommit = { try FileManager.default.createDirectory(at:prior,withIntermediateDirectories:false);try Data("preserve".utf8).write(to:prior.appendingPathComponent("mine")) }
|
||||
XCTAssertThrowsError(try exporter.export(source:source,products:artifact.exportProducts,setName:"VCC-Conflict"))
|
||||
XCTAssertEqual(try Data(contentsOf:prior.appendingPathComponent("mine")),Data("preserve".utf8))
|
||||
}
|
||||
func testCancellationLeavesNoPartialSet() async throws {
|
||||
let artifact=try artifact(),source=try MCPBuildExporter.Source(artifact),folder=try destination(),exporter=try MCPBuildExporter(destination:folder)
|
||||
let work=Task.detached { () throws -> Void in
|
||||
withUnsafeCurrentTask { $0?.cancel() }
|
||||
_ = try exporter.export(source:source,products:artifact.exportProducts,setName:"VCC-Cancelled")
|
||||
}
|
||||
do { try await work.value;XCTFail("Cancelled export succeeded") } catch { XCTAssertTrue(error is CancellationError) }
|
||||
XCTAssertTrue(try FileManager.default.contentsOfDirectory(atPath:folder.path).isEmpty)
|
||||
}
|
||||
func testDeclaredExportConfigurationSeparatesInputsAndDirectories() throws {
|
||||
var config=CMOCProjectConfiguration();config.exportOutputs=["delivery/alias.dsk"]
|
||||
XCTAssertEqual(try config.validated().exportOutputs,["delivery/alias.dsk"])
|
||||
config.exportOutputs=["main.c"];XCTAssertThrowsError(try config.validated())
|
||||
config.exportOutputs=["../secret"];XCTAssertThrowsError(try config.validated())
|
||||
config.exportOutputs=["a","a/b"];XCTAssertThrowsError(try config.validated())
|
||||
config.exportOutputs=["A.dsk","a.DSK"];XCTAssertThrowsError(try config.validated())
|
||||
config.exportOutputs=[".git/config"];XCTAssertThrowsError(try config.validated())
|
||||
}
|
||||
}
|
||||
|
||||
@MainActor
|
||||
final class MCPBuildExportAccessTests: XCTestCase {
|
||||
#if DEBUG
|
||||
func testPublicHelperBuildsReleaseThenDebugAndExportsOriginalProductsWithScopedPermission() async throws {
|
||||
_ = NSApplication.shared
|
||||
let resources = URL(fileURLWithPath: #filePath).deletingLastPathComponent().deletingLastPathComponent().appendingPathComponent("LocalResources")
|
||||
let toolchain = vccQualificationToolchain(resources.appendingPathComponent("ToolchainBundle"))
|
||||
let helper = Bundle(for: Self.self).bundleURL.deletingLastPathComponent().appendingPathComponent("vcc-mcp")
|
||||
try XCTSkipUnless(FileManager.default.isExecutableFile(atPath: helper.path) && FileManager.default.isExecutableFile(atPath: toolchain.appendingPathComponent("bin/cmoc").path), "Build the public helper and stage the reviewed compiler runtime.")
|
||||
let folder = FileManager.default.temporaryDirectory.appendingPathComponent("MCP public build export " + UUID().uuidString)
|
||||
try FileManager.default.createDirectory(at: folder, withIntermediateDirectories: false)
|
||||
let suite = "MCPBuildExport." + UUID().uuidString, defaults = try XCTUnwrap(UserDefaults(suiteName: suite))
|
||||
defer { defaults.removePersistentDomain(forName: suite); try? FileManager.default.removeItem(at: folder) }
|
||||
let machine = MachineModel(diskStore: .init(url: folder.appendingPathComponent("disks.json")), displayDefaults: defaults,
|
||||
inputStore: .init(url: folder.appendingPathComponent("input.json")), restoreMediaOnLaunch: false)
|
||||
defer { machine.shutdown() }
|
||||
let model = CMOCDevelopmentModel(machine: machine, toolchain: toolchain, defaults: defaults,
|
||||
buildRoot: folder.appendingPathComponent("Builds"), recoveryRoot: folder.appendingPathComponent("Recovery"))
|
||||
var project = try CMOCProject.create(at: folder.appendingPathComponent("Project"))
|
||||
var configuration = project.configuration
|
||||
configuration.binary = "GAME.BIN"; configuration.diskImage = "HOME.DSK"; configuration.diskTarget = "all"
|
||||
configuration.playtestDisks = ["DATA.DSK"]; configuration.exportOutputs = ["COCOMAN.dsk"]
|
||||
try JSONEncoder().encode(configuration).write(to: project.directory.appendingPathComponent(CMOCProject.configurationFilename))
|
||||
let source = """
|
||||
#include <cmoc.h>
|
||||
int main(void) {
|
||||
#ifdef RELEASE
|
||||
printf("NORMAL RELEASE\\n");
|
||||
#else
|
||||
printf("NORMAL DEBUG\\n");
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
"""
|
||||
try Data(source.utf8).write(to: project.directory.appendingPathComponent("main.c"))
|
||||
let makefile = """
|
||||
ifeq ($(VCC_CONFIGURATION),Release)
|
||||
FLAGS = -O2 -DRELEASE
|
||||
else
|
||||
FLAGS = -O0 -fno-omit-frame-pointer
|
||||
endif
|
||||
all: GAME.BIN HOME.DSK DATA.DSK COCOMAN.dsk
|
||||
GAME.BIN: main.c
|
||||
\tcmoc --coco --intermediate $(FLAGS) -o GAME.BIN main.c
|
||||
HOME.DSK: GAME.BIN
|
||||
\tperl -e 'print "\\xff" x 161280' > HOME.DSK
|
||||
\twritecocofile HOME.DSK GAME.BIN
|
||||
DATA.DSK:
|
||||
\tperl -e 'print "\\xff" x 161280' > DATA.DSK
|
||||
COCOMAN.dsk: HOME.DSK
|
||||
\tcp HOME.DSK COCOMAN.dsk
|
||||
clean:
|
||||
\trm -f GAME.BIN HOME.DSK DATA.DSK COCOMAN.dsk
|
||||
"""
|
||||
try Data(makefile.utf8).write(to: project.directory.appendingPathComponent("Makefile"))
|
||||
project = try CMOCProject.open(at: project.directory); try model.adopt(project)
|
||||
let destination = folder.appendingPathComponent("Delivery")
|
||||
try FileManager.default.createDirectory(at: destination, withIntermediateDirectories: false)
|
||||
let host = MCPCMOC(), grant = folder.appendingPathComponent("grant.json")
|
||||
let clientSource = resources.deletingLastPathComponent().appendingPathComponent("Tools/MCP/test-helper.py")
|
||||
func run(_ script: String) async throws -> String {
|
||||
try await Task.detached {
|
||||
let process = Process(), output = Pipe()
|
||||
process.executableURL = URL(fileURLWithPath: "/usr/bin/env")
|
||||
process.arguments = ["python3", "-c", script, clientSource.path, helper.path, grant.path, destination.path]
|
||||
process.standardOutput = output; process.standardError = output
|
||||
let deadline = DispatchWorkItem { if process.isRunning { process.terminate() } }
|
||||
DispatchQueue.global().asyncAfter(deadline: .now() + 150, execute: deadline)
|
||||
defer { deadline.cancel() }
|
||||
try process.run(); let bytes = try output.fileHandleForReading.readToEnd() ?? Data(); process.waitUntilExit()
|
||||
let text = String(decoding: bytes, as: UTF8.self)
|
||||
guard process.terminationStatus == 0 else { throw NSError(domain: "MCPBuildExportFixture", code: Int(process.terminationStatus), userInfo: [NSLocalizedDescriptionKey: text]) }
|
||||
return text
|
||||
}.value
|
||||
}
|
||||
let setup = """
|
||||
import importlib.util,json,sys,time,hashlib
|
||||
from pathlib import Path
|
||||
spec=importlib.util.spec_from_file_location('client',sys.argv[1]);m=importlib.util.module_from_spec(spec);spec.loader.exec_module(m)
|
||||
def result(c,tool,**args):
|
||||
reply=c.call(tool,**args)['result']
|
||||
assert not reply.get('isError'),(tool,reply)
|
||||
return reply['structuredContent']
|
||||
"""
|
||||
do {
|
||||
try await host.exportCallContextRegression(model, at: grant, playtests: false, exportFolder: destination)
|
||||
let passed = try await run(setup + """
|
||||
|
||||
with m.Client(sys.argv[2],Path(sys.argv[3])) as c:
|
||||
c.handshake('2025-11-25')
|
||||
catalog={t['name']:t for t in c.request('tools/list')['result']['tools']}
|
||||
assert {'export_build_outputs','get_build_export'} <= set(catalog)
|
||||
caps=result(c,'get_capabilities');project=caps['project_id'];revision=caps['revision']
|
||||
dest=caps['export_destinations'][0]['destination_id']
|
||||
builds=[]
|
||||
for configuration in ('Release','Debug'):
|
||||
build=result(c,'build_project',project_id=project,revision=revision,request_id='build-'+configuration,configuration=configuration,action='disk')
|
||||
for _ in range(1600):
|
||||
state=result(c,'get_build',build_id=build['build_id'])
|
||||
if state['status']!='building':break
|
||||
time.sleep(.025)
|
||||
assert state['status']=='succeeded',state
|
||||
assert len(state['exportable_outputs'])==4,state
|
||||
builds.append(state)
|
||||
directories=[]
|
||||
for index,state in enumerate(builds):
|
||||
args=dict(project_id=project,build_id=state['build_id'],artifact_id=state['artifact_id'],revision=state['revision'],destination_id=dest,output_ids=[p['output_id'] for p in state['exportable_outputs']],request_id='deliver-'+str(index))
|
||||
accepted=result(c,'export_build_outputs',**args)
|
||||
for _ in range(800):
|
||||
exported=result(c,'get_build_export',project_id=project,export_id=accepted['export_id'])
|
||||
if not exported['busy']:break
|
||||
time.sleep(.01)
|
||||
assert exported['status']=='completed',exported
|
||||
assert exported['artifact_id']==state['artifact_id'] and exported['build_id']==state['build_id']
|
||||
assert exported['revision']==state['revision'] and exported['configuration']==state['configuration']
|
||||
directories.append(exported['delivery_directory'])
|
||||
expected={p['output_id']:p for p in state['exportable_outputs']}
|
||||
for p in exported['outputs']:
|
||||
data=(Path(sys.argv[4])/p['relative_filename']).read_bytes()
|
||||
assert len(data)==p['bytes']==expected[p['output_id']]['bytes']
|
||||
assert hashlib.sha256(data).hexdigest()==p['sha256']==expected[p['output_id']]['sha256']
|
||||
home=Path(sys.argv[4])/exported['delivery_directory']/'HOME.DSK'
|
||||
alias=home.with_name('COCOMAN.dsk');assert home.read_bytes()==alias.read_bytes()
|
||||
retry=result(c,'export_build_outputs',**args);assert retry==exported,(retry,exported)
|
||||
for changed in ({'artifact_id':'wrong'},{'build_id':'wrong'},{'project_id':'wrong'},{'revision':revision+1},{'destination_id':'wrong'},{'output_ids':['main.c']},{'output_ids':[args['output_ids'][0]]}):
|
||||
rejected=c.call('export_build_outputs',**{**args,**changed})
|
||||
assert rejected.get('error') or rejected.get('result',{}).get('isError'),rejected
|
||||
if index==1:
|
||||
home.write_bytes(b'changed by owner')
|
||||
rejected=c.call('export_build_outputs',**args)
|
||||
assert rejected['result'].get('isError'),rejected
|
||||
assert home.read_bytes()==b'changed by owner'
|
||||
assert len(set(directories))==2
|
||||
assert len(list(Path(sys.argv[4]).iterdir()))==2
|
||||
print('PASS real approved Make Release/Debug builds and exact separate four-product exports; retries, alias identity, identity/destination/selection conflicts and tamper refusal')
|
||||
""")
|
||||
XCTAssertTrue(passed.contains("PASS real approved Make"), passed)
|
||||
await host.revoke().value
|
||||
try await host.exportCallContextRegression(model, at: grant, playtests: false)
|
||||
let refused = try await run(setup + """
|
||||
|
||||
with m.Client(sys.argv[2],Path(sys.argv[3])) as c:
|
||||
c.handshake('2025-11-25')
|
||||
names={t['name'] for t in c.request('tools/list')['result']['tools']}
|
||||
assert 'export_build_outputs' not in names and 'get_build_export' not in names
|
||||
assert not result(c,'get_capabilities')['build_output_export']
|
||||
# Forging grant metadata can expose a helper schema, but not host permission.
|
||||
path=Path(sys.argv[3]);grant=json.loads(path.read_text());grant['toolset']=13;grant['buildExport']=True;path.write_text(json.dumps(grant));path.chmod(0o600)
|
||||
with m.Client(sys.argv[2],path) as c:
|
||||
c.handshake('2025-11-25')
|
||||
caps=result(c,'get_capabilities');assert not caps['build_output_export']
|
||||
rejected=c.call('export_build_outputs',project_id=caps['project_id'],build_id='wrong',artifact_id='wrong',revision=caps['revision'],destination_id='wrong',output_ids=['x'*64],request_id='forged')
|
||||
assert rejected['result'].get('isError'),rejected
|
||||
print('PASS absent native consent and forged client permission cannot authorize export')
|
||||
""")
|
||||
XCTAssertTrue(refused.contains("PASS absent native consent"), refused)
|
||||
await host.revoke().value
|
||||
} catch { await host.revoke().value; throw error }
|
||||
}
|
||||
#endif
|
||||
}
|
||||
@@ -89,7 +89,7 @@ final class MCPCallContextAccessTests: XCTestCase {
|
||||
|
||||
func testRealCGrantOwnsFrozenSevenArgumentContextAndRejectsStaleAuthority() async throws {
|
||||
_ = NSApplication.shared
|
||||
let localToolchainBundle = resources.appendingPathComponent("ToolchainBundle")
|
||||
let localToolchainBundle = vccQualificationToolchain(resources.appendingPathComponent("ToolchainBundle"))
|
||||
let roms = resources.appendingPathComponent("ROMs")
|
||||
try XCTSkipUnless(["cmoc", "make", "perl", "writecocofile"].allSatisfy {
|
||||
FileManager.default.isExecutableFile(atPath: localToolchainBundle.appendingPathComponent("bin/" + $0).path)
|
||||
@@ -156,7 +156,7 @@ final class MCPCallContextAccessTests: XCTestCase {
|
||||
do {
|
||||
try await host.exportCallContextRegression(model, at: grantFile, helperURL: worker, roms: roms)
|
||||
let grant = try readGrant(grantFile)
|
||||
XCTAssertEqual(grant["toolset"] as? Int, 12)
|
||||
XCTAssertEqual(grant["toolset"] as? Int, 13)
|
||||
XCTAssertEqual(grant["playtestVideo"] as? Bool, true)
|
||||
XCTAssertEqual(grant["playtestCallContext"] as? Bool, true)
|
||||
let capabilities = try await result("get_capabilities", grant: grant)
|
||||
@@ -333,7 +333,7 @@ final class MCPCallContextAccessTests: XCTestCase {
|
||||
let machine = MachineModel(diskStore: .init(url: root.appendingPathComponent("disks.json")), displayDefaults: defaults,
|
||||
inputStore: .init(url: root.appendingPathComponent("input.json")), restoreMediaOnLaunch: false)
|
||||
defer { machine.shutdown() }
|
||||
let model = CMOCDevelopmentModel(machine: machine, toolchain: resources.appendingPathComponent("ToolchainBundle"),
|
||||
let model = CMOCDevelopmentModel(machine: machine, toolchain: vccQualificationToolchain(resources.appendingPathComponent("ToolchainBundle")),
|
||||
defaults: defaults, buildRoot: root.appendingPathComponent("Builds"), recoveryRoot: root.appendingPathComponent("Recovery"))
|
||||
let project = try CMOCProject.create(at: root.appendingPathComponent("Project"))
|
||||
try model.adopt(project)
|
||||
@@ -408,7 +408,7 @@ final class MCPCallContextAccessTests: XCTestCase {
|
||||
|
||||
func testPublicMediaGrantBindsArtifactsRetainsEveryDiskAndResumesOnBothProcessors() async throws {
|
||||
_ = NSApplication.shared
|
||||
let toolchain = resources.appendingPathComponent("ToolchainBundle")
|
||||
let toolchain = vccQualificationToolchain(resources.appendingPathComponent("ToolchainBundle"))
|
||||
let roms = resources.appendingPathComponent("ROMs")
|
||||
try XCTSkipUnless(["cmoc", "make", "perl", "writecocofile"].allSatisfy {
|
||||
FileManager.default.isExecutableFile(atPath: toolchain.appendingPathComponent("bin/" + $0).path)
|
||||
@@ -469,11 +469,16 @@ final class MCPCallContextAccessTests: XCTestCase {
|
||||
do {
|
||||
try await host.exportCallContextRegression(model, at: grantFile, helperURL: worker, roms: roms)
|
||||
let grant = try readGrant(grantFile)
|
||||
XCTAssertEqual(grant["toolset"] as? Int, 12)
|
||||
XCTAssertEqual(grant["toolset"] as? Int, 13)
|
||||
XCTAssertEqual(grant["playtestVideo"] as? Bool, true)
|
||||
XCTAssertEqual(grant["playtestMedia"] as? Bool, true)
|
||||
XCTAssertEqual(grant["playtestMultiDrive"] as? Bool, true)
|
||||
XCTAssertEqual(grant["buildExport"] as? Bool, false)
|
||||
let capabilities = try await result("get_capabilities", grant: grant)
|
||||
XCTAssertEqual(capabilities["playtest_media_exchange"] as? Bool, true)
|
||||
XCTAssertEqual(capabilities["playtest_media_drives"] as? [Int], [0, 1, 2, 3])
|
||||
XCTAssertEqual(capabilities["playtest_media_version"] as? Int, 2)
|
||||
XCTAssertEqual(capabilities["playtest_media_write_protection"] as? Bool, true)
|
||||
XCTAssertEqual((capabilities["tools"] as? [String])?.count, 35)
|
||||
let scope: [String: Any] = ["project_id": try XCTUnwrap(capabilities["project_id"] as? String),
|
||||
"revision": try XCTUnwrap(capabilities["revision"] as? Int)]
|
||||
|
||||
@@ -96,7 +96,7 @@ final class MCPDebuggerInspectionTests: XCTestCase {
|
||||
}
|
||||
|
||||
func testOrdinaryCMOCStopsAtMainWithCompiledWatchAndNoDisk() async throws {
|
||||
let root = try directory(), toolchain = resources.appendingPathComponent("ToolchainBundle")
|
||||
let root = try directory(), toolchain = vccQualificationToolchain(resources.appendingPathComponent("ToolchainBundle"))
|
||||
try XCTSkipUnless(FileManager.default.isExecutableFile(atPath: toolchain.appendingPathComponent("bin/cmoc").path),
|
||||
"Requires the local staged toolchain.")
|
||||
let machine = try await machine(at: root, enhanced: true)
|
||||
@@ -142,7 +142,7 @@ final class MCPDebuggerInspectionTests: XCTestCase {
|
||||
XCTAssertNotEqual(paused.debuggerProgramRevision, snapshot.machine.debuggerProgramRevision)
|
||||
}
|
||||
func testHelloDiskKeepsCapturedInspectionAfterContinueAndEject() async throws {
|
||||
let root = try directory(), toolchain = resources.appendingPathComponent("ToolchainBundle")
|
||||
let root = try directory(), toolchain = vccQualificationToolchain(resources.appendingPathComponent("ToolchainBundle"))
|
||||
try XCTSkipUnless(FileManager.default.isExecutableFile(atPath: toolchain.appendingPathComponent("bin/cmoc").path),
|
||||
"Requires the local staged toolchain.")
|
||||
let machine = try await machine(at: root, enhanced: false)
|
||||
|
||||
@@ -1829,6 +1829,469 @@ final class MCPPlaytestTests: XCTestCase {
|
||||
catch { XCTAssertTrue(error.localizedDescription.contains("stale_run")) }
|
||||
}
|
||||
|
||||
func testOwnedMultipleDrivesReadBothWriteOnlyHomeAndRetainIndependentlyOnBothProcessors() async throws {
|
||||
let (helper, system, diskROM) = try inputs()
|
||||
for cpu in ["6809", "6309"] {
|
||||
for homeDrive in 0...2 {
|
||||
let dataDrive = homeDrive + 1
|
||||
let root = FileManager.default.temporaryDirectory.appendingPathComponent("VCCMultiDrive-" + UUID().uuidString)
|
||||
defer { try? FileManager.default.removeItem(at: root) }
|
||||
var home = disk(), data = disk()
|
||||
home.replaceSubrange(0..<4, with: Data("HOME".utf8))
|
||||
data.replaceSubrange(0..<4, with: Data("DATA".utf8))
|
||||
let declaration = declaredMedia(artifact: UUID().uuidString, project: "multi-drive-\(cpu)-\(homeDrive)", primary: home, world: data)
|
||||
// DSKI$ returns two 128-byte strings per sector. Reserve a
|
||||
// normal BASIC string heap for both disks and the save buffers.
|
||||
let source = "CLEAR2000\n5 H=\(homeDrive):D=\(dataDrive)\n10 IFINKEY$=\"\"THEN10\n20 DSKI$H,0,1,A$,B$:DSKI$D,0,1,C$,E$:PRINTLEFT$(A$,4);\":\";LEFT$(C$,4)\n30 A$=\"SAVE\"+STRING$(124,88):B$=STRING$(128,89):DSKO$H,0,2,A$,B$:DSKI$H,0,2,A$,B$:PRINTLEFT$(A$,4):GOTO10\nRUN\n"
|
||||
let test = try await MCPPlaytest.start(systemROM: system, diskROM: diskROM, disk: home,
|
||||
bootCommands: source, projectID: "multi-drive-\(cpu)-\(homeDrive)", revision: 1,
|
||||
artifactID: declaration.proof.artifactID!, cpu: cpu, helperURL: helper,
|
||||
retentionDirectory: root, diskProvenance: declaration.proof, media: declaration.media, multiDrive: true)
|
||||
defer { test.invalidate() }
|
||||
_ = try await test.pausePlaytest()
|
||||
func exchange(_ drive: Int, _ id: String?, _ hash: String?, _ requestID: String, protection: Bool? = nil) async throws -> [String: Any] {
|
||||
var request: [String: Any] = ["run_id": test.runID, "request_id": requestID, "action": id == nil ? "eject" : "insert", "drive": drive]
|
||||
if let id { request["media_id"] = id; request["media_sha256"] = hash }
|
||||
if let protection { request["write_protected"] = protection }
|
||||
return try await test.reply("exchange_playtest_media", arguments: request)
|
||||
}
|
||||
let before = try await test.capture()
|
||||
XCTAssertEqual((before["drives"] as? [[String: Any]])?.count, 4)
|
||||
for invalid: Any in [true, 1.5, -1, 4, "1"] {
|
||||
await expectDiskFailure {
|
||||
_ = try await test.reply("exchange_playtest_media", arguments: ["run_id": test.runID, "request_id": "invalid-drive", "action": "eject", "drive": invalid])
|
||||
}
|
||||
}
|
||||
for invalid: Any in [1, "true"] {
|
||||
await expectDiskFailure {
|
||||
_ = try await test.reply("exchange_playtest_media", arguments: ["run_id": test.runID, "request_id": "invalid-protection", "action": "insert", "drive": dataDrive,
|
||||
"media_id": declaration.media[1].id, "media_sha256": declaration.media[1].baseSHA256, "write_protected": invalid])
|
||||
}
|
||||
}
|
||||
await expectDiskFailure {
|
||||
_ = try await exchange(dataDrive, declaration.media[0].id, declaration.media[0].baseSHA256, "duplicate-mount")
|
||||
}
|
||||
if homeDrive != 0 {
|
||||
_ = try await exchange(0, nil, nil, "eject-home")
|
||||
_ = try await exchange(homeDrive, declaration.media[0].id, declaration.media[0].baseSHA256, "move-home")
|
||||
}
|
||||
let inserted = try await exchange(dataDrive, declaration.media[1].id, declaration.media[1].baseSHA256, "data", protection: true)
|
||||
let insertedRows = try XCTUnwrap(inserted["drives"] as? [[String: Any]])
|
||||
XCTAssertEqual(insertedRows[dataDrive]["write_protected"] as? Bool, true)
|
||||
XCTAssertEqual(insertedRows[homeDrive]["write_protected"] as? Bool, false)
|
||||
XCTAssertEqual(inserted["field_clock"] as? Int, before["field_clock"] as? Int)
|
||||
XCTAssertEqual(inserted["target_drive"] as? Int, dataDrive)
|
||||
XCTAssertEqual(inserted["media_id"] as? String, homeDrive == 0 ? declaration.media[0].id : nil)
|
||||
let retry = try await exchange(dataDrive, declaration.media[1].id, declaration.media[1].baseSHA256, "data", protection: true)
|
||||
XCTAssertEqual(inserted as NSDictionary, retry as NSDictionary)
|
||||
await expectDiskFailure { _ = try await exchange(homeDrive, declaration.media[1].id, declaration.media[1].baseSHA256, "data", protection: true) }
|
||||
await expectDiskFailure { _ = try await exchange(dataDrive, declaration.media[1].id, declaration.media[1].baseSHA256, "data", protection: false) }
|
||||
_ = try await test.continuePlaytest()
|
||||
_ = try await test.reply("playtest_input", arguments: ["run_id": test.runID, "request_id": "read-and-save", "steps": [["keys": ["r"], "fields": 18], ["keys": [], "fields": 420]]])
|
||||
_ = try await test.pausePlaytest()
|
||||
let saved = try await test.capture()
|
||||
let text = saved["screen_text"] as? String ?? ""
|
||||
XCTAssertTrue(text.contains("HOME:DATA"), text)
|
||||
XCTAssertTrue(text.contains("SAVE"), text)
|
||||
let rows = try XCTUnwrap(saved["drives"] as? [[String: Any]])
|
||||
XCTAssertGreaterThan((rows[homeDrive]["disk_reads"] as? Int) ?? 0, 0)
|
||||
XCTAssertGreaterThan((rows[homeDrive]["disk_writes"] as? Int) ?? 0, 0)
|
||||
XCTAssertGreaterThan((rows[dataDrive]["disk_reads"] as? Int) ?? 0, 0)
|
||||
XCTAssertEqual(rows[dataDrive]["disk_writes"] as? Int, 0)
|
||||
XCTAssertEqual(rows[dataDrive]["disk_sha256"] as? String, CMOCProject.sha256(data))
|
||||
XCTAssertNotEqual(rows[homeDrive]["disk_sha256"] as? String, CMOCProject.sha256(home))
|
||||
let restarted = try await test.reply("restart_playtest", arguments: ["run_id": test.runID, "request_id": "restart-all"])
|
||||
let restartedRows = try XCTUnwrap(restarted["drives"] as? [[String: Any]])
|
||||
for drive in 0..<4 {
|
||||
XCTAssertEqual(restartedRows[drive]["media_id"] as? String, rows[drive]["media_id"] as? String)
|
||||
XCTAssertEqual(restartedRows[drive]["disk_sha256"] as? String, rows[drive]["disk_sha256"] as? String)
|
||||
XCTAssertEqual(restartedRows[drive]["write_protected"] as? Bool, rows[drive]["write_protected"] as? Bool)
|
||||
}
|
||||
let stopArgs: [String: Any] = ["run_id": test.runID, "request_id": "stop"]
|
||||
let stopped = try await test.reply("stop_playtest", arguments: stopArgs)
|
||||
let repeated = try await test.reply("stop_playtest", arguments: stopArgs)
|
||||
XCTAssertEqual(stopped as NSDictionary, repeated as NSDictionary)
|
||||
let retained = try XCTUnwrap(stopped["retained_media"] as? [[String: Any]])
|
||||
XCTAssertEqual(retained.count, 2)
|
||||
XCTAssertEqual(Set(retained.compactMap { $0["retained_disk_id"] as? String }).count, 2)
|
||||
for (index, medium) in declaration.media.enumerated() {
|
||||
let record = try XCTUnwrap(retained.first { $0["media_id"] as? String == medium.id })
|
||||
let id = try XCTUnwrap(record["retained_disk_id"] as? String), hash = try XCTUnwrap(record["disk_sha256"] as? String)
|
||||
let loaded = try await MCPPlaytestDiskStore.load(directory: root, id: id, expectedSHA256: hash,
|
||||
projectKey: declaration.key, artifactDiskSHA256: declaration.proof.artifactDiskSHA256!,
|
||||
mediaKey: medium.key, mediaBaseSHA256: medium.baseSHA256)
|
||||
XCTAssertEqual(loaded.record.provenance.writeProtected, index == 1)
|
||||
if index == 1 { XCTAssertEqual(loaded.data, data) }
|
||||
else { XCTAssertEqual(String(decoding: loaded.data[256..<260], as: UTF8.self), "SAVE") }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func testMultiDriveDefaultFD0RetryIdentityAndIndependentEqualByteCopies() async throws {
|
||||
let (helper, system, diskROM) = try inputs()
|
||||
let root = FileManager.default.temporaryDirectory.appendingPathComponent("VCCMultiIdentity-" + UUID().uuidString)
|
||||
defer { try? FileManager.default.removeItem(at: root) }
|
||||
let original = disk(), declaration = declaredMedia(artifact: UUID().uuidString, project: "multi-identity", primary: original, world: original)
|
||||
let test = try await MCPPlaytest.start(systemROM: system, diskROM: diskROM, disk: original,
|
||||
bootCommands: "10 GOTO10\nRUN\n", projectID: "multi-identity", revision: 1,
|
||||
artifactID: declaration.proof.artifactID!, helperURL: helper, retentionDirectory: root,
|
||||
diskProvenance: declaration.proof, media: declaration.media, multiDrive: true)
|
||||
defer { test.invalidate() }
|
||||
_ = try await test.pausePlaytest()
|
||||
let omitted: [String: Any] = ["run_id": test.runID, "request_id": "default-eject", "action": "eject"]
|
||||
let ejected = try await test.reply("exchange_playtest_media", arguments: omitted)
|
||||
var explicit = omitted; explicit["drive"] = 0
|
||||
let explicitRetry = try await test.reply("exchange_playtest_media", arguments: explicit)
|
||||
XCTAssertEqual(explicitRetry as NSDictionary, ejected as NSDictionary)
|
||||
for drive in 0...1 {
|
||||
_ = try await test.reply("exchange_playtest_media", arguments: ["run_id": test.runID, "request_id": "insert-\(drive)", "action": "insert", "drive": drive,
|
||||
"media_id": declaration.media[drive].id, "media_sha256": declaration.media[drive].baseSHA256])
|
||||
}
|
||||
let snapshot = try await test.capture()
|
||||
let rows = try XCTUnwrap(snapshot["drives"] as? [[String: Any]])
|
||||
XCTAssertNotEqual(rows[0]["media_id"] as? String, rows[1]["media_id"] as? String)
|
||||
XCTAssertEqual(rows[0]["disk_sha256"] as? String, rows[1]["disk_sha256"] as? String)
|
||||
let stopped = try await test.reply("stop_playtest", arguments: ["run_id": test.runID, "request_id": "stop"])
|
||||
XCTAssertEqual((stopped["retained_media"] as? [[String: Any]])?.count, 2)
|
||||
}
|
||||
|
||||
func testMultiDriveStopDrainsFourLargeDisksWithinTheExistingWireLimit() async throws {
|
||||
let (helper, system, diskROM) = try inputs()
|
||||
let root = FileManager.default.temporaryDirectory.appendingPathComponent("VCCFourDriveDrain-" + UUID().uuidString)
|
||||
defer { try? FileManager.default.removeItem(at: root) }
|
||||
let artifact = UUID().uuidString, project = "four-drive-drain", projectKey = CMOCProject.sha256(Data(project.utf8))
|
||||
let base = disk(), primaryHash = CMOCProject.sha256(base)
|
||||
let media = (0..<4).map { index -> MCPPlaytestMedium in
|
||||
// 80-track single-sided raw images are valid and fit the per-image
|
||||
// budget. Four base64 payloads would exceed the 1 MiB wire bound.
|
||||
var bytes = index == 0 ? base : Data(repeating: UInt8(40 + index), count: 80 * 18 * 256)
|
||||
bytes[0] = UInt8(index)
|
||||
let key = index == 0 ? "primary" : "disk:drive\(index).dsk", hash = CMOCProject.sha256(bytes)
|
||||
let proof = MCPPlaytestDiskStore.Provenance(projectKey: projectKey, artifactID: artifact,
|
||||
artifactDiskSHA256: primaryHash, mediaKey: key, mediaBaseSHA256: hash)
|
||||
return MCPPlaytestMedium(id: MCPPlaytestMedium.identifier(artifactID: artifact, key: key), name: "drive\(index).dsk",
|
||||
key: key, baseSHA256: hash, data: bytes, provenance: proof)
|
||||
}
|
||||
// Keep primary hash and actual bytes identical for artifact binding.
|
||||
let primary = media[0]
|
||||
let test = try await MCPPlaytest.start(systemROM: system, diskROM: diskROM, disk: primary.data,
|
||||
bootCommands: "10 GOTO10\nRUN\n", projectID: project, revision: 1, artifactID: artifact,
|
||||
helperURL: helper, retentionDirectory: root, diskProvenance: primary.provenance, media: media, multiDrive: true)
|
||||
defer { test.invalidate() }
|
||||
_ = try await test.pausePlaytest()
|
||||
for drive in 1...3 {
|
||||
_ = try await test.reply("exchange_playtest_media", arguments: ["run_id": test.runID, "request_id": "drive-\(drive)", "action": "insert", "drive": drive,
|
||||
"media_id": media[drive].id, "media_sha256": media[drive].baseSHA256])
|
||||
}
|
||||
let stopped = try await test.reply("stop_playtest", arguments: ["run_id": test.runID, "request_id": "stop"])
|
||||
let records = try XCTUnwrap(stopped["retained_media"] as? [[String: Any]])
|
||||
XCTAssertEqual(records.count, 4)
|
||||
for medium in media {
|
||||
let record = try XCTUnwrap(records.first { $0["media_id"] as? String == medium.id })
|
||||
XCTAssertEqual(record["disk_sha256"] as? String, medium.baseSHA256)
|
||||
let id = try XCTUnwrap(record["retained_disk_id"] as? String)
|
||||
XCTAssertEqual(try Data(contentsOf: MCPPlaytestDiskStore.diskURL(directory: root, id: id)), medium.data)
|
||||
}
|
||||
}
|
||||
|
||||
func testMultiDriveRetentionCanRetryAfterFrozenWorkerExit() async throws {
|
||||
let (helper, system, diskROM) = try inputs()
|
||||
let root = FileManager.default.temporaryDirectory.appendingPathComponent("VCCMultiRetentionRetry-" + UUID().uuidString)
|
||||
try FileManager.default.createDirectory(at: root, withIntermediateDirectories: true, attributes: [.posixPermissions: 0o700])
|
||||
defer { try? FileManager.default.removeItem(at: root) }
|
||||
let blocked = root.appendingPathComponent("retained")
|
||||
try Data("not a folder".utf8).write(to: blocked)
|
||||
let original = disk(); var data = disk(); data[0] = 81
|
||||
let declaration = declaredMedia(artifact: UUID().uuidString, project: "multi-retention-retry", primary: original, world: data)
|
||||
let test = try await MCPPlaytest.start(systemROM: system, diskROM: diskROM, disk: original,
|
||||
bootCommands: "10 PRINT 47\nSAVE\"HOME\"\n", projectID: "multi-retention-retry", revision: 1,
|
||||
artifactID: declaration.proof.artifactID!, helperURL: helper, retentionDirectory: blocked,
|
||||
diskProvenance: declaration.proof, media: declaration.media, multiDrive: true)
|
||||
defer { test.invalidate() }
|
||||
_ = try await test.pausePlaytest()
|
||||
_ = try await test.reply("exchange_playtest_media", arguments: ["run_id": test.runID, "request_id": "data", "action": "insert", "drive": 1,
|
||||
"media_id": declaration.media[1].id, "media_sha256": declaration.media[1].baseSHA256])
|
||||
let before = try await test.capture()
|
||||
let beforeRows = try XCTUnwrap(before["drives"] as? [[String: Any]])
|
||||
let stop: [String: Any] = ["run_id": test.runID, "request_id": "stop"]
|
||||
await expectDiskFailure { _ = try await test.reply("stop_playtest", arguments: stop) }
|
||||
XCTAssertNotNil(test.retentionError)
|
||||
let pending = try await test.capture()
|
||||
XCTAssertEqual(pending["status"] as? String, "retention_pending")
|
||||
try FileManager.default.removeItem(at: blocked)
|
||||
let stopped = try await test.reply("stop_playtest", arguments: stop)
|
||||
XCTAssertNil(test.retentionError)
|
||||
let records = try XCTUnwrap(stopped["retained_media"] as? [[String: Any]])
|
||||
XCTAssertEqual(records.count, 2)
|
||||
for index in 0...1 {
|
||||
let record = try XCTUnwrap(records.first { $0["media_id"] as? String == declaration.media[index].id })
|
||||
XCTAssertEqual(record["disk_sha256"] as? String, beforeRows[index]["disk_sha256"] as? String)
|
||||
}
|
||||
}
|
||||
|
||||
func testOwnedDriveProtectionBlocksGuestWriteAndCanBeChangedWithReview() async throws {
|
||||
let (helper, system, diskROM) = try inputs()
|
||||
for cpu in ["6809", "6309"] {
|
||||
let root = FileManager.default.temporaryDirectory.appendingPathComponent("VCCOwnedWriteProtect-" + UUID().uuidString)
|
||||
defer { try? FileManager.default.removeItem(at: root) }
|
||||
let original = disk(), declaration = declaredMedia(artifact: UUID().uuidString, project: "protected-" + cpu, primary: original, world: original)
|
||||
let program = "CLEAR2000\n10 IFINKEY$=\"\"THEN10\n20 A$=STRING$(128,88):B$=STRING$(128,89):DSKO$0,0,2,A$,B$:PRINT\"WROTE HOME\":GOTO10\nRUN\n"
|
||||
let test = try await MCPPlaytest.start(systemROM: system, diskROM: diskROM, disk: original,
|
||||
bootCommands: program, projectID: "protected-" + cpu, revision: 1, artifactID: declaration.proof.artifactID!, cpu: cpu,
|
||||
helperURL: helper, retentionDirectory: root, diskProvenance: declaration.proof, media: declaration.media, multiDrive: true)
|
||||
defer { test.invalidate() }
|
||||
_ = try await test.pausePlaytest()
|
||||
_ = try await test.reply("exchange_playtest_media", arguments: ["run_id": test.runID, "request_id": "protect", "action": "insert",
|
||||
"media_id": declaration.media[0].id, "media_sha256": declaration.media[0].baseSHA256, "write_protected": true])
|
||||
_ = try await test.continuePlaytest()
|
||||
_ = try await test.reply("playtest_input", arguments: ["run_id": test.runID, "request_id": "protected-write",
|
||||
"steps": [["keys": ["r"], "fields": 18], ["keys": [], "fields": 180]]])
|
||||
_ = try await test.pausePlaytest()
|
||||
let refused = try await test.capture()
|
||||
let rows = try XCTUnwrap(refused["drives"] as? [[String: Any]])
|
||||
XCTAssertEqual(rows[0]["disk_sha256"] as? String, declaration.media[0].baseSHA256)
|
||||
XCTAssertEqual(rows[0]["disk_writes"] as? Int, 0)
|
||||
XCTAssertTrue((refused["screen_text"] as? String ?? "").contains("WP ERROR"), refused["screen_text"] as? String ?? "")
|
||||
_ = try await test.reply("exchange_playtest_media", arguments: ["run_id": test.runID, "request_id": "unprotect", "action": "insert", "drive": 0,
|
||||
"media_id": declaration.media[0].id, "media_sha256": declaration.media[0].baseSHA256, "write_protected": false])
|
||||
_ = try await test.reply("restart_playtest", arguments: ["run_id": test.runID, "request_id": "restart"])
|
||||
_ = try await test.reply("playtest_input", arguments: ["run_id": test.runID, "request_id": "writable-write",
|
||||
"steps": [["keys": ["r"], "fields": 18], ["keys": [], "fields": 240]]])
|
||||
_ = try await test.pausePlaytest()
|
||||
let written = try await test.capture()
|
||||
let writtenRows = try XCTUnwrap(written["drives"] as? [[String: Any]])
|
||||
XCTAssertGreaterThan(writtenRows[0]["disk_writes"] as? Int ?? 0, 0)
|
||||
XCTAssertNotEqual(writtenRows[0]["disk_sha256"] as? String, declaration.media[0].baseSHA256)
|
||||
XCTAssertTrue((written["screen_text"] as? String ?? "").contains("WROTE HOME"))
|
||||
_ = try await test.reply("stop_playtest", arguments: ["run_id": test.runID, "request_id": "stop"])
|
||||
}
|
||||
}
|
||||
|
||||
func testMultiDriveExchangeChecksSharedControllerAndMalformedDriveBeforeMutation() async throws {
|
||||
let (helper, system, diskROM) = try inputs()
|
||||
for cpu in ["6809", "6309"] {
|
||||
let worker = try MediaWorkerClient(helper); defer { worker.close() }
|
||||
// Real guest selects FD0 and starts a read with motor disabled;
|
||||
// even an otherwise empty FD3 must refuse its own exchange.
|
||||
let commands = try CocoPaste("POKE65344,1:POKE65352,128\n", mode: .text)
|
||||
_ = try await worker.request(["op": "init", "system_rom": system.base64EncodedString(), "disk_rom": diskROM.base64EncodedString(),
|
||||
"disk": disk().base64EncodedString(), "boot_keys": commands.chords.map { NSNumber(value: $0) }, "cpu": cpu, "multi_drive": true])
|
||||
_ = try await worker.request(["op": "pause"])
|
||||
let before = try await worker.request(["op": "media_status"])
|
||||
XCTAssertEqual(before["floppy_busy"] as? Bool, true)
|
||||
for drive: Any in [true, 1.25, -1, 4] {
|
||||
await expectDiskFailure {
|
||||
_ = try await worker.request(["op": "exchange_media", "drive": drive, "expected_media_generation": 0, "expected_disk_sha256": ""])
|
||||
}
|
||||
}
|
||||
do {
|
||||
_ = try await worker.request(["op": "exchange_media", "drive": 3, "expected_media_generation": 0, "expected_disk_sha256": ""])
|
||||
XCTFail("A pending FD0 command must block FD3 replacement")
|
||||
} catch { XCTAssertTrue(error.localizedDescription.contains("playtest_media_busy")) }
|
||||
let after = try await worker.request(["op": "media_status"])
|
||||
XCTAssertEqual(before["drives"] as? NSArray, after["drives"] as? NSArray)
|
||||
for key in ["field_clock", "cycles", "generation", "pc", "boot"] { XCTAssertEqual(before[key] as? NSNumber, after[key] as? NSNumber) }
|
||||
let frozen = try await worker.request(["op": "stop"])
|
||||
XCTAssertEqual(frozen["media_frozen"] as? Bool, true)
|
||||
for drive in 0..<4 { _ = try await worker.request(["op": "export_media", "drive": drive]) }
|
||||
_ = try await worker.request(["op": "finish_stop"])
|
||||
}
|
||||
}
|
||||
|
||||
/// These are bounded negative protocol fixtures, not emulator evidence.
|
||||
/// Actual guest I/O is covered by the independent both-CPU tests above.
|
||||
private func faultingMultiDriveHelper(_ mode: String, root: URL) throws -> URL {
|
||||
try FileManager.default.createDirectory(at: root, withIntermediateDirectories: true, attributes: [.posixPermissions: 0o700])
|
||||
let path = root.appendingPathComponent("multi-wire-fixture")
|
||||
let source = """
|
||||
#!/usr/bin/env python3
|
||||
import sys,json,base64,hashlib,os
|
||||
mode=\(String(reflecting: mode))
|
||||
disks=[None]*4; ids=[None]*4; gens=[0]*4; protections=[False]*4; originals=['']*4
|
||||
cpu='6809'; frozen=False; failed_export=False
|
||||
def digest(data): return hashlib.sha256(data).hexdigest() if data else ''
|
||||
def row(drive):
|
||||
data=disks[drive]
|
||||
return {'drive':drive,'label':'FD'+str(drive),'inserted':data is not None,'disk_present':data is not None,
|
||||
'media_id':ids[drive],'disk_original_sha256':originals[drive],'disk_sha256':digest(data),
|
||||
'media_generation':gens[drive],'byte_count':len(data) if data else 0,'disk_dirty':False,
|
||||
'write_protected':protections[drive],'disk_reads':0,'disk_writes':0,'mount_read_bytes':0,'mount_write_bytes':0}
|
||||
def status():
|
||||
first=row(0)
|
||||
return {'cpu':cpu,'processor':'HD6309' if cpu=='6309' else 'MC6809','state':'paused',
|
||||
'media_id':first['media_id'],'disk_present':first['disk_present'],'disk_sha256':first['disk_sha256'],
|
||||
'disk_original_sha256':first['disk_original_sha256'],'media_generation':gens[0],
|
||||
'disk_dirty':False,'floppy_busy':False,'field_clock':0,'cycles':100,'generation':1,'boot':1,'pc':100,
|
||||
'drives':[row(d) for d in range(4)]}
|
||||
for line in sys.stdin:
|
||||
r=json.loads(line); op=r['op']; end=False
|
||||
with open(os.path.join(os.path.dirname(__file__),'trace.jsonl'),'a') as trace: trace.write(json.dumps(r)+'\\n')
|
||||
if op=='init':
|
||||
disks[0]=base64.b64decode(r['disk']); ids[0]=r['media_id']; cpu=r['cpu']; originals[0]=digest(disks[0]); out=status()
|
||||
elif op=='export_media':
|
||||
drive=r['drive']
|
||||
if mode=='partial-stop' and frozen and drive==2 and not os.path.exists(os.path.join(os.path.dirname(__file__),'retry')):
|
||||
print(json.dumps({'error':'fixture_partial_drain'}),flush=True); continue
|
||||
out=status(); out['exported_drive']=row(drive)
|
||||
if disks[drive] is not None: out['disk_base64']=base64.b64encode(disks[drive]).decode()
|
||||
if mode=='wrong-target' and not frozen and drive==1 and not failed_export:
|
||||
out['exported_drive']['media_id']='foreign'; failed_export=True
|
||||
elif op in ('media_status','capture','pause'): out=status()
|
||||
elif op=='exchange_media':
|
||||
drive=r['drive']; old=digest(disks[drive]); ids[drive]=r.get('media_id')
|
||||
disks[drive]=base64.b64decode(r['disk_base64']) if ids[drive] else None
|
||||
protections[drive]=r.get('write_protected',False); originals[drive]=digest(disks[drive]); gens[drive]+=1
|
||||
if mode=='exit-after-commit': os._exit(0)
|
||||
if mode=='mark-after-commit':
|
||||
with open(os.path.join(os.path.dirname(__file__),'committed'),'w') as marker: marker.write('committed')
|
||||
out=status(); out['previous_disk_sha256']=old; out['target_drive']=drive
|
||||
elif op=='stop':
|
||||
frozen=True; out=status(); out['media_frozen']=True
|
||||
elif op=='finish_stop': out=status(); end=True
|
||||
else:
|
||||
print(json.dumps({'error':'unexpected_operation'}),flush=True); continue
|
||||
print(json.dumps({'result':out}),flush=True)
|
||||
if end: break
|
||||
"""
|
||||
try Data(source.utf8).write(to: path)
|
||||
try FileManager.default.setAttributes([.posixPermissions: 0o700], ofItemAtPath: path.path)
|
||||
return path
|
||||
}
|
||||
|
||||
func testMultiDriveLostCommitRetainsAllFrozenCopiesAndMarksOnlyTargetUncertain() async throws {
|
||||
let root = FileManager.default.temporaryDirectory.appendingPathComponent("VCCMultiLostReply-" + UUID().uuidString)
|
||||
defer { try? FileManager.default.removeItem(at: root) }
|
||||
let helper = try faultingMultiDriveHelper("exit-after-commit", root: root)
|
||||
let original = disk(); var data = disk(); data[0] = 93
|
||||
let declaration = declaredMedia(artifact: UUID().uuidString, project: "multi-lost", primary: original, world: data)
|
||||
let test = try await MCPPlaytest.start(systemROM: Data(repeating: 0, count: 32768), diskROM: Data(repeating: 0, count: 8192), disk: original,
|
||||
bootCommands: "PRINT1\n", projectID: "multi-lost", revision: 1, artifactID: declaration.proof.artifactID!, helperURL: helper,
|
||||
retentionDirectory: root.appendingPathComponent("retained"), diskProvenance: declaration.proof, media: declaration.media, multiDrive: true)
|
||||
await expectDiskFailure {
|
||||
_ = try await test.reply("exchange_playtest_media", arguments: ["run_id": test.runID,"request_id":"lost","action":"insert","drive":1,
|
||||
"media_id":declaration.media[1].id,"media_sha256":declaration.media[1].baseSHA256])
|
||||
}
|
||||
await test.invalidate().value
|
||||
let receipt = try XCTUnwrap(test.finalReceipt)
|
||||
XCTAssertEqual(receipt["media_selection_uncertain"] as? Bool, true)
|
||||
XCTAssertEqual(receipt["uncertain_drives"] as? [Int], [1])
|
||||
let drives = try XCTUnwrap(receipt["drives"] as? [[String: Any]])
|
||||
XCTAssertEqual(drives[0]["media_id"] as? String, declaration.media[0].id)
|
||||
XCTAssertTrue(drives[1]["media_id"] is NSNull)
|
||||
let retained = try XCTUnwrap(receipt["retained_media"] as? [[String: Any]])
|
||||
XCTAssertEqual(retained.count, 2)
|
||||
for medium in declaration.media {
|
||||
let row = try XCTUnwrap(retained.first { $0["media_id"] as? String == medium.id })
|
||||
XCTAssertEqual(row["disk_sha256"] as? String, medium.baseSHA256)
|
||||
}
|
||||
}
|
||||
|
||||
func testMultiDrivePartialDrainRetriesWithoutASecondStopOrRepeatedEarlierExport() async throws {
|
||||
let root = FileManager.default.temporaryDirectory.appendingPathComponent("VCCMultiPartialDrain-" + UUID().uuidString)
|
||||
defer { try? FileManager.default.removeItem(at: root) }
|
||||
let helper = try faultingMultiDriveHelper("partial-stop", root: root)
|
||||
let original = disk(), declaration = declaredMedia(artifact: UUID().uuidString, project: "multi-partial", primary: original, world: original)
|
||||
let test = try await MCPPlaytest.start(systemROM: Data(repeating: 0, count: 32768), diskROM: Data(repeating: 0, count: 8192), disk: original,
|
||||
bootCommands: "PRINT1\n", projectID: "multi-partial", revision: 1, artifactID: declaration.proof.artifactID!, helperURL: helper,
|
||||
retentionDirectory: root.appendingPathComponent("retained"), diskProvenance: declaration.proof, media: declaration.media, multiDrive: true)
|
||||
defer { test.invalidate() }
|
||||
let stop: [String: Any] = ["run_id":test.runID,"request_id":"stop"]
|
||||
await expectDiskFailure { _ = try await test.reply("stop_playtest", arguments: stop) }
|
||||
XCTAssertNotNil(test.retentionError)
|
||||
try Data("retry".utf8).write(to: root.appendingPathComponent("retry"))
|
||||
let stopped = try await test.reply("stop_playtest", arguments: stop)
|
||||
XCTAssertEqual(stopped["disk_retained"] as? Bool, true)
|
||||
let trace = try String(contentsOf: root.appendingPathComponent("trace.jsonl"), encoding: .utf8).split(separator:"\n").map {
|
||||
try XCTUnwrap(JSONSerialization.jsonObject(with: Data($0.utf8)) as? [String: Any])
|
||||
}
|
||||
XCTAssertEqual(trace.filter { $0["op"] as? String == "stop" }.count, 1)
|
||||
for drive in 0...1 { XCTAssertEqual(trace.filter { $0["op"] as? String == "export_media" && $0["drive"] as? Int == drive }.count, 1) }
|
||||
XCTAssertEqual(trace.filter { $0["op"] as? String == "export_media" && $0["drive"] as? Int == 2 }.count, 2)
|
||||
}
|
||||
|
||||
func testMultiDriveWrongExportTargetCannotPoisonAnotherMedium() async throws {
|
||||
let root = FileManager.default.temporaryDirectory.appendingPathComponent("VCCMultiWrongExport-" + UUID().uuidString)
|
||||
defer { try? FileManager.default.removeItem(at: root) }
|
||||
let helper = try faultingMultiDriveHelper("wrong-target", root: root)
|
||||
let original = disk(); var data = disk(); data[0] = 95
|
||||
let declaration = declaredMedia(artifact: UUID().uuidString, project: "multi-wrong", primary: original, world: data)
|
||||
let store = root.appendingPathComponent("retained")
|
||||
let test = try await MCPPlaytest.start(systemROM: Data(repeating: 0, count: 32768), diskROM: Data(repeating: 0, count: 8192), disk: original,
|
||||
bootCommands: "PRINT1\n", projectID: "multi-wrong", revision: 1, artifactID: declaration.proof.artifactID!, helperURL: helper,
|
||||
retentionDirectory: store, diskProvenance: declaration.proof, media: declaration.media, multiDrive: true)
|
||||
defer { test.invalidate() }
|
||||
await expectDiskFailure {
|
||||
_ = try await test.reply("exchange_playtest_media", arguments: ["run_id":test.runID,"request_id":"wrong","action":"insert","drive":1,
|
||||
"media_id":declaration.media[1].id,"media_sha256":declaration.media[1].baseSHA256])
|
||||
}
|
||||
let stopped = try await test.reply("stop_playtest", arguments: ["run_id":test.runID,"request_id":"stop"])
|
||||
let records = try XCTUnwrap(stopped["retained_media"] as? [[String: Any]])
|
||||
for medium in declaration.media {
|
||||
let record = try XCTUnwrap(records.first { $0["media_id"] as? String == medium.id })
|
||||
let id = try XCTUnwrap(record["retained_disk_id"] as? String)
|
||||
XCTAssertEqual(try Data(contentsOf: MCPPlaytestDiskStore.diskURL(directory: store,id:id)), medium.data)
|
||||
}
|
||||
}
|
||||
|
||||
func testMultiDriveRechecksRetainedOutgoingBytesBeforeAnotherReplacement() async throws {
|
||||
let root = FileManager.default.temporaryDirectory.appendingPathComponent("VCCMultiRetentionEvidence-" + UUID().uuidString)
|
||||
defer { try? FileManager.default.removeItem(at: root) }
|
||||
let helper = try faultingMultiDriveHelper("normal", root: root)
|
||||
let original = disk(); var data = disk(); data[0] = 97
|
||||
let declaration = declaredMedia(artifact: UUID().uuidString, project: "multi-retained-evidence", primary: original, world: data)
|
||||
let store = root.appendingPathComponent("retained")
|
||||
let test = try await MCPPlaytest.start(systemROM: Data(repeating: 0, count: 32768), diskROM: Data(repeating: 0, count: 8192), disk: original,
|
||||
bootCommands: "PRINT1\n", projectID: "multi-retained-evidence", revision: 1, artifactID: declaration.proof.artifactID!, helperURL: helper,
|
||||
retentionDirectory: store, diskProvenance: declaration.proof, media: declaration.media, multiDrive: true)
|
||||
defer { test.invalidate() }
|
||||
let eject = try await test.reply("exchange_playtest_media", arguments: ["run_id":test.runID,"request_id":"eject","action":"eject"])
|
||||
let previous = try XCTUnwrap(eject["previous_media"] as? [String: Any])
|
||||
let retained = try XCTUnwrap(previous["retained_disk"] as? [String: Any])
|
||||
let retainedID = try XCTUnwrap(retained["retained_disk_id"] as? String)
|
||||
_ = try await test.reply("exchange_playtest_media", arguments: ["run_id":test.runID,"request_id":"restore","action":"insert",
|
||||
"media_id":declaration.media[0].id,"media_sha256":declaration.media[0].baseSHA256])
|
||||
let url = try MCPPlaytestDiskStore.diskURL(directory: store,id:retainedID)
|
||||
try data.write(to: url)
|
||||
await expectDiskFailure {
|
||||
_ = try await test.reply("exchange_playtest_media", arguments: ["run_id":test.runID,"request_id":"changed-evidence","action":"insert",
|
||||
"media_id":declaration.media[1].id,"media_sha256":declaration.media[1].baseSHA256])
|
||||
}
|
||||
let unchanged = try await test.capture()
|
||||
XCTAssertEqual(unchanged["media_id"] as? String, declaration.media[0].id)
|
||||
XCTAssertEqual(unchanged["disk_sha256"] as? String, declaration.media[0].baseSHA256)
|
||||
XCTAssertEqual(try Data(contentsOf:url), data, "The failed swap must not silently repair changed retention evidence")
|
||||
try original.write(to:url)
|
||||
_ = try await test.reply("stop_playtest", arguments:["run_id":test.runID,"request_id":"stop"])
|
||||
}
|
||||
|
||||
func testMultiDriveLateAuthorityLossPreservesAcknowledgedTargetReceipt() async throws {
|
||||
let root = FileManager.default.temporaryDirectory.appendingPathComponent("VCCMultiLateAuthority-" + UUID().uuidString)
|
||||
defer { try? FileManager.default.removeItem(at: root) }
|
||||
let helper = try faultingMultiDriveHelper("mark-after-commit", root:root)
|
||||
let original = disk(); var data = disk(); data[0] = 99
|
||||
let declaration = declaredMedia(artifact: UUID().uuidString, project:"multi-late-authority", primary:original,world:data)
|
||||
let test = try await MCPPlaytest.start(systemROM:Data(repeating:0,count:32768),diskROM:Data(repeating:0,count:8192),disk:original,
|
||||
bootCommands:"PRINT1\n",projectID:"multi-late-authority",revision:1,artifactID:declaration.proof.artifactID!,helperURL:helper,
|
||||
retentionDirectory:root.appendingPathComponent("retained"),diskProvenance:declaration.proof,media:declaration.media,multiDrive:true)
|
||||
defer { test.invalidate() }
|
||||
let request: [String:Any] = ["run_id":test.runID,"request_id":"commit","action":"insert","drive":1,"write_protected":true,
|
||||
"media_id":declaration.media[1].id,"media_sha256":declaration.media[1].baseSHA256]
|
||||
do {
|
||||
_ = try await test.reply("exchange_playtest_media",arguments:request,isCurrent:{ !FileManager.default.fileExists(atPath:root.appendingPathComponent("committed").path) })
|
||||
XCTFail("A committed exchange cannot return through expired authority")
|
||||
} catch { XCTAssertTrue(error.localizedDescription.contains("stale_run_after_commit")) }
|
||||
let acknowledged = try await test.reply("exchange_playtest_media",arguments:request)
|
||||
XCTAssertEqual(acknowledged["target_drive"] as? Int,1)
|
||||
let rows = try XCTUnwrap(acknowledged["drives"] as? [[String:Any]])
|
||||
XCTAssertEqual(rows[1]["media_id"] as? String,declaration.media[1].id)
|
||||
XCTAssertEqual(rows[1]["media_generation"] as? Int,1)
|
||||
XCTAssertEqual(rows[1]["write_protected"] as? Bool,true)
|
||||
let stopped = try await test.reply("stop_playtest",arguments:["run_id":test.runID,"request_id":"stop"])
|
||||
let records = try XCTUnwrap(stopped["retained_media"] as? [[String:Any]])
|
||||
XCTAssertEqual(records.first { $0["media_id"] as? String == declaration.media[1].id }?["write_protected"] as? Bool,true)
|
||||
}
|
||||
|
||||
private func declaredMedia(artifact: String, project: String, primary: Data, world: Data)
|
||||
-> (key: String, proof: MCPPlaytestDiskStore.Provenance, media: [MCPPlaytestMedium]) {
|
||||
let key = CMOCProject.sha256(Data(project.utf8)), primaryHash = CMOCProject.sha256(primary)
|
||||
|
||||
@@ -220,7 +220,7 @@ final class SoftwareLibraryCuratedLaunchTests: XCTestCase {
|
||||
@MainActor func testRealDOSStartupLoadsAuthoredHelloDiskOnBothCPUs() async throws {
|
||||
let fixture = try Fixture(); defer { fixture.cleanup() }
|
||||
let mac = URL(fileURLWithPath: #filePath).deletingLastPathComponent().deletingLastPathComponent()
|
||||
let tools = mac.appendingPathComponent("LocalResources/ToolchainBundle")
|
||||
let tools = vccQualificationToolchain(mac.appendingPathComponent("LocalResources/ToolchainBundle"))
|
||||
try XCTSkipUnless(FileManager.default.isExecutableFile(atPath: tools.appendingPathComponent("bin/cmoc").path), "Stage optional bundled tools")
|
||||
_ = try fixture.initialProfile(realROMs: true)
|
||||
let template = mac.deletingLastPathComponent().deletingLastPathComponent().appendingPathComponent("examples/cmoc/HelloDisk")
|
||||
|
||||
@@ -27,6 +27,32 @@ final class SoftwareLibraryPublishedGameTests: XCTestCase {
|
||||
diskSHA256: "d05ab25fd90171b048cce54f3af18ca6d0bd81335e138044ff05315e99cbf582", ramKiB: 128, keyboardOnly: false)
|
||||
]
|
||||
}
|
||||
/// These are candidate source-rebuild identities, not publication receipts.
|
||||
/// Independently replayed in owned folders with the pinned unsigned development
|
||||
/// runtime; this is not execution of the Developer ID-signed packaged compiler.
|
||||
private struct CandidateSourceBaseline: Sendable {
|
||||
let sourceZIP: String
|
||||
let makefile: String
|
||||
let binary: String
|
||||
let disk: String
|
||||
static let runtimeManifest = "a4dd934aed84a0b139e1d88b8a607d52ff7f6fc66c3bd3be30db7fd5d40dcbef"
|
||||
static let compiler = "5769c5ffe14f0adad61c41aa72337261acc6fd882e7e6656bdcf350b414930a1"
|
||||
static let wrapper = "b83e6ea79da5160cd85f5b7665524f19f717a4a6e76e12e661900dc071a1cea6"
|
||||
static let reviewed: [String: Self] = [
|
||||
"bone-quest": .init(sourceZIP: "99f9770965f9d2061f764ebe704da95f7f037a42c5df21a959b558b25d704da6",
|
||||
makefile: "b0e9816d4b1712cd903b1e51ebb5c80901fb45ba4233f6b091e6e97fe5cdd1d7",
|
||||
binary: "f57e5818d070009cb2713fe4d70f8f0cba2bd2e5c54833d4911348a708bdb0f0",
|
||||
disk: "8614c31b92a5f3b70b7b35792414b7fd43042614de2bda4b6ff508711f157a8d"),
|
||||
"capital-quest": .init(sourceZIP: "5f0cbc6ad58594a1c21a77079b2db4a2862546b6f701c2d515fe04f9727568f3",
|
||||
makefile: "880c46b17747ed0cbe33c386b21f319b9e453ab64cab185bd7f802293226a886",
|
||||
binary: "9b2fe10ebca6c515d3cb45f649ea772058be4186b8abac3fec95c3b69d955e6b",
|
||||
disk: "28a07495e1afa5702fd7c9def0aa2c94d8671ec6cfd6de2c57d5b92b4aa0c930"),
|
||||
"quadrapassel": .init(sourceZIP: "710c8e1e9d6cfbd800d5719e30ad2057aa9bade8c81f8d1e5374634b4d208438",
|
||||
makefile: "70144a013bdf2ad4c7ea996b53a1d304d7f440236d91f22fc7e63481fb258a92",
|
||||
binary: "4893e44f7ba33c3fa3b8f8268588104038dd402fae7cd3dcdbeeca11aa3e6df5",
|
||||
disk: "49e931b0530214d9cdb2afd4f5a1f3819695b3267e70fec04dcc69f86fc5ce9f")
|
||||
]
|
||||
}
|
||||
private struct Game: Sendable {
|
||||
let fixture: Fixture
|
||||
let publicationID: String
|
||||
@@ -148,7 +174,7 @@ final class SoftwareLibraryPublishedGameTests: XCTestCase {
|
||||
}
|
||||
throw ProfileFailure.message("Published-game fixture did not settle")
|
||||
}
|
||||
@MainActor private func withMachine(output: URL, use6309: Bool,
|
||||
@MainActor private func withMachine(output: URL, use6309: Bool, startingMachine: MachineSettings? = nil,
|
||||
body: (MachineModel, VCCMachineController, UserDefaults) async throws -> Void) async throws {
|
||||
_ = NSApplication.shared // Standalone hostless runs still need AppKit's input lifecycle.
|
||||
let suite = "PublishedGame-" + UUID().uuidString
|
||||
@@ -166,6 +192,7 @@ final class SoftwareLibraryPublishedGameTests: XCTestCase {
|
||||
&& FileManager.default.fileExists(atPath: profile.media.rom!.path), "Stage explicit local CoCo/Disk BASIC ROM inputs")
|
||||
profile.sound = false; profile.videoOutput = 0
|
||||
profile.machine.ram = 2; profile.machine.use6309 = !use6309
|
||||
if let startingMachine { profile.machine = startingMachine }
|
||||
profile.input.right.source = .keyboard; profile.input.left.source = .none
|
||||
var cartridges = CartridgeAssignments(); cartridges.multiPak = true; cartridges.mpiConfigured = true
|
||||
cartridges.physicalSlot = 4; cartridges.slots[4].kind = .floppy; profile.media.cartridges = cartridges
|
||||
@@ -209,6 +236,32 @@ final class SoftwareLibraryPublishedGameTests: XCTestCase {
|
||||
guard made else { throw ProfileFailure.message("Published acceptance image could not be rendered") }
|
||||
rgba = pixels
|
||||
}
|
||||
func changedPixelFraction(comparedTo before: Raster) -> Double {
|
||||
guard width == before.width, height == before.height else { return 1 }
|
||||
var changed = 0
|
||||
for offset in stride(from: 0, to: rgba.count, by: 4) {
|
||||
if (0..<3).contains(where: { abs(Int(rgba[offset + $0]) - Int(before.rgba[offset + $0])) > 28 }) { changed += 1 }
|
||||
}
|
||||
return Double(changed) / Double(width * height)
|
||||
}
|
||||
/// Compare only authored, static PLAY UI in the 320x192 reference.
|
||||
/// Coordinates map through the captured active picture, never full-frame
|
||||
/// borders. Black background, pieces, preview tiles and numbers are omitted.
|
||||
func staticForegroundMatch(to reference: Raster, regions: [CGRect]) -> (score: Double, pixels: Int, matched: Int) {
|
||||
var foreground = 0, matched = 0
|
||||
for region in regions {
|
||||
guard region.minX >= 0, region.minY >= 0,
|
||||
region.maxX <= CGFloat(reference.width), region.maxY <= CGFloat(reference.height) else { return (0, 0, 0) }
|
||||
for y in Int(region.minY)..<Int(region.maxY) { for x in Int(region.minX)..<Int(region.maxX) {
|
||||
let r = (y * reference.width + x) * 4
|
||||
if (0..<3).allSatisfy({ reference.rgba[r + $0] <= 28 }) { continue }
|
||||
foreground += 1
|
||||
let a = ((y * height / reference.height) * width + x * width / reference.width) * 4
|
||||
if (0..<3).allSatisfy({ abs(Int(rgba[a + $0]) - Int(reference.rgba[r + $0])) <= 28 }) { matched += 1 }
|
||||
} }
|
||||
}
|
||||
return (foreground > 100 ? Double(matched) / Double(foreground) : 0, foreground, matched)
|
||||
}
|
||||
func similarity(to reference: Raster) -> Double {
|
||||
var histogram: [UInt32: Int] = [:]
|
||||
for index in stride(from: 0, to: reference.rgba.count, by: 4) {
|
||||
@@ -325,6 +378,257 @@ final class SoftwareLibraryPublishedGameTests: XCTestCase {
|
||||
XCTAssertEqual(afterBuild.logicalMemory, before.logicalMemory)
|
||||
return report
|
||||
}
|
||||
@MainActor private func startCandidateDOS(_ model: MachineModel, controller: VCCMachineController) async throws {
|
||||
// Native owned-media qualification observes the core's readiness only.
|
||||
// The shared-program MCP screen surface intentionally rejects writable
|
||||
// disks; it is not the permission path for this disposable native session.
|
||||
// Visible OK precedes BASIC's direct-input loop, so require both actual
|
||||
// direct input and a stable final OK on mature guest fields before typing.
|
||||
let initial = await step(controller.snapshot)
|
||||
guard initial.errorMessage == nil else {
|
||||
throw ProfileFailure.message(initial.errorMessage ?? "Candidate Disk BASIC startup failed")
|
||||
}
|
||||
var ready = false, readyObservations = 0
|
||||
var firstReadyField: UInt64?
|
||||
var lastText = "(unavailable)"
|
||||
var last = initial
|
||||
let deadline = ContinuousClock.now.advanced(by: .seconds(15))
|
||||
while ContinuousClock.now < deadline {
|
||||
let readiness = await step(controller.assistantReadiness)
|
||||
let (text, snapshot): (String?, VCCMachineSnapshot) = await withCheckedContinuation { done in
|
||||
controller.inspectScreenText { done.resume(returning: ($0, $1)) }
|
||||
}
|
||||
last = snapshot; lastText = text ?? "(unavailable)"
|
||||
guard readiness.errorMessage == nil, snapshot.errorMessage == nil,
|
||||
readiness.state == .running, snapshot.state == .running,
|
||||
readiness.generation == initial.generation, snapshot.generation == initial.generation else {
|
||||
throw ProfileFailure.message(snapshot.errorMessage ?? readiness.errorMessage ?? "Candidate Disk BASIC changed during startup readiness checks")
|
||||
}
|
||||
let lines = (text ?? "").split(separator: "\n").map { $0.trimmingCharacters(in: .whitespaces) }.filter { !$0.isEmpty }
|
||||
guard !lines.contains(where: { $0.hasPrefix("?") }) else {
|
||||
throw ProfileFailure.message("Candidate Disk BASIC reported an error before DOS; no command was sent")
|
||||
}
|
||||
if readiness.assistantDirectPrompt?.boolValue == true,
|
||||
readiness.assistantEmptyBASIC?.boolValue == true,
|
||||
lines.last == "OK", readiness.pasteRemaining == 0, snapshot.pasteRemaining == 0 {
|
||||
readyObservations += 1
|
||||
if firstReadyField == nil { firstReadyField = readiness.frames }
|
||||
if readyObservations >= 2, let firstReadyField, readiness.frames >= firstReadyField + 6 {
|
||||
ready = true; break
|
||||
}
|
||||
} else { readyObservations = 0; firstReadyField = nil }
|
||||
try await Task.sleep(for: .milliseconds(100))
|
||||
}
|
||||
guard ready else {
|
||||
throw ProfileFailure.message("Candidate disk did not reach stable native direct Disk BASIC readiness; no command was sent. Screen: " + lastText +
|
||||
String(format: " PC %04X, frame %llu.", last.programCounter, last.frames))
|
||||
}
|
||||
try await settle(model)
|
||||
guard model.canPaste else { throw ProfileFailure.message("Candidate Disk BASIC was not ready for ordinary keyboard input") }
|
||||
model.startPaste(try CocoPaste("DOS\n", mode: .text))
|
||||
try await settle(model)
|
||||
}
|
||||
|
||||
/// The published-binary test below deliberately retains its original hash
|
||||
/// contract. This separate opt-in checks the reviewed compiler's different
|
||||
/// outputs and actually boots those outputs, never a substituted old disk.
|
||||
@MainActor func testReviewedCMOC101SourceRebuildsBootAndRespondOnBothGuestCPUs() async throws {
|
||||
guard let path = ProcessInfo.processInfo.environment["VCC_TEST_TOOLCHAIN_DIR"] else {
|
||||
throw XCTSkip("Set the pinned unsigned development toolchain and private published-game fixture inputs for current-compiler qualification")
|
||||
}
|
||||
guard path.hasPrefix("/") else { throw ProfileFailure.message("Candidate compiler qualification requires an absolute runtime path") }
|
||||
let toolchain = URL(fileURLWithPath: path)
|
||||
let manifestData = try Data(contentsOf: toolchain.appendingPathComponent("manifest.json"))
|
||||
let compilerData = try Data(contentsOf: toolchain.appendingPathComponent("libexec/cmoc"))
|
||||
let wrapperData = try Data(contentsOf: toolchain.appendingPathComponent("bin/cmoc"))
|
||||
guard Self.sha(manifestData) == CandidateSourceBaseline.runtimeManifest,
|
||||
Self.sha(compilerData) == CandidateSourceBaseline.compiler,
|
||||
Self.sha(wrapperData) == CandidateSourceBaseline.wrapper else {
|
||||
throw ProfileFailure.message("Unknown candidate compiler/runtime identity: independently review and qualify new rebuild baselines before accepting these bytes")
|
||||
}
|
||||
let inputs = try await inputs()
|
||||
var results: [[String: Any]] = []
|
||||
for game in inputs.games {
|
||||
guard let expected = CandidateSourceBaseline.reviewed[game.slug],
|
||||
game.owned.source.package.sha256 == expected.sourceZIP else {
|
||||
throw ProfileFailure.message("The published source package has no reviewed candidate rebuild baseline")
|
||||
}
|
||||
let gameOutput = inputs.output.appendingPathComponent(game.slug)
|
||||
try FileManager.default.createDirectory(at: gameOutput, withIntermediateDirectories: true)
|
||||
let importer = SoftwareLibrarySourceImporter(cacheDirectory: gameOutput.appendingPathComponent("Candidate source originals"))
|
||||
let imported = try await importer.importProject(game.owned.source, to: gameOutput.appendingPathComponent("Candidate Source With Spaces"))
|
||||
guard Self.sha(try Data(contentsOf: imported.originalPackage)) == expected.sourceZIP else {
|
||||
throw ProfileFailure.message("Candidate source archive differs from the reviewed immutable package")
|
||||
}
|
||||
let project = try CMOCProject.open(at: imported.projectDirectory)
|
||||
let originalInputs = try project.inputFiles()
|
||||
let originalMakefile = try Data(contentsOf: project.makefileURL)
|
||||
guard Self.sha(originalMakefile) == expected.makefile else {
|
||||
throw ProfileFailure.message("Candidate source Makefile differs from the reviewed unmodified recipe")
|
||||
}
|
||||
let build = try await CMOCBuildService(toolchain: toolchain, buildRoot: gameOutput.appendingPathComponent("Candidate source qualification"))
|
||||
.build(project: project, overlays: [:], action: .disk, configuration: "Release")
|
||||
let disk = try Data(contentsOf: XCTUnwrap(build.diskURL))
|
||||
guard Self.sha(build.binaryData) == expected.binary, build.diskSHA256 == expected.disk,
|
||||
Self.sha(disk) == expected.disk else {
|
||||
throw ProfileFailure.message("Candidate compiler output differs from the independently replayed exact BIN/DSK baseline")
|
||||
}
|
||||
XCTAssertEqual(build.configurationName, "Release")
|
||||
XCTAssertEqual(try project.inputFiles(), originalInputs, "Candidate compilation must preserve every imported input")
|
||||
XCTAssertEqual(try Data(contentsOf: project.makefileURL), originalMakefile)
|
||||
let hero = try artwork(game.record["artwork"]["hero"], id: game.slug + "-candidate-title")
|
||||
let referenceData = try await SoftwareLibraryArtworkCache().thumbnail(for: hero, directory: gameOutput.appendingPathComponent("Artwork"))
|
||||
let reference = try Raster(referenceData)
|
||||
let gameplayReferenceSHA = "dd6c5b0e02e3a7c995056a436a4379ab617c7a0c60ddf246ad5ac9163e5239b8"
|
||||
// Source-authored stable captions and all four well borders only.
|
||||
// Exclude board cells, NEXT/HOLD previews and changing score values.
|
||||
let gameplayStaticRegions: [CGRect] = [
|
||||
CGRect(x: 32, y: 0, width: 168, height: 8),
|
||||
CGRect(x: 32, y: 32, width: 40, height: 8),
|
||||
CGRect(x: 32, y: 64, width: 40, height: 8),
|
||||
CGRect(x: 32, y: 96, width: 40, height: 8),
|
||||
CGRect(x: 216, y: 24, width: 32, height: 8),
|
||||
CGRect(x: 216, y: 80, width: 32, height: 8),
|
||||
CGRect(x: 32, y: 144, width: 48, height: 8),
|
||||
CGRect(x: 32, y: 168, width: 72, height: 8),
|
||||
CGRect(x: 118, y: 22, width: 84, height: 2),
|
||||
CGRect(x: 118, y: 184, width: 84, height: 2),
|
||||
CGRect(x: 118, y: 24, width: 2, height: 160),
|
||||
CGRect(x: 200, y: 24, width: 2, height: 160)
|
||||
]
|
||||
let gameplayReference: Raster?
|
||||
if game.slug == "quadrapassel" {
|
||||
let gameplayData = try Data(contentsOf: imported.projectDirectory.appendingPathComponent("docs/manual/images/gameplay.png"))
|
||||
guard Self.sha(gameplayData) == gameplayReferenceSHA else {
|
||||
throw ProfileFailure.message("The source-authored Quadrapassel PLAY reference changed; review it before accepting gameplay qualification")
|
||||
}
|
||||
let raster = try Raster(gameplayData)
|
||||
guard raster.width == 320, raster.height == 192 else {
|
||||
throw ProfileFailure.message("The reviewed Quadrapassel PLAY reference must use its authored 320x192 coordinates")
|
||||
}
|
||||
gameplayReference = raster
|
||||
} else { gameplayReference = nil }
|
||||
for use6309 in [false, true] {
|
||||
let output = gameOutput.appendingPathComponent(use6309 ? "candidate-6309" : "candidate-6809")
|
||||
try FileManager.default.createDirectory(at: output, withIntermediateDirectories: true)
|
||||
let working = output.appendingPathComponent("CandidateWorking.DSK")
|
||||
try disk.write(to: working, options: .withoutOverwriting)
|
||||
var settings = MachineSettings()
|
||||
settings.use6309 = use6309; settings.ram = game.fixture.ramKiB == 128 ? 0 : 1
|
||||
try await withMachine(output: output, use6309: use6309, startingMachine: settings) { model, controller, _ in
|
||||
try await model.insertDiskFromMedia(working, drive: 0, execution: .run, reset: .coldRestart)
|
||||
try await startCandidateDOS(model, controller: controller)
|
||||
let (first, titleSimilarity) = try await waitForTitle(reference: reference, controller: controller,
|
||||
output: output.appendingPathComponent("candidate-first-title.png"))
|
||||
XCTAssertEqual(first.use6309, use6309)
|
||||
XCTAssertEqual(first.ramConfiguration, UInt(settings.ram))
|
||||
XCTAssertEqual(first.videoOutput, 0); XCTAssertTrue(first.disks[0].mounted)
|
||||
XCTAssertFalse(first.debuggerDevelopmentAttached)
|
||||
XCTAssertNil(first.errorMessage)
|
||||
XCTAssertEqual(first.cpuOverclock, 1); XCTAssertEqual(first.frameInterval, 1); XCTAssertFalse(first.fastForward)
|
||||
// An idle title must remain recognizable before ordinary input.
|
||||
// A cursor blink or an animated tile alone cannot qualify a start.
|
||||
try await Task.sleep(nanoseconds: 500_000_000)
|
||||
let idle = await step(controller.snapshot)
|
||||
let titleArea = reference.width == 640 && reference.height == 480 ? VideoGeometry.fullFrame : idle.activeVideoRect
|
||||
let idleRaster = try Raster(ScreenCapture(pixels: idle.pixels, area: titleArea).png())
|
||||
let idleTitleSimilarity = idleRaster.similarity(to: reference)
|
||||
guard idle.state == .running, idle.generation == first.generation, idle.errorMessage == nil,
|
||||
idleTitleSimilarity >= 0.95 else {
|
||||
throw ProfileFailure.message("Candidate title changed before start input; inspect the idle scene before accepting a transition")
|
||||
}
|
||||
let beforePixels = try ScreenCapture(pixels: first.pixels, area: VideoGeometry.fullFrame).png()
|
||||
let before = try Raster(beforePixels)
|
||||
let key = game.slug == "quadrapassel" ? " " : "1"
|
||||
var keyboard = CocoKeyboard()
|
||||
keyboard.press(code: game.slug == "quadrapassel" ? 49 : 18, characters: key)
|
||||
let mask = keyboard.mask
|
||||
XCTAssertNotEqual(mask, 0)
|
||||
controller.setKeyboardMask(mask)
|
||||
try await Task.sleep(nanoseconds: 200_000_000)
|
||||
controller.setKeyboardMask(0)
|
||||
var progress: (VCCMachineSnapshot, Data, Double, Double)?
|
||||
var gameplayProof: (score: Double, pixels: Int, matched: Int)?
|
||||
var changedFrames = 0
|
||||
for _ in 0..<80 {
|
||||
try await Task.sleep(nanoseconds: 100_000_000)
|
||||
let snapshot = await step(controller.snapshot)
|
||||
guard snapshot.state == .running, snapshot.generation == first.generation,
|
||||
snapshot.frames > idle.frames + 4, snapshot.pasteRemaining == 0, snapshot.errorMessage == nil else { continue }
|
||||
let png = try ScreenCapture(pixels: snapshot.pixels, area: VideoGeometry.fullFrame).png()
|
||||
let difference = try Raster(png).changedPixelFraction(comparedTo: before)
|
||||
let sceneArea = reference.width == 640 && reference.height == 480 ? VideoGeometry.fullFrame : snapshot.activeVideoRect
|
||||
let scene = try Raster(ScreenCapture(pixels: snapshot.pixels, area: sceneArea).png())
|
||||
let titleSimilarity = scene.similarity(to: reference)
|
||||
let staticMatch: (score: Double, pixels: Int, matched: Int)?
|
||||
if let gameplayReference {
|
||||
let activeScene = try Raster(ScreenCapture(pixels: snapshot.pixels, area: snapshot.activeVideoRect).png())
|
||||
staticMatch = activeScene.staticForegroundMatch(to: gameplayReference, regions: gameplayStaticRegions)
|
||||
} else { staticMatch = nil }
|
||||
let gameplayReady = staticMatch.map { $0.score >= 0.95 && $0.pixels > 100 } ?? true
|
||||
changedFrames = difference >= 0.005 && titleSimilarity < 0.90 && gameplayReady ? changedFrames + 1 : 0
|
||||
if changedFrames >= 2 {
|
||||
progress = (snapshot, png, difference, titleSimilarity); gameplayProof = staticMatch; break
|
||||
}
|
||||
}
|
||||
guard let progress else { throw ProfileFailure.message("Candidate-built game did not leave its stable title scene after normal start input") }
|
||||
let (guestText, inspected): (String?, VCCMachineSnapshot) = await withCheckedContinuation { done in
|
||||
controller.inspectScreenText { done.resume(returning: ($0, $1)) }
|
||||
}
|
||||
XCTAssertNil(inspected.errorMessage)
|
||||
XCTAssertEqual(inspected.generation, first.generation)
|
||||
if let guestText {
|
||||
let lines = guestText.uppercased().split(whereSeparator: \.isNewline).map { $0.trimmingCharacters(in: .whitespaces) }
|
||||
guard !lines.contains(where: { $0 == "OK" || $0.hasPrefix("?") }) else {
|
||||
throw ProfileFailure.message("Candidate start input returned to BASIC or an error prompt instead of remaining in the game")
|
||||
}
|
||||
}
|
||||
XCTAssertEqual(progress.0.cpuOverclock, 1); XCTAssertEqual(progress.0.frameInterval, 1); XCTAssertFalse(progress.0.fastForward)
|
||||
try progress.1.write(to: output.appendingPathComponent("candidate-after-start-key.png"), options: .atomic)
|
||||
_ = await step(controller.pause); try await settle(model)
|
||||
let retainedBeforeRestart = try await model.snapshotDiskCopy(inDrive: 0)
|
||||
model.reset(); try await settle(model); model.resume(); try await settle(model)
|
||||
let retainedAfterRestart = try await model.snapshotDiskCopy(inDrive: 0)
|
||||
XCTAssertEqual(retainedAfterRestart, retainedBeforeRestart, "Cold restart must keep the owned working disk rather than replace it from a published package")
|
||||
try await startCandidateDOS(model, controller: controller)
|
||||
let (second, restartSimilarity) = try await waitForTitle(reference: reference, controller: controller,
|
||||
output: output.appendingPathComponent("candidate-restarted-title.png"))
|
||||
XCTAssertNotEqual(second.generation, first.generation)
|
||||
XCTAssertEqual(second.use6309, use6309); XCTAssertEqual(second.ramConfiguration, UInt(settings.ram))
|
||||
XCTAssertNil(second.errorMessage)
|
||||
XCTAssertEqual(second.cpuOverclock, 1); XCTAssertEqual(second.frameInterval, 1); XCTAssertFalse(second.fastForward)
|
||||
XCTAssertEqual(Self.sha(try Data(contentsOf: XCTUnwrap(build.diskURL))), expected.disk, "The frozen candidate artifact must not be the guest's writable copy")
|
||||
var gameplayReceipt: [String: Any] = [:]
|
||||
if let gameplayProof {
|
||||
gameplayReceipt = ["gameplay_reference_sha256": gameplayReferenceSHA,
|
||||
"gameplay_reference_size": [320, 192],
|
||||
"gameplay_static_regions": gameplayStaticRegions.map { [Int($0.minX), Int($0.minY), Int($0.width), Int($0.height)] },
|
||||
"gameplay_static_foreground_pixels": gameplayProof.pixels,
|
||||
"gameplay_static_matched_pixels": gameplayProof.matched,
|
||||
"gameplay_static_foreground_similarity": gameplayProof.score,
|
||||
"gameplay_static_matching_observations": changedFrames]
|
||||
}
|
||||
results.append(["game": game.slug, "cpu": use6309 ? "6309" : "6809", "host_architecture": Self.architecture,
|
||||
"source_zip_sha256": expected.sourceZIP, "makefile_sha256": expected.makefile,
|
||||
"compiler_sha256": CandidateSourceBaseline.compiler, "runtime_manifest_sha256": CandidateSourceBaseline.runtimeManifest,
|
||||
"runtime_kind": "pinned_unsigned_development_runtime", "packaged_compiler_execution": false,
|
||||
"configuration": "Release", "candidate_binary_sha256": expected.binary, "candidate_disk_sha256": expected.disk,
|
||||
"published_disk_sha256": game.fixture.diskSHA256, "candidate_is_published": false,
|
||||
"ram_kib": game.fixture.ramKiB, "first_title_foreground_similarity": titleSimilarity,
|
||||
"restart_title_foreground_similarity": restartSimilarity, "normal_start_key": key == " " ? "space" : key,
|
||||
"idle_title_foreground_similarity": idleTitleSimilarity, "post_start_title_foreground_similarity": progress.3,
|
||||
"stock_speed": true, "basic_or_error_prompt_after_start": false,
|
||||
"visible_changed_pixel_fraction": progress.2, "normal_input_fields_advanced": progress.0.frames - first.frames,
|
||||
"working_disk_preserved_across_restart": true,
|
||||
"coverage": "Exact unsigned-development-runtime rebuild, normal DOS startup, rendered title, ordinary start-key title-to-game transition and cold restart; not packaged compiler execution or a full game playthrough"].merging(gameplayReceipt) { _, proof in proof })
|
||||
try JSONSerialization.data(withJSONObject: results, options: [.prettyPrinted, .sortedKeys])
|
||||
.write(to: inputs.output.appendingPathComponent("CandidateSourceAcceptance.json"), options: .atomic)
|
||||
}
|
||||
}
|
||||
}
|
||||
XCTAssertEqual(results.count, Fixture.approved.count * 2)
|
||||
}
|
||||
|
||||
@MainActor func testPublishedFirstAndCachedPlaySourceAndManualAcceptance() async throws {
|
||||
let inputs = try await inputs()
|
||||
var results: [[String: Any]] = []
|
||||
|
||||
@@ -53,6 +53,22 @@ static NSArray<NSDictionary *> *MCPProjectTools(BOOL assembly, BOOL interactive,
|
||||
@{@"run_id":identifier, @"request_id":keyRequestID, @"keys":MCPGuestKeySchema(NO)}, NO)]];
|
||||
}
|
||||
|
||||
// Destination permission is granted natively and never inferred from Make access.
|
||||
static NSArray<NSDictionary *> *MCPBuildExportTools() {
|
||||
NSDictionary *id = @{@"type":@"string",@"minLength":@1,@"maxLength":@128};
|
||||
NSDictionary *properties = @{@"project_id":id,@"build_id":id,@"artifact_id":id,
|
||||
@"revision":@{@"type":@"integer",@"minimum":@0},@"destination_id":id,@"request_id":id,
|
||||
@"output_ids":@{@"type":@"array",@"items":id,@"minItems":@1,@"maxItems":@64,@"uniqueItems":@YES}};
|
||||
return @[
|
||||
@{@"name":@"export_build_outputs",@"description":@"Deliver selected exportable_outputs from an exact successful build to its natively approved destination_id. Supply the original build revision and artifact_id, including for an earlier Release after building Debug. Creates a new exclusive delivery set; never replaces files. Returns export_id/status immediately; poll get_build_export. Retry the identical request_id to reuse and verify the original delivery. Changed selections conflict; changed source/destination bytes fail. No paths or arbitrary workspace files are accepted. Limits: 64 files, 64 MiB/file, 128 MiB/set, 512 MiB and 64 requests per connection, one active export.",
|
||||
@"inputSchema":@{@"type":@"object",@"properties":properties,@"required":[properties.allKeys sortedArrayUsingSelector:@selector(compare:)],@"additionalProperties":@NO},
|
||||
@"annotations":@{@"readOnlyHint":@NO,@"openWorldHint":@NO}},
|
||||
@{@"name":@"get_build_export",@"description":@"Poll one owned export_id. A completed receipt preserves original project/build/artifact/revision/configuration identities and reports delivered relative filenames, original sizes and SHA-256 hashes. Independently verify these bytes; an identical export retry verifies the existing delivery rather than silently repairing changes.",
|
||||
@"inputSchema":@{@"type":@"object",@"properties":@{@"project_id":id,@"export_id":id},@"required":@[@"project_id",@"export_id"],@"additionalProperties":@NO},
|
||||
@"annotations":@{@"readOnlyHint":@YES,@"openWorldHint":@NO}}
|
||||
];
|
||||
}
|
||||
|
||||
// Added only when the running app explicitly advertises project refresh.
|
||||
static NSArray<NSDictionary *> *MCPProjectRefreshTools() {
|
||||
NSDictionary *identifier = @{@"type":@"string", @"minLength":@1, @"maxLength":@128};
|
||||
@@ -129,7 +145,7 @@ static NSArray<NSDictionary *> *MCPPlaytestCallContextTools() {
|
||||
|
||||
// Fresh reviewed media-aware C playtest grants only. The two insertion fields
|
||||
// are action-specific in discovery as well as helper/host validation.
|
||||
static NSArray<NSDictionary *> *MCPPlaytestMediaTools() {
|
||||
static NSArray<NSDictionary *> *MCPPlaytestMediaTools(BOOL multiDrive = NO) {
|
||||
NSDictionary *identifier = @{ @"type":@"string", @"minLength":@1, @"maxLength":@64 };
|
||||
NSDictionary *mediaID = @{ @"type":@"string", @"minLength":@1, @"maxLength":@64,
|
||||
@"pattern":@"^[A-Za-z0-9_-]{1,64}$", @"description":@"Opaque ID from list_playtest_media; never a host path." };
|
||||
@@ -141,6 +157,14 @@ static NSArray<NSDictionary *> *MCPPlaytestMediaTools() {
|
||||
@"action":@{ @"type":@"string", @"enum":@[ @"insert" ] }, @"media_id":mediaID, @"media_sha256":sha };
|
||||
NSDictionary *ejectProperties = @{ @"run_id":identifier, @"request_id":identifier,
|
||||
@"action":@{ @"type":@"string", @"enum":@[ @"eject" ] } };
|
||||
if (multiDrive) {
|
||||
NSDictionary *drive = @{@"type":@"integer",@"minimum":@0,@"maximum":@3,@"default":@0,
|
||||
@"description":@"Target FD0–FD3. Omission means FD0; never wraps."};
|
||||
NSMutableDictionary *insert = [insertProperties mutableCopy]; insert[@"drive"] = drive;
|
||||
insert[@"write_protected"] = @{@"type":@"boolean",@"description":@"Optional owned-copy write protection. Omission preserves its setting; false cannot override format-imposed protection."};
|
||||
insertProperties = insert;
|
||||
NSMutableDictionary *eject = [ejectProperties mutableCopy]; eject[@"drive"] = drive; ejectProperties = eject;
|
||||
}
|
||||
NSMutableDictionary *exchangeProperties = [insertProperties mutableCopy];
|
||||
exchangeProperties[@"action"] = @{ @"type":@"string", @"enum":@[ @"insert", @"eject" ] };
|
||||
return @[
|
||||
@@ -148,7 +172,7 @@ static NSArray<NSDictionary *> *MCPPlaytestMediaTools() {
|
||||
@"inputSchema":@{ @"type":@"object", @"properties":listProperties,
|
||||
@"required":@[ @"project_id", @"revision", @"artifact_id" ], @"additionalProperties":@NO },
|
||||
@"annotations":@{ @"readOnlyHint":@YES, @"openWorldHint":@NO } },
|
||||
@{ @"name":@"exchange_playtest_media", @"description":@"Insert or eject FD0 in a paused owned disposable run while its floppy controller is idle. Insert requires media_id and exact media_sha256 from that run's listing; eject forbids both. Uses only reviewed artifact-bound private writable disks, preserving every disk across swaps and restart and retaining all disks when the run stops. A successful exchange neither resets nor advances the guest; receipts identify old/new media, hashes, dirty/retained state and clock. Failed exchange preserves the mounted disk and data. Reuse request_id only for the identical action and selection; changed plans conflict. No arbitrary paths, personal media, memory or register writes.",
|
||||
@{ @"name":@"exchange_playtest_media", @"description":multiDrive ? @"Insert/eject only the selected drive FD0–FD3 (optional drive defaults to 0) in a paused owned run with the shared floppy controller idle. Insert requires reviewed media_id and exact current hash; optional boolean write_protected changes only that owned copy. Eject forbids media/hash/protection fields. Reject duplicate mounting of one writable copy. Old FD0 fields retain their meaning; drives lists all four placements, current/original hashes, generations, write protection and actual read/write byte transfers. Preserve all copies independently through exchange, cold restart, stop and retention. No reset, guest time advance, default-drive change or personal-session access. Reuse request_id only for the identical normalized drive/action/selection/protection plan." : @"Insert or eject FD0 in a paused owned disposable run while its floppy controller is idle. Insert requires media_id and exact media_sha256 from that run's listing; eject forbids both. Uses only reviewed artifact-bound private writable disks, preserving every disk across swaps and restart and retaining all disks when the run stops. A successful exchange neither resets nor advances the guest; receipts identify old/new media, hashes, dirty/retained state and clock. Failed exchange preserves the mounted disk and data. Reuse request_id only for the identical action and selection; changed plans conflict. No arbitrary paths, personal media, memory or register writes.",
|
||||
@"inputSchema":@{ @"type":@"object", @"properties":exchangeProperties,
|
||||
@"required":@[ @"run_id", @"request_id", @"action" ], @"additionalProperties":@NO,
|
||||
@"oneOf":@[
|
||||
|
||||
@@ -495,8 +495,13 @@ int main(int argc, char **argv) {
|
||||
const bool mediaExchange = [grant[@"kind"] isEqual:@"cmoc"] && toolset >= 11 &&
|
||||
[grant[@"playtest"] isEqual:@YES] && CFGetTypeID((__bridge CFTypeRef)grant[@"playtest"]) == CFBooleanGetTypeID() &&
|
||||
[grant[@"playtestMedia"] isEqual:@YES] && CFGetTypeID((__bridge CFTypeRef)grant[@"playtestMedia"]) == CFBooleanGetTypeID();
|
||||
const bool multiDrive = mediaExchange && toolset >= 13 &&
|
||||
[grant[@"playtestMultiDrive"] isEqual:@YES] && CFGetTypeID((__bridge CFTypeRef)grant[@"playtestMultiDrive"]) == CFBooleanGetTypeID();
|
||||
tools = [MCPProjectTools([grant[@"kind"] isEqual:@"assembly"], toolset >= 3,
|
||||
customMake) arrayByAddingObjectsFromArray:manualTools];
|
||||
if ([grant[@"kind"] isEqual:@"cmoc"] && toolset >= 13 &&
|
||||
[grant[@"buildExport"] isEqual:@YES] && CFGetTypeID((__bridge CFTypeRef)grant[@"buildExport"]) == CFBooleanGetTypeID())
|
||||
tools = [tools arrayByAddingObjectsFromArray:MCPBuildExportTools()];
|
||||
if ([grant[@"kind"] isEqual:@"cmoc"] && toolset >= 6 && [grant[@"projectRefresh"] isEqual:@YES])
|
||||
tools = [tools arrayByAddingObjectsFromArray:MCPProjectRefreshTools()];
|
||||
if ([grant[@"kind"] isEqual:@"cmoc"] && toolset >= 7 && [grant[@"projectDiagnostics"] isEqual:@YES])
|
||||
@@ -519,7 +524,7 @@ int main(int argc, char **argv) {
|
||||
CFGetTypeID((__bridge CFTypeRef)grant[@"playtestCallContext"]) == CFBooleanGetTypeID())
|
||||
tools = [tools arrayByAddingObjectsFromArray:MCPPlaytestCallContextTools()];
|
||||
if (mediaExchange)
|
||||
tools = [tools arrayByAddingObjectsFromArray:MCPPlaytestMediaTools()];
|
||||
tools = [tools arrayByAddingObjectsFromArray:MCPPlaytestMediaTools(multiDrive)];
|
||||
} else {
|
||||
tools = [@[tool(@"get_capabilities", @"Identify the connected VCC Plus session and selected BASIC document.", nil),
|
||||
tool(@"read_source", @"Read the selected BASIC draft using its document_id from get_capabilities.", @"document_id")]
|
||||
|
||||
@@ -281,7 +281,10 @@ class Playtest {
|
||||
}
|
||||
void armStop() { armEvidence(stops, stopModule); }
|
||||
void armInspection() { armEvidence({}, {}); }
|
||||
uint64_t consumed = 0, fieldClock = 0, bootNumber = 0, mediaGeneration = 0;
|
||||
uint64_t consumed = 0, fieldClock = 0, bootNumber = 0;
|
||||
std::array<uint64_t, 4> mediaGenerations{}, mountReadBases{}, mountWriteBases{};
|
||||
bool multiDrive = false, frozenForRetention = false;
|
||||
unsigned drainedDrives = 0;
|
||||
VCCPlaytestVideoWriter *videoWriter = nil;
|
||||
NSMutableDictionary *videoInfo = nil;
|
||||
NSURL *videoDirectory = nil;
|
||||
@@ -332,54 +335,80 @@ class Playtest {
|
||||
else if (fieldClock - videoFirstField >= videoMaximumFields) finishVideo(@"field_limit");
|
||||
}
|
||||
Processor processor = Processor::MC6809;
|
||||
NSString *originalDiskHash = nil, *currentMediaID = nil;
|
||||
NSString *diskHash() const {
|
||||
const auto *image = floppy ? floppy->image(0) : nullptr;
|
||||
NSMutableArray *originalDiskHashes = [NSMutableArray arrayWithObjects:@"", @"", @"", @"", nil];
|
||||
NSMutableArray *currentMediaIDs = [NSMutableArray arrayWithObjects:NSNull.null, NSNull.null, NSNull.null, NSNull.null, nil];
|
||||
NSString *mediaID(unsigned drive) const {
|
||||
id value = currentMediaIDs[drive];
|
||||
return [value isKindOfClass:NSString.class] ? value : nil;
|
||||
}
|
||||
NSString *diskHash(unsigned drive = 0) const {
|
||||
const auto *image = floppy ? floppy->image(drive) : nullptr;
|
||||
return image ? sha256(image->bytes()) : @"";
|
||||
}
|
||||
NSDictionary *driveStatus(unsigned drive) const {
|
||||
const auto *image = floppy->image(drive);
|
||||
return @{@"drive": @(drive), @"label": [NSString stringWithFormat:@"FD%u", drive],
|
||||
@"inserted": @(image != nullptr), @"disk_present": @(image != nullptr),
|
||||
@"media_id": mediaID(drive) ?: (id)NSNull.null,
|
||||
@"disk_original_sha256": originalDiskHashes[drive], @"disk_sha256": diskHash(drive),
|
||||
@"media_generation": @(mediaGenerations[drive]), @"byte_count": @(image ? image->bytes().size() : 0),
|
||||
@"disk_dirty": @(image && image->dirty()), @"write_protected": @(image && image->writeProtected()),
|
||||
@"disk_reads": @(floppy->readEvents(drive)), @"disk_writes": @(floppy->writeEvents(drive)),
|
||||
@"mount_read_bytes": @(floppy->readEvents(drive) - mountReadBases[drive]),
|
||||
@"mount_write_bytes": @(floppy->writeEvents(drive) - mountWriteBases[drive])};
|
||||
}
|
||||
void requireMediaExchangeState() const {
|
||||
if (machine->snapshot().state != RunState::Paused) throw std::runtime_error("playtest_not_stopped");
|
||||
// Motor activity or previously written bytes do not mean a transfer is
|
||||
// pending. Only the actual FDC busy state prevents a disk exchange.
|
||||
// A pending command on ANY drive protects the shared controller.
|
||||
if (floppy->snapshot().busy) throw std::runtime_error("playtest_media_busy");
|
||||
}
|
||||
NSDictionary *exportMedia() const {
|
||||
requireMediaExchangeState();
|
||||
NSDictionary *exportMedia(unsigned drive = 0) {
|
||||
if (!frozenForRetention) requireMediaExchangeState();
|
||||
NSMutableDictionary *out = [status() mutableCopy];
|
||||
if (const auto *image = floppy->image(0)) {
|
||||
if (multiDrive) out[@"exported_drive"] = driveStatus(drive);
|
||||
if (const auto *image = floppy->image(drive)) {
|
||||
const auto& data = image->bytes();
|
||||
out[@"disk_base64"] = [[NSData dataWithBytes:data.data() length:data.size()] base64EncodedStringWithOptions:0];
|
||||
}
|
||||
if (frozenForRetention) drainedDrives |= 1u << drive;
|
||||
return out;
|
||||
}
|
||||
NSDictionary *exchangeMedia(NSDictionary *request) {
|
||||
const unsigned drive = request[@"drive"] ? number(request[@"drive"], 0, 3) : 0;
|
||||
for (NSString *key in request)
|
||||
if (![@[@"op", @"expected_media_generation", @"expected_disk_sha256", @"media_id", @"disk_base64"] containsObject:key])
|
||||
throw std::invalid_argument("invalid_arguments");
|
||||
if (![@[@"op", @"expected_media_generation", @"expected_disk_sha256", @"media_id", @"disk_base64",
|
||||
@"drive", @"write_protected"] containsObject:key]) throw std::invalid_argument("invalid_arguments");
|
||||
if (!multiDrive && request[@"drive"]) throw std::invalid_argument("invalid_arguments");
|
||||
const bool inserting = request[@"media_id"] != nil;
|
||||
if ((request[@"disk_base64"] != nil) != inserting || request.count != (inserting ? 5u : 3u))
|
||||
const NSUInteger optional = (request[@"drive"] ? 1 : 0) + (request[@"write_protected"] ? 1 : 0);
|
||||
if ((request[@"disk_base64"] != nil) != inserting || request.count != (inserting ? 5u : 3u) + optional ||
|
||||
(!inserting && request[@"write_protected"])) throw std::invalid_argument("invalid_arguments");
|
||||
if (request[@"write_protected"] && CFGetTypeID((__bridge CFTypeRef)request[@"write_protected"]) != CFBooleanGetTypeID())
|
||||
throw std::invalid_argument("invalid_arguments");
|
||||
const auto expected = number(request[@"expected_media_generation"], 0, INT32_MAX);
|
||||
if (![request[@"expected_disk_sha256"] isKindOfClass:NSString.class]) throw std::invalid_argument("invalid_arguments");
|
||||
NSString *nextID = nil;
|
||||
std::optional<VCC::Devices::DiskImage> replacement;
|
||||
// Complete container validation and allocation precede any change to
|
||||
// mounted media. Invalid images cannot eject or replace the old disk.
|
||||
// Validate container and effective protection before changing any drive.
|
||||
if (inserting) {
|
||||
nextID = mediaIdentifier(request[@"media_id"]);
|
||||
replacement.emplace(VCC::Devices::DiskImage::load(bytes(request[@"disk_base64"], maximumDiskBytes)));
|
||||
for (unsigned other = 0; other < 4; ++other)
|
||||
if (other != drive && [nextID isEqual:mediaID(other)]) throw std::invalid_argument("playtest_media_already_inserted");
|
||||
replacement.emplace(VCC::Devices::DiskImage::load(bytes(request[@"disk_base64"], maximumDiskBytes),
|
||||
[request[@"write_protected"] boolValue]));
|
||||
}
|
||||
requireMediaExchangeState();
|
||||
NSString *oldHash = diskHash(), *oldID = currentMediaID;
|
||||
if (uint64_t(expected) != mediaGeneration || ![request[@"expected_disk_sha256"] isEqual:oldHash])
|
||||
NSString *oldHash = diskHash(drive), *oldID = mediaID(drive);
|
||||
if (uint64_t(expected) != mediaGenerations[drive] || ![request[@"expected_disk_sha256"] isEqual:oldHash])
|
||||
throw std::runtime_error("stale_media_exchange");
|
||||
if (mediaGeneration == INT32_MAX) throw std::runtime_error("playtest_media_limit");
|
||||
// The parent exports and durably retains the old image first. Explicit
|
||||
// discard only releases this worker's already-retained mounted copy.
|
||||
if (replacement) floppy->mount(0, std::move(*replacement), true);
|
||||
else floppy->eject(0, true);
|
||||
currentMediaID = nextID; originalDiskHash = diskHash(); ++mediaGeneration;
|
||||
if (mediaGenerations[drive] == INT32_MAX) throw std::runtime_error("playtest_media_limit");
|
||||
if (replacement) floppy->mount(drive, std::move(*replacement), true);
|
||||
else floppy->eject(drive, true);
|
||||
currentMediaIDs[drive] = nextID ?: (id)NSNull.null;
|
||||
originalDiskHashes[drive] = diskHash(drive); ++mediaGenerations[drive];
|
||||
mountReadBases[drive] = floppy->readEvents(drive); mountWriteBases[drive] = floppy->writeEvents(drive);
|
||||
NSMutableDictionary *out = [status() mutableCopy];
|
||||
out[@"target_drive"] = @(drive);
|
||||
out[@"previous_media_id"] = oldID ?: (id)NSNull.null;
|
||||
out[@"previous_disk_sha256"] = oldHash;
|
||||
out[@"advances_execution"] = @NO;
|
||||
@@ -420,11 +449,18 @@ class Playtest {
|
||||
@"remaining_boots": @(bootNumber < 16 ? 16 - bootNumber : 0),
|
||||
@"cycles": @(s.cycles), @"generation": @(s.generation), @"pc": @(s.cpu.PC),
|
||||
@"state": s.state == RunState::Paused ? @"paused" : @"running",
|
||||
@"disk_original_sha256": originalDiskHash ?: @"", @"disk_sha256": diskHash(),
|
||||
@"disk_present": @(image != nullptr), @"media_id": currentMediaID ?: (id)NSNull.null,
|
||||
@"media_generation": @(mediaGeneration), @"floppy_busy": @(floppy->snapshot().busy),
|
||||
@"disk_dirty": @(image && image->dirty()), @"disk_reads": @(floppy->readEvents(0)),
|
||||
@"disk_original_sha256": originalDiskHashes[0], @"disk_sha256": diskHash(),
|
||||
@"disk_present": @(image != nullptr), @"media_id": mediaID(0) ?: (id)NSNull.null,
|
||||
@"media_generation": @(mediaGenerations[0]), @"floppy_busy": @(floppy->snapshot().busy),
|
||||
@"disk_dirty": @(image && image->dirty()), @"disk_write_protected": @(image && image->writeProtected()), @"disk_reads": @(floppy->readEvents(0)),
|
||||
@"disk_writes": @(floppy->writeEvents(0)), @"isolated": @YES, @"input":inputMetadata(s) } mutableCopy];
|
||||
if (multiDrive) {
|
||||
NSMutableArray *drives = [NSMutableArray array];
|
||||
for (unsigned drive = 0; drive < 4; ++drive) [drives addObject:driveStatus(drive)];
|
||||
out[@"drives"] = drives; out[@"media_contract_version"] = @2;
|
||||
out[@"drive_activity_units"] = @"transferred_data_bytes";
|
||||
out[@"drive_activity_lifetime"] = @"worker lifetime; mount_* fields reset on each media generation";
|
||||
}
|
||||
if (videoInfo) out[@"video_recording"] = [videoInfo copy];
|
||||
return out;
|
||||
}
|
||||
@@ -499,6 +535,11 @@ public:
|
||||
rom = bytes(r[@"system_rom"], 32768, 32768);
|
||||
auto diskROM = bytes(r[@"disk_rom"], 8192, 8192), disk = bytes(r[@"disk"], maximumDiskBytes);
|
||||
NSString *initialMediaID = mediaIdentifier(r[@"media_id"] ?: @"primary");
|
||||
if (r[@"multi_drive"] && CFGetTypeID((__bridge CFTypeRef)r[@"multi_drive"]) != CFBooleanGetTypeID())
|
||||
throw std::invalid_argument("invalid_arguments");
|
||||
multiDrive = [r[@"multi_drive"] boolValue];
|
||||
if (r[@"write_protected"] && CFGetTypeID((__bridge CFTypeRef)r[@"write_protected"]) != CFBooleanGetTypeID())
|
||||
throw std::invalid_argument("invalid_arguments");
|
||||
NSArray *keys = r[@"boot_keys"];
|
||||
if (![keys isKindOfClass:NSArray.class] || keys.count == 0 || keys.count > 256) throw std::invalid_argument("invalid_boot_keys");
|
||||
for (NSNumber *n in keys) {
|
||||
@@ -598,8 +639,8 @@ public:
|
||||
MachineConfiguration config; config.processor = processor; config.ram = 1; config.frameInterval = 1;
|
||||
machine->configure(config);
|
||||
floppy = std::make_shared<VCC::Devices::Fd502Device>(diskROM);
|
||||
floppy->mount(0,VCC::Devices::DiskImage::load(disk));
|
||||
originalDiskHash = diskHash(); currentMediaID = initialMediaID;
|
||||
floppy->mount(0,VCC::Devices::DiskImage::load(disk, [r[@"write_protected"] boolValue]));
|
||||
originalDiskHashes[0] = diskHash(); currentMediaIDs[0] = initialMediaID;
|
||||
machine->cartridges().configure({nullptr,nullptr,nullptr,nullptr,floppy},true,4);
|
||||
machine->load(rom,processor);
|
||||
for (const auto& buffer : graphicsBuffers)
|
||||
@@ -608,13 +649,21 @@ public:
|
||||
boot(); return status();
|
||||
}
|
||||
if (!machine || stopped) throw std::runtime_error("stale_run");
|
||||
if (frozenForRetention && ![@[@"media_status", @"export_media", @"finish_stop"] containsObject:op])
|
||||
throw std::runtime_error("playtest_retention_pending");
|
||||
if ([op isEqual:@"finish_stop"]) {
|
||||
if (!multiDrive || !frozenForRetention || r.count != 1 || drainedDrives != 15)
|
||||
throw std::runtime_error("playtest_disk_export_incomplete");
|
||||
stopped = true; return status();
|
||||
}
|
||||
if ([op isEqual:@"media_status"]) {
|
||||
if (r.count != 1) throw std::invalid_argument("invalid_arguments");
|
||||
return status();
|
||||
}
|
||||
if ([op isEqual:@"export_media"]) {
|
||||
if (r.count != 1) throw std::invalid_argument("invalid_arguments");
|
||||
return exportMedia();
|
||||
if (r.count != 1 + (r[@"drive"] ? 1u : 0u) || (!multiDrive && r[@"drive"])) throw std::invalid_argument("invalid_arguments");
|
||||
const unsigned drive = r[@"drive"] ? number(r[@"drive"], 0, 3) : 0;
|
||||
return exportMedia(drive);
|
||||
}
|
||||
if ([op isEqual:@"exchange_media"]) return exchangeMedia(r);
|
||||
if ([op isEqual:@"video_start"]) {
|
||||
@@ -791,6 +840,11 @@ public:
|
||||
finishVideo(@"run_stopped");
|
||||
NSMutableDictionary *out = [status() mutableCopy];
|
||||
if (videoInfo) out[@"video"] = [videoInfo copy];
|
||||
if (multiDrive) {
|
||||
frozenForRetention = true; drainedDrives = 0;
|
||||
out[@"media_frozen"] = @YES;
|
||||
return out; // Drain four bounded per-drive replies before finish_stop.
|
||||
}
|
||||
if (const auto *image = floppy->image(0)) {
|
||||
const auto& disk = image->bytes();
|
||||
out[@"disk_base64"] = [[NSData dataWithBytes:disk.data() length:disk.size()] base64EncodedStringWithOptions:0];
|
||||
|
||||
@@ -24,9 +24,14 @@ def main():
|
||||
parser.add_argument('--destination', type=Path)
|
||||
args = parser.parse_args()
|
||||
profile = content_profile()
|
||||
source = args.source or (Path(os.environ.get('VCC_SOURCE_TOOLCHAIN_DIR') or
|
||||
if args.source:
|
||||
source = args.source
|
||||
elif profile == 'source':
|
||||
source = Path(os.environ.get('VCC_SOURCE_TOOLCHAIN_DIR') or
|
||||
str(Path(os.environ['SRCROOT']) / 'LocalResources/SourceToolchainBundle'))
|
||||
if profile == 'source' else Path(os.environ['SRCROOT']) / 'LocalResources/ToolchainBundle')
|
||||
else:
|
||||
source = Path(os.environ.get('VCC_TOOLCHAIN_DIR') or
|
||||
str(Path(os.environ['SRCROOT']) / 'LocalResources/ToolchainBundle'))
|
||||
destination = args.destination or (Path(os.environ['TARGET_BUILD_DIR']) /
|
||||
os.environ['UNLOCALIZED_RESOURCES_FOLDER_PATH'] / 'Toolchain')
|
||||
# Restrict cleanup to this build phase's app resource directory.
|
||||
|
||||
@@ -519,10 +519,29 @@ final class InteractionTests: XCTestCase {
|
||||
let access = app.dialogs["C Project Assistant Access"]
|
||||
XCTAssertTrue(access.waitForExistence(timeout: 5))
|
||||
XCTAssertTrue(access.checkBoxes["Allow Disposable Playtests"].exists)
|
||||
let outputExport = access.checkBoxes["Allow Build Output Export"]
|
||||
XCTAssertTrue(outputExport.exists)
|
||||
XCTAssertEqual(outputExport.value as? Int, 0, "Opening Assistant must not grant delivery-folder access")
|
||||
XCTAssertTrue(access.checkBoxes["Use Project Makefile"].exists)
|
||||
XCTAssertTrue(access.buttons["Save Private Connection…"].exists)
|
||||
let corner = access.coordinate(withNormalizedOffset: CGVector(dx: 1, dy: 1)).withOffset(CGVector(dx: -3, dy: -3))
|
||||
corner.click(forDuration: 0.2, thenDragTo: corner.withOffset(CGVector(dx: 0, dy: max(0, 620 - access.frame.height))))
|
||||
let accessShot = XCTAttachment(screenshot: access.screenshot())
|
||||
accessShot.name = "C Development — native Assistant permission choices"; accessShot.lifetime = .keepAlways; add(accessShot)
|
||||
outputExport.click()
|
||||
let chooseDelivery = access.buttons["Choose Delivery Folder…"]
|
||||
XCTAssertTrue(chooseDelivery.waitForExistence(timeout: 5))
|
||||
XCTAssertFalse(access.buttons["Save Private Connection…"].isEnabled, "Export needs a separately approved folder")
|
||||
let exportShot = XCTAttachment(screenshot: access.screenshot())
|
||||
exportShot.name = "C Development — explicit build delivery folder approval"; exportShot.lifetime = .keepAlways; add(exportShot)
|
||||
chooseDelivery.click()
|
||||
XCTAssertTrue(app.buttons["Approve Folder"].firstMatch.waitForExistence(timeout: 5))
|
||||
app.buttons["Cancel"].firstMatch.click()
|
||||
XCTAssertTrue(access.waitForExistence(timeout: 5))
|
||||
XCTAssertTrue(access.staticTexts["No delivery folder selected"].exists)
|
||||
XCTAssertFalse(access.buttons["Save Private Connection…"].isEnabled)
|
||||
outputExport.click()
|
||||
XCTAssertTrue(access.buttons["Save Private Connection…"].isEnabled, "Cancelling export consent leaves ordinary connection creation available")
|
||||
access.buttons[XCUIIdentifierCloseWindow].click()
|
||||
XCTAssertEqual(session()[0], before[0], "Reading workspace and consent controls must not restart the CoCo")
|
||||
XCTAssertEqual(try String(contentsOf: folder.appendingPathComponent("main.c"), encoding: .utf8), source)
|
||||
@@ -2430,7 +2449,37 @@ final class InteractionTests: XCTestCase {
|
||||
// Examine the composited live Metal surface, not just the viewport formula.
|
||||
// The authored diagnostic fills its 640 × 384 active raster with color bars.
|
||||
private func assertPictureAspect(scaling: String = "Sharp — Fit Window") throws {
|
||||
let bitmap = try XCTUnwrap(NSBitmapImageRep(data: display.screenshot().pngRepresentation))
|
||||
struct Observation {
|
||||
let bitmap: NSBitmapImageRep
|
||||
let frame: CGRect
|
||||
let xs: [Int], ys: [Int]
|
||||
}
|
||||
func finitePositiveFrame(_ frame: CGRect) -> Bool {
|
||||
[frame.minX, frame.minY, frame.width, frame.height].allSatisfy { $0.isFinite }
|
||||
&& frame.width > 0 && frame.height > 0
|
||||
}
|
||||
func reportFrame(_ frame: CGRect) -> [Any] {
|
||||
[frame.minX, frame.minY, frame.width, frame.height].map { value -> Any in
|
||||
value.isFinite ? Double(value) : String(describing: value)
|
||||
}
|
||||
}
|
||||
let began = ContinuousClock.now
|
||||
let deadline = began.advanced(by: .seconds(5))
|
||||
var latest: Observation?, firstMismatch: [String: Any]?, lastDetails: [String: Any] = [:]
|
||||
var stableObservations = 0, attempts = 0
|
||||
while ContinuousClock.now < deadline {
|
||||
attempts += 1
|
||||
let element = display
|
||||
let before = element.frame
|
||||
let bitmap = NSBitmapImageRep(data: element.screenshot().pngRepresentation)
|
||||
let frame = element.frame
|
||||
let duration = began.duration(to: ContinuousClock.now).components
|
||||
let elapsed = Double(duration.seconds) + Double(duration.attoseconds) / 1e18
|
||||
var details: [String: Any] = ["elapsed_seconds": elapsed,
|
||||
"frame_before": reportFrame(before), "frame_after": reportFrame(frame),
|
||||
"finite_positive_frame": finitePositiveFrame(before) && finitePositiveFrame(frame)]
|
||||
if let bitmap, bitmap.pixelsWide > 0, bitmap.pixelsHigh > 0,
|
||||
finitePositiveFrame(before), finitePositiveFrame(frame) {
|
||||
func bright(_ x: Int, _ y: Int) -> Bool {
|
||||
var pixel = [Int](repeating: 0, count: 5)
|
||||
bitmap.getPixel(&pixel, atX: x, y: y)
|
||||
@@ -2438,6 +2487,48 @@ final class InteractionTests: XCTestCase {
|
||||
}
|
||||
let xs = (0..<bitmap.pixelsWide).filter { bright($0, bitmap.pixelsHigh / 2) }
|
||||
let ys = (0..<bitmap.pixelsHigh).filter { bright(bitmap.pixelsWide / 2, $0) }
|
||||
if let x0 = xs.first, let x1 = xs.last, let y0 = ys.first, let y1 = ys.last {
|
||||
let width = Double(x1 - x0 + 1), height = Double(y1 - y0 + 1)
|
||||
let backing = Double(bitmap.pixelsWide) / frame.width
|
||||
let inset = 4 * backing
|
||||
let fit = min((Double(bitmap.pixelsWide) - 2 * inset) / 640,
|
||||
(Double(bitmap.pixelsHigh) - 2 * inset) / 384)
|
||||
let integer = scaling == "Integer Pixels" && fit >= 1
|
||||
let scale = integer ? floor(fit) : fit
|
||||
// Use the unchanged final assertions' exact tolerances for
|
||||
// readiness; an indefinitely stretched drawable still fails.
|
||||
let matches = abs(width - height * 640 / 384) <= 3
|
||||
&& abs(width - 640 * scale) <= 3 && abs(height - 384 * scale) <= 3
|
||||
&& abs(Double(x0) + width / 2 - Double(bitmap.pixelsWide) / 2) <= 2
|
||||
&& abs(Double(y0) + height / 2 - Double(bitmap.pixelsHigh) / 2) <= 2
|
||||
let stableFrame = before == frame && latest?.frame == frame
|
||||
stableObservations = matches && before == frame ? (stableFrame ? stableObservations + 1 : 1) : 0
|
||||
details.merge(["picture": [x0, y0, x1 - x0 + 1, y1 - y0 + 1],
|
||||
"bitmap_size": [bitmap.pixelsWide, bitmap.pixelsHigh], "expected_scale": scale.isFinite ? scale as Any : String(describing: scale),
|
||||
"unchanged_tolerances_satisfied": matches, "stable_observations": stableObservations]) { _, new in new }
|
||||
latest = Observation(bitmap: bitmap, frame: frame, xs: xs, ys: ys)
|
||||
} else {
|
||||
stableObservations = 0; details["failure"] = "No bright diagnostic row or column"
|
||||
}
|
||||
} else {
|
||||
stableObservations = 0; details["failure"] = "Display screenshot or finite positive frame unavailable"
|
||||
}
|
||||
lastDetails = details
|
||||
if stableObservations >= 2 { break }
|
||||
if firstMismatch == nil { firstMismatch = details }
|
||||
if ContinuousClock.now.advanced(by: .milliseconds(100)) >= deadline { break }
|
||||
Thread.sleep(forTimeInterval: 0.1) // Test runner only; the app and guest keep running.
|
||||
}
|
||||
let duration = began.duration(to: ContinuousClock.now).components
|
||||
let report: [String: Any] = ["scaling": scaling, "attempts": attempts,
|
||||
"elapsed_seconds": Double(duration.seconds) + Double(duration.attoseconds) / 1e18,
|
||||
"required_stable_observations": 2, "ready": stableObservations >= 2,
|
||||
"first_mismatch_or_unsettled_observation": firstMismatch.map { $0 as Any } ?? NSNull(), "final_observation": lastDetails]
|
||||
let readiness = XCTAttachment(data: try JSONSerialization.data(withJSONObject: report, options: [.prettyPrinted, .sortedKeys]), uniformTypeIdentifier: "public.json")
|
||||
readiness.name = "Metal picture readiness"; readiness.lifetime = .keepAlways; add(readiness)
|
||||
XCTAssertGreaterThanOrEqual(stableObservations, 2, "The actual composited picture and display frame must settle within five seconds without relaxing geometry checks")
|
||||
let observation = try XCTUnwrap(latest, "The actual Metal diagnostic picture was unavailable")
|
||||
let bitmap = observation.bitmap, xs = observation.xs, ys = observation.ys
|
||||
let width = try XCTUnwrap(xs.last) - XCTUnwrap(xs.first) + 1
|
||||
let height = try XCTUnwrap(ys.last) - XCTUnwrap(ys.first) + 1
|
||||
XCTAssertEqual(Double(width), Double(height) * 640 / 384, accuracy: 3,
|
||||
@@ -2445,7 +2536,7 @@ final class InteractionTests: XCTestCase {
|
||||
// Aspect alone also passes for a tiny picture centered in a huge
|
||||
// viewport. Measure actual composited coverage and placement as well.
|
||||
// Calculate expectations independently of the app's VideoGeometry.
|
||||
let backing = Double(bitmap.pixelsWide) / display.frame.width
|
||||
let backing = Double(bitmap.pixelsWide) / observation.frame.width
|
||||
let inset = 4 * backing
|
||||
let fit = min((Double(bitmap.pixelsWide) - 2 * inset) / 640,
|
||||
(Double(bitmap.pixelsHigh) - 2 * inset) / 384)
|
||||
@@ -4209,10 +4300,24 @@ extension InteractionTests {
|
||||
|
||||
let source = library.buttons["library-open-source"]
|
||||
let detail = library.scrollViews.containing(.button, identifier: "library-open-source").firstMatch
|
||||
for _ in 0..<8 where !source.isHittable { detail.scroll(byDeltaX: 0, deltaY: -300) }
|
||||
XCTAssertTrue(source.isHittable)
|
||||
XCTAssertTrue(library.descendants(matching: .any)["library-online-manual"].firstMatch.exists, "The online edition remains a distinct link")
|
||||
func downloadSource(to location: URL) {
|
||||
app.activate()
|
||||
// XCTest can report a clipped button as hittable even when its
|
||||
// center is below the scroll viewport. Qualify the actual geometry
|
||||
// before clicking, including after returning from the workspace.
|
||||
func sourceIsVisible() -> Bool {
|
||||
let button = source.frame, viewport = detail.frame.insetBy(dx: 4, dy: 8)
|
||||
return [button.minX, button.minY, button.width, button.height,
|
||||
viewport.minX, viewport.minY, viewport.width, viewport.height].allSatisfy { $0.isFinite }
|
||||
&& button.width > 0 && button.height > 0
|
||||
&& viewport.width > 0 && viewport.height > 0
|
||||
&& source.isHittable && viewport.contains(button)
|
||||
}
|
||||
for _ in 0..<8 where !sourceIsVisible() {
|
||||
detail.scroll(byDeltaX: 0, deltaY: source.frame.minY < detail.frame.minY ? 200 : -200)
|
||||
}
|
||||
diskEditorWait("Open Source must be wholly inside the visible detail viewport") { sourceIsVisible() }
|
||||
source.click()
|
||||
let download = app.buttons["Download Source"].firstMatch
|
||||
XCTAssertTrue(download.waitForExistence(timeout: 5))
|
||||
@@ -4245,7 +4350,6 @@ extension InteractionTests {
|
||||
let dirty = editor.value as? String
|
||||
menu("Media", "Software Library…")
|
||||
XCTAssertTrue(library.waitForExistence(timeout: 5))
|
||||
for _ in 0..<8 where !source.isHittable { detail.scroll(byDeltaX: 0, deltaY: -300) }
|
||||
downloadSource(to: secondDestination)
|
||||
let cancelReview = app.buttons["Cancel"].firstMatch
|
||||
XCTAssertTrue(app.staticTexts["Save changes to this project?"].firstMatch.waitForExistence(timeout: 15))
|
||||
|
||||
@@ -5,6 +5,11 @@
|
||||
};
|
||||
"objectVersion" = 56;
|
||||
"objects" = {
|
||||
"66DDF50B2F00881C339F9F00" = { isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "App/MCPBuildExport.swift"; sourceTree = SOURCE_ROOT; };
|
||||
"D8156871A65DFAA5E40891F8" = { isa = PBXBuildFile; fileRef = "66DDF50B2F00881C339F9F00"; };
|
||||
"3E928710328383CF150F86F6" = { isa = PBXBuildFile; fileRef = "66DDF50B2F00881C339F9F00"; };
|
||||
"87E2AF0BA86F733A89C4948C" = { isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Tests/MCPBuildExportTests.swift"; sourceTree = SOURCE_ROOT; };
|
||||
"4A02035CF876A8F80E66524A" = { isa = PBXBuildFile; fileRef = "87E2AF0BA86F733A89C4948C"; };
|
||||
"2464EE6BFE2AA97DBC5C2913" = { isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "App/CoCoCaptureFeedback.swift"; sourceTree = SOURCE_ROOT; };
|
||||
"E4061E4E0AB7CA7A47624B27" = { isa = PBXBuildFile; fileRef = "2464EE6BFE2AA97DBC5C2913"; };
|
||||
"337343EA275BED13114792F9" = { isa = PBXBuildFile; fileRef = "2464EE6BFE2AA97DBC5C2913"; };
|
||||
@@ -694,7 +699,7 @@ DE524C5CEEB7201C899C173E = { isa = PBXBuildFile; fileRef = 2DDBE7F7A3DE72AD67CB6
|
||||
"CEEB1C09197841D54A6AD5E8" = { "isa" = "PBXBuildFile"; "fileRef" = "2ECB4508563F3873B436B9EE"; };
|
||||
"3AE8BC7E4A8F296EB0B7AEFD" = { "isa" = "PBXFileReference"; "lastKnownFileType" = "folder"; "path" = "Resources/About"; "sourceTree" = "<group>"; };
|
||||
"370CBA86395A91DC191231AB" = { "isa" = "PBXBuildFile"; "fileRef" = "3AE8BC7E4A8F296EB0B7AEFD"; };
|
||||
"53AAABD74B976C180137280A" = { "isa" = "XCBuildConfiguration"; "name" = "UITesting"; "buildSettings" = { "INFOPLIST_KEY_VCCCompanionProtocolVersion" = "1"; "COPY_PHASE_STRIP" = "NO"; "LD_RUNPATH_SEARCH_PATHS" = ( "$(inherited)", "@executable_path/../Frameworks" ); "SWIFT_ACTIVE_COMPILATION_CONDITIONS" = "$(inherited) DEBUG VCC_UI_TESTING"; "DEBUG_INFORMATION_FORMAT" = "dwarf"; "VCC_BUILD_CONTENT_PROFILE" = "source"; "VCC_SOURCE_ROM_DIR" = ""; "MARKETING_VERSION" = "3.7.0"; "INFOPLIST_FILE" = "App/Info.plist"; "ENABLE_TESTABILITY" = "YES"; "GENERATE_INFOPLIST_FILE" = "YES"; "ENABLE_USER_SCRIPT_SANDBOXING" = "NO"; "SWIFT_OBJC_BRIDGING_HEADER" = "$(SRCROOT)/Bridge/VCCMac-Bridging-Header.h"; "INFOPLIST_KEY_CFBundleDisplayName" = "VCC OSS UI Tests"; "GCC_OPTIMIZATION_LEVEL" = "0"; "SWIFT_OPTIMIZATION_LEVEL" = "-Onone"; "PRODUCT_NAME" = "VCC Plus OSS"; "PRODUCT_MODULE_NAME" = "VCCMac"; "OTHER_LDFLAGS" = "$(inherited) -larchive -framework Network"; "INFOPLIST_KEY_LSApplicationCategoryType" = "public.app-category.entertainment"; "PRODUCT_BUNDLE_IDENTIFIER" = "com.brianholman.vccplus.oss.mac.uitesting"; "CURRENT_PROJECT_VERSION" = "64"; }; };
|
||||
"53AAABD74B976C180137280A" = { "isa" = "XCBuildConfiguration"; "name" = "UITesting"; "buildSettings" = { "INFOPLIST_KEY_VCCCompanionProtocolVersion" = "1"; "COPY_PHASE_STRIP" = "NO"; "LD_RUNPATH_SEARCH_PATHS" = ( "$(inherited)", "@executable_path/../Frameworks" ); "SWIFT_ACTIVE_COMPILATION_CONDITIONS" = "$(inherited) DEBUG VCC_UI_TESTING"; "DEBUG_INFORMATION_FORMAT" = "dwarf"; "VCC_BUILD_CONTENT_PROFILE" = "source"; "VCC_SOURCE_ROM_DIR" = ""; "MARKETING_VERSION" = "3.7.1"; "INFOPLIST_FILE" = "App/Info.plist"; "ENABLE_TESTABILITY" = "YES"; "GENERATE_INFOPLIST_FILE" = "YES"; "ENABLE_USER_SCRIPT_SANDBOXING" = "NO"; "SWIFT_OBJC_BRIDGING_HEADER" = "$(SRCROOT)/Bridge/VCCMac-Bridging-Header.h"; "INFOPLIST_KEY_CFBundleDisplayName" = "VCC OSS UI Tests"; "GCC_OPTIMIZATION_LEVEL" = "0"; "SWIFT_OPTIMIZATION_LEVEL" = "-Onone"; "PRODUCT_NAME" = "VCC Plus OSS"; "PRODUCT_MODULE_NAME" = "VCCMac"; "OTHER_LDFLAGS" = "$(inherited) -larchive -framework Network"; "INFOPLIST_KEY_LSApplicationCategoryType" = "public.app-category.entertainment"; "PRODUCT_BUNDLE_IDENTIFIER" = "com.brianholman.vccplus.oss.mac.uitesting"; "CURRENT_PROJECT_VERSION" = "67"; }; };
|
||||
"4478F567020A87952E7BF5BE" = { "isa" = "XCBuildConfiguration"; "name" = "UITesting"; "buildSettings" = { "SWIFT_ACTIVE_COMPILATION_CONDITIONS" = "$(inherited) DEBUG"; "PRODUCT_NAME" = "VCCCore"; "DEBUG_INFORMATION_FORMAT" = "dwarf"; "GCC_OPTIMIZATION_LEVEL" = "0"; "SWIFT_OPTIMIZATION_LEVEL" = "-Onone"; "SKIP_INSTALL" = "YES"; "ENABLE_TESTABILITY" = "YES"; "EXECUTABLE_PREFIX" = "lib"; "GCC_PREPROCESSOR_DEFINITIONS" = ( "$(inherited)", "USE_DEBUG_TESTS=false" ); }; };
|
||||
"6E5C730B0C1F6F8D5EB8881A" = { "isa" = "XCBuildConfiguration"; "name" = "UITesting"; "buildSettings" = { "ONLY_ACTIVE_ARCH" = "NO"; "SWIFT_ACTIVE_COMPILATION_CONDITIONS" = "$(inherited) DEBUG"; "DEBUG_INFORMATION_FORMAT" = "dwarf"; "CLANG_ENABLE_MODULES" = "YES"; "CODE_SIGN_IDENTITY" = "-"; "MACOSX_DEPLOYMENT_TARGET" = "14.0"; "CLANG_CXX_LANGUAGE_STANDARD" = "c++17"; "ENABLE_TESTABILITY" = "YES"; "GCC_OPTIMIZATION_LEVEL" = "0"; "SWIFT_OPTIMIZATION_LEVEL" = "-Onone"; "ARCHS" = "$(ARCHS_STANDARD)"; "HEADER_SEARCH_PATHS" = ( "$(inherited)", "$(SRCROOT)/../../src/core", "$(SRCROOT)/../../src" ); "SDKROOT" = "macosx"; "SWIFT_VERSION" = "5.0"; "CODE_SIGN_STYLE" = "Manual"; "DEVELOPMENT_TEAM" = ""; "VCC_BUILD_CONTENT_PROFILE" = "source"; "CLANG_ENABLE_OBJC_ARC" = "YES"; "CLANG_CXX_LIBRARY" = "libc++"; }; };
|
||||
"9D61CCD0757A3005AF102148" = { "isa" = "XCBuildConfiguration"; "name" = "UITesting"; "buildSettings" = { "LD_RUNPATH_SEARCH_PATHS" = ( "$(inherited)", "$(PLATFORM_DIR)/Developer/Library/Frameworks" ); "SWIFT_ACTIVE_COMPILATION_CONDITIONS" = "$(inherited) DEBUG"; "DEBUG_INFORMATION_FORMAT" = "dwarf"; "ENABLE_TESTABILITY" = "YES"; "GENERATE_INFOPLIST_FILE" = "YES"; "SWIFT_OBJC_BRIDGING_HEADER" = "$(SRCROOT)/Bridge/VCCMac-Bridging-Header.h"; "GCC_OPTIMIZATION_LEVEL" = "0"; "SWIFT_OPTIMIZATION_LEVEL" = "-Onone"; "PRODUCT_NAME" = "VCCCoreTests"; "OTHER_LDFLAGS" = ( "$(inherited)", "-larchive", "-framework", "Network", "-framework", "XCTest" ); "FRAMEWORK_SEARCH_PATHS" = ( "$(inherited)", "$(PLATFORM_DIR)/Developer/Library/Frameworks" ); "PRODUCT_BUNDLE_IDENTIFIER" = "com.brianholman.vccplus.oss.mac.coretests"; "GCC_PREPROCESSOR_DEFINITIONS" = ( "$(inherited)", "DEBUG=1" ); }; };
|
||||
@@ -1637,7 +1642,7 @@ CF5FFC06DB9D6CE02797B0DB,
|
||||
7B4FBBB6612B2D28399C45D2,
|
||||
39D55AADB2BB41AC896EED2A,
|
||||
62F33D8AD022224C0317573C,
|
||||
0BDB35B6844F49A89A878C07, "4321FD0AA20C7F0B82946B54", "3DFBD46CD8862089F96379F9", "826B9558E67AC34BEA26225B", "418DF00B8D63184FE71FD243", "3045DD0C15BAEAA7F23B3CAF", "85CE7AA889B1A2C0FCFFF709", "10272DC5592066C93FA041F0", "823FEE6E651C8F9B8CF93863", "870763EA2002E3B2DA4439BE", "C91F4031641CAF810A74D9AE", "02BDBF49088107745C157136", "E68B9E29C8124CC0233A373B", "615914186BA3B2548B75D5CF", "115A88CCADAFC2F3119AA924", "BE974B1C848989BC0130B704", "670915AEB1A6E8E73DD16F06", "C73E8C5214DDAF44FB6ABEB5", "67398F77773BE61B44309CDF", "A512EF6F56693B08DBD17623", "059802430CC64E3769130293", "D8F37E8B1DD4F745E3B1FCD3", "95C14DEEBC2DECEA14B63C7E", "24F62A09B7DF64F401D42071", "29DC442BDE3D2B7B4FD45775", "CF3CBB0CDBD1B6CFEA3D16EF", "FA88C3E6358AABD1337E5922", "4BC9819B4A3F9943EE1A02CC", "C2FCF46C10FEE516AA6A7C1E", "C5C1087220D0EF075A6CFD80", "C02E3725695AEBE122888A16", "682C73D064A7050C396114D1", "D023D7B24E79B890308F74EE", "C4BB49EC699353182587FF5E", "492621AD31DBD73FBEFAEFCC", "8D709AF3E234FFB45A016A9F", "4A6620140D28CEAF74AB1EAA", "E2AF4DB362A8922E9E59888D", "2F485164B2AA7271E11F2A68", "023A775BEE51E56DB5BCAF91", "15F739D7833A44CAF5B3AC91", "05C12D61D4309FF67ECD44D8", "3F33FFDA5EC831B47C21CAFF", "274BF8DBFCAE4D9F9CF659B2", "7B0FCC2AAC9B426E9789FDF4", "14DCF40E2F9D40AB852F3067", "8B030B1F65D547ADB72CDC9C", "D9FD79D94A81475691A9337B", "501CF758D4DC46C330E74F38", "3540482FEFE6C0885900C327", "3D8441F835BB11EBB626D5C8", "1F1B393BC2F74DA2608A4025", "948D3BF8A42B5EEE9256A3FF", "499B64CF31E06B790FF12509", "DC63F5509BBB60C804F21EBE", "3CBF793866E3496E89C6FC0A", "32F3B3EE89BC4189B1EDB269", "6C8B7480637024B236B48F65", "4B156145C2B8115D567921B8", "FB4694F019F44820F3595721", "9556017F5BAED44139E8C95D", "9169457530B9E586355CBD1A", "BFE441989FFFFD41754DC371", "3EFAD442153FD9DCDBDA67EC", "C2A5035DEE7A8B3324C7709C", "B78EF0920DBA28D1332D44F4", "B79409A51D8040EFD8875CC3", "948430C8A133C01130C6EE34", "311059DEF23BA48A0C1269B9", "06437928FCABF5604E678108", "C0DF4E6D4ADB35C6645175E4", "E5CD91056EEC957439869FF8", "F0BC21D74DEC576602D09899", "6D764A33053344DE6CD9EFD7", "CDA3087965746C417A620C1E", "CCECF8D635E33F6BA9556C45", "D02BC5EC603335A1AD2DF6F5", "FC4513AF8DD249896CA98E39", "1783422DA5EECD14E05E2408", "1628AEF6C36148D5BB593A16", "411D43282F91148E8BAAF88C", "7A6E85E66C933E4C98B02511", "456D2E032E7D4B2F84F9EFD4", "C0162F16AEC84BD880E88B6A", "5EB66C440A2E40ABBFFE50FA", "B595BD62B33A4E2EB96A6E5A", "3ED4C66E5E364794A2231258", "CC132EE385DA881BD4DCA57B", "231A0BA3D7C801225FA37FDB", "39AA931009E5460BFF8C0F28", "4C28168A52886A48F0FA7FF9", "C27E852B143EA3443A8E2C73", "1D5A41F3C73762C36AC72EB3", "9553F2FB3B6C4B4E5143F1F3", "926F4B865FD6CC400BB19AA3", "C947D24F8EFC960CFC235767", "08D3E733C8687081151C42CC", "71E50EAAD821F1FB09541F9D", "794228A6B64E2E78863C425B", "B332014BA2D8AE24963CA05F", "63CE75E10A456170B69355B5", "9239B5C8F87ED8D9765BCFF8", "F250ED34E019B0A53B6803B0", "41A4F7D652312B8714328578", "E9A02223698241E3847CC87D", "BFDDCD02FAC24F789610D128", "F2E0D60257F9D9FAEE66021D", "7C31BA40348758EE6968821D", "CFF6D73962ADF238A4C28895", "F5C6D3ABDD837F1862D88512", "515D3B8937044FDBB58D3A21", "F8DBF692CCD3D47B4B9E5C0F", "52EAAF99A6318C88B6F962D3", "11D150DB541038C00DB2D6BF", "576712309428CEC50E16AFD0", "09AB769344CF1DA512754F63", "32C8EC085FCE897D547848D5", "2E603EB797A109ADABF21A27", "D537BBBFCC4CF01677A8CED1", "C3B1FD7C03A4FA0574E38EF8", "7339FE1A16674B2588333002", "DD3367E11F4FEB184A7FBA34", "1547595B7D1B2B22EDFAF9D1", "D253E6FCD821976F74848B00",
|
||||
0BDB35B6844F49A89A878C07, "4321FD0AA20C7F0B82946B54", "3DFBD46CD8862089F96379F9", "826B9558E67AC34BEA26225B", "418DF00B8D63184FE71FD243", "3045DD0C15BAEAA7F23B3CAF", "85CE7AA889B1A2C0FCFFF709", "10272DC5592066C93FA041F0", "823FEE6E651C8F9B8CF93863", "870763EA2002E3B2DA4439BE", "C91F4031641CAF810A74D9AE", "02BDBF49088107745C157136", "E68B9E29C8124CC0233A373B", "615914186BA3B2548B75D5CF", "115A88CCADAFC2F3119AA924", "BE974B1C848989BC0130B704", "670915AEB1A6E8E73DD16F06", "C73E8C5214DDAF44FB6ABEB5", "67398F77773BE61B44309CDF", "A512EF6F56693B08DBD17623", "059802430CC64E3769130293", "D8F37E8B1DD4F745E3B1FCD3", "95C14DEEBC2DECEA14B63C7E", "24F62A09B7DF64F401D42071", "29DC442BDE3D2B7B4FD45775", "CF3CBB0CDBD1B6CFEA3D16EF", "FA88C3E6358AABD1337E5922", "4BC9819B4A3F9943EE1A02CC", "C2FCF46C10FEE516AA6A7C1E", "C5C1087220D0EF075A6CFD80", "C02E3725695AEBE122888A16", "682C73D064A7050C396114D1", "D023D7B24E79B890308F74EE", "C4BB49EC699353182587FF5E", "492621AD31DBD73FBEFAEFCC", "8D709AF3E234FFB45A016A9F", "4A6620140D28CEAF74AB1EAA", "E2AF4DB362A8922E9E59888D", "2F485164B2AA7271E11F2A68", "023A775BEE51E56DB5BCAF91", "15F739D7833A44CAF5B3AC91", "05C12D61D4309FF67ECD44D8", "3E928710328383CF150F86F6", "3F33FFDA5EC831B47C21CAFF", "274BF8DBFCAE4D9F9CF659B2", "7B0FCC2AAC9B426E9789FDF4", "14DCF40E2F9D40AB852F3067", "8B030B1F65D547ADB72CDC9C", "D9FD79D94A81475691A9337B", "501CF758D4DC46C330E74F38", "3540482FEFE6C0885900C327", "3D8441F835BB11EBB626D5C8", "1F1B393BC2F74DA2608A4025", "948D3BF8A42B5EEE9256A3FF", "499B64CF31E06B790FF12509", "DC63F5509BBB60C804F21EBE", "3CBF793866E3496E89C6FC0A", "32F3B3EE89BC4189B1EDB269", "6C8B7480637024B236B48F65", "4B156145C2B8115D567921B8", "FB4694F019F44820F3595721", "9556017F5BAED44139E8C95D", "9169457530B9E586355CBD1A", "BFE441989FFFFD41754DC371", "3EFAD442153FD9DCDBDA67EC", "C2A5035DEE7A8B3324C7709C", "B78EF0920DBA28D1332D44F4", "B79409A51D8040EFD8875CC3", "948430C8A133C01130C6EE34", "311059DEF23BA48A0C1269B9", "06437928FCABF5604E678108", "C0DF4E6D4ADB35C6645175E4", "E5CD91056EEC957439869FF8", "F0BC21D74DEC576602D09899", "6D764A33053344DE6CD9EFD7", "CDA3087965746C417A620C1E", "CCECF8D635E33F6BA9556C45", "D02BC5EC603335A1AD2DF6F5", "FC4513AF8DD249896CA98E39", "1783422DA5EECD14E05E2408", "1628AEF6C36148D5BB593A16", "411D43282F91148E8BAAF88C", "7A6E85E66C933E4C98B02511", "456D2E032E7D4B2F84F9EFD4", "C0162F16AEC84BD880E88B6A", "5EB66C440A2E40ABBFFE50FA", "B595BD62B33A4E2EB96A6E5A", "3ED4C66E5E364794A2231258", "CC132EE385DA881BD4DCA57B", "231A0BA3D7C801225FA37FDB", "39AA931009E5460BFF8C0F28", "4C28168A52886A48F0FA7FF9", "C27E852B143EA3443A8E2C73", "1D5A41F3C73762C36AC72EB3", "9553F2FB3B6C4B4E5143F1F3", "926F4B865FD6CC400BB19AA3", "C947D24F8EFC960CFC235767", "08D3E733C8687081151C42CC", "71E50EAAD821F1FB09541F9D", "794228A6B64E2E78863C425B", "B332014BA2D8AE24963CA05F", "63CE75E10A456170B69355B5", "9239B5C8F87ED8D9765BCFF8", "F250ED34E019B0A53B6803B0", "41A4F7D652312B8714328578", "E9A02223698241E3847CC87D", "BFDDCD02FAC24F789610D128", "F2E0D60257F9D9FAEE66021D", "7C31BA40348758EE6968821D", "CFF6D73962ADF238A4C28895", "F5C6D3ABDD837F1862D88512", "515D3B8937044FDBB58D3A21", "F8DBF692CCD3D47B4B9E5C0F", "52EAAF99A6318C88B6F962D3", "11D150DB541038C00DB2D6BF", "576712309428CEC50E16AFD0", "09AB769344CF1DA512754F63", "32C8EC085FCE897D547848D5", "2E603EB797A109ADABF21A27", "D537BBBFCC4CF01677A8CED1", "C3B1FD7C03A4FA0574E38EF8", "7339FE1A16674B2588333002", "DD3367E11F4FEB184A7FBA34", "1547595B7D1B2B22EDFAF9D1", "D253E6FCD821976F74848B00",
|
||||
"BBDFBB8C5ACFE0C680731DC2",
|
||||
"8B013CC890D39A05F4ED1DAB",
|
||||
"1B116EE53896E353DFC1B92F",
|
||||
@@ -1698,8 +1703,8 @@ CF5FFC06DB9D6CE02797B0DB,
|
||||
"INFOPLIST_KEY_LSApplicationCategoryType" = "public.app-category.entertainment";
|
||||
"INFOPLIST_KEY_CFBundleDisplayName" = "VCC Plus OSS";
|
||||
"INFOPLIST_FILE" = "App/Info.plist";
|
||||
"VCC_BUILD_CONTENT_PROFILE" = "source"; "VCC_SOURCE_ROM_DIR" = ""; "MARKETING_VERSION" = "3.7.0";
|
||||
"CURRENT_PROJECT_VERSION" = "64";
|
||||
"VCC_BUILD_CONTENT_PROFILE" = "source"; "VCC_SOURCE_ROM_DIR" = ""; "MARKETING_VERSION" = "3.7.1";
|
||||
"CURRENT_PROJECT_VERSION" = "67";
|
||||
"LD_RUNPATH_SEARCH_PATHS" = ( "$(inherited)", "@executable_path/../Frameworks" );
|
||||
"GCC_OPTIMIZATION_LEVEL" = "0";
|
||||
"SWIFT_OPTIMIZATION_LEVEL" = "-Onone";
|
||||
@@ -1719,8 +1724,8 @@ CF5FFC06DB9D6CE02797B0DB,
|
||||
"INFOPLIST_KEY_LSApplicationCategoryType" = "public.app-category.entertainment";
|
||||
"INFOPLIST_KEY_CFBundleDisplayName" = "VCC Plus OSS";
|
||||
"INFOPLIST_FILE" = "App/Info.plist";
|
||||
"VCC_BUILD_CONTENT_PROFILE" = "source"; "VCC_SOURCE_ROM_DIR" = ""; "MARKETING_VERSION" = "3.7.0";
|
||||
"CURRENT_PROJECT_VERSION" = "64";
|
||||
"VCC_BUILD_CONTENT_PROFILE" = "source"; "VCC_SOURCE_ROM_DIR" = ""; "MARKETING_VERSION" = "3.7.1";
|
||||
"CURRENT_PROJECT_VERSION" = "67";
|
||||
"LD_RUNPATH_SEARCH_PATHS" = ( "$(inherited)", "@executable_path/../Frameworks" );
|
||||
"GCC_OPTIMIZATION_LEVEL" = "2";
|
||||
"SWIFT_OPTIMIZATION_LEVEL" = "-O";
|
||||
@@ -1979,7 +1984,7 @@ DE524C5CEEB7201C899C173E,
|
||||
012A9C0D4AB7CCE32C24C6EC,
|
||||
22E8813154B0E365571659D1,
|
||||
D523E81542ABBD5AB135AA86,
|
||||
B7E302195F6A9DD0DEDAAE81, "F69A6B3CA6DADD9644B13172", "E28A5CEB274AF11A9D4D64A7", "8FB86FADC3423CED521C855A", "F097A5A4144D30372FD572EC", "9A7580D6B22390B635A19F89", "BE28275CD8BD625C772155F9", "356F4572114E7AAE0F5954D9", "CAADC64B387B05820E0F1B3A", "2A41A057C987C99C16326EC3", "21BB5980BE79619891B2E0F3", "41058564FCF0CD603FF6F83B", "F112F84DEFA54BBF6A74AA9D", "64E852CA1B43CE2EE5509DC4", "43DE6A833C76FCEB0BB16373", "F0405E77CEC80758A4B05E20", "94CD4919A1DF7FB2A7F00A39", "B81E845A0F5F9ADBA178782E", "27128C761CE524CD4E616E0F", "E4A6B8FD70C6B71C8A8946F8", "E5C6EC6275ECA4B6620F751A", "1F877766F277CE8D98FC4C98", "75C2926B75F8D566C90F8814", "6A45AA20DAD66943C6609278", "F43A4EA6B12A2844D9913AFB", "30F9AA558484279D418BC2AB", "7D24D7E8433052B54A98F9B4", "66AB557EF31F72BCE23B6C20", "32336CE2F512DBFD6C8C33B6", "B144E6CCF412FA4F6ED667BE", "0E6F18DF1BB7BDC2B522D565", "88362186D105AC38CDC1F34B", "A2C86680E706C6EB896624F7", "1D76124E803555F5B3BB4858", "227B8433ABAD08C1540FDFB7", "5FE510E3299964E905F2EEC1", "1DA339454EE1D551B57EE722", "111F36A223EDA8FB8B1BAA87", "BCB4A9FFE10489971342B925", "4D475CC90EDE6383ADE44783", "1F48315B00236C831CD0B0C6", "18EBAF7CBB4C8D0AAE871090", "A09EE5D651D37597BCCE1549", "2DCC205FFB836A66A37E98B5", "F59D1FEA561570A5236F53C0", "F6973CC082553C582B6A3B7B", "68C882F50C29460AAE9C6CD9", "647C43E622AA4F1F81D75AED", "DCA00E415E794E4482CD7799", "2DD34F1B46E94A1A86EE1F03", "43EBAF4A0A62FA8383A1FF2E", "3DD59A0CA93F9FAEC2C852A2", "208538707397447D90B15973", "3B04447D7EB864E7D58E52B2", "37D733ED816B587FB560594E", "7BF84CEED0675652AF613D1A", "474645F3EE3BE43A1F533D5A", "F44C9C01432D4A6C9F4097C7", "570064B66DCCAAD7E2F3CA71", "FD32EAB5B2533D984DD976F8", "44B68B934274129184A15323", "E5FCCCC1D2A8FE933B994C9D", "B044E18CD3014FF408A9291A", "2BA7ED90FFE5683113F61261", "ACE8F17CB88D435E5F71D748", "49A277CE344C81A8103F9BD1", "F76252FB385F90EA6F98554A", "D3EC96D0345BAE991C2175CE", "24ABDC75474C17E968329F66", "24846F930A11A3874CD0E3AB", "3948D8BCE2CEDDCBAAD2D511", "C6887E3A78DD2AB54009B828", "93C59213A46CB5EAFA9D40FE", "50AB38A10915155BF160E42F", "17A0EFD8B103844E5859BA7E", "D0AF485FCA65EC7940378639", "2716C73C955C5C8E0B2B6C1A", "82C12517D7D11B3AA69F9046", "38BCC7DDD753A027AE474C89", "56C4880ED2F21F08B4AB77D4", "74760C1D3D15D406B0610E1E", "BDB17300AB97E41E167979B0", "FD98C1AE6C87F81FD173F957", "9AEDE29DCDAA6CF71A09BEA5", "FF089E4556B82BB4560B85C1", "47294DE31D6B1DFF73C290C4", "6A135315F7001AE1D296A661", "09BA63DA8E16C7E108595B1B", "0A7CDBE73C21566EC2A908D3", "4D367349850EB845038E7114", "A580B97F8529FDF40F97412C", "55A66BA933C3495997C15594", "4AA1B4842EC31035DCE480E0", "AEC4572527145FBE9E4993DD", "562BB8CFCD0A1F9ECDE21F76", "0E2C0AE2117C5F421E220499", "CE451357FC0D99AE8C4EE67B", "CB8A174452AC316EC838DA68", "70DA20F35C1A4C90BAEE10D7", "E9678311A2A8B082A9B41862", "C38AB3C3BAACF806D4058083", "C4313FB4327662C36AC72EDF", "C44D7FD306B94425BBC7A773", "F3FFC7099BA644DB94DF5CB5", "9EFF7A8D95EE43E09BBA59E4", "F21D4A4A9C944E65BC8ACD86", "B7BBF2A3F2694A568A61D386", "2A40B90F6E094760B0096543", "6F792111AA1A45F4AC43C88D", "C8F6506B61644952A9BF63A4", "B99E8482EF4D432BB75A7208", "0B98CAAED29147C2A9F41235", "6D8D6B4DBF8A47A58CF29FE9", "EF5EF6D0B9FFD1AB15254023", "E2C396BDDFD731870AF6FB2A", "F43CE0F6B2DAF81CD179CB6F", "CC132EE385DA881BD4DCA57B", "231A0BA3D7C801225FA37FDB", "F3D473087068BB633C8C702A", "1E4875CCA95460AA52AD2B81", "7EAB69413B38295B7CA296AE", "9CAE749D8AB221D102E30A7F", "3751710BBB55533CB443C9FA", "A4591BA92F742F6391030E49", "6821A09FED7BADAC6BECF31A", "9C79D4174BC1754ECEAD57F4", "0A4637851D468329C2083C52", "55DFF6E49F622F0A21413DB5", "B294A681FB145E247CD9A0AB", "013449CA1722DF0C931F9DE5", "D12EE9C1539B3AE08B63FB62", "1ACA29FFE61B4FC75D5CC2B7", "950ADC0DE4A7A40C9EFBF166", "728869EEB87FC0748D62CB24", "567330BB70007C6608EACAE1", "8E63C4558155B5BF4699C97C", "FE8B253CCFE3C9B4270392AB", "3368C67DD7A2BA752FE66836", "08BF3262C4F6D6524BBD7771", "A16F7147050A338621352C50", "84B4F9D8083AB74FCBD760BA", "5649B6F058AAAA1A3A3A2FA2", "C25E1715741B058361CDB1FD", "CA07762B315208F7D4A30C08", "203FB8FDCAC6F57D130FFF02", "07D97EEBA10839D07DCCB342", "1BDD1FF8C48D02CA10DD92FC", "A895CDF026127EFF21ADF4B0", "E69EAE49FED6446A570E8F3F", "CF3884F321A5A3DF418F1BE9", "8A282B24BDB2E894E35D6484", "34A313721E6D194EB335D349", "EF9CEB9137BF4E85B6298570", "8FDD05D1D52DBC3A1FF7783B", "CA49509E1099B7093F6720B6", "4DC3A61A9234CF72E74EC151", "E7BD192DD80EBD06DA8D317A", "3C83719349A289354BE220B7", "2D2D1B341FD336CBD1B9FABF", "BA6EAF8E9B1295BF8AA57033", "2F0B89E52F88B95187D854BC", "BACDA3E9F7E5C157E407B3BD", "26E0779073F124552DDA1FC3", "54EBA5065C7FBFC1F3BE4A2C", "A4F82DE700734CB19363B90F", "74958BD7A65C45B0831CC5D9", "CE32E653113F511ACA12E634", "DA81B746862A067A2E870F6D", "DC7C47BFE2337F926A9A9DCF", "87B596E0142295AFED133314", "7FA1319B5B2C44409E818261", "9FCD56623E462DF84A1F5D33", "1D065D4295BBB5D3EF086608", "7813F348617408CFB44D5045", "C6903FDDE3354D355CF8B003", "64C772F03DEC80943B794912", "959BDD9466FCFAE06B46D84C", "721953EDBA2Line truncated
|
||||
B7E302195F6A9DD0DEDAAE81, "F69A6B3CA6DADD9644B13172", "E28A5CEB274AF11A9D4D64A7", "8FB86FADC3423CED521C855A", "F097A5A4144D30372FD572EC", "9A7580D6B22390B635A19F89", "BE28275CD8BD625C772155F9", "356F4572114E7AAE0F5954D9", "CAADC64B387B05820E0F1B3A", "2A41A057C987C99C16326EC3", "21BB5980BE79619891B2E0F3", "41058564FCF0CD603FF6F83B", "F112F84DEFA54BBF6A74AA9D", "64E852CA1B43CE2EE5509DC4", "43DE6A833C76FCEB0BB16373", "F0405E77CEC80758A4B05E20", "94CD4919A1DF7FB2A7F00A39", "B81E845A0F5F9ADBA178782E", "27128C761CE524CD4E616E0F", "E4A6B8FD70C6B71C8A8946F8", "E5C6EC6275ECA4B6620F751A", "1F877766F277CE8D98FC4C98", "75C2926B75F8D566C90F8814", "6A45AA20DAD66943C6609278", "F43A4EA6B12A2844D9913AFB", "30F9AA558484279D418BC2AB", "7D24D7E8433052B54A98F9B4", "66AB557EF31F72BCE23B6C20", "32336CE2F512DBFD6C8C33B6", "B144E6CCF412FA4F6ED667BE", "0E6F18DF1BB7BDC2B522D565", "88362186D105AC38CDC1F34B", "A2C86680E706C6EB896624F7", "1D76124E803555F5B3BB4858", "227B8433ABAD08C1540FDFB7", "5FE510E3299964E905F2EEC1", "1DA339454EE1D551B57EE722", "111F36A223EDA8FB8B1BAA87", "BCB4A9FFE10489971342B925", "4D475CC90EDE6383ADE44783", "1F48315B00236C831CD0B0C6", "18EBAF7CBB4C8D0AAE871090", "A09EE5D651D37597BCCE1549", "2DCC205FFB836A66A37E98B5", "4A02035CF876A8F80E66524A", "F59D1FEA561570A5236F53C0", "D8156871A65DFAA5E40891F8", "F6973CC082553C582B6A3B7B", "68C882F50C29460AAE9C6CD9", "647C43E622AA4F1F81D75AED", "DCA00E415E794E4482CD7799", "2DD34F1B46E94A1A86EE1F03", "43EBAF4A0A62FA8383A1FF2E", "3DD59A0CA93F9FAEC2C852A2", "208538707397447D90B15973", "3B04447D7EB864E7D58E52B2", "37D733ED816B587FB560594E", "7BF84CEED0675652AF613D1A", "474645F3EE3BE43A1F533D5A", "F44C9C01432D4A6C9F4097C7", "570064B66DCCAAD7E2F3CA71", "FD32EAB5B2533D984DD976F8", "44B68B934274129184A15323", "E5FCCCC1D2A8FE933B994C9D", "B044E18CD3014FF408A9291A", "2BA7ED90FFE5683113F61261", "ACE8F17CB88D435E5F71D748", "49A277CE344C81A8103F9BD1", "F76252FB385F90EA6F98554A", "D3EC96D0345BAE991C2175CE", "24ABDC75474C17E968329F66", "24846F930A11A3874CD0E3AB", "3948D8BCE2CEDDCBAAD2D511", "C6887E3A78DD2AB54009B828", "93C59213A46CB5EAFA9D40FE", "50AB38A10915155BF160E42F", "17A0EFD8B103844E5859BA7E", "D0AF485FCA65EC7940378639", "2716C73C955C5C8E0B2B6C1A", "82C12517D7D11B3AA69F9046", "38BCC7DDD753A027AE474C89", "56C4880ED2F21F08B4AB77D4", "74760C1D3D15D406B0610E1E", "BDB17300AB97E41E167979B0", "FD98C1AE6C87F81FD173F957", "9AEDE29DCDAA6CF71A09BEA5", "FF089E4556B82BB4560B85C1", "47294DE31D6B1DFF73C290C4", "6A135315F7001AE1D296A661", "09BA63DA8E16C7E108595B1B", "0A7CDBE73C21566EC2A908D3", "4D367349850EB845038E7114", "A580B97F8529FDF40F97412C", "55A66BA933C3495997C15594", "4AA1B4842EC31035DCE480E0", "AEC4572527145FBE9E4993DD", "562BB8CFCD0A1F9ECDE21F76", "0E2C0AE2117C5F421E220499", "CE451357FC0D99AE8C4EE67B", "CB8A174452AC316EC838DA68", "70DA20F35C1A4C90BAEE10D7", "E9678311A2A8B082A9B41862", "C38AB3C3BAACF806D4058083", "C4313FB4327662C36AC72EDF", "C44D7FD306B94425BBC7A773", "F3FFC7099BA644DB94DF5CB5", "9EFF7A8D95EE43E09BBA59E4", "F21D4A4A9C944E65BC8ACD86", "B7BBF2A3F2694A568A61D386", "2A40B90F6E094760B0096543", "6F792111AA1A45F4AC43C88D", "C8F6506B61644952A9BF63A4", "B99E8482EF4D432BB75A7208", "0B98CAAED29147C2A9F41235", "6D8D6B4DBF8A47A58CF29FE9", "EF5EF6D0B9FFD1AB15254023", "E2C396BDDFD731870AF6FB2A", "F43CE0F6B2DAF81CD179CB6F", "CC132EE385DA881BD4DCA57B", "231A0BA3D7C801225FA37FDB", "F3D473087068BB633C8C702A", "1E4875CCA95460AA52AD2B81", "7EAB69413B38295B7CA296AE", "9CAE749D8AB221D102E30A7F", "3751710BBB55533CB443C9FA", "A4591BA92F742F6391030E49", "6821A09FED7BADAC6BECF31A", "9C79D4174BC1754ECEAD57F4", "0A4637851D468329C2083C52", "55DFF6E49F622F0A21413DB5", "B294A681FB145E247CD9A0AB", "013449CA1722DF0C931F9DE5", "D12EE9C1539B3AE08B63FB62", "1ACA29FFE61B4FC75D5CC2B7", "950ADC0DE4A7A40C9EFBF166", "728869EEB87FC0748D62CB24", "567330BB70007C6608EACAE1", "8E63C4558155B5BF4699C97C", "FE8B253CCFE3C9B4270392AB", "3368C67DD7A2BA752FE66836", "08BF3262C4F6D6524BBD7771", "A16F7147050A338621352C50", "84B4F9D8083AB74FCBD760BA", "5649B6F058AAAA1A3A3A2FA2", "C25E1715741B058361CDB1FD", "CA07762B315208F7D4A30C08", "203FB8FDCAC6F57D130FFF02", "07D97EEBA10839D07DCCB342", "1BDD1FF8C48D02CA10DD92FC", "A895CDF026127EFF21ADF4B0", "E69EAE49FED6446A570E8F3F", "CF3884F321A5A3DF418F1BE9", "8A282B24BDB2E894E35D6484", "34A313721E6D194EB335D349", "EF9CEB9137BF4E85B6298570", "8FDD05D1D52DBC3A1FF7783B", "CA49509E1099B7093F6720B6", "4DC3A61A9234CF72E74EC151", "E7BD192DD80EBD06DA8D317A", "3C83719349A289354BE220B7", "2D2D1B341FD336CBD1B9FABF", "BA6EAF8E9B1295BF8AA57033", "2F0B89E52F88B95187D854BC", "BACDA3E9F7E5C157E407B3BD", "26E0779073F124552DDA1FC3", "54EBA5065C7FBFC1F3BE4A2C", "A4F82DE700734CB19363B90F", "74958BD7A65C45B0831CC5D9", "CE32E653113F511ACA12E634", "DA81B746862A067A2E870F6D", "DC7C47BFE2337F926A9A9DCF", "87B596E0142295AFED133314", "7FA1319B5B2C44409E818261", "9FCD56623E462DF84A1F5D33", "1D065D4295BBB5D3EF086608", "7813F348617408CFB44D5045", "C6903FDDE3354D355CF8B003", "64C772F03DELine truncated
|
||||
"E55D54021BC2D28E672F34F6",
|
||||
"3ACD269D8F99B7C9B111B453",
|
||||
"37F38A6A02220B5BCC6A0B4E",
|
||||
@@ -2096,7 +2101,7 @@ B7E302195F6A9DD0DEDAAE81, "F69A6B3CA6DADD9644B13172", "E28A5CEB274AF11A9D4D64A7"
|
||||
"DC76E9F0C0006E8F919E0C51" = {
|
||||
"isa" = "PBXGroup";
|
||||
"children" = ( "1893D6FB6CB3BF8A429B887C",
|
||||
8C395B59B89AD94C577095CC, "01B2CD4F57507B2482FA993D", "BDB9AD06DF2962978FC5E007", "D481BB9B31A0A44756A2C642", "B1E09D51DE234384B03D6D01", "CB17E83394A9C5DF26C5FFF1", "C7751857B7E10600A291771F", "FAD4DB6739AE4807ADA3C27B", "91E042FFB6E1419B8931E646", "067A7A84E2E4F118095A8BB3", "9DCB740145E540C996E6692F", "312B00F5A13D4921AE264A2A", "5B5BB817A4524500B7E3CB1E", "53272DD2F81E40B2AF672610", "0F12DBE149CE0CD675AA66F8", "52B95FA5ED31A04909EFE857", "781F14A708182E90BDE108E3", "00B808A7780A251CC29CB06B", "7E6AA63365575C8888A99124", "C445DF085F7C807B908C19CB", "5421B06971D847A1A805F702", "9254269AE4824C5B8AAA4996", "16504192DF96663A78D5DFA8", "27644F1DECBC432E1B2768B8", "D333DD1A438EB4BC0A55464B", "C321FDC49814C39490B20F79", "0F7A6228BA94CC0C12A84F39", "16D176D2DB64F7417D6ACFC8", "530ADB2D5152809BD56B4BED", "5F75B5064C7FDFAC8800C0D3", "F12C3866E3125783A11526D4", "F797210E51F1F0B1CD8FF395", "49569D327A43047408F2DEAE", "5A3424F913D65182707784B8", "51E4344CADBA88EC0446EEA7", "792A514D818919EDF5F34717", "A1F993CAF2D203E517890FD7", "901D1E1FBB7B60F19AD95144", "07DA06A775F9267984E51EEC", "11A4CB4B8DF107985B0CB524", "7B1F352E41BE60388711F023", "9E3128773E24559995067F7F", "14868044C1345013A7F60685", "11EC6918F3B91AEE9FFB49F7", "9D6A737AD809CB34F0980691", "FFC326493D8F4603BD28BB6B", "C6A3EB89A975DDC859E73A36", "8BB8CC2C6D97EC712B6F9399", "EEEDC5273980EA83CBC757C5", "733493F7C9E00346B4010B62", "33C98A5D72682FD6AC0E5F62", "A748DE9CAD2C1300FF48663D", "F57F14F4BFF647EF7FDB64CC", "5BFFA01A19C5FC41EF60EE4A", "1B9725597009D3DE68DF62E3", "F80D3145FD907815FDAF4BA7", "1A6A84C4CFAE563E14CE3FF0", "58F6CDBEF369605DFC3FCA85", "F415937106477DDE7F72A7B8", "14F91CCC9DF1CB8D35001AEE", "EFF84673C3646AA99164A863", "5B72E96E835077666362CF7A", "A39C36931B6A59B325F0FB90", "B64B0E42CAB9E1342A8BD94F", "F0C6E8F2BD38C724C36913D6", "6CE23109A4C2422F878E5C78", "BCCC0E3132CFE859BA8542F6", "BB100B517FD5ADB833B0B9C0", "9426E9B4DB9CAF1E6EAFA927", "EF7750B1163369DD13DD5CE1", "A7B7BA8AEF5A062CF3C843DF", "F6B4DAA016C1911A09758E63", "5143771599404245B3DEA52E", "760BA2B4DE5F2E924A84BF1D", "C2646126B83489FB52DC1D6E", "14AE753173354D3EB5864563", "F82EC7B41E234EADA1CF84D1", "A3C1EA3C22CE43C8892A802C", "BA967E7658F745E1BC0ED7F2", "4F0596325DE3470A80EFE4EA", "3BDB3184317E405C82B06486", "5866911856DA41268827A601", "D168EF13EB20422AACCD96E2", "15ABD5DCBAFD4B6DAE418797", "BE84A652C2B04396BCBB921A", "455C6D7E1EB546C4B5A75AAF", "D70CBBA8530C6BC9B02AB379", "4B8AEF880E57EE0677BC1153", "F54CF4225FFCED7D7F647951", "67FB937B65ACB9D4278CFA4E", "3598AF219C2977DF6C4A5C2F", "F87E4A23CC0809CEA94F12E6", "E8ACFC9B89CAD012A308C316", "9DB93A677589CE78172A44A7", "4F76A349DB6B5A0F9E6A2C43", "E81B18C39152139A6105B84E", "25A93A2467BFAAED3F191E1B", "5BFC3293E94D0E3351244621", "D8248EBAF73CAB10C7C448FB", "217DC0F34A56DA5C4BB91E77", "A0DF98B8016880CAF0C0CD58", "42D841F636995F06C9332A0C", "31A4FF4E73AF3B5CFC309F60", "749C4BDB6AC37B600911C9C9", "39A991CE28D47963DE7E15F3", "A18B9CFC47DCA8A891571318", "1A65828188431AEC64A2EF1F", "C0CF07236765657B1CF3A441", "6DEBF620342B2A4B3AE5BCB1", "90FBFEB8BEE4D4B5EA4FF8B0", "6679E2C250A647804D193528", "8692D98EA40F7B2EE5EE136F", "3D4B95521A762F5E8B8ABB14", "EBC28D481E37A6D95550ED04", "9749C3A6E351964032384A3D", "79604D0603B58EC1CC2A9DA2", "91B7567AB5800567DAC343CD", "AFE25089ECEE6A77C768C432", "B4051C9774DFB5E15D886F79", "FB41D37D8F4F766B6F337A30", "5D4CCAE92059989714989D6B", "0F7F71696BF73C2A0921178C", "C05CBCBB0DDDF3E9B71ED4AB", "6E861FD0CA44590764FE438B", "C99C3267AC413B97551BD1EF", "472AC2CCB232639BB577696C", "A02293D0378FF4DA75C39EB5", "18267AA57F2798E15C7DEA3C", "4E1B73C4B6AD14CC00967423", "EDC3E15D86A8D4874AD0C180", "2711817C64CE46C182C5A8E9", "E5ADAD330B664E2BBC535C6A", "C6249A99265F026C199FD295", "5E52CBA4F430EC64E65E4239", "1AAB13C7AEC9576FCE909B30", "ACAA7FB0B84ABBE3CC50469D", "FC1ACF21BD5C46FC8CF22B60", "F147DB0A0B7B363C0181BBC4", "CE053132399860C266BA4115", "36D1A8AB53B6003A6A4B68D1", "45A42226A532DA306D381520", "29CCFF9C7E6B33DDB3DDA617", "EF0BA4677314B7DCCE726359", "68ABF5E4DB7DD34B8CC7EBA4", "2C765C18C64E564F954A7173", "9B68DF21D14BBFC0C977A0A8", "4C0DBA3B44DA84392AA3796A", "80C6105AD9495A0EB1F4A58C", "9F3C15DE610B4BFABF101002", "9F3C15DE610B4BFABF101003", "9F3C15DE610B4BFABF101001", "7339FE1A16674B2588333001", "3AE8BC7E4A8F296EB0B7AEFD", "2ECB4508563F3873B436B9EE", "277E06BEAA4F5310C0718CF2", "796FD8945B70098E2E2C7B92",
|
||||
8C395B59B89AD94C577095CC, "01B2CD4F57507B2482FA993D", "BDB9AD06DF2962978FC5E007", "87E2AF0BA86F733A89C4948C", "D481BB9B31A0A44756A2C642", "B1E09D51DE234384B03D6D01", "CB17E83394A9C5DF26C5FFF1", "66DDF50B2F00881C339F9F00", "C7751857B7E10600A291771F", "FAD4DB6739AE4807ADA3C27B", "91E042FFB6E1419B8931E646", "067A7A84E2E4F118095A8BB3", "9DCB740145E540C996E6692F", "312B00F5A13D4921AE264A2A", "5B5BB817A4524500B7E3CB1E", "53272DD2F81E40B2AF672610", "0F12DBE149CE0CD675AA66F8", "52B95FA5ED31A04909EFE857", "781F14A708182E90BDE108E3", "00B808A7780A251CC29CB06B", "7E6AA63365575C8888A99124", "C445DF085F7C807B908C19CB", "5421B06971D847A1A805F702", "9254269AE4824C5B8AAA4996", "16504192DF96663A78D5DFA8", "27644F1DECBC432E1B2768B8", "D333DD1A438EB4BC0A55464B", "C321FDC49814C39490B20F79", "0F7A6228BA94CC0C12A84F39", "16D176D2DB64F7417D6ACFC8", "530ADB2D5152809BD56B4BED", "5F75B5064C7FDFAC8800C0D3", "F12C3866E3125783A11526D4", "F797210E51F1F0B1CD8FF395", "49569D327A43047408F2DEAE", "5A3424F913D65182707784B8", "51E4344CADBA88EC0446EEA7", "792A514D818919EDF5F34717", "A1F993CAF2D203E517890FD7", "901D1E1FBB7B60F19AD95144", "07DA06A775F9267984E51EEC", "11A4CB4B8DF107985B0CB524", "7B1F352E41BE60388711F023", "9E3128773E24559995067F7F", "14868044C1345013A7F60685", "11EC6918F3B91AEE9FFB49F7", "9D6A737AD809CB34F0980691", "FFC326493D8F4603BD28BB6B", "C6A3EB89A975DDC859E73A36", "8BB8CC2C6D97EC712B6F9399", "EEEDC5273980EA83CBC757C5", "733493F7C9E00346B4010B62", "33C98A5D72682FD6AC0E5F62", "A748DE9CAD2C1300FF48663D", "F57F14F4BFF647EF7FDB64CC", "5BFFA01A19C5FC41EF60EE4A", "1B9725597009D3DE68DF62E3", "F80D3145FD907815FDAF4BA7", "1A6A84C4CFAE563E14CE3FF0", "58F6CDBEF369605DFC3FCA85", "F415937106477DDE7F72A7B8", "14F91CCC9DF1CB8D35001AEE", "EFF84673C3646AA99164A863", "5B72E96E835077666362CF7A", "A39C36931B6A59B325F0FB90", "B64B0E42CAB9E1342A8BD94F", "F0C6E8F2BD38C724C36913D6", "6CE23109A4C2422F878E5C78", "BCCC0E3132CFE859BA8542F6", "BB100B517FD5ADB833B0B9C0", "9426E9B4DB9CAF1E6EAFA927", "EF7750B1163369DD13DD5CE1", "A7B7BA8AEF5A062CF3C843DF", "F6B4DAA016C1911A09758E63", "5143771599404245B3DEA52E", "760BA2B4DE5F2E924A84BF1D", "C2646126B83489FB52DC1D6E", "14AE753173354D3EB5864563", "F82EC7B41E234EADA1CF84D1", "A3C1EA3C22CE43C8892A802C", "BA967E7658F745E1BC0ED7F2", "4F0596325DE3470A80EFE4EA", "3BDB3184317E405C82B06486", "5866911856DA41268827A601", "D168EF13EB20422AACCD96E2", "15ABD5DCBAFD4B6DAE418797", "BE84A652C2B04396BCBB921A", "455C6D7E1EB546C4B5A75AAF", "D70CBBA8530C6BC9B02AB379", "4B8AEF880E57EE0677BC1153", "F54CF4225FFCED7D7F647951", "67FB937B65ACB9D4278CFA4E", "3598AF219C2977DF6C4A5C2F", "F87E4A23CC0809CEA94F12E6", "E8ACFC9B89CAD012A308C316", "9DB93A677589CE78172A44A7", "4F76A349DB6B5A0F9E6A2C43", "E81B18C39152139A6105B84E", "25A93A2467BFAAED3F191E1B", "5BFC3293E94D0E3351244621", "D8248EBAF73CAB10C7C448FB", "217DC0F34A56DA5C4BB91E77", "A0DF98B8016880CAF0C0CD58", "42D841F636995F06C9332A0C", "31A4FF4E73AF3B5CFC309F60", "749C4BDB6AC37B600911C9C9", "39A991CE28D47963DE7E15F3", "A18B9CFC47DCA8A891571318", "1A65828188431AEC64A2EF1F", "C0CF07236765657B1CF3A441", "6DEBF620342B2A4B3AE5BCB1", "90FBFEB8BEE4D4B5EA4FF8B0", "6679E2C250A647804D193528", "8692D98EA40F7B2EE5EE136F", "3D4B95521A762F5E8B8ABB14", "EBC28D481E37A6D95550ED04", "9749C3A6E351964032384A3D", "79604D0603B58EC1CC2A9DA2", "91B7567AB5800567DAC343CD", "AFE25089ECEE6A77C768C432", "B4051C9774DFB5E15D886F79", "FB41D37D8F4F766B6F337A30", "5D4CCAE92059989714989D6B", "0F7F71696BF73C2A0921178C", "C05CBCBB0DDDF3E9B71ED4AB", "6E861FD0CA44590764FE438B", "C99C3267AC413B97551BD1EF", "472AC2CCB232639BB577696C", "A02293D0378FF4DA75C39EB5", "18267AA57F2798E15C7DEA3C", "4E1B73C4B6AD14CC00967423", "EDC3E15D86A8D4874AD0C180", "2711817C64CE46C182C5A8E9", "E5ADAD330B664E2BBC535C6A", "C6249A99265F026C199FD295", "5E52CBA4F430EC64E65E4239", "1AAB13C7AEC9576FCE909B30", "ACAA7FB0B84ABBE3CC50469D", "FC1ACF21BD5C46FC8CF22B60", "F147DB0A0B7B363C0181BBC4", "CE053132399860C266BA4115", "36D1A8AB53B6003A6A4B68D1", "45A42226A532DA306D381520", "29CCFF9C7E6B33DDB3DDA617", "EF0BA4677314B7DCCE726359", "68ABF5E4DB7DD34B8CC7EBA4", "2C765C18C64E564F954A7173", "9B68DF21D14BBFC0C977A0A8", "4C0DBA3B44DA84392AA3796A", "80C6105AD9495A0EB1F4A58C", "9F3C15DE610B4BFABF101002", "9F3C15DE610B4BFABF101003", "9F3C15DE610B4BFABF101001", "7339FE1A16674B2588333001", "3AE8BC7E4A8F296EB0B7AEFD", "2ECB4508563F3873B436B9EE", "277E06BEAA4F5310C0718CF2", "796FD8945B70098E2E2C7B92",
|
||||
"445AFB9A10CBBAE48539A39F",
|
||||
"6BD293692BB0058E467291CC",
|
||||
"C015745C6395762B28454414",
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Scheme LastUpgradeVersion="1600" version="1.3">
|
||||
<BuildAction parallelizeBuildables="YES" buildImplicitDependencies="YES"><BuildActionEntries><BuildActionEntry buildForTesting="YES" buildForRunning="YES" buildForProfiling="YES" buildForArchiving="YES" buildForAnalyzing="YES"><BuildableReference BuildableIdentifier="primary" BlueprintIdentifier="DFD299825CB67449ECA89656" BuildableName="VCC Plus OSS.app" BlueprintName="VCCMac" ReferencedContainer="container:VCC.xcodeproj"/></BuildActionEntry></BuildActionEntries></BuildAction>
|
||||
<TestAction buildConfiguration="Debug" selectedDebuggerIdentifier="Xcode.DebuggerFoundation.Debugger.LLDB" selectedLauncherIdentifier="Xcode.IDEFoundation.Launcher.LLDB" shouldUseLaunchSchemeArgsEnv="YES"><Testables><TestableReference skipped="NO" parallelizable="NO"><BuildableReference BuildableIdentifier="primary" BlueprintIdentifier="430E514662AEA1D2F10F5EBC" BuildableName="VCCCoreTests.xctest" BlueprintName="VCCCoreTests" ReferencedContainer="container:VCC.xcodeproj"/></TestableReference></Testables></TestAction>
|
||||
<LaunchAction buildConfiguration="Debug" selectedDebuggerIdentifier="Xcode.DebuggerFoundation.Debugger.LLDB" selectedLauncherIdentifier="Xcode.IDEFoundation.Launcher.LLDB" launchStyle="0" useCustomWorkingDirectory="NO" ignoresPersistentStateOnLaunch="NO" debugDocumentVersioning="YES" debugServiceExtension="internal" allowLocationSimulation="YES"><BuildableProductRunnable runnableDebuggingMode="0"><BuildableReference BuildableIdentifier="primary" BlueprintIdentifier="DFD299825CB67449ECA89656" BuildableName="VCC Plus OSS.app" BlueprintName="VCCMac" ReferencedContainer="container:VCC.xcodeproj"/></BuildableProductRunnable></LaunchAction>
|
||||
<TestAction buildConfiguration="Debug" selectedDebuggerIdentifier="Xcode.DebuggerFoundation.Debugger.LLDB" selectedLauncherIdentifier="Xcode.DebuggerFoundation.Launcher.LLDB" shouldUseLaunchSchemeArgsEnv="YES"><Testables><TestableReference skipped="NO" parallelizable="NO"><BuildableReference BuildableIdentifier="primary" BlueprintIdentifier="430E514662AEA1D2F10F5EBC" BuildableName="VCCCoreTests.xctest" BlueprintName="VCCCoreTests" ReferencedContainer="container:VCC.xcodeproj"/></TestableReference></Testables></TestAction>
|
||||
<LaunchAction buildConfiguration="Debug" selectedDebuggerIdentifier="Xcode.DebuggerFoundation.Debugger.LLDB" selectedLauncherIdentifier="Xcode.DebuggerFoundation.Launcher.LLDB" launchStyle="0" useCustomWorkingDirectory="NO" ignoresPersistentStateOnLaunch="NO" debugDocumentVersioning="YES" debugServiceExtension="internal" allowLocationSimulation="YES"><BuildableProductRunnable runnableDebuggingMode="0"><BuildableReference BuildableIdentifier="primary" BlueprintIdentifier="DFD299825CB67449ECA89656" BuildableName="VCC Plus OSS.app" BlueprintName="VCCMac" ReferencedContainer="container:VCC.xcodeproj"/></BuildableProductRunnable></LaunchAction>
|
||||
<ProfileAction buildConfiguration="Release" shouldUseLaunchSchemeArgsEnv="YES" savedToolIdentifier="" useCustomWorkingDirectory="NO" debugDocumentVersioning="YES"><BuildableProductRunnable runnableDebuggingMode="0"><BuildableReference BuildableIdentifier="primary" BlueprintIdentifier="DFD299825CB67449ECA89656" BuildableName="VCC Plus OSS.app" BlueprintName="VCCMac" ReferencedContainer="container:VCC.xcodeproj"/></BuildableProductRunnable></ProfileAction>
|
||||
<AnalyzeAction buildConfiguration="Debug"/><ArchiveAction buildConfiguration="Release" revealArchiveInOrganizer="YES"/>
|
||||
</Scheme>
|
||||
@@ -7,14 +7,14 @@
|
||||
</BuildActionEntry>
|
||||
</BuildActionEntries>
|
||||
</BuildAction>
|
||||
<TestAction buildConfiguration="UITesting" selectedDebuggerIdentifier="Xcode.DebuggerFoundation.Debugger.LLDB" selectedLauncherIdentifier="Xcode.IDEFoundation.Launcher.LLDB" shouldUseLaunchSchemeArgsEnv="YES">
|
||||
<TestAction buildConfiguration="UITesting" selectedDebuggerIdentifier="Xcode.DebuggerFoundation.Debugger.LLDB" selectedLauncherIdentifier="Xcode.DebuggerFoundation.Launcher.LLDB" shouldUseLaunchSchemeArgsEnv="YES">
|
||||
<Testables>
|
||||
<TestableReference skipped="NO" parallelizable="NO">
|
||||
<BuildableReference BuildableIdentifier="primary" BlueprintIdentifier="05FBA9C2CB41DF69785786F1" BuildableName="VCCUITests.xctest" BlueprintName="VCCUITests" ReferencedContainer="container:VCC.xcodeproj"/>
|
||||
</TestableReference>
|
||||
</Testables>
|
||||
</TestAction>
|
||||
<LaunchAction buildConfiguration="UITesting" selectedDebuggerIdentifier="Xcode.DebuggerFoundation.Debugger.LLDB" selectedLauncherIdentifier="Xcode.IDEFoundation.Launcher.LLDB" launchStyle="0" useCustomWorkingDirectory="NO" ignoresPersistentStateOnLaunch="YES" debugDocumentVersioning="YES" debugServiceExtension="internal" allowLocationSimulation="YES">
|
||||
<LaunchAction buildConfiguration="UITesting" selectedDebuggerIdentifier="Xcode.DebuggerFoundation.Debugger.LLDB" selectedLauncherIdentifier="Xcode.DebuggerFoundation.Launcher.LLDB" launchStyle="0" useCustomWorkingDirectory="NO" ignoresPersistentStateOnLaunch="YES" debugDocumentVersioning="YES" debugServiceExtension="internal" allowLocationSimulation="YES">
|
||||
<BuildableProductRunnable runnableDebuggingMode="0">
|
||||
<BuildableReference BuildableIdentifier="primary" BlueprintIdentifier="DFD299825CB67449ECA89656" BuildableName="VCC Plus OSS.app" BlueprintName="VCCMac" ReferencedContainer="container:VCC.xcodeproj"/>
|
||||
</BuildableProductRunnable>
|
||||
|
||||
@@ -0,0 +1,61 @@
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
"""Compile and execute CMOC 0.1.101 correctness cases on both emulated CPUs."""
|
||||
import argparse
|
||||
import os
|
||||
from pathlib import Path
|
||||
import subprocess
|
||||
import tempfile
|
||||
|
||||
|
||||
def main():
|
||||
parser = argparse.ArgumentParser(description=__doc__)
|
||||
parser.add_argument("runtime", type=Path)
|
||||
parser.add_argument("core", type=Path)
|
||||
parser.add_argument("rom", type=Path)
|
||||
parser.add_argument("--host-arch", choices=("arm64", "x86_64"))
|
||||
args = parser.parse_args()
|
||||
fixture = Path(__file__).resolve().parent
|
||||
runtime = args.runtime.resolve(strict=True)
|
||||
command = (["/usr/bin/arch", "-" + args.host_arch] if args.host_arch else []) + [runtime / "bin/cmoc"]
|
||||
env = dict(os.environ, PATH=str(runtime / "bin") + os.pathsep + os.environ["PATH"])
|
||||
# Build values independently on the host. Include every initialized byte,
|
||||
# terminating zero and neighboring sentinel rather than an in-guest assert.
|
||||
language = "LANG 03F807E0 12345678 444 41424300 41424300 5541424300AA END"
|
||||
cases = [("qualification.c", language),
|
||||
("handler-addresses.c", "HANDLERS N1 S1 P1 END")]
|
||||
with tempfile.TemporaryDirectory(prefix="vcc-cmoc-0.1.101-") as work:
|
||||
diagnostics = Path(work) / "diagnostics.c"
|
||||
diagnostics.write_text('''struct Empty { char; };
|
||||
union EmptyUnion { long; };
|
||||
int main(void) {
|
||||
int;
|
||||
char *pointer = (char *) 123;
|
||||
int array[4];
|
||||
switch (pointer) {}
|
||||
switch (array) {}
|
||||
return 0;
|
||||
}
|
||||
''')
|
||||
result = subprocess.run(command + ["--coco", "-S", diagnostics], cwd=work,
|
||||
env=env, capture_output=True, text=True)
|
||||
output = result.stdout + result.stderr
|
||||
if (result.returncode != 0 or "error:" in output
|
||||
or output.count("warning: declaration specifies a type but no declarator name") != 3
|
||||
or output.count("warning: switch() expression is an address") != 2):
|
||||
raise RuntimeError("Unexpected CMOC diagnostics:\n" + output)
|
||||
print("PASS diagnostics: three unnamed declarations, pointer and array switch warnings", flush=True)
|
||||
runner = Path(work) / "run-compiled"
|
||||
subprocess.run(["xcrun", "clang++", "-std=c++17", "-O2", "-mmacosx-version-min=14.0",
|
||||
fixture.parent / "run-compiled.cpp", args.core.resolve(strict=True), "-o", runner],
|
||||
check=True)
|
||||
for source, expected in cases:
|
||||
for optimization in ("-O0", "-O2"):
|
||||
print("Checking CMOC 0.1.101", source, optimization, flush=True)
|
||||
subprocess.run(command + ["--coco", optimization, "--org=2800", "--intermediate", "-Werror",
|
||||
"-o", "TEST.BIN", fixture / source], cwd=work, env=env, check=True)
|
||||
subprocess.run([runner, args.rom.resolve(strict=True), "TEST.BIN", expected],
|
||||
cwd=work, check=True)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
@@ -0,0 +1,63 @@
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
#include <cmoc.h>
|
||||
|
||||
// The runtime must report the exact assembler label after each LBSR. Subtracting
|
||||
// an assumed instruction width gives the pre-0.1.101 address and fails this test.
|
||||
static void *expectedNullReturn;
|
||||
static void *observedNullReturn;
|
||||
static void *expectedStackReturn;
|
||||
static void *expectedStackRegister;
|
||||
|
||||
static void nullHandler(void *addressPastFailedCheck)
|
||||
{
|
||||
observedNullReturn = addressPastFailedCheck;
|
||||
}
|
||||
|
||||
asm void nullProbe(void)
|
||||
{
|
||||
asm {
|
||||
import check_null_ptr_x
|
||||
leax null_probe_after,pcr
|
||||
stx :expectedNullReturn
|
||||
ldx #0
|
||||
lbsr check_null_ptr_x
|
||||
null_probe_after:
|
||||
}
|
||||
}
|
||||
|
||||
static void stackHandler(void *addressPastFailedCheck, void *stackRegister)
|
||||
{
|
||||
printf("HANDLERS N%u S%u P%u END\n",
|
||||
observedNullReturn == expectedNullReturn,
|
||||
addressPastFailedCheck == expectedStackReturn,
|
||||
stackRegister == expectedStackRegister);
|
||||
exit(0); // The stack handler contract forbids returning.
|
||||
}
|
||||
|
||||
asm void stackProbe(void)
|
||||
{
|
||||
asm {
|
||||
import check_stack_overflow
|
||||
import end_of_sbrk_mem
|
||||
leax stack_probe_after,pcr
|
||||
stx :expectedStackReturn
|
||||
tfr s,d
|
||||
std :expectedStackRegister
|
||||
// Trigger the lower-bound check without corrupting or exhausting the
|
||||
// actual stack. This is a disposable guest and no allocation follows.
|
||||
ldd #$ffff
|
||||
std end_of_sbrk_mem,pcr
|
||||
lbsr check_stack_overflow
|
||||
stack_probe_after:
|
||||
}
|
||||
}
|
||||
|
||||
int main(void)
|
||||
{
|
||||
set_null_ptr_handler(nullHandler);
|
||||
nullProbe();
|
||||
set_stack_overflow_handler(stackHandler);
|
||||
stackProbe();
|
||||
printf("FAIL STACK CHECK RETURNED\n");
|
||||
return 1;
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
#include <cmoc.h>
|
||||
|
||||
// Separate tag and typedef namespaces, with values whose representation differs.
|
||||
typedef unsigned Ledger;
|
||||
struct Ledger { unsigned value; };
|
||||
|
||||
enum Route { HOME_ROUTE = 1003 };
|
||||
typedef enum Route RouteAlias;
|
||||
|
||||
// CMOC's octal parser requires an initial \0; \103 is not supported.
|
||||
static const char globalEscapes[] = "\x41" "B\0103";
|
||||
static unsigned char runtimeIndex;
|
||||
|
||||
static unsigned receiveRoute(enum Route route)
|
||||
{
|
||||
return (unsigned) route + 13;
|
||||
}
|
||||
|
||||
int main(void)
|
||||
{
|
||||
Ledger scalar = 0x1234;
|
||||
struct Ledger record = { 0x5678 };
|
||||
char localEscapes[] = "\0101\0102\x43";
|
||||
unsigned char inferred[sizeof("\x41" "B\0103")];
|
||||
struct { unsigned char before; char text[4]; unsigned char after; } guarded =
|
||||
{ 0x55, "\x41" "B\0103", 0xaa };
|
||||
|
||||
printf("LANG %04X%04X %04X%04X ",
|
||||
receiveRoute((enum Route) 1003), receiveRoute((RouteAlias) 2003),
|
||||
scalar, record.value);
|
||||
printf("%u%u%u ", (unsigned) sizeof(globalEscapes),
|
||||
(unsigned) sizeof(localEscapes), (unsigned) sizeof(inferred));
|
||||
// Include actual bytes and sentinels. Host owns the expected values, not
|
||||
// the same compiler expression that produced the tested initializer.
|
||||
for (runtimeIndex = 0; runtimeIndex < sizeof(globalEscapes); ++runtimeIndex)
|
||||
printf("%02X", (unsigned char) globalEscapes[runtimeIndex]);
|
||||
printf(" ");
|
||||
for (runtimeIndex = 0; runtimeIndex < sizeof(localEscapes); ++runtimeIndex)
|
||||
printf("%02X", (unsigned char) localEscapes[runtimeIndex]);
|
||||
printf(" %02X", guarded.before);
|
||||
for (runtimeIndex = 0; runtimeIndex < sizeof(guarded.text); ++runtimeIndex)
|
||||
printf("%02X", (unsigned char) guarded.text[runtimeIndex]);
|
||||
printf("%02X END\n", guarded.after);
|
||||
return 0;
|
||||
}
|
||||
@@ -1,6 +1,7 @@
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
"""Check the actual CMOC indexed-load peephole rule in a source build."""
|
||||
import argparse
|
||||
import re
|
||||
import subprocess
|
||||
import tempfile
|
||||
from pathlib import Path
|
||||
@@ -11,18 +12,27 @@ def main():
|
||||
parser.add_argument("source_build", type=Path, help="build.py output's work/cmoc directory")
|
||||
args = parser.parse_args()
|
||||
src = args.source_build.resolve(strict=True) / "src"
|
||||
version_match = re.search(r"^VERSION\s*=\s*([0-9]+\.[0-9]+\.[0-9]+)\s*$",
|
||||
(src / "Makefile").read_text(), re.MULTILINE)
|
||||
if not version_match:
|
||||
parser.error("Cannot read configured CMOC version from src/Makefile")
|
||||
version = version_match.group(1)
|
||||
objects = sorted(path for path in src.glob("cmoc-*.o") if path.name != "cmoc-main.o")
|
||||
if not objects:
|
||||
parser.error("Build CMOC first; compiler objects are required")
|
||||
architectures = subprocess.check_output(["lipo", "-archs", objects[0]], text=True).split()
|
||||
if len(architectures) != 1 or architectures[0] not in ("arm64", "x86_64"):
|
||||
parser.error("Rule check requires a single supported host architecture")
|
||||
host_flags = ["-arch", architectures[0], "-mmacosx-version-min=14.0"]
|
||||
fixture = Path(__file__).resolve().parent / "optimizer-rule.cpp"
|
||||
with tempfile.TemporaryDirectory(prefix="vcc-cmoc-rule-") as work:
|
||||
out = Path(work)
|
||||
# Retain all normal compiler definitions and rename only its CLI entry
|
||||
# in this extra object. The rule itself comes from unchanged build objects.
|
||||
subprocess.run(["xcrun", "clang++", "-std=c++11", "-Dmain=vccCompilerDriverMain",
|
||||
'-DPACKAGE="cmoc"', '-DVERSION="0.1.100"', '-DPKGDATADIR="."',
|
||||
subprocess.run(["xcrun", "clang++", "-std=c++11", *host_flags, "-Dmain=vccCompilerDriverMain",
|
||||
'-DPACKAGE="cmoc"', '-DVERSION="' + version + '"', '-DPKGDATADIR="."',
|
||||
"-D__unix", "-I", src, "-c", src / "main.cpp", "-o", out / "driver.o"], check=True)
|
||||
subprocess.run(["xcrun", "clang++", "-std=c++11", "-I", src, fixture,
|
||||
subprocess.run(["xcrun", "clang++", "-std=c++11", *host_flags, "-I", src, fixture,
|
||||
out / "driver.o", *objects, "-o", out / "rule-check"], check=True)
|
||||
subprocess.run([out / "rule-check"], check=True)
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
#include <iostream>
|
||||
#include <stdexcept>
|
||||
void check(const char* first, const char* middleOp, const char* middle, const char* last, bool expectRemoval) {
|
||||
ASMText text(true);
|
||||
ASMText text(true, false); // Standard optimization; experimental DCE stays off.
|
||||
text.ins("LDB", first); text.ins(middleOp, middle); text.ins("LDB", last);
|
||||
const bool removed = text.removeUselessLdaOrLdb(0);
|
||||
if (removed != expectRemoval) throw std::runtime_error(std::string(first) + "; " + middleOp + " " + middle + "; LDB " + last);
|
||||
|
||||
+6
-6
@@ -1,6 +1,6 @@
|
||||
--- a/src/TranslationUnit.cpp
|
||||
+++ b/src/TranslationUnit.cpp
|
||||
@@ -2240,6 +2240,41 @@
|
||||
@@ -2256,6 +2256,41 @@
|
||||
}
|
||||
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
void
|
||||
TranslationUnit::writePrerequisites(ostream &out,
|
||||
const string &dependenciesFilename,
|
||||
@@ -2249,9 +2284,10 @@
|
||||
@@ -2265,9 +2300,10 @@
|
||||
if (prerequisiteFilenamesSeen.size() == 0) // if no files are depended on
|
||||
return;
|
||||
|
||||
@@ -55,7 +55,7 @@
|
||||
out << " :";
|
||||
|
||||
for (vector<string>::const_iterator it = prerequisiteFilenamesSeen.begin();
|
||||
@@ -2260,7 +2296,7 @@
|
||||
@@ -2276,7 +2312,7 @@
|
||||
const string &fn = *it;
|
||||
if (!strncmp(fn.c_str(), pkgdatadir.c_str(), pkgdatadir.length())) // exclude system header files
|
||||
continue;
|
||||
@@ -66,7 +66,7 @@
|
||||
out << '\n';
|
||||
--- a/src/Parameters.cpp
|
||||
+++ b/src/Parameters.cpp
|
||||
@@ -338,12 +338,16 @@
|
||||
@@ -339,12 +339,16 @@
|
||||
return false;
|
||||
if (*p++ != '\"')
|
||||
return false;
|
||||
@@ -111,7 +111,7 @@
|
||||
}
|
||||
|
||||
/* Pragma directive. */
|
||||
@@ -343,7 +348,11 @@
|
||||
@@ -345,7 +350,11 @@
|
||||
return false;
|
||||
++r;
|
||||
while (*r && *r != '\"')
|
||||
@@ -147,7 +147,7 @@
|
||||
}
|
||||
YY_BREAK
|
||||
/* Pragma directive. */
|
||||
@@ -2417,7 +2422,11 @@
|
||||
@@ -2419,7 +2424,11 @@
|
||||
return false;
|
||||
++r;
|
||||
while (*r && *r != '\"')
|
||||
|
||||
+1
-1
@@ -40,7 +40,7 @@
|
||||
|
||||
--- a/src/Makefile.in
|
||||
+++ b/src/Makefile.in
|
||||
@@ -449,7 +449,7 @@
|
||||
@@ -452,7 +452,7 @@
|
||||
# The dot forces CMOC to be compiled before processing the stdlib and float
|
||||
# subdirectories, whose processing requires CMOC itself.
|
||||
#
|
||||
|
||||
Vendored
+110
-102
@@ -1,9 +1,9 @@
|
||||
{
|
||||
"project": "cmoc",
|
||||
"version": "0.1.100",
|
||||
"retrieved": "2026-11-03",
|
||||
"sourceURL": "http://gvlsywt.cluster051.hosting.ovh.net/dev/cmoc-0.1.100.tar.gz",
|
||||
"archiveSHA256": "52234a5f12f3d5f36a418878fc6f55e13b411f92320b98cbb72c9c15b9f24998",
|
||||
"version": "0.1.101",
|
||||
"retrieved": "2026-11-16",
|
||||
"sourceURL": "http://gvlsywt.cluster051.hosting.ovh.net/dev/cmoc-0.1.101.tar.gz",
|
||||
"archiveSHA256": "cfd8cead5c57c4bada35a9f1e74fe914a0f41633dec7fcc6ca7dcc54adc43fd3",
|
||||
"directory": "third_party/cmoc",
|
||||
"license": "GPL-3.0-or-later",
|
||||
"excludedFiles": [
|
||||
@@ -35,7 +35,7 @@
|
||||
"INSTALL": "d00570f8f04c29f749fd9f9d4d06ec8eb483b810398a23fdb6e97d01836b4bff",
|
||||
"Makefile.am": "d87dfe47d348c13bd886c6cb46c3aa2fe04af54c89dc9f2d4c19c9f9dc41bf59",
|
||||
"Makefile.in": "e3ab02788208957fe8ba43af3fddcfdbac76055743a91031dae734a22c520ceb",
|
||||
"NEWS": "f5f39a978a3a5b2b3f684d259c74a3872f45b956db0b89ee0fefb2d84158cb2d",
|
||||
"NEWS": "e2c0a17a92705139576e350563ff28f3e29865ceaac9e826757257ddd0ffde89",
|
||||
"README": "5a038c75ed3193a6341484cbf0f2b07c617e44355be346f1313a49e3a2cc19ab",
|
||||
"THANKS": "18c0e061a0a0b9e800ed697a197409a452f1ce42402ebb920d476b122ae86a8a",
|
||||
"TODO": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
|
||||
@@ -43,13 +43,13 @@
|
||||
"autogen.sh": "a7c962a3ed2f2ca5de93ce942a575dfea3194891820605e1f09059d241f4ce7f",
|
||||
"bootstrap": "74124ac2520ff15ed57f7acb0e28dfb026690168f2c784f8de16e0db2ff3358c",
|
||||
"config.rpath": "6073b3c54341c8b324b43a79206ebbdfc659a78608cb2cb4b98efc22ca33d837",
|
||||
"configure": "ed99af35d08f79429ec7b740aa0c3c4036250523b66620528daeb7990f784eed",
|
||||
"configure.ac": "26599138d30efc90e4a61f14037c6fdd169e860334bf7a9e2cf9dea1ab538f8c",
|
||||
"configure": "7c9e4c545b322ff61a72e4be63c850772693332e5dcf069459a521f9d067448b",
|
||||
"configure.ac": "391789b8dddb784f660586bf720ccb2c5a886bd8ba71aa5c109a567948ddabcc",
|
||||
"depcomp": "561b133cbb3d0806480302a72ef4fda57e3546107dec6bc570f01c8e52ded09f",
|
||||
"doc/Makefile.am": "521525c53fcb63ddcfb8066cd6eb905e26c1fd94e3a679dd70ce920e59411bc8",
|
||||
"doc/Makefile.in": "9c513cf59f3ee5826d8f9ee18cda69fbc285eac07a1e81235832142e4078f902",
|
||||
"doc/cmoc-implementation.markdown": "cebcf703753d2bd8e562fd9564f04c8d09bc777d4cfe8209ce971822b279308d",
|
||||
"doc/cmoc-manual.markdown": "08e9754b607ef920665ee80617cc6f9b1e3e55e5944ebe3675b32984802733f9",
|
||||
"doc/cmoc-manual.markdown": "f3ac30975c6b9693bff219242e64b5b0eb9ddcf0190643985df6a16295a62035",
|
||||
"doc/cmoc-vectrex.markdown": "087f274bc45d087118eb003b92137402b754328babdeb1137a57e24a776ca762",
|
||||
"doc/cmoc.1.in": "d6124313fb04ed8e589f71b8dd7f96a363aec807362b586958fe51075a7b43a6",
|
||||
"doc/toc.pl": "14ab2762631addd2aaac59e454b110898994b024a6e3149462e6ff92324f4866",
|
||||
@@ -64,18 +64,20 @@
|
||||
"macros/cxx_suggest_override.m4": "d9b69098e07901018f550781965af2237492712ef5cd77ebdaa453858237d903",
|
||||
"missing": "387d0e5e99a2574f38d58cedac996c3fc720b4a86a03eb87f36d7852b4e80204",
|
||||
"mkinstalldirs": "f2d71387784c4f9b1b1510013b3e1456feb6ee1a5655555147555f61cd244d69",
|
||||
"src/ASMText.cpp": "5ad65fb39eaf42f83ac30e117f5d993ee5ca759878d52b0a6a764ce7c7312bee",
|
||||
"src/ASMText.h": "907011174c7cc21439238053ce8a444563dbd56048db328bef46d871d2fd925a",
|
||||
"src/ASMText2.cpp": "a599c229c5b71e82bcb41ad44b648b7dd403274d538cd77ce0f897511160e620",
|
||||
"src/ASMText.cpp": "453e779c8d43857378134b821d6d9cccfb8e880cacf4601bdff7fec1ab2ffc27",
|
||||
"src/ASMText.h": "6683c8b46b141b5fda448ec4111ba31e689232482f1f16b790cc578a09e6377f",
|
||||
"src/ASMText2.cpp": "16acb980a2a9bf9566c32a7bbbc159a2548f267a31c26ef0f1dc2f861c4bf13a",
|
||||
"src/AncestorFunctor.cpp": "61e56354d6c1f5c357bff3c618a9b88945c6b11e3a7f547f14272b8b78f0f55a",
|
||||
"src/AncestorFunctor.h": "9a86120ef4e464d6fcfad5a0a9503ba537c902601431a23c9e31ace1eaca18f2",
|
||||
"src/AssemblerStmt.cpp": "ae9f99eb916d1d0302ce94c4cf11f896813c32361fc9a409a85dc584af3461b4",
|
||||
"src/AssemblerStmt.h": "117dfc1cf7188eea8adff45f287cdb72de97845758afd5d767a076da578f2bdc",
|
||||
"src/BinaryOpExpr.cpp": "0c33012a4aa24281fcc43cf311f4b0b4c229c49bd8f361deb3893d488e3b919e",
|
||||
"src/BinaryOpExpr.h": "5d5e028ce057ca54d95a8796d034ef5aedce12a88ff435b0ecde1b37c668d584",
|
||||
"src/CastExpr.cpp": "c6cece6965cb3e946b8dd64be52215def70c64aff342b780ed29545d59447fee",
|
||||
"src/CastExpr.h": "b69bc644b78113e156e043709f79e9b6c1f0dceb65c1ab38b0376ea864cde9aa",
|
||||
"src/ClassDef.cpp": "f3a4b9862895a0bc56347d7b39e422a9035ac5a9a66f28dc17808df11a104d5c",
|
||||
"src/AssemblerStmt.h": "9616971f7afcec1604dd726d6498102affb13bbaacbde25eeb35c1d6c8efb8bf",
|
||||
"src/BasicBlock.cpp": "f9a866469a82a815c28349f2d0416ed4377e74818718e5f9ae370170063dfc37",
|
||||
"src/BasicBlock.h": "ba171a47968df0e90091334c0e9bb1eca72ed4338d19c5bac221926e6eb3a2c0",
|
||||
"src/BinaryOpExpr.cpp": "01c1a6d1625aed6569035dd03743df152bef72cda0f762a810f8c275c6a90263",
|
||||
"src/BinaryOpExpr.h": "fca85eb93a7a2e84a8611e5d0578bf02af5617e64db33105b391314ba631784e",
|
||||
"src/CastExpr.cpp": "13fb12a13951828ee222079f9a6ed07b7e19d1f26271f60be1f5dc8ea752baac",
|
||||
"src/CastExpr.h": "37f88cba9b5fb6f73a30dc197036428818b68cdac1cd27515295f50d357fbce7",
|
||||
"src/ClassDef.cpp": "69c03896d1bafda5e1aa846f29643496e0642dc10dcf4fa1d496d640c12c8080",
|
||||
"src/ClassDef.h": "ac069435a400cc15eed7d7a60a450ac9419c2e5f9d60d9445c2f88208cda9e89",
|
||||
"src/CodeStatus.cpp": "cee44fe77152c367be788f6bd96748dedf8685dcc6fbed8784c8d5a7e9f51bc8",
|
||||
"src/CodeStatus.h": "01d18d576e80fd094e67098b65aa70dd340534c0370f9c184fdf2a6512be4a44",
|
||||
@@ -86,13 +88,13 @@
|
||||
"src/ConditionalExpr.h": "d06031d6de69cd9a3ebf2e0a4e0d519586f304a5a69090643ebe96990423f025",
|
||||
"src/DWordConstantExpr.cpp": "7ee0d8b30f57fa6afaf0a6a063699674f9ce119bd9b03086f1ac66998aed40c0",
|
||||
"src/DWordConstantExpr.h": "82343276c3cbdbf468a5d2d0d87708d577b73c95a82738e4672a6c8036dabee6",
|
||||
"src/Declaration.cpp": "16bbc85e56c3c707d4d47e5d6869ef7591adfd2c8600903db3ccc50f3fcb97ba",
|
||||
"src/Declaration.cpp": "11c4ddb6a20ed05d42979a7e33b38579a06257043ccd3a460d4b8ddab19e40b6",
|
||||
"src/Declaration.h": "40da4ffa508e1a22a3719b91a1b146bd2d2396fe0c28e8f8b510ea24c61738ee",
|
||||
"src/DeclarationSequence.cpp": "3fbaf62095525c1552f7150397f2490c7add91e7e0eb724c574a41d3b2f7eee5",
|
||||
"src/DeclarationSequence.h": "534f22feafaf444d2b22880a646bf985e32683de3197bca8c6463ba7e4e8aa71",
|
||||
"src/DeclarationSpecifierList.cpp": "d828443cf157ca92c871dc203628d15fd3ad39a88a9b36b8650530453e75f32a",
|
||||
"src/DeclarationSpecifierList.h": "1f4e82607cbe34205cde18d5dca281d4debf37bdfe057573c18203419b22858f",
|
||||
"src/Declarator.cpp": "4495effe55396851b96fe94122ce662e58dc7620d842758f113c2877c8e0385f",
|
||||
"src/DeclarationSpecifierList.cpp": "cdf3c7d9885714af20067c656087ac78b95908734b47a297bc00ed02e9281720",
|
||||
"src/DeclarationSpecifierList.h": "d8e378dda0dab874a84193902928d2976a52b36b9715ab9657a025bda0e63594",
|
||||
"src/Declarator.cpp": "623c3823a1a7f6e0086c57ed8e563d24a7424898d2eb72b6e945209c1842c50b",
|
||||
"src/Declarator.h": "5cc61da1850df9fe348e06494e03d42baa6a14a3d30fce2aa271b31d0f03fba1",
|
||||
"src/ExpressionTypeSetter.cpp": "98f74f479ba6a88249fa1a88a51b21205570a9526d45a40ab970b14dbf7104db",
|
||||
"src/ExpressionTypeSetter.h": "2c6cc5ebc5e995f4c013e06988863a148e0c98c03f718b3add21ca782807c4c2",
|
||||
@@ -102,7 +104,7 @@
|
||||
"src/FormalParamList.h": "4d680aa342ebad7657db78b243ccb7302fd6d1d34b4e4be650ad27f027c70d68",
|
||||
"src/FormalParameter.cpp": "96d4b674c4fd739371f89bfa7bdc0e09fa340e221e454aa15fee887ecb3db23e",
|
||||
"src/FormalParameter.h": "874975b55aeffb43dbbb33a33494ba74bfabc956e272f0ddfb64cb5c3387fadc",
|
||||
"src/FunctionCallExpr.cpp": "f8c1fbe521a3ba125fcd4f45536e516d912b63a437c0246e611504e3d7c9979e",
|
||||
"src/FunctionCallExpr.cpp": "b531e4fb6ba0fb1c3ecfd0bc92edc3eec2c7725df4285a5d6002a18099250bda",
|
||||
"src/FunctionCallExpr.h": "22b3c82919fd82aa33fc11ff4914a7d73a4db34ea309dbb44d018d14dfc24175",
|
||||
"src/FunctionDef.cpp": "fc375e27f02c4fc68696d79520e2c9be72374e06b5d7bba30c43a77c4ad082ec",
|
||||
"src/FunctionDef.h": "9c37d4769336d468ceae245013058b9475d5274b1da95e674b606ea767bdbc7f",
|
||||
@@ -113,16 +115,18 @@
|
||||
"src/IfStmt.h": "7751af66a7fafb1d954d8463f450cc9c0e6f53db3c49f5ec0ba0170d8272bfc4",
|
||||
"src/InitializerCodeEmitter.cpp": "02b0a11d3d42f5910601a7b141311963c3622a0841777fd027dd0caee533fbec",
|
||||
"src/InitializerCodeEmitter.h": "195532345c0a7f9062fd84fc785674b165dcefef9f0e7c1bcce666f2f770a8f4",
|
||||
"src/InsEffects.cpp": "def0d7d4bcaff50cee73422618194635d0bc11fba060493c7f518120cb6bcb4c",
|
||||
"src/InsEffects.h": "c4f3202e0f835135cefd1cd0e20bd63cdba885f93caaaac637d3b7f9dd7ff78d",
|
||||
"src/JumpStmt.cpp": "7169b7cf56fae45a6ee713b868d785c66431140ec43b418b19ffb1fa971a58f5",
|
||||
"src/JumpStmt.h": "cf5554a8428a1c65ed60671921b698cef58f42d7e9e83886d5e521b1be0992c5",
|
||||
"src/LabeledStmt.cpp": "c7cfa3b9a09d808aca4e4b1b092c2aa8ba77a3b611a157ef9126c2c4eae79d16",
|
||||
"src/LabeledStmt.h": "ff92198a15b35eb55fbef1b2d2d266588d695a42ba60245f015f19bc5ecba8ba",
|
||||
"src/Makefile.am": "48a35e69035c036a1964e417c2e77d5a70ab8a2a3721fc02490dfc03c98f1611",
|
||||
"src/Makefile.in": "46bad55c5f73bcb310e741dee2da582f53ad8da611a0017a048c024f6207f25d",
|
||||
"src/Makefile.am": "ccc7ab00ed554bac7f508d6840a50139af1639217ee694c71797224b7d6538cd",
|
||||
"src/Makefile.in": "591d178028bf74ffff2749ba3a837b9383456ef54f0c62ba5496639ef04884e7",
|
||||
"src/ObjectMemberExpr.cpp": "94b3f89c00e15e889bded2dafea64a0f2c4f9d1f511c1e8be4458c1089eaf462",
|
||||
"src/ObjectMemberExpr.h": "5e0fa62b4dcdf2e02838310ae83aed140de0a05057e64bd9ba1caae25098cb1b",
|
||||
"src/Parameters.cpp": "e2b03bd300c73332f90831bab9eddeb0c4d527124f9c2b21334a6fd9e03c8d6a",
|
||||
"src/Parameters.h": "147ab08f3d9789637fc54fff731578f588e7e77ee2764fe8029b88d6252c2842",
|
||||
"src/Parameters.cpp": "41d358047a12ce3e72147c23d9ae9ab111629859b02dbf59d9f26ccb80681a98",
|
||||
"src/Parameters.h": "27295fb8afc47442575dff2327c409486522270881da2e595153ff6f7dce40d0",
|
||||
"src/Pragma.cpp": "63455908c88837ed177b890d96fe37b30438fbff179acc1e7d0088a603bc25cb",
|
||||
"src/Pragma.h": "794c820921e73247ad1feba6bf785cb63547be3f2a80b1d37c7a263badc74a9b",
|
||||
"src/Pseudo6809.cpp": "b56a5079ecfd8f1fc5f8463836a7925e3dc2ccf3359dc5a930c4ba7c8a3f9f12",
|
||||
@@ -135,22 +139,22 @@
|
||||
"src/ScopeCreator.h": "73d3c876fa55da74d30b8a0101f62af6b16d52ef14b1535d134da1f1b0b36bad",
|
||||
"src/SemanticsChecker.cpp": "b1c86ddfc4fd52c97950457145f227da854825e28b3a3c647949f4e237532985",
|
||||
"src/SemanticsChecker.h": "f5f574e2f7befde0e603e2b73f572dabe79e7af3979c541714670c009e7fc685",
|
||||
"src/StringLiteralExpr.cpp": "c49c8145127fb6082aec603cc44f33eec3a6840cd31c5172d1fd2aaf8cf5d400",
|
||||
"src/StringLiteralExpr.h": "a73075b86e7e7c8c25295341f09514b9ab90f4d26322a3aa96d48c94593bd0c3",
|
||||
"src/SwitchStmt.cpp": "c6b6027c2136749ee440bf927e8fccdda27475f1e369b44a5dfbeadc30566bf7",
|
||||
"src/SwitchStmt.h": "2f0ecb974b3cf9f5884eb82374fdfd22a0eda2058bea349a2a265772ad762dcf",
|
||||
"src/StringLiteralExpr.cpp": "d9ac4440a8093cb6ea48a6ffcc390ad416291ba28ae41f1170795a772021b5cb",
|
||||
"src/StringLiteralExpr.h": "9ae1f28a48b860c593d16b427dfea7cbb8dc58f8a27e698b4f9607cd510a90ec",
|
||||
"src/SwitchStmt.cpp": "b62adfa91f99d2c9e93ac0a61fbd1ff69eaf0bbad96fcd054d7350a1a71c5139",
|
||||
"src/SwitchStmt.h": "94ac91a49186f5ea319e033184d9105f4365b13998e3c706c50f9e8b277f4911",
|
||||
"src/TODO": "af3cbd1285d2d08ab3b058f643f7993110c2c92772912a46e630d37339b718e8",
|
||||
"src/TranslationUnit.cpp": "c091cc4ca90b8e6ffd739174240e7a825205ab5c8c0f0f50daf65d0a39c8d6ed",
|
||||
"src/TranslationUnit.h": "10376120afd2ca0657a75f905a92e7d1d0bfc7be061e3e53e6e6c44d34162906",
|
||||
"src/TranslationUnit.cpp": "730fa43835a4ceb1f4b4d84d5783682b400e3514a133c6c62848e76366215e0f",
|
||||
"src/TranslationUnit.h": "916309b437774eaf36d7f17f8595f7294d0d66e7d636d2332a32215d83c6612b",
|
||||
"src/Tree.cpp": "33a3df544c808a4672350741a27a8684957b97a05ed2a1bd802132fa3524a18d",
|
||||
"src/Tree.h": "cc0017a6bcbe946e9ccc236923ca55ff3969271199dcc4b7d2fcb2cecb27e0d8",
|
||||
"src/TreeSequence.cpp": "fff438b023d1e90d168a79260c2177e3b9868e76fb12bfb8eeeeced59b5ad2be",
|
||||
"src/TreeSequence.h": "04052bc52b87c7f19fccb698a723593e73909f996d9e83e50df085af81636864",
|
||||
"src/TypeDesc.cpp": "09361b1095c5cbab3aa9f7f05f4e38f062c775b8e536f07927fd86de4b96384f",
|
||||
"src/TypeDesc.h": "1f83725a58efaa1bae1006582a6289fab10cc4055e243b3d270b5c3edabd3062",
|
||||
"src/TypeManager.cpp": "8717ca925f84acf131ae1f27efff672d079126b2712e29d08a74cf596aea1f66",
|
||||
"src/TypeManager.h": "15b73233fa540a122e0cf56a9068739c23ac15169905366fcf1e3601c6b4bdc3",
|
||||
"src/UnaryOpExpr.cpp": "59ffa9526b178cbe9fb56716ceef4598c74fe840cc90e9393d0d77aa352b82da",
|
||||
"src/TypeDesc.cpp": "4de82b020f8ae8b82ee7e3b3c3351b289bc107a0a03c25fd3e7f737f33b61471",
|
||||
"src/TypeDesc.h": "ca07c9613d18e34938945b10339a03509662e79675988d644bc627c211a9e065",
|
||||
"src/TypeManager.cpp": "81cffad50341210dfbbae32b30fc18eb51799393edc7fa19a21bae570b17e4a4",
|
||||
"src/TypeManager.h": "8ff9ff773dc7c76d667378198a20733a6e09aa0a07feb32c3705d1943c38d998",
|
||||
"src/UnaryOpExpr.cpp": "775129fdbfd6cd0ddb8396f26e9e117c43064ea4ae910311334d5431f2deae19",
|
||||
"src/UnaryOpExpr.h": "2f1f1d638e403596de4d0df4a946d8af2480799b7756f69153195e59e0c78c9f",
|
||||
"src/VariableExpr.cpp": "c5e38e2d7aad34dc17caad5c6073d0b59713d3b731327789ffa584ff46983c15",
|
||||
"src/VariableExpr.h": "4dc6c63cee4cad00552062c7d8f91a386da297111be27b8614f715b75c3884ba",
|
||||
@@ -274,12 +278,12 @@
|
||||
"src/float/unpackXToFPA1AndMul.asm": "ea13155e3c6a85e0f80fa74c085ea178712410863921d0637c06646e7a0ba7a3",
|
||||
"src/float/unpackXtoFPA0AndPrep.asm": "ece3e3b55a7cf9338ef71e5ca58bd03943736060c284c87ef0ac840b30a9acd7",
|
||||
"src/install-coco-boot-loader": "a74b495e4c91a96e0f77f4acd59e12eb051253da1bb22fd567d384dadc2f2d60",
|
||||
"src/lexer.cc": "449d76657a71f41b9ae194ae2892fb93c991256c610c30dda64f0792a92e824c",
|
||||
"src/lexer.ll": "3e642e09dd77a240da5e6f79d155342b05cb58453f2b7eb5438d29493e761ad5",
|
||||
"src/main.cpp": "4690fce889947aa55a59a962795438152de3c71ba5f3917e23278103abeb4551",
|
||||
"src/parser.cc": "2a25acc6d7ab7ade56533439ab6ddbe3a73ad7e1ce70771c0674dd6ed082d0cc",
|
||||
"src/parser.hh": "64a5f591752962768cf1b37cd814416625fb94bdc827c5bb50ed0d4ab5d758ff",
|
||||
"src/parser.yy": "7dfc80b1d3ba764ff4ecb6957fb3f2df4facf893ed5f5bd8d0b29b35193249ef",
|
||||
"src/lexer.cc": "a2a868f22d145ae5e56672c70094fe0b54a1017326b6ab1ed229340642108bc4",
|
||||
"src/lexer.ll": "58f5103522c94715f0edf9d56c18757830d5787f4e2994aacd26123bd024fbae",
|
||||
"src/main.cpp": "be29eaa98f4b0343db13092166bbc71c64bb1d1dd349814574c66cf18388587a",
|
||||
"src/parser.cc": "f7934eca44a042d62f167cbf43020cd5a0966d8ff5d7f9b6c15776a37cc955fe",
|
||||
"src/parser.hh": "053cb110d22eedd8e8753272b6e3d60c4b744fcb75daa07297553ae715252659",
|
||||
"src/parser.yy": "74dc476e4c6e754baf2f072755daa95af41732d6ebf064846715cde27837a7db",
|
||||
"src/stdlib/ATOW.asm": "8ec527706b6aa01d07c15469242b2b5c57768ee16c24ef9ccffdc4c1f8b62264",
|
||||
"src/stdlib/DIV16.asm": "06869ee9d27433f24d6ee73482eb8e9560fbdcb597e6b1230dac303c00b52fc3",
|
||||
"src/stdlib/DIV16BY10.asm": "4ec3d877b4451c641d4823651711806b86aed2d0d645342b48105d1f9d19f73b",
|
||||
@@ -321,12 +325,12 @@
|
||||
"src/stdlib/bsearch.c": "8afedff3e7c06c5d3932d0191de6c3cb48e070822e60cf776e1ada71521968c4",
|
||||
"src/stdlib/checkGuardVar.asm": "43e7e1cd4a6f26363b3e1b81f6466bf1c7fa5278edf8f46a3a48f58401a3b11d",
|
||||
"src/stdlib/checkWhiteSpace.asm": "5a4a04f75cc31b639bafdb213d59cfb9d68497a919decdec31e212678af1ac00",
|
||||
"src/stdlib/checknull.asm": "06f5130cb3c107a029a4fa87fadc827dabd8676d53db84f6e13bbf0c59abf829",
|
||||
"src/stdlib/checkstack.asm": "d1a440ba580883b3b64e170f0971600a39c2de653f983feced70fb940dac862c",
|
||||
"src/stdlib/checknull.asm": "5f834c00342c01e2af3d4e35e98a74667edfb50e181bacf503b4b1e83b0bd053",
|
||||
"src/stdlib/checkstack.asm": "e60c36ccc405f36fd1b031fc3552d05c8c1a348346c40926d34365de0b3944d3",
|
||||
"src/stdlib/chrtomem.asm": "b94ed167fdb3ed77eb7f7e7e905cc2fbdb97e7cf9fe871e09b48ad40b5efd45d",
|
||||
"src/stdlib/cls.c": "a86899e4db482dcfe9871ab770e118b304672cf1526baba87cebbdfad858841d",
|
||||
"src/stdlib/cmoc-stdlib-private.h": "8fa9e3b68f60398f4ddfa509b2bbb6d633e0c5410f87bf4296269ff62856af9e",
|
||||
"src/stdlib/cmoc.h": "9348c594982ca192cf2e87e16051aecea409024f2a0c580963435e2657864731",
|
||||
"src/stdlib/cmoc.h": "047041e2562fd9dbe7c52739484fcd56b86a2123b72d8ab42c4fccd6e8f9efdb",
|
||||
"src/stdlib/cmp.c": "a0588911aa4784adec4bf571333495d2d3c59d980fe0aca112648a6525d87605",
|
||||
"src/stdlib/cmpDWordDWord.asm": "7f41046a93425b2d4a8430f518a0a81a318362a08f46b083237cce764a026196",
|
||||
"src/stdlib/cmpDWordSignedInt.asm": "0c1d507187fda55b4a1ab473100ca1a131388e5981f73a2e008cadd30468d527",
|
||||
@@ -379,7 +383,7 @@
|
||||
"src/stdlib/isdigit.c": "f7457bd32ab1b55e386db561e8f201d4dd8b99e5ebefc58b91d413ab00d60e53",
|
||||
"src/stdlib/isspace.c": "787fa9fe6df71945485777040b09751a7546041971886210fb3e586b3705ddbb",
|
||||
"src/stdlib/itoa10.c": "fcdcb24c9dde4210da7d43d355f61f8f779ae88942cbe331a372a10f577dbfc4",
|
||||
"src/stdlib/jumpTableSwitch.asm": "33ae5a108f9c2c7bc2859ffea143b8c521e38f5a870fcd6b28215112078cfdd5",
|
||||
"src/stdlib/jumpTableSwitch.asm": "d714c40386d36ce192c245cab0c0c0aefeb97da1848ae7f36eabce7f41a9c797",
|
||||
"src/stdlib/labs.asm": "713e32984a4ecffd6f570d21d08eb745a3cee42540724219d810c4861e7117c3",
|
||||
"src/stdlib/leftShiftDWord.asm": "9d7068846a5ebaceb8a2c64f0d35a8ef41b694d444cf3c6f1f96ddc84e757b42",
|
||||
"src/stdlib/leftShiftDWordAtXByB.asm": "61cbb270163400c51592ba97906d5b0962059c3e19b147e0f74079e4b626bb43",
|
||||
@@ -505,9 +509,9 @@
|
||||
"src/stdlib/ultoa16.c": "25f275f4a676a39672d0be5545af450a60680fb7018533477ca5e89ad503757b",
|
||||
"src/stdlib/unsignedDWordJumpTableSwitch.asm": "42bf32ea4bdb3d1b98920b0e78cae5ddc764e301ee143b0b5abc0e9dc41ae8a0",
|
||||
"src/stdlib/utoa10.c": "262432b7976ceb13c7f6d3274d16f51033f90c59f38487618ba2e0fd3935ed45",
|
||||
"src/stdlib/vectrex.h": "b4538cefe8ce0dc9864d1b10022da5c655a2a941f2be349878212bfbe8bd3a36",
|
||||
"src/stdlib/vectrex/bios.h": "bd71fd9460df3294bbc7c57dee3a2d1088ec036944f1852a7b6688328ec34ae2",
|
||||
"src/stdlib/vectrex/stdlib.h": "893e6bee338aa3892159cfcb9a93f2060fadc6569c29fb99db9153cb4f71d586",
|
||||
"src/stdlib/vectrex.h": "b4538cefe8ce0dc9864d1b10022da5c655a2a941f2be349878212bfbe8bd3a36",
|
||||
"src/stdlib/vectrex_bios.c": "069b1f3ecb6b828200df58dc88fc31420874582abebd1ea497f0aeac6ce39fab",
|
||||
"src/stdlib/vsprintf.asm": "cc540e538c1e4771b81074f1793d2524d457b6a2673260c7b7a1f44950130b99",
|
||||
"src/stdlib/waitkey.c": "3a0c073023943481aa0412cb540b35c90c7832337de6c37e2a1ad531f23a1915",
|
||||
@@ -515,11 +519,11 @@
|
||||
"src/stdlib/xorDWordDWord.asm": "cc75a3a7e6921d57013011aced81223343fbe3d9dfb9d5c7c7f197109059d705",
|
||||
"src/stdlib/xorDWordWord.asm": "27f1320cd355a6f6519891f8a922a70930ef488a2bb35557af45d97e6c672e17",
|
||||
"src/stdlib/zerodw.asm": "7358deb0cb57bf8435cd97ddbed6f565acc22c8eb5ca181d8accaf154f6d6c83",
|
||||
"src/test-bad-programs.pl": "1309f6898c7af2e88ae94cf1f32bcef746cc740eac1b5ae2104e0626bb17e2a8",
|
||||
"src/test-program-output.pl": "2ae67bc0aa596788493a255f658782a05e9b5c35e1599e1e4b3f10e2fe721ac1",
|
||||
"src/util.cpp": "8f4131c20149292557bb48771e372eab9e0af554754ce241dd258051d7822c47",
|
||||
"src/util.h": "32f26b837d6e0b945a9c4d9394d916d65e4602738c5c7f80957ceaf25ed37303",
|
||||
"src/writecocofile.cpp": "ed37db967cabf5156ae7a834953d5ea8a54c2ce621d6c64c88c3c6a8892c2828",
|
||||
"src/test-bad-programs.pl": "a27386019b76d9daaf8988e744561ac9835aba469b5c5c431ddcebc21f06a637",
|
||||
"src/test-program-output.pl": "2a60558a5f548af917a9ed65db60c10b96aa9c8f0d331dccb014f9a94e840c2b",
|
||||
"src/util.cpp": "29cf18733a615dc2223a12293f48e78c222225a4c88a562ae2dfe654053e75fd",
|
||||
"src/util.h": "009fbc0969de216550aa6b4f1b3a3851e88b4bdcc9b3dcde8cb02b59924477b8",
|
||||
"src/writecocofile.cpp": "3778004bd615974d0f9377e7edf89423de16b9f85e046a47290c01dd74826cd3",
|
||||
"ylwrap": "316885158cfd50c92f24f714e92886d63c2cea9d599202513684d8f63b5df4f2"
|
||||
},
|
||||
"vendoredFileSHA256": {
|
||||
@@ -530,7 +534,7 @@
|
||||
"INSTALL": "d00570f8f04c29f749fd9f9d4d06ec8eb483b810398a23fdb6e97d01836b4bff",
|
||||
"Makefile.am": "d87dfe47d348c13bd886c6cb46c3aa2fe04af54c89dc9f2d4c19c9f9dc41bf59",
|
||||
"Makefile.in": "e3ab02788208957fe8ba43af3fddcfdbac76055743a91031dae734a22c520ceb",
|
||||
"NEWS": "f5f39a978a3a5b2b3f684d259c74a3872f45b956db0b89ee0fefb2d84158cb2d",
|
||||
"NEWS": "e2c0a17a92705139576e350563ff28f3e29865ceaac9e826757257ddd0ffde89",
|
||||
"README": "5a038c75ed3193a6341484cbf0f2b07c617e44355be346f1313a49e3a2cc19ab",
|
||||
"THANKS": "18c0e061a0a0b9e800ed697a197409a452f1ce42402ebb920d476b122ae86a8a",
|
||||
"TODO": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
|
||||
@@ -538,13 +542,13 @@
|
||||
"autogen.sh": "a7c962a3ed2f2ca5de93ce942a575dfea3194891820605e1f09059d241f4ce7f",
|
||||
"bootstrap": "74124ac2520ff15ed57f7acb0e28dfb026690168f2c784f8de16e0db2ff3358c",
|
||||
"config.rpath": "6073b3c54341c8b324b43a79206ebbdfc659a78608cb2cb4b98efc22ca33d837",
|
||||
"configure": "fea862ae83ec3e8441048571e41055dd0bf561f5aa9bbf981806b4ab0ea854a5",
|
||||
"configure.ac": "628c8254a2ece83d2553fab84309dfa2212a5a32c6b94708346953f462623535",
|
||||
"configure": "ec4a44dd9d2d50b935bf8fdb6c78384ad4b1980968c134769f6b4a493902c52f",
|
||||
"configure.ac": "004d819ecde2ba35b780caac6ab2fa1f8b4d88f64f6abf22e702576a0b0e02db",
|
||||
"depcomp": "561b133cbb3d0806480302a72ef4fda57e3546107dec6bc570f01c8e52ded09f",
|
||||
"doc/Makefile.am": "521525c53fcb63ddcfb8066cd6eb905e26c1fd94e3a679dd70ce920e59411bc8",
|
||||
"doc/Makefile.in": "9c513cf59f3ee5826d8f9ee18cda69fbc285eac07a1e81235832142e4078f902",
|
||||
"doc/cmoc-implementation.markdown": "cebcf703753d2bd8e562fd9564f04c8d09bc777d4cfe8209ce971822b279308d",
|
||||
"doc/cmoc-manual.markdown": "08e9754b607ef920665ee80617cc6f9b1e3e55e5944ebe3675b32984802733f9",
|
||||
"doc/cmoc-manual.markdown": "f3ac30975c6b9693bff219242e64b5b0eb9ddcf0190643985df6a16295a62035",
|
||||
"doc/cmoc-vectrex.markdown": "087f274bc45d087118eb003b92137402b754328babdeb1137a57e24a776ca762",
|
||||
"doc/cmoc.1.in": "d6124313fb04ed8e589f71b8dd7f96a363aec807362b586958fe51075a7b43a6",
|
||||
"doc/toc.pl": "14ab2762631addd2aaac59e454b110898994b024a6e3149462e6ff92324f4866",
|
||||
@@ -559,18 +563,20 @@
|
||||
"macros/cxx_suggest_override.m4": "d9b69098e07901018f550781965af2237492712ef5cd77ebdaa453858237d903",
|
||||
"missing": "387d0e5e99a2574f38d58cedac996c3fc720b4a86a03eb87f36d7852b4e80204",
|
||||
"mkinstalldirs": "f2d71387784c4f9b1b1510013b3e1456feb6ee1a5655555147555f61cd244d69",
|
||||
"src/ASMText.cpp": "5ad65fb39eaf42f83ac30e117f5d993ee5ca759878d52b0a6a764ce7c7312bee",
|
||||
"src/ASMText.h": "907011174c7cc21439238053ce8a444563dbd56048db328bef46d871d2fd925a",
|
||||
"src/ASMText2.cpp": "a599c229c5b71e82bcb41ad44b648b7dd403274d538cd77ce0f897511160e620",
|
||||
"src/ASMText.cpp": "453e779c8d43857378134b821d6d9cccfb8e880cacf4601bdff7fec1ab2ffc27",
|
||||
"src/ASMText.h": "6683c8b46b141b5fda448ec4111ba31e689232482f1f16b790cc578a09e6377f",
|
||||
"src/ASMText2.cpp": "16acb980a2a9bf9566c32a7bbbc159a2548f267a31c26ef0f1dc2f861c4bf13a",
|
||||
"src/AncestorFunctor.cpp": "61e56354d6c1f5c357bff3c618a9b88945c6b11e3a7f547f14272b8b78f0f55a",
|
||||
"src/AncestorFunctor.h": "9a86120ef4e464d6fcfad5a0a9503ba537c902601431a23c9e31ace1eaca18f2",
|
||||
"src/AssemblerStmt.cpp": "ae9f99eb916d1d0302ce94c4cf11f896813c32361fc9a409a85dc584af3461b4",
|
||||
"src/AssemblerStmt.h": "117dfc1cf7188eea8adff45f287cdb72de97845758afd5d767a076da578f2bdc",
|
||||
"src/BinaryOpExpr.cpp": "0c33012a4aa24281fcc43cf311f4b0b4c229c49bd8f361deb3893d488e3b919e",
|
||||
"src/BinaryOpExpr.h": "5d5e028ce057ca54d95a8796d034ef5aedce12a88ff435b0ecde1b37c668d584",
|
||||
"src/CastExpr.cpp": "c6cece6965cb3e946b8dd64be52215def70c64aff342b780ed29545d59447fee",
|
||||
"src/CastExpr.h": "b69bc644b78113e156e043709f79e9b6c1f0dceb65c1ab38b0376ea864cde9aa",
|
||||
"src/ClassDef.cpp": "f3a4b9862895a0bc56347d7b39e422a9035ac5a9a66f28dc17808df11a104d5c",
|
||||
"src/AssemblerStmt.h": "9616971f7afcec1604dd726d6498102affb13bbaacbde25eeb35c1d6c8efb8bf",
|
||||
"src/BasicBlock.cpp": "f9a866469a82a815c28349f2d0416ed4377e74818718e5f9ae370170063dfc37",
|
||||
"src/BasicBlock.h": "ba171a47968df0e90091334c0e9bb1eca72ed4338d19c5bac221926e6eb3a2c0",
|
||||
"src/BinaryOpExpr.cpp": "01c1a6d1625aed6569035dd03743df152bef72cda0f762a810f8c275c6a90263",
|
||||
"src/BinaryOpExpr.h": "fca85eb93a7a2e84a8611e5d0578bf02af5617e64db33105b391314ba631784e",
|
||||
"src/CastExpr.cpp": "13fb12a13951828ee222079f9a6ed07b7e19d1f26271f60be1f5dc8ea752baac",
|
||||
"src/CastExpr.h": "37f88cba9b5fb6f73a30dc197036428818b68cdac1cd27515295f50d357fbce7",
|
||||
"src/ClassDef.cpp": "69c03896d1bafda5e1aa846f29643496e0642dc10dcf4fa1d496d640c12c8080",
|
||||
"src/ClassDef.h": "ac069435a400cc15eed7d7a60a450ac9419c2e5f9d60d9445c2f88208cda9e89",
|
||||
"src/CodeStatus.cpp": "cee44fe77152c367be788f6bd96748dedf8685dcc6fbed8784c8d5a7e9f51bc8",
|
||||
"src/CodeStatus.h": "01d18d576e80fd094e67098b65aa70dd340534c0370f9c184fdf2a6512be4a44",
|
||||
@@ -581,13 +587,13 @@
|
||||
"src/ConditionalExpr.h": "d06031d6de69cd9a3ebf2e0a4e0d519586f304a5a69090643ebe96990423f025",
|
||||
"src/DWordConstantExpr.cpp": "7ee0d8b30f57fa6afaf0a6a063699674f9ce119bd9b03086f1ac66998aed40c0",
|
||||
"src/DWordConstantExpr.h": "82343276c3cbdbf468a5d2d0d87708d577b73c95a82738e4672a6c8036dabee6",
|
||||
"src/Declaration.cpp": "16bbc85e56c3c707d4d47e5d6869ef7591adfd2c8600903db3ccc50f3fcb97ba",
|
||||
"src/Declaration.cpp": "11c4ddb6a20ed05d42979a7e33b38579a06257043ccd3a460d4b8ddab19e40b6",
|
||||
"src/Declaration.h": "40da4ffa508e1a22a3719b91a1b146bd2d2396fe0c28e8f8b510ea24c61738ee",
|
||||
"src/DeclarationSequence.cpp": "3fbaf62095525c1552f7150397f2490c7add91e7e0eb724c574a41d3b2f7eee5",
|
||||
"src/DeclarationSequence.h": "534f22feafaf444d2b22880a646bf985e32683de3197bca8c6463ba7e4e8aa71",
|
||||
"src/DeclarationSpecifierList.cpp": "d828443cf157ca92c871dc203628d15fd3ad39a88a9b36b8650530453e75f32a",
|
||||
"src/DeclarationSpecifierList.h": "1f4e82607cbe34205cde18d5dca281d4debf37bdfe057573c18203419b22858f",
|
||||
"src/Declarator.cpp": "4495effe55396851b96fe94122ce662e58dc7620d842758f113c2877c8e0385f",
|
||||
"src/DeclarationSpecifierList.cpp": "cdf3c7d9885714af20067c656087ac78b95908734b47a297bc00ed02e9281720",
|
||||
"src/DeclarationSpecifierList.h": "d8e378dda0dab874a84193902928d2976a52b36b9715ab9657a025bda0e63594",
|
||||
"src/Declarator.cpp": "623c3823a1a7f6e0086c57ed8e563d24a7424898d2eb72b6e945209c1842c50b",
|
||||
"src/Declarator.h": "5cc61da1850df9fe348e06494e03d42baa6a14a3d30fce2aa271b31d0f03fba1",
|
||||
"src/ExpressionTypeSetter.cpp": "98f74f479ba6a88249fa1a88a51b21205570a9526d45a40ab970b14dbf7104db",
|
||||
"src/ExpressionTypeSetter.h": "2c6cc5ebc5e995f4c013e06988863a148e0c98c03f718b3add21ca782807c4c2",
|
||||
@@ -597,7 +603,7 @@
|
||||
"src/FormalParamList.h": "4d680aa342ebad7657db78b243ccb7302fd6d1d34b4e4be650ad27f027c70d68",
|
||||
"src/FormalParameter.cpp": "96d4b674c4fd739371f89bfa7bdc0e09fa340e221e454aa15fee887ecb3db23e",
|
||||
"src/FormalParameter.h": "874975b55aeffb43dbbb33a33494ba74bfabc956e272f0ddfb64cb5c3387fadc",
|
||||
"src/FunctionCallExpr.cpp": "f8c1fbe521a3ba125fcd4f45536e516d912b63a437c0246e611504e3d7c9979e",
|
||||
"src/FunctionCallExpr.cpp": "b531e4fb6ba0fb1c3ecfd0bc92edc3eec2c7725df4285a5d6002a18099250bda",
|
||||
"src/FunctionCallExpr.h": "22b3c82919fd82aa33fc11ff4914a7d73a4db34ea309dbb44d018d14dfc24175",
|
||||
"src/FunctionDef.cpp": "fc375e27f02c4fc68696d79520e2c9be72374e06b5d7bba30c43a77c4ad082ec",
|
||||
"src/FunctionDef.h": "9c37d4769336d468ceae245013058b9475d5274b1da95e674b606ea767bdbc7f",
|
||||
@@ -608,16 +614,18 @@
|
||||
"src/IfStmt.h": "7751af66a7fafb1d954d8463f450cc9c0e6f53db3c49f5ec0ba0170d8272bfc4",
|
||||
"src/InitializerCodeEmitter.cpp": "02b0a11d3d42f5910601a7b141311963c3622a0841777fd027dd0caee533fbec",
|
||||
"src/InitializerCodeEmitter.h": "195532345c0a7f9062fd84fc785674b165dcefef9f0e7c1bcce666f2f770a8f4",
|
||||
"src/InsEffects.cpp": "def0d7d4bcaff50cee73422618194635d0bc11fba060493c7f518120cb6bcb4c",
|
||||
"src/InsEffects.h": "c4f3202e0f835135cefd1cd0e20bd63cdba885f93caaaac637d3b7f9dd7ff78d",
|
||||
"src/JumpStmt.cpp": "7169b7cf56fae45a6ee713b868d785c66431140ec43b418b19ffb1fa971a58f5",
|
||||
"src/JumpStmt.h": "cf5554a8428a1c65ed60671921b698cef58f42d7e9e83886d5e521b1be0992c5",
|
||||
"src/LabeledStmt.cpp": "c7cfa3b9a09d808aca4e4b1b092c2aa8ba77a3b611a157ef9126c2c4eae79d16",
|
||||
"src/LabeledStmt.h": "ff92198a15b35eb55fbef1b2d2d266588d695a42ba60245f015f19bc5ecba8ba",
|
||||
"src/Makefile.am": "3e15be2d305e07afd87abb900fce2daf43d3ab40aa4497fab24563a57bca41d4",
|
||||
"src/Makefile.in": "bde238a1dd84f25a893af497d08417f87c05c12159b4d746612e39d2b615a6e2",
|
||||
"src/Makefile.am": "149a8ffd71b82713e4d399fc59eb03cda030f059715e2b06b479c5a481b24f23",
|
||||
"src/Makefile.in": "75c12bbe2639fe7a799502316bd334ab5b9d9bf550110d716721838edb24a88c",
|
||||
"src/ObjectMemberExpr.cpp": "94b3f89c00e15e889bded2dafea64a0f2c4f9d1f511c1e8be4458c1089eaf462",
|
||||
"src/ObjectMemberExpr.h": "5e0fa62b4dcdf2e02838310ae83aed140de0a05057e64bd9ba1caae25098cb1b",
|
||||
"src/Parameters.cpp": "68573f2ac98dabc5b954e49c6d4220b58155de8ba88efa94c3a9f2009561d86f",
|
||||
"src/Parameters.h": "147ab08f3d9789637fc54fff731578f588e7e77ee2764fe8029b88d6252c2842",
|
||||
"src/Parameters.cpp": "83237f188a9feeb9a2e804a08b41ab214bd469d0f7a7b3731cf51115831bceb5",
|
||||
"src/Parameters.h": "27295fb8afc47442575dff2327c409486522270881da2e595153ff6f7dce40d0",
|
||||
"src/Pragma.cpp": "63455908c88837ed177b890d96fe37b30438fbff179acc1e7d0088a603bc25cb",
|
||||
"src/Pragma.h": "794c820921e73247ad1feba6bf785cb63547be3f2a80b1d37c7a263badc74a9b",
|
||||
"src/Pseudo6809.cpp": "b56a5079ecfd8f1fc5f8463836a7925e3dc2ccf3359dc5a930c4ba7c8a3f9f12",
|
||||
@@ -630,22 +638,22 @@
|
||||
"src/ScopeCreator.h": "73d3c876fa55da74d30b8a0101f62af6b16d52ef14b1535d134da1f1b0b36bad",
|
||||
"src/SemanticsChecker.cpp": "b1c86ddfc4fd52c97950457145f227da854825e28b3a3c647949f4e237532985",
|
||||
"src/SemanticsChecker.h": "f5f574e2f7befde0e603e2b73f572dabe79e7af3979c541714670c009e7fc685",
|
||||
"src/StringLiteralExpr.cpp": "c49c8145127fb6082aec603cc44f33eec3a6840cd31c5172d1fd2aaf8cf5d400",
|
||||
"src/StringLiteralExpr.h": "a73075b86e7e7c8c25295341f09514b9ab90f4d26322a3aa96d48c94593bd0c3",
|
||||
"src/SwitchStmt.cpp": "c6b6027c2136749ee440bf927e8fccdda27475f1e369b44a5dfbeadc30566bf7",
|
||||
"src/SwitchStmt.h": "2f0ecb974b3cf9f5884eb82374fdfd22a0eda2058bea349a2a265772ad762dcf",
|
||||
"src/StringLiteralExpr.cpp": "d9ac4440a8093cb6ea48a6ffcc390ad416291ba28ae41f1170795a772021b5cb",
|
||||
"src/StringLiteralExpr.h": "9ae1f28a48b860c593d16b427dfea7cbb8dc58f8a27e698b4f9607cd510a90ec",
|
||||
"src/SwitchStmt.cpp": "b62adfa91f99d2c9e93ac0a61fbd1ff69eaf0bbad96fcd054d7350a1a71c5139",
|
||||
"src/SwitchStmt.h": "94ac91a49186f5ea319e033184d9105f4365b13998e3c706c50f9e8b277f4911",
|
||||
"src/TODO": "af3cbd1285d2d08ab3b058f643f7993110c2c92772912a46e630d37339b718e8",
|
||||
"src/TranslationUnit.cpp": "df1845ad904eabd0db8da93a75024bd105c39fcbd8f624534ae9d950654b4909",
|
||||
"src/TranslationUnit.h": "10376120afd2ca0657a75f905a92e7d1d0bfc7be061e3e53e6e6c44d34162906",
|
||||
"src/TranslationUnit.cpp": "e80e37d361dbafa263a417ee9122fe85aa06ddd6c83e4944d3e03cdd008dca9d",
|
||||
"src/TranslationUnit.h": "916309b437774eaf36d7f17f8595f7294d0d66e7d636d2332a32215d83c6612b",
|
||||
"src/Tree.cpp": "33a3df544c808a4672350741a27a8684957b97a05ed2a1bd802132fa3524a18d",
|
||||
"src/Tree.h": "cc0017a6bcbe946e9ccc236923ca55ff3969271199dcc4b7d2fcb2cecb27e0d8",
|
||||
"src/TreeSequence.cpp": "fff438b023d1e90d168a79260c2177e3b9868e76fb12bfb8eeeeced59b5ad2be",
|
||||
"src/TreeSequence.h": "04052bc52b87c7f19fccb698a723593e73909f996d9e83e50df085af81636864",
|
||||
"src/TypeDesc.cpp": "09361b1095c5cbab3aa9f7f05f4e38f062c775b8e536f07927fd86de4b96384f",
|
||||
"src/TypeDesc.h": "1f83725a58efaa1bae1006582a6289fab10cc4055e243b3d270b5c3edabd3062",
|
||||
"src/TypeManager.cpp": "8717ca925f84acf131ae1f27efff672d079126b2712e29d08a74cf596aea1f66",
|
||||
"src/TypeManager.h": "15b73233fa540a122e0cf56a9068739c23ac15169905366fcf1e3601c6b4bdc3",
|
||||
"src/UnaryOpExpr.cpp": "59ffa9526b178cbe9fb56716ceef4598c74fe840cc90e9393d0d77aa352b82da",
|
||||
"src/TypeDesc.cpp": "4de82b020f8ae8b82ee7e3b3c3351b289bc107a0a03c25fd3e7f737f33b61471",
|
||||
"src/TypeDesc.h": "ca07c9613d18e34938945b10339a03509662e79675988d644bc627c211a9e065",
|
||||
"src/TypeManager.cpp": "81cffad50341210dfbbae32b30fc18eb51799393edc7fa19a21bae570b17e4a4",
|
||||
"src/TypeManager.h": "8ff9ff773dc7c76d667378198a20733a6e09aa0a07feb32c3705d1943c38d998",
|
||||
"src/UnaryOpExpr.cpp": "775129fdbfd6cd0ddb8396f26e9e117c43064ea4ae910311334d5431f2deae19",
|
||||
"src/UnaryOpExpr.h": "2f1f1d638e403596de4d0df4a946d8af2480799b7756f69153195e59e0c78c9f",
|
||||
"src/VariableExpr.cpp": "c5e38e2d7aad34dc17caad5c6073d0b59713d3b731327789ffa584ff46983c15",
|
||||
"src/VariableExpr.h": "4dc6c63cee4cad00552062c7d8f91a386da297111be27b8614f715b75c3884ba",
|
||||
@@ -769,12 +777,12 @@
|
||||
"src/float/unpackXToFPA1AndMul.asm": "ea13155e3c6a85e0f80fa74c085ea178712410863921d0637c06646e7a0ba7a3",
|
||||
"src/float/unpackXtoFPA0AndPrep.asm": "ece3e3b55a7cf9338ef71e5ca58bd03943736060c284c87ef0ac840b30a9acd7",
|
||||
"src/install-coco-boot-loader": "a74b495e4c91a96e0f77f4acd59e12eb051253da1bb22fd567d384dadc2f2d60",
|
||||
"src/lexer.cc": "f7f31e38c62340ad84b138d3a0a7059bd8ba9308ecd1159ed45a5236f45131df",
|
||||
"src/lexer.ll": "bd5ea9b0769de0483145ec0d482f91dd139759a08b9910a0124544da8778f45d",
|
||||
"src/main.cpp": "4690fce889947aa55a59a962795438152de3c71ba5f3917e23278103abeb4551",
|
||||
"src/parser.cc": "2a25acc6d7ab7ade56533439ab6ddbe3a73ad7e1ce70771c0674dd6ed082d0cc",
|
||||
"src/parser.hh": "64a5f591752962768cf1b37cd814416625fb94bdc827c5bb50ed0d4ab5d758ff",
|
||||
"src/parser.yy": "7dfc80b1d3ba764ff4ecb6957fb3f2df4facf893ed5f5bd8d0b29b35193249ef",
|
||||
"src/lexer.cc": "62be4fef1e476a4367ed3e2431fce3ec645d9b43c0543bfbc0f8258bed590b86",
|
||||
"src/lexer.ll": "64a7a195a4566687cb4fd5b61818f179efed0d397dee65dae47e82eeff741fc8",
|
||||
"src/main.cpp": "be29eaa98f4b0343db13092166bbc71c64bb1d1dd349814574c66cf18388587a",
|
||||
"src/parser.cc": "f7934eca44a042d62f167cbf43020cd5a0966d8ff5d7f9b6c15776a37cc955fe",
|
||||
"src/parser.hh": "053cb110d22eedd8e8753272b6e3d60c4b744fcb75daa07297553ae715252659",
|
||||
"src/parser.yy": "74dc476e4c6e754baf2f072755daa95af41732d6ebf064846715cde27837a7db",
|
||||
"src/stdlib/ATOW.asm": "8ec527706b6aa01d07c15469242b2b5c57768ee16c24ef9ccffdc4c1f8b62264",
|
||||
"src/stdlib/DIV16.asm": "06869ee9d27433f24d6ee73482eb8e9560fbdcb597e6b1230dac303c00b52fc3",
|
||||
"src/stdlib/DIV16BY10.asm": "4ec3d877b4451c641d4823651711806b86aed2d0d645342b48105d1f9d19f73b",
|
||||
@@ -816,12 +824,12 @@
|
||||
"src/stdlib/bsearch.c": "8afedff3e7c06c5d3932d0191de6c3cb48e070822e60cf776e1ada71521968c4",
|
||||
"src/stdlib/checkGuardVar.asm": "43e7e1cd4a6f26363b3e1b81f6466bf1c7fa5278edf8f46a3a48f58401a3b11d",
|
||||
"src/stdlib/checkWhiteSpace.asm": "5a4a04f75cc31b639bafdb213d59cfb9d68497a919decdec31e212678af1ac00",
|
||||
"src/stdlib/checknull.asm": "06f5130cb3c107a029a4fa87fadc827dabd8676d53db84f6e13bbf0c59abf829",
|
||||
"src/stdlib/checkstack.asm": "d1a440ba580883b3b64e170f0971600a39c2de653f983feced70fb940dac862c",
|
||||
"src/stdlib/checknull.asm": "5f834c00342c01e2af3d4e35e98a74667edfb50e181bacf503b4b1e83b0bd053",
|
||||
"src/stdlib/checkstack.asm": "e60c36ccc405f36fd1b031fc3552d05c8c1a348346c40926d34365de0b3944d3",
|
||||
"src/stdlib/chrtomem.asm": "b94ed167fdb3ed77eb7f7e7e905cc2fbdb97e7cf9fe871e09b48ad40b5efd45d",
|
||||
"src/stdlib/cls.c": "a86899e4db482dcfe9871ab770e118b304672cf1526baba87cebbdfad858841d",
|
||||
"src/stdlib/cmoc-stdlib-private.h": "8fa9e3b68f60398f4ddfa509b2bbb6d633e0c5410f87bf4296269ff62856af9e",
|
||||
"src/stdlib/cmoc.h": "9348c594982ca192cf2e87e16051aecea409024f2a0c580963435e2657864731",
|
||||
"src/stdlib/cmoc.h": "047041e2562fd9dbe7c52739484fcd56b86a2123b72d8ab42c4fccd6e8f9efdb",
|
||||
"src/stdlib/cmp.c": "a0588911aa4784adec4bf571333495d2d3c59d980fe0aca112648a6525d87605",
|
||||
"src/stdlib/cmpDWordDWord.asm": "7f41046a93425b2d4a8430f518a0a81a318362a08f46b083237cce764a026196",
|
||||
"src/stdlib/cmpDWordSignedInt.asm": "0c1d507187fda55b4a1ab473100ca1a131388e5981f73a2e008cadd30468d527",
|
||||
@@ -874,7 +882,7 @@
|
||||
"src/stdlib/isdigit.c": "f7457bd32ab1b55e386db561e8f201d4dd8b99e5ebefc58b91d413ab00d60e53",
|
||||
"src/stdlib/isspace.c": "787fa9fe6df71945485777040b09751a7546041971886210fb3e586b3705ddbb",
|
||||
"src/stdlib/itoa10.c": "fcdcb24c9dde4210da7d43d355f61f8f779ae88942cbe331a372a10f577dbfc4",
|
||||
"src/stdlib/jumpTableSwitch.asm": "33ae5a108f9c2c7bc2859ffea143b8c521e38f5a870fcd6b28215112078cfdd5",
|
||||
"src/stdlib/jumpTableSwitch.asm": "d714c40386d36ce192c245cab0c0c0aefeb97da1848ae7f36eabce7f41a9c797",
|
||||
"src/stdlib/labs.asm": "713e32984a4ecffd6f570d21d08eb745a3cee42540724219d810c4861e7117c3",
|
||||
"src/stdlib/leftShiftDWord.asm": "9d7068846a5ebaceb8a2c64f0d35a8ef41b694d444cf3c6f1f96ddc84e757b42",
|
||||
"src/stdlib/leftShiftDWordAtXByB.asm": "61cbb270163400c51592ba97906d5b0962059c3e19b147e0f74079e4b626bb43",
|
||||
@@ -1000,9 +1008,9 @@
|
||||
"src/stdlib/ultoa16.c": "25f275f4a676a39672d0be5545af450a60680fb7018533477ca5e89ad503757b",
|
||||
"src/stdlib/unsignedDWordJumpTableSwitch.asm": "42bf32ea4bdb3d1b98920b0e78cae5ddc764e301ee143b0b5abc0e9dc41ae8a0",
|
||||
"src/stdlib/utoa10.c": "262432b7976ceb13c7f6d3274d16f51033f90c59f38487618ba2e0fd3935ed45",
|
||||
"src/stdlib/vectrex.h": "b4538cefe8ce0dc9864d1b10022da5c655a2a941f2be349878212bfbe8bd3a36",
|
||||
"src/stdlib/vectrex/bios.h": "bd71fd9460df3294bbc7c57dee3a2d1088ec036944f1852a7b6688328ec34ae2",
|
||||
"src/stdlib/vectrex/stdlib.h": "893e6bee338aa3892159cfcb9a93f2060fadc6569c29fb99db9153cb4f71d586",
|
||||
"src/stdlib/vectrex.h": "b4538cefe8ce0dc9864d1b10022da5c655a2a941f2be349878212bfbe8bd3a36",
|
||||
"src/stdlib/vectrex_bios.c": "069b1f3ecb6b828200df58dc88fc31420874582abebd1ea497f0aeac6ce39fab",
|
||||
"src/stdlib/vsprintf.asm": "cc540e538c1e4771b81074f1793d2524d457b6a2673260c7b7a1f44950130b99",
|
||||
"src/stdlib/waitkey.c": "3a0c073023943481aa0412cb540b35c90c7832337de6c37e2a1ad531f23a1915",
|
||||
@@ -1010,11 +1018,11 @@
|
||||
"src/stdlib/xorDWordDWord.asm": "cc75a3a7e6921d57013011aced81223343fbe3d9dfb9d5c7c7f197109059d705",
|
||||
"src/stdlib/xorDWordWord.asm": "27f1320cd355a6f6519891f8a922a70930ef488a2bb35557af45d97e6c672e17",
|
||||
"src/stdlib/zerodw.asm": "7358deb0cb57bf8435cd97ddbed6f565acc22c8eb5ca181d8accaf154f6d6c83",
|
||||
"src/test-bad-programs.pl": "1309f6898c7af2e88ae94cf1f32bcef746cc740eac1b5ae2104e0626bb17e2a8",
|
||||
"src/test-program-output.pl": "2ae67bc0aa596788493a255f658782a05e9b5c35e1599e1e4b3f10e2fe721ac1",
|
||||
"src/util.cpp": "8f4131c20149292557bb48771e372eab9e0af554754ce241dd258051d7822c47",
|
||||
"src/util.h": "32f26b837d6e0b945a9c4d9394d916d65e4602738c5c7f80957ceaf25ed37303",
|
||||
"src/writecocofile.cpp": "ed37db967cabf5156ae7a834953d5ea8a54c2ce621d6c64c88c3c6a8892c2828",
|
||||
"src/test-bad-programs.pl": "a27386019b76d9daaf8988e744561ac9835aba469b5c5c431ddcebc21f06a637",
|
||||
"src/test-program-output.pl": "2a60558a5f548af917a9ed65db60c10b96aa9c8f0d331dccb014f9a94e840c2b",
|
||||
"src/util.cpp": "29cf18733a615dc2223a12293f48e78c222225a4c88a562ae2dfe654053e75fd",
|
||||
"src/util.h": "009fbc0969de216550aa6b4f1b3a3851e88b4bdcc9b3dcde8cb02b59924477b8",
|
||||
"src/writecocofile.cpp": "3778004bd615974d0f9377e7edf89423de16b9f85e046a47290c01dd74826cd3",
|
||||
"ylwrap": "316885158cfd50c92f24f714e92886d63c2cea9d599202513684d8f63b5df4f2"
|
||||
},
|
||||
"excludedFileSHA256": {
|
||||
|
||||
@@ -26,6 +26,9 @@ def main():
|
||||
shutil.copytree(ROOT/'third_party/cmoc-libraries'/name,out/name)
|
||||
subprocess.run(['make','-j4',f'lib{name}.a'],cwd=out/name,env=env,check=True)
|
||||
game=out/'game';shutil.copytree(ROOT/'third_party/examples/coco-letters',game)
|
||||
# Preserve the old ascending layout, using the new explicit spelling.
|
||||
recipe=game/'Makefile'
|
||||
recipe.write_text(recipe.read_text().replace('--allocate-before-dir','--allocate-forward'))
|
||||
# Upstream generates two outputs in one rule; serial make avoids duplicate writes.
|
||||
subprocess.run(['make','DECBFILE_LIB_DIR=../decbfile','BCONTROL_LIB_DIR=../bcontrol','BSOUND_LIB_DIR=../bsound'],cwd=game,env=env,check=True)
|
||||
disk=game/'coco-letters-0.1.0.dsk'
|
||||
|
||||
@@ -66,8 +66,8 @@ def main():
|
||||
'MCPP-LICENSE.txt': 'mcpp/LICENSE', 'MAKE-COPYING.txt': 'make/COPYING'}
|
||||
for target, source in notices.items(): shutil.copyfile(ROOT / 'third_party' / source, bundle / 'LICENSES' / target)
|
||||
shutil.copyfile(ROOT / 'tools/toolchain/patches/README.md', bundle / 'LICENSES/CMOC-VCC-EXTENSIONS.txt')
|
||||
record = {'schemaVersion': 1, 'cmoc': '0.1.100', 'lwtools': '4.25', 'mcpp': '2.7.2',
|
||||
'make': '4.4.1', 'vccDebugMetadata': 1, 'vccAddZeroFlagsFix': 1, 'vccIndexedByteSubtractionFix': 1, 'vccIndexedArgumentLoadFix': 1, 'vccWriteCoCoFileBeforeDir': 1, 'vccLWASMProjectInputs': 1, 'architectures': architectures, 'privateRuntimeInputs': False,
|
||||
record = {'schemaVersion': 1, 'cmoc': json.loads((ROOT / 'third_party/manifests/cmoc.json').read_text())['version'], 'lwtools': '4.25', 'mcpp': '2.7.2',
|
||||
'make': '4.4.1', 'vccDebugMetadata': 1, 'vccAddZeroFlagsFix': 1, 'vccIndexedByteSubtractionFix': 1, 'vccIndexedArgumentLoadFix': 1, 'vccWriteCoCoFileForward': 1, 'writeCoCoFileAllocation': 'upstream', 'vccLWASMProjectInputs': 1, 'architectures': architectures, 'privateRuntimeInputs': False,
|
||||
'minimumMacOS': '14.0', 'appleDeveloperToolsRequiredAtRuntime': False}
|
||||
(bundle / 'manifest.json').write_text(json.dumps(record, indent=2) + '\n')
|
||||
perl_output = output / 'perl'
|
||||
|
||||
@@ -61,6 +61,8 @@ def main():
|
||||
build/'Build/Products/Release/libVCCCore.a', args.rom.resolve())
|
||||
run('python3', ROOT/'tests/toolchain/indexed-arguments/check.py', prefix,
|
||||
build/'Build/Products/Release/libVCCCore.a', args.rom.resolve())
|
||||
run('python3', ROOT/'tests/toolchain/cmoc-0.1.101/check.py', prefix,
|
||||
build/'Build/Products/Release/libVCCCore.a', args.rom.resolve())
|
||||
if features['mc6839']:
|
||||
run(out/'run-compiled',args.rom.resolve(),out/'FLOAT.BIN','MC6839 MATH OK')
|
||||
if args.game_disk:
|
||||
|
||||
@@ -1,5 +1,10 @@
|
||||
# Local CMOC compiler patches
|
||||
|
||||
The descriptions below retain each patch's original 0.1.100 history. On November
|
||||
16, 2026, the four compiler patches were reapplied and qualified against CMOC
|
||||
0.1.101, including its refactored instruction-effects analysis. The allocator
|
||||
patch was replaced as documented below.
|
||||
|
||||
`cmoc-debug-metadata.patch` is an original VCC Plus extension to CMOC 0.1.100,
|
||||
modified November 3, 2026 and licensed GPL-3.0-or-later. It is applied to the ignored build copy by
|
||||
`tools/toolchain/build.py`; the pinned upstream snapshot and its checksums stay
|
||||
@@ -69,19 +74,13 @@ Packaged runtimes identify the change with `vccIndexedArgumentLoadFix: 1`.
|
||||
|
||||
The [guest regression](../../../tests/toolchain/logical-negation.c) prints actual results for zero, widened unsigned bytes and 16-bit values. Run `tools/toolchain/check.py --rom` with a local CoCo 3 ROM to check those results at `-O0` and `-O2` on MC6809 and HD6309. Rebuilt app toolchains record `vccAddZeroFlagsFix: 1` in the manifest.
|
||||
|
||||
## Explicit before-directory disk allocation
|
||||
## Explicit allocation
|
||||
|
||||
`writecocofile-before-dir.patch` (November 4, 2026, GPL-3.0-or-later) adds
|
||||
`--allocate-before-dir` as an explicit choice of the existing forward allocator.
|
||||
It starts at granule zero, skips occupied granules, and continues above the
|
||||
directory track if necessary. It does not imply a strict below-directory limit.
|
||||
The last allocation option wins, as with the existing choices.
|
||||
`writecocofile-before-dir.patch` now adds `--allocate-forward`, preserving the
|
||||
old ascending layout. The original option now follows upstream.
|
||||
|
||||
`build.py` applies it only to the build copy. `build-runtime.py` records
|
||||
`vccWriteCoCoFileBeforeDir: 1`. The original CoCo Letters Makefile uses this option;
|
||||
its former recipe-removal patch is retired and the vendored game matches upstream.
|
||||
Runtime verification checks allocation order, byte-identical default behavior,
|
||||
file readback, and spillover beyond the lower half of the disk.
|
||||
The `--allocate-before-dir` meaning changed: it now starts at 33 and descends,
|
||||
then wraps. Callers needing the old layout must migrate.
|
||||
|
||||
## LWASM project input boundary
|
||||
|
||||
|
||||
@@ -1,28 +1,26 @@
|
||||
--- a/src/writecocofile.cpp
|
||||
+++ b/src/writecocofile.cpp
|
||||
@@ -1,3 +1,8 @@
|
||||
+/* VCC Plus modification, November 4, 2026: support an explicit
|
||||
+ --allocate-before-dir option using the existing forward allocator.
|
||||
+ This modification is licensed GPL-3.0-or-later.
|
||||
@@ -1,3 +1,7 @@
|
||||
+/* VCC Plus: explicit forward allocation, November 16, 2026.
|
||||
+ GPL-3.0-or-later.
|
||||
+*/
|
||||
+
|
||||
/* writecocofile.cpp - A tool to write native files to a CoCo DECB disk image.
|
||||
Copyright (C) 2003-2026 Pierre Sarrazin <http://sarrazip.com/>
|
||||
|
||||
@@ -874,6 +879,8 @@
|
||||
@@ -897,6 +901,7 @@
|
||||
"--kill|-k Kill the designated file.\n"
|
||||
"--read|-r Read instead of writing. Refuses to overwrite existing native file.\n"
|
||||
"--stdout|-s Like --read, but print file contents on standard out.\n"
|
||||
+ "--allocate-before-dir Allocate from granule zero (the default), preferring space\n"
|
||||
+ " before the directory, then continuing above it if needed.\n"
|
||||
+ "--allocate-forward Allocate from granule zero (the default).\n"
|
||||
"--allocate-after-dir When adding a file, allocate granules after the directory track,\n"
|
||||
" then continue allocating below that track if needed.\n"
|
||||
"--allocate-from-end When adding a file, allocate granules from the end.\n"
|
||||
@@ -1376,6 +1383,11 @@
|
||||
"--allocate-before-dir When adding a file, allocate granules before the directory track,\n"
|
||||
@@ -1401,6 +1406,11 @@
|
||||
granuleAllocator.reset(new BackwardGranuleAllocator());
|
||||
continue;
|
||||
}
|
||||
+ if (curopt == "--allocate-before-dir")
|
||||
+ if (curopt == "--allocate-forward")
|
||||
+ {
|
||||
+ granuleAllocator.reset(new ForwardGranuleAllocator());
|
||||
+ continue;
|
||||
|
||||
@@ -37,6 +37,7 @@ def main():
|
||||
upstream = (output / 'Makefile').read_text()
|
||||
original = '$(DATA_FILENAME) $(WORD_LENGTH_FILENAME): $(BUILD_DATA)'
|
||||
if upstream.count(original) != 1: raise SystemExit('Review updated dictionary generation rule')
|
||||
upstream = upstream.replace('--allocate-before-dir','--allocate-forward')
|
||||
upstream = upstream.replace(original, '$(DATA_FILENAME) $(WORD_LENGTH_FILENAME) &: $(BUILD_DATA)')
|
||||
(output / 'Game.mk').write_text(upstream)
|
||||
for name in ('decbfile', 'bcontrol', 'bsound'):
|
||||
|
||||
@@ -36,29 +36,50 @@ def check_assembly(runtime, folder):
|
||||
raise SystemExit('Unexpected LWASM result for escaping ' + directive + ': ' + failure.stderr)
|
||||
|
||||
def check_disk_allocation(runtime, folder):
|
||||
"""The explicit before-dir option must match the existing forward allocator."""
|
||||
"""Check complete FAT order, including spillover and option precedence."""
|
||||
folder.mkdir()
|
||||
tool = str(runtime / 'bin/writecocofile')
|
||||
payload = folder / 'DATA.DAT'
|
||||
payload.write_bytes(bytes(range(256)) * (35 * 9)) # 35 granules: spills above track 17.
|
||||
images = []
|
||||
for name, options, first in [('default', [], 0), ('before', ['--allocate-before-dir'], 0),
|
||||
('after', ['--allocate-after-dir'], 34),
|
||||
('last-option', ['--allocate-after-dir', '--allocate-before-dir'], 0)]:
|
||||
image = folder / (name + '.dsk')
|
||||
image.write_bytes(b'\xff' * (35 * 18 * 256))
|
||||
subprocess.run([tool, *options, str(image), str(payload)], check=True, stdout=subprocess.DEVNULL)
|
||||
content = image.read_bytes()
|
||||
entry = 17 * 18 * 256 + 2 * 256
|
||||
if content[entry + 13] != first:
|
||||
raise SystemExit('Incorrect disk allocation start: ' + name)
|
||||
restored = subprocess.check_output([tool, '--stdout', str(image), 'DATA.DAT'])
|
||||
if restored != payload.read_bytes():
|
||||
raise SystemExit('Disk allocation readback mismatch: ' + name)
|
||||
images.append(content)
|
||||
if images[0] != images[1] or images[0] != images[3]:
|
||||
raise SystemExit('Before-directory option changed default allocation semantics')
|
||||
|
||||
forward = list(range(68))
|
||||
before = list(range(33,-1,-1)) + list(range(34,68))
|
||||
after = list(range(34,68)) + list(range(33,-1,-1))
|
||||
end = list(range(67,-1,-1))
|
||||
def chain(content, entry=0):
|
||||
fat = content[17*18*256+256:17*18*256+256+68]
|
||||
current = content[17*18*256+2*256+13+32*entry]
|
||||
result = []
|
||||
while current < 68:
|
||||
if current in result: raise SystemExit('Allocation cycle')
|
||||
result.append(current)
|
||||
current = fat[current]
|
||||
if not 0xc0 <= current <= 0xc9: raise SystemExit('Invalid allocation end')
|
||||
return result
|
||||
def image(name, options, size):
|
||||
payload.write_bytes(bytes(range(256)) * (size*9))
|
||||
path = folder/(name+'.dsk')
|
||||
path.write_bytes(b'\xff'*(35*18*256))
|
||||
subprocess.run([tool,*options,str(path),str(payload)],check=True,stdout=subprocess.DEVNULL)
|
||||
if subprocess.check_output([tool,'--stdout',str(path),'DATA.DAT']) != payload.read_bytes():
|
||||
raise SystemExit('Readback mismatch')
|
||||
return path
|
||||
for name, options, order in [('default',[],forward),('forward',['--allocate-forward'],forward),
|
||||
('before',['--allocate-before-dir'],before),('after',['--allocate-after-dir'],after),
|
||||
('end',['--allocate-from-end'],end),('last',['--allocate-after-dir','--allocate-before-dir'],before),
|
||||
('last-forward',['--allocate-before-dir','--allocate-forward'],forward)]:
|
||||
for size in [1,35,68]:
|
||||
path=image(name,options,size)
|
||||
if chain(path.read_bytes()) != order[:size]: raise SystemExit('Order mismatch')
|
||||
full=image('full',[],68)
|
||||
extra=folder/'EXTRA.DAT'
|
||||
extra.write_bytes(b'x')
|
||||
original=full.read_bytes()
|
||||
fail=subprocess.run([tool,str(full),str(extra)],capture_output=True)
|
||||
if fail.returncode==0 or full.read_bytes()!=original: raise SystemExit('Full disk changed')
|
||||
for name,options,order in [('forward',['--allocate-forward'],forward),('before',['--allocate-before-dir'],before)]:
|
||||
path=image('occupied',options,1)
|
||||
subprocess.run([tool,*options,str(path),str(extra)],check=True,stdout=subprocess.DEVNULL)
|
||||
if chain(path.read_bytes())!=order[:1] or chain(path.read_bytes(),1)!=order[1:2]:
|
||||
raise SystemExit('Occupied granule changed')
|
||||
def check_guest_example(runtime, env, folder, project_name, payloads):
|
||||
"""Build an editable example and compare its guest disk files with the build outputs."""
|
||||
source = Path(__file__).resolve().parents[2] / "examples/cmoc" / project_name
|
||||
|
||||
Reference in new issue
Block a user