Skip to content

Restore pre-process agent features dropped from the review build (#22) - #23

Merged
lseongjoo merged 14 commits into
integration/issue-13from
recovery/pre-process-features
Nov 25, 2026
Merged

lseongjoo merged 14 commits into
integration/issue-13from
recovery/pre-process-features

Conversation

@lseongjoo

Copy link
Copy Markdown
Contributor

Requested by 이성주 · project thread

Refs #22 · #16 #17 #18 #19 #8 #9 · 대상 브랜치 integration/issue-13 (main 아님)

요청

integration/issue-13 + PR #15 검토판에서 빠진 이전 기능(받은 대본 DB 저장, 세로 대본 목록 등)을 되살린다.

내용

2026-11-22~23에 이슈·PR 절차 전 로컬에만 있던 커밋 13개를 재작성 없이 그대로 올린다. integration/issue-13(90425e9)에서 이어지는 빨리 감기라 충돌이 없다. 해시는 claude/project-thread-cvhl30-full-base와 같아서 병합 후 PR #15를 그 위로 다시 올릴 수 있다.

커밋 기능 이슈
f39e7a1 24ad2c4 b24c4e5 6b7f8ff 3685056 3adbd16 자동 페어링, 프로필 선택, MCP 설정 복사, 인라인 지시문 편집, 활성화 결과, 4단계 화면 #16
c3af0d8 3e0e5ea 22be8b1 받은 대본 편집 작업대와 보존 #17
d6b2417 ca1fffc 격리 미리보기, ./build.sh review, macOS 14 대상 #19
4e4f30a 승인한 로컬 에이전트 연결 유지 #8
ac1fa84 대본 제목, 세로 대본 목록, 제출 안내 도구, 받은 대본 SQLite 저장·재시작 복원 #9, #18

커밋 메시지에 이슈 번호와 Agent: 줄이 없는 것은 절차 이전 커밋이기 때문이다. 해시를 유지하려고 고치지 않았다.

운영 로그

macOS 27.2.1 (26B131), CommandLineTools Swift 6.4.2, Xcode 없음, 전용 워크트리 .worktrees/recovery-pre-process-features, 2026-11-25 KST. 기본 SDK는 SwiftUIMacros 문제로 실패하므로 SDKROOT=/Library/Developer/CommandLineTools/SDKs/MacOSX26.5.sdk 지정.

HEAD 명령 결과
ac1fa84 ./build.sh build exit 0
ac1fa84 ./build.sh test exit 0, "All tests passed." Trust store, Draft history(제목 규칙, 본문·재생에서 제목 제외, 키 중복·충돌, 154개 문서, 재시작 복원, 저장 실패), Agent catalog, Conversation(134), Explanation style(49) 등
— Tests/Fixtures/run_draft_titles.py 미실행: 로그인 키체인 슬롯을 쓰므로 AGENTS.md 기준(키체인 변경 금지)에 따라 보류

미검증: 세로 목록·재시작 복원의 실제 화면, PR #15와 합친 검토판.

병합 후

참여 에이전트

🤖 Generated with Claude Code

lseongjoo and others added 13 commits November 22, 2026 09:37
- Pin editor actions (revert, close, playback) to the document they were
  issued for, keep manual drafts visible as tabs, and surface arrivals.
- Report every draft outcome with a structured status (editor_full,
  invalid, upgrade_required, unconfirmed) and distinguish busy from full.
- Show blocked receipt, peer identity, and shared instruction in the
  connection area; retry pairing when enabling receive.
- Treat an unreadable preset override as unreadable instead of falling
  back to built-ins; write instruction files 0600.
- Target macOS 14.0 for all variants, pick a usable SDK without Xcode,
  and stage installs so a failed swap restores the previous app.
- Add `./build.sh review`: the whole app with isolated identity, data,
  and sockets, without Services or global hotkeys.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
One approval in the app now remembers a client by its own signing key
instead of by one live helper process and a 600-second clock.

- The helper keeps a non-extractable P-256 key per MCP client in the
  login keychain and proves it on each reconnect against a fresh nonce.
  The app stores the public key, client name and launching program in
  agent-clients.json (0600) and binds a process only after that proof,
  on top of the existing signature and process checks.
- Receipt and instruction sharing no longer expire on a timer. Receipt
  ends when the user turns it off, the screen locks, the client is
  forgotten or its process exits; turning it off persists.
- A different key, a different launcher, a lost or replaced key, 30 idle
  days, or a forgotten client all require a new approval. Forgetting
  tombstones the key and refuses requests already in flight.
- Instruction reading stays separate: only the exact saved revision the
  user chose, only for the client it was chosen for, never across an app
  restart. An expired read proof is renewed by reading the same revision.
- Delivery keys are remembered per client (latest 128) across client
  restarts; the rate limit slides per minute and per hour.
- Oversized text is refused with too_large and byte counts, and every
  refusal carries a status code.
- Add Helpers/tts_mcp_client.py, which sends over pipes in single frames
  and reports confirmed / rejected / unconfirmed, and
  Tests/Fixtures/run_persistent_pairing.py with the fixed scenarios.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…uide

- Drafts accept an optional `title` on both submission tools. It names
  the draft in the list and editor header only and is never part of the
  text that is edited, copied, captioned or read. One line, up to 120
  characters and 512 UTF-8 bytes; longer is refused, never shortened.
  Without one, the first non-blank line of the body is shown.
- The same key with the same title, body and speech text is one draft;
  any difference is a conflict that changes nothing.
- Documents are stored in a private SQLite file instead of memory. The
  six-document and 256 KiB limits are gone, and the list, edits, received
  originals and open document come back after a restart. A draft that
  cannot be stored is refused without touching anything else. Stored
  drafts keep answering duplicate/conflict for their keys after restart.
- The horizontal tab strip is replaced by a collapsible vertical list
  beside the editor: newest first, selection, edited and unseen marks,
  date, title search, lazy rows. While the list is being searched, an
  arrival is listed without taking over the editor.
- Add the read-only get_tts_submission_guide tool. Tool schemas, argument
  checks and the guide are generated from one field definition.
- Add Tests/Fixtures/run_draft_titles.py and unit tests for the above.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@lseongjoo lseongjoo self-assigned this Nov 25, 2026
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 25, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-25T11:28:31.511201Z ac1fa84 PR opened
🔒 Security Review ✅ Completed 2026-11-25T11:31:37.659598Z ac1fa84 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ac1fa8458f

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +185 to +190
// A failed write keeps the text in the editor's place in the list; the
// stored copy is then the older one.
_ = store.save(id, document)
let row = DraftSummary(id: id, document: document)
if let position = index.firstIndex(where: { $0.id == id }) { index[position] = row }
else { index.append(row) }

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Preserve the active document when parking fails

If a save fails while switching documents or creating a new one, this code ignores the failure and retains only a DraftSummary, which contains neither editable text field. The caller then replaces or clears the editor, destroying the only copy of any unsaved changes; reopening the row either loads stale text or fails entirely. Make parking report failure and prevent the transition, or retain the complete unsaved document in memory until it can be saved.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

c21eb08에서 수정했습니다. parkActiveDocument()가 저장 실패를 false로 알리고, 문서 전환·새 문서는 편집기를 바꾸지 않고 멈추며 안내를 띄웁니다. 수신은 새 대본만 목록에 추가하고 편집기는 그대로 둡니다. 저장이 다시 되면 같은 글이 저장되고 전환이 진행됩니다. 테스트: AgentCatalogTests "failed park keeps editor" (수정 전 코드에서는 trap, 수정 후 통과).

Comment on lines +187 to +190
_ = store.save(id, document)
let row = DraftSummary(id: id, document: document)
if let position = index.firstIndex(where: { $0.id == id }) { index[position] = row }
else { index.append(row) }

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Persist the active identity when saving a manual draft

When the user types into the initial blank editor or a new manual document, autosave and the quit-time flush() save its body but never set store.activeID; that assignment only happens in activate() and installReceived(). Consequently, restarting opens a blank editor instead of restoring the manual document the user was editing, even though its saved row remains in the list. Record the current editor's identity after a successful save so manual drafts receive the same active-document restoration as received drafts.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

c21eb08에서 수정했습니다. 저장이 성공하면 store.activeID를 편집 중인 문서로 기록해 직접 입력 문서도 재시작 후 다시 열립니다. 새 빈 문서로 가면 기존처럼 nil. 테스트: "manual draft reopens".

…18)

Parking the editor's document now reports a failed write. Switching
documents and starting a new one stop instead of replacing the editor,
and an arrival is listed without taking the editor, with a notice.
A successful park records the document as the one to reopen, so a
manual draft comes back after a restart like a received one.

Addresses Codex review on PR #23 (P1 discussion_r4694214953, P2
discussion_r4694214961).

Agent: Claude Code

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@lseongjoo

Copy link
Copy Markdown
Contributor Author

Codex P1·P2를 c21eb08에서 수정했습니다. 운영 로그는 #22 댓글에 있습니다. 이제 이 PR은 빨리 감기 13개 + 수정 1개입니다.

Copy link
Copy Markdown
Contributor Author

증거 기반 병합 (AGENTS.md "합의 대신 증거로 진행")

PR이 열린 지(2026-11-25 11:26Z) 6시간이 지났고, 그동안 다른 에이전트의 응답이나 이의가 없었습니다. 아래 근거로 integration/issue-13에 병합합니다(main 아님).

  • 빌드·테스트: c21eb08에서 ./build.sh build exit 0, ./build.sh test exit 0 ("All tests passed."). 로그는 검토판에서 빠진 이전 작업 복구 #22 댓글 7165321997에 있습니다. ac1fa84에서는 build·test exit 0이었고, 로그는 PR 본문에 있습니다.
  • 리뷰 지적: Codex P1과 P2는 c21eb08에서 고쳤고, 두 스레드 모두 outdated로 바뀌었습니다. 각 지적마다 회귀 테스트를 넣었고, 수정 전 코드에서는 이 테스트가 trap으로 실패한 것을 확인했습니다. 그 뒤로 새 지적은 없습니다.
  • 독립 검토(PR Approve agent connections once per agent app (#13) #15 스레드): c21eb08 차이를 읽었습니다. parkActiveDocument()는 저장에 실패하면 false를 돌려주고, 이때 전환·새 문서·수신은 편집기를 바꾸지 않습니다. flush()가 저장에 성공하면 activeID를 기록하므로, 자동 저장과 종료 시 저장에서도 직접 입력한 문서가 재시작 후 다시 열립니다. 문제는 찾지 못했습니다.
  • 남은 미검증: 실제 화면에 안내가 뜨는지, PR #15와 합친 검토판이 정상인지는 아직 보지 않았습니다. 이 두 가지는 PR #15를 이 위로 다시 올린 뒤 Mac에서 확인합니다.

병합 방식은 merge commit입니다. 13개 커밋의 해시를 그대로 두기 위해서입니다.


Generated by Claude Code

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant