Skip to content

๐Ÿ› Fix: status=done ๊ธฐ๋ก ์ „ slide ์ปค๋ฐ‹ ๊ฐ€์‹œ์„ฑ ๊ฒ€์ฆ (์กฐ์šฉํ•œ 0ํ–‰ ์™„๋ฃŒ ๋ฐฉ์ง€) - #18

Merged
naooung merged 1 commit into
developfrom
fix/persist-verify-slides-before-done
Jun 11, 2026
Merged

naooung merged 1 commit into
developfrom
fix/persist-verify-slides-before-done

Conversation

@naooung

@naooung naooung commented Jun 11, 2026

Copy link
Copy Markdown
Member

๋ฌธ์ œ

persist_chapter_state๊ฐ€ status=done์„ ๊ธฐ๋กํ•˜๋ฉด Spring ํด๋ง์ด ๊ฐ•์˜ ์ƒ์„ฑ ์™„๋ฃŒ๋กœ ๊ฐ„์ฃผํ•œ๋‹ค. ๊ทธ๋Ÿฐ๋ฐ ํŠธ๋žœ์žญ์…˜ ์ปค๋ฐ‹ ํ›„ slide ํ–‰์ด 0ํ–‰์ธ๋ฐ๋„ done์ด ๋จผ์ € ๊ธฐ๋ก๋˜๋ฉด, Spring์€ ๋นˆ ๊ฐ•์˜๋ฅผ ์™„๋ฃŒ๋กœ ๋…ธ์ถœํ•˜๋Š” ์กฐ์šฉํ•œ ์‹คํŒจ๊ฐ€ ๋ฐœ์ƒํ•œ๋‹ค.

๋ณ€๊ฒฝ

  • _verify_persisted_rows: status=done ๊ธฐ๋ก ์ง์ „, ์ปค๋ฐ‹ ํ›„ chapter_studio.slideยทpublic.slide ํ–‰์ด ๊ธฐ๋Œ€ slide ์ˆ˜๋งŒํผ ์‹ค์ œ ์กฐํšŒ๋˜๋Š”์ง€ ๊ฒ€์ฆ.
    • ๋ถˆ์ผ์น˜ ์‹œ StorageError ๋ฐœ์ƒ โ†’ ํŠธ๋žœ์žญ์…˜ ๋กค๋ฐฑ, done ๋ฏธ๊ธฐ๋ก.
  • PersistenceConnection ํ”„๋กœํ† ์ฝœ์— fetchval ์ถ”๊ฐ€ (๊ฒ€์ฆ ๋‹จ์ผ๊ฐ’ ์กฐํšŒ์šฉ).
  • _as_int ํ—ฌํผ ์ถ”๊ฐ€.
  • ํ…Œ์ŠคํŠธ: ์ปค๋ฐ‹๋œ slide๊ฐ€ ๋ˆ„๋ฝ๋œ ๊ฒฝ์šฐ done ๊ธฐ๋ก ์ „์— ์‹คํŒจํ•˜๋Š”์ง€ ๊ฒ€์ฆํ•˜๋Š” ์ผ€์ด์Šค ์ถ”๊ฐ€.

๊ฒ€์ฆ

  • uv run --with pytest --with pytest-anyio pytest .../tests/unit/test_persistence.py โ†’ 7 passed (develop base)
  • ์‹ ๊ทœ ํ…Œ์ŠคํŠธ test_persist_chapter_state_fails_before_done_when_committed_slides_are_missing ํฌํ•จ ํ†ต๊ณผ.

์ฐธ๊ณ 

  • public.slide๋Š” lesson_id๋ฅผ chapter_id ์ปฌ๋Ÿผ์— ๊ธฐ๋กํ•˜๋Š” Springโ†”FastAPI ๋งคํ•‘์ด๋ผ, ๊ฒ€์ฆ ์ฟผ๋ฆฌ(WHERE chapter_id = lesson_id)๋Š” public_persistence.py์˜ ๊ธฐ๋ก ๋ฐฉ์‹๊ณผ ์ •ํ•ฉํ•จ.
  • ์˜์กด ์ฝ”๋“œ(persist_public_content, StorageError, public.slide)๋Š” ๋ชจ๋‘ develop์— ์ด๋ฏธ ์กด์žฌ โ†’ ์—ด๋ฆฐ PR โœจ Feat: ๊ณผ์ œ public.assignment ์ด์ค‘ ์ €์žฅ (Spring ์กฐํšŒ ๋…ธ์ถœ)ย #17(๊ณผ์ œ dualwrite)๊ณผ ๋…๋ฆฝ์ .

persist_chapter_state์—์„œ status=done์„ ๊ธฐ๋กํ•˜๊ธฐ ์ „์— chapter_studio.slideยท
public.slide ํ–‰์ด ์ปค๋ฐ‹ ํ›„ ์‹ค์ œ ์กฐํšŒ ๊ฐ€๋Šฅํ•œ์ง€ ๊ฒ€์ฆํ•œ๋‹ค. Spring ํด๋ง์ด done์„
์ƒ์„ฑ ์™„๋ฃŒ ์‹ ํ˜ธ๋กœ ๋ณด๊ธฐ ๋•Œ๋ฌธ์—, ์ปค๋ฐ‹ ์•ˆ ๋œ(0ํ–‰) ์ƒํƒœ๋กœ done์ด ๊ธฐ๋ก๋˜๋Š”
์กฐ์šฉํ•œ ์‹คํŒจ๋ฅผ ์ฐจ๋‹จํ•œ๋‹ค.

- persistence.py: _verify_persisted_rows / _as_int ์ถ”๊ฐ€, PersistenceConnection์— fetchval ํ”„๋กœํ† ์ฝœ ์ถ”๊ฐ€
  - ๊ฒ€์ฆ ๋ถˆ์ผ์น˜ ์‹œ StorageError ๋ฐœ์ƒ โ†’ ํŠธ๋žœ์žญ์…˜ ๋กค๋ฐฑ, done ๋ฏธ๊ธฐ๋ก
- test_persistence.py: ์ปค๋ฐ‹๋œ slide ๋ˆ„๋ฝ ์‹œ done ์ „์— ์‹คํŒจํ•˜๋Š” ํ…Œ์ŠคํŠธ ์ถ”๊ฐ€
@naooung
naooung merged commit 3692664 into develop Jun 11, 2026
1 check passed
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