team-ljyzipelo

공개

취소 요청 후 콜백 오류 우선순위 회귀 추가

작성자
코노모리 카논
작성 시각
커밋
6e6e70617d5ed2ce9c063ffffc646ddca4a19051
부모
af97600
이 시점의 파일 보기

변경된 파일 3개

+49-6
수정tests/rust-app-core-memory/SHA256SUMS+2-2
@@ -1,12 +1,12 @@
11826f70fed9059b00ab3a1d23b49fec38575a859c1a3a057cbf76d7adb6927677 Cargo.lock
22016b3cebb4c5f1e675aad9900092ad0a948f4cd568e0162ed04ff8ff53b32430 Cargo.toml
3삭제: a14ea78a83871171b27b8981c91ef2dd6da279a4d3f92a46f74a4871347000e6 contract.json
3추가: 00f12da8ad1a62ae0095056b9ed2884f54f23dda3c79d26e5890461a1bc5db2a contract.json
441e7923b1880621aa408a5adb248348a7e5765c6acf19118a458255be75ef0544 control.rs
55c2c9f8f2a077ff22fce09c3b9ff4ebefb0627a031e68fd7b1523a93315c3e922 delivery.rs
66b57d63624622ad0d17a0902a48bf9a514d1cb67be99d87d831bca4984d485e37 fixtures.hex
77a1201119b4e74c9466affe0907025ae04ca24afb5d08aa55540fc42385cfe400 fixtures.json
88203566ae81a254f4006924b74a3433a18b465950e5f1c9acb69e807809643534 generate_fixtures.py
9삭제: 570c70bdb5108d3439dee213fe4bb761005df15aaade59078e989940b3ab53aa gzip.rs
9추가: 7f26dade709fd7b598739b6e01f56a619a481af6a1c10df881be04d3f5306b60 gzip.rs
101001282aa60ebb5137faf467ed81f28739c885b44563be57e37cf09a329a323062 main.rs
11114e2eeaa88b5c592fa9ec936e5b6cd8834c4685fc2104217b177620b1caec7cc6 send.rs
1212a4b736c8b126141a8dafde4a57bd3513cc158a43c2f55a532a66780f6872a0f9 source-pins.json
수정tests/rust-app-core-memory/contract.json+5-4
@@ -3,7 +3,7 @@
33 "source_head": "23b8d1c615f24f42469138fcc63e7fce7cda4f24",
44 "source_manifest_sha256": "13afa3d9bf53fd5a1c69af085842b722953dd36de1d63d305fea93bf78580b8d",
55 "scope": "실제 app-core와 세 원본 library의 공개 API 회귀 소스임. 생산 코드 복사, hook, 외부 의존성 추가 없음",
6삭제: "declared_test_count": 66,
6추가: "declared_test_count": 67,
77 "test_names": [
88 "control::cancellation_is_shared_monotonic_and_operation_local",
99 "control::ids_are_nonzero_distinct_and_bound_to_handles",
@@ -30,6 +30,7 @@
3030 "gzip::late_cancel_does_not_rewrite_error_snapshot",
3131 "gzip::late_cancel_does_not_rewrite_success_snapshot",
3232 "gzip::observer_cancel_is_not_flag_forwarding",
33추가: "gzip::observer_cancel_then_callback_error_preserves_original_at_final_checkpoint",
3334 "gzip::observer_deadline_beats_requested_cancel_and_stays_budget",
3435 "gzip::observer_requests_cancel_after_output_and_discards_result",
3536 "gzip::pre_requested_cancel_still_delivers_start_and_forwards",
@@ -79,13 +80,13 @@
7980 "success": "GZip Boundary/선택 bytes/누적 Usage, USTAR 목록/선택 bytes/입력 hash/Usage/ContentVerification::Unavailable, ZIP Stored/Deflate native 결과 일치",
8081 "ownership": "Terminal -> MemoryValidated -> native 소유값 이동 시 기존 payload allocation 주소와 bytes를 확인함. 원본 타입을 복사한 대체 구현을 사용하지 않음",
8182 "errors": "원래 Reader/Backend/Callback/Selection 변형과 boxed E 주소 보존, ZIP 기존 Failure 원형 보존. 실패 Terminal에는 완료 payload 없음",
82삭제: "cancellation": "요청 전, observer 요청, observer Cancelled/Deadline/E 우선, 최종 checkpoint 취소, 완료 또는 오류 후 늦은 요청, USTAR selection 오류와 requested=true 공존",
83추가: "cancellation": "요청 전, observer 요청, observer Cancelled/Deadline/E 우선, 최종 checkpoint 취소, 완료 또는 오류 후 늦은 요청, USTAR selection 오류와 requested=true 공존, GZip 최종 observer 안에서 취소 요청 후 원래 Callback(E) 반환 우선순위",
8384 "delivery": "실제 Operation이 낸 Event/Terminal만 수집함. 전체 순번, stale 우선 제외, 중복/역전/누락 sticky fault, terminal 뒤 거부 및 호출자 측 미적용 검증",
8485 "send": "선택한 소유 Marker: Send와 요청/Operation/Cancellation/Event/Terminal/MemoryValidated의 assert_send 컴파일 요구를 1개 선언에 포함함. 아직 컴파일하지 않음"
8586 },
8687 "limits": [
8788 "ID/sequence overflow는 공개 주입 수단이 없으며 동적 도달/통과 수에 포함하지 않음",
88삭제: "마지막 checkpoint와 Terminal 생성 사이의 취소 경쟁을 결정적으로 주입할 수 없어 해당 짧은 창의 success+requested=true 조합은 미검증임. 완료 후 늦은 취소로 성공 snapshot을 보존하는 시험과 selection 오류+requested=true 시험을 구분함",
89추가: "마지막 checkpoint와 Terminal 생성 사이의 취소 경쟁을 결정적으로 주입할 수 없어 해당 짧은 창의 success+requested=true 조합은 미검증임. 완료 후 늦은 취소로 성공 snapshot을 보존하는 시험과 selection 오류+requested=true 시험을 구분함 GZip 최종 observer 내부의 취소 요청과 callback 오류는 동시성 창과 별개인 결정적 공개 API 사례로 작성함",
8990 "선택한 E: Send의 양성 컴파일 요구만 작성함. !Send E 지원/거부를 증명하지 않음. thread::spawn의 이동값과 callback 캡처에는 별도 Send + 'static 요건이 있으며 실제 thread 실행 없음",
9091 "ZIP final Usage는 native API에 없어 생성하지 않음. ZIP native 출력 비교는 독립 codec/round-trip 검증이 아님",
9192 "USTAR 내용 무결성 보장은 추가하지 않음. ProcessCleanup::NotApplicable은 OS 정리/게시/전역 panic 또는 OOM 회수 증거가 아님",
@@ -113,7 +114,7 @@
113114 ]
114115 }
115116 ],
116삭제: "counting": "기존 모듈 결과는 원래 head 이력이며 새 66개 선언/통과 수에 합산하지 않음. 내부 assertion과 9개 Python helper 시험도 별도임",
117추가: "counting": "기존 모듈 결과는 원래 head 이력이며 새 67개 선언/통과 수에 합산하지 않음. 내부 assertion과 9개 Python helper 시험도 별도임",
117118 "validation": {
118119 "phase": "source/static only",
119120 "allowed": [
수정tests/rust-app-core-memory/gzip.rs+42-0
@@ -357,3 +357,45 @@ fn zero_output_limit_allows_unselected_and_rejects_selected() {
357357 );
358358 assert_eq!(selected.usage().output, 0);
359359}
360추가:
361추가: #[test]
362추가: fn observer_cancel_then_callback_error_preserves_original_at_final_checkpoint() {
363추가: let (operation, cancel) = Operation::start().unwrap();
364추가: let mut marker = Some(Marker(Box::from(*b"original")));
365추가: let pointer = marker.as_ref().unwrap().0.as_ptr();
366추가: let mut budget = budget();
367추가: let mut events = Vec::new();
368추가: let terminal = operation.gzip(gzip_request("gzip_digits", true), &mut budget, |event| {
369추가: let at_final = event.checkpoint.stage == Stage::BeforeReturn;
370추가: events.push(event);
371추가: if at_final {
372추가: assert!(!cancel.is_requested());
373추가: assert!(cancel.request());
374추가: Err(Stop::Callback(marker.take().unwrap()))
375추가: } else {
376추가: Ok(())
377추가: }
378추가: });
379추가: assert!(marker.is_none());
380추가: assert_eq!(events.last().unwrap().checkpoint.stage, Stage::BeforeReturn);
381추가: assert_stream(&events, &terminal, Policy::GzipSingleMemberV1);
382추가: assert!(terminal.cancellation_requested());
383추가: assert!(!terminal.cancellation_forwarded());
384추가: assert_eq!(
385추가: budget.usage(),
386추가: Usage {
387추가: processed: 38,
388추가: output: 9,
389추가: metadata: 10
390추가: }
391추가: );
392추가: let failure = terminal.into_result().unwrap_err();
393추가: assert_eq!(failure.adapter, None);
394추가: match failure.native.unwrap() {
395추가: Error::Callback(marker) => {
396추가: assert_eq!(marker.0.as_ptr(), pointer);
397추가: assert_eq!(&*marker.0, b"original");
398추가: }
399추가: other => panic!("{other:?}"),
400추가: }
401추가: }