fix(reverse_sync): code span 뒤 공백이 소실되는 문제를 수정합니다#979
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
Author
|
[debate-review][sha:bee8454fbfba5b34451cf65f94a769e9601feb34] Consensus reached after 2 rounds. No actionable issues remain. |
Contributor
Author
|
[debate-review][sha:0f41c45496e5bb8f5999cf30282f4e719a8c8ac8] Consensus reached after 3 rounds. Debate Summary
Withdrawn Findings
|
3 tasks
jk-kim0
added a commit
that referenced
this pull request
Apr 4, 2026
## Summary - `navigable_string_as_markdown()`에서 `re.sub(r'\s+', ' ', text)` 연속 공백 정규화를 제거합니다 - HTML과 Markdown/MDX 모두 렌더링 시 연속 공백을 단일 공백으로 표시하므로, FC 변환 단계의 정규화는 불필요합니다 - 이 정규화는 XHTML 원본의 공백 정보를 손실시켜, reverse-sync 파이프라인에서 `collapse_ws` 보상 로직과 gap 공백 축소 등 불필요한 복잡도를 유발합니다 (PR #979 참조) ## 변경 내용 - `bin/converter/context.py`: 연속 공백 정규화 2줄 제거 - 7개 테스트케이스의 `expected.mdx` 및 `expected.roundtrip.json` 업데이트 ## 이력 이 정규화는 2025-07-25 PR #34 (`a0da79dd`)에서 `as_markdown()` 함수 추출 시 방어적으로 추가된 것으로, 특정 버그 수정이 아닌 HTML 텍스트 노드의 일반적인 공백 정규화 목적이었습니다. ## Test plan - [x] 변환 테스트 21/21 통과 - [x] pytest 938 passed - [x] reverse-sync 통합 테스트 42/42 통과 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
_apply_text_changes의 gap whitespace 축소 로직에서, gap 전체가 노드의
leading whitespace인 경우(gap_old <= leading) 축소된 gap만큼만 leading을
조정하도록 변경합니다. 기존에는 gap이 축소되면 leading을 전부 제거하여,
<code>{{..}}</code><span> 안의</span> 구조에서 span 선행 공백이 소실되었습니다.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
<code>{{..}}</code><span> 안의</span> 구조에서 gap이 2→1로 축소될 때
leading이 전부 제거되는 버그를 재현하는 테스트케이스입니다.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
0f41c45 to
25b9f57
Compare
FC가 이중 공백을 보존하므로 original.mdx, improved.mdx의
`{{..}}` 뒤 공백을 1→2로 맞춥니다.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Contributor
Author
|
[debate-review][sha:5abda6e94b92c4b0e025ab504a0380d60d87a731] Consensus reached after 2 rounds. No actionable issues remain. |
이전 노드 trailing + 현재 노드 leading에 걸친 gap 변경 시: - 축소: leading 우선 흡수 → 부족하면 prev trailing에서 추가 흡수 - 확장: prev trailing에 공백 추가 - trailing_in_range 이중 적용 방지를 위해 prev_eff_end 추적 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
fix: 토론 리뷰 결과 반영 (라운드 1) - isu_001 (confluence-mdx/bin/reverse_sync/xhtml_patcher.py:704): 새 gap 분배 로직은 gap_old/gap_new가 공백만으로 이루어진 경우에만 leading을 줄입니다. 그래서 **Secure** :처럼 마크업 토큰과 공백이 함께 바뀌는 케이스에서는 앞 공백이 그대로 남아 reverse-sync/798064641가 **Secure**:대신 **Secure** :로 round-trip 되며 현재 CI의 Test Confluence MDX Converter가 실제로 이 회귀로 실패합니다.
Contributor
Author
|
[debate-review][sha:ded30dfddef259e92723ebe53fba706e2b57511f] Consensus reached after 4 rounds. Debate Summary
Applied Fixes
|
jk-kim0
added a commit
to jk-kim0/skills-jk
that referenced
this pull request
Apr 5, 2026
## 문제현상 debate-review 종료 시 `update_pr_status`가 PR title 앞에 `[debate: consensus]`, `[debate: failed]` 등의 label prefix를 자동으로 붙임. 외부 repo(querypie/querypie-docs#979)의 PR 제목까지 임의 변경하는 사고 발생. ## 구현내용 - `follow_through.py`: `update_pr_status()` 함수, `_OUTCOME_LABELS`, `_DEBATE_LABEL_RE` 제거 - `cli.py`: `update-pr-status` subcommand 제거 - `orchestrator.py`: `_follow_through()`에서 `update_pr_status` 호출 제거, `SubprocessDebateCli.update_pr_status()` 메서드 제거 - `test_follow_through.py`: `TestUpdatePrStatus` 클래스 및 CLI integration test 제거 - `test_orchestrator.py`: `FakeCli.update_pr_status` 및 관련 assertions 제거 정규화 코드(`_extract_json_from_text`, `_normalize_cross_verifications`, `_normalize_withdrawals`)는 PR #183에서 별도로 다룹니다. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
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
_apply_text_changes의 노드 간 gap whitespace 처리 로직을 전면 개편합니다.기존에는 gap 축소 시 현재 노드의 leading whitespace를 전부 제거하는 단순 로직이었으나, 이로 인해 두 가지 버그가 발생했습니다:
<code>{{..}}</code><span> 안의</span>구조에서 gap이 2→1로 축소될 때,<span>의 leading이 전부 제거되어<span>안의</span>가 됨<strong>Secure </strong> :구조에서 gap에</strong>경계가 포함되어gap_old.isspace()조건에 진입하지 못하고, trailing space가 잔존변경 사항
_compute_gap_whitespace_delta: gap 변경에서 공통 토큰(마크업 등)을 제외한 공백 길이 변화량만 분리하는 헬퍼 추출_redistribute_gap_whitespace: gap 축소/확장/삭제 시 current leading ↔ previous trailing 간 재분배 헬퍼 추출prev_replaced/prev_eff_end추적으로 다중 노드 간 gap 분배 지원trailing_in_range로 이미 diff 처리된 영역을 gap 계산에서 제외테스트
Test plan
make test-reverse-sync-bugs-one TEST_ID=883654669PASSmake test-reverse-sync-bugs— 43 passed, 0 failedmake test-convert— 21 passedmake test-reverse-sync— 43 passedmake test-skeleton— 18 passedmake test-image-copy— 1 passedmake test-xhtml-diff— 15 passedmake test-byte-verify— 21 passedmake test-render— 21 passed🤖 Generated with Claude Code