Skip to content

#31 후속: 승인 파일 경계 사례와 UX 정리 #35

Backlog

Description

@lseongjoo

#31(PR #34, 병합 28ae9e8) 검토에서 [후속]으로 분류한 항목입니다. 17차에서 두 검토자 모두 병합에 동의했고, 남은 [차단]은 없습니다.

B. 알려진 한계 (파일 잠금 필요)

  1. 변경 확인과 rename 사이에 원본이 사라지면 대체 파일에 거부가 확정되고, 원본이 복원되면 거부가 풀릴 수 있습니다.
  2. 에이전트 앱별 독립 연결과 승인 관리 #13 빌드는 잠금 없이 동시에 씁니다. 지금은 파일이 분리되어 서로 영향이 없습니다.

C. 이전 차수 [후속]

  1. (Codex, 중간) 승인 파일을 일시적으로 읽지 못하면 닫은 대본의 중복 방지 기록(receiptKeys)이 지워져, 같은 대본이 다시 열릴 수 있습니다.
  2. (Codex, 중간) 파일이 없는 동안 앱을 종료하면 대기 중인 전체 끄기가 사라집니다(재시작 시 .auto, 승인 목록은 비어 있음).
  3. (Codex, 낮음) 실제로 저장된 뒤에도 미저장 안내가 남습니다. receive()의 status = ""가 안내를 지우는 경로도 있습니다.
  4. (Antigravity, 낮음) 미저장 거부가 있는 채 파일이 없으면 확인할 때마다 external_change 채택이 반복됩니다.
  5. (Antigravity, 낮음) 읽기 불가 파일을 교체한 직후 재읽기가 불일치하면 읽기 불가 안내가 남습니다.
  6. 파일 삭제 직후 클릭의 비대칭(전체 끄기와 앱별 끄기).
  7. 외부에서 앱별 받기를 다시 켜도 살아 있는 바인딩에 반영되지 않습니다.
  8. 메뉴 액션이 경고를 표시하지 않습니다.
  9. 비소유 창의 끄기·철회 버튼이 활성 상태이고, 메뉴바에 거절 피드백이 없습니다.
  10. 복합 잠금: 초기 조회와 관찰자 등록 사이의 전환, 해제 알림 누락 시 재조회, 다중 사유 테스트.
  11. 상태 확인과 실제 전송(receive/share) 사이의 정책 교체.
  12. stamp에 st_dev가 없습니다. 삭제를 관측해 끊은 peer가 같은 프로세스인 동안 차단된 채로 남습니다.
  13. 최초의 빈 on 파일이 쓰기 직후 삭제되면 상태 표시가 맞지 않습니다.
  14. pending 64 상한에서 중복 키의 순서.
  15. 탭의 두 검사 사이에 외부 off가 들어오면, 의도적인 자동 켜기 거절을 저장 실패로 표시합니다.
  16. 받기가 꺼진 동안 미승인 앱의 승인 요청이 쌓이고, 만료된 뒤 다시 노출됩니다.
  17. 백그라운드 시도가 stateLock을 잡는 동안 ping이 기다립니다.
  18. 해시가 다른 도우미가 오래 재시도합니다(최대 약 6분 간격).
  19. fixture가 시도 횟수를 직접 세지 않고(로그로만 확인), disconnect·forget·disable의 저장 조건도 검증하지 않습니다.

Activity

  1. lseongjoo commented on Nov 28, 2026

    @lseongjoo
    ContributorAuthor

    More non-blocking follow-ups from the #33 promotion fixes (PR #39, review rounds 18–25):

    P-04 fixtures

    • run_local_draft_candidate: the 1.5 s empty-list observation window may miss a helper request that is retried later.
    • run_speech_socket_log: log matching is skipped under sandbox-exec (log refuses to run there), and the logged pid is not matched against the sender.

    Near the 256 KiB read limit (thousands of revocations)

    • The read limit itself: past it, the revocations that don't fit stay in effect only for the current run.
    • The two-restore test does not directly cover a key that is dropped from disk and later rewritten.
    • There is no direct test for skipping an identical-content write.
    • For an "off" file of exactly 256 KiB, turning receipt on after the file becomes unreadable fails closed, because off→auto adds 1 byte.

    Generated by Claude Code

  2. lseongjoo commented on Nov 28, 2026

    @lseongjoo
    ContributorAuthor

    Follow-ups from the #31 round-3 promotion (PRs #41/#42, integration/issue-4 d271b4b):

    1. Near-limit trade-off (Codex round-29 dissent). Two app-written backups each have room left. Merging them on restore can put the trust file at exactly the hard limit, because revocations seen saved earlier are kept up to the limit. A later per-app receipt-off then drops the oldest row-less revocation. An older backup that still has that key's row could then bring the approval back.
      • The same competition between one denial and one saved revocation exists for an external file at or within 1 KiB of the limit.
      • It needs about 240k revocations at the 16 MiB default, plus a restore.
      • Options: keep a separate compact tombstone store, or refuse the receipt-off write and keep it in memory and pending instead.
    2. Antigravity note. Turning receipt on while the file is unreadable clears the clients. If revocations then pile up and an older backup with clients is restored, the same boundary is reached.
    3. P-04 (Codex): follow-up as classified in round 28.

    Generated by Claude Code

  3. lseongjoo commented on Nov 28, 2026

    @lseongjoo
    ContributorAuthor

    사용자 방침: 철회 이력은 분석용 로그 수준으로만 (승격 자문 3/3 P3-01 관련)

    사용자 방침(2026-11-28, 프로젝트 대화): 연결 허용·취소 기록은 문제를 분석하려고 로그 정도로 남기는 것이고, 많이 기록할 필요가 없다.

    현재 d271b4b는 철회 목록을 신뢰 판단 데이터로 쓰고 최대 16 MiB(약 24만 건)까지 쌓는다. 그래서 상한 근처에서 받기 끄기와 저장된 철회가 같은 바이트를 두고 다투는 절충(PR #33 승격 자문 3/3, Codex P3-01)이 생긴다. 아래처럼 단순화하는 방향을 제안한다.

    제안 설계

    1. 철회는 승인 행 삭제로 끝낸다. 신뢰 판단에 긴 철회 목록을 쓰지 않는다. 행이 없는 키는 언제나 .unknown이고, 연결하려면 새 승인 클릭이 필요하다(현재 기본 거부와 같다).
    2. 옛 백업 복구 방지는 세대 번호로 한다. 승인 파일에 단조 증가하는 generation을 두고, 앱이 쓸 때마다 올린다. 마지막으로 쓴 세대는 별도 위치(예: 앱 UserDefaults 도메인의 작은 값)에 보관한다. 읽은 파일의 세대가 보관값보다 작으면 복구된 옛 사본으로 보고 모든 승인을 무효화하고 받기를 끈 뒤 재승인을 요구한다. 철회한 앱이 옛 백업으로 승인 없이 되살아나는 경로가 이것으로 닫힌다. 단, 두 위치가 함께 복구되는 전체 시스템 복원은 전체 상태 복원으로 받아들인다(문서에 명시).
    3. 철회·승인 이력은 작은 진단 로그로만 남긴다. 기존 Log.agent(os_log)의 [AGENT-…] 줄을 쓰고, 파일로 남긴다면 최근 N건(예: 100건)의 순환 기록으로 제한한다. 이 로그는 신뢰 판단에 쓰지 않는다.
    4. 파일 크기 상한은 승인 행 수에 맞춰 작게(예: 256 KiB) 되돌린다. 상한 병합·fitting·savedRevoked 경로는 제거하거나 크게 줄인다. P3-02(키 교체 용량 거절)와 P3-03(대형 병합 비용)도 함께 사라진다.

    테스트

    • 저장, 철회, 옛 사본 복구 순서에서 그 앱은 .unknown이 되고 모든 승인이 무효화돼 받기가 꺼져야 한다.
    • 세대 보관값이 없는 첫 실행(업그레이드)에서는 현재 파일을 채택하고 보관값을 기록해야 한다.
    • 진단 로그는 N건을 넘으면 오래된 것부터 버리고, 텍스트·키 원문을 남기지 않아야 한다.

    이 변경은 AGENTS.md의 "A 등급이 필요한 변경"(신뢰 경계)이므로 이 이슈의 PR에도 다른 계열 유효 자문(A)이 필요하다.


    Generated by Claude Code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions