team-ljyzipelo

공개

메모리 UI 경합 회귀 소스를 추가함

작성자
호시노 히나타
작성 시각
커밋
cd0a9070332947db043dca65f3d698be354ead0b
부모
f6aa387
이 시점의 파일 보기

변경된 파일 10개

+1,706-0
추가tests/rust-ui-memory-races/Cargo.lock+406-0
@@ -0,0 +1,406 @@
1추가: # This file is automatically @generated by Cargo.
2추가: # It is not intended for manual editing.
3추가: version = 4
4추가:
5추가: [[package]]
6추가: name = "bitflags"
7추가: version = "2.13.2"
8추가: source = "registry+https://github.com/rust-lang/crates.io-index"
9추가: checksum = "3ded4057c258ba199e2d26386d3af3780957ecaee6c4ef4041c6b4b8b97c0b06"
10추가:
11추가: [[package]]
12추가: name = "block-buffer"
13추가: version = "0.10.4"
14추가: source = "registry+https://github.com/rust-lang/crates.io-index"
15추가: checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71"
16추가: dependencies = [
17추가: "generic-array",
18추가: ]
19추가:
20추가: [[package]]
21추가: name = "bumpalo"
22추가: version = "3.20.3"
23추가: source = "registry+https://github.com/rust-lang/crates.io-index"
24추가: checksum = "72f5acc6cb2ba439de613abc23857ec3d78374d8ed5ac84e9d11336e87da8649"
25추가:
26추가: [[package]]
27추가: name = "cfg-if"
28추가: version = "1.0.5"
29추가: source = "registry+https://github.com/rust-lang/crates.io-index"
30추가: checksum = "4e7648175b45a9a48536d676f68d918270699102aa8dab5496df06904c914600"
31추가:
32추가: [[package]]
33추가: name = "cfg_aliases"
34추가: version = "0.2.2"
35추가: source = "registry+https://github.com/rust-lang/crates.io-index"
36추가: checksum = "f079e83a288787bcd14a6aea84cee5c87a67c5a3e660c30f557a3d24761b3527"
37추가:
38추가: [[package]]
39추가: name = "constant_time_eq"
40추가: version = "0.6.1"
41추가: source = "registry+https://github.com/rust-lang/crates.io-index"
42추가: checksum = "9eb6feb175df65d0a3ccd3e73484e940d0ac664e8034f0519fd49a93db3071d9"
43추가: dependencies = [
44추가: "rustversion",
45추가: ]
46추가:
47추가: [[package]]
48추가: name = "cpufeatures"
49추가: version = "0.2.17"
50추가: source = "registry+https://github.com/rust-lang/crates.io-index"
51추가: checksum = "59ed5838eebb26a2bb2e58f6d5b5316989ae9d08bab10e0e6d103e656d1b0280"
52추가: dependencies = [
53추가: "libc",
54추가: ]
55추가:
56추가: [[package]]
57추가: name = "crc32fast"
58추가: version = "1.5.4"
59추가: source = "registry+https://github.com/rust-lang/crates.io-index"
60추가: checksum = "5f97d3416d5337d15c4b0d78c8c91df922ca143f57ec20e2d1c188333047ef04"
61추가: dependencies = [
62추가: "cfg-if",
63추가: ]
64추가:
65추가: [[package]]
66추가: name = "crypto-common"
67추가: version = "0.1.7"
68추가: source = "registry+https://github.com/rust-lang/crates.io-index"
69추가: checksum = "78c8292055d1c1df0cce5d180393dc8cce0abec0a7102adb6c7b1eef6016d60a"
70추가: dependencies = [
71추가: "generic-array",
72추가: "typenum",
73추가: ]
74추가:
75추가: [[package]]
76추가: name = "digest"
77추가: version = "0.10.7"
78추가: source = "registry+https://github.com/rust-lang/crates.io-index"
79추가: checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292"
80추가: dependencies = [
81추가: "block-buffer",
82추가: "crypto-common",
83추가: ]
84추가:
85추가: [[package]]
86추가: name = "equivalent"
87추가: version = "1.0.3"
88추가: source = "registry+https://github.com/rust-lang/crates.io-index"
89추가: checksum = "00d174d5400e5e8fd687ad1049e2f578285fa914201b1af7e8b112a4546bd826"
90추가:
91추가: [[package]]
92추가: name = "flate2"
93추가: version = "1.1.11"
94추가: source = "registry+https://github.com/rust-lang/crates.io-index"
95추가: checksum = "626d4928326b646e70f65ed36fc7cf9f206bdb68a0019ee7c6b4709da4e084c4"
96추가: dependencies = [
97추가: "zlib-rs",
98추가: ]
99추가:
100추가: [[package]]
101추가: name = "generic-array"
102추가: version = "0.14.7"
103추가: source = "registry+https://github.com/rust-lang/crates.io-index"
104추가: checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a"
105추가: dependencies = [
106추가: "typenum",
107추가: "version_check",
108추가: ]
109추가:
110추가: [[package]]
111추가: name = "getrandom"
112추가: version = "0.4.3"
113추가: source = "registry+https://github.com/rust-lang/crates.io-index"
114추가: checksum = "300e883d756b2e4ec94e02791f39b04b522276138852cfc41d9fb7e904106099"
115추가: dependencies = [
116추가: "cfg-if",
117추가: "js-sys",
118추가: "libc",
119추가: "r-efi",
120추가: "wasm-bindgen",
121추가: ]
122추가:
123추가: [[package]]
124추가: name = "hashbrown"
125추가: version = "0.17.1"
126추가: source = "registry+https://github.com/rust-lang/crates.io-index"
127추가: checksum = "ed5909b6e89a2db4456e54cd5f673791d7eca6732202bbf2a9cc504fe2f9b84a"
128추가:
129추가: [[package]]
130추가: name = "indexmap"
131추가: version = "2.14.2"
132추가: source = "registry+https://github.com/rust-lang/crates.io-index"
133추가: checksum = "cc4e190f5d26ca7051642629da2c52fc03bde85a03197c99408dcd291734c855"
134추가: dependencies = [
135추가: "equivalent",
136추가: "hashbrown",
137추가: ]
138추가:
139추가: [[package]]
140추가: name = "js-sys"
141추가: version = "0.3.107"
142추가: source = "registry+https://github.com/rust-lang/crates.io-index"
143추가: checksum = "8dc09d2154098bbf4ef54eab6b117a3c24cbbffe94046b16ee6d6d4510584d3a"
144추가: dependencies = [
145추가: "cfg-if",
146추가: "wasm-bindgen",
147추가: ]
148추가:
149추가: [[package]]
150추가: name = "libc"
151추가: version = "0.2.191"
152추가: source = "registry+https://github.com/rust-lang/crates.io-index"
153추가: checksum = "65cd87c9a6d60536580b316ad985726104730a5151c99845f2490428ef91240a"
154추가:
155추가: [[package]]
156추가: name = "memchr"
157추가: version = "2.8.3"
158추가: source = "registry+https://github.com/rust-lang/crates.io-index"
159추가: checksum = "cf8baf1c55e62ffcace7a9f06f4bd9cd3f0c4beb022d3b367256b91b87513d98"
160추가:
161추가: [[package]]
162추가: name = "nix"
163추가: version = "0.31.3"
164추가: source = "registry+https://github.com/rust-lang/crates.io-index"
165추가: checksum = "cf20d2fde8ff38632c426f1165ed7436270b44f199fc55284c38276f9db47c3d"
166추가: dependencies = [
167추가: "bitflags",
168추가: "cfg-if",
169추가: "cfg_aliases",
170추가: "libc",
171추가: ]
172추가:
173추가: [[package]]
174추가: name = "proc-macro2"
175추가: version = "1.0.107"
176추가: source = "registry+https://github.com/rust-lang/crates.io-index"
177추가: checksum = "985e7ec9bb745e6ce6535b544d84d6cd6f7ad8bd711c398938ae983b91a766d9"
178추가: dependencies = [
179추가: "unicode-ident",
180추가: ]
181추가:
182추가: [[package]]
183추가: name = "quote"
184추가: version = "1.0.47"
185추가: source = "registry+https://github.com/rust-lang/crates.io-index"
186추가: checksum = "1fbf4db142a473a8d80c26bbf18454ed458bf8d26c8219c331daecfdbd079001"
187추가: dependencies = [
188추가: "proc-macro2",
189추가: ]
190추가:
191추가: [[package]]
192추가: name = "r-efi"
193추가: version = "6.0.0"
194추가: source = "registry+https://github.com/rust-lang/crates.io-index"
195추가: checksum = "f8dcc9c7d52a811697d2151c701e0d08956f92b0e24136cf4cf27b57a6a0d9bf"
196추가:
197추가: [[package]]
198추가: name = "rustversion"
199추가: version = "1.0.23"
200추가: source = "registry+https://github.com/rust-lang/crates.io-index"
201추가: checksum = "cf54715a573b99ac80df0bc206da022bcd442c974952c7b9720069370852e21f"
202추가:
203추가: [[package]]
204추가: name = "sha2"
205추가: version = "0.10.9"
206추가: source = "registry+https://github.com/rust-lang/crates.io-index"
207추가: checksum = "a7507d819769d01a365ab707794a4084392c824f54a7a6a7862f8c3d0892b283"
208추가: dependencies = [
209추가: "cfg-if",
210추가: "cpufeatures",
211추가: "digest",
212추가: ]
213추가:
214추가: [[package]]
215추가: name = "subtle"
216추가: version = "2.6.1"
217추가: source = "registry+https://github.com/rust-lang/crates.io-index"
218추가: checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292"
219추가:
220추가: [[package]]
221추가: name = "syn"
222추가: version = "2.0.119"
223추가: source = "registry+https://github.com/rust-lang/crates.io-index"
224추가: checksum = "872831b642d1a07999a962a351ed35b955ea2cfc8f3862091e2a240a84f17297"
225추가: dependencies = [
226추가: "proc-macro2",
227추가: "quote",
228추가: "unicode-ident",
229추가: ]
230추가:
231추가: [[package]]
232추가: name = "syn"
233추가: version = "3.0.10"
234추가: source = "registry+https://github.com/rust-lang/crates.io-index"
235추가: checksum = "4ae9ccbea3a7b0b09443036490c8f34a8b1b760fd345e5c0dae0aac718faea79"
236추가: dependencies = [
237추가: "proc-macro2",
238추가: "quote",
239추가: "unicode-ident",
240추가: ]
241추가:
242추가: [[package]]
243추가: name = "typed-path"
244추가: version = "0.13.0"
245추가: source = "registry+https://github.com/rust-lang/crates.io-index"
246추가: checksum = "9ce898823d8cd0f028662d2f349694b1af0a5cc9be83f1d213a00d3147445e1e"
247추가:
248추가: [[package]]
249추가: name = "typenum"
250추가: version = "1.20.1"
251추가: source = "registry+https://github.com/rust-lang/crates.io-index"
252추가: checksum = "b6f5e870be6c3b371b77fe0ee0bafb859fa4964b4404c27de1d380043c4dda20"
253추가:
254추가: [[package]]
255추가: name = "unicode-ident"
256추가: version = "1.0.27"
257추가: source = "registry+https://github.com/rust-lang/crates.io-index"
258추가: checksum = "a2c754d6c33795a1c324727428e5a7dedb5b06195f9890bdbcba760d3e246563"
259추가:
260추가: [[package]]
261추가: name = "version_check"
262추가: version = "0.9.5"
263추가: source = "registry+https://github.com/rust-lang/crates.io-index"
264추가: checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a"
265추가:
266추가: [[package]]
267추가: name = "wasm-bindgen"
268추가: version = "0.2.130"
269추가: source = "registry+https://github.com/rust-lang/crates.io-index"
270추가: checksum = "a0181c14ddd6c7b8b0b0132a5f1ea2f32be0d893cd3ea97b6e3b28886b8a3d1c"
271추가: dependencies = [
272추가: "cfg-if",
273추가: "rustversion",
274추가: "wasm-bindgen-macro",
275추가: "wasm-bindgen-shared",
276추가: ]
277추가:
278추가: [[package]]
279추가: name = "wasm-bindgen-macro"
280추가: version = "0.2.130"
281추가: source = "registry+https://github.com/rust-lang/crates.io-index"
282추가: checksum = "6e931a02a39abdbf66966fc35902b5ed58344750a70885bed4ebb3d8eaf28ed9"
283추가: dependencies = [
284추가: "quote",
285추가: "wasm-bindgen-macro-support",
286추가: ]
287추가:
288추가: [[package]]
289추가: name = "wasm-bindgen-macro-support"
290추가: version = "0.2.130"
291추가: source = "registry+https://github.com/rust-lang/crates.io-index"
292추가: checksum = "2ca4b54280e455bd831e33a6b8e734baf432fe63fbc35c42ac14ce67a043a53a"
293추가: dependencies = [
294추가: "bumpalo",
295추가: "proc-macro2",
296추가: "quote",
297추가: "syn 3.0.10",
298추가: "wasm-bindgen-shared",
299추가: ]
300추가:
301추가: [[package]]
302추가: name = "wasm-bindgen-shared"
303추가: version = "0.2.130"
304추가: source = "registry+https://github.com/rust-lang/crates.io-index"
305추가: checksum = "3b1f9c3798725016c6ee5f2f57869ec0831e8bbc0ab0310a86e787e97f41389e"
306추가: dependencies = [
307추가: "unicode-ident",
308추가: ]
309추가:
310추가: [[package]]
311추가: name = "windows-link"
312추가: version = "0.2.1"
313추가: source = "registry+https://github.com/rust-lang/crates.io-index"
314추가: checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5"
315추가:
316추가: [[package]]
317추가: name = "windows-sys"
318추가: version = "0.61.2"
319추가: source = "registry+https://github.com/rust-lang/crates.io-index"
320추가: checksum = "ae137229bcbd6cdf0f7b80a31df61766145077ddf49416a728b02cb3921ff3fc"
321추가: dependencies = [
322추가: "windows-link",
323추가: ]
324추가:
325추가: [[package]]
326추가: name = "zeroize"
327추가: version = "1.9.1"
328추가: source = "registry+https://github.com/rust-lang/crates.io-index"
329추가: checksum = "e13084392c5e4bc371903e2935a5eaeed24905a7511356b883835e18a78f6879"
330추가: dependencies = [
331추가: "zeroize_derive",
332추가: ]
333추가:
334추가: [[package]]
335추가: name = "zeroize_derive"
336추가: version = "1.5.0"
337추가: source = "registry+https://github.com/rust-lang/crates.io-index"
338추가: checksum = "3c50655cbb0fe3fc43170059e702f1ce5e19b84cec58dc87b037a09935c2f328"
339추가: dependencies = [
340추가: "proc-macro2",
341추가: "quote",
342추가: "syn 2.0.119",
343추가: ]
344추가:
345추가: [[package]]
346추가: name = "zip"
347추가: version = "9.5.0"
348추가: source = "registry+https://github.com/rust-lang/crates.io-index"
349추가: checksum = "0700e6c427aff64acdbf02e85fbfd946c2ee12319d1af013092f3a2178914ff8"
350추가: dependencies = [
351추가: "constant_time_eq",
352추가: "crc32fast",
353추가: "flate2",
354추가: "getrandom",
355추가: "indexmap",
356추가: "libc",
357추가: "memchr",
358추가: "nix",
359추가: "typed-path",
360추가: "windows-sys",
361추가: "zeroize",
362추가: ]
363추가:
364추가: [[package]]
365추가: name = "zipelo-memory-gzip-reader"
366추가: version = "0.1.0"
367추가: dependencies = [
368추가: "zlib-rs",
369추가: ]
370추가:
371추가: [[package]]
372추가: name = "zipelo-memory-ustar-reader"
373추가: version = "0.1.0"
374추가: dependencies = [
375추가: "sha2",
376추가: "subtle",
377추가: ]
378추가:
379추가: [[package]]
380추가: name = "zipelo-rust-memory-zip-create"
381추가: version = "0.1.0"
382추가: dependencies = [
383추가: "zip",
384추가: ]
385추가:
386추가: [[package]]
387추가: name = "zlib-rs"
388추가: version = "0.6.8"
389추가: source = "registry+https://github.com/rust-lang/crates.io-index"
390추가: checksum = "b268e58e7c693d7c271f93ffc4ba3b380412554231c85bf61ca7af91042a4112"
391추가:
392추가: [[package]]
393추가: name = "zipelo-app-core-memory"
394추가: version = "0.1.0"
395추가: dependencies = [
396추가: "zipelo-memory-gzip-reader",
397추가: "zipelo-memory-ustar-reader",
398추가: "zipelo-rust-memory-zip-create",
399추가: ]
400추가:
401추가: [[package]]
402추가: name = "zipelo-ui-memory-races"
403추가: version = "0.1.0"
404추가: dependencies = [
405추가: "zipelo-app-core-memory",
406추가: ]
추가tests/rust-ui-memory-races/Cargo.toml+17-0
@@ -0,0 +1,17 @@
1추가: [package]
2추가: name = "zipelo-ui-memory-races"
3추가: version = "0.1.0"
4추가: edition = "2024"
5추가: rust-version = "1.99"
6추가: license = "MIT"
7추가: publish = false
8추가: autotests = false
9추가:
10추가: [workspace]
11추가:
12추가: [dependencies]
13추가: core_memory = { package = "zipelo-app-core-memory", path = "../../experiments/rust-app-core-memory" }
14추가:
15추가: [[test]]
16추가: name = "races"
17추가: path = "races.rs"
추가tests/rust-ui-memory-races/LICENSE+21-0
@@ -0,0 +1,21 @@
1추가: MIT License
2추가:
3추가: Copyright (c) 2026 Team-LJY contributors
4추가:
5추가: Permission is hereby granted, free of charge, to any person obtaining a copy
6추가: of this software and associated documentation files (the "Software"), to deal
7추가: in the Software without restriction, including without limitation the rights
8추가: to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9추가: copies of the Software, and to permit persons to whom the Software is
10추가: furnished to do so, subject to the following conditions:
11추가:
12추가: The above copyright notice and this permission notice shall be included in all
13추가: copies or substantial portions of the Software.
14추가:
15추가: THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16추가: IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17추가: FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18추가: AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19추가: LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20추가: OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21추가: SOFTWARE.
추가tests/rust-ui-memory-races/SHA256SUMS+9-0
@@ -0,0 +1,9 @@
1추가: 806b4331e719fbc1d2f1622e48dda5f4ed089d716ee443996c1f2d803d1959ac tests/rust-ui-memory-races/Cargo.lock
2추가: 36066585aaa69fd78ea2f930ae6978f1b972026f76ab5f8dc3236836dd4ea1bc tests/rust-ui-memory-races/Cargo.toml
3추가: 0714945e52a4d5b560c02c9a18478519f8c4e2572cbf87bd6d52adcfb2b63c62 tests/rust-ui-memory-races/LICENSE
4추가: 06ba42b8264d2d5dcf082c2bbeab4b0d6dcb2f23bed7fb28912bfd0e1e15d42b tests/rust-ui-memory-races/assembly.rs
5추가: 8a5f25a3a2b1b83b7f2a116b759663fb199efb8d61f7585bfc72f3681a4d3e33 tests/rust-ui-memory-races/contract.json
6추가: 6a26ef0e9f7b69a7478c63f66935f1d2e4afbc2ada83b8280e31a6a38b9ba0e4 tests/rust-ui-memory-races/races.rs
7추가: 69999e8609610a89bc6155296c047adaef3126e4d46e4fa0f4bf528b85045195 tests/rust-ui-memory-races/run_reviewed.py
8추가: 3dd6d78cabce0bccac4dd7ea208f2557d4af06ddbf67b934568491194e8640c3 tests/rust-ui-memory-races/sources.json
9추가: 0e6607a244479eca2377899ded52d1324547fa81b244dc01388a8c13f564176b tests/rust-ui-memory-races/static_check.py
추가tests/rust-ui-memory-races/assembly.rs+48-0
@@ -0,0 +1,48 @@
1추가: pub use core_memory as core;
2추가:
3추가: mod transport {
4추가: include!("../../experiments/rust-ui-memory-app/src/transport.rs");
5추가: }
6추가:
7추가: mod runtime {
8추가: include!("../../experiments/rust-ui-memory-app/src/runtime.rs");
9추가:
10추가: // 원본 메서드는 바꾸지 않고 시험 채널과 실제 핸들만 조립함.
11추가: pub fn assemble(
12추가: work: impl FnOnce(
13추가: core::Operation,
14추가: SyncSender<ProgressEvent>,
15추가: SyncSender<Completion>,
16추가: ) -> Option<Completion>
17추가: + Send
18추가: + 'static,
19추가: ) -> Task {
20추가: let (op, cancellation) = core::Operation::start().unwrap();
21추가: let id = op.id();
22추가: let (sender, events) = mpsc::sync_channel(DEFAULT_CAPACITY);
23추가: let (done, completion) = mpsc::sync_channel(1);
24추가: let handle = thread::spawn(move || work(op, sender, done));
25추가: Task {
26추가: id,
27추가: cancellation,
28추가: events: Some(events),
29추가: completion: Some(completion),
30추가: handle: Some(handle),
31추가: }
32추가: }
33추가: }
34추가:
35추가: mod controller {
36추가: include!("../../experiments/rust-ui-memory-app/src/controller.rs");
37추가:
38추가: // 비공개 Receiver를 같은 실제 작업 ID로 초기화하는 시험 경계임.
39추가: pub fn attach(task: Task) -> Controller {
40추가: Controller {
41추가: receiver: Some(core::Receiver::new(task.id)),
42추가: task: Some(task),
43추가: generation: 1,
44추가: status: Status::Running,
45추가: ..Controller::default()
46추가: }
47추가: }
48추가: }
추가tests/rust-ui-memory-races/contract.json+100-0
@@ -0,0 +1,100 @@
1추가: {
2추가: "base_head": "f6aa3879c4690ac63afd21ec231b460f42ae7aee",
3추가: "base_tree": "aa7cd9055337fa92c43773043cfb12b0426f25c7",
4추가: "branch": "fix/rust-ui-memory-race-regressions",
5추가: "files": [
6추가: "Cargo.toml",
7추가: "Cargo.lock",
8추가: "LICENSE",
9추가: "assembly.rs",
10추가: "races.rs",
11추가: "contract.json",
12추가: "sources.json",
13추가: "static_check.py",
14추가: "run_reviewed.py",
15추가: "SHA256SUMS"
16추가: ],
17추가: "names": [
18추가: "public_spawn_cancel_before_native_entry_is_ordered",
19추가: "real_checkpoint_cancel_is_observed_after_frame_handshake",
20추가: "terminal_created_cancel_then_delivered_success_is_preserved",
21추가: "terminal_received_cancel_cannot_apply_payload_before_join",
22추가: "close_confirmation_retracts_with_terminal_held_before_delivery",
23추가: "close_waiting_requires_join_after_terminal_reception",
24추가: "waiting_retraction_before_join_keeps_cancel_and_success",
25추가: "confirmation_choice_survives_terminal_then_join_then_keep_open",
26추가: "native_failure_held_until_join_is_not_rewritten_by_close_cancel",
27추가: "panic_after_terminal_delivery_preserves_result_without_applying_it",
28추가: "stale_progress_is_ignored_while_current_worker_is_held",
29추가: "foreign_terminal_received_before_join_cannot_authorize_close_early",
30추가: "lost_completion_after_creation_is_recovered_only_after_join",
31추가: "abnormal_owner_drop_waits_for_noncooperative_thread_release"
32추가: ],
33추가: "declared": 14,
34추가: "scope": "합성 메모리 UI 수명 회귀 소스 후보임. 기존 31개와 이름 중복 없음. 기존 수와 합산하지 않음. source-only 상태이며 컴파일/발견/실행은 별도 배정임",
35추가: "assembly": {
36추가: "includes": [
37추가: "experiments/rust-ui-memory-app/src/runtime.rs",
38추가: "experiments/rust-ui-memory-app/src/controller.rs",
39추가: "experiments/rust-ui-memory-app/src/transport.rs"
40추가: ],
41추가: "private_access": "동일 모듈 안에 새 free helper만 추가하여 Task의 실제 JoinHandle과 Controller의 Receiver를 일치하는 OperationId로 조립함. 원본 메서드/Drop을 대체하거나 복사하지 않음",
42추가: "difference": "시험 crate에서 원본 source를 재컴파일하는 white-box 시험임. 사용자 배포 library object/binary나 실제 GUI 실행 증거가 아님. assemble 경로는 Task::spawn_with의 실행 구현 자체를 검증하지 않으므로 별도 public spawn 사례를 유지함",
43추가: "thread": "실제 std thread/mpsc/JoinHandle과 원래 deliver_completion/poll_join/Controller 메서드를 사용함. Terminal은 실제 core API에서만 생성하고 복제/forge하지 않음"
44추가: },
45추가: "coverage": {
46추가: "public_spawn_cancel_before_native_entry_is_ordered": "공개 spawn_with 진입 장벽 뒤 취소 반복을 frame에서 확인하고 실제 native 진입 후 취소 반환 관측",
47추가: "real_checkpoint_cancel_is_observed_after_frame_handshake": "실제 GZip checkpoint observer에 장벽을 두고 frame 진행/취소 반환을 먼저 받은 뒤 observer 해제 및 cancellation_forwarded 확인",
48추가: "terminal_created_cancel_then_delivered_success_is_preserved": "실제 성공 Terminal 생성 후 전달 전 취소와 전달 후 join 보류에서 성공 원형 보존",
49추가: "terminal_received_cancel_cannot_apply_payload_before_join": "Terminal 수신 뒤 취소 반복/재시작 거부/accepted latch와 payload의 join 전 비적용",
50추가: "close_confirmation_retracts_with_terminal_held_before_delivery": "실제 Terminal 보류 중 close 확인/철회는 취소를 전송하지 않음",
51추가: "close_waiting_requires_join_after_terminal_reception": "실제 Terminal 수신 뒤 close 확인/Waiting은 join 전 Allowed가 되지 않음",
52추가: "waiting_retraction_before_join_keeps_cancel_and_success": "Terminal 보류 중 Waiting 진입 후 전달 상태에서 철회해도 취소 유지/성공 보존",
53추가: "confirmation_choice_survives_terminal_then_join_then_keep_open": "확인 중 전달과 join이 먼저 완료되어도 사용자 선택을 유지하고 이후 keep_open 처리",
54추가: "native_failure_held_until_join_is_not_rewritten_by_close_cancel": "실제 Header typed 실패 전달 뒤 close 취소가 실패를 Cancelled로 덮지 않음",
55추가: "panic_after_terminal_delivery_preserves_result_without_applying_it": "성공 Terminal 전달 뒤 주입한 실제 thread panic 원형과 terminal 보존, payload 비적용, Waiting 종료",
56추가: "stale_progress_is_ignored_while_current_worker_is_held": "실제 이전 작업 raw Event를 현재 채널로 먼저 보내고 장벽에서 poll한 뒤 현재 연속 stream 수용",
57추가: "foreign_terminal_received_before_join_cannot_authorize_close_early": "foreign 실제 Terminal 수신 상태에서도 close는 join을 기다리고 이후 sticky DeliveryFailure/미적용",
58추가: "lost_completion_after_creation_is_recovered_only_after_join": "Terminal 생성 뒤 완료 수신자를 소멸시키고 close Waiting에서 join fallback의 실제 성공 소유권 회수",
59추가: "abnormal_owner_drop_waits_for_noncooperative_thread_release": "비정상 owner Drop이 취소 미협조 스레드 join에서 기다림을 취소 진입/반환 handshake로 관측 후 장벽 해제"
60추가: },
61추가: "limits": [
62추가: "마지막 checkpoint 이후 Terminal 생성 전의 비공개 좁은 경합, ID/sequence overflow는 미검증임",
63추가: "실제 OS worker/launch/EOF/reap/OS cleanup/파일 snapshot/게시 성공 증거가 아님",
64추가: "GZip checkpoint 직접 장벽을 사용하며 ZIP/USTAR 중간 checkpoint 취소는 이 신규 사례에 포함하지 않음",
65추가: "기존 31개의 큐 포화/observer 우선순위/fixture 검증을 재선언하지 않음",
66추가: "비정상 owner Drop의 blocking join은 정상 UI cleanup과 별도임. production의 유한 종료를 보장하지 않음",
67추가: "추가 Xvfb harness/GUI/실제 display/IME/전체 접근성/Windows/다른 Ubuntu는 포함하지 않음"
68추가: ],
69추가: "bounded_execution": {
70추가: "gate_seconds": 5,
71추가: "frame_return_seconds": 5,
72추가: "owner_join_observation_seconds": 5,
73추가: "settle_seconds": 5,
74추가: "proof": "frame 소유 thread의 반환 채널을 받은 뒤 driver가 worker release를 전송함. 경과시간 비교만으로 nonblocking을 선언하지 않음. sleep/무한 Barrier 없음",
75추가: "external": "별도 배정 후 runner는 compile 180초, discovery 10초, 각 정확한 이름 30초 한도임. 각 사례는 별도 test 프로세스로 한 번 실행하며 --test-threads=1 사용. timeout은 해당 process group 강제 종료 후 실패/미실행 목록 기록하며 성공으로 합산하지 않음",
76추가: "failure": "첫 compile/discovery/실행 실패에서 중단하고 raw stdout/stderr/exit/hash/active stage/미실행 이름과 입력 불변을 기록함. 소스나 기대값을 자동 수정하거나 재실행하지 않음"
77추가: },
78추가: "dependencies": {
79추가: "direct": "std + 기존 core_memory path dependency만 사용함",
80추가: "lock": "고정 experiments/rust-app-core-memory/Cargo.lock 전체 bytes를 prefix로 재사용하고 새 local root package 하나만 추가함. locked/offline metadata로 확인함. 원래 모든 registry package/checksum/dependency 레코드와 라이선스 출처는 그대로임",
81추가: "notices": [
82추가: "experiments/rust-app-core-memory/THIRD-PARTY-NOTICES.txt",
83추가: "experiments/rust-app-core-memory/dependencies.json"
84추가: ],
85추가: "new_registry_packages": 0,
86추가: "discarded_attempt": "처음 기본 cargo generate-lockfile --offline은 최신 캐시 버전을 선택하므로 후보 lock으로 채택하지 않았음. 그 결과는 local lock-generation-first-attempt.lock에 별도 보존하며 원본 lock을 바꾸지 않음"
87추가: },
88추가: "commands": {
89추가: "static": "python3 tests/rust-ui-memory-races/static_check.py",
90추가: "rustfmt": "rustfmt +1.99.1 --edition 2024 --check tests/rust-ui-memory-races/races.rs tests/rust-ui-memory-races/assembly.rs",
91추가: "metadata": "cargo +1.99.1 metadata --locked --offline --manifest-path tests/rust-ui-memory-races/Cargo.toml --format-version 1",
92추가: "future_reviewed_execution": "python3 tests/rust-ui-memory-races/run_reviewed.py --execute-reviewed --workspace-lock <current-cohort-lock> --record tests/rust-ui-memory-races/validation-<reviewed-head>"
93추가: },
94추가: "validation_state": {
95추가: "rust_compiled": false,
96추가: "discovered": false,
97추가: "executed": false,
98추가: "gui_executed": false
99추가: }
100추가: }
추가tests/rust-ui-memory-races/races.rs+482-0
@@ -0,0 +1,482 @@
1추가: #![forbid(unsafe_code)]
2추가: #![allow(dead_code)]
3추가: include!("assembly.rs");
4추가:
5추가: use controller::{CloseState, Controller, Status};
6추가: use runtime::{Action, Completion, DEFAULT_CAPACITY, Outcome, Task};
7추가: use std::{
8추가: sync::mpsc::{self, Receiver, SyncSender},
9추가: thread,
10추가: time::{Duration, Instant},
11추가: };
12추가:
13추가: const WAIT: Duration = Duration::from_secs(5);
14추가:
15추가: struct Gate {
16추가: reached: SyncSender<&'static str>,
17추가: release: Receiver<()>,
18추가: }
19추가: struct Driver {
20추가: reached: Receiver<&'static str>,
21추가: release: SyncSender<()>,
22추가: }
23추가: fn gate() -> (Gate, Driver) {
24추가: let (reached, observe) = mpsc::sync_channel(1);
25추가: let (release, resume) = mpsc::sync_channel(1);
26추가: (
27추가: Gate {
28추가: reached,
29추가: release: resume,
30추가: },
31추가: Driver {
32추가: reached: observe,
33추가: release,
34추가: },
35추가: )
36추가: }
37추가: impl Gate {
38추가: fn hold(&self, stage: &'static str) {
39추가: eprintln!("worker reached {stage}");
40추가: self.reached.try_send(stage).unwrap();
41추가: self.release.recv_timeout(WAIT).expect(stage);
42추가: eprintln!("worker released {stage}");
43추가: }
44추가: }
45추가: impl Driver {
46추가: fn at(&self, stage: &'static str) {
47추가: assert_eq!(self.reached.recv_timeout(WAIT).expect(stage), stage);
48추가: }
49추가: fn release(&self) {
50추가: self.release.try_send(()).unwrap();
51추가: }
52추가: }
53추가:
54추가: fn join_bounded<T>(handle: thread::JoinHandle<T>) -> thread::Result<T> {
55추가: let deadline = Instant::now() + WAIT;
56추가: while !handle.is_finished() {
57추가: assert!(Instant::now() < deadline, "시험 소유 스레드 종료 기한 초과");
58추가: thread::yield_now();
59추가: }
60추가: handle.join()
61추가: }
62추가:
63추가: // frame 반환을 받은 뒤에만 driver가 worker 장벽을 해제함.
64추가: fn frame(mut c: Controller, op: impl FnOnce(&mut Controller) + Send + 'static) -> Controller {
65추가: let (returned, observed) = mpsc::sync_channel(1);
66추가: let owner = thread::spawn(move || {
67추가: op(&mut c);
68추가: returned.try_send(c).ok().expect("frame 반환 수신자 유지");
69추가: });
70추가: let c = observed
71추가: .recv_timeout(WAIT)
72추가: .expect("worker 해제 전 frame 반환 필요");
73추가: join_bounded(owner).unwrap();
74추가: c
75추가: }
76추가: fn settle(mut c: Controller) -> Controller {
77추가: let deadline = Instant::now() + WAIT;
78추가: while c.busy() {
79추가: c = frame(c, |c| c.poll());
80추가: assert!(Instant::now() < deadline, "join 관측 기한 초과");
81추가: thread::yield_now();
82추가: }
83추가: assert!(c.task.as_ref().unwrap().joined());
84추가: assert!(c.task.as_mut().unwrap().poll_join().is_none());
85추가: c
86추가: }
87추가:
88추가: fn terminal_gates(action: Action) -> (Controller, Driver, Driver) {
89추가: let (before, pre) = gate();
90추가: let (after, post) = gate();
91추가: let task = runtime::assemble(move |op, events, done| {
92추가: let completion = runtime::execute(op, action, events);
93추가: before.hold("terminal-created");
94추가: let fallback = runtime::deliver_completion(&done, completion);
95추가: assert!(fallback.is_none());
96추가: after.hold("terminal-delivered");
97추가: fallback
98추가: });
99추가: (controller::attach(task), pre, post)
100추가: }
101추가: fn no_payload(c: &Controller) {
102추가: assert!(c.rows().is_empty());
103추가: assert!(c.selected_bytes().is_none());
104추가: }
105추가: fn current_handle(c: &Controller, id: core::OperationId) {
106추가: assert!(c.busy());
107추가: assert_eq!(c.task.as_ref().unwrap().id, id);
108추가: assert!(!c.task.as_ref().unwrap().finished());
109추가: assert!(!c.task.as_ref().unwrap().joined());
110추가: }
111추가:
112추가: #[test]
113추가: fn public_spawn_cancel_before_native_entry_is_ordered() {
114추가: let (worker, driver) = gate();
115추가: let task = Task::spawn_with(DEFAULT_CAPACITY, move |op, events| {
116추가: worker.hold("before-native");
117추가: runtime::execute(op, Action::Gzip, events)
118추가: })
119추가: .unwrap();
120추가: driver.at("before-native");
121추가: let c = frame(controller::attach(task), |c| {
122추가: assert!(c.cancel());
123추가: assert!(!c.cancel());
124추가: c.poll();
125추가: assert_eq!(c.status, Status::CancelRequested);
126추가: });
127추가: driver.release();
128추가: let c = settle(c);
129추가: assert_eq!(c.status, Status::Cancelled);
130추가: no_payload(&c);
131추가: }
132추가:
133추가: #[test]
134추가: fn real_checkpoint_cancel_is_observed_after_frame_handshake() {
135추가: let (worker, driver) = gate();
136추가: let task = Task::spawn_with(DEFAULT_CAPACITY, move |op, events| {
137추가: let mut budget = core::gzip::Budget::new(core::gzip::Limits::default()).unwrap();
138추가: let mut first = true;
139추가: let mut transport = transport::Transport::new(events);
140추가: let terminal = op.gzip(
141추가: core::gzip::Request {
142추가: input: runtime::GZIP.into(),
143추가: selected: true,
144추가: },
145추가: &mut budget,
146추가: |event| {
147추가: let result = transport.forward(
148추가: event.stamp().sequence(),
149추가: runtime::ProgressEvent::Gzip(event),
150추가: Ok(()),
151추가: || core::gzip::Stop::Cancelled,
152추가: );
153추가: if first {
154추가: first = false;
155추가: worker.hold("native-checkpoint");
156추가: }
157추가: result
158추가: },
159추가: );
160추가: Completion {
161추가: outcome: Outcome::Gzip(terminal),
162추가: delivery: transport.fault,
163추가: }
164추가: })
165추가: .unwrap();
166추가: driver.at("native-checkpoint");
167추가: let id = task.id;
168추가: let c = frame(controller::attach(task), move |c| {
169추가: c.poll();
170추가: assert!(c.progress.is_some());
171추가: assert!(c.cancel());
172추가: current_handle(c, id);
173추가: no_payload(c);
174추가: });
175추가: driver.release();
176추가: let c = settle(c);
177추가: assert_eq!(c.status, Status::Cancelled);
178추가: match &c.terminal.as_ref().unwrap().outcome {
179추가: Outcome::Gzip(t) => {
180추가: assert!(t.cancellation_requested());
181추가: assert!(t.cancellation_forwarded());
182추가: }
183추가: _ => panic!("형식 불일치"),
184추가: }
185추가: }
186추가:
187추가: #[test]
188추가: fn terminal_created_cancel_then_delivered_success_is_preserved() {
189추가: let (c, pre, post) = terminal_gates(Action::Gzip);
190추가: pre.at("terminal-created");
191추가: let c = frame(c, |c| {
192추가: assert!(c.cancel());
193추가: c.poll();
194추가: assert!(c.terminal.is_none());
195추가: });
196추가: pre.release();
197추가: post.at("terminal-delivered");
198추가: let c = frame(c, |c| {
199추가: c.poll();
200추가: assert!(c.terminal.as_ref().unwrap().outcome.is_ok());
201추가: assert!(c.busy());
202추가: no_payload(c);
203추가: });
204추가: post.release();
205추가: let c = settle(c);
206추가: assert_eq!(c.status, Status::Completed);
207추가: assert!(!c.terminal.as_ref().unwrap().outcome.cancelled());
208추가: }
209추가:
210추가: #[test]
211추가: fn terminal_received_cancel_cannot_apply_payload_before_join() {
212추가: let (c, pre, post) = terminal_gates(Action::Gzip);
213추가: pre.at("terminal-created");
214추가: pre.release();
215추가: post.at("terminal-delivered");
216추가: let c = frame(c, |c| {
217추가: c.poll();
218추가: assert!(c.terminal.is_some());
219추가: assert!(c.cancel());
220추가: assert!(!c.cancel());
221추가: assert_eq!(c.status, Status::CancelRequested);
222추가: assert!(!c.start(Action::Zip));
223추가: assert!(c.terminal_delivery.is_none());
224추가: no_payload(c);
225추가: });
226추가: post.release();
227추가: let c = settle(c);
228추가: assert_eq!(c.status, Status::Completed);
229추가: assert_eq!(c.terminal_delivery, Some(core::Delivery::Accepted));
230추가: }
231추가:
232추가: #[test]
233추가: fn close_confirmation_retracts_with_terminal_held_before_delivery() {
234추가: let (c, pre, post) = terminal_gates(Action::Gzip);
235추가: pre.at("terminal-created");
236추가: let c = frame(c, |c| {
237추가: c.request_close();
238추가: c.poll();
239추가: assert_eq!(c.close, CloseState::Confirming);
240추가: assert!(!c.task.as_ref().unwrap().cancellation.is_requested());
241추가: c.keep_open();
242추가: assert_eq!(c.close, CloseState::Open);
243추가: });
244추가: pre.release();
245추가: post.at("terminal-delivered");
246추가: post.release();
247추가: let c = settle(c);
248추가: assert_eq!(c.close, CloseState::Open);
249추가: assert_eq!(c.status, Status::Completed);
250추가: }
251추가:
252추가: #[test]
253추가: fn close_waiting_requires_join_after_terminal_reception() {
254추가: let (c, pre, post) = terminal_gates(Action::Gzip);
255추가: pre.at("terminal-created");
256추가: pre.release();
257추가: post.at("terminal-delivered");
258추가: let c = frame(c, |c| {
259추가: c.poll();
260추가: c.request_close();
261추가: c.confirm_close();
262추가: c.poll();
263추가: assert_eq!(c.close, CloseState::Waiting);
264추가: assert!(c.terminal.is_some());
265추가: assert!(c.busy());
266추가: no_payload(c);
267추가: assert!(!c.start(Action::Ustar));
268추가: });
269추가: post.release();
270추가: let c = settle(c);
271추가: assert_eq!(c.close, CloseState::Allowed);
272추가: assert_eq!(c.status, Status::Completed);
273추가: }
274추가:
275추가: #[test]
276추가: fn waiting_retraction_before_join_keeps_cancel_and_success() {
277추가: let (c, pre, post) = terminal_gates(Action::Gzip);
278추가: pre.at("terminal-created");
279추가: let c = frame(c, |c| {
280추가: c.request_close();
281추가: c.confirm_close();
282추가: assert_eq!(c.close, CloseState::Waiting);
283추가: });
284추가: pre.release();
285추가: post.at("terminal-delivered");
286추가: let c = frame(c, |c| {
287추가: c.poll();
288추가: c.keep_open();
289추가: c.poll();
290추가: assert_eq!(c.close, CloseState::Open);
291추가: assert!(c.task.as_ref().unwrap().cancellation.is_requested());
292추가: assert!(c.busy());
293추가: no_payload(c);
294추가: });
295추가: post.release();
296추가: let c = settle(c);
297추가: assert_eq!(c.close, CloseState::Open);
298추가: assert_eq!(c.status, Status::Completed);
299추가: }
300추가:
301추가: #[test]
302추가: fn confirmation_choice_survives_terminal_then_join_then_keep_open() {
303추가: let (c, pre, post) = terminal_gates(Action::Gzip);
304추가: pre.at("terminal-created");
305추가: let c = frame(c, |c| c.request_close());
306추가: pre.release();
307추가: post.at("terminal-delivered");
308추가: let c = frame(c, |c| {
309추가: c.poll();
310추가: assert_eq!(c.close, CloseState::Confirming);
311추가: assert!(c.busy());
312추가: });
313추가: post.release();
314추가: let c = settle(c);
315추가: assert_eq!(c.close, CloseState::Confirming);
316추가: let c = frame(c, |c| c.keep_open());
317추가: assert_eq!(c.close, CloseState::Open);
318추가: assert_eq!(c.status, Status::Completed);
319추가: }
320추가:
321추가: #[test]
322추가: fn native_failure_held_until_join_is_not_rewritten_by_close_cancel() {
323추가: let (c, pre, post) = terminal_gates(Action::InvalidGzip);
324추가: pre.at("terminal-created");
325추가: pre.release();
326추가: post.at("terminal-delivered");
327추가: let c = frame(c, |c| {
328추가: c.poll();
329추가: c.request_close();
330추가: c.confirm_close();
331추가: assert!(!c.terminal.as_ref().unwrap().outcome.is_ok());
332추가: assert!(!c.terminal.as_ref().unwrap().outcome.cancelled());
333추가: assert_eq!(c.close, CloseState::Waiting);
334추가: no_payload(c);
335추가: });
336추가: post.release();
337추가: let c = settle(c);
338추가: assert_eq!(c.status, Status::NativeFailure);
339추가: assert_eq!(c.close, CloseState::Allowed);
340추가: assert!(
341추가: matches!(&c.terminal.as_ref().unwrap().outcome, Outcome::Gzip(t) if matches!(t.result(), Err(core::Failure { native: Some(core::gzip::Error::Reader(core::gzip::Failure::Header)), .. })))
342추가: );
343추가: }
344추가:
345추가: #[test]
346추가: fn panic_after_terminal_delivery_preserves_result_without_applying_it() {
347추가: let (worker, driver) = gate();
348추가: let task = runtime::assemble(move |op, events, done| {
349추가: let completion = runtime::execute(op, Action::Gzip, events);
350추가: assert!(runtime::deliver_completion(&done, completion).is_none());
351추가: worker.hold("before-panic");
352추가: std::panic::panic_any(73_u32);
353추가: });
354추가: driver.at("before-panic");
355추가: let c = frame(controller::attach(task), |c| {
356추가: c.poll();
357추가: c.request_close();
358추가: c.confirm_close();
359추가: assert!(c.terminal.is_some());
360추가: no_payload(c);
361추가: });
362추가: driver.release();
363추가: let c = settle(c);
364추가: assert_eq!(c.status, Status::Panicked);
365추가: assert_eq!(c.close, CloseState::Allowed);
366추가: assert_eq!(c.panic.as_ref().unwrap().downcast_ref::<u32>(), Some(&73));
367추가: assert!(c.terminal.as_ref().unwrap().outcome.is_ok());
368추가: no_payload(&c);
369추가: }
370추가:
371추가: #[test]
372추가: fn stale_progress_is_ignored_while_current_worker_is_held() {
373추가: let (old, _) = core::Operation::start().unwrap();
374추가: let (sender, events) = mpsc::sync_channel(DEFAULT_CAPACITY);
375추가: let old_terminal = runtime::execute(old, Action::Gzip, sender);
376추가: let stale: Vec<_> = events.try_iter().collect();
377추가: let (worker, driver) = gate();
378추가: let task = runtime::assemble(move |op, sender, done| {
379추가: for event in stale {
380추가: sender.try_send(event).unwrap();
381추가: }
382추가: worker.hold("stale-progress-sent");
383추가: runtime::deliver_completion(&done, runtime::execute(op, Action::Gzip, sender))
384추가: });
385추가: driver.at("stale-progress-sent");
386추가: let c = frame(controller::attach(task), |c| {
387추가: c.poll();
388추가: assert!(c.progress.is_none());
389추가: assert!(c.delivery_error.is_none());
390추가: assert!(c.busy());
391추가: });
392추가: driver.release();
393추가: let c = settle(c);
394추가: assert_eq!(c.status, Status::Completed);
395추가: assert_ne!(
396추가: c.task.as_ref().unwrap().id,
397추가: match old_terminal.outcome {
398추가: Outcome::Gzip(t) => t.stamp().operation(),
399추가: _ => unreachable!(),
400추가: }
401추가: );
402추가: }
403추가:
404추가: #[test]
405추가: fn foreign_terminal_received_before_join_cannot_authorize_close_early() {
406추가: let (old, _) = core::Operation::start().unwrap();
407추가: let (sender, _events) = mpsc::sync_channel(DEFAULT_CAPACITY);
408추가: let foreign = runtime::execute(old, Action::Gzip, sender);
409추가: let (worker, driver) = gate();
410추가: let task = runtime::assemble(move |_, _, done| {
411추가: assert!(runtime::deliver_completion(&done, foreign).is_none());
412추가: worker.hold("foreign-delivered");
413추가: None
414추가: });
415추가: driver.at("foreign-delivered");
416추가: let c = frame(controller::attach(task), |c| {
417추가: c.poll();
418추가: c.request_close();
419추가: c.confirm_close();
420추가: assert_eq!(c.close, CloseState::Waiting);
421추가: no_payload(c);
422추가: });
423추가: driver.release();
424추가: let c = settle(c);
425추가: assert_eq!(c.status, Status::DeliveryFailure);
426추가: assert_eq!(c.terminal_delivery, Some(core::Delivery::IgnoredStale));
427추가: assert_eq!(c.close, CloseState::Allowed);
428추가: no_payload(&c);
429추가: }
430추가:
431추가: #[test]
432추가: fn lost_completion_after_creation_is_recovered_only_after_join() {
433추가: let (worker, driver) = gate();
434추가: let task = runtime::assemble(move |op, events, done| {
435추가: let completion = runtime::execute(op, Action::Gzip, events);
436추가: worker.hold("completion-created-before-disconnect");
437추가: runtime::deliver_completion(&done, completion)
438추가: });
439추가: driver.at("completion-created-before-disconnect");
440추가: let c = frame(controller::attach(task), |c| {
441추가: c.task.as_mut().unwrap().completion.take();
442추가: c.request_close();
443추가: c.confirm_close();
444추가: c.poll();
445추가: assert_eq!(c.close, CloseState::Waiting);
446추가: assert!(c.terminal.is_none());
447추가: no_payload(c);
448추가: });
449추가: driver.release();
450추가: let c = settle(c);
451추가: assert_eq!(c.status, Status::Completed);
452추가: assert_eq!(c.close, CloseState::Allowed);
453추가: assert!(c.terminal.as_ref().unwrap().outcome.is_ok());
454추가: }
455추가:
456추가: #[test]
457추가: fn abnormal_owner_drop_waits_for_noncooperative_thread_release() {
458추가: let (worker, driver) = gate();
459추가: let task = Task::spawn_with(DEFAULT_CAPACITY, move |op, events| {
460추가: let completion = runtime::execute(op, Action::Gzip, events);
461추가: worker.hold("noncooperative-after-success");
462추가: completion
463추가: })
464추가: .unwrap();
465추가: driver.at("noncooperative-after-success");
466추가: let cancellation = task.cancellation.clone();
467추가: let (done, observed) = mpsc::sync_channel(1);
468추가: let owner = thread::spawn(move || {
469추가: drop(task);
470추가: done.try_send(()).unwrap();
471추가: });
472추가: let deadline = Instant::now() + WAIT;
473추가: while !cancellation.is_requested() {
474추가: assert!(Instant::now() < deadline, "Drop 취소 진입 기한 초과");
475추가: thread::yield_now();
476추가: }
477추가: assert_eq!(observed.try_recv(), Err(mpsc::TryRecvError::Empty));
478추가: assert!(!owner.is_finished());
479추가: driver.release();
480추가: observed.recv_timeout(WAIT).expect("Drop join 반환 필요");
481추가: join_bounded(owner).unwrap();
482추가: }
추가tests/rust-ui-memory-races/run_reviewed.py+106-0
@@ -0,0 +1,106 @@
1추가: import argparse
2추가: import fcntl
3추가: import hashlib
4추가: import json
5추가: import os
6추가: from pathlib import Path
7추가: import re
8추가: import signal
9추가: import subprocess
10추가: import sys
11추가:
12추가: if sys.flags.optimize or os.environ.get("PYTHONOPTIMIZE"):
13추가: raise SystemExit("정상 Python mode 필요")
14추가: HERE = Path(__file__).resolve().parent
15추가: ROOT = HERE.parents[1]
16추가: parser = argparse.ArgumentParser()
17추가: parser.add_argument("--execute-reviewed", action="store_true")
18추가: parser.add_argument("--record", type=Path, required=True)
19추가: parser.add_argument("--workspace-lock", type=Path, required=True)
20추가: args = parser.parse_args()
21추가: if not args.execute_reviewed:
22추가: raise SystemExit("고정 head 실행 배정 후 --execute-reviewed 필요")
23추가: record = args.record.resolve()
24추가: if not record.is_relative_to(HERE) or record.exists():
25추가: raise SystemExit("새 tests 내부 기록 경로 필요")
26추가: lock = args.workspace_lock.resolve().open("r")
27추가: fcntl.flock(lock, fcntl.LOCK_EX)
28추가: subprocess.run(["git", "status", "--porcelain"], cwd=ROOT, stdout=subprocess.DEVNULL, check=True)
29추가: record.mkdir()
30추가: commands = []
31추가: report = {"commands": commands, "status": "started", "passed": [], "unexecuted": []}
32추가:
33추가:
34추가: def digest(data):
35추가: return hashlib.sha256(data).hexdigest()
36추가:
37추가:
38추가: def write_report():
39추가: (record / "report.json").write_text(json.dumps(report, ensure_ascii=False, indent=4) + "\n")
40추가:
41추가:
42추가: def run(stage, command, timeout):
43추가: proc = subprocess.Popen(command, cwd=ROOT, stdout=subprocess.PIPE, stderr=subprocess.PIPE, start_new_session=True)
44추가: timed_out = False
45추가: try:
46추가: out, err = proc.communicate(timeout=timeout)
47추가: except subprocess.TimeoutExpired:
48추가: timed_out = True
49추가: os.killpg(proc.pid, signal.SIGKILL)
50추가: out, err = proc.communicate()
51추가: (record / (stage + ".stdout")).write_bytes(out)
52추가: (record / (stage + ".stderr")).write_bytes(err)
53추가: commands.append({"stage": stage, "command": command, "exit": proc.returncode, "timeout_seconds": timeout, "timed_out": timed_out, "stdout_sha256": digest(out), "stderr_sha256": digest(err)})
54추가: write_report()
55추가: if timed_out or proc.returncode:
56추가: raise RuntimeError("첫 실패: " + stage)
57추가: return out
58추가:
59추가:
60추가: fixed = json.loads((HERE / "sources.json").read_text())
61추가: inputs = {str(ROOT / p): v["sha256"] for p, v in fixed.items()}
62추가: for line in (HERE / "SHA256SUMS").read_text().splitlines():
63추가: value, path = line.split(" ", 1)
64추가: inputs[str(ROOT / path)] = value
65추가: inputs[str(HERE / "SHA256SUMS")] = digest((HERE / "SHA256SUMS").read_bytes())
66추가: contract = json.loads((HERE / "contract.json").read_text())
67추가: report["unexecuted"] = contract["names"].copy()
68추가: try:
69추가: run("static", [sys.executable, str(HERE / "static_check.py")], 15)
70추가: manifest = str(HERE / "Cargo.toml")
71추가: output = run("compile", ["cargo", "+1.99.1", "test", "--locked", "--offline", "--manifest-path", manifest, "--test", "races", "--no-run", "--message-format=json", "--target-dir", str(record / "target")], 180)
72추가: artifacts = [json.loads(line) for line in output.splitlines() if line.startswith(b"{")]
73추가: bins = [a["executable"] for a in artifacts if a.get("reason") == "compiler-artifact" and a.get("target", {}).get("name") == "races" and a.get("executable")]
74추가: if len(bins) != 1:
75추가: raise RuntimeError("시험 binary 수 불일치")
76추가: binary = bins[0]
77추가: report["binary_sha256"] = digest(Path(binary).read_bytes())
78추가: listing = run("discovery", [binary, "--list", "--format", "terse"], 10).decode().splitlines()
79추가: if any(not line.endswith(": test") for line in listing if line.strip()):
80추가: raise RuntimeError("발견 행 형식 불일치")
81추가: names = [line[:-6] for line in listing if line.strip()]
82추가: report["discovered"] = names
83추가: if len(names) != len(set(names)) or set(names) != set(contract["names"]):
84추가: raise RuntimeError("발견 이름 집합 불일치")
85추가: for index, name in enumerate(contract["names"]):
86추가: report["active"] = name
87추가: write_report()
88추가: out = run(f"test-{index:02}", [binary, name, "--exact", "--test-threads=1", "--nocapture"], 30).decode()
89추가: expected = f"1 passed; 0 failed; 0 ignored; 0 measured; {len(names) - 1} filtered out"
90추가: if expected not in out or not re.search(r"test " + re.escape(name) + r" \.\.\. ok", out):
91추가: raise RuntimeError("실행 결과 불일치: " + name)
92추가: report["passed"].append(name)
93추가: report["unexecuted"].remove(name)
94추가: report["status"] = "passed"
95추가: except Exception as error:
96추가: report["status"] = "failed"
97추가: report["failure"] = str(error)
98추가: raise
99추가: finally:
100추가: report["inputs_unchanged"] = all(digest(Path(p).read_bytes()) == value for p, value in inputs.items())
101추가: if not report["inputs_unchanged"]:
102추가: report["status"] = "failed"
103추가: report["failure"] = "고정 입력 변경 감지"
104추가: write_report()
105추가: if not report["inputs_unchanged"]:
106추가: raise RuntimeError("고정 입력 변경 감지")
추가tests/rust-ui-memory-races/sources.json+457-0
@@ -0,0 +1,457 @@
1추가: {
2추가: "experiments/rust-ui-memory-app/Cargo.lock": {
3추가: "sha256": "d591ec67b8f1a1ea448b6bdd971e0b8c039a33a492c8f068b085bdd20b3a64ae",
4추가: "git_blob": "ac33c507896385a564b5c43c7c0ee5038b8e2777",
5추가: "git_mode": "100644"
6추가: },
7추가: "experiments/rust-ui-memory-app/Cargo.toml": {
8추가: "sha256": "7a74a5d5be456dc6d080c0dd78a25eaf8bd12ef43a3b921f26bbb7e35901040f",
9추가: "git_blob": "eb63fb6b15134eccce5223f35ee82e300ffc4d25",
10추가: "git_mode": "100644"
11추가: },
12추가: "experiments/rust-ui-memory-app/LICENSE": {
13추가: "sha256": "0714945e52a4d5b560c02c9a18478519f8c4e2572cbf87bd6d52adcfb2b63c62",
14추가: "git_blob": "5014abac33298592fd3450b51a9b414191e1aabc",
15추가: "git_mode": "100644"
16추가: },
17추가: "experiments/rust-ui-memory-app/THIRD-PARTY-NOTICES.txt": {
18추가: "sha256": "5b98107ae51806d6d4cb4337bea3b979f55070eba6dc7c0c294e13e7686ab4c6",
19추가: "git_blob": "e8bbe2fcdbd2fc0e7a7755f581c0776de54ec2d9",
20추가: "git_mode": "100644"
21추가: },
22추가: "experiments/rust-ui-memory-app/src/app.rs": {
23추가: "sha256": "1cddb84c6a8c5e4188be79220c92532351e51979d7ad0edbc0a12ac5381ed72c",
24추가: "git_blob": "715ba9d662e507ad8a11b232edcefcf86276a14a",
25추가: "git_mode": "100644"
26추가: },
27추가: "experiments/rust-ui-memory-app/src/controller.rs": {
28추가: "sha256": "51dc979b88e395c209444900511aa7d56bcc8ccc31205fca22191f25dc6468e2",
29추가: "git_blob": "2adeae347a3309f33ea6ee546565239167285747",
30추가: "git_mode": "100644"
31추가: },
32추가: "experiments/rust-ui-memory-app/src/lib.rs": {
33추가: "sha256": "58d303d44c6b8580168f14c3ceb0eb878fc7a003f197f162584286873a904ddc",
34추가: "git_blob": "0f0f5e2bcbaccb8a2ca21336e4061ae784f22c0d",
35추가: "git_mode": "100644"
36추가: },
37추가: "experiments/rust-ui-memory-app/src/runtime.rs": {
38추가: "sha256": "c1c1dde16263ea7ed4cf5808b3182e21878b8ffadfe8850974a8cbdbd4607b3f",
39추가: "git_blob": "1389c589ab7e8c54b97e170ba1f36304ef3a07e8",
40추가: "git_mode": "100644"
41추가: },
42추가: "experiments/rust-ui-memory-app/src/transport.rs": {
43추가: "sha256": "7aef227ed4424e13cfa750373a9e1f32bebae12308589c81d051f41ea84991ac",
44추가: "git_blob": "39c50acd5d1943009483f9198d3a7e0a9fe2a903",
45추가: "git_mode": "100644"
46추가: },
47추가: "tests/rust-ui-memory-app/SHA256SUMS": {
48추가: "sha256": "4896269f9fc034ee306e24a4fcbdf44b97c95798a1fbd876a0ae8a32d5d8b081",
49추가: "git_blob": "3a181927e444a8653bd0ac55ff3141faee92d2e1",
50추가: "git_mode": "100644"
51추가: },
52추가: "tests/rust-ui-memory-app/contract.json": {
53추가: "sha256": "5a9a48f08dea0d3b103a359251bde06dd82e2568be02bdb905f5b0ceb7bb6dd9",
54추가: "git_blob": "c6be500af1528649e3ee599dbd9bf0e8aa1e5e84",
55추가: "git_mode": "100644"
56추가: },
57추가: "tests/rust-ui-memory-app/dependencies.json": {
58추가: "sha256": "5ee41a973a0e976fbb6fe36d4a3fcb0ed026e638e997042a0bef8c2f238f0599",
59추가: "git_blob": "974263c30900ca5c97e430006a07188c477fb302",
60추가: "git_mode": "100644"
61추가: },
62추가: "tests/rust-ui-memory-app/dependency_audit.py": {
63추가: "sha256": "8536779d3551eb86a82f4c8b814bb26ddeaff04f992d3e080ae06321f10e3453",
64추가: "git_blob": "9f1fdd3425a79dde475b76705545f0ace4e98a74",
65추가: "git_mode": "100644"
66추가: },
67추가: "tests/rust-ui-memory-app/files.json": {
68추가: "sha256": "97c0bc5c804d85fb523da4c76abff2bec3aed3ae1e02b68db1c19792e9843808",
69추가: "git_blob": "d8a83b43bfcf0b6c056a42f4f2c54fced4af5c9a",
70추가: "git_mode": "100644"
71추가: },
72추가: "tests/rust-ui-memory-app/fixtures/payload.txt": {
73추가: "sha256": "ce7c1973b4eab97e4e49257ce4dbc5cb35c5a1eaae7c666a04b548fe1fd41dba",
74추가: "git_blob": "4420a227971404a8d65c92a95cd96868822e9082",
75추가: "git_mode": "100644"
76추가: },
77추가: "tests/rust-ui-memory-app/fixtures/sample.gz": {
78추가: "sha256": "6adcdc0775bca7b8c1ff8e41adeecf8a724f876f8b469f7f8fc611406a626e61",
79추가: "git_blob": "2c3647b19081c0fc72243f847412fbbd67c12e71",
80추가: "git_mode": "100644"
81추가: },
82추가: "tests/rust-ui-memory-app/fixtures/sample.tar": {
83추가: "sha256": "910cb4573b57fd26f122376f3f4eae0e4397163b83e32a3c850758d42f88dc55",
84추가: "git_blob": "6e3bf5fb02e4686b69d8e88be0d2f68df4c7dd0c",
85추가: "git_mode": "100644"
86추가: },
87추가: "tests/rust-ui-memory-app/license-supplement.json": {
88추가: "sha256": "09aca74cb3f20f1ed5b3e03fd647c80ef8e872f6ff97e17882cf2fda8b108b2c",
89추가: "git_blob": "4ea3c4e4af294beb1f7216252ad2892addb2153a",
90추가: "git_mode": "100644"
91추가: },
92추가: "tests/rust-ui-memory-app/reference-ui.lock": {
93추가: "sha256": "865d69b95660fefe8c9ad6129d2692cff8007ecc3d55de1a049fe162173f434d",
94추가: "git_blob": "8ece34821ead493e020bcdc07996d1a51ae94bcb",
95추가: "git_mode": "100644"
96추가: },
97추가: "tests/rust-ui-memory-app/regressions.rs": {
98추가: "sha256": "4eec2f9e036bc0fc04a1ff0af31aa28e593c185f8d1d230c8105a8fefc92fc4d",
99추가: "git_blob": "7bd471cf648854e5b8c534c4aa0658d1259f2f9f",
100추가: "git_mode": "100644"
101추가: },
102추가: "tests/rust-ui-memory-app/sources.json": {
103추가: "sha256": "f6a7b3df44869c206ff517f32653885c5fcd2f335ef4e8eff94d6ab626ca4119",
104추가: "git_blob": "fc1e788191ed5bf0f74e6b150a1f7d62e18163bc",
105추가: "git_mode": "100644"
106추가: },
107추가: "tests/rust-ui-memory-app/static_check.py": {
108추가: "sha256": "6a756de6da66731b1ea9eaaacedfbe32096bd6a918eab591a392bc45529184f5",
109추가: "git_blob": "76cf33d6efdff8113c3d2b0cab13fcc8ab3b91d7",
110추가: "git_mode": "100644"
111추가: },
112추가: "experiments/rust-app-core-memory/Cargo.lock": {
113추가: "sha256": "a96a436875a8365e5b7e8f837a02df818b400790615076b83903f12c3ad7116e",
114추가: "git_blob": "37b438af0cb4997dc0e9745e3985e77e31dbb3d0",
115추가: "git_mode": "100644"
116추가: },
117추가: "experiments/rust-app-core-memory/Cargo.toml": {
118추가: "sha256": "d47e6b080a13005dd3c195f64d42f581bbc2050062ca4396fc41e32317a76c98",
119추가: "git_blob": "625f39eb96a492a2f4673b1e9065f6331e73a3e9",
120추가: "git_mode": "100644"
121추가: },
122추가: "experiments/rust-app-core-memory/LICENSE": {
123추가: "sha256": "0714945e52a4d5b560c02c9a18478519f8c4e2572cbf87bd6d52adcfb2b63c62",
124추가: "git_blob": "5014abac33298592fd3450b51a9b414191e1aabc",
125추가: "git_mode": "100644"
126추가: },
127추가: "experiments/rust-app-core-memory/SHA256SUMS": {
128추가: "sha256": "13afa3d9bf53fd5a1c69af085842b722953dd36de1d63d305fea93bf78580b8d",
129추가: "git_blob": "526e870c3e8667de26bbb3ad408521cb33df22e9",
130추가: "git_mode": "100644"
131추가: },
132추가: "experiments/rust-app-core-memory/THIRD-PARTY-NOTICES.txt": {
133추가: "sha256": "b6ee40e53b19b59bdcc9464ecd759364264ee5ce9c320cf5616d0f656ec1df68",
134추가: "git_blob": "951447a0637ecc008123dbc2e8a8743741144d83",
135추가: "git_mode": "100644"
136추가: },
137추가: "experiments/rust-app-core-memory/contract.json": {
138추가: "sha256": "beffc5271a3355b8ef784d3d15179f4172d2af5c2dc71c1072ae4673e2971c3f",
139추가: "git_blob": "716afdb8b471ef0e5403ba9a5c4a25f9a01e70e5",
140추가: "git_mode": "100644"
141추가: },
142추가: "experiments/rust-app-core-memory/dependencies.json": {
143추가: "sha256": "39294cd19d2eb2ad02cf034e527c690348ca07492986b05000d11a053b6aa7e1",
144추가: "git_blob": "3e550f1fbc0331f27972a3cafd412d87cf11611d",
145추가: "git_mode": "100644"
146추가: },
147추가: "experiments/rust-app-core-memory/sources.json": {
148추가: "sha256": "a1d536e851130f37fb02c1269cebe8933e43fecf30403da8978e0726746ac15e",
149추가: "git_blob": "74a3dec78cc76fe45aa7822e07549ec130657604",
150추가: "git_mode": "100644"
151추가: },
152추가: "experiments/rust-app-core-memory/src/lib.rs": {
153추가: "sha256": "2540ab5f801d78f27e4d2a0a751f15378863ba5b14a4d564b3be4dc996cb7571",
154추가: "git_blob": "3bea6de7efe5657614a4747f2b071abe35de21d9",
155추가: "git_mode": "100644"
156추가: },
157추가: "experiments/rust-memory-gzip-reader/Cargo.lock": {
158추가: "sha256": "511197f27b89d37c86f82ae1e8dda4229a3e5082ede9274efe8480df6e650d24",
159추가: "git_blob": "a638f9b00ea1d76a99ccd93ea465ef9df4163c7a",
160추가: "git_mode": "100644"
161추가: },
162추가: "experiments/rust-memory-gzip-reader/Cargo.toml": {
163추가: "sha256": "ae76aededbb85cdd6c9227b4c06a1c8fef1bb7f203f1703e787b68f30ccfab6a",
164추가: "git_blob": "1b1b77e23d39cde1f05e55f73b62f68cf77dd9c6",
165추가: "git_mode": "100644"
166추가: },
167추가: "experiments/rust-memory-gzip-reader/LICENSE": {
168추가: "sha256": "0714945e52a4d5b560c02c9a18478519f8c4e2572cbf87bd6d52adcfb2b63c62",
169추가: "git_blob": "5014abac33298592fd3450b51a9b414191e1aabc",
170추가: "git_mode": "100644"
171추가: },
172추가: "experiments/rust-memory-gzip-reader/SHA256SUMS": {
173추가: "sha256": "13e41e7d8ce2442cd8d93b1229211a5257e0568acc3466d5f9ec37f03c72a736",
174추가: "git_blob": "e248c4827c2fb2e82a5e92f80deb0d744209c65c",
175추가: "git_mode": "100644"
176추가: },
177추가: "experiments/rust-memory-gzip-reader/THIRD-PARTY-NOTICES.txt": {
178추가: "sha256": "655ad3bee8c41a593c2b00cbb0a12be11e7246c41dda00319c223dd3f904910e",
179추가: "git_blob": "f56aa8d736e78465701ac62fa5ad26d4d7dc05c9",
180추가: "git_mode": "100644"
181추가: },
182추가: "experiments/rust-memory-gzip-reader/contract.json": {
183추가: "sha256": "1346c0b6f0ce5221acb9aef5067b0169e08ea6752f4db41a8b9c36b10ef9b43b",
184추가: "git_blob": "02729ca349d5629b1a9fcd7040441db2e2660065",
185추가: "git_mode": "100644"
186추가: },
187추가: "experiments/rust-memory-gzip-reader/dependencies.json": {
188추가: "sha256": "3f71220451f8cd55dafdb6e6ae901572ec7bbe1be9c93d78953b44244aec6b07",
189추가: "git_blob": "bf9da9b737d9d574d5e31fb8343f844b61e4c192",
190추가: "git_mode": "100644"
191추가: },
192추가: "experiments/rust-memory-gzip-reader/src/budget.rs": {
193추가: "sha256": "b0d0b891a048712baba2038b8439d809a0359638f390b806f88496733753d61c",
194추가: "git_blob": "0fa6fd1cdb541896540b7003168e5db71c11cb4b",
195추가: "git_mode": "100644"
196추가: },
197추가: "experiments/rust-memory-gzip-reader/src/lib.rs": {
198추가: "sha256": "a865a114fdb9d79b66226387b9f0e3fa601aad29cfe65ab443c946d6cbd74062",
199추가: "git_blob": "1811dfc7ec0917da607727e7942b5a268ac7330a",
200추가: "git_mode": "100644"
201추가: },
202추가: "experiments/rust-memory-ustar-reader/Cargo.lock": {
203추가: "sha256": "2a5d774e8cd96caa426d2d97d9c112062a57c156a026ae588932bced0af015ae",
204추가: "git_blob": "4016006d7b01deb8efebff0e1d44218a0dd4b376",
205추가: "git_mode": "100644"
206추가: },
207추가: "experiments/rust-memory-ustar-reader/Cargo.toml": {
208추가: "sha256": "08f2cb43c2f541c4420deab0c6097ce732cd7ca6e32f9895c9cbc48dc7722734",
209추가: "git_blob": "42de96e4aa4c89a243ad988fa7a7f724ff70dc01",
210추가: "git_mode": "100644"
211추가: },
212추가: "experiments/rust-memory-ustar-reader/LICENSE": {
213추가: "sha256": "0714945e52a4d5b560c02c9a18478519f8c4e2572cbf87bd6d52adcfb2b63c62",
214추가: "git_blob": "5014abac33298592fd3450b51a9b414191e1aabc",
215추가: "git_mode": "100644"
216추가: },
217추가: "experiments/rust-memory-ustar-reader/SHA256SUMS": {
218추가: "sha256": "a7cf6f6ad510173bf9ccbf0245ad20fd06cad08bcab4cc601031006e95305d28",
219추가: "git_blob": "b8868532047fb561fc9fc987b1cbbb9c8daab298",
220추가: "git_mode": "100644"
221추가: },
222추가: "experiments/rust-memory-ustar-reader/THIRD-PARTY-NOTICES.txt": {
223추가: "sha256": "e4d82397ea8ad7780bfcf97344548f2a7784e2ae6384441e54193b351bf8dad6",
224추가: "git_blob": "8540c10d9c03253ce1ed31142fe98229ab6d90cf",
225추가: "git_mode": "100644"
226추가: },
227추가: "experiments/rust-memory-ustar-reader/contract.json": {
228추가: "sha256": "21cb673b63a14af1641406d8adb20cfcfd47adfad1ce15ff3c7c2d9840077b06",
229추가: "git_blob": "8ae86c21671984209bc30973605d61327259aa16",
230추가: "git_mode": "100644"
231추가: },
232추가: "experiments/rust-memory-ustar-reader/dependencies.json": {
233추가: "sha256": "7c793eb80dbc167fddc8c0660123507fc80c6ebb763cbd06821f6b95735b9271",
234추가: "git_blob": "f9d8b8d2f82f758894ad2698c50107b2341fb183",
235추가: "git_mode": "100644"
236추가: },
237추가: "experiments/rust-memory-ustar-reader/src/budget.rs": {
238추가: "sha256": "5d511a2519ed26e0fa8fb84b2d8cc0479679e9c3b5815a3c0e20790a283c923e",
239추가: "git_blob": "1eab0733b90b66fc12b5db2931fb7dcb08d80c13",
240추가: "git_mode": "100644"
241추가: },
242추가: "experiments/rust-memory-ustar-reader/src/header.rs": {
243추가: "sha256": "263c2a610d522c0f5bf24ceef14be184735b4858a40277963252bae439d4112e",
244추가: "git_blob": "d278d372076b40715c6f73e1f0c67b54293566ca",
245추가: "git_mode": "100644"
246추가: },
247추가: "experiments/rust-memory-ustar-reader/src/lib.rs": {
248추가: "sha256": "9b57f771c1d89ffc74aea604d7f3476202ad62914c91a5246802706294e5bfcd",
249추가: "git_blob": "ce8e3b751a53a66f5d0cfaab15ffdeea92fae98f",
250추가: "git_mode": "100644"
251추가: },
252추가: "experiments/rust-memory-zip-create/Cargo.lock": {
253추가: "sha256": "bb094be9b047cc7a9100492e1e7aa69ddbbc2a3d8bf2c4e8eaa49024160fd2c3",
254추가: "git_blob": "aed6fe07391fce292edebb5206f98a617d2c4376",
255추가: "git_mode": "100644"
256추가: },
257추가: "experiments/rust-memory-zip-create/Cargo.toml": {
258추가: "sha256": "c8483ab032ce94e35ba84b56a4b127e669358f7e9f9b945b3ba60b472ab87b0e",
259추가: "git_blob": "899e96fbbd98053ff521d7f29aa2b682fccafb08",
260추가: "git_mode": "100644"
261추가: },
262추가: "experiments/rust-memory-zip-create/SHA256SUMS": {
263추가: "sha256": "c4d5651a956429a97e830906c132b537dca6e1c7c491f8148cbdd27d1cb63469",
264추가: "git_blob": "b6738fe846fa737f5cacd53147a1492e917b73d5",
265추가: "git_mode": "100644"
266추가: },
267추가: "experiments/rust-memory-zip-create/contract.json": {
268추가: "sha256": "d3fc6cc43fa7f70f0a6cfb5e441348a3c011dac8d8e08b3061c0df5fce8e9206",
269추가: "git_blob": "6be643ca9603b688f705eae172bb276d4afff35a",
270추가: "git_mode": "100644"
271추가: },
272추가: "experiments/rust-memory-zip-create/src/lib.rs": {
273추가: "sha256": "3b2019fd963600155fd4dc01f55fef7f3e5c8ceec944a36597de984d5a8b7e8b",
274추가: "git_blob": "08cea1778ec21e4403f752901de9bfc7fa1ee8c9",
275추가: "git_mode": "100644"
276추가: },
277추가: "experiments/rust-memory-zip-create/src/storage.rs": {
278추가: "sha256": "1f81f5b1830eaf5f5e5e510841e10f3dd692f6d310a1871ce46fe4445dff9706",
279추가: "git_blob": "1b61dd18f5e41e86ffdde752fc6ebc828a2c1b8c",
280추가: "git_mode": "100644"
281추가: },
282추가: "tests/rust-memory-gzip-reader/Cargo.lock": {
283추가: "sha256": "5932825be6b65fda2dc957a18992db63673e6eecdd55853fb743c133f359262c",
284추가: "git_blob": "46a7653b949febc573a3429aa7811b8c34508dc6",
285추가: "git_mode": "100644"
286추가: },
287추가: "tests/rust-memory-gzip-reader/Cargo.toml": {
288추가: "sha256": "2e8476195852aaec340015755ecb37ef8fa65d5ba375f8c7a60e3b8d0643ed1e",
289추가: "git_blob": "b803e4a1c2495736b3758e4d993e40a86ef7f50d",
290추가: "git_mode": "100644"
291추가: },
292추가: "tests/rust-memory-gzip-reader/SHA256SUMS": {
293추가: "sha256": "1633895d78cca4c38f63c6efdf164d2c2d5ca1561c7eeb87dc5144159f05fd77",
294추가: "git_blob": "cb0292aab9f320eca2fd4b3395c10f84ca898ff6",
295추가: "git_mode": "100644"
296추가: },
297추가: "tests/rust-memory-gzip-reader/budgets.rs": {
298추가: "sha256": "d1b5132d656d514d73ac0f510991fab70d0c8783b9a10bf6314149a6d7a3649c",
299추가: "git_blob": "0ec6e8818c277600841f4f37d069a5acce1c306e",
300추가: "git_mode": "100644"
301추가: },
302추가: "tests/rust-memory-gzip-reader/checkpoints.rs": {
303추가: "sha256": "6e995ed0edf29c0b4f513ddb0a9e56b427cefbd58e78351674ad0e4ee490de74",
304추가: "git_blob": "5fa98cc9affaa4554562308663716ea5b2841636",
305추가: "git_mode": "100644"
306추가: },
307추가: "tests/rust-memory-gzip-reader/contract.json": {
308추가: "sha256": "aa6640e76fd821168afe6e78ae6f29aed27514a4100b5abab8054625d7aef79b",
309추가: "git_blob": "c6d4feae43bd9e67ffd1009b3b0dff653f7952ff",
310추가: "git_mode": "100644"
311추가: },
312추가: "tests/rust-memory-gzip-reader/fixtures.hex": {
313추가: "sha256": "e0768b8c44a7e6586bc423eea561da49eecbf5114130d88992b2c6c5893ae355",
314추가: "git_blob": "80e41d988d8d13c45b54d640468ca4939e84d7fa",
315추가: "git_mode": "100644"
316추가: },
317추가: "tests/rust-memory-gzip-reader/fixtures.json": {
318추가: "sha256": "329cbac0a9b5b064ef1db4c59d83860c97a6d2819e4659405b75e17bdc82b45d",
319추가: "git_blob": "d52a90d943151d7ba2c9dc1da76addccd661e4e4",
320추가: "git_mode": "100644"
321추가: },
322추가: "tests/rust-memory-gzip-reader/format.rs": {
323추가: "sha256": "b5a6c624e9911aa4e818612cc7a868a43313ee1e1c63b6352b8410ed896154c5",
324추가: "git_blob": "302adf4151f5f5c8100133eab82ad6f5e72003d5",
325추가: "git_mode": "100644"
326추가: },
327추가: "tests/rust-memory-gzip-reader/generate_fixtures.py": {
328추가: "sha256": "1cde1dd2f913820f77458e5accfcdb91aec5a1319e3c0fb2d91fd7e385690831",
329추가: "git_blob": "e48f324c331e429312c434761b1f40920957ca0d",
330추가: "git_mode": "100644"
331추가: },
332추가: "tests/rust-memory-gzip-reader/main.rs": {
333추가: "sha256": "036865bd2661062ea59d84362fdd747d9ce79d9b78400f12be3bea7703466020",
334추가: "git_blob": "de62741b5834c691c67a0a606417237d3a45108b",
335추가: "git_mode": "100644"
336추가: },
337추가: "tests/rust-memory-gzip-reader/static_check.py": {
338추가: "sha256": "c37887322e014c6b96c71f0e979856a2be88713af57462e4436697ee7034407e",
339추가: "git_blob": "74f7ca66d71692e7bec4f690ab6595d5344b0dfb",
340추가: "git_mode": "100644"
341추가: },
342추가: "tests/rust-memory-gzip-reader/static_check_helper_tests.py": {
343추가: "sha256": "de4908b609ddb6789777901875ea224f962a9f96e9f17cd85765bb05d8231beb",
344추가: "git_blob": "e5ab9c60a4107c6ed21995f35d4b2a695de86e1d",
345추가: "git_mode": "100644"
346추가: },
347추가: "tests/rust-memory-gzip-reader/support.rs": {
348추가: "sha256": "a4d39c7b9b9270eb31fb3e73d9ebd57c9ba78a99b73851944bdd4d645e8d5fc5",
349추가: "git_blob": "b0a0bd05bc3f7d331fad375cbb0d0eddbd825b48",
350추가: "git_mode": "100644"
351추가: },
352추가: "tests/rust-memory-ustar-reader/Cargo.lock": {
353추가: "sha256": "6e4cce2848f1e4b120b28722fb73956dca7f759419029e299b6c09acc1e0dfc5",
354추가: "git_blob": "62a03ba78153130ca889b63c7be046264f8ede1f",
355추가: "git_mode": "100644"
356추가: },
357추가: "tests/rust-memory-ustar-reader/Cargo.toml": {
358추가: "sha256": "5a7e53d47ff3c08b5531ed1fed5e574d917ed5b7f8af0a52c8de401ca6bcb792",
359추가: "git_blob": "1dc8fe5f69638e504c6f88a4ba4f1562b285f39f",
360추가: "git_mode": "100644"
361추가: },
362추가: "tests/rust-memory-ustar-reader/SHA256SUMS": {
363추가: "sha256": "5740d93c2429dc81f9859c6fe29fdac9cf417f8783c07029a1f28a1f3a4d37fe",
364추가: "git_blob": "0093ed9578bab969ea69bb332d36fb5d980c4846",
365추가: "git_mode": "100644"
366추가: },
367추가: "tests/rust-memory-ustar-reader/budget.rs": {
368추가: "sha256": "c3d80703b31a3e9712509168b0b1d947b985918d40aac6dfa8e4f4c0f31569f3",
369추가: "git_blob": "60ccf1de5f9f17ec0ad9e569fbe167241ea2472d",
370추가: "git_mode": "100644"
371추가: },
372추가: "tests/rust-memory-ustar-reader/callbacks.rs": {
373추가: "sha256": "fe9f476dbee65e044adc3edd8f58c7a5183ec92b6802e05a0ac010319e0170f4",
374추가: "git_blob": "3676cc4adda6596d4ea6d14741e70268bded1356",
375추가: "git_mode": "100644"
376추가: },
377추가: "tests/rust-memory-ustar-reader/contract.json": {
378추가: "sha256": "a4e4eb34896295b85dacc22dfa9344eba12854d912e20fc83c7f788b83bbbef9",
379추가: "git_blob": "08b8b17997818ee2685149f2cc0781cf2da1982a",
380추가: "git_mode": "100644"
381추가: },
382추가: "tests/rust-memory-ustar-reader/format.rs": {
383추가: "sha256": "40934ec14e2e30994170118dbf9350c29a28ef9ae65aa4b10748216a35314c8b",
384추가: "git_blob": "80eecfd680669804add50ea14195eacd21de3a3e",
385추가: "git_mode": "100644"
386추가: },
387추가: "tests/rust-memory-ustar-reader/main.rs": {
388추가: "sha256": "50714865d7b6e53e0419ca0e26536f62237117b743dc98097912fe453d78c558",
389추가: "git_blob": "b993568c08adcfd0be8648108432e3e3219961dd",
390추가: "git_mode": "100644"
391추가: },
392추가: "tests/rust-memory-ustar-reader/names.rs": {
393추가: "sha256": "2611bfd6b8ca37bccb6110fbc954b15e810741d453edd6349efc0cdb114180c2",
394추가: "git_blob": "89c9df6bf935b7084aa24fedd3cd6ccf18307b23",
395추가: "git_mode": "100644"
396추가: },
397추가: "tests/rust-memory-ustar-reader/selection.rs": {
398추가: "sha256": "b62dc7bbefee258dd110632aeff9140d512fb881a7d5edc7054ca31784cd6d99",
399추가: "git_blob": "e35f28c7c7897bda7270ad4a9f9bb925fd8d2c8e",
400추가: "git_mode": "100644"
401추가: },
402추가: "tests/rust-memory-ustar-reader/static_check.py": {
403추가: "sha256": "e0d113edb4b150be4a5ecb1abb055fab91218461bc168bbf9787041c4fe2f09e",
404추가: "git_blob": "ebeb48b3c016a57b0e883a4de409c99800a6b2f0",
405추가: "git_mode": "100644"
406추가: },
407추가: "tests/rust-memory-ustar-reader/support.rs": {
408추가: "sha256": "6c30a2c7ce9598f9e89d0f28b6a0512d1abb10462b1777a8c9042f9591c2bae7",
409추가: "git_blob": "a280942626fab1e193d3d6ed8ca87d139c9b1d4e",
410추가: "git_mode": "100644"
411추가: },
412추가: "tests/rust-memory-zip-create/SHA256SUMS": {
413추가: "sha256": "be63110eb2df851d26a7a6c929d4b0d6c1c1f7d0ddff47de2e3034350fc48b00",
414추가: "git_blob": "b3fa66b24d8878f42a324df91440f7845dd88aa5",
415추가: "git_mode": "100644"
416추가: },
417추가: "tests/rust-memory-zip-create/api.rs": {
418추가: "sha256": "69239e5ef0c9d78fa5db14ef45cfcc49b8be79ffd68402d98d61173282377ad5",
419추가: "git_blob": "7f8ff939763613aa35c226e5884085a6965e8c6e",
420추가: "git_mode": "100644"
421추가: },
422추가: "tests/rust-memory-zip-create/contract.json": {
423추가: "sha256": "68ad1c93c78a73bcbecfc5413cdfcabbd70142daf5bc0ac33640e0975b4bfd21",
424추가: "git_blob": "9d154572a4f76db6ee702d70c7f39923f7af21ff",
425추가: "git_mode": "100644"
426추가: },
427추가: "tests/rust-memory-zip-create/lifecycle.rs": {
428추가: "sha256": "ddb80e1ad74197fe5fd57356a1ff918ee60eeea442eb1997a585d1f9afb9bbc0",
429추가: "git_blob": "09c271403d06557cf98151929e538ee22dc43921",
430추가: "git_mode": "100644"
431추가: },
432추가: "tests/rust-memory-zip-create/limits.rs": {
433추가: "sha256": "2abd7c04fb7e1b614179d38f9f865e655c8468df3002069c8058f3e84bb1b4e5",
434추가: "git_blob": "727b74081ebe164942a2a570c5cfa7c18e96d313",
435추가: "git_mode": "100644"
436추가: },
437추가: "tests/rust-memory-zip-create/names.rs": {
438추가: "sha256": "dcd350774e6c597401f70de3bbf32be7f37187ecc6adf3260698346226ee1f11",
439추가: "git_blob": "7545050d770bb62be53cbd492d2f5d901065fb5f",
440추가: "git_mode": "100644"
441추가: },
442추가: "tests/rust-memory-zip-create/roundtrip.rs": {
443추가: "sha256": "6e9688326e9e31bb8cdedc013bd03d1d656ac3067e341f69d62ba5abed21c21a",
444추가: "git_blob": "ed0cc4a0aa775c65215cd5f3671b6932ab927094",
445추가: "git_mode": "100644"
446추가: },
447추가: "tests/rust-memory-zip-create/storage.rs": {
448추가: "sha256": "76a63e576d5db521d3b2af179a1251681ddbac5a2f7a62b3015eb75adcda0ee2",
449추가: "git_blob": "08aefae839d9ede99396062e17d670d8b8ee3efe",
450추가: "git_mode": "100644"
451추가: },
452추가: "tests/rust-memory-zip-create/support.rs": {
453추가: "sha256": "971bdf33eb3e7d5ea64293fd70063e166019a47a229f3900fdcd416af8cdccb5",
454추가: "git_blob": "a1bba5fd57e8edbe29df6d13c7597583a9e4c3cc",
455추가: "git_mode": "100644"
456추가: }
457추가: }
추가tests/rust-ui-memory-races/static_check.py+60-0
@@ -0,0 +1,60 @@
1추가: import hashlib
2추가: import json
3추가: import os
4추가: from pathlib import Path
5추가: import re
6추가: import sys
7추가: import tomllib
8추가:
9추가: if sys.flags.optimize or os.environ.get("PYTHONOPTIMIZE"):
10추가: raise SystemExit("정상 Python mode 필요")
11추가: HERE = Path(__file__).resolve().parent
12추가: ROOT = HERE.parents[1]
13추가:
14추가:
15추가: def require(condition, message):
16추가: if not condition:
17추가: raise SystemExit(message)
18추가:
19추가:
20추가: def sha(path):
21추가: return hashlib.sha256(path.read_bytes()).hexdigest()
22추가:
23추가:
24추가: def check():
25추가: contract = json.loads((HERE / "contract.json").read_text())
26추가: names = re.findall(r"#\[test\]\s*fn\s+(\w+)\s*\(", (HERE / "races.rs").read_text())
27추가: require(names == contract["names"] and len(names) == len(set(names)), "이름/중복 불일치")
28추가: old = json.loads((ROOT / "tests/rust-ui-memory-app/contract.json").read_text())["validation"]["names"]
29추가: require(not set(old).intersection(names), "기존 이름 중복")
30추가: for path, record in json.loads((HERE / "sources.json").read_text()).items():
31추가: data = (ROOT / path).read_bytes()
32추가: require(sha(ROOT / path) == record["sha256"], "고정 source hash 불일치: " + path)
33추가: blob = hashlib.sha1(b"blob " + str(len(data)).encode() + b"\0" + data).hexdigest()
34추가: require(blob == record["git_blob"], "고정 blob 불일치: " + path)
35추가: lines = (HERE / "SHA256SUMS").read_text().splitlines()
36추가: listed = []
37추가: for line in lines:
38추가: digest, path = line.split(" ", 1)
39추가: require(path.startswith("tests/rust-ui-memory-races/"), "manifest 경로 이탈")
40추가: require(sha(ROOT / path) == digest, "후보 hash 불일치: " + path)
41추가: listed.append(path)
42추가: require(len(listed) == len(set(listed)), "manifest 중복")
43추가: require(sorted(listed) == sorted("tests/rust-ui-memory-races/" + n for n in contract["files"] if n != "SHA256SUMS"), "manifest 파일 집합 불일치")
44추가: assembly = (HERE / "assembly.rs").read_text()
45추가: require(assembly.count("include!(") == 3, "원본 include 수 불일치")
46추가: for source in ["runtime", "controller", "transport"]:
47추가: require(f'include!("../../experiments/rust-ui-memory-app/src/{source}.rs");' in assembly, "고정 include 누락")
48추가: for token in ["impl Controller", "impl Task", "impl Drop", "unsafe", "thread::sleep", "Barrier::"]:
49추가: require(token not in assembly + (HERE / "races.rs").read_text().replace("#![forbid(unsafe_code)]", ""), "허용되지 않은 대체/대기: " + token)
50추가: manifest = tomllib.loads((HERE / "Cargo.toml").read_text())
51추가: require(set(manifest["dependencies"]) == {"core_memory"}, "직접 dependency 추가")
52추가: original = tomllib.loads((ROOT / "experiments/rust-app-core-memory/Cargo.lock").read_text())["package"]
53추가: candidate = tomllib.loads((HERE / "Cargo.lock").read_text())["package"]
54추가: expected_root = {"name": "zipelo-ui-memory-races", "version": "0.1.0", "dependencies": ["zipelo-app-core-memory"]}
55추가: require(sorted(candidate, key=lambda p: p["name"]) == sorted(original + [expected_root], key=lambda p: p["name"]), "원본 lock 외 package 변경")
56추가: print(json.dumps({"declared": len(names), "fixed_inputs": len(json.loads((HERE / "sources.json").read_text())), "new_external_packages": 0, "compiled": False, "executed": False}))
57추가:
58추가:
59추가: if __name__ == "__main__":
60추가: check()