Repository navigation
Fix the purpose origin wire value and pin snapshot enums - #125
Merged
Merged
Conversation
The core serialized a PullRequestTitle purpose origin as pull_request_title while the shell decoded pr_title, so a checkout whose purpose fell back to its pull request title failed the whole snapshot decode and the shell froze on its last good frame. Fix the Swift value and pin every string enum the core emits into the snapshot in contracts/snapshot-wire-enums.json: model.rs tests that each variant emits the listed value, SnapshotWireEnumTests that each listed value decodes and that no Swift case is unpinned.
A snapshot decode failure repeats on every core notification, and each repeat assigned the same bridgeError string, which republished the bridge and rebuilt every view observing it at the notification rate (about 60 times a second in the run that found it). Route every bridgeError write through one change-only publisher. The generic DecodingError text named no field; describe the coding path and the offending value so the status line says which wire value the two sides disagree on, and record it once in the launch trace.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Snapshot decode failed가 고정되고 새 pane이 열리지 않으며 전체가 느려지는 문제를 고칩니다.PullRequestTitleorigin을pull_request_title로 내보내고, 셸은pr_title만 알았습니다 (Redesign checkout rows and persist purpose #122 이후).contracts/snapshot-wire-enums.json에 고정해 양쪽 suite가 검사합니다.bridgeError문자열을 다시 publish해 셸 전체를 초당 약 60회 재구성했습니다. 변경이 있을 때만 publish하고, 메시지에 coding path와 값을 담습니다.Review
contracts/에 두고 Rust·Swift 테스트가 같은 파일을 읽는 방식이 맞는지 (Herdr API 계약과 같은 자리).macos/Sources/HerdrMacOS/CoreBridge.swift- snapshot wire 채널의 failure path.bridgeError쓰기 18곳이 change-only publisher 하나로 모였고, 두 곳은??체인이 인자 안으로 들어갔습니다.herdr-core/src/model.rs- 테스트만 추가. 각 enum의 variant 목록은 exhaustivematch로 묶여 있어 variant 추가 시 컴파일이 먼저 실패합니다.Evidence
DecodingError.dataCorrupted경로rest.navigator.workspaces[0].checkouts[4].purpose.origin, 값pull_request_title을 읽었습니다.reopen_closed.window_menu.installed가 1,236회(= core objectWillChange 횟수),core.snapshot.refresh는 0회였습니다.wire_enum_tests는 계약을pr_title로 바꾸면 실패하고, SwiftSnapshotWireEnumTests는 셸 값을pr_title로 되돌리면 두 테스트 모두 실패합니다 (mutation 후 원복).verify-cargo.sh lint,verify-cargo.sh test -p herdr-core --lib624 passed,verify-swift.sh test533 passed, design contract PASS.AI tooling: 대부분 AI 도구. lldb 출력, 두 suite의 mutation 실패, 계약 파일의 값을 손으로 대조했습니다.