계약: 초안 ID, 정산 월·기준일, 상태, 생성자·생성/변경 시각, 메모, 동시 편집 버전, 생성 중복 방지 키, 최종 마감 ID 및 정정 관계를 영속 저장한다. 자료가 없어도 생성·저장할 수 있고 생성 자체로 마감 run이나 확정 금액을 만들지 않는다. 정산 월별 활성 초안은 일반/정정 구분 없이 하나로 제한하고, 완료·취소 후 새 초안을 열 수 있다. 생성 키 재시도는 같은 초안을 반환하고 다른 요청의 활성 중복은 충돌한다. 이미 마감한 기준일의 새 초안은 이전 run과 정정 사유를 연결한다. 정산 기준일은 해당 월말로 고정하며 입력한 날짜도 월말과 일치하는지 검증한다.
테스트 근거: tests/test_monthly_settlement_drafts.py, tests/test_settlement_draft_correction_contract.py
판정 근거: 무자료 생성은 run을 쓰지 않는다. 월말과 단일 활성 초안, 생성 재시도 및 정정 연결을 검증한다.
IN-02 — satisfied
계약: 초안의 정산 대상 계좌·자산·부채와 포함/제외 여부·사유를 관리한다. 계좌별 valuation_id, 선택 방식·사유, 선택자·시각, 항목 버전, 대체 승인 근거와 준비 상태를 저장한다. 새로운 계좌·대상 변경을 자동 반영하지 않고 명시적 대상 갱신으로만 반영하며 기존 선택과 승인에 미치는 차이를 검토한다.
구현 근거: jarca_ledger_mcp/application/settlement_draft_service.py; service 63-140, 219-258, 261-307; frozen-target and refresh tests
테스트 근거: tests/test_monthly_settlement_drafts.py, tests/test_settlement_draft_authority.py
판정 근거: 대상 동결과 명시적 갱신, 포함 및 제외 사유와 선택 감사 정보를 보존한다.
IN-03 — satisfied
계약: 기존 평가 등록·조회·정정 기능을 재사용한다. 선택한 자료의 계좌 소속, 통화, 평가 목적과 대표 부채 정의를 검증하고 계좌별 대표 합산 금액은 하나만 사용한다. 투자 원금·현금성 잔액·평가액을 중복 합산하지 않는다. 증빙/등록 중복 방지와 append-only 정정을 보존한다.
구현 근거: jarca_ledger_mcp/application/settlement_draft_service.py, jarca_ledger_mcp/application/assets_service.py, jarca_ledger_mcp/application/account_valuation_service.py; service 261-307; contract scenario 56-73; representative and liability registration tests
테스트 근거: tests/test_settlement_draft_selection.py, tests/test_settlement_draft_contract_scenarios.py
판정 근거: 기존 등록과 정정 검증을 재사용하고 계좌별 대표 정수 금액만 합산한다.
IN-04 — satisfied
계약: exact는 같은 기준일의 확인 자료, carried_before는 이전 확인 자료의 승인된 이월, manual_substitute는 특정 자료의 명시적 직접 지정이다. 자동 선택은 이후 날짜 자료를 선택하지 않는다. 수동 대체는 실제 날짜·방향을 포함한 날짜 차이·사유·승인을 보존한다. 등록일과 평가 기준일을 구분한다. 미확인 자료는 초안 선택·검토용으로 보존하되 잠정 합계의 authority 금액에 포함하지 않고 확인 필요 상태로 표시한다. 최종 합산하려면 append-only 확인/정정 자료를 사용자가 명시적으로 다시 선택하고 재검토·승인한다. 끝내 미확인인 항목은 누락/제외로 표시하고 조건부 마감 시 그 누락을 승인한다. 확인 승인을 이유로 원본 verification_status를 덮어쓰지 않는다.
테스트 근거: tests/test_monthly_settlement_drafts.py, tests/test_settlement_draft_selection.py, tests/test_settlement_draft_contract_scenarios.py
판정 근거: 자동 미래 선택은 금지하고 직접 지정의 실제 날짜와 사유를 보존한다. 미확인 금액은 authority에서 제외하며 확인 child는 재선택한다.
IN-05 — satisfied
계약: 초안 조회·검토·미리보기에서 대상/제외 목록, 자료 ID, 대표 금액·통화·자산/부채 분류, 실제 평가일, 선택 방식·날짜 차이, 증빙 출처·확인 상태, 선택/대체/제외 사유, 누락·승인 필요 항목, 잠정 총자산·총부채·순자산을 제공한다. 미선택 금액은 0으로 표시하지 않고 자료 완전성, 미등록 부채 및 대체 포함 여부를 명시한다.
테스트 근거: tests/test_monthly_settlement_drafts.py, tests/test_settlement_draft_authority.py
판정 근거: 변경은 승인 binding을 무효화한다. 외부 drift에서도 최종화가 새 fingerprint 또는 review-needed guard로 차단되고 최신 자료로 자동 교체하지 않는다.
IN-07 — satisfied
계약: 초안 최종 상태 전이, 연결된 asset_snapshot_runs 및 asset_snapshots 저장을 하나의 트랜잭션으로 처리한다. 중복 클릭/동일 요청 재시도는 같은 마감을 반환하고 다른 payload의 키 재사용은 충돌한다. 실패 시 부분 마감과 완료 초안이 남지 않는다.
구현 근거: jarca_ledger_mcp/application/settlement_draft_service.py; service 338-391; tests 204-247; contract scenario 145-173
테스트 근거: tests/test_monthly_settlement_drafts.py, tests/test_settlement_draft_contract_scenarios.py
판정 근거: 하나의 BEGIN IMMEDIATE에서 run과 rows 및 초안 완료를 저장한다. 실패 rollback과 동시 재시도 persisted response를 검증한다.
IN-08 — satisfied
계약: 원본 초안 ID·버전, 월·기준일, 적용 자료/금액/통화/분류, 실제 날짜·선택 방식·날짜 차이, 증빙/확인 상태, 포함·제외·대체 사유, 승인자·시각·근거와 누락/경고를 마감 이력에 보존한다. 완전한 exact 마감, 이월·대체 포함, 승인된 누락을 별도로 식별한다. 대체 사용과 누락은 하나의 모호한 상태로 합치지 않는다.
테스트 근거: tests/test_settlement_draft_contract_scenarios.py, tests/test_settlement_draft_read_models.py, tests/test_settlement_draft_audit_reproductions.py
판정 근거: 마감 증거는 초안 버전과 날짜, 승인 flags 및 제외 사유를 고정한다. 대체와 승인된 누락은 독립 flags이며 readiness와 included, exclusion_reason으로 누락과 명시적 제외도 구분 가능하다.
IN-09 — satisfied
계약: 초안에서 선택 자료에 정정본이 생기면 검토 필요를 표시하고 사용자가 교체 여부를 결정한다. 확정 마감은 이후 평가 등록·정정으로 변경하지 않는다. 명시적 정정 초안과 사유로 새 마감을 이전 run에 연결하며 이전 기록을 보존한다.
구현 근거: jarca_ledger_mcp/application/settlement_draft_service.py, jarca_ledger_mcp/application/assets_service.py; service 63-91, 153-170, 352-369; authority and correction-parent tests
테스트 근거: tests/test_settlement_draft_authority.py, tests/test_settlement_draft_correction_contract.py
판정 근거: 정정 child는 검토 필요로 표시하고 자동 교체하지 않는다. 새 정정 run은 이전 run에 연결하며 기존 마감은 불변이다.
IN-10 — satisfied
계약: 기존 수동 자산·부채도 대상과 합계에 포함한다. 검토 당시의 값·날짜·분류·출처를 증거로 고정하고 원본 변경을 drift로 검출한다. 갱신하려면 명시적 재검토를 거치며 마감 때 live 값을 몰래 재사용하지 않는다. 수동 자료의 자동 날짜 선택은 기존 exact/as_of 제한을 유지한다.
테스트 근거: tests/test_monthly_settlement_drafts.py, tests/test_settlement_draft_authority.py
판정 근거: 수동 자산과 부채는 frozen source에 결합하고 원본 변경을 drift로 검출하며 명시적 갱신이 필요하다.
IN-11 — satisfied
계약: Dashboard에서 생성·목록·상세·저장·취소, 계좌 자료 조회·등록·지정·해제, 포함/제외 및 사유 수정, 검토·승인·최종 마감, 확정 조회·정정 초안 생성을 제공한다. MCP도 같은 작업을 공통 application service로 제공한다.
구현 근거: jarca_ledger_mcp/application/settlement_draft_service.py, jarca_ledger_mcp/service.py, jarca_ledger_mcp/adapters/mcp/server.py, jarca_ledger_mcp/adapters/mcp/tool_contracts.py, jarca_ledger_mcp/adapters/streamlit/settlement_gateway.py, dashboard/page_views/settlement_drafts.py, dashboard/page_views/assets.py, dashboard/page_views/monthly_settlement.py; shared application entrypoints, thin MCP and Streamlit gateway, explicit panel actions; adapter and real MCP stdio tests
테스트 근거: tests/test_settlement_draft_adapters.py, tests/test_settlement_draft_mcp_runtime.py, tests/test_settlement_draft_dashboard.py, tests/test_settlement_draft_panel_workflow.py, tests/test_settlement_draft_panel_feedback.py, tests/test_settlement_draft_liability_registration.py
판정 근거: UI와 MCP는 공통 application에 위임한다. 자료 등록과 지정 및 해제, 저장과 취소, 검토와 승인 및 마감, 확정 조회와 정정 생성 경로를 제공한다.
IN-12 — satisfied
계약: 합성 자료로 원본 수락 기준을 검증한다. 특히 2026-09 초안에 2026-10-05/07 자료 직접 지정, 늦게 등록한 2026-09-30 자료의 exact 구분, 자동 미래 선택 금지, 승인 후 변경 차단, 정정·동시 편집·재시도·트랜잭션 실패와 기존 API/마이그레이션 회귀를 포함한다.
구현 근거: jarca_ledger_mcp/application/settlement_draft_service.py, jarca_ledger_mcp/application/assets_service.py, jarca_ledger_mcp/infrastructure/sqlite/migrations.py, jarca_ledger_mcp/application/monthly_settlement_service.py; producer full-suite at exact reviewed head: 396 passed, 4 skipped, 1 warning; lint passed; manifest and all 163 source blobs independently matched
테스트 근거: tests/test_monthly_settlement_drafts.py, tests/test_settlement_draft_contract_scenarios.py, tests/test_settlement_draft_authority.py, tests/test_settlement_draft_selection.py, tests/test_settlement_draft_correction_contract.py, tests/test_ledger_categories.py, tests/test_review_decision_workbench.py
판정 근거: 제품 테스트는 생산자가 실행했고 reviewer는 source와 테스트 및 실행 기록을 읽기 전용 검증했다. PDF sample 4개 skip은 기존 환경 한계이며 새 feature 검증을 대체하지 않는다.
EX-01 — satisfied
계약: 거래 분류 완료 보장, 실제 월말 평가액 역산, 투자 성과 추정, 자산 증감을 수입·지출/투자 수익 거래로 자동 생성하는 기능.
구현 근거: jarca_ledger_mcp/application/settlement_draft_service.py, jarca_ledger_mcp/application/assets_service.py, jarca_ledger_mcp/application/monthly_settlement_service.py; exact base-to-head 38-file scope review and immutable source; no transaction insert or external price call introduced
테스트 근거: tests/test_settlement_draft_contract_scenarios.py, tests/test_settlement_draft_authority.py, tests/test_settlement_draft_correction_contract.py
판정 근거: 제외된 가격 및 FX, 자동 승인, 거래 생성, 기존 이력 삭제, 인증과 메뉴 재설계는 추가하지 않았다. Discovery 단계 제한은 후속 구현 PR 생성 금지가 아니다.
EX-02 — satisfied
계약: 외부 가격 API, 새 환율 변환 정책, 자동 승인, 실제 계좌번호·금융자료·credential을 문서나 fixture에 저장하는 작업.
구현 근거: jarca_ledger_mcp/application/settlement_draft_service.py, jarca_ledger_mcp/application/assets_service.py, jarca_ledger_mcp/application/monthly_settlement_service.py; exact base-to-head 38-file scope review and immutable source; no transaction insert or external price call introduced
테스트 근거: tests/test_settlement_draft_contract_scenarios.py, tests/test_settlement_draft_authority.py, tests/test_settlement_draft_correction_contract.py
판정 근거: 제외된 가격 및 FX, 자동 승인, 거래 생성, 기존 이력 삭제, 인증과 메뉴 재설계는 추가하지 않았다. Discovery 단계 제한은 후속 구현 PR 생성 금지가 아니다.
EX-03 — satisfied
계약: Dashboard 인증·쿠키/logout 또는 메뉴 순서 재설계, MCP 인증의 신규 도입.
구현 근거: jarca_ledger_mcp/application/settlement_draft_service.py, jarca_ledger_mcp/application/assets_service.py, jarca_ledger_mcp/application/monthly_settlement_service.py; exact base-to-head 38-file scope review and immutable source; no transaction insert or external price call introduced
테스트 근거: tests/test_settlement_draft_contract_scenarios.py, tests/test_settlement_draft_authority.py, tests/test_settlement_draft_correction_contract.py
판정 근거: 제외된 가격 및 FX, 자동 승인, 거래 생성, 기존 이력 삭제, 인증과 메뉴 재설계는 추가하지 않았다. Discovery 단계 제한은 후속 구현 PR 생성 금지가 아니다.
EX-04 — satisfied
계약: 초안 취소에 따른 원본 평가·마감 이력 삭제, 기존 마감 덮어쓰기, 원본 평가일 소급 변경.
구현 근거: jarca_ledger_mcp/application/settlement_draft_service.py, jarca_ledger_mcp/application/assets_service.py, jarca_ledger_mcp/application/monthly_settlement_service.py; exact base-to-head 38-file scope review and immutable source; no transaction insert or external price call introduced
테스트 근거: tests/test_settlement_draft_contract_scenarios.py, tests/test_settlement_draft_authority.py, tests/test_settlement_draft_correction_contract.py
판정 근거: 제외된 가격 및 FX, 자동 승인, 거래 생성, 기존 이력 삭제, 인증과 메뉴 재설계는 추가하지 않았다. Discovery 단계 제한은 후속 구현 PR 생성 금지가 아니다.
EX-05 — satisfied
계약: 정산 월의 월말과 다른 기준일, 같은 월의 복수 활성 초안, 미확인 자료의 단순 사용 승인만으로 금액을 최종 합산하는 경로.
구현 근거: jarca_ledger_mcp/application/settlement_draft_service.py, jarca_ledger_mcp/application/assets_service.py, jarca_ledger_mcp/application/monthly_settlement_service.py; exact base-to-head 38-file scope review and immutable source; no transaction insert or external price call introduced
테스트 근거: tests/test_settlement_draft_contract_scenarios.py, tests/test_settlement_draft_authority.py, tests/test_settlement_draft_correction_contract.py
판정 근거: 제외된 가격 및 FX, 자동 승인, 거래 생성, 기존 이력 삭제, 인증과 메뉴 재설계는 추가하지 않았다. Discovery 단계 제한은 후속 구현 PR 생성 금지가 아니다.
EX-06 — satisfied
계약: Discovery 단계의 제품 코드·요구사항명세서·설계문서 작성 또는 수정, PR/브랜치 생성. 아래 산출물은 후속 구현 시의 문서 계약이다.
구현 근거: jarca_ledger_mcp/application/settlement_draft_service.py, jarca_ledger_mcp/application/assets_service.py, jarca_ledger_mcp/application/monthly_settlement_service.py; exact base-to-head 38-file scope review and immutable source; no transaction insert or external price call introduced
테스트 근거: tests/test_settlement_draft_contract_scenarios.py, tests/test_settlement_draft_authority.py, tests/test_settlement_draft_correction_contract.py
판정 근거: 제외된 가격 및 FX, 자동 승인, 거래 생성, 기존 이력 삭제, 인증과 메뉴 재설계는 추가하지 않았다. Discovery 단계 제한은 후속 구현 PR 생성 금지가 아니다.
CON-01 — satisfied
계약: 조사 기준은 main의 고정 revision 68212e773b94dd89b6c036e6616759542c178de3이다. Gitea authoritative SHA와 갱신한 bare cache의 local ref를 비교했다.
구현 근거: docs/requirements/req-003_account-valuation-history.md; pinned base and default branch 68212e773b
테스트 근거: tests/test_monthly_settlement_drafts.py
판정 근거: authoritative API와 cache base SHA 일치를 확인했다.
CON-02 — satisfied
계약: SQLite schema 12에서 additive migration하며 기존 테이블·행·이력·인덱스의 의미를 보존한다. 실제 새 스키마 버전 및 물리 필드는 구현 결과와 함께 문서화하고 기존 자료를 추정 이주하지 않는다.
구현 근거: jarca_ledger_mcp/infrastructure/sqlite/migrations.py, jarca_ledger_mcp/infrastructure/sqlite/schema.py, docs/data-model.md; migrate_db 19-45, 120-147, 198; schema13 idempotency test 249-260 and schema11 preservation regression; exact-head source delta
테스트 근거: tests/test_monthly_settlement_drafts.py, tests/test_issue_12_regressions.py, tests/test_account_valuations.py
판정 근거: 신규 테이블과 run lineage 컬럼만 additive하게 확장하며 기존 rows와 인덱스를 삭제하지 않는다. schema12 입력의 별도 실행은 없으나 공통 무조건 additive DDL과 기존 이력 및 반복 초기화 회귀를 함께 검토했다.
CON-03 — satisfied
계약: 기존 자동 exact/as_of와 기존 직접 마감의 호출/응답 계약을 유지한다. 미래 사용 예외는 직접 지정·검토·승인된 초안 마감에 한정하며 자동 선택 계약을 전역 완화하지 않는다. 기존 직접 마감이 초안의 승인·변경 검증을 우회해 선택 자료를 대신 확정하는 경로를 만들지 않는다.
구현 근거: jarca_ledger_mcp/application/settlement_draft_service.py, jarca_ledger_mcp/application/assets_service.py; existing automatic selector and direct close retained; draft finalize 338-391 does not use live direct-close shortcut
테스트 근거: tests/test_settlement_draft_selection.py, tests/test_settlement_draft_legacy_shapes.py, tests/test_contract_regression.py
판정 근거: 기존 exact와 as_of 및 직접 마감의 envelope와 선택 의미를 보존한다.
CON-04 — satisfied
계약: rejected/unknown 날짜, 잘못된 계좌·통화·목적·대표 부채 정의와 모호한 대표 선택은 승인만으로 정상 자료가 되지 않는다. 미확인 자료는 초안에서 선택·검토할 수 있지만 미확인 금액 자체를 승인으로 합산하지 않는다. 최종 합산 전 append-only 확인/정정 자료를 명시적으로 다시 선택하고 재검토·승인해야 한다. 미확인으로 남으면 누락/제외와 그 누락에 대한 조건부 승인만 허용한다.
구현 근거: jarca_ledger_mcp/application/settlement_draft_service.py; service 261-307, 319-360; rejected, unverified, loan and wrong-scope scenarios
테스트 근거: tests/test_settlement_draft_selection.py, tests/test_settlement_draft_authority.py, tests/test_settlement_draft_contract_scenarios.py
판정 근거: 승인은 자료의 잘못된 계좌나 목적 또는 확인 상태를 정상화하지 않는다.
CON-05 — satisfied
계약: 정수 금액의 정확도와 NULL/0 구분, 순자산의 자산−부채 계산, KRW 중심 기존 정책을 유지한다. FX 정책 없는 비KRW 금액은 단순 합산하지 않고 제외/경고를 표시한다.
구현 근거: jarca_ledger_mcp/application/settlement_draft_service.py, jarca_ledger_mcp/application/assets_service.py; contract scenario 56-73, 119-173; integer and NULL handling in review
테스트 근거: tests/test_settlement_draft_contract_scenarios.py
판정 근거: 큰 정수 정밀도와 자산 minus 부채 계산, NULL 구분 및 비KRW 제외를 검토했다.
CON-06 — satisfied
계약: carried_before는 초안의 이전 자료 선택 의미이고 기존 public as_of를 제거하거나 이름을 바꾸지 않는다. 기존 age_days의 의미를 변경하지 않고 수동 미래 자료의 방향 있는 날짜 차이 계약을 별도로 명확히 한다.
구현 근거: jarca_ledger_mcp/application/settlement_draft_service.py, jarca_ledger_mcp/application/assets_service.py, docs/interface-contract.md; review date fields and scenario 32-54; existing as_of API unchanged
테스트 근거: tests/test_settlement_draft_contract_scenarios.py, tests/test_settlement_draft_selection.py
판정 근거: 공개 as_of와 age_days의 방향을 유지하고 새 날짜 차이 field를 별도로 제공한다.
CON-07 — satisfied
계약: get_monthly_settlement_summary()와 기존 preview/report/render는 읽기 전용을 유지한다. 새 초안 mutation은 명시적 버튼·도구 호출로만 수행한다. missing DB 조회는 기존 db_not_initialized/no-create 계약을 유지한다.
구현 근거: jarca_ledger_mcp/application/settlement_draft_service.py, jarca_ledger_mcp/application/monthly_settlement_service.py, jarca_ledger_mcp/infrastructure/sqlite/connection.py; review 310-316 uses read_db; monthly existing read_db path and explicit new read helpers; missing DB cases
테스트 근거: tests/test_monthly_settlement_drafts.py, tests/test_service.py, tests/test_settlement_draft_adapters.py
판정 근거: 읽기 전용 연결과 missing DB no-create를 보존한다. 새로운 mutation은 명시적 action에서만 실행된다.
CON-08 — satisfied
계약: Dashboard auth-before-DB, 기존 성공/오류 envelope, 기존 MCP transport와 application → SQLite 의존 방향을 유지한다. 업무 검증·선택·마감은 UI/MCP에서 중복 구현하지 않는다.
구현 근거: jarca_ledger_mcp/application/settlement_draft_service.py, dashboard/app.py, dashboard/page_views/settlement_drafts.py, jarca_ledger_mcp/adapters/mcp/server.py; existing app auth guard before protected page and shared service transport delegation
테스트 근거: tests/test_dashboard_app.py, tests/test_settlement_draft_mcp_runtime.py, tests/test_settlement_draft_dashboard.py
판정 근거: 인증 이후 DB 접근과 기존 transport 및 오류 envelope를 보존하고 UI에 SQL 업무 검증을 추가하지 않았다.
CON-09 — satisfied
계약: 거래 import/분류/대사가 미완료라는 이유만으로 평가 등록과 자산 마감을 막지 않는다. 거래 준비 상태와 자산 마감 상태를 별도로 표시한다.
테스트 근거: tests/test_settlement_draft_contract_scenarios.py
판정 근거: 거래 미정리 blocker를 남겨도 자산 초안 승인과 마감은 가능하며 거래 rows는 그대로다.
CON-10 — satisfied
계약: 월별 단일 활성 초안·월말 기준일·미확인 금액 제외 정책을 생성/편집/검토/최종화 및 모든 후속 문서에 동일하게 적용한다. 활성 초안 중복은 일반/정정 구분으로 우회하지 않으며 취소는 증빙이나 기존 마감을 삭제하지 않는다. 사용자 선택은 제품 구현/시험 완료의 증거가 아니다.
구현 근거: jarca_ledger_mcp/application/settlement_draft_service.py, jarca_ledger_mcp/infrastructure/sqlite/migrations.py, docs/requirements/req-003_account-valuation-history.md, docs/data-model.md, docs/interface-contract.md, docs/project-structure.md, docs/runtime-flow.md; all layer single active month, fixed month-end and verified authority policy inspection
테스트 근거: tests/test_monthly_settlement_drafts.py, tests/test_settlement_draft_correction_contract.py, tests/test_settlement_draft_contract_scenarios.py
판정 근거: 구현 정책과 요구사항, 데이터 모델 및 인터페이스의 동일 정책을 확인했다. 프로젝트 구조와 런타임 문서의 상세 누락은 DOC-PS-semantic 및 DOC-RF-semantic에서 별도 판정한다.
DEC-01 — satisfied
계약: 자료 확보 전 영속 초안을 만들고 계좌별 자료를 순차적으로 채우는 흐름이 필요하다. 조건부 마감을 초안처럼 반복 생성하는 것으로 대체하지 않는다.
테스트 근거: tests/test_monthly_settlement_drafts.py, tests/test_settlement_draft_authority.py
판정 근거: 변경은 승인 binding을 무효화한다. 외부 drift에서도 최종화가 새 fingerprint 또는 review-needed guard로 차단되고 최신 자료로 자동 교체하지 않는다.
DEC-04 — satisfied
계약: 취소·정정은 원본 증빙과 이전 마감을 보존한다. 정정본은 자동 교체하지 않고 정정 마감은 새 run으로 연결한다.
구현 근거: jarca_ledger_mcp/application/settlement_draft_service.py, jarca_ledger_mcp/application/assets_service.py; service 63-91, 153-170, 352-369; authority and correction-parent tests
테스트 근거: tests/test_settlement_draft_authority.py, tests/test_settlement_draft_correction_contract.py
판정 근거: 정정 child는 검토 필요로 표시하고 자동 교체하지 않는다. 새 정정 run은 이전 run에 연결하며 기존 마감은 불변이다.
DEC-05 — satisfied
계약: 기존 계좌 이력, 자동 exact/as_of, 수동 자산·부채와 Dashboard/MCP 공통 서비스 경계를 유지한다. 거래 정산과 자산 마감은 분리한다.
구현 근거: jarca_ledger_mcp/application/settlement_draft_service.py, jarca_ledger_mcp/service.py, jarca_ledger_mcp/adapters/mcp/server.py, jarca_ledger_mcp/adapters/mcp/tool_contracts.py, jarca_ledger_mcp/adapters/streamlit/settlement_gateway.py, dashboard/page_views/settlement_drafts.py, dashboard/page_views/assets.py, dashboard/page_views/monthly_settlement.py; shared application entrypoints, thin MCP and Streamlit gateway, explicit panel actions; adapter and real MCP stdio tests
테스트 근거: tests/test_settlement_draft_adapters.py, tests/test_settlement_draft_mcp_runtime.py, tests/test_settlement_draft_dashboard.py, tests/test_settlement_draft_panel_workflow.py, tests/test_settlement_draft_panel_feedback.py, tests/test_settlement_draft_liability_registration.py
판정 근거: UI와 MCP는 공통 application에 위임한다. 자료 등록과 지정 및 해제, 저장과 취소, 검토와 승인 및 마감, 확정 조회와 정정 생성 경로를 제공한다.
DEC-06 — satisfied
계약: 문서 분류는 기존 계좌 평가·자산 마감 기능과 월정산 propagation의 동작/정책 확장이므로 기존 REQ-003을 갱신한다. 새 테이블/초안 lifecycle의 추가나 기존 문서의 제외 범위만으로 별도 ID를 만들지 않는다. 이는 문서 배치 판정이며 OQ의 제품 정책을 결정하지 않는다.
테스트 근거: tests/test_monthly_settlement_drafts.py, tests/test_settlement_draft_correction_contract.py
판정 근거: 무자료 생성은 run을 쓰지 않는다. 월말과 단일 활성 초안, 생성 재시도 및 정정 연결을 검증한다.
DEC-07 — satisfied
계약: 사용자 선택 — 활성 초안: 정산 월마다 활성 초안을 하나만 허용한다. 일반/정정 초안을 같은 제한으로 관리하고 완료·취소 후 새 초안을 열 수 있다. 이미 마감한 기준일의 새 초안은 이전 run과 정정 사유를 연결하며, 동일 키 재시도는 기존 초안을 반환하고 다른 요청의 중복 생성은 충돌한다.
테스트 근거: tests/test_monthly_settlement_drafts.py, tests/test_settlement_draft_correction_contract.py
판정 근거: 무자료 생성은 run을 쓰지 않는다. 월말과 단일 활성 초안, 생성 재시도 및 정정 연결을 검증한다.
DEC-09 — satisfied
계약: 사용자 선택 — 미확인 자료: 미확인 자료는 초안에서 선택·검토할 수 있으나 최종 금액에 반영하려면 append-only 확인/정정 자료를 명시적으로 다시 선택하고 재검토·승인해야 한다. 끝내 확인되지 않은 항목은 누락/제외로 표시하고 조건부 마감 시 그 누락을 승인한다. 기존 verified authority를 유지한다.
테스트 근거: tests/test_monthly_settlement_drafts.py, tests/test_settlement_draft_selection.py, tests/test_settlement_draft_contract_scenarios.py
판정 근거: 자동 미래 선택은 금지하고 직접 지정의 실제 날짜와 사유를 보존한다. 미확인 금액은 authority에서 제외하며 확인 child는 재선택한다.
DOC-REQ-structural — satisfied
계약: - 조치: 갱신 - 경로: docs/requirements/req-003_account-valuation-history.md - 문서 ID: REQ-003 - 제목: 계좌 기준일 평가 이력과 자산 마감 연동 - 변경 내용: 기존 ID·파일명·제목을 유지하고 초안 생성/편집/취소, 계좌별 직접 지정, 날짜 차이와 대체 승인, 대상 갱신, 검토 버전/fingerprint, 최종화·정정 초안 및 공통 adapter 요구사항/인수 기준을 추가한다. 미래 제외 규칙을 자동/직접 마감과 승인된 초안 예외로 분리한다. 월별 단일 활성 초안과 월말 기준일 검증을 추가하고 미확인 선택·검토는 허용하되 확인/정정 자료의 명시적 재선택·재검토·승인 전 금액 합산을 금지한다. 미확인으로 남은 항목은 누락/제외 및 조건부 누락 승인으로 처리한다. 기존 append-only, 정수/NULL, 대표 부채, no-fake-transaction, auth/menu·읽기 전용 계약을 유지한다. revision과 변경 이력을 갱신하고 기존 12/13 추적성을 보존하면서 이번 근거 15, 이번 구현 PR 미정을 구분한다. - 포함할 내용: 무자료 생성과 no-close, 같은 키 재사용/다른 payload 충돌, 일반/정정 통합 월별 단일 활성 초안, 완료/취소 후 재생성과 기존 마감의 정정 연결, 월말 고정 기준일과 입력 일치 검증, 대상의 명시적 갱신, 준비 상태와 금액의 NULL/0, 계좌/통화/목적/대표 부채 검증, exact/carried_before/manual_substitute와 자동 미래 금지, 이후 자료의 원본 날짜·사유·승인, 미확인 초안 선택/검토, 확인/정정 자료의 명시적 재선택·재검토·승인, 미확인 금액 합산 금지 및 미해소 항목의 승인된 누락/제외, 잠정 합계·완전성·누락/제외/대체 구분, 수동 자산/부채 보존 및 drift, 검토 이후 모든 의미 있는 변경의 재승인, 단일 트랜잭션과 동시 편집 충돌/no-partial-write, persisted evidence 기반 재시도, immutable close와 명시적 정정, 거래/자산 상태 분리, Dashboard/MCP 동등 동작, schema migration 및 기존 API/보안/legacy 회귀를 정상·경계·실패 사례로 명세한다. - 제외할 내용: 거래 완료/성과 추정 보장, FX/가격 API, 자동 승인·자동 미래 선택, 인증/메뉴 재설계, 실제 금융자료, 원본 날짜 변경 및 이력 삭제. - 근거: REQ-003.02/.06/.07/.08/.09의 기존 기능과 정책을 직접 확장하는 작업이다. 영속 초안이 새 aggregate라는 이유만으로 별도 REQ-004를 만들지 않고 현 작성 규칙에 따라 갱신한다. 동일 ID를 유지하므로 신규 ID 할당은 없다.
구현 근거: docs/requirements/req-003_account-valuation-history.md; exact approved path exists; metadata 1-13; requirements 53-181; new AC 201-539; old AC 541-648; traceability 665-667
테스트 근거: tests/test_settlement_draft_docs.py, tests/test_requirement_docs.py
판정 근거: 정본 경로와 문서 구조를 확인했다. REQ metadata 및 11개 번호 섹션, 영향 범위와 인수 기준 및 traceability는 trusted README와 TEMPLATE에 대조했다.
DOC-REQ-semantic — satisfied
계약: - 조치: 갱신 - 경로: docs/requirements/req-003_account-valuation-history.md - 문서 ID: REQ-003 - 제목: 계좌 기준일 평가 이력과 자산 마감 연동 - 변경 내용: 기존 ID·파일명·제목을 유지하고 초안 생성/편집/취소, 계좌별 직접 지정, 날짜 차이와 대체 승인, 대상 갱신, 검토 버전/fingerprint, 최종화·정정 초안 및 공통 adapter 요구사항/인수 기준을 추가한다. 미래 제외 규칙을 자동/직접 마감과 승인된 초안 예외로 분리한다. 월별 단일 활성 초안과 월말 기준일 검증을 추가하고 미확인 선택·검토는 허용하되 확인/정정 자료의 명시적 재선택·재검토·승인 전 금액 합산을 금지한다. 미확인으로 남은 항목은 누락/제외 및 조건부 누락 승인으로 처리한다. 기존 append-only, 정수/NULL, 대표 부채, no-fake-transaction, auth/menu·읽기 전용 계약을 유지한다. revision과 변경 이력을 갱신하고 기존 12/13 추적성을 보존하면서 이번 근거 15, 이번 구현 PR 미정을 구분한다. - 포함할 내용: 무자료 생성과 no-close, 같은 키 재사용/다른 payload 충돌, 일반/정정 통합 월별 단일 활성 초안, 완료/취소 후 재생성과 기존 마감의 정정 연결, 월말 고정 기준일과 입력 일치 검증, 대상의 명시적 갱신, 준비 상태와 금액의 NULL/0, 계좌/통화/목적/대표 부채 검증, exact/carried_before/manual_substitute와 자동 미래 금지, 이후 자료의 원본 날짜·사유·승인, 미확인 초안 선택/검토, 확인/정정 자료의 명시적 재선택·재검토·승인, 미확인 금액 합산 금지 및 미해소 항목의 승인된 누락/제외, 잠정 합계·완전성·누락/제외/대체 구분, 수동 자산/부채 보존 및 drift, 검토 이후 모든 의미 있는 변경의 재승인, 단일 트랜잭션과 동시 편집 충돌/no-partial-write, persisted evidence 기반 재시도, immutable close와 명시적 정정, 거래/자산 상태 분리, Dashboard/MCP 동등 동작, schema migration 및 기존 API/보안/legacy 회귀를 정상·경계·실패 사례로 명세한다. - 제외할 내용: 거래 완료/성과 추정 보장, FX/가격 API, 자동 승인·자동 미래 선택, 인증/메뉴 재설계, 실제 금융자료, 원본 날짜 변경 및 이력 삭제. - 근거: REQ-003.02/.06/.07/.08/.09의 기존 기능과 정책을 직접 확장하는 작업이다. 영속 초안이 새 aggregate라는 이유만으로 별도 REQ-004를 만들지 않고 현 작성 규칙에 따라 갱신한다. 동일 ID를 유지하므로 신규 ID 할당은 없다.
구현 근거: docs/requirements/req-003_account-valuation-history.md, jarca_ledger_mcp/application/settlement_draft_service.py; metadata 1-13; requirements 53-181; new AC 201-539; old AC 541-648; traceability 665-667
테스트 근거: tests/test_settlement_draft_docs.py, tests/test_monthly_settlement_drafts.py
판정 근거: REQ-003 ID와 제목 및 기존 추적성을 유지하며 기존 AC 10개 중 9개는 원문 보존, migration AC는 schema13 현재 버전으로 승인된 확장을 반영했다. v12 이름의 테스트도 실제 단언은 13이므로 stale verification으로 보지 않는다.
DOC-DM-structural — satisfied
계약: - 조치: 갱신 - 경로: docs/data-model.md - 변경 내용: 초안과 항목의 영속 엔터티를 추가해 초안→대상 항목, 항목→계좌/valuation, 초안→최종 run, 정정 초안→이전 run 관계와 필수/선택성·유일성·삭제 금지를 기록한다. 초안의 월·기준일·상태·작성자·시각·메모·버전·중복 키·완료 연결, 항목의 source identity·선택 자료·방식/사유·포함/제외·선택자·시각·버전·승인 결합 정보를 명세한다. 수동 자료는 검토 증거 값을 고정하고 원본 drift를 검출한다. 최종 run/rows에는 실제 날짜·방향 있는 차이·확인 상태·적용 금액·분류·사유·승인·누락/경고·초안 버전/fingerprint를 보존한다. 일반/정정 통합 정산 월별 활성 초안 유일성을 저장 제약과 동시성 검증으로 강제하고 완료·취소 이력은 보존한다. 월·기준일의 월말 일치 검증을 명세한다. 미확인 항목은 검토용 선택과 금액 authority를 분리하며 확인/정정 child의 명시적 재선택 후에만 합산한다. 미확인으로 남은 항목의 제외 사유와 누락 승인도 보존한다. 기존 correction/idempotency 제약, read alias와 nullable 금액 의미를 보존하고 schema 12→새 버전의 additive·반복 가능한 migration/legacy 조회/실패 및 백업 복구 경계를 문서화한다. - 근거: schema 12에는 초안/항목 persistence가 없으며 기존 account_valuations와 run/rows를 재사용·연결해야 한다. 원본 이력의 변경/삭제나 guessed migration은 필요하지 않다.
테스트 근거: tests/test_settlement_draft_docs.py, tests/test_requirement_docs.py
판정 근거: 정본 경로와 문서 구조를 확인했다. REQ metadata 및 11개 번호 섹션, 영향 범위와 인수 기준 및 traceability는 trusted README와 TEMPLATE에 대조했다.
DOC-DM-semantic — satisfied
계약: - 조치: 갱신 - 경로: docs/data-model.md - 변경 내용: 초안과 항목의 영속 엔터티를 추가해 초안→대상 항목, 항목→계좌/valuation, 초안→최종 run, 정정 초안→이전 run 관계와 필수/선택성·유일성·삭제 금지를 기록한다. 초안의 월·기준일·상태·작성자·시각·메모·버전·중복 키·완료 연결, 항목의 source identity·선택 자료·방식/사유·포함/제외·선택자·시각·버전·승인 결합 정보를 명세한다. 수동 자료는 검토 증거 값을 고정하고 원본 drift를 검출한다. 최종 run/rows에는 실제 날짜·방향 있는 차이·확인 상태·적용 금액·분류·사유·승인·누락/경고·초안 버전/fingerprint를 보존한다. 일반/정정 통합 정산 월별 활성 초안 유일성을 저장 제약과 동시성 검증으로 강제하고 완료·취소 이력은 보존한다. 월·기준일의 월말 일치 검증을 명세한다. 미확인 항목은 검토용 선택과 금액 authority를 분리하며 확인/정정 child의 명시적 재선택 후에만 합산한다. 미확인으로 남은 항목의 제외 사유와 누락 승인도 보존한다. 기존 correction/idempotency 제약, read alias와 nullable 금액 의미를 보존하고 schema 12→새 버전의 additive·반복 가능한 migration/legacy 조회/실패 및 백업 복구 경계를 문서화한다. - 근거: schema 12에는 초안/항목 persistence가 없으며 기존 account_valuations와 run/rows를 재사용·연결해야 한다. 원본 이력의 변경/삭제나 guessed migration은 필요하지 않다.
구현 근거: docs/data-model.md, jarca_ledger_mcp/application/settlement_draft_service.py; settlement draft entities and fields 178-195
테스트 근거: tests/test_settlement_draft_docs.py, tests/test_monthly_settlement_drafts.py
판정 근거: 승인된 필수 의미를 pinned 문서의 해당 섹션과 구현 및 참조 테스트에 대조했다.
DOC-IC-structural — satisfied
계약: - 조치: 갱신 - 경로: docs/interface-contract.md - 변경 내용: 공통 초안 생성·목록·상세·수정/대상 갱신·취소·계좌 자료 지정/해제·포함/제외·검토/검증·승인 최종화·정정 초안 operation을 정의하고 실제 구현의 snake_case 함수/MCP 도구/gateway 이름과 exact signature를 고정한다. 입력에는 초안/항목 ID·기대 버전, 월·기준일, 자료 ID·선택 방식·사유, 명시적 포함/제외와 사유, 생성/마감 키, 검토 fingerprint 및 승인자·시각/근거를 기록한다. 출력에는 준비 상태·버전, 대상/선택 증거, 날짜 차이·확인 상태, 잠정 합계·완전성·누락/승인 필요 목록, 완료 run/정정 연결과 persisted replay를 정의한다. 검증/대상 부재/상태·버전·증거 drift/승인 부족/키 충돌/동시 마감 오류의 조건·재시도·no-write를 명확히 한다. 기존 success/error_code/error, 자동 selector, 기존 close/report 키와 provenance 의미, Dashboard 인증 및 MCP 인증 범위를 보존한다. 초안 사용 시 직접 마감으로 안전 검증을 우회하지 못하는 경계를 규정한다. 생성·정정 생성은 같은 월의 활성 초안 중복을 검사하고 월말 아닌 입력 기준일은 거절한다. 미확인 선택은 검토용 상태를 반환하고 합계/최종화는 금액을 제외한다. 확인/정정 child를 명시적으로 다시 선택하면 버전·검토/승인을 갱신하고, 끝내 미확인인 항목은 누락/제외 승인 대상으로만 반환한다. - 근거: 기존 MCP/gateway에는 초안 mutation이 없고 현재 close는 basis-date 자료 자동 재조회 경로다. 새 공통 계약과 legacy 경로 구분이 필요하다.
구현 근거: docs/interface-contract.md; exact approved path exists; shared operation signatures and response, errors, read-only and evidence contract 438-466
테스트 근거: tests/test_settlement_draft_docs.py, tests/test_requirement_docs.py
판정 근거: 정본 경로와 문서 구조를 확인했다. REQ metadata 및 11개 번호 섹션, 영향 범위와 인수 기준 및 traceability는 trusted README와 TEMPLATE에 대조했다.
DOC-IC-semantic — satisfied
계약: - 조치: 갱신 - 경로: docs/interface-contract.md - 변경 내용: 공통 초안 생성·목록·상세·수정/대상 갱신·취소·계좌 자료 지정/해제·포함/제외·검토/검증·승인 최종화·정정 초안 operation을 정의하고 실제 구현의 snake_case 함수/MCP 도구/gateway 이름과 exact signature를 고정한다. 입력에는 초안/항목 ID·기대 버전, 월·기준일, 자료 ID·선택 방식·사유, 명시적 포함/제외와 사유, 생성/마감 키, 검토 fingerprint 및 승인자·시각/근거를 기록한다. 출력에는 준비 상태·버전, 대상/선택 증거, 날짜 차이·확인 상태, 잠정 합계·완전성·누락/승인 필요 목록, 완료 run/정정 연결과 persisted replay를 정의한다. 검증/대상 부재/상태·버전·증거 drift/승인 부족/키 충돌/동시 마감 오류의 조건·재시도·no-write를 명확히 한다. 기존 success/error_code/error, 자동 selector, 기존 close/report 키와 provenance 의미, Dashboard 인증 및 MCP 인증 범위를 보존한다. 초안 사용 시 직접 마감으로 안전 검증을 우회하지 못하는 경계를 규정한다. 생성·정정 생성은 같은 월의 활성 초안 중복을 검사하고 월말 아닌 입력 기준일은 거절한다. 미확인 선택은 검토용 상태를 반환하고 합계/최종화는 금액을 제외한다. 확인/정정 child를 명시적으로 다시 선택하면 버전·검토/승인을 갱신하고, 끝내 미확인인 항목은 누락/제외 승인 대상으로만 반환한다. - 근거: 기존 MCP/gateway에는 초안 mutation이 없고 현재 close는 basis-date 자료 자동 재조회 경로다. 새 공통 계약과 legacy 경로 구분이 필요하다.
구현 근거: docs/interface-contract.md, jarca_ledger_mcp/application/settlement_draft_service.py; shared operation signatures and response, errors, read-only and evidence contract 438-466
테스트 근거: tests/test_settlement_draft_docs.py, tests/test_monthly_settlement_drafts.py
판정 근거: 승인된 필수 의미를 pinned 문서의 해당 섹션과 구현 및 참조 테스트에 대조했다.
DOC-PS-structural — satisfied
계약: - 조치: 갱신 - 경로: docs/project-structure.md - 변경 내용: 기존 application/monthly_settlement_service.py의 read model을 보존하면서 초안 lifecycle의 application-layer 책임과 account_valuation_service.py(등록·검증·정정), assets_service.py(금액/증거·run 최종화), infrastructure/sqlite/schema.py/migrations.py(영속 제약/이주)의 소유권을 명확히 한다. service.py 공개 re-export, adapters/mcp/server.py/tool_contracts.py, adapters/streamlit gateway와 dashboard/page_views/monthly_settlement.py/assets.py의 연결을 실제 경로로 기록한다. 새 파일을 추가하면 그 exact 경로·책임·진입점을 문서에 반영하되 UI/MCP direct SQL, application의 Dashboard 역의존과 중복 업무 검증을 금지한다. 월별 활성 초안 유일성·월말 검증·미확인 금액 제외/확인 후 재선택의 책임을 공통 application과 SQLite 제약에 두고 adapter별 예외를 만들지 않는다. 각 변경에 대응하는 합성 테스트, 문서 검증과 기존 auth/menu/legacy 회귀 위치를 연결한다. - 근거: 기존 구조 문서는 service→SQLite와 page/tool→gateway/service 방향을 정본으로 규정한다. 새 초안 작업은 해당 책임 경계를 확장하며 별도 UI 전용 마감 로직을 만들지 않는다.
테스트 근거: tests/test_settlement_draft_docs.py, tests/test_requirement_docs.py
판정 근거: 정본 경로와 문서 구조를 확인했다. REQ metadata 및 11개 번호 섹션, 영향 범위와 인수 기준 및 traceability는 trusted README와 TEMPLATE에 대조했다.
DOC-PS-semantic — unsatisfied
계약: - 조치: 갱신 - 경로: docs/project-structure.md - 변경 내용: 기존 application/monthly_settlement_service.py의 read model을 보존하면서 초안 lifecycle의 application-layer 책임과 account_valuation_service.py(등록·검증·정정), assets_service.py(금액/증거·run 최종화), infrastructure/sqlite/schema.py/migrations.py(영속 제약/이주)의 소유권을 명확히 한다. service.py 공개 re-export, adapters/mcp/server.py/tool_contracts.py, adapters/streamlit gateway와 dashboard/page_views/monthly_settlement.py/assets.py의 연결을 실제 경로로 기록한다. 새 파일을 추가하면 그 exact 경로·책임·진입점을 문서에 반영하되 UI/MCP direct SQL, application의 Dashboard 역의존과 중복 업무 검증을 금지한다. 월별 활성 초안 유일성·월말 검증·미확인 금액 제외/확인 후 재선택의 책임을 공통 application과 SQLite 제약에 두고 adapter별 예외를 만들지 않는다. 각 변경에 대응하는 합성 테스트, 문서 검증과 기존 auth/menu/legacy 회귀 위치를 연결한다. - 근거: 기존 구조 문서는 service→SQLite와 page/tool→gateway/service 방향을 정본으로 규정한다. 새 초안 작업은 해당 책임 경계를 확장하며 별도 UI 전용 마감 로직을 만들지 않는다.
구현 근거: docs/project-structure.md, jarca_ledger_mcp/application/settlement_draft_service.py; ownership table 214-226; complete document contains no settlement_gateway.py or settlement_drafts.py, no public service re-export mapping, no tool_contracts.py mapping for the draft operations
테스트 근거: tests/test_settlement_draft_docs.py, tests/test_monthly_settlement_drafts.py
판정 근거: 승인된 문서 산출물 계약은 새 파일의 exact 경로와 책임 및 진입점, re-export와 tool-contract 연결 및 월별 유일성, 월말 검증, 미확인 금액 제외와 재선택의 공통 소유권을 요구한다. 신규 gateway와 공용 panel 및 연결 경로가 누락됐고 generic validation 설명만 있다. 해당 실제 경로와 연결 및 세 정책 책임을 기존 구조 문서에 보완해야 한다.
DOC-RF-structural — satisfied
계약: - 조치: 갱신 - 경로: docs/runtime-flow.md - 변경 내용: 인증→명시적 무자료 초안 생성→대상 동결→자료 등록/지정·해제/제외→읽기 전용 검토→버전·증거에 결합한 승인→동일 transaction에서 증거 재검증·run/rows 저장·초안 완료→불변 조회 흐름을 정의한다. 생성/정정 생성 guard는 일반/정정 통합 월별 단일 활성 초안과 월말 일치를 검증한다. 완료·취소 후 재생성은 가능하지만 기존 마감이 있으면 이전 run과 정정 사유를 연결한다. 미확인 자료 선택은 검토 필요로 전이하며 합계에는 포함하지 않는다. 확인/정정 자료를 명시적으로 재선택하면 재검토·재승인 후 최종화하고, 끝내 확인되지 않으면 누락/제외 및 조건부 누락 승인을 거친다. 변경/정정/대상 갱신은 승인을 무효화하고 검토 단계로 돌아간다. 취소는 기존 증거/run을 삭제하지 않으며 재마감은 이전 run 연결·사유·단일 correction 제약을 유지한다. 거래 준비와 자산 상태를 별도로 표시하고 외부 가격/환율 호출·추정 거래 생성은 없다. SQLite 동시 편집·키/버전 충돌, stale approval, 정정본 등장, 중복 최종화, DB 실패에 대해 no-partial-write·rollback·안전 재시도/사용자 재검토와 반환 오류를 기록한다. 관찰 정보는 초안/버전/run 상관 ID와 상태/경고 코드로 제한하고 credential/실제 계좌 자료를 로그에 남기지 않는다. - 근거: 현 runtime은 read-only preview→live authority 기반 close이며 영속 준비 단계가 없다. 기존 fingerprint drift·원자 저장·persisted replay guard를 초안 선택에 결합해 확장해야 한다.
테스트 근거: tests/test_settlement_draft_docs.py, tests/test_requirement_docs.py
판정 근거: 정본 경로와 문서 구조를 확인했다. REQ metadata 및 11개 번호 섹션, 영향 범위와 인수 기준 및 traceability는 trusted README와 TEMPLATE에 대조했다.
DOC-RF-semantic — unsatisfied
계약: - 조치: 갱신 - 경로: docs/runtime-flow.md - 변경 내용: 인증→명시적 무자료 초안 생성→대상 동결→자료 등록/지정·해제/제외→읽기 전용 검토→버전·증거에 결합한 승인→동일 transaction에서 증거 재검증·run/rows 저장·초안 완료→불변 조회 흐름을 정의한다. 생성/정정 생성 guard는 일반/정정 통합 월별 단일 활성 초안과 월말 일치를 검증한다. 완료·취소 후 재생성은 가능하지만 기존 마감이 있으면 이전 run과 정정 사유를 연결한다. 미확인 자료 선택은 검토 필요로 전이하며 합계에는 포함하지 않는다. 확인/정정 자료를 명시적으로 재선택하면 재검토·재승인 후 최종화하고, 끝내 확인되지 않으면 누락/제외 및 조건부 누락 승인을 거친다. 변경/정정/대상 갱신은 승인을 무효화하고 검토 단계로 돌아간다. 취소는 기존 증거/run을 삭제하지 않으며 재마감은 이전 run 연결·사유·단일 correction 제약을 유지한다. 거래 준비와 자산 상태를 별도로 표시하고 외부 가격/환율 호출·추정 거래 생성은 없다. SQLite 동시 편집·키/버전 충돌, stale approval, 정정본 등장, 중복 최종화, DB 실패에 대해 no-partial-write·rollback·안전 재시도/사용자 재검토와 반환 오류를 기록한다. 관찰 정보는 초안/버전/run 상관 ID와 상태/경고 코드로 제한하고 credential/실제 계좌 자료를 로그에 남기지 않는다. - 근거: 현 runtime은 read-only preview→live authority 기반 close이며 영속 준비 단계가 없다. 기존 fingerprint drift·원자 저장·persisted replay guard를 초안 선택에 결합해 확장해야 한다.
구현 근거: docs/runtime-flow.md, jarca_ledger_mcp/application/settlement_draft_service.py; lifecycle and failure/recovery guards 243-259; complete runtime document has no cancel transition or cancellation preservation and reopen behavior; source 202-211, 394-396 and lifecycle test 90-98 implement them
테스트 근거: tests/test_settlement_draft_docs.py, tests/test_monthly_settlement_drafts.py
판정 근거: 승인된 런타임 산출물 계약은 취소 시 기존 증거와 run 보존, 완료 또는 취소 뒤 월 활성 슬롯 재사용, 기존 마감이 있으면 정정 연결과 사유를 요구한다. 현재 흐름은 create부터 finalize까지만 기록한다. 취소의 상태와 버전 guard, actor 및 reason, 승인 무효화와 보존 및 재생성 경계를 실제 구현에 맞게 보완해야 한다. 코드 결함이나 새 기능 요구가 아니라 승인된 문서 누락이다.
BASE-REQ-003.01-AC01 — satisfied
계약: REQ-003.01-AC01 — migration and preservation Cases (정상/경계/실패): 정상 schema 12 init twice; 경계 schema 11 legacy DB; 실패 malformed legacy DB. State Invariants: legacy tables/rows remain; migration repeats without duplicate columns. 판정 기준: schema_version=12, required tables/columns/indexes exist and old rows remain. 검증: tests/test_account_valuations.py::test_account_valuation_schema_is_v12_and_idempotent, tests/test_issue_12_regressions.py::test_schema12_migration_preserves_legacy_rows_indexes_and_is_idempotent. 검증 분류: level=integration; backend=sqlite
구현 근거: docs/requirements/req-003_account-valuation-history.md; REQ current AC REQ-003.01-AC01; pinned base and head whole block comparison; referenced existing test bodies reviewed
테스트 근거: tests/test_account_valuations.py, tests/test_issue_12_regressions.py, tests/test_contract_regression.py, tests/test_service.py
판정 근거: schema 11 legacy 보존 및 반복 초기화와 malformed failure 의미를 유지하고 현재 schema_version만 12에서 13으로 승인된 additive migration에 맞춰 변경했다. 참조 테스트는 실제로 13을 단언한다.
구현 근거: docs/requirements/req-003_account-valuation-history.md; REQ current AC REQ-003.02-AC01; pinned base and head whole block comparison; referenced existing test bodies reviewed
테스트 근거: tests/test_account_valuations.py, tests/test_issue_12_regressions.py, tests/test_contract_regression.py, tests/test_service.py
판정 근거: 기존 인수 판정과 검증 및 상태 불변조건을 원문 그대로 보존했다.
BASE-REQ-003.03-AC01 — satisfied
계약: REQ-003.03-AC01 — idempotent correction Cases (정상/경계/실패): same payload reuse; different payload conflict; second correction fails. State Invariants: one row/child per operation and original immutable. 판정 기준: exact error codes and count 2 after one correction. 검증: tests/test_account_valuations.py::test_register_same_idempotency_payload_reuses_row_and_changed_payload_conflicts, tests/test_account_valuations.py::test_correction_is_append_only_reasoned_and_single_child, tests/test_issue_12_regressions.py::test_empty_conditional_close_is_closed_and_second_close_requires_correction. 검증 분류: level=integration; backend=sqlite
구현 근거: docs/requirements/req-003_account-valuation-history.md; REQ current AC REQ-003.03-AC01; pinned base and head whole block comparison; referenced existing test bodies reviewed
테스트 근거: tests/test_account_valuations.py, tests/test_issue_12_regressions.py, tests/test_contract_regression.py, tests/test_service.py
판정 근거: 기존 인수 판정과 검증 및 상태 불변조건을 원문 그대로 보존했다.
BASE-REQ-003.04-AC01 — satisfied
계약: REQ-003.04-AC01 — precision and representative loan Cases (정상/경계/실패): integer zero; NULL optional metrics; loan missing definition rejected. State Invariants: no float amount and no double sum. 판정 기준: optional fields round-trip exactly and loan definition validation is enforced. 검증: test_correction_preserves_optional_fields_unless_overridden, _validate_common() and schema static checks. 검증 분류: level=static; backend=sqlite
구현 근거: docs/requirements/req-003_account-valuation-history.md; REQ current AC REQ-003.04-AC01; pinned base and head whole block comparison; referenced existing test bodies reviewed
테스트 근거: tests/test_account_valuations.py, tests/test_issue_12_regressions.py, tests/test_contract_regression.py, tests/test_service.py
판정 근거: 기존 인수 판정과 검증 및 상태 불변조건을 원문 그대로 보존했다.
BASE-REQ-003.05-AC01 — satisfied
계약: REQ-003.05-AC01 — authority separation Cases (정상/경계/실패): dated candidate; late historical candidate; name-only update. State Invariants: current/latest display cannot roll backward and candidate is unverified. 판정 기준: dated account write creates only unverified candidate; name-only does not. 검증: test_account_balance_write_records_unverified_candidate_only_with_real_basis_date, test_account_name_only_update_does_not_create_candidate. 검증 분류: level=unit; backend=application
구현 근거: docs/requirements/req-003_account-valuation-history.md; REQ current AC REQ-003.05-AC01; pinned base and head whole block comparison; referenced existing test bodies reviewed
테스트 근거: tests/test_account_valuations.py, tests/test_issue_12_regressions.py, tests/test_contract_regression.py, tests/test_service.py
판정 근거: 기존 인수 판정과 검증 및 상태 불변조건을 원문 그대로 보존했다.
BASE-REQ-003.06-AC01 — satisfied
계약: REQ-003.06-AC01 — preview and approval Cases (정상/경계/실패): complete exact close; incomplete draft; missing approval rejected. State Invariants: preview row count unchanged; no unsafe evidence approved. 판정 기준: preview is read-only and close returns conditional_approval_required without metadata. 검증: test_manual_asset_update_deactivate_preview_and_close_correction_policy, preview_asset_snapshot_close(). 검증 분류: level=integration; backend=application
구현 근거: docs/requirements/req-003_account-valuation-history.md; REQ current AC REQ-003.06-AC01; pinned base and head whole block comparison; referenced existing test bodies reviewed
테스트 근거: tests/test_account_valuations.py, tests/test_issue_12_regressions.py, tests/test_contract_regression.py, tests/test_service.py
판정 근거: 기존 인수 판정과 검증 및 상태 불변조건을 원문 그대로 보존했다.
BASE-REQ-003.07-AC01 — satisfied
계약: REQ-003.07-AC01 — immutable close correction Cases (정상/경계/실패): first close; same-date correction; second unreasoned close. State Invariants: old run/rows remain and latest run alone reports. 판정 기준: correction_of_run_id, count, and net worth match. 검증: test_manual_asset_update_deactivate_preview_and_close_correction_policy, assets_service.py close path. 검증 분류: level=integration; backend=sqlite
구현 근거: docs/requirements/req-003_account-valuation-history.md; REQ current AC REQ-003.07-AC01; pinned base and head whole block comparison; referenced existing test bodies reviewed
테스트 근거: tests/test_account_valuations.py, tests/test_issue_12_regressions.py, tests/test_contract_regression.py, tests/test_service.py
판정 근거: 기존 인수 판정과 검증 및 상태 불변조건을 원문 그대로 보존했다.
BASE-REQ-003.08-AC01 — satisfied
계약: REQ-003.08-AC01 — reconciliation/monthly Cases (정상/경계/실패): regular ledger calculation; verified investment; missing baseline. State Invariants: no fake transaction; provenance fields present; monthly read is non-mutating. 판정 기준: status VALUATION_MANAGED for verified investment and monthly summary reads report. 검증: tests/test_service.py::test_statement_status_account_update_and_balance_reconciliation, tests/test_issue_12_regressions.py::test_reconciliation_uses_corrected_investment_leaf_without_transaction_count_change, tests/test_service.py::test_monthly_settlement_summary_read_model_foundation. 검증 분류: level=unit; backend=application
구현 근거: docs/requirements/req-003_account-valuation-history.md; REQ current AC REQ-003.08-AC01; pinned base and head whole block comparison; referenced existing test bodies reviewed
테스트 근거: tests/test_account_valuations.py, tests/test_issue_12_regressions.py, tests/test_contract_regression.py, tests/test_service.py
판정 근거: 기존 인수 판정과 검증 및 상태 불변조건을 원문 그대로 보존했다.
BASE-REQ-003.09-AC01 — satisfied
계약: REQ-003.09-AC01 — shared adapters and auth Cases (정상/경계/실패): MCP stdio/http config; authenticated Dashboard render; unauthenticated gate. State Invariants: auth precedes DB; render does not write; response envelope has success. 판정 기준: actual tool/gateway names resolve and existing auth/menu tests pass. 검증: tests/test_mcp_http_runtime.py, tests/test_dashboard_authentication_app.py, tests/test_dashboard_menu_transition.py, server.py and gateways. 검증 분류: level=integration; backend=dashboard
구현 근거: docs/requirements/req-003_account-valuation-history.md; REQ current AC REQ-003.09-AC01; pinned base and head whole block comparison; referenced existing test bodies reviewed
테스트 근거: tests/test_account_valuations.py, tests/test_issue_12_regressions.py, tests/test_contract_regression.py, tests/test_service.py
판정 근거: 기존 인수 판정과 검증 및 상태 불변조건을 원문 그대로 보존했다.
BASE-REQ-003.10-AC01 — satisfied
계약: REQ-003.10-AC01 — privacy and compatibility Cases (정상/경계/실패): synthetic fixture; redaction search; actual secret/data detection. State Invariants: no credential/token/cookie/real financial data in docs/tests/evidence. 판정 기준: semantic inventory missing=0 and ambiguous=0; placeholder=0. 검증: tests/test_requirement_docs.py, auth/menu evidence tests, repository redaction/static search. 검증 분류: level=static; backend=dashboard
구현 근거: docs/requirements/req-003_account-valuation-history.md; REQ current AC REQ-003.10-AC01; pinned base and head whole block comparison; referenced existing test bodies reviewed
테스트 근거: tests/test_account_valuations.py, tests/test_issue_12_regressions.py, tests/test_contract_regression.py, tests/test_service.py
판정 근거: 기존 인수 판정과 검증 및 상태 불변조건을 원문 그대로 보존했다.
범위 판정
누락: 프로젝트 구조 문서에 신규 gateway와 공용 panel의 exact 경로 및 연결과 공통 정책 소유권 누락, 런타임 문서에 취소와 보존 및 월 활성 슬롯 재생성 흐름 누락
범위 초과: 없음
명세 모순: 없음
결론
핵심 초안 lifecycle과 승인 및 원자적 최종화 구현은 확인했다. 승인된 필수 문서의 프로젝트 구조 연결과 런타임 취소 및 재생성 흐름 누락 두 건 때문에 request_changes다. 해당 두 정본 문서만 실제 구현과 승인 계약에 맞게 보완하는 것이 최소 요청이다. 생산자 exact-head 검증은 396 passed, 4 skipped 및 lint 통과이며 reviewer의 제품 독립 실행이나 CI 성공으로 표현하지 않는다. schema12만을 입력으로 한 별도 실행은 확인하지 않았으나 공통 additive DDL 및 기존 회귀 근거를 함께 검토했고 그 부재만으로 추가 필수 테스트를 요구하지 않는다.
## 구현 명세 적합성 검토
- Source Issue: #15
- Pull Request: #16
- Reviewed head: `4c5cb0627cdc1aa68b5ef4f51411d4563b0c8199`
- Contract SHA-256: `347e1e9d4ef3514754f93515ccfe71d94daa880bcd4129ad3fc1989c53b0641c`
- Verdict: `request_changes`
### Acceptance criteria 판정
- `IN-01` — `satisfied`
- 계약: 초안 ID, 정산 월·기준일, 상태, 생성자·생성/변경 시각, 메모, 동시 편집 버전, 생성 중복 방지 키, 최종 마감 ID 및 정정 관계를 영속 저장한다. 자료가 없어도 생성·저장할 수 있고 생성 자체로 마감 run이나 확정 금액을 만들지 않는다. 정산 월별 활성 초안은 일반/정정 구분 없이 하나로 제한하고, 완료·취소 후 새 초안을 열 수 있다. 생성 키 재시도는 같은 초안을 반환하고 다른 요청의 활성 중복은 충돌한다. 이미 마감한 기준일의 새 초안은 이전 run과 정정 사유를 연결한다. 정산 기준일은 해당 월말로 고정하며 입력한 날짜도 월말과 일치하는지 검증한다.
- 구현 근거: jarca_ledger_mcp/application/settlement_draft_service.py, jarca_ledger_mcp/infrastructure/sqlite/migrations.py; service 153-185, 394-396; migration 21-45; tests 54-98, 262-277
- 테스트 근거: tests/test_monthly_settlement_drafts.py, tests/test_settlement_draft_correction_contract.py
- 판정 근거: 무자료 생성은 run을 쓰지 않는다. 월말과 단일 활성 초안, 생성 재시도 및 정정 연결을 검증한다.
- `IN-02` — `satisfied`
- 계약: 초안의 정산 대상 계좌·자산·부채와 포함/제외 여부·사유를 관리한다. 계좌별 valuation_id, 선택 방식·사유, 선택자·시각, 항목 버전, 대체 승인 근거와 준비 상태를 저장한다. 새로운 계좌·대상 변경을 자동 반영하지 않고 명시적 대상 갱신으로만 반영하며 기존 선택과 승인에 미치는 차이를 검토한다.
- 구현 근거: jarca_ledger_mcp/application/settlement_draft_service.py; service 63-140, 219-258, 261-307; frozen-target and refresh tests
- 테스트 근거: tests/test_monthly_settlement_drafts.py, tests/test_settlement_draft_authority.py
- 판정 근거: 대상 동결과 명시적 갱신, 포함 및 제외 사유와 선택 감사 정보를 보존한다.
- `IN-03` — `satisfied`
- 계약: 기존 평가 등록·조회·정정 기능을 재사용한다. 선택한 자료의 계좌 소속, 통화, 평가 목적과 대표 부채 정의를 검증하고 계좌별 대표 합산 금액은 하나만 사용한다. 투자 원금·현금성 잔액·평가액을 중복 합산하지 않는다. 증빙/등록 중복 방지와 append-only 정정을 보존한다.
- 구현 근거: jarca_ledger_mcp/application/settlement_draft_service.py, jarca_ledger_mcp/application/assets_service.py, jarca_ledger_mcp/application/account_valuation_service.py; service 261-307; contract scenario 56-73; representative and liability registration tests
- 테스트 근거: tests/test_settlement_draft_selection.py, tests/test_settlement_draft_contract_scenarios.py
- 판정 근거: 기존 등록과 정정 검증을 재사용하고 계좌별 대표 정수 금액만 합산한다.
- `IN-04` — `satisfied`
- 계약: exact는 같은 기준일의 확인 자료, carried_before는 이전 확인 자료의 승인된 이월, manual_substitute는 특정 자료의 명시적 직접 지정이다. 자동 선택은 이후 날짜 자료를 선택하지 않는다. 수동 대체는 실제 날짜·방향을 포함한 날짜 차이·사유·승인을 보존한다. 등록일과 평가 기준일을 구분한다. 미확인 자료는 초안 선택·검토용으로 보존하되 잠정 합계의 authority 금액에 포함하지 않고 확인 필요 상태로 표시한다. 최종 합산하려면 append-only 확인/정정 자료를 사용자가 명시적으로 다시 선택하고 재검토·승인한다. 끝내 미확인인 항목은 누락/제외로 표시하고 조건부 마감 시 그 누락을 승인한다. 확인 승인을 이유로 원본 verification_status를 덮어쓰지 않는다.
- 구현 근거: jarca_ledger_mcp/application/settlement_draft_service.py, jarca_ledger_mcp/application/assets_service.py; service 93-140, 261-307; tests 136-175; contract scenario 76-94
- 테스트 근거: tests/test_monthly_settlement_drafts.py, tests/test_settlement_draft_selection.py, tests/test_settlement_draft_contract_scenarios.py
- 판정 근거: 자동 미래 선택은 금지하고 직접 지정의 실제 날짜와 사유를 보존한다. 미확인 금액은 authority에서 제외하며 확인 child는 재선택한다.
- `IN-05` — `satisfied`
- 계약: 초안 조회·검토·미리보기에서 대상/제외 목록, 자료 ID, 대표 금액·통화·자산/부채 분류, 실제 평가일, 선택 방식·날짜 차이, 증빙 출처·확인 상태, 선택/대체/제외 사유, 누락·승인 필요 항목, 잠정 총자산·총부채·순자산을 제공한다. 미선택 금액은 0으로 표시하지 않고 자료 완전성, 미등록 부채 및 대체 포함 여부를 명시한다.
- 구현 근거: jarca_ledger_mcp/application/settlement_draft_service.py, jarca_ledger_mcp/application/assets_service.py, jarca_ledger_mcp/application/monthly_settlement_service.py; service 93-140, 375-387; contract scenario 32-54, 119-173; read-model tests 9-35
- 테스트 근거: tests/test_settlement_draft_contract_scenarios.py, tests/test_settlement_draft_read_models.py
- 판정 근거: NULL과 0, 준비 상태와 제외 및 누락, 원본 날짜 및 날짜 방향과 잠정 합계가 응답과 마감 읽기 모델에 전파된다.
- `IN-06` — `satisfied`
- 계약: 최종 마감은 사용자가 검토한 초안 버전과 선택 증거를 고정한다. 승인 뒤 대상·선택·사유·금액/분류·경고 또는 관련 증거가 달라지면 기존 승인을 사용할 수 없다. 계좌의 현재값이나 최신 정정본으로 조용히 다시 선택하지 않는다.
- 구현 근거: jarca_ledger_mcp/application/settlement_draft_service.py; service 63-140, 202-211, 319-360; tests 191-202; authority drift scenarios
- 테스트 근거: tests/test_monthly_settlement_drafts.py, tests/test_settlement_draft_authority.py
- 판정 근거: 변경은 승인 binding을 무효화한다. 외부 drift에서도 최종화가 새 fingerprint 또는 review-needed guard로 차단되고 최신 자료로 자동 교체하지 않는다.
- `IN-07` — `satisfied`
- 계약: 초안 최종 상태 전이, 연결된 asset_snapshot_runs 및 asset_snapshots 저장을 하나의 트랜잭션으로 처리한다. 중복 클릭/동일 요청 재시도는 같은 마감을 반환하고 다른 payload의 키 재사용은 충돌한다. 실패 시 부분 마감과 완료 초안이 남지 않는다.
- 구현 근거: jarca_ledger_mcp/application/settlement_draft_service.py; service 338-391; tests 204-247; contract scenario 145-173
- 테스트 근거: tests/test_monthly_settlement_drafts.py, tests/test_settlement_draft_contract_scenarios.py
- 판정 근거: 하나의 BEGIN IMMEDIATE에서 run과 rows 및 초안 완료를 저장한다. 실패 rollback과 동시 재시도 persisted response를 검증한다.
- `IN-08` — `satisfied`
- 계약: 원본 초안 ID·버전, 월·기준일, 적용 자료/금액/통화/분류, 실제 날짜·선택 방식·날짜 차이, 증빙/확인 상태, 포함·제외·대체 사유, 승인자·시각·근거와 누락/경고를 마감 이력에 보존한다. 완전한 exact 마감, 이월·대체 포함, 승인된 누락을 별도로 식별한다. 대체 사용과 누락은 하나의 모호한 상태로 합치지 않는다.
- 구현 근거: jarca_ledger_mcp/application/settlement_draft_service.py, jarca_ledger_mcp/application/assets_service.py, jarca_ledger_mcp/application/monthly_settlement_service.py; service 365-387; assets 424-464, 1046-1060; scenario 32-54, 167-173
- 테스트 근거: tests/test_settlement_draft_contract_scenarios.py, tests/test_settlement_draft_read_models.py, tests/test_settlement_draft_audit_reproductions.py
- 판정 근거: 마감 증거는 초안 버전과 날짜, 승인 flags 및 제외 사유를 고정한다. 대체와 승인된 누락은 독립 flags이며 readiness와 included, exclusion_reason으로 누락과 명시적 제외도 구분 가능하다.
- `IN-09` — `satisfied`
- 계약: 초안에서 선택 자료에 정정본이 생기면 검토 필요를 표시하고 사용자가 교체 여부를 결정한다. 확정 마감은 이후 평가 등록·정정으로 변경하지 않는다. 명시적 정정 초안과 사유로 새 마감을 이전 run에 연결하며 이전 기록을 보존한다.
- 구현 근거: jarca_ledger_mcp/application/settlement_draft_service.py, jarca_ledger_mcp/application/assets_service.py; service 63-91, 153-170, 352-369; authority and correction-parent tests
- 테스트 근거: tests/test_settlement_draft_authority.py, tests/test_settlement_draft_correction_contract.py
- 판정 근거: 정정 child는 검토 필요로 표시하고 자동 교체하지 않는다. 새 정정 run은 이전 run에 연결하며 기존 마감은 불변이다.
- `IN-10` — `satisfied`
- 계약: 기존 수동 자산·부채도 대상과 합계에 포함한다. 검토 당시의 값·날짜·분류·출처를 증거로 고정하고 원본 변경을 drift로 검출한다. 갱신하려면 명시적 재검토를 거치며 마감 때 live 값을 몰래 재사용하지 않는다. 수동 자료의 자동 날짜 선택은 기존 exact/as_of 제한을 유지한다.
- 구현 근거: jarca_ledger_mcp/application/settlement_draft_service.py, jarca_ledger_mcp/application/assets_service.py; service 63-140, 219-258; tests 177-188; manual drift authority scenarios
- 테스트 근거: tests/test_monthly_settlement_drafts.py, tests/test_settlement_draft_authority.py
- 판정 근거: 수동 자산과 부채는 frozen source에 결합하고 원본 변경을 drift로 검출하며 명시적 갱신이 필요하다.
- `IN-11` — `satisfied`
- 계약: Dashboard에서 생성·목록·상세·저장·취소, 계좌 자료 조회·등록·지정·해제, 포함/제외 및 사유 수정, 검토·승인·최종 마감, 확정 조회·정정 초안 생성을 제공한다. MCP도 같은 작업을 공통 application service로 제공한다.
- 구현 근거: jarca_ledger_mcp/application/settlement_draft_service.py, jarca_ledger_mcp/service.py, jarca_ledger_mcp/adapters/mcp/server.py, jarca_ledger_mcp/adapters/mcp/tool_contracts.py, jarca_ledger_mcp/adapters/streamlit/settlement_gateway.py, dashboard/page_views/settlement_drafts.py, dashboard/page_views/assets.py, dashboard/page_views/monthly_settlement.py; shared application entrypoints, thin MCP and Streamlit gateway, explicit panel actions; adapter and real MCP stdio tests
- 테스트 근거: tests/test_settlement_draft_adapters.py, tests/test_settlement_draft_mcp_runtime.py, tests/test_settlement_draft_dashboard.py, tests/test_settlement_draft_panel_workflow.py, tests/test_settlement_draft_panel_feedback.py, tests/test_settlement_draft_liability_registration.py
- 판정 근거: UI와 MCP는 공통 application에 위임한다. 자료 등록과 지정 및 해제, 저장과 취소, 검토와 승인 및 마감, 확정 조회와 정정 생성 경로를 제공한다.
- `IN-12` — `satisfied`
- 계약: 합성 자료로 원본 수락 기준을 검증한다. 특히 2026-09 초안에 2026-10-05/07 자료 직접 지정, 늦게 등록한 2026-09-30 자료의 exact 구분, 자동 미래 선택 금지, 승인 후 변경 차단, 정정·동시 편집·재시도·트랜잭션 실패와 기존 API/마이그레이션 회귀를 포함한다.
- 구현 근거: jarca_ledger_mcp/application/settlement_draft_service.py, jarca_ledger_mcp/application/assets_service.py, jarca_ledger_mcp/infrastructure/sqlite/migrations.py, jarca_ledger_mcp/application/monthly_settlement_service.py; producer full-suite at exact reviewed head: 396 passed, 4 skipped, 1 warning; lint passed; manifest and all 163 source blobs independently matched
- 테스트 근거: tests/test_monthly_settlement_drafts.py, tests/test_settlement_draft_contract_scenarios.py, tests/test_settlement_draft_authority.py, tests/test_settlement_draft_selection.py, tests/test_settlement_draft_correction_contract.py, tests/test_ledger_categories.py, tests/test_review_decision_workbench.py
- 판정 근거: 제품 테스트는 생산자가 실행했고 reviewer는 source와 테스트 및 실행 기록을 읽기 전용 검증했다. PDF sample 4개 skip은 기존 환경 한계이며 새 feature 검증을 대체하지 않는다.
- `EX-01` — `satisfied`
- 계약: 거래 분류 완료 보장, 실제 월말 평가액 역산, 투자 성과 추정, 자산 증감을 수입·지출/투자 수익 거래로 자동 생성하는 기능.
- 구현 근거: jarca_ledger_mcp/application/settlement_draft_service.py, jarca_ledger_mcp/application/assets_service.py, jarca_ledger_mcp/application/monthly_settlement_service.py; exact base-to-head 38-file scope review and immutable source; no transaction insert or external price call introduced
- 테스트 근거: tests/test_settlement_draft_contract_scenarios.py, tests/test_settlement_draft_authority.py, tests/test_settlement_draft_correction_contract.py
- 판정 근거: 제외된 가격 및 FX, 자동 승인, 거래 생성, 기존 이력 삭제, 인증과 메뉴 재설계는 추가하지 않았다. Discovery 단계 제한은 후속 구현 PR 생성 금지가 아니다.
- `EX-02` — `satisfied`
- 계약: 외부 가격 API, 새 환율 변환 정책, 자동 승인, 실제 계좌번호·금융자료·credential을 문서나 fixture에 저장하는 작업.
- 구현 근거: jarca_ledger_mcp/application/settlement_draft_service.py, jarca_ledger_mcp/application/assets_service.py, jarca_ledger_mcp/application/monthly_settlement_service.py; exact base-to-head 38-file scope review and immutable source; no transaction insert or external price call introduced
- 테스트 근거: tests/test_settlement_draft_contract_scenarios.py, tests/test_settlement_draft_authority.py, tests/test_settlement_draft_correction_contract.py
- 판정 근거: 제외된 가격 및 FX, 자동 승인, 거래 생성, 기존 이력 삭제, 인증과 메뉴 재설계는 추가하지 않았다. Discovery 단계 제한은 후속 구현 PR 생성 금지가 아니다.
- `EX-03` — `satisfied`
- 계약: Dashboard 인증·쿠키/logout 또는 메뉴 순서 재설계, MCP 인증의 신규 도입.
- 구현 근거: jarca_ledger_mcp/application/settlement_draft_service.py, jarca_ledger_mcp/application/assets_service.py, jarca_ledger_mcp/application/monthly_settlement_service.py; exact base-to-head 38-file scope review and immutable source; no transaction insert or external price call introduced
- 테스트 근거: tests/test_settlement_draft_contract_scenarios.py, tests/test_settlement_draft_authority.py, tests/test_settlement_draft_correction_contract.py
- 판정 근거: 제외된 가격 및 FX, 자동 승인, 거래 생성, 기존 이력 삭제, 인증과 메뉴 재설계는 추가하지 않았다. Discovery 단계 제한은 후속 구현 PR 생성 금지가 아니다.
- `EX-04` — `satisfied`
- 계약: 초안 취소에 따른 원본 평가·마감 이력 삭제, 기존 마감 덮어쓰기, 원본 평가일 소급 변경.
- 구현 근거: jarca_ledger_mcp/application/settlement_draft_service.py, jarca_ledger_mcp/application/assets_service.py, jarca_ledger_mcp/application/monthly_settlement_service.py; exact base-to-head 38-file scope review and immutable source; no transaction insert or external price call introduced
- 테스트 근거: tests/test_settlement_draft_contract_scenarios.py, tests/test_settlement_draft_authority.py, tests/test_settlement_draft_correction_contract.py
- 판정 근거: 제외된 가격 및 FX, 자동 승인, 거래 생성, 기존 이력 삭제, 인증과 메뉴 재설계는 추가하지 않았다. Discovery 단계 제한은 후속 구현 PR 생성 금지가 아니다.
- `EX-05` — `satisfied`
- 계약: 정산 월의 월말과 다른 기준일, 같은 월의 복수 활성 초안, 미확인 자료의 단순 사용 승인만으로 금액을 최종 합산하는 경로.
- 구현 근거: jarca_ledger_mcp/application/settlement_draft_service.py, jarca_ledger_mcp/application/assets_service.py, jarca_ledger_mcp/application/monthly_settlement_service.py; exact base-to-head 38-file scope review and immutable source; no transaction insert or external price call introduced
- 테스트 근거: tests/test_settlement_draft_contract_scenarios.py, tests/test_settlement_draft_authority.py, tests/test_settlement_draft_correction_contract.py
- 판정 근거: 제외된 가격 및 FX, 자동 승인, 거래 생성, 기존 이력 삭제, 인증과 메뉴 재설계는 추가하지 않았다. Discovery 단계 제한은 후속 구현 PR 생성 금지가 아니다.
- `EX-06` — `satisfied`
- 계약: Discovery 단계의 제품 코드·요구사항명세서·설계문서 작성 또는 수정, PR/브랜치 생성. 아래 산출물은 후속 구현 시의 문서 계약이다.
- 구현 근거: jarca_ledger_mcp/application/settlement_draft_service.py, jarca_ledger_mcp/application/assets_service.py, jarca_ledger_mcp/application/monthly_settlement_service.py; exact base-to-head 38-file scope review and immutable source; no transaction insert or external price call introduced
- 테스트 근거: tests/test_settlement_draft_contract_scenarios.py, tests/test_settlement_draft_authority.py, tests/test_settlement_draft_correction_contract.py
- 판정 근거: 제외된 가격 및 FX, 자동 승인, 거래 생성, 기존 이력 삭제, 인증과 메뉴 재설계는 추가하지 않았다. Discovery 단계 제한은 후속 구현 PR 생성 금지가 아니다.
- `CON-01` — `satisfied`
- 계약: 조사 기준은 main의 고정 revision 68212e773b94dd89b6c036e6616759542c178de3이다. Gitea authoritative SHA와 갱신한 bare cache의 local ref를 비교했다.
- 구현 근거: docs/requirements/req-003_account-valuation-history.md; pinned base and default branch 68212e773b94dd89b6c036e6616759542c178de3
- 테스트 근거: tests/test_monthly_settlement_drafts.py
- 판정 근거: authoritative API와 cache base SHA 일치를 확인했다.
- `CON-02` — `satisfied`
- 계약: SQLite schema 12에서 additive migration하며 기존 테이블·행·이력·인덱스의 의미를 보존한다. 실제 새 스키마 버전 및 물리 필드는 구현 결과와 함께 문서화하고 기존 자료를 추정 이주하지 않는다.
- 구현 근거: jarca_ledger_mcp/infrastructure/sqlite/migrations.py, jarca_ledger_mcp/infrastructure/sqlite/schema.py, docs/data-model.md; migrate_db 19-45, 120-147, 198; schema13 idempotency test 249-260 and schema11 preservation regression; exact-head source delta
- 테스트 근거: tests/test_monthly_settlement_drafts.py, tests/test_issue_12_regressions.py, tests/test_account_valuations.py
- 판정 근거: 신규 테이블과 run lineage 컬럼만 additive하게 확장하며 기존 rows와 인덱스를 삭제하지 않는다. schema12 입력의 별도 실행은 없으나 공통 무조건 additive DDL과 기존 이력 및 반복 초기화 회귀를 함께 검토했다.
- `CON-03` — `satisfied`
- 계약: 기존 자동 exact/as_of와 기존 직접 마감의 호출/응답 계약을 유지한다. 미래 사용 예외는 직접 지정·검토·승인된 초안 마감에 한정하며 자동 선택 계약을 전역 완화하지 않는다. 기존 직접 마감이 초안의 승인·변경 검증을 우회해 선택 자료를 대신 확정하는 경로를 만들지 않는다.
- 구현 근거: jarca_ledger_mcp/application/settlement_draft_service.py, jarca_ledger_mcp/application/assets_service.py; existing automatic selector and direct close retained; draft finalize 338-391 does not use live direct-close shortcut
- 테스트 근거: tests/test_settlement_draft_selection.py, tests/test_settlement_draft_legacy_shapes.py, tests/test_contract_regression.py
- 판정 근거: 기존 exact와 as_of 및 직접 마감의 envelope와 선택 의미를 보존한다.
- `CON-04` — `satisfied`
- 계약: rejected/unknown 날짜, 잘못된 계좌·통화·목적·대표 부채 정의와 모호한 대표 선택은 승인만으로 정상 자료가 되지 않는다. 미확인 자료는 초안에서 선택·검토할 수 있지만 미확인 금액 자체를 승인으로 합산하지 않는다. 최종 합산 전 append-only 확인/정정 자료를 명시적으로 다시 선택하고 재검토·승인해야 한다. 미확인으로 남으면 누락/제외와 그 누락에 대한 조건부 승인만 허용한다.
- 구현 근거: jarca_ledger_mcp/application/settlement_draft_service.py; service 261-307, 319-360; rejected, unverified, loan and wrong-scope scenarios
- 테스트 근거: tests/test_settlement_draft_selection.py, tests/test_settlement_draft_authority.py, tests/test_settlement_draft_contract_scenarios.py
- 판정 근거: 승인은 자료의 잘못된 계좌나 목적 또는 확인 상태를 정상화하지 않는다.
- `CON-05` — `satisfied`
- 계약: 정수 금액의 정확도와 NULL/0 구분, 순자산의 자산−부채 계산, KRW 중심 기존 정책을 유지한다. FX 정책 없는 비KRW 금액은 단순 합산하지 않고 제외/경고를 표시한다.
- 구현 근거: jarca_ledger_mcp/application/settlement_draft_service.py, jarca_ledger_mcp/application/assets_service.py; contract scenario 56-73, 119-173; integer and NULL handling in review
- 테스트 근거: tests/test_settlement_draft_contract_scenarios.py
- 판정 근거: 큰 정수 정밀도와 자산 minus 부채 계산, NULL 구분 및 비KRW 제외를 검토했다.
- `CON-06` — `satisfied`
- 계약: carried_before는 초안의 이전 자료 선택 의미이고 기존 public as_of를 제거하거나 이름을 바꾸지 않는다. 기존 age_days의 의미를 변경하지 않고 수동 미래 자료의 방향 있는 날짜 차이 계약을 별도로 명확히 한다.
- 구현 근거: jarca_ledger_mcp/application/settlement_draft_service.py, jarca_ledger_mcp/application/assets_service.py, docs/interface-contract.md; review date fields and scenario 32-54; existing as_of API unchanged
- 테스트 근거: tests/test_settlement_draft_contract_scenarios.py, tests/test_settlement_draft_selection.py
- 판정 근거: 공개 as_of와 age_days의 방향을 유지하고 새 날짜 차이 field를 별도로 제공한다.
- `CON-07` — `satisfied`
- 계약: get_monthly_settlement_summary()와 기존 preview/report/render는 읽기 전용을 유지한다. 새 초안 mutation은 명시적 버튼·도구 호출로만 수행한다. missing DB 조회는 기존 db_not_initialized/no-create 계약을 유지한다.
- 구현 근거: jarca_ledger_mcp/application/settlement_draft_service.py, jarca_ledger_mcp/application/monthly_settlement_service.py, jarca_ledger_mcp/infrastructure/sqlite/connection.py; review 310-316 uses read_db; monthly existing read_db path and explicit new read helpers; missing DB cases
- 테스트 근거: tests/test_monthly_settlement_drafts.py, tests/test_service.py, tests/test_settlement_draft_adapters.py
- 판정 근거: 읽기 전용 연결과 missing DB no-create를 보존한다. 새로운 mutation은 명시적 action에서만 실행된다.
- `CON-08` — `satisfied`
- 계약: Dashboard auth-before-DB, 기존 성공/오류 envelope, 기존 MCP transport와 application → SQLite 의존 방향을 유지한다. 업무 검증·선택·마감은 UI/MCP에서 중복 구현하지 않는다.
- 구현 근거: jarca_ledger_mcp/application/settlement_draft_service.py, dashboard/app.py, dashboard/page_views/settlement_drafts.py, jarca_ledger_mcp/adapters/mcp/server.py; existing app auth guard before protected page and shared service transport delegation
- 테스트 근거: tests/test_dashboard_app.py, tests/test_settlement_draft_mcp_runtime.py, tests/test_settlement_draft_dashboard.py
- 판정 근거: 인증 이후 DB 접근과 기존 transport 및 오류 envelope를 보존하고 UI에 SQL 업무 검증을 추가하지 않았다.
- `CON-09` — `satisfied`
- 계약: 거래 import/분류/대사가 미완료라는 이유만으로 평가 등록과 자산 마감을 막지 않는다. 거래 준비 상태와 자산 마감 상태를 별도로 표시한다.
- 구현 근거: jarca_ledger_mcp/application/settlement_draft_service.py, jarca_ledger_mcp/application/monthly_settlement_service.py; contract scenario 97-117 and monthly summary asset-state propagation
- 테스트 근거: tests/test_settlement_draft_contract_scenarios.py
- 판정 근거: 거래 미정리 blocker를 남겨도 자산 초안 승인과 마감은 가능하며 거래 rows는 그대로다.
- `CON-10` — `satisfied`
- 계약: 월별 단일 활성 초안·월말 기준일·미확인 금액 제외 정책을 생성/편집/검토/최종화 및 모든 후속 문서에 동일하게 적용한다. 활성 초안 중복은 일반/정정 구분으로 우회하지 않으며 취소는 증빙이나 기존 마감을 삭제하지 않는다. 사용자 선택은 제품 구현/시험 완료의 증거가 아니다.
- 구현 근거: jarca_ledger_mcp/application/settlement_draft_service.py, jarca_ledger_mcp/infrastructure/sqlite/migrations.py, docs/requirements/req-003_account-valuation-history.md, docs/data-model.md, docs/interface-contract.md, docs/project-structure.md, docs/runtime-flow.md; all layer single active month, fixed month-end and verified authority policy inspection
- 테스트 근거: tests/test_monthly_settlement_drafts.py, tests/test_settlement_draft_correction_contract.py, tests/test_settlement_draft_contract_scenarios.py
- 판정 근거: 구현 정책과 요구사항, 데이터 모델 및 인터페이스의 동일 정책을 확인했다. 프로젝트 구조와 런타임 문서의 상세 누락은 DOC-PS-semantic 및 DOC-RF-semantic에서 별도 판정한다.
- `DEC-01` — `satisfied`
- 계약: 자료 확보 전 영속 초안을 만들고 계좌별 자료를 순차적으로 채우는 흐름이 필요하다. 조건부 마감을 초안처럼 반복 생성하는 것으로 대체하지 않는다.
- 구현 근거: jarca_ledger_mcp/application/settlement_draft_service.py, jarca_ledger_mcp/infrastructure/sqlite/migrations.py; service 153-185, 394-396; migration 21-45; tests 54-98, 262-277
- 테스트 근거: tests/test_monthly_settlement_drafts.py, tests/test_settlement_draft_correction_contract.py
- 판정 근거: 무자료 생성은 run을 쓰지 않는다. 월말과 단일 활성 초안, 생성 재시도 및 정정 연결을 검증한다.
- `DEC-02` — `satisfied`
- 계약: 기준일 이후 자료는 사용자가 특정 평가를 직접 지정하고 이유 및 최종 승인을 남긴 경우에만 허용한다. 원본 기준일은 그대로 두고 “정확한 월말 평가액”으로 표시하지 않는다.
- 구현 근거: jarca_ledger_mcp/application/settlement_draft_service.py, jarca_ledger_mcp/application/assets_service.py; service 93-140, 261-307; tests 136-175; contract scenario 76-94
- 테스트 근거: tests/test_monthly_settlement_drafts.py, tests/test_settlement_draft_selection.py, tests/test_settlement_draft_contract_scenarios.py
- 판정 근거: 자동 미래 선택은 금지하고 직접 지정의 실제 날짜와 사유를 보존한다. 미확인 금액은 authority에서 제외하며 확인 child는 재선택한다.
- `DEC-03` — `satisfied`
- 계약: 승인은 검토한 초안 버전/증거에 결합하며 변경 후 재검토·재승인이 필요하다. 마감은 선택한 자료와 적용 금액을 불변 증거로 저장한다.
- 구현 근거: jarca_ledger_mcp/application/settlement_draft_service.py; service 63-140, 202-211, 319-360; tests 191-202; authority drift scenarios
- 테스트 근거: tests/test_monthly_settlement_drafts.py, tests/test_settlement_draft_authority.py
- 판정 근거: 변경은 승인 binding을 무효화한다. 외부 drift에서도 최종화가 새 fingerprint 또는 review-needed guard로 차단되고 최신 자료로 자동 교체하지 않는다.
- `DEC-04` — `satisfied`
- 계약: 취소·정정은 원본 증빙과 이전 마감을 보존한다. 정정본은 자동 교체하지 않고 정정 마감은 새 run으로 연결한다.
- 구현 근거: jarca_ledger_mcp/application/settlement_draft_service.py, jarca_ledger_mcp/application/assets_service.py; service 63-91, 153-170, 352-369; authority and correction-parent tests
- 테스트 근거: tests/test_settlement_draft_authority.py, tests/test_settlement_draft_correction_contract.py
- 판정 근거: 정정 child는 검토 필요로 표시하고 자동 교체하지 않는다. 새 정정 run은 이전 run에 연결하며 기존 마감은 불변이다.
- `DEC-05` — `satisfied`
- 계약: 기존 계좌 이력, 자동 exact/as_of, 수동 자산·부채와 Dashboard/MCP 공통 서비스 경계를 유지한다. 거래 정산과 자산 마감은 분리한다.
- 구현 근거: jarca_ledger_mcp/application/settlement_draft_service.py, jarca_ledger_mcp/service.py, jarca_ledger_mcp/adapters/mcp/server.py, jarca_ledger_mcp/adapters/mcp/tool_contracts.py, jarca_ledger_mcp/adapters/streamlit/settlement_gateway.py, dashboard/page_views/settlement_drafts.py, dashboard/page_views/assets.py, dashboard/page_views/monthly_settlement.py; shared application entrypoints, thin MCP and Streamlit gateway, explicit panel actions; adapter and real MCP stdio tests
- 테스트 근거: tests/test_settlement_draft_adapters.py, tests/test_settlement_draft_mcp_runtime.py, tests/test_settlement_draft_dashboard.py, tests/test_settlement_draft_panel_workflow.py, tests/test_settlement_draft_panel_feedback.py, tests/test_settlement_draft_liability_registration.py
- 판정 근거: UI와 MCP는 공통 application에 위임한다. 자료 등록과 지정 및 해제, 저장과 취소, 검토와 승인 및 마감, 확정 조회와 정정 생성 경로를 제공한다.
- `DEC-06` — `satisfied`
- 계약: 문서 분류는 기존 계좌 평가·자산 마감 기능과 월정산 propagation의 동작/정책 확장이므로 기존 REQ-003을 갱신한다. 새 테이블/초안 lifecycle의 추가나 기존 문서의 제외 범위만으로 별도 ID를 만들지 않는다. 이는 문서 배치 판정이며 OQ의 제품 정책을 결정하지 않는다.
- 구현 근거: jarca_ledger_mcp/application/settlement_draft_service.py, jarca_ledger_mcp/infrastructure/sqlite/migrations.py, docs/requirements/req-003_account-valuation-history.md; service 153-185, 394-396; migration 21-45; tests 54-98, 262-277
- 테스트 근거: tests/test_monthly_settlement_drafts.py, tests/test_settlement_draft_correction_contract.py
- 판정 근거: 무자료 생성은 run을 쓰지 않는다. 월말과 단일 활성 초안, 생성 재시도 및 정정 연결을 검증한다.
- `DEC-07` — `satisfied`
- 계약: 사용자 선택 — 활성 초안: 정산 월마다 활성 초안을 하나만 허용한다. 일반/정정 초안을 같은 제한으로 관리하고 완료·취소 후 새 초안을 열 수 있다. 이미 마감한 기준일의 새 초안은 이전 run과 정정 사유를 연결하며, 동일 키 재시도는 기존 초안을 반환하고 다른 요청의 중복 생성은 충돌한다.
- 구현 근거: jarca_ledger_mcp/application/settlement_draft_service.py, jarca_ledger_mcp/infrastructure/sqlite/migrations.py; service 153-185, 394-396; migration 21-45; tests 54-98, 262-277
- 테스트 근거: tests/test_monthly_settlement_drafts.py, tests/test_settlement_draft_correction_contract.py
- 판정 근거: 무자료 생성은 run을 쓰지 않는다. 월말과 단일 활성 초안, 생성 재시도 및 정정 연결을 검증한다.
- `DEC-08` — `satisfied`
- 계약: 사용자 선택 — 정산 기준일: 정산 기준일은 정산 월의 마지막 날짜로 고정한다. 사용자가 입력했다면 월말과 일치하는지 검증하고 월정산 summary의 현재 월말 읽기 의미를 유지한다.
- 구현 근거: jarca_ledger_mcp/application/settlement_draft_service.py, jarca_ledger_mcp/infrastructure/sqlite/migrations.py; service 153-185, 394-396; migration 21-45; tests 54-98, 262-277
- 테스트 근거: tests/test_monthly_settlement_drafts.py, tests/test_settlement_draft_correction_contract.py
- 판정 근거: 무자료 생성은 run을 쓰지 않는다. 월말과 단일 활성 초안, 생성 재시도 및 정정 연결을 검증한다.
- `DEC-09` — `satisfied`
- 계약: 사용자 선택 — 미확인 자료: 미확인 자료는 초안에서 선택·검토할 수 있으나 최종 금액에 반영하려면 append-only 확인/정정 자료를 명시적으로 다시 선택하고 재검토·승인해야 한다. 끝내 확인되지 않은 항목은 누락/제외로 표시하고 조건부 마감 시 그 누락을 승인한다. 기존 verified authority를 유지한다.
- 구현 근거: jarca_ledger_mcp/application/settlement_draft_service.py, jarca_ledger_mcp/application/assets_service.py; service 93-140, 261-307; tests 136-175; contract scenario 76-94
- 테스트 근거: tests/test_monthly_settlement_drafts.py, tests/test_settlement_draft_selection.py, tests/test_settlement_draft_contract_scenarios.py
- 판정 근거: 자동 미래 선택은 금지하고 직접 지정의 실제 날짜와 사유를 보존한다. 미확인 금액은 authority에서 제외하며 확인 child는 재선택한다.
- `DOC-REQ-structural` — `satisfied`
- 계약: - 조치: 갱신 - 경로: docs/requirements/req-003_account-valuation-history.md - 문서 ID: REQ-003 - 제목: 계좌 기준일 평가 이력과 자산 마감 연동 - 변경 내용: 기존 ID·파일명·제목을 유지하고 초안 생성/편집/취소, 계좌별 직접 지정, 날짜 차이와 대체 승인, 대상 갱신, 검토 버전/fingerprint, 최종화·정정 초안 및 공통 adapter 요구사항/인수 기준을 추가한다. 미래 제외 규칙을 자동/직접 마감과 승인된 초안 예외로 분리한다. 월별 단일 활성 초안과 월말 기준일 검증을 추가하고 미확인 선택·검토는 허용하되 확인/정정 자료의 명시적 재선택·재검토·승인 전 금액 합산을 금지한다. 미확인으로 남은 항목은 누락/제외 및 조건부 누락 승인으로 처리한다. 기존 append-only, 정수/NULL, 대표 부채, no-fake-transaction, auth/menu·읽기 전용 계약을 유지한다. revision과 변경 이력을 갱신하고 기존 12/13 추적성을 보존하면서 이번 근거 15, 이번 구현 PR 미정을 구분한다. - 포함할 내용: 무자료 생성과 no-close, 같은 키 재사용/다른 payload 충돌, 일반/정정 통합 월별 단일 활성 초안, 완료/취소 후 재생성과 기존 마감의 정정 연결, 월말 고정 기준일과 입력 일치 검증, 대상의 명시적 갱신, 준비 상태와 금액의 NULL/0, 계좌/통화/목적/대표 부채 검증, exact/carried_before/manual_substitute와 자동 미래 금지, 이후 자료의 원본 날짜·사유·승인, 미확인 초안 선택/검토, 확인/정정 자료의 명시적 재선택·재검토·승인, 미확인 금액 합산 금지 및 미해소 항목의 승인된 누락/제외, 잠정 합계·완전성·누락/제외/대체 구분, 수동 자산/부채 보존 및 drift, 검토 이후 모든 의미 있는 변경의 재승인, 단일 트랜잭션과 동시 편집 충돌/no-partial-write, persisted evidence 기반 재시도, immutable close와 명시적 정정, 거래/자산 상태 분리, Dashboard/MCP 동등 동작, schema migration 및 기존 API/보안/legacy 회귀를 정상·경계·실패 사례로 명세한다. - 제외할 내용: 거래 완료/성과 추정 보장, FX/가격 API, 자동 승인·자동 미래 선택, 인증/메뉴 재설계, 실제 금융자료, 원본 날짜 변경 및 이력 삭제. - 근거: REQ-003.02/.06/.07/.08/.09의 기존 기능과 정책을 직접 확장하는 작업이다. 영속 초안이 새 aggregate라는 이유만으로 별도 REQ-004를 만들지 않고 현 작성 규칙에 따라 갱신한다. 동일 ID를 유지하므로 신규 ID 할당은 없다.
- 구현 근거: docs/requirements/req-003_account-valuation-history.md; exact approved path exists; metadata 1-13; requirements 53-181; new AC 201-539; old AC 541-648; traceability 665-667
- 테스트 근거: tests/test_settlement_draft_docs.py, tests/test_requirement_docs.py
- 판정 근거: 정본 경로와 문서 구조를 확인했다. REQ metadata 및 11개 번호 섹션, 영향 범위와 인수 기준 및 traceability는 trusted README와 TEMPLATE에 대조했다.
- `DOC-REQ-semantic` — `satisfied`
- 계약: - 조치: 갱신 - 경로: docs/requirements/req-003_account-valuation-history.md - 문서 ID: REQ-003 - 제목: 계좌 기준일 평가 이력과 자산 마감 연동 - 변경 내용: 기존 ID·파일명·제목을 유지하고 초안 생성/편집/취소, 계좌별 직접 지정, 날짜 차이와 대체 승인, 대상 갱신, 검토 버전/fingerprint, 최종화·정정 초안 및 공통 adapter 요구사항/인수 기준을 추가한다. 미래 제외 규칙을 자동/직접 마감과 승인된 초안 예외로 분리한다. 월별 단일 활성 초안과 월말 기준일 검증을 추가하고 미확인 선택·검토는 허용하되 확인/정정 자료의 명시적 재선택·재검토·승인 전 금액 합산을 금지한다. 미확인으로 남은 항목은 누락/제외 및 조건부 누락 승인으로 처리한다. 기존 append-only, 정수/NULL, 대표 부채, no-fake-transaction, auth/menu·읽기 전용 계약을 유지한다. revision과 변경 이력을 갱신하고 기존 12/13 추적성을 보존하면서 이번 근거 15, 이번 구현 PR 미정을 구분한다. - 포함할 내용: 무자료 생성과 no-close, 같은 키 재사용/다른 payload 충돌, 일반/정정 통합 월별 단일 활성 초안, 완료/취소 후 재생성과 기존 마감의 정정 연결, 월말 고정 기준일과 입력 일치 검증, 대상의 명시적 갱신, 준비 상태와 금액의 NULL/0, 계좌/통화/목적/대표 부채 검증, exact/carried_before/manual_substitute와 자동 미래 금지, 이후 자료의 원본 날짜·사유·승인, 미확인 초안 선택/검토, 확인/정정 자료의 명시적 재선택·재검토·승인, 미확인 금액 합산 금지 및 미해소 항목의 승인된 누락/제외, 잠정 합계·완전성·누락/제외/대체 구분, 수동 자산/부채 보존 및 drift, 검토 이후 모든 의미 있는 변경의 재승인, 단일 트랜잭션과 동시 편집 충돌/no-partial-write, persisted evidence 기반 재시도, immutable close와 명시적 정정, 거래/자산 상태 분리, Dashboard/MCP 동등 동작, schema migration 및 기존 API/보안/legacy 회귀를 정상·경계·실패 사례로 명세한다. - 제외할 내용: 거래 완료/성과 추정 보장, FX/가격 API, 자동 승인·자동 미래 선택, 인증/메뉴 재설계, 실제 금융자료, 원본 날짜 변경 및 이력 삭제. - 근거: REQ-003.02/.06/.07/.08/.09의 기존 기능과 정책을 직접 확장하는 작업이다. 영속 초안이 새 aggregate라는 이유만으로 별도 REQ-004를 만들지 않고 현 작성 규칙에 따라 갱신한다. 동일 ID를 유지하므로 신규 ID 할당은 없다.
- 구현 근거: docs/requirements/req-003_account-valuation-history.md, jarca_ledger_mcp/application/settlement_draft_service.py; metadata 1-13; requirements 53-181; new AC 201-539; old AC 541-648; traceability 665-667
- 테스트 근거: tests/test_settlement_draft_docs.py, tests/test_monthly_settlement_drafts.py
- 판정 근거: REQ-003 ID와 제목 및 기존 추적성을 유지하며 기존 AC 10개 중 9개는 원문 보존, migration AC는 schema13 현재 버전으로 승인된 확장을 반영했다. v12 이름의 테스트도 실제 단언은 13이므로 stale verification으로 보지 않는다.
- `DOC-DM-structural` — `satisfied`
- 계약: - 조치: 갱신 - 경로: docs/data-model.md - 변경 내용: 초안과 항목의 영속 엔터티를 추가해 초안→대상 항목, 항목→계좌/valuation, 초안→최종 run, 정정 초안→이전 run 관계와 필수/선택성·유일성·삭제 금지를 기록한다. 초안의 월·기준일·상태·작성자·시각·메모·버전·중복 키·완료 연결, 항목의 source identity·선택 자료·방식/사유·포함/제외·선택자·시각·버전·승인 결합 정보를 명세한다. 수동 자료는 검토 증거 값을 고정하고 원본 drift를 검출한다. 최종 run/rows에는 실제 날짜·방향 있는 차이·확인 상태·적용 금액·분류·사유·승인·누락/경고·초안 버전/fingerprint를 보존한다. 일반/정정 통합 정산 월별 활성 초안 유일성을 저장 제약과 동시성 검증으로 강제하고 완료·취소 이력은 보존한다. 월·기준일의 월말 일치 검증을 명세한다. 미확인 항목은 검토용 선택과 금액 authority를 분리하며 확인/정정 child의 명시적 재선택 후에만 합산한다. 미확인으로 남은 항목의 제외 사유와 누락 승인도 보존한다. 기존 correction/idempotency 제약, read alias와 nullable 금액 의미를 보존하고 schema 12→새 버전의 additive·반복 가능한 migration/legacy 조회/실패 및 백업 복구 경계를 문서화한다. - 근거: schema 12에는 초안/항목 persistence가 없으며 기존 account_valuations와 run/rows를 재사용·연결해야 한다. 원본 이력의 변경/삭제나 guessed migration은 필요하지 않다.
- 구현 근거: docs/data-model.md; exact approved path exists; settlement draft entities and fields 178-195
- 테스트 근거: tests/test_settlement_draft_docs.py, tests/test_requirement_docs.py
- 판정 근거: 정본 경로와 문서 구조를 확인했다. REQ metadata 및 11개 번호 섹션, 영향 범위와 인수 기준 및 traceability는 trusted README와 TEMPLATE에 대조했다.
- `DOC-DM-semantic` — `satisfied`
- 계약: - 조치: 갱신 - 경로: docs/data-model.md - 변경 내용: 초안과 항목의 영속 엔터티를 추가해 초안→대상 항목, 항목→계좌/valuation, 초안→최종 run, 정정 초안→이전 run 관계와 필수/선택성·유일성·삭제 금지를 기록한다. 초안의 월·기준일·상태·작성자·시각·메모·버전·중복 키·완료 연결, 항목의 source identity·선택 자료·방식/사유·포함/제외·선택자·시각·버전·승인 결합 정보를 명세한다. 수동 자료는 검토 증거 값을 고정하고 원본 drift를 검출한다. 최종 run/rows에는 실제 날짜·방향 있는 차이·확인 상태·적용 금액·분류·사유·승인·누락/경고·초안 버전/fingerprint를 보존한다. 일반/정정 통합 정산 월별 활성 초안 유일성을 저장 제약과 동시성 검증으로 강제하고 완료·취소 이력은 보존한다. 월·기준일의 월말 일치 검증을 명세한다. 미확인 항목은 검토용 선택과 금액 authority를 분리하며 확인/정정 child의 명시적 재선택 후에만 합산한다. 미확인으로 남은 항목의 제외 사유와 누락 승인도 보존한다. 기존 correction/idempotency 제약, read alias와 nullable 금액 의미를 보존하고 schema 12→새 버전의 additive·반복 가능한 migration/legacy 조회/실패 및 백업 복구 경계를 문서화한다. - 근거: schema 12에는 초안/항목 persistence가 없으며 기존 account_valuations와 run/rows를 재사용·연결해야 한다. 원본 이력의 변경/삭제나 guessed migration은 필요하지 않다.
- 구현 근거: docs/data-model.md, jarca_ledger_mcp/application/settlement_draft_service.py; settlement draft entities and fields 178-195
- 테스트 근거: tests/test_settlement_draft_docs.py, tests/test_monthly_settlement_drafts.py
- 판정 근거: 승인된 필수 의미를 pinned 문서의 해당 섹션과 구현 및 참조 테스트에 대조했다.
- `DOC-IC-structural` — `satisfied`
- 계약: - 조치: 갱신 - 경로: docs/interface-contract.md - 변경 내용: 공통 초안 생성·목록·상세·수정/대상 갱신·취소·계좌 자료 지정/해제·포함/제외·검토/검증·승인 최종화·정정 초안 operation을 정의하고 실제 구현의 snake_case 함수/MCP 도구/gateway 이름과 exact signature를 고정한다. 입력에는 초안/항목 ID·기대 버전, 월·기준일, 자료 ID·선택 방식·사유, 명시적 포함/제외와 사유, 생성/마감 키, 검토 fingerprint 및 승인자·시각/근거를 기록한다. 출력에는 준비 상태·버전, 대상/선택 증거, 날짜 차이·확인 상태, 잠정 합계·완전성·누락/승인 필요 목록, 완료 run/정정 연결과 persisted replay를 정의한다. 검증/대상 부재/상태·버전·증거 drift/승인 부족/키 충돌/동시 마감 오류의 조건·재시도·no-write를 명확히 한다. 기존 success/error_code/error, 자동 selector, 기존 close/report 키와 provenance 의미, Dashboard 인증 및 MCP 인증 범위를 보존한다. 초안 사용 시 직접 마감으로 안전 검증을 우회하지 못하는 경계를 규정한다. 생성·정정 생성은 같은 월의 활성 초안 중복을 검사하고 월말 아닌 입력 기준일은 거절한다. 미확인 선택은 검토용 상태를 반환하고 합계/최종화는 금액을 제외한다. 확인/정정 child를 명시적으로 다시 선택하면 버전·검토/승인을 갱신하고, 끝내 미확인인 항목은 누락/제외 승인 대상으로만 반환한다. - 근거: 기존 MCP/gateway에는 초안 mutation이 없고 현재 close는 basis-date 자료 자동 재조회 경로다. 새 공통 계약과 legacy 경로 구분이 필요하다.
- 구현 근거: docs/interface-contract.md; exact approved path exists; shared operation signatures and response, errors, read-only and evidence contract 438-466
- 테스트 근거: tests/test_settlement_draft_docs.py, tests/test_requirement_docs.py
- 판정 근거: 정본 경로와 문서 구조를 확인했다. REQ metadata 및 11개 번호 섹션, 영향 범위와 인수 기준 및 traceability는 trusted README와 TEMPLATE에 대조했다.
- `DOC-IC-semantic` — `satisfied`
- 계약: - 조치: 갱신 - 경로: docs/interface-contract.md - 변경 내용: 공통 초안 생성·목록·상세·수정/대상 갱신·취소·계좌 자료 지정/해제·포함/제외·검토/검증·승인 최종화·정정 초안 operation을 정의하고 실제 구현의 snake_case 함수/MCP 도구/gateway 이름과 exact signature를 고정한다. 입력에는 초안/항목 ID·기대 버전, 월·기준일, 자료 ID·선택 방식·사유, 명시적 포함/제외와 사유, 생성/마감 키, 검토 fingerprint 및 승인자·시각/근거를 기록한다. 출력에는 준비 상태·버전, 대상/선택 증거, 날짜 차이·확인 상태, 잠정 합계·완전성·누락/승인 필요 목록, 완료 run/정정 연결과 persisted replay를 정의한다. 검증/대상 부재/상태·버전·증거 drift/승인 부족/키 충돌/동시 마감 오류의 조건·재시도·no-write를 명확히 한다. 기존 success/error_code/error, 자동 selector, 기존 close/report 키와 provenance 의미, Dashboard 인증 및 MCP 인증 범위를 보존한다. 초안 사용 시 직접 마감으로 안전 검증을 우회하지 못하는 경계를 규정한다. 생성·정정 생성은 같은 월의 활성 초안 중복을 검사하고 월말 아닌 입력 기준일은 거절한다. 미확인 선택은 검토용 상태를 반환하고 합계/최종화는 금액을 제외한다. 확인/정정 child를 명시적으로 다시 선택하면 버전·검토/승인을 갱신하고, 끝내 미확인인 항목은 누락/제외 승인 대상으로만 반환한다. - 근거: 기존 MCP/gateway에는 초안 mutation이 없고 현재 close는 basis-date 자료 자동 재조회 경로다. 새 공통 계약과 legacy 경로 구분이 필요하다.
- 구현 근거: docs/interface-contract.md, jarca_ledger_mcp/application/settlement_draft_service.py; shared operation signatures and response, errors, read-only and evidence contract 438-466
- 테스트 근거: tests/test_settlement_draft_docs.py, tests/test_monthly_settlement_drafts.py
- 판정 근거: 승인된 필수 의미를 pinned 문서의 해당 섹션과 구현 및 참조 테스트에 대조했다.
- `DOC-PS-structural` — `satisfied`
- 계약: - 조치: 갱신 - 경로: docs/project-structure.md - 변경 내용: 기존 application/monthly_settlement_service.py의 read model을 보존하면서 초안 lifecycle의 application-layer 책임과 account_valuation_service.py(등록·검증·정정), assets_service.py(금액/증거·run 최종화), infrastructure/sqlite/schema.py/migrations.py(영속 제약/이주)의 소유권을 명확히 한다. service.py 공개 re-export, adapters/mcp/server.py/tool_contracts.py, adapters/streamlit gateway와 dashboard/page_views/monthly_settlement.py/assets.py의 연결을 실제 경로로 기록한다. 새 파일을 추가하면 그 exact 경로·책임·진입점을 문서에 반영하되 UI/MCP direct SQL, application의 Dashboard 역의존과 중복 업무 검증을 금지한다. 월별 활성 초안 유일성·월말 검증·미확인 금액 제외/확인 후 재선택의 책임을 공통 application과 SQLite 제약에 두고 adapter별 예외를 만들지 않는다. 각 변경에 대응하는 합성 테스트, 문서 검증과 기존 auth/menu/legacy 회귀 위치를 연결한다. - 근거: 기존 구조 문서는 service→SQLite와 page/tool→gateway/service 방향을 정본으로 규정한다. 새 초안 작업은 해당 책임 경계를 확장하며 별도 UI 전용 마감 로직을 만들지 않는다.
- 구현 근거: docs/project-structure.md; exact approved path exists; ownership table 214-226
- 테스트 근거: tests/test_settlement_draft_docs.py, tests/test_requirement_docs.py
- 판정 근거: 정본 경로와 문서 구조를 확인했다. REQ metadata 및 11개 번호 섹션, 영향 범위와 인수 기준 및 traceability는 trusted README와 TEMPLATE에 대조했다.
- `DOC-PS-semantic` — `unsatisfied`
- 계약: - 조치: 갱신 - 경로: docs/project-structure.md - 변경 내용: 기존 application/monthly_settlement_service.py의 read model을 보존하면서 초안 lifecycle의 application-layer 책임과 account_valuation_service.py(등록·검증·정정), assets_service.py(금액/증거·run 최종화), infrastructure/sqlite/schema.py/migrations.py(영속 제약/이주)의 소유권을 명확히 한다. service.py 공개 re-export, adapters/mcp/server.py/tool_contracts.py, adapters/streamlit gateway와 dashboard/page_views/monthly_settlement.py/assets.py의 연결을 실제 경로로 기록한다. 새 파일을 추가하면 그 exact 경로·책임·진입점을 문서에 반영하되 UI/MCP direct SQL, application의 Dashboard 역의존과 중복 업무 검증을 금지한다. 월별 활성 초안 유일성·월말 검증·미확인 금액 제외/확인 후 재선택의 책임을 공통 application과 SQLite 제약에 두고 adapter별 예외를 만들지 않는다. 각 변경에 대응하는 합성 테스트, 문서 검증과 기존 auth/menu/legacy 회귀 위치를 연결한다. - 근거: 기존 구조 문서는 service→SQLite와 page/tool→gateway/service 방향을 정본으로 규정한다. 새 초안 작업은 해당 책임 경계를 확장하며 별도 UI 전용 마감 로직을 만들지 않는다.
- 구현 근거: docs/project-structure.md, jarca_ledger_mcp/application/settlement_draft_service.py; ownership table 214-226; complete document contains no settlement_gateway.py or settlement_drafts.py, no public service re-export mapping, no tool_contracts.py mapping for the draft operations
- 테스트 근거: tests/test_settlement_draft_docs.py, tests/test_monthly_settlement_drafts.py
- 판정 근거: 승인된 문서 산출물 계약은 새 파일의 exact 경로와 책임 및 진입점, re-export와 tool-contract 연결 및 월별 유일성, 월말 검증, 미확인 금액 제외와 재선택의 공통 소유권을 요구한다. 신규 gateway와 공용 panel 및 연결 경로가 누락됐고 generic validation 설명만 있다. 해당 실제 경로와 연결 및 세 정책 책임을 기존 구조 문서에 보완해야 한다.
- `DOC-RF-structural` — `satisfied`
- 계약: - 조치: 갱신 - 경로: docs/runtime-flow.md - 변경 내용: 인증→명시적 무자료 초안 생성→대상 동결→자료 등록/지정·해제/제외→읽기 전용 검토→버전·증거에 결합한 승인→동일 transaction에서 증거 재검증·run/rows 저장·초안 완료→불변 조회 흐름을 정의한다. 생성/정정 생성 guard는 일반/정정 통합 월별 단일 활성 초안과 월말 일치를 검증한다. 완료·취소 후 재생성은 가능하지만 기존 마감이 있으면 이전 run과 정정 사유를 연결한다. 미확인 자료 선택은 검토 필요로 전이하며 합계에는 포함하지 않는다. 확인/정정 자료를 명시적으로 재선택하면 재검토·재승인 후 최종화하고, 끝내 확인되지 않으면 누락/제외 및 조건부 누락 승인을 거친다. 변경/정정/대상 갱신은 승인을 무효화하고 검토 단계로 돌아간다. 취소는 기존 증거/run을 삭제하지 않으며 재마감은 이전 run 연결·사유·단일 correction 제약을 유지한다. 거래 준비와 자산 상태를 별도로 표시하고 외부 가격/환율 호출·추정 거래 생성은 없다. SQLite 동시 편집·키/버전 충돌, stale approval, 정정본 등장, 중복 최종화, DB 실패에 대해 no-partial-write·rollback·안전 재시도/사용자 재검토와 반환 오류를 기록한다. 관찰 정보는 초안/버전/run 상관 ID와 상태/경고 코드로 제한하고 credential/실제 계좌 자료를 로그에 남기지 않는다. - 근거: 현 runtime은 read-only preview→live authority 기반 close이며 영속 준비 단계가 없다. 기존 fingerprint drift·원자 저장·persisted replay guard를 초안 선택에 결합해 확장해야 한다.
- 구현 근거: docs/runtime-flow.md; exact approved path exists; lifecycle and failure/recovery guards 243-259
- 테스트 근거: tests/test_settlement_draft_docs.py, tests/test_requirement_docs.py
- 판정 근거: 정본 경로와 문서 구조를 확인했다. REQ metadata 및 11개 번호 섹션, 영향 범위와 인수 기준 및 traceability는 trusted README와 TEMPLATE에 대조했다.
- `DOC-RF-semantic` — `unsatisfied`
- 계약: - 조치: 갱신 - 경로: docs/runtime-flow.md - 변경 내용: 인증→명시적 무자료 초안 생성→대상 동결→자료 등록/지정·해제/제외→읽기 전용 검토→버전·증거에 결합한 승인→동일 transaction에서 증거 재검증·run/rows 저장·초안 완료→불변 조회 흐름을 정의한다. 생성/정정 생성 guard는 일반/정정 통합 월별 단일 활성 초안과 월말 일치를 검증한다. 완료·취소 후 재생성은 가능하지만 기존 마감이 있으면 이전 run과 정정 사유를 연결한다. 미확인 자료 선택은 검토 필요로 전이하며 합계에는 포함하지 않는다. 확인/정정 자료를 명시적으로 재선택하면 재검토·재승인 후 최종화하고, 끝내 확인되지 않으면 누락/제외 및 조건부 누락 승인을 거친다. 변경/정정/대상 갱신은 승인을 무효화하고 검토 단계로 돌아간다. 취소는 기존 증거/run을 삭제하지 않으며 재마감은 이전 run 연결·사유·단일 correction 제약을 유지한다. 거래 준비와 자산 상태를 별도로 표시하고 외부 가격/환율 호출·추정 거래 생성은 없다. SQLite 동시 편집·키/버전 충돌, stale approval, 정정본 등장, 중복 최종화, DB 실패에 대해 no-partial-write·rollback·안전 재시도/사용자 재검토와 반환 오류를 기록한다. 관찰 정보는 초안/버전/run 상관 ID와 상태/경고 코드로 제한하고 credential/실제 계좌 자료를 로그에 남기지 않는다. - 근거: 현 runtime은 read-only preview→live authority 기반 close이며 영속 준비 단계가 없다. 기존 fingerprint drift·원자 저장·persisted replay guard를 초안 선택에 결합해 확장해야 한다.
- 구현 근거: docs/runtime-flow.md, jarca_ledger_mcp/application/settlement_draft_service.py; lifecycle and failure/recovery guards 243-259; complete runtime document has no cancel transition or cancellation preservation and reopen behavior; source 202-211, 394-396 and lifecycle test 90-98 implement them
- 테스트 근거: tests/test_settlement_draft_docs.py, tests/test_monthly_settlement_drafts.py
- 판정 근거: 승인된 런타임 산출물 계약은 취소 시 기존 증거와 run 보존, 완료 또는 취소 뒤 월 활성 슬롯 재사용, 기존 마감이 있으면 정정 연결과 사유를 요구한다. 현재 흐름은 create부터 finalize까지만 기록한다. 취소의 상태와 버전 guard, actor 및 reason, 승인 무효화와 보존 및 재생성 경계를 실제 구현에 맞게 보완해야 한다. 코드 결함이나 새 기능 요구가 아니라 승인된 문서 누락이다.
- `BASE-REQ-003.01-AC01` — `satisfied`
- 계약: REQ-003.01-AC01 — migration and preservation Cases (정상/경계/실패): 정상 schema 12 init twice; 경계 schema 11 legacy DB; 실패 malformed legacy DB. State Invariants: legacy tables/rows remain; migration repeats without duplicate columns. 판정 기준: schema_version=12, required tables/columns/indexes exist and old rows remain. 검증: tests/test_account_valuations.py::test_account_valuation_schema_is_v12_and_idempotent, tests/test_issue_12_regressions.py::test_schema12_migration_preserves_legacy_rows_indexes_and_is_idempotent. 검증 분류: level=integration; backend=sqlite
- 구현 근거: docs/requirements/req-003_account-valuation-history.md; REQ current AC REQ-003.01-AC01; pinned base and head whole block comparison; referenced existing test bodies reviewed
- 테스트 근거: tests/test_account_valuations.py, tests/test_issue_12_regressions.py, tests/test_contract_regression.py, tests/test_service.py
- 판정 근거: schema 11 legacy 보존 및 반복 초기화와 malformed failure 의미를 유지하고 현재 schema_version만 12에서 13으로 승인된 additive migration에 맞춰 변경했다. 참조 테스트는 실제로 13을 단언한다.
- `BASE-REQ-003.02-AC01` — `satisfied`
- 계약: REQ-003.02-AC01 — selection policy Cases (정상/경계/실패): exact verified; as_of carry-forward; future/unverified/ambiguous excluded/warned. State Invariants: no future/unverified row is selected. 판정 기준: exact returns same-date verified leaf; as_of returns latest prior verified and age/warning. 검증: tests/test_account_valuations.py::test_select_exact_and_as_of_excludes_unverified_and_reports_carry_forward, source _account_valuation_items(). 검증 분류: level=unit; backend=application
- 구현 근거: docs/requirements/req-003_account-valuation-history.md; REQ current AC REQ-003.02-AC01; pinned base and head whole block comparison; referenced existing test bodies reviewed
- 테스트 근거: tests/test_account_valuations.py, tests/test_issue_12_regressions.py, tests/test_contract_regression.py, tests/test_service.py
- 판정 근거: 기존 인수 판정과 검증 및 상태 불변조건을 원문 그대로 보존했다.
- `BASE-REQ-003.03-AC01` — `satisfied`
- 계약: REQ-003.03-AC01 — idempotent correction Cases (정상/경계/실패): same payload reuse; different payload conflict; second correction fails. State Invariants: one row/child per operation and original immutable. 판정 기준: exact error codes and count 2 after one correction. 검증: tests/test_account_valuations.py::test_register_same_idempotency_payload_reuses_row_and_changed_payload_conflicts, tests/test_account_valuations.py::test_correction_is_append_only_reasoned_and_single_child, tests/test_issue_12_regressions.py::test_empty_conditional_close_is_closed_and_second_close_requires_correction. 검증 분류: level=integration; backend=sqlite
- 구현 근거: docs/requirements/req-003_account-valuation-history.md; REQ current AC REQ-003.03-AC01; pinned base and head whole block comparison; referenced existing test bodies reviewed
- 테스트 근거: tests/test_account_valuations.py, tests/test_issue_12_regressions.py, tests/test_contract_regression.py, tests/test_service.py
- 판정 근거: 기존 인수 판정과 검증 및 상태 불변조건을 원문 그대로 보존했다.
- `BASE-REQ-003.04-AC01` — `satisfied`
- 계약: REQ-003.04-AC01 — precision and representative loan Cases (정상/경계/실패): integer zero; NULL optional metrics; loan missing definition rejected. State Invariants: no float amount and no double sum. 판정 기준: optional fields round-trip exactly and loan definition validation is enforced. 검증: test_correction_preserves_optional_fields_unless_overridden, _validate_common() and schema static checks. 검증 분류: level=static; backend=sqlite
- 구현 근거: docs/requirements/req-003_account-valuation-history.md; REQ current AC REQ-003.04-AC01; pinned base and head whole block comparison; referenced existing test bodies reviewed
- 테스트 근거: tests/test_account_valuations.py, tests/test_issue_12_regressions.py, tests/test_contract_regression.py, tests/test_service.py
- 판정 근거: 기존 인수 판정과 검증 및 상태 불변조건을 원문 그대로 보존했다.
- `BASE-REQ-003.05-AC01` — `satisfied`
- 계약: REQ-003.05-AC01 — authority separation Cases (정상/경계/실패): dated candidate; late historical candidate; name-only update. State Invariants: current/latest display cannot roll backward and candidate is unverified. 판정 기준: dated account write creates only unverified candidate; name-only does not. 검증: test_account_balance_write_records_unverified_candidate_only_with_real_basis_date, test_account_name_only_update_does_not_create_candidate. 검증 분류: level=unit; backend=application
- 구현 근거: docs/requirements/req-003_account-valuation-history.md; REQ current AC REQ-003.05-AC01; pinned base and head whole block comparison; referenced existing test bodies reviewed
- 테스트 근거: tests/test_account_valuations.py, tests/test_issue_12_regressions.py, tests/test_contract_regression.py, tests/test_service.py
- 판정 근거: 기존 인수 판정과 검증 및 상태 불변조건을 원문 그대로 보존했다.
- `BASE-REQ-003.06-AC01` — `satisfied`
- 계약: REQ-003.06-AC01 — preview and approval Cases (정상/경계/실패): complete exact close; incomplete draft; missing approval rejected. State Invariants: preview row count unchanged; no unsafe evidence approved. 판정 기준: preview is read-only and close returns conditional_approval_required without metadata. 검증: test_manual_asset_update_deactivate_preview_and_close_correction_policy, preview_asset_snapshot_close(). 검증 분류: level=integration; backend=application
- 구현 근거: docs/requirements/req-003_account-valuation-history.md; REQ current AC REQ-003.06-AC01; pinned base and head whole block comparison; referenced existing test bodies reviewed
- 테스트 근거: tests/test_account_valuations.py, tests/test_issue_12_regressions.py, tests/test_contract_regression.py, tests/test_service.py
- 판정 근거: 기존 인수 판정과 검증 및 상태 불변조건을 원문 그대로 보존했다.
- `BASE-REQ-003.07-AC01` — `satisfied`
- 계약: REQ-003.07-AC01 — immutable close correction Cases (정상/경계/실패): first close; same-date correction; second unreasoned close. State Invariants: old run/rows remain and latest run alone reports. 판정 기준: correction_of_run_id, count, and net worth match. 검증: test_manual_asset_update_deactivate_preview_and_close_correction_policy, assets_service.py close path. 검증 분류: level=integration; backend=sqlite
- 구현 근거: docs/requirements/req-003_account-valuation-history.md; REQ current AC REQ-003.07-AC01; pinned base and head whole block comparison; referenced existing test bodies reviewed
- 테스트 근거: tests/test_account_valuations.py, tests/test_issue_12_regressions.py, tests/test_contract_regression.py, tests/test_service.py
- 판정 근거: 기존 인수 판정과 검증 및 상태 불변조건을 원문 그대로 보존했다.
- `BASE-REQ-003.08-AC01` — `satisfied`
- 계약: REQ-003.08-AC01 — reconciliation/monthly Cases (정상/경계/실패): regular ledger calculation; verified investment; missing baseline. State Invariants: no fake transaction; provenance fields present; monthly read is non-mutating. 판정 기준: status VALUATION_MANAGED for verified investment and monthly summary reads report. 검증: tests/test_service.py::test_statement_status_account_update_and_balance_reconciliation, tests/test_issue_12_regressions.py::test_reconciliation_uses_corrected_investment_leaf_without_transaction_count_change, tests/test_service.py::test_monthly_settlement_summary_read_model_foundation. 검증 분류: level=unit; backend=application
- 구현 근거: docs/requirements/req-003_account-valuation-history.md; REQ current AC REQ-003.08-AC01; pinned base and head whole block comparison; referenced existing test bodies reviewed
- 테스트 근거: tests/test_account_valuations.py, tests/test_issue_12_regressions.py, tests/test_contract_regression.py, tests/test_service.py
- 판정 근거: 기존 인수 판정과 검증 및 상태 불변조건을 원문 그대로 보존했다.
- `BASE-REQ-003.09-AC01` — `satisfied`
- 계약: REQ-003.09-AC01 — shared adapters and auth Cases (정상/경계/실패): MCP stdio/http config; authenticated Dashboard render; unauthenticated gate. State Invariants: auth precedes DB; render does not write; response envelope has success. 판정 기준: actual tool/gateway names resolve and existing auth/menu tests pass. 검증: tests/test_mcp_http_runtime.py, tests/test_dashboard_authentication_app.py, tests/test_dashboard_menu_transition.py, server.py and gateways. 검증 분류: level=integration; backend=dashboard
- 구현 근거: docs/requirements/req-003_account-valuation-history.md; REQ current AC REQ-003.09-AC01; pinned base and head whole block comparison; referenced existing test bodies reviewed
- 테스트 근거: tests/test_account_valuations.py, tests/test_issue_12_regressions.py, tests/test_contract_regression.py, tests/test_service.py
- 판정 근거: 기존 인수 판정과 검증 및 상태 불변조건을 원문 그대로 보존했다.
- `BASE-REQ-003.10-AC01` — `satisfied`
- 계약: REQ-003.10-AC01 — privacy and compatibility Cases (정상/경계/실패): synthetic fixture; redaction search; actual secret/data detection. State Invariants: no credential/token/cookie/real financial data in docs/tests/evidence. 판정 기준: semantic inventory missing=0 and ambiguous=0; placeholder=0. 검증: tests/test_requirement_docs.py, auth/menu evidence tests, repository redaction/static search. 검증 분류: level=static; backend=dashboard
- 구현 근거: docs/requirements/req-003_account-valuation-history.md; REQ current AC REQ-003.10-AC01; pinned base and head whole block comparison; referenced existing test bodies reviewed
- 테스트 근거: tests/test_account_valuations.py, tests/test_issue_12_regressions.py, tests/test_contract_regression.py, tests/test_service.py
- 판정 근거: 기존 인수 판정과 검증 및 상태 불변조건을 원문 그대로 보존했다.
### 범위 판정
- 누락: 프로젝트 구조 문서에 신규 gateway와 공용 panel의 exact 경로 및 연결과 공통 정책 소유권 누락, 런타임 문서에 취소와 보존 및 월 활성 슬롯 재생성 흐름 누락
- 범위 초과: 없음
- 명세 모순: 없음
### 결론
핵심 초안 lifecycle과 승인 및 원자적 최종화 구현은 확인했다. 승인된 필수 문서의 프로젝트 구조 연결과 런타임 취소 및 재생성 흐름 누락 두 건 때문에 request_changes다. 해당 두 정본 문서만 실제 구현과 승인 계약에 맞게 보완하는 것이 최소 요청이다. 생산자 exact-head 검증은 396 passed, 4 skipped 및 lint 통과이며 reviewer의 제품 독립 실행이나 CI 성공으로 표현하지 않는다. schema12만을 입력으로 한 별도 실행은 확인하지 않았으나 공통 additive DDL 및 기존 회귀 근거를 함께 검토했고 그 부재만으로 추가 필수 테스트를 요구하지 않는다.
<!-- gitea-agent:implementation-spec-review/v1 owner=jsfamily repository=jarca-ledger-mcp issue=15 pr=16 head=4c5cb0627cdc1aa68b5ef4f51411d4563b0c8199 contract-sha256=347e1e9d4ef3514754f93515ccfe71d94daa880bcd4129ad3fc1989c53b0641c result-sha256=63f07606005c47306a60429be2fbe9c72565dd4c2b7770a2d6c91a5015350994 correlation=554ae6955dbbb41fb2d1379b97af99dff419e147ec3b64638cc820bcf7ccd028 -->
변경: docs/project-structure.md and tests/test_settlement_draft_docs.py
검증: /opt/data/gitea-agent/runtime/issue15-20261009T023318Z/venv/bin/python -B -m pytest -o addopts= -p no:cacheprovider -q tests/test_settlement_draft_docs.py::test_settlement_draft_project_ownership_and_shared_policy_wiring; exit0 after named RED assertion exit1; records /opt/data/gitea-agent/repositories/jsfamily/jarca-ledger-mcp/worktrees/issue-15/verification/i15rw2-regressions/main-red-project.json and /opt/data/gitea-agent/repositories/jsfamily/jarca-ledger-mcp/worktrees/issue-15/verification/i15rw2-regressions/main-green-project.json; GREEN hashes verified against final immutable blobs in independent-final-evidence-access.json
근거: Actual facade/MCP/gateway/shared-panel/page ownership and single-active/month-end/unverified authority policies documented without changing runtime.
DOC-RF-semantic — resolved
분류: valid_fix
변경: docs/runtime-flow.md and tests/test_settlement_draft_docs.py
검증: /opt/data/gitea-agent/runtime/issue15-20261009T023318Z/venv/bin/python -B -m pytest -o addopts= -p no:cacheprovider -q tests/test_settlement_draft_docs.py::test_settlement_draft_runtime_cancel_and_recovery_contract; exit0 after named RED assertion exit1; records /opt/data/gitea-agent/repositories/jsfamily/jarca-ledger-mcp/worktrees/issue-15/verification/i15rw2-regressions/main-red-runtime.json and /opt/data/gitea-agent/repositories/jsfamily/jarca-ledger-mcp/worktrees/issue-15/verification/i15rw2-regressions/main-green-runtime.json; GREEN hashes verified against final immutable blobs in independent-final-evidence-access.json
근거: Cancel guards, persisted metadata, approval invalidation, retained evidence, rollback and fresh-key/correction reopening documented against actual implementation.
최종 검증
Local checks: /opt/data/gitea-agent/runtime/issue15-20261009T023318Z/venv/bin/python -B -m pytest -o addopts= -p no:cacheprovider --basetemp /tmp/i15rw2-final-0hiu3frk/pytest-base -ra -q tests; exit0, 398 passed, 4 skipped; /opt/data/gitea-agent/runtime/issue15-20261009T023318Z/venv/bin/python -B -m ruff check --no-cache .; exit0. Canonical stage i15rw2-final; manifest /opt/data/gitea-agent/repositories/jsfamily/jarca-ledger-mcp/worktrees/issue-15/verification/i15rw2-final/evidence-manifest.json SHA256 66081e334e1090d95a3aa4fcb3990bc2ed8dbecf8ec26e741ec0404f4462680d; plan SHA256 e8de94bc54bf4cf0d78909c4b14c6d29104d63609599bdce635bc5588a42d5a5; independently verified same-UID local read-only access, no external-host access claim. Four existing PDF-sample skips; no source runtime changes.
Runtime/browser: Full suite includes real stdio MCP lifecycle and Streamlit AppTest. No new browser run or browser-evidence reuse claim. Independent documentation/spec-code review PASS and final immutable 163-file evidence gate PASS.
Commit status: pending
Actions runs: 없음
다음 단계
Reviewer가 rework head를 새 snapshot으로 다시 검토해야 하며 이 comment는 기존 REQUEST_CHANGES를 해제하거나 승인을 의미하지 않는다.
## 구현 재작업 결과
- Source Issue: #15
- Pull Request: #16
- Source Review: #71
- Reviewed head: `4c5cb0627cdc1aa68b5ef4f51411d4563b0c8199`
- Rework head: `bae137dce77245f1f506c2a0086101b6a067c9ab`
- Contract SHA-256: `347e1e9d4ef3514754f93515ccfe71d94daa880bcd4129ad3fc1989c53b0641c`
- Result: `rework_delivered`
### 지적 처리
- DOC-PS-semantic — `resolved`
- 분류: valid_fix
- 변경: docs/project-structure.md and tests/test_settlement_draft_docs.py
- 검증: /opt/data/gitea-agent/runtime/issue15-20261009T023318Z/venv/bin/python -B -m pytest -o addopts= -p no:cacheprovider -q tests/test_settlement_draft_docs.py::test_settlement_draft_project_ownership_and_shared_policy_wiring; exit0 after named RED assertion exit1; records /opt/data/gitea-agent/repositories/jsfamily/jarca-ledger-mcp/worktrees/issue-15/verification/i15rw2-regressions/main-red-project.json and /opt/data/gitea-agent/repositories/jsfamily/jarca-ledger-mcp/worktrees/issue-15/verification/i15rw2-regressions/main-green-project.json; GREEN hashes verified against final immutable blobs in independent-final-evidence-access.json
- 근거: Actual facade/MCP/gateway/shared-panel/page ownership and single-active/month-end/unverified authority policies documented without changing runtime.
- DOC-RF-semantic — `resolved`
- 분류: valid_fix
- 변경: docs/runtime-flow.md and tests/test_settlement_draft_docs.py
- 검증: /opt/data/gitea-agent/runtime/issue15-20261009T023318Z/venv/bin/python -B -m pytest -o addopts= -p no:cacheprovider -q tests/test_settlement_draft_docs.py::test_settlement_draft_runtime_cancel_and_recovery_contract; exit0 after named RED assertion exit1; records /opt/data/gitea-agent/repositories/jsfamily/jarca-ledger-mcp/worktrees/issue-15/verification/i15rw2-regressions/main-red-runtime.json and /opt/data/gitea-agent/repositories/jsfamily/jarca-ledger-mcp/worktrees/issue-15/verification/i15rw2-regressions/main-green-runtime.json; GREEN hashes verified against final immutable blobs in independent-final-evidence-access.json
- 근거: Cancel guards, persisted metadata, approval invalidation, retained evidence, rollback and fresh-key/correction reopening documented against actual implementation.
### 최종 검증
- Local checks: /opt/data/gitea-agent/runtime/issue15-20261009T023318Z/venv/bin/python -B -m pytest -o addopts= -p no:cacheprovider --basetemp /tmp/i15rw2-final-0hiu3frk/pytest-base -ra -q tests; exit0, 398 passed, 4 skipped; /opt/data/gitea-agent/runtime/issue15-20261009T023318Z/venv/bin/python -B -m ruff check --no-cache .; exit0. Canonical stage i15rw2-final; manifest /opt/data/gitea-agent/repositories/jsfamily/jarca-ledger-mcp/worktrees/issue-15/verification/i15rw2-final/evidence-manifest.json SHA256 66081e334e1090d95a3aa4fcb3990bc2ed8dbecf8ec26e741ec0404f4462680d; plan SHA256 e8de94bc54bf4cf0d78909c4b14c6d29104d63609599bdce635bc5588a42d5a5; independently verified same-UID local read-only access, no external-host access claim. Four existing PDF-sample skips; no source runtime changes.
- Runtime/browser: Full suite includes real stdio MCP lifecycle and Streamlit AppTest. No new browser run or browser-evidence reuse claim. Independent documentation/spec-code review PASS and final immutable 163-file evidence gate PASS.
- Commit status: pending
- Actions runs: 없음
### 다음 단계
Reviewer가 rework head를 새 snapshot으로 다시 검토해야 하며 이 comment는 기존 `REQUEST_CHANGES`를 해제하거나 승인을 의미하지 않는다.
<!-- gitea-agent:implementation-rework/v1 owner=jsfamily repository=jarca-ledger-mcp issue=15 pr=16 review=71 reviewed-head=4c5cb0627cdc1aa68b5ef4f51411d4563b0c8199 head=bae137dce77245f1f506c2a0086101b6a067c9ab contract-sha256=347e1e9d4ef3514754f93515ccfe71d94daa880bcd4129ad3fc1989c53b0641c result-sha256=7f74e5fc25a169189e4fdedd13c78789019c3fff27f4549c53f11d5bdc24e316 correlation=f1efeb51c755e980279a721d4f9472401969508db0f843116a9ae3eef4fade4d -->
계약: 초안 ID, 정산 월·기준일, 상태, 생성자·생성/변경 시각, 메모, 동시 편집 버전, 생성 중복 방지 키, 최종 마감 ID 및 정정 관계를 영속 저장한다. 자료가 없어도 생성·저장할 수 있고 생성 자체로 마감 run이나 확정 금액을 만들지 않는다. 정산 월별 활성 초안은 일반/정정 구분 없이 하나로 제한하고, 완료·취소 후 새 초안을 열 수 있다. 생성 키 재시도는 같은 초안을 반환하고 다른 요청의 활성 중복은 충돌한다. 이미 마감한 기준일의 새 초안은 이전 run과 정정 사유를 연결한다. 정산 기준일은 해당 월말로 고정하며 입력한 날짜도 월말과 일치하는지 검증한다.
구현 근거: jarca_ledger_mcp/application/settlement_draft_service.py, jarca_ledger_mcp/infrastructure/sqlite/migrations.py; service 153-185, 394-396; migration 21-45; tests 54-98, 262-277; 재검토에서는 이전 head부터 후속 전체 diff가 두 설계 문서와 추가 문서 test에만 한정됨을 확인했고 변경 없는 구현 및 기존 test 근거를 보존했다.
테스트 근거: tests/test_monthly_settlement_drafts.py, tests/test_settlement_draft_correction_contract.py
판정 근거: 무자료 생성은 run을 쓰지 않는다. 월말과 단일 활성 초안, 생성 재시도 및 정정 연결을 검증한다.
IN-02 — satisfied
계약: 초안의 정산 대상 계좌·자산·부채와 포함/제외 여부·사유를 관리한다. 계좌별 valuation_id, 선택 방식·사유, 선택자·시각, 항목 버전, 대체 승인 근거와 준비 상태를 저장한다. 새로운 계좌·대상 변경을 자동 반영하지 않고 명시적 대상 갱신으로만 반영하며 기존 선택과 승인에 미치는 차이를 검토한다.
구현 근거: jarca_ledger_mcp/application/settlement_draft_service.py; service 63-140, 219-258, 261-307; frozen-target and refresh tests; 재검토에서는 이전 head부터 후속 전체 diff가 두 설계 문서와 추가 문서 test에만 한정됨을 확인했고 변경 없는 구현 및 기존 test 근거를 보존했다.
테스트 근거: tests/test_monthly_settlement_drafts.py, tests/test_settlement_draft_authority.py
판정 근거: 대상 동결과 명시적 갱신, 포함 및 제외 사유와 선택 감사 정보를 보존한다.
IN-03 — satisfied
계약: 기존 평가 등록·조회·정정 기능을 재사용한다. 선택한 자료의 계좌 소속, 통화, 평가 목적과 대표 부채 정의를 검증하고 계좌별 대표 합산 금액은 하나만 사용한다. 투자 원금·현금성 잔액·평가액을 중복 합산하지 않는다. 증빙/등록 중복 방지와 append-only 정정을 보존한다.
구현 근거: jarca_ledger_mcp/application/settlement_draft_service.py, jarca_ledger_mcp/application/assets_service.py, jarca_ledger_mcp/application/account_valuation_service.py; service 261-307; contract scenario 56-73; representative and liability registration tests; 재검토에서는 이전 head부터 후속 전체 diff가 두 설계 문서와 추가 문서 test에만 한정됨을 확인했고 변경 없는 구현 및 기존 test 근거를 보존했다.
테스트 근거: tests/test_settlement_draft_selection.py, tests/test_settlement_draft_contract_scenarios.py
판정 근거: 기존 등록과 정정 검증을 재사용하고 계좌별 대표 정수 금액만 합산한다.
IN-04 — satisfied
계약: exact는 같은 기준일의 확인 자료, carried_before는 이전 확인 자료의 승인된 이월, manual_substitute는 특정 자료의 명시적 직접 지정이다. 자동 선택은 이후 날짜 자료를 선택하지 않는다. 수동 대체는 실제 날짜·방향을 포함한 날짜 차이·사유·승인을 보존한다. 등록일과 평가 기준일을 구분한다. 미확인 자료는 초안 선택·검토용으로 보존하되 잠정 합계의 authority 금액에 포함하지 않고 확인 필요 상태로 표시한다. 최종 합산하려면 append-only 확인/정정 자료를 사용자가 명시적으로 다시 선택하고 재검토·승인한다. 끝내 미확인인 항목은 누락/제외로 표시하고 조건부 마감 시 그 누락을 승인한다. 확인 승인을 이유로 원본 verification_status를 덮어쓰지 않는다.
구현 근거: jarca_ledger_mcp/application/settlement_draft_service.py, jarca_ledger_mcp/application/assets_service.py; service 93-140, 261-307; tests 136-175; contract scenario 76-94; 재검토에서는 이전 head부터 후속 전체 diff가 두 설계 문서와 추가 문서 test에만 한정됨을 확인했고 변경 없는 구현 및 기존 test 근거를 보존했다.
테스트 근거: tests/test_monthly_settlement_drafts.py, tests/test_settlement_draft_selection.py, tests/test_settlement_draft_contract_scenarios.py
판정 근거: 자동 미래 선택은 금지하고 직접 지정의 실제 날짜와 사유를 보존한다. 미확인 금액은 authority에서 제외하며 확인 child는 재선택한다.
IN-05 — satisfied
계약: 초안 조회·검토·미리보기에서 대상/제외 목록, 자료 ID, 대표 금액·통화·자산/부채 분류, 실제 평가일, 선택 방식·날짜 차이, 증빙 출처·확인 상태, 선택/대체/제외 사유, 누락·승인 필요 항목, 잠정 총자산·총부채·순자산을 제공한다. 미선택 금액은 0으로 표시하지 않고 자료 완전성, 미등록 부채 및 대체 포함 여부를 명시한다.
구현 근거: jarca_ledger_mcp/application/settlement_draft_service.py, jarca_ledger_mcp/application/assets_service.py, jarca_ledger_mcp/application/monthly_settlement_service.py; service 93-140, 375-387; contract scenario 32-54, 119-173; read-model tests 9-35; 재검토에서는 이전 head부터 후속 전체 diff가 두 설계 문서와 추가 문서 test에만 한정됨을 확인했고 변경 없는 구현 및 기존 test 근거를 보존했다.
테스트 근거: tests/test_settlement_draft_contract_scenarios.py, tests/test_settlement_draft_read_models.py
판정 근거: NULL과 0, 준비 상태와 제외 및 누락, 원본 날짜 및 날짜 방향과 잠정 합계가 응답과 마감 읽기 모델에 전파된다.
IN-06 — satisfied
계약: 최종 마감은 사용자가 검토한 초안 버전과 선택 증거를 고정한다. 승인 뒤 대상·선택·사유·금액/분류·경고 또는 관련 증거가 달라지면 기존 승인을 사용할 수 없다. 계좌의 현재값이나 최신 정정본으로 조용히 다시 선택하지 않는다.
구현 근거: jarca_ledger_mcp/application/settlement_draft_service.py; service 63-140, 202-211, 319-360; tests 191-202; authority drift scenarios; 재검토에서는 이전 head부터 후속 전체 diff가 두 설계 문서와 추가 문서 test에만 한정됨을 확인했고 변경 없는 구현 및 기존 test 근거를 보존했다.
테스트 근거: tests/test_monthly_settlement_drafts.py, tests/test_settlement_draft_authority.py
판정 근거: 변경은 승인 binding을 무효화한다. 외부 drift에서도 최종화가 새 fingerprint 또는 review-needed guard로 차단되고 최신 자료로 자동 교체하지 않는다.
IN-07 — satisfied
계약: 초안 최종 상태 전이, 연결된 asset_snapshot_runs 및 asset_snapshots 저장을 하나의 트랜잭션으로 처리한다. 중복 클릭/동일 요청 재시도는 같은 마감을 반환하고 다른 payload의 키 재사용은 충돌한다. 실패 시 부분 마감과 완료 초안이 남지 않는다.
구현 근거: jarca_ledger_mcp/application/settlement_draft_service.py; service 338-391; tests 204-247; contract scenario 145-173; 재검토에서는 이전 head부터 후속 전체 diff가 두 설계 문서와 추가 문서 test에만 한정됨을 확인했고 변경 없는 구현 및 기존 test 근거를 보존했다.
테스트 근거: tests/test_monthly_settlement_drafts.py, tests/test_settlement_draft_contract_scenarios.py
판정 근거: 하나의 BEGIN IMMEDIATE에서 run과 rows 및 초안 완료를 저장한다. 실패 rollback과 동시 재시도 persisted response를 검증한다.
IN-08 — satisfied
계약: 원본 초안 ID·버전, 월·기준일, 적용 자료/금액/통화/분류, 실제 날짜·선택 방식·날짜 차이, 증빙/확인 상태, 포함·제외·대체 사유, 승인자·시각·근거와 누락/경고를 마감 이력에 보존한다. 완전한 exact 마감, 이월·대체 포함, 승인된 누락을 별도로 식별한다. 대체 사용과 누락은 하나의 모호한 상태로 합치지 않는다.
구현 근거: jarca_ledger_mcp/application/settlement_draft_service.py, jarca_ledger_mcp/application/assets_service.py, jarca_ledger_mcp/application/monthly_settlement_service.py; service 365-387; assets 424-464, 1046-1060; scenario 32-54, 167-173; 재검토에서는 이전 head부터 후속 전체 diff가 두 설계 문서와 추가 문서 test에만 한정됨을 확인했고 변경 없는 구현 및 기존 test 근거를 보존했다.
테스트 근거: tests/test_settlement_draft_contract_scenarios.py, tests/test_settlement_draft_read_models.py, tests/test_settlement_draft_audit_reproductions.py
판정 근거: 마감 증거는 초안 버전과 날짜, 승인 flags 및 제외 사유를 고정한다. 대체와 승인된 누락은 독립 flags이며 readiness와 included, exclusion_reason으로 누락과 명시적 제외도 구분 가능하다.
IN-09 — satisfied
계약: 초안에서 선택 자료에 정정본이 생기면 검토 필요를 표시하고 사용자가 교체 여부를 결정한다. 확정 마감은 이후 평가 등록·정정으로 변경하지 않는다. 명시적 정정 초안과 사유로 새 마감을 이전 run에 연결하며 이전 기록을 보존한다.
구현 근거: jarca_ledger_mcp/application/settlement_draft_service.py, jarca_ledger_mcp/application/assets_service.py; service 63-91, 153-170, 352-369; authority and correction-parent tests; 재검토에서는 이전 head부터 후속 전체 diff가 두 설계 문서와 추가 문서 test에만 한정됨을 확인했고 변경 없는 구현 및 기존 test 근거를 보존했다.
테스트 근거: tests/test_settlement_draft_authority.py, tests/test_settlement_draft_correction_contract.py
판정 근거: 정정 child는 검토 필요로 표시하고 자동 교체하지 않는다. 새 정정 run은 이전 run에 연결하며 기존 마감은 불변이다.
IN-10 — satisfied
계약: 기존 수동 자산·부채도 대상과 합계에 포함한다. 검토 당시의 값·날짜·분류·출처를 증거로 고정하고 원본 변경을 drift로 검출한다. 갱신하려면 명시적 재검토를 거치며 마감 때 live 값을 몰래 재사용하지 않는다. 수동 자료의 자동 날짜 선택은 기존 exact/as_of 제한을 유지한다.
구현 근거: jarca_ledger_mcp/application/settlement_draft_service.py, jarca_ledger_mcp/application/assets_service.py; service 63-140, 219-258; tests 177-188; manual drift authority scenarios; 재검토에서는 이전 head부터 후속 전체 diff가 두 설계 문서와 추가 문서 test에만 한정됨을 확인했고 변경 없는 구현 및 기존 test 근거를 보존했다.
테스트 근거: tests/test_monthly_settlement_drafts.py, tests/test_settlement_draft_authority.py
판정 근거: 수동 자산과 부채는 frozen source에 결합하고 원본 변경을 drift로 검출하며 명시적 갱신이 필요하다.
IN-11 — satisfied
계약: Dashboard에서 생성·목록·상세·저장·취소, 계좌 자료 조회·등록·지정·해제, 포함/제외 및 사유 수정, 검토·승인·최종 마감, 확정 조회·정정 초안 생성을 제공한다. MCP도 같은 작업을 공통 application service로 제공한다.
구현 근거: jarca_ledger_mcp/application/settlement_draft_service.py, jarca_ledger_mcp/service.py, jarca_ledger_mcp/adapters/mcp/server.py, jarca_ledger_mcp/adapters/mcp/tool_contracts.py, jarca_ledger_mcp/adapters/streamlit/settlement_gateway.py, dashboard/page_views/settlement_drafts.py, dashboard/page_views/assets.py, dashboard/page_views/monthly_settlement.py; shared application entrypoints, thin MCP and Streamlit gateway, explicit panel actions; adapter and real MCP stdio tests; 재검토에서는 이전 head부터 후속 전체 diff가 두 설계 문서와 추가 문서 test에만 한정됨을 확인했고 변경 없는 구현 및 기존 test 근거를 보존했다.
테스트 근거: tests/test_settlement_draft_adapters.py, tests/test_settlement_draft_mcp_runtime.py, tests/test_settlement_draft_dashboard.py, tests/test_settlement_draft_panel_workflow.py, tests/test_settlement_draft_panel_feedback.py, tests/test_settlement_draft_liability_registration.py
판정 근거: UI와 MCP는 공통 application에 위임한다. 자료 등록과 지정 및 해제, 저장과 취소, 검토와 승인 및 마감, 확정 조회와 정정 생성 경로를 제공한다.
IN-12 — satisfied
계약: 합성 자료로 원본 수락 기준을 검증한다. 특히 2026-09 초안에 2026-10-05/07 자료 직접 지정, 늦게 등록한 2026-09-30 자료의 exact 구분, 자동 미래 선택 금지, 승인 후 변경 차단, 정정·동시 편집·재시도·트랜잭션 실패와 기존 API/마이그레이션 회귀를 포함한다.
구현 근거: jarca_ledger_mcp/application/settlement_draft_service.py, jarca_ledger_mcp/application/assets_service.py, jarca_ledger_mcp/infrastructure/sqlite/migrations.py, jarca_ledger_mcp/application/monthly_settlement_service.py; 새 canonical i15rw2-final manifest source는 검토 head와 일치한다. 모든 163개 file blob 및 SHA256, 실제 argv와 exit 및 output을 독립 대조했다. 생산자 전체 398 passed, 4 skipped, 1 warning 및 lint exit0. Canonical collection 400에서 402로 두 문서 test만 추가되고 기존 ID와 skip 및 xfail status는 보존됐다.
테스트 근거: tests/test_monthly_settlement_drafts.py, tests/test_settlement_draft_contract_scenarios.py, tests/test_settlement_draft_authority.py, tests/test_settlement_draft_selection.py, tests/test_settlement_draft_correction_contract.py, tests/test_ledger_categories.py, tests/test_review_decision_workbench.py
판정 근거: 생산자가 현재 head의 전체 제품 테스트를 실행했다. Reviewer는 immutable source와 기록을 읽기 전용 확인했으며 제품 테스트를 실행하지 않았다. PDF sample 4개 skip과 기존 warning을 명시하고 CI 성공을 별도로 검증한 결과로 취급하지 않는다.
EX-01 — satisfied
계약: 거래 분류 완료 보장, 실제 월말 평가액 역산, 투자 성과 추정, 자산 증감을 수입·지출/투자 수익 거래로 자동 생성하는 기능.
구현 근거: jarca_ledger_mcp/application/settlement_draft_service.py, jarca_ledger_mcp/application/assets_service.py, jarca_ledger_mcp/application/monthly_settlement_service.py; exact base-to-head 38-file scope review and immutable source; no transaction insert or external price call introduced; 재검토에서는 이전 head부터 후속 전체 diff가 두 설계 문서와 추가 문서 test에만 한정됨을 확인했고 변경 없는 구현 및 기존 test 근거를 보존했다.
테스트 근거: tests/test_settlement_draft_contract_scenarios.py, tests/test_settlement_draft_authority.py, tests/test_settlement_draft_correction_contract.py
판정 근거: 제외된 가격 및 FX, 자동 승인, 거래 생성, 기존 이력 삭제, 인증과 메뉴 재설계는 추가하지 않았다. Discovery 단계 제한은 후속 구현 PR 생성 금지가 아니다.
EX-02 — satisfied
계약: 외부 가격 API, 새 환율 변환 정책, 자동 승인, 실제 계좌번호·금융자료·credential을 문서나 fixture에 저장하는 작업.
구현 근거: jarca_ledger_mcp/application/settlement_draft_service.py, jarca_ledger_mcp/application/assets_service.py, jarca_ledger_mcp/application/monthly_settlement_service.py; exact base-to-head 38-file scope review and immutable source; no transaction insert or external price call introduced; 재검토에서는 이전 head부터 후속 전체 diff가 두 설계 문서와 추가 문서 test에만 한정됨을 확인했고 변경 없는 구현 및 기존 test 근거를 보존했다.
테스트 근거: tests/test_settlement_draft_contract_scenarios.py, tests/test_settlement_draft_authority.py, tests/test_settlement_draft_correction_contract.py
판정 근거: 제외된 가격 및 FX, 자동 승인, 거래 생성, 기존 이력 삭제, 인증과 메뉴 재설계는 추가하지 않았다. Discovery 단계 제한은 후속 구현 PR 생성 금지가 아니다.
EX-03 — satisfied
계약: Dashboard 인증·쿠키/logout 또는 메뉴 순서 재설계, MCP 인증의 신규 도입.
구현 근거: jarca_ledger_mcp/application/settlement_draft_service.py, jarca_ledger_mcp/application/assets_service.py, jarca_ledger_mcp/application/monthly_settlement_service.py; exact base-to-head 38-file scope review and immutable source; no transaction insert or external price call introduced; 재검토에서는 이전 head부터 후속 전체 diff가 두 설계 문서와 추가 문서 test에만 한정됨을 확인했고 변경 없는 구현 및 기존 test 근거를 보존했다.
테스트 근거: tests/test_settlement_draft_contract_scenarios.py, tests/test_settlement_draft_authority.py, tests/test_settlement_draft_correction_contract.py
판정 근거: 제외된 가격 및 FX, 자동 승인, 거래 생성, 기존 이력 삭제, 인증과 메뉴 재설계는 추가하지 않았다. Discovery 단계 제한은 후속 구현 PR 생성 금지가 아니다.
EX-04 — satisfied
계약: 초안 취소에 따른 원본 평가·마감 이력 삭제, 기존 마감 덮어쓰기, 원본 평가일 소급 변경.
구현 근거: jarca_ledger_mcp/application/settlement_draft_service.py, jarca_ledger_mcp/application/assets_service.py, jarca_ledger_mcp/application/monthly_settlement_service.py; exact base-to-head 38-file scope review and immutable source; no transaction insert or external price call introduced; 재검토에서는 이전 head부터 후속 전체 diff가 두 설계 문서와 추가 문서 test에만 한정됨을 확인했고 변경 없는 구현 및 기존 test 근거를 보존했다.
테스트 근거: tests/test_settlement_draft_contract_scenarios.py, tests/test_settlement_draft_authority.py, tests/test_settlement_draft_correction_contract.py
판정 근거: 제외된 가격 및 FX, 자동 승인, 거래 생성, 기존 이력 삭제, 인증과 메뉴 재설계는 추가하지 않았다. Discovery 단계 제한은 후속 구현 PR 생성 금지가 아니다.
EX-05 — satisfied
계약: 정산 월의 월말과 다른 기준일, 같은 월의 복수 활성 초안, 미확인 자료의 단순 사용 승인만으로 금액을 최종 합산하는 경로.
구현 근거: jarca_ledger_mcp/application/settlement_draft_service.py, jarca_ledger_mcp/application/assets_service.py, jarca_ledger_mcp/application/monthly_settlement_service.py; exact base-to-head 38-file scope review and immutable source; no transaction insert or external price call introduced; 재검토에서는 이전 head부터 후속 전체 diff가 두 설계 문서와 추가 문서 test에만 한정됨을 확인했고 변경 없는 구현 및 기존 test 근거를 보존했다.
테스트 근거: tests/test_settlement_draft_contract_scenarios.py, tests/test_settlement_draft_authority.py, tests/test_settlement_draft_correction_contract.py
판정 근거: 제외된 가격 및 FX, 자동 승인, 거래 생성, 기존 이력 삭제, 인증과 메뉴 재설계는 추가하지 않았다. Discovery 단계 제한은 후속 구현 PR 생성 금지가 아니다.
EX-06 — satisfied
계약: Discovery 단계의 제품 코드·요구사항명세서·설계문서 작성 또는 수정, PR/브랜치 생성. 아래 산출물은 후속 구현 시의 문서 계약이다.
구현 근거: jarca_ledger_mcp/application/settlement_draft_service.py, jarca_ledger_mcp/application/assets_service.py, jarca_ledger_mcp/application/monthly_settlement_service.py; exact base-to-head 38-file scope review and immutable source; no transaction insert or external price call introduced; 재검토에서는 이전 head부터 후속 전체 diff가 두 설계 문서와 추가 문서 test에만 한정됨을 확인했고 변경 없는 구현 및 기존 test 근거를 보존했다.
테스트 근거: tests/test_settlement_draft_contract_scenarios.py, tests/test_settlement_draft_authority.py, tests/test_settlement_draft_correction_contract.py
판정 근거: 제외된 가격 및 FX, 자동 승인, 거래 생성, 기존 이력 삭제, 인증과 메뉴 재설계는 추가하지 않았다. Discovery 단계 제한은 후속 구현 PR 생성 금지가 아니다.
CON-01 — satisfied
계약: 조사 기준은 main의 고정 revision 68212e773b94dd89b6c036e6616759542c178de3이다. Gitea authoritative SHA와 갱신한 bare cache의 local ref를 비교했다.
구현 근거: docs/requirements/req-003_account-valuation-history.md; pinned base and default branch 68212e773b94dd89b6c036e6616759542c178de3; 재검토에서는 이전 head부터 후속 전체 diff가 두 설계 문서와 추가 문서 test에만 한정됨을 확인했고 변경 없는 구현 및 기존 test 근거를 보존했다.
테스트 근거: tests/test_monthly_settlement_drafts.py
판정 근거: authoritative API와 cache base SHA 일치를 확인했다.
CON-02 — satisfied
계약: SQLite schema 12에서 additive migration하며 기존 테이블·행·이력·인덱스의 의미를 보존한다. 실제 새 스키마 버전 및 물리 필드는 구현 결과와 함께 문서화하고 기존 자료를 추정 이주하지 않는다.
구현 근거: jarca_ledger_mcp/infrastructure/sqlite/migrations.py, jarca_ledger_mcp/infrastructure/sqlite/schema.py, docs/data-model.md; migrate_db 19-45, 120-147, 198; schema13 idempotency test 249-260 and schema11 preservation regression; exact-head source delta; 재검토에서는 이전 head부터 후속 전체 diff가 두 설계 문서와 추가 문서 test에만 한정됨을 확인했고 변경 없는 구현 및 기존 test 근거를 보존했다.
테스트 근거: tests/test_monthly_settlement_drafts.py, tests/test_issue_12_regressions.py, tests/test_account_valuations.py
판정 근거: 신규 테이블과 run lineage 컬럼만 additive하게 확장하며 기존 rows와 인덱스를 삭제하지 않는다. schema12 입력의 별도 실행은 없으나 공통 무조건 additive DDL과 기존 이력 및 반복 초기화 회귀를 함께 검토했다.
CON-03 — satisfied
계약: 기존 자동 exact/as_of와 기존 직접 마감의 호출/응답 계약을 유지한다. 미래 사용 예외는 직접 지정·검토·승인된 초안 마감에 한정하며 자동 선택 계약을 전역 완화하지 않는다. 기존 직접 마감이 초안의 승인·변경 검증을 우회해 선택 자료를 대신 확정하는 경로를 만들지 않는다.
구현 근거: jarca_ledger_mcp/application/settlement_draft_service.py, jarca_ledger_mcp/application/assets_service.py; existing automatic selector and direct close retained; draft finalize 338-391 does not use live direct-close shortcut; 재검토에서는 이전 head부터 후속 전체 diff가 두 설계 문서와 추가 문서 test에만 한정됨을 확인했고 변경 없는 구현 및 기존 test 근거를 보존했다.
테스트 근거: tests/test_settlement_draft_selection.py, tests/test_settlement_draft_legacy_shapes.py, tests/test_contract_regression.py
판정 근거: 기존 exact와 as_of 및 직접 마감의 envelope와 선택 의미를 보존한다.
CON-04 — satisfied
계약: rejected/unknown 날짜, 잘못된 계좌·통화·목적·대표 부채 정의와 모호한 대표 선택은 승인만으로 정상 자료가 되지 않는다. 미확인 자료는 초안에서 선택·검토할 수 있지만 미확인 금액 자체를 승인으로 합산하지 않는다. 최종 합산 전 append-only 확인/정정 자료를 명시적으로 다시 선택하고 재검토·승인해야 한다. 미확인으로 남으면 누락/제외와 그 누락에 대한 조건부 승인만 허용한다.
구현 근거: jarca_ledger_mcp/application/settlement_draft_service.py; service 261-307, 319-360; rejected, unverified, loan and wrong-scope scenarios; 재검토에서는 이전 head부터 후속 전체 diff가 두 설계 문서와 추가 문서 test에만 한정됨을 확인했고 변경 없는 구현 및 기존 test 근거를 보존했다.
테스트 근거: tests/test_settlement_draft_selection.py, tests/test_settlement_draft_authority.py, tests/test_settlement_draft_contract_scenarios.py
판정 근거: 승인은 자료의 잘못된 계좌나 목적 또는 확인 상태를 정상화하지 않는다.
CON-05 — satisfied
계약: 정수 금액의 정확도와 NULL/0 구분, 순자산의 자산−부채 계산, KRW 중심 기존 정책을 유지한다. FX 정책 없는 비KRW 금액은 단순 합산하지 않고 제외/경고를 표시한다.
구현 근거: jarca_ledger_mcp/application/settlement_draft_service.py, jarca_ledger_mcp/application/assets_service.py; contract scenario 56-73, 119-173; integer and NULL handling in review; 재검토에서는 이전 head부터 후속 전체 diff가 두 설계 문서와 추가 문서 test에만 한정됨을 확인했고 변경 없는 구현 및 기존 test 근거를 보존했다.
테스트 근거: tests/test_settlement_draft_contract_scenarios.py
판정 근거: 큰 정수 정밀도와 자산 minus 부채 계산, NULL 구분 및 비KRW 제외를 검토했다.
CON-06 — satisfied
계약: carried_before는 초안의 이전 자료 선택 의미이고 기존 public as_of를 제거하거나 이름을 바꾸지 않는다. 기존 age_days의 의미를 변경하지 않고 수동 미래 자료의 방향 있는 날짜 차이 계약을 별도로 명확히 한다.
구현 근거: jarca_ledger_mcp/application/settlement_draft_service.py, jarca_ledger_mcp/application/assets_service.py, docs/interface-contract.md; review date fields and scenario 32-54; existing as_of API unchanged; 재검토에서는 이전 head부터 후속 전체 diff가 두 설계 문서와 추가 문서 test에만 한정됨을 확인했고 변경 없는 구현 및 기존 test 근거를 보존했다.
테스트 근거: tests/test_settlement_draft_contract_scenarios.py, tests/test_settlement_draft_selection.py
판정 근거: 공개 as_of와 age_days의 방향을 유지하고 새 날짜 차이 field를 별도로 제공한다.
CON-07 — satisfied
계약: get_monthly_settlement_summary()와 기존 preview/report/render는 읽기 전용을 유지한다. 새 초안 mutation은 명시적 버튼·도구 호출로만 수행한다. missing DB 조회는 기존 db_not_initialized/no-create 계약을 유지한다.
구현 근거: jarca_ledger_mcp/application/settlement_draft_service.py, jarca_ledger_mcp/application/monthly_settlement_service.py, jarca_ledger_mcp/infrastructure/sqlite/connection.py; review 310-316 uses read_db; monthly existing read_db path and explicit new read helpers; missing DB cases; 재검토에서는 이전 head부터 후속 전체 diff가 두 설계 문서와 추가 문서 test에만 한정됨을 확인했고 변경 없는 구현 및 기존 test 근거를 보존했다.
테스트 근거: tests/test_monthly_settlement_drafts.py, tests/test_service.py, tests/test_settlement_draft_adapters.py
판정 근거: 읽기 전용 연결과 missing DB no-create를 보존한다. 새로운 mutation은 명시적 action에서만 실행된다.
CON-08 — satisfied
계약: Dashboard auth-before-DB, 기존 성공/오류 envelope, 기존 MCP transport와 application → SQLite 의존 방향을 유지한다. 업무 검증·선택·마감은 UI/MCP에서 중복 구현하지 않는다.
구현 근거: jarca_ledger_mcp/application/settlement_draft_service.py, dashboard/app.py, dashboard/page_views/settlement_drafts.py, jarca_ledger_mcp/adapters/mcp/server.py; existing app auth guard before protected page and shared service transport delegation; 재검토에서는 이전 head부터 후속 전체 diff가 두 설계 문서와 추가 문서 test에만 한정됨을 확인했고 변경 없는 구현 및 기존 test 근거를 보존했다.
테스트 근거: tests/test_dashboard_app.py, tests/test_settlement_draft_mcp_runtime.py, tests/test_settlement_draft_dashboard.py
판정 근거: 인증 이후 DB 접근과 기존 transport 및 오류 envelope를 보존하고 UI에 SQL 업무 검증을 추가하지 않았다.
CON-09 — satisfied
계약: 거래 import/분류/대사가 미완료라는 이유만으로 평가 등록과 자산 마감을 막지 않는다. 거래 준비 상태와 자산 마감 상태를 별도로 표시한다.
구현 근거: jarca_ledger_mcp/application/settlement_draft_service.py, jarca_ledger_mcp/application/monthly_settlement_service.py; contract scenario 97-117 and monthly summary asset-state propagation; 재검토에서는 이전 head부터 후속 전체 diff가 두 설계 문서와 추가 문서 test에만 한정됨을 확인했고 변경 없는 구현 및 기존 test 근거를 보존했다.
테스트 근거: tests/test_settlement_draft_contract_scenarios.py
판정 근거: 거래 미정리 blocker를 남겨도 자산 초안 승인과 마감은 가능하며 거래 rows는 그대로다.
CON-10 — satisfied
계약: 월별 단일 활성 초안·월말 기준일·미확인 금액 제외 정책을 생성/편집/검토/최종화 및 모든 후속 문서에 동일하게 적용한다. 활성 초안 중복은 일반/정정 구분으로 우회하지 않으며 취소는 증빙이나 기존 마감을 삭제하지 않는다. 사용자 선택은 제품 구현/시험 완료의 증거가 아니다.
구현 근거: jarca_ledger_mcp/application/settlement_draft_service.py, jarca_ledger_mcp/infrastructure/sqlite/migrations.py, docs/requirements/req-003_account-valuation-history.md, docs/data-model.md, docs/interface-contract.md, docs/project-structure.md, docs/runtime-flow.md; all layer single active month, fixed month-end and verified authority policy inspection; 재검토에서는 이전 head부터 후속 전체 diff가 두 설계 문서와 추가 문서 test에만 한정됨을 확인했고 변경 없는 구현 및 기존 test 근거를 보존했다.
테스트 근거: tests/test_monthly_settlement_drafts.py, tests/test_settlement_draft_correction_contract.py, tests/test_settlement_draft_contract_scenarios.py
판정 근거: 월별 단일 active, 월말 고정, 미확인 금액 제외 및 child 재선택 정책의 모든 layer 소유권과 문서 전파를 확인했다. 이전 두 설계문서 누락도 현재 추가된 섹션에서 해소됐다.
DEC-01 — satisfied
계약: 자료 확보 전 영속 초안을 만들고 계좌별 자료를 순차적으로 채우는 흐름이 필요하다. 조건부 마감을 초안처럼 반복 생성하는 것으로 대체하지 않는다.
구현 근거: jarca_ledger_mcp/application/settlement_draft_service.py, jarca_ledger_mcp/infrastructure/sqlite/migrations.py; service 153-185, 394-396; migration 21-45; tests 54-98, 262-277; 재검토에서는 이전 head부터 후속 전체 diff가 두 설계 문서와 추가 문서 test에만 한정됨을 확인했고 변경 없는 구현 및 기존 test 근거를 보존했다.
테스트 근거: tests/test_monthly_settlement_drafts.py, tests/test_settlement_draft_correction_contract.py
판정 근거: 무자료 생성은 run을 쓰지 않는다. 월말과 단일 활성 초안, 생성 재시도 및 정정 연결을 검증한다.
DEC-02 — satisfied
계약: 기준일 이후 자료는 사용자가 특정 평가를 직접 지정하고 이유 및 최종 승인을 남긴 경우에만 허용한다. 원본 기준일은 그대로 두고 “정확한 월말 평가액”으로 표시하지 않는다.
구현 근거: jarca_ledger_mcp/application/settlement_draft_service.py, jarca_ledger_mcp/application/assets_service.py; service 93-140, 261-307; tests 136-175; contract scenario 76-94; 재검토에서는 이전 head부터 후속 전체 diff가 두 설계 문서와 추가 문서 test에만 한정됨을 확인했고 변경 없는 구현 및 기존 test 근거를 보존했다.
테스트 근거: tests/test_monthly_settlement_drafts.py, tests/test_settlement_draft_selection.py, tests/test_settlement_draft_contract_scenarios.py
판정 근거: 자동 미래 선택은 금지하고 직접 지정의 실제 날짜와 사유를 보존한다. 미확인 금액은 authority에서 제외하며 확인 child는 재선택한다.
DEC-03 — satisfied
계약: 승인은 검토한 초안 버전/증거에 결합하며 변경 후 재검토·재승인이 필요하다. 마감은 선택한 자료와 적용 금액을 불변 증거로 저장한다.
구현 근거: jarca_ledger_mcp/application/settlement_draft_service.py; service 63-140, 202-211, 319-360; tests 191-202; authority drift scenarios; 재검토에서는 이전 head부터 후속 전체 diff가 두 설계 문서와 추가 문서 test에만 한정됨을 확인했고 변경 없는 구현 및 기존 test 근거를 보존했다.
테스트 근거: tests/test_monthly_settlement_drafts.py, tests/test_settlement_draft_authority.py
판정 근거: 변경은 승인 binding을 무효화한다. 외부 drift에서도 최종화가 새 fingerprint 또는 review-needed guard로 차단되고 최신 자료로 자동 교체하지 않는다.
DEC-04 — satisfied
계약: 취소·정정은 원본 증빙과 이전 마감을 보존한다. 정정본은 자동 교체하지 않고 정정 마감은 새 run으로 연결한다.
구현 근거: jarca_ledger_mcp/application/settlement_draft_service.py, jarca_ledger_mcp/application/assets_service.py; service 63-91, 153-170, 352-369; authority and correction-parent tests; 재검토에서는 이전 head부터 후속 전체 diff가 두 설계 문서와 추가 문서 test에만 한정됨을 확인했고 변경 없는 구현 및 기존 test 근거를 보존했다.
테스트 근거: tests/test_settlement_draft_authority.py, tests/test_settlement_draft_correction_contract.py
판정 근거: 정정 child는 검토 필요로 표시하고 자동 교체하지 않는다. 새 정정 run은 이전 run에 연결하며 기존 마감은 불변이다.
DEC-05 — satisfied
계약: 기존 계좌 이력, 자동 exact/as_of, 수동 자산·부채와 Dashboard/MCP 공통 서비스 경계를 유지한다. 거래 정산과 자산 마감은 분리한다.
구현 근거: jarca_ledger_mcp/application/settlement_draft_service.py, jarca_ledger_mcp/service.py, jarca_ledger_mcp/adapters/mcp/server.py, jarca_ledger_mcp/adapters/mcp/tool_contracts.py, jarca_ledger_mcp/adapters/streamlit/settlement_gateway.py, dashboard/page_views/settlement_drafts.py, dashboard/page_views/assets.py, dashboard/page_views/monthly_settlement.py; shared application entrypoints, thin MCP and Streamlit gateway, explicit panel actions; adapter and real MCP stdio tests; 재검토에서는 이전 head부터 후속 전체 diff가 두 설계 문서와 추가 문서 test에만 한정됨을 확인했고 변경 없는 구현 및 기존 test 근거를 보존했다.
테스트 근거: tests/test_settlement_draft_adapters.py, tests/test_settlement_draft_mcp_runtime.py, tests/test_settlement_draft_dashboard.py, tests/test_settlement_draft_panel_workflow.py, tests/test_settlement_draft_panel_feedback.py, tests/test_settlement_draft_liability_registration.py
판정 근거: UI와 MCP는 공통 application에 위임한다. 자료 등록과 지정 및 해제, 저장과 취소, 검토와 승인 및 마감, 확정 조회와 정정 생성 경로를 제공한다.
DEC-06 — satisfied
계약: 문서 분류는 기존 계좌 평가·자산 마감 기능과 월정산 propagation의 동작/정책 확장이므로 기존 REQ-003을 갱신한다. 새 테이블/초안 lifecycle의 추가나 기존 문서의 제외 범위만으로 별도 ID를 만들지 않는다. 이는 문서 배치 판정이며 OQ의 제품 정책을 결정하지 않는다.
구현 근거: jarca_ledger_mcp/application/settlement_draft_service.py, jarca_ledger_mcp/infrastructure/sqlite/migrations.py, docs/requirements/req-003_account-valuation-history.md; service 153-185, 394-396; migration 21-45; tests 54-98, 262-277; 재검토에서는 이전 head부터 후속 전체 diff가 두 설계 문서와 추가 문서 test에만 한정됨을 확인했고 변경 없는 구현 및 기존 test 근거를 보존했다.
테스트 근거: tests/test_monthly_settlement_drafts.py, tests/test_settlement_draft_correction_contract.py
판정 근거: 무자료 생성은 run을 쓰지 않는다. 월말과 단일 활성 초안, 생성 재시도 및 정정 연결을 검증한다.
DEC-07 — satisfied
계약: 사용자 선택 — 활성 초안: 정산 월마다 활성 초안을 하나만 허용한다. 일반/정정 초안을 같은 제한으로 관리하고 완료·취소 후 새 초안을 열 수 있다. 이미 마감한 기준일의 새 초안은 이전 run과 정정 사유를 연결하며, 동일 키 재시도는 기존 초안을 반환하고 다른 요청의 중복 생성은 충돌한다.
구현 근거: jarca_ledger_mcp/application/settlement_draft_service.py, jarca_ledger_mcp/infrastructure/sqlite/migrations.py; service 153-185, 394-396; migration 21-45; tests 54-98, 262-277; 재검토에서는 이전 head부터 후속 전체 diff가 두 설계 문서와 추가 문서 test에만 한정됨을 확인했고 변경 없는 구현 및 기존 test 근거를 보존했다.
테스트 근거: tests/test_monthly_settlement_drafts.py, tests/test_settlement_draft_correction_contract.py
판정 근거: 무자료 생성은 run을 쓰지 않는다. 월말과 단일 활성 초안, 생성 재시도 및 정정 연결을 검증한다.
DEC-08 — satisfied
계약: 사용자 선택 — 정산 기준일: 정산 기준일은 정산 월의 마지막 날짜로 고정한다. 사용자가 입력했다면 월말과 일치하는지 검증하고 월정산 summary의 현재 월말 읽기 의미를 유지한다.
구현 근거: jarca_ledger_mcp/application/settlement_draft_service.py, jarca_ledger_mcp/infrastructure/sqlite/migrations.py; service 153-185, 394-396; migration 21-45; tests 54-98, 262-277; 재검토에서는 이전 head부터 후속 전체 diff가 두 설계 문서와 추가 문서 test에만 한정됨을 확인했고 변경 없는 구현 및 기존 test 근거를 보존했다.
테스트 근거: tests/test_monthly_settlement_drafts.py, tests/test_settlement_draft_correction_contract.py
판정 근거: 무자료 생성은 run을 쓰지 않는다. 월말과 단일 활성 초안, 생성 재시도 및 정정 연결을 검증한다.
DEC-09 — satisfied
계약: 사용자 선택 — 미확인 자료: 미확인 자료는 초안에서 선택·검토할 수 있으나 최종 금액에 반영하려면 append-only 확인/정정 자료를 명시적으로 다시 선택하고 재검토·승인해야 한다. 끝내 확인되지 않은 항목은 누락/제외로 표시하고 조건부 마감 시 그 누락을 승인한다. 기존 verified authority를 유지한다.
구현 근거: jarca_ledger_mcp/application/settlement_draft_service.py, jarca_ledger_mcp/application/assets_service.py; service 93-140, 261-307; tests 136-175; contract scenario 76-94; 재검토에서는 이전 head부터 후속 전체 diff가 두 설계 문서와 추가 문서 test에만 한정됨을 확인했고 변경 없는 구현 및 기존 test 근거를 보존했다.
테스트 근거: tests/test_monthly_settlement_drafts.py, tests/test_settlement_draft_selection.py, tests/test_settlement_draft_contract_scenarios.py
판정 근거: 자동 미래 선택은 금지하고 직접 지정의 실제 날짜와 사유를 보존한다. 미확인 금액은 authority에서 제외하며 확인 child는 재선택한다.
DOC-REQ-structural — satisfied
계약: - 조치: 갱신 - 경로: docs/requirements/req-003_account-valuation-history.md - 문서 ID: REQ-003 - 제목: 계좌 기준일 평가 이력과 자산 마감 연동 - 변경 내용: 기존 ID·파일명·제목을 유지하고 초안 생성/편집/취소, 계좌별 직접 지정, 날짜 차이와 대체 승인, 대상 갱신, 검토 버전/fingerprint, 최종화·정정 초안 및 공통 adapter 요구사항/인수 기준을 추가한다. 미래 제외 규칙을 자동/직접 마감과 승인된 초안 예외로 분리한다. 월별 단일 활성 초안과 월말 기준일 검증을 추가하고 미확인 선택·검토는 허용하되 확인/정정 자료의 명시적 재선택·재검토·승인 전 금액 합산을 금지한다. 미확인으로 남은 항목은 누락/제외 및 조건부 누락 승인으로 처리한다. 기존 append-only, 정수/NULL, 대표 부채, no-fake-transaction, auth/menu·읽기 전용 계약을 유지한다. revision과 변경 이력을 갱신하고 기존 12/13 추적성을 보존하면서 이번 근거 15, 이번 구현 PR 미정을 구분한다. - 포함할 내용: 무자료 생성과 no-close, 같은 키 재사용/다른 payload 충돌, 일반/정정 통합 월별 단일 활성 초안, 완료/취소 후 재생성과 기존 마감의 정정 연결, 월말 고정 기준일과 입력 일치 검증, 대상의 명시적 갱신, 준비 상태와 금액의 NULL/0, 계좌/통화/목적/대표 부채 검증, exact/carried_before/manual_substitute와 자동 미래 금지, 이후 자료의 원본 날짜·사유·승인, 미확인 초안 선택/검토, 확인/정정 자료의 명시적 재선택·재검토·승인, 미확인 금액 합산 금지 및 미해소 항목의 승인된 누락/제외, 잠정 합계·완전성·누락/제외/대체 구분, 수동 자산/부채 보존 및 drift, 검토 이후 모든 의미 있는 변경의 재승인, 단일 트랜잭션과 동시 편집 충돌/no-partial-write, persisted evidence 기반 재시도, immutable close와 명시적 정정, 거래/자산 상태 분리, Dashboard/MCP 동등 동작, schema migration 및 기존 API/보안/legacy 회귀를 정상·경계·실패 사례로 명세한다. - 제외할 내용: 거래 완료/성과 추정 보장, FX/가격 API, 자동 승인·자동 미래 선택, 인증/메뉴 재설계, 실제 금융자료, 원본 날짜 변경 및 이력 삭제. - 근거: REQ-003.02/.06/.07/.08/.09의 기존 기능과 정책을 직접 확장하는 작업이다. 영속 초안이 새 aggregate라는 이유만으로 별도 REQ-004를 만들지 않고 현 작성 규칙에 따라 갱신한다. 동일 ID를 유지하므로 신규 ID 할당은 없다.
구현 근거: docs/requirements/req-003_account-valuation-history.md; exact approved path exists; metadata 1-13; requirements 53-181; new AC 201-539; old AC 541-648; traceability 665-667; 재검토에서는 이전 head부터 후속 전체 diff가 두 설계 문서와 추가 문서 test에만 한정됨을 확인했고 변경 없는 구현 및 기존 test 근거를 보존했다.
테스트 근거: tests/test_settlement_draft_docs.py, tests/test_requirement_docs.py
판정 근거: 정본 경로와 문서 구조를 확인했다. REQ metadata 및 11개 번호 섹션, 영향 범위와 인수 기준 및 traceability는 trusted README와 TEMPLATE에 대조했다.
DOC-REQ-semantic — satisfied
계약: - 조치: 갱신 - 경로: docs/requirements/req-003_account-valuation-history.md - 문서 ID: REQ-003 - 제목: 계좌 기준일 평가 이력과 자산 마감 연동 - 변경 내용: 기존 ID·파일명·제목을 유지하고 초안 생성/편집/취소, 계좌별 직접 지정, 날짜 차이와 대체 승인, 대상 갱신, 검토 버전/fingerprint, 최종화·정정 초안 및 공통 adapter 요구사항/인수 기준을 추가한다. 미래 제외 규칙을 자동/직접 마감과 승인된 초안 예외로 분리한다. 월별 단일 활성 초안과 월말 기준일 검증을 추가하고 미확인 선택·검토는 허용하되 확인/정정 자료의 명시적 재선택·재검토·승인 전 금액 합산을 금지한다. 미확인으로 남은 항목은 누락/제외 및 조건부 누락 승인으로 처리한다. 기존 append-only, 정수/NULL, 대표 부채, no-fake-transaction, auth/menu·읽기 전용 계약을 유지한다. revision과 변경 이력을 갱신하고 기존 12/13 추적성을 보존하면서 이번 근거 15, 이번 구현 PR 미정을 구분한다. - 포함할 내용: 무자료 생성과 no-close, 같은 키 재사용/다른 payload 충돌, 일반/정정 통합 월별 단일 활성 초안, 완료/취소 후 재생성과 기존 마감의 정정 연결, 월말 고정 기준일과 입력 일치 검증, 대상의 명시적 갱신, 준비 상태와 금액의 NULL/0, 계좌/통화/목적/대표 부채 검증, exact/carried_before/manual_substitute와 자동 미래 금지, 이후 자료의 원본 날짜·사유·승인, 미확인 초안 선택/검토, 확인/정정 자료의 명시적 재선택·재검토·승인, 미확인 금액 합산 금지 및 미해소 항목의 승인된 누락/제외, 잠정 합계·완전성·누락/제외/대체 구분, 수동 자산/부채 보존 및 drift, 검토 이후 모든 의미 있는 변경의 재승인, 단일 트랜잭션과 동시 편집 충돌/no-partial-write, persisted evidence 기반 재시도, immutable close와 명시적 정정, 거래/자산 상태 분리, Dashboard/MCP 동등 동작, schema migration 및 기존 API/보안/legacy 회귀를 정상·경계·실패 사례로 명세한다. - 제외할 내용: 거래 완료/성과 추정 보장, FX/가격 API, 자동 승인·자동 미래 선택, 인증/메뉴 재설계, 실제 금융자료, 원본 날짜 변경 및 이력 삭제. - 근거: REQ-003.02/.06/.07/.08/.09의 기존 기능과 정책을 직접 확장하는 작업이다. 영속 초안이 새 aggregate라는 이유만으로 별도 REQ-004를 만들지 않고 현 작성 규칙에 따라 갱신한다. 동일 ID를 유지하므로 신규 ID 할당은 없다.
구현 근거: docs/requirements/req-003_account-valuation-history.md, jarca_ledger_mcp/application/settlement_draft_service.py; metadata 1-13; requirements 53-181; new AC 201-539; old AC 541-648; traceability 665-667; 재검토에서는 이전 head부터 후속 전체 diff가 두 설계 문서와 추가 문서 test에만 한정됨을 확인했고 변경 없는 구현 및 기존 test 근거를 보존했다.
테스트 근거: tests/test_settlement_draft_docs.py, tests/test_monthly_settlement_drafts.py
판정 근거: REQ-003 ID와 제목 및 기존 추적성을 유지하며 기존 AC 10개 중 9개는 원문 보존, migration AC는 schema13 현재 버전으로 승인된 확장을 반영했다. v12 이름의 테스트도 실제 단언은 13이므로 stale verification으로 보지 않는다.
DOC-DM-structural — satisfied
계약: - 조치: 갱신 - 경로: docs/data-model.md - 변경 내용: 초안과 항목의 영속 엔터티를 추가해 초안→대상 항목, 항목→계좌/valuation, 초안→최종 run, 정정 초안→이전 run 관계와 필수/선택성·유일성·삭제 금지를 기록한다. 초안의 월·기준일·상태·작성자·시각·메모·버전·중복 키·완료 연결, 항목의 source identity·선택 자료·방식/사유·포함/제외·선택자·시각·버전·승인 결합 정보를 명세한다. 수동 자료는 검토 증거 값을 고정하고 원본 drift를 검출한다. 최종 run/rows에는 실제 날짜·방향 있는 차이·확인 상태·적용 금액·분류·사유·승인·누락/경고·초안 버전/fingerprint를 보존한다. 일반/정정 통합 정산 월별 활성 초안 유일성을 저장 제약과 동시성 검증으로 강제하고 완료·취소 이력은 보존한다. 월·기준일의 월말 일치 검증을 명세한다. 미확인 항목은 검토용 선택과 금액 authority를 분리하며 확인/정정 child의 명시적 재선택 후에만 합산한다. 미확인으로 남은 항목의 제외 사유와 누락 승인도 보존한다. 기존 correction/idempotency 제약, read alias와 nullable 금액 의미를 보존하고 schema 12→새 버전의 additive·반복 가능한 migration/legacy 조회/실패 및 백업 복구 경계를 문서화한다. - 근거: schema 12에는 초안/항목 persistence가 없으며 기존 account_valuations와 run/rows를 재사용·연결해야 한다. 원본 이력의 변경/삭제나 guessed migration은 필요하지 않다.
구현 근거: docs/data-model.md; exact approved path exists; settlement draft entities and fields 178-195; 재검토에서는 이전 head부터 후속 전체 diff가 두 설계 문서와 추가 문서 test에만 한정됨을 확인했고 변경 없는 구현 및 기존 test 근거를 보존했다.
테스트 근거: tests/test_settlement_draft_docs.py, tests/test_requirement_docs.py
판정 근거: 정본 경로와 문서 구조를 확인했다. REQ metadata 및 11개 번호 섹션, 영향 범위와 인수 기준 및 traceability는 trusted README와 TEMPLATE에 대조했다.
DOC-DM-semantic — satisfied
계약: - 조치: 갱신 - 경로: docs/data-model.md - 변경 내용: 초안과 항목의 영속 엔터티를 추가해 초안→대상 항목, 항목→계좌/valuation, 초안→최종 run, 정정 초안→이전 run 관계와 필수/선택성·유일성·삭제 금지를 기록한다. 초안의 월·기준일·상태·작성자·시각·메모·버전·중복 키·완료 연결, 항목의 source identity·선택 자료·방식/사유·포함/제외·선택자·시각·버전·승인 결합 정보를 명세한다. 수동 자료는 검토 증거 값을 고정하고 원본 drift를 검출한다. 최종 run/rows에는 실제 날짜·방향 있는 차이·확인 상태·적용 금액·분류·사유·승인·누락/경고·초안 버전/fingerprint를 보존한다. 일반/정정 통합 정산 월별 활성 초안 유일성을 저장 제약과 동시성 검증으로 강제하고 완료·취소 이력은 보존한다. 월·기준일의 월말 일치 검증을 명세한다. 미확인 항목은 검토용 선택과 금액 authority를 분리하며 확인/정정 child의 명시적 재선택 후에만 합산한다. 미확인으로 남은 항목의 제외 사유와 누락 승인도 보존한다. 기존 correction/idempotency 제약, read alias와 nullable 금액 의미를 보존하고 schema 12→새 버전의 additive·반복 가능한 migration/legacy 조회/실패 및 백업 복구 경계를 문서화한다. - 근거: schema 12에는 초안/항목 persistence가 없으며 기존 account_valuations와 run/rows를 재사용·연결해야 한다. 원본 이력의 변경/삭제나 guessed migration은 필요하지 않다.
구현 근거: docs/data-model.md, jarca_ledger_mcp/application/settlement_draft_service.py; settlement draft entities and fields 178-195; 재검토에서는 이전 head부터 후속 전체 diff가 두 설계 문서와 추가 문서 test에만 한정됨을 확인했고 변경 없는 구현 및 기존 test 근거를 보존했다.
테스트 근거: tests/test_settlement_draft_docs.py, tests/test_monthly_settlement_drafts.py
판정 근거: 승인된 필수 의미를 pinned 문서의 해당 섹션과 구현 및 참조 테스트에 대조했다.
DOC-IC-structural — satisfied
계약: - 조치: 갱신 - 경로: docs/interface-contract.md - 변경 내용: 공통 초안 생성·목록·상세·수정/대상 갱신·취소·계좌 자료 지정/해제·포함/제외·검토/검증·승인 최종화·정정 초안 operation을 정의하고 실제 구현의 snake_case 함수/MCP 도구/gateway 이름과 exact signature를 고정한다. 입력에는 초안/항목 ID·기대 버전, 월·기준일, 자료 ID·선택 방식·사유, 명시적 포함/제외와 사유, 생성/마감 키, 검토 fingerprint 및 승인자·시각/근거를 기록한다. 출력에는 준비 상태·버전, 대상/선택 증거, 날짜 차이·확인 상태, 잠정 합계·완전성·누락/승인 필요 목록, 완료 run/정정 연결과 persisted replay를 정의한다. 검증/대상 부재/상태·버전·증거 drift/승인 부족/키 충돌/동시 마감 오류의 조건·재시도·no-write를 명확히 한다. 기존 success/error_code/error, 자동 selector, 기존 close/report 키와 provenance 의미, Dashboard 인증 및 MCP 인증 범위를 보존한다. 초안 사용 시 직접 마감으로 안전 검증을 우회하지 못하는 경계를 규정한다. 생성·정정 생성은 같은 월의 활성 초안 중복을 검사하고 월말 아닌 입력 기준일은 거절한다. 미확인 선택은 검토용 상태를 반환하고 합계/최종화는 금액을 제외한다. 확인/정정 child를 명시적으로 다시 선택하면 버전·검토/승인을 갱신하고, 끝내 미확인인 항목은 누락/제외 승인 대상으로만 반환한다. - 근거: 기존 MCP/gateway에는 초안 mutation이 없고 현재 close는 basis-date 자료 자동 재조회 경로다. 새 공통 계약과 legacy 경로 구분이 필요하다.
구현 근거: docs/interface-contract.md; exact approved path exists; shared operation signatures and response, errors, read-only and evidence contract 438-466; 재검토에서는 이전 head부터 후속 전체 diff가 두 설계 문서와 추가 문서 test에만 한정됨을 확인했고 변경 없는 구현 및 기존 test 근거를 보존했다.
테스트 근거: tests/test_settlement_draft_docs.py, tests/test_requirement_docs.py
판정 근거: 정본 경로와 문서 구조를 확인했다. REQ metadata 및 11개 번호 섹션, 영향 범위와 인수 기준 및 traceability는 trusted README와 TEMPLATE에 대조했다.
DOC-IC-semantic — satisfied
계약: - 조치: 갱신 - 경로: docs/interface-contract.md - 변경 내용: 공통 초안 생성·목록·상세·수정/대상 갱신·취소·계좌 자료 지정/해제·포함/제외·검토/검증·승인 최종화·정정 초안 operation을 정의하고 실제 구현의 snake_case 함수/MCP 도구/gateway 이름과 exact signature를 고정한다. 입력에는 초안/항목 ID·기대 버전, 월·기준일, 자료 ID·선택 방식·사유, 명시적 포함/제외와 사유, 생성/마감 키, 검토 fingerprint 및 승인자·시각/근거를 기록한다. 출력에는 준비 상태·버전, 대상/선택 증거, 날짜 차이·확인 상태, 잠정 합계·완전성·누락/승인 필요 목록, 완료 run/정정 연결과 persisted replay를 정의한다. 검증/대상 부재/상태·버전·증거 drift/승인 부족/키 충돌/동시 마감 오류의 조건·재시도·no-write를 명확히 한다. 기존 success/error_code/error, 자동 selector, 기존 close/report 키와 provenance 의미, Dashboard 인증 및 MCP 인증 범위를 보존한다. 초안 사용 시 직접 마감으로 안전 검증을 우회하지 못하는 경계를 규정한다. 생성·정정 생성은 같은 월의 활성 초안 중복을 검사하고 월말 아닌 입력 기준일은 거절한다. 미확인 선택은 검토용 상태를 반환하고 합계/최종화는 금액을 제외한다. 확인/정정 child를 명시적으로 다시 선택하면 버전·검토/승인을 갱신하고, 끝내 미확인인 항목은 누락/제외 승인 대상으로만 반환한다. - 근거: 기존 MCP/gateway에는 초안 mutation이 없고 현재 close는 basis-date 자료 자동 재조회 경로다. 새 공통 계약과 legacy 경로 구분이 필요하다.
구현 근거: docs/interface-contract.md, jarca_ledger_mcp/application/settlement_draft_service.py; shared operation signatures and response, errors, read-only and evidence contract 438-466; 재검토에서는 이전 head부터 후속 전체 diff가 두 설계 문서와 추가 문서 test에만 한정됨을 확인했고 변경 없는 구현 및 기존 test 근거를 보존했다.
테스트 근거: tests/test_settlement_draft_docs.py, tests/test_monthly_settlement_drafts.py
판정 근거: 승인된 필수 의미를 pinned 문서의 해당 섹션과 구현 및 참조 테스트에 대조했다.
DOC-PS-structural — satisfied
계약: - 조치: 갱신 - 경로: docs/project-structure.md - 변경 내용: 기존 application/monthly_settlement_service.py의 read model을 보존하면서 초안 lifecycle의 application-layer 책임과 account_valuation_service.py(등록·검증·정정), assets_service.py(금액/증거·run 최종화), infrastructure/sqlite/schema.py/migrations.py(영속 제약/이주)의 소유권을 명확히 한다. service.py 공개 re-export, adapters/mcp/server.py/tool_contracts.py, adapters/streamlit gateway와 dashboard/page_views/monthly_settlement.py/assets.py의 연결을 실제 경로로 기록한다. 새 파일을 추가하면 그 exact 경로·책임·진입점을 문서에 반영하되 UI/MCP direct SQL, application의 Dashboard 역의존과 중복 업무 검증을 금지한다. 월별 활성 초안 유일성·월말 검증·미확인 금액 제외/확인 후 재선택의 책임을 공통 application과 SQLite 제약에 두고 adapter별 예외를 만들지 않는다. 각 변경에 대응하는 합성 테스트, 문서 검증과 기존 auth/menu/legacy 회귀 위치를 연결한다. - 근거: 기존 구조 문서는 service→SQLite와 page/tool→gateway/service 방향을 정본으로 규정한다. 새 초안 작업은 해당 책임 경계를 확장하며 별도 UI 전용 마감 로직을 만들지 않는다.
구현 근거: docs/project-structure.md; exact approved path exists; ownership table 214-226; 재검토에서는 이전 head부터 후속 전체 diff가 두 설계 문서와 추가 문서 test에만 한정됨을 확인했고 변경 없는 구현 및 기존 test 근거를 보존했다.
테스트 근거: tests/test_settlement_draft_docs.py, tests/test_requirement_docs.py
판정 근거: 정본 경로와 문서 구조를 확인했다. REQ metadata 및 11개 번호 섹션, 영향 범위와 인수 기준 및 traceability는 trusted README와 TEMPLATE에 대조했다.
DOC-PS-semantic — satisfied
계약: - 조치: 갱신 - 경로: docs/project-structure.md - 변경 내용: 기존 application/monthly_settlement_service.py의 read model을 보존하면서 초안 lifecycle의 application-layer 책임과 account_valuation_service.py(등록·검증·정정), assets_service.py(금액/증거·run 최종화), infrastructure/sqlite/schema.py/migrations.py(영속 제약/이주)의 소유권을 명확히 한다. service.py 공개 re-export, adapters/mcp/server.py/tool_contracts.py, adapters/streamlit gateway와 dashboard/page_views/monthly_settlement.py/assets.py의 연결을 실제 경로로 기록한다. 새 파일을 추가하면 그 exact 경로·책임·진입점을 문서에 반영하되 UI/MCP direct SQL, application의 Dashboard 역의존과 중복 업무 검증을 금지한다. 월별 활성 초안 유일성·월말 검증·미확인 금액 제외/확인 후 재선택의 책임을 공통 application과 SQLite 제약에 두고 adapter별 예외를 만들지 않는다. 각 변경에 대응하는 합성 테스트, 문서 검증과 기존 auth/menu/legacy 회귀 위치를 연결한다. - 근거: 기존 구조 문서는 service→SQLite와 page/tool→gateway/service 방향을 정본으로 규정한다. 새 초안 작업은 해당 책임 경계를 확장하며 별도 UI 전용 마감 로직을 만들지 않는다.
구현 근거: docs/project-structure.md, jarca_ledger_mcp/application/settlement_draft_service.py; 이전 review71 DOC-PS-semantic 보완: docs/project-structure.md 229-252에 실제 service re-export, MCP server와 tool_contracts, settlement_gateway, reusable panel과 두 page entrypoint 연결을 추가했다. 246-252에 월별 active partial unique index, 월말 검증 및 unverified authority와 명시적 child 재선택의 공통 책임과 synthetic test를 대응한다. 신규 named 문서 regression도 해당 연결을 검증한다.
테스트 근거: tests/test_settlement_draft_docs.py, tests/test_monthly_settlement_drafts.py
판정 근거: 이전 최소 보완 요청의 actual 경로와 책임, 진입점 및 의존 방향과 세 공통 정책 소유권이 모두 문서화됐다. 기존 기능이나 adapter 예외를 새로 만들지 않았다.
DOC-RF-structural — satisfied
계약: - 조치: 갱신 - 경로: docs/runtime-flow.md - 변경 내용: 인증→명시적 무자료 초안 생성→대상 동결→자료 등록/지정·해제/제외→읽기 전용 검토→버전·증거에 결합한 승인→동일 transaction에서 증거 재검증·run/rows 저장·초안 완료→불변 조회 흐름을 정의한다. 생성/정정 생성 guard는 일반/정정 통합 월별 단일 활성 초안과 월말 일치를 검증한다. 완료·취소 후 재생성은 가능하지만 기존 마감이 있으면 이전 run과 정정 사유를 연결한다. 미확인 자료 선택은 검토 필요로 전이하며 합계에는 포함하지 않는다. 확인/정정 자료를 명시적으로 재선택하면 재검토·재승인 후 최종화하고, 끝내 확인되지 않으면 누락/제외 및 조건부 누락 승인을 거친다. 변경/정정/대상 갱신은 승인을 무효화하고 검토 단계로 돌아간다. 취소는 기존 증거/run을 삭제하지 않으며 재마감은 이전 run 연결·사유·단일 correction 제약을 유지한다. 거래 준비와 자산 상태를 별도로 표시하고 외부 가격/환율 호출·추정 거래 생성은 없다. SQLite 동시 편집·키/버전 충돌, stale approval, 정정본 등장, 중복 최종화, DB 실패에 대해 no-partial-write·rollback·안전 재시도/사용자 재검토와 반환 오류를 기록한다. 관찰 정보는 초안/버전/run 상관 ID와 상태/경고 코드로 제한하고 credential/실제 계좌 자료를 로그에 남기지 않는다. - 근거: 현 runtime은 read-only preview→live authority 기반 close이며 영속 준비 단계가 없다. 기존 fingerprint drift·원자 저장·persisted replay guard를 초안 선택에 결합해 확장해야 한다.
구현 근거: docs/runtime-flow.md; exact approved path exists; lifecycle and failure/recovery guards 243-259; 재검토에서는 이전 head부터 후속 전체 diff가 두 설계 문서와 추가 문서 test에만 한정됨을 확인했고 변경 없는 구현 및 기존 test 근거를 보존했다.
테스트 근거: tests/test_settlement_draft_docs.py, tests/test_requirement_docs.py
판정 근거: 정본 경로와 문서 구조를 확인했다. REQ metadata 및 11개 번호 섹션, 영향 범위와 인수 기준 및 traceability는 trusted README와 TEMPLATE에 대조했다.
DOC-RF-semantic — satisfied
계약: - 조치: 갱신 - 경로: docs/runtime-flow.md - 변경 내용: 인증→명시적 무자료 초안 생성→대상 동결→자료 등록/지정·해제/제외→읽기 전용 검토→버전·증거에 결합한 승인→동일 transaction에서 증거 재검증·run/rows 저장·초안 완료→불변 조회 흐름을 정의한다. 생성/정정 생성 guard는 일반/정정 통합 월별 단일 활성 초안과 월말 일치를 검증한다. 완료·취소 후 재생성은 가능하지만 기존 마감이 있으면 이전 run과 정정 사유를 연결한다. 미확인 자료 선택은 검토 필요로 전이하며 합계에는 포함하지 않는다. 확인/정정 자료를 명시적으로 재선택하면 재검토·재승인 후 최종화하고, 끝내 확인되지 않으면 누락/제외 및 조건부 누락 승인을 거친다. 변경/정정/대상 갱신은 승인을 무효화하고 검토 단계로 돌아간다. 취소는 기존 증거/run을 삭제하지 않으며 재마감은 이전 run 연결·사유·단일 correction 제약을 유지한다. 거래 준비와 자산 상태를 별도로 표시하고 외부 가격/환율 호출·추정 거래 생성은 없다. SQLite 동시 편집·키/버전 충돌, stale approval, 정정본 등장, 중복 최종화, DB 실패에 대해 no-partial-write·rollback·안전 재시도/사용자 재검토와 반환 오류를 기록한다. 관찰 정보는 초안/버전/run 상관 ID와 상태/경고 코드로 제한하고 credential/실제 계좌 자료를 로그에 남기지 않는다. - 근거: 현 runtime은 read-only preview→live authority 기반 close이며 영속 준비 단계가 없다. 기존 fingerprint drift·원자 저장·persisted replay guard를 초안 선택에 결합해 확장해야 한다.
구현 근거: docs/runtime-flow.md, jarca_ledger_mcp/application/settlement_draft_service.py; 이전 review71 DOC-RF-semantic 보완: docs/runtime-flow.md 262-274의 Cancellation and reopening에서 active 상태와 version 및 actor/reason guard, BEGIN IMMEDIATE, cancel audit, 승인 무효화, 이력 보존, rollback과 재시도, 신규 키와 이전 마감 정정 연결을 명시했다. service 202-211 및394-396과153-185, 기존 cancellation/correction tests 및 신규 named 문서 regression에 대조했다.
테스트 근거: tests/test_settlement_draft_docs.py, tests/test_monthly_settlement_drafts.py
판정 근거: 취소와 재생성의 승인된 상태 전이가 실제 구현에 맞게 명시됐다. 같은 create key의 과거 초안 재사용과 새 키의 신규 초안 생성, 최신 prior run 및 정정 사유를 구분했고 원본 증거와 마감 삭제가 없다.
BASE-REQ-003.01-AC01 — satisfied
계약: REQ-003.01-AC01 — migration and preservation Cases (정상/경계/실패): 정상 schema 12 init twice; 경계 schema 11 legacy DB; 실패 malformed legacy DB. State Invariants: legacy tables/rows remain; migration repeats without duplicate columns. 판정 기준: schema_version=12, required tables/columns/indexes exist and old rows remain. 검증: tests/test_account_valuations.py::test_account_valuation_schema_is_v12_and_idempotent, tests/test_issue_12_regressions.py::test_schema12_migration_preserves_legacy_rows_indexes_and_is_idempotent. 검증 분류: level=integration; backend=sqlite
구현 근거: docs/requirements/req-003_account-valuation-history.md; REQ current AC REQ-003.01-AC01; pinned base and head whole block comparison; referenced existing test bodies reviewed; 재검토에서는 이전 head부터 후속 전체 diff가 두 설계 문서와 추가 문서 test에만 한정됨을 확인했고 변경 없는 구현 및 기존 test 근거를 보존했다.
테스트 근거: tests/test_account_valuations.py, tests/test_issue_12_regressions.py, tests/test_contract_regression.py, tests/test_service.py
판정 근거: schema 11 legacy 보존 및 반복 초기화와 malformed failure 의미를 유지하고 현재 schema_version만 12에서 13으로 승인된 additive migration에 맞춰 변경했다. 참조 테스트는 실제로 13을 단언한다.
구현 근거: docs/requirements/req-003_account-valuation-history.md; REQ current AC REQ-003.02-AC01; pinned base and head whole block comparison; referenced existing test bodies reviewed; 재검토에서는 이전 head부터 후속 전체 diff가 두 설계 문서와 추가 문서 test에만 한정됨을 확인했고 변경 없는 구현 및 기존 test 근거를 보존했다.
테스트 근거: tests/test_account_valuations.py, tests/test_issue_12_regressions.py, tests/test_contract_regression.py, tests/test_service.py
판정 근거: 기존 인수 판정과 검증 및 상태 불변조건을 원문 그대로 보존했다.
BASE-REQ-003.03-AC01 — satisfied
계약: REQ-003.03-AC01 — idempotent correction Cases (정상/경계/실패): same payload reuse; different payload conflict; second correction fails. State Invariants: one row/child per operation and original immutable. 판정 기준: exact error codes and count 2 after one correction. 검증: tests/test_account_valuations.py::test_register_same_idempotency_payload_reuses_row_and_changed_payload_conflicts, tests/test_account_valuations.py::test_correction_is_append_only_reasoned_and_single_child, tests/test_issue_12_regressions.py::test_empty_conditional_close_is_closed_and_second_close_requires_correction. 검증 분류: level=integration; backend=sqlite
구현 근거: docs/requirements/req-003_account-valuation-history.md; REQ current AC REQ-003.03-AC01; pinned base and head whole block comparison; referenced existing test bodies reviewed; 재검토에서는 이전 head부터 후속 전체 diff가 두 설계 문서와 추가 문서 test에만 한정됨을 확인했고 변경 없는 구현 및 기존 test 근거를 보존했다.
테스트 근거: tests/test_account_valuations.py, tests/test_issue_12_regressions.py, tests/test_contract_regression.py, tests/test_service.py
판정 근거: 기존 인수 판정과 검증 및 상태 불변조건을 원문 그대로 보존했다.
BASE-REQ-003.04-AC01 — satisfied
계약: REQ-003.04-AC01 — precision and representative loan Cases (정상/경계/실패): integer zero; NULL optional metrics; loan missing definition rejected. State Invariants: no float amount and no double sum. 판정 기준: optional fields round-trip exactly and loan definition validation is enforced. 검증: test_correction_preserves_optional_fields_unless_overridden, _validate_common() and schema static checks. 검증 분류: level=static; backend=sqlite
구현 근거: docs/requirements/req-003_account-valuation-history.md; REQ current AC REQ-003.04-AC01; pinned base and head whole block comparison; referenced existing test bodies reviewed; 재검토에서는 이전 head부터 후속 전체 diff가 두 설계 문서와 추가 문서 test에만 한정됨을 확인했고 변경 없는 구현 및 기존 test 근거를 보존했다.
테스트 근거: tests/test_account_valuations.py, tests/test_issue_12_regressions.py, tests/test_contract_regression.py, tests/test_service.py
판정 근거: 기존 인수 판정과 검증 및 상태 불변조건을 원문 그대로 보존했다.
BASE-REQ-003.05-AC01 — satisfied
계약: REQ-003.05-AC01 — authority separation Cases (정상/경계/실패): dated candidate; late historical candidate; name-only update. State Invariants: current/latest display cannot roll backward and candidate is unverified. 판정 기준: dated account write creates only unverified candidate; name-only does not. 검증: test_account_balance_write_records_unverified_candidate_only_with_real_basis_date, test_account_name_only_update_does_not_create_candidate. 검증 분류: level=unit; backend=application
구현 근거: docs/requirements/req-003_account-valuation-history.md; REQ current AC REQ-003.05-AC01; pinned base and head whole block comparison; referenced existing test bodies reviewed; 재검토에서는 이전 head부터 후속 전체 diff가 두 설계 문서와 추가 문서 test에만 한정됨을 확인했고 변경 없는 구현 및 기존 test 근거를 보존했다.
테스트 근거: tests/test_account_valuations.py, tests/test_issue_12_regressions.py, tests/test_contract_regression.py, tests/test_service.py
판정 근거: 기존 인수 판정과 검증 및 상태 불변조건을 원문 그대로 보존했다.
BASE-REQ-003.06-AC01 — satisfied
계약: REQ-003.06-AC01 — preview and approval Cases (정상/경계/실패): complete exact close; incomplete draft; missing approval rejected. State Invariants: preview row count unchanged; no unsafe evidence approved. 판정 기준: preview is read-only and close returns conditional_approval_required without metadata. 검증: test_manual_asset_update_deactivate_preview_and_close_correction_policy, preview_asset_snapshot_close(). 검증 분류: level=integration; backend=application
구현 근거: docs/requirements/req-003_account-valuation-history.md; REQ current AC REQ-003.06-AC01; pinned base and head whole block comparison; referenced existing test bodies reviewed; 재검토에서는 이전 head부터 후속 전체 diff가 두 설계 문서와 추가 문서 test에만 한정됨을 확인했고 변경 없는 구현 및 기존 test 근거를 보존했다.
테스트 근거: tests/test_account_valuations.py, tests/test_issue_12_regressions.py, tests/test_contract_regression.py, tests/test_service.py
판정 근거: 기존 인수 판정과 검증 및 상태 불변조건을 원문 그대로 보존했다.
BASE-REQ-003.07-AC01 — satisfied
계약: REQ-003.07-AC01 — immutable close correction Cases (정상/경계/실패): first close; same-date correction; second unreasoned close. State Invariants: old run/rows remain and latest run alone reports. 판정 기준: correction_of_run_id, count, and net worth match. 검증: test_manual_asset_update_deactivate_preview_and_close_correction_policy, assets_service.py close path. 검증 분류: level=integration; backend=sqlite
구현 근거: docs/requirements/req-003_account-valuation-history.md; REQ current AC REQ-003.07-AC01; pinned base and head whole block comparison; referenced existing test bodies reviewed; 재검토에서는 이전 head부터 후속 전체 diff가 두 설계 문서와 추가 문서 test에만 한정됨을 확인했고 변경 없는 구현 및 기존 test 근거를 보존했다.
테스트 근거: tests/test_account_valuations.py, tests/test_issue_12_regressions.py, tests/test_contract_regression.py, tests/test_service.py
판정 근거: 기존 인수 판정과 검증 및 상태 불변조건을 원문 그대로 보존했다.
BASE-REQ-003.08-AC01 — satisfied
계약: REQ-003.08-AC01 — reconciliation/monthly Cases (정상/경계/실패): regular ledger calculation; verified investment; missing baseline. State Invariants: no fake transaction; provenance fields present; monthly read is non-mutating. 판정 기준: status VALUATION_MANAGED for verified investment and monthly summary reads report. 검증: tests/test_service.py::test_statement_status_account_update_and_balance_reconciliation, tests/test_issue_12_regressions.py::test_reconciliation_uses_corrected_investment_leaf_without_transaction_count_change, tests/test_service.py::test_monthly_settlement_summary_read_model_foundation. 검증 분류: level=unit; backend=application
구현 근거: docs/requirements/req-003_account-valuation-history.md; REQ current AC REQ-003.08-AC01; pinned base and head whole block comparison; referenced existing test bodies reviewed; 재검토에서는 이전 head부터 후속 전체 diff가 두 설계 문서와 추가 문서 test에만 한정됨을 확인했고 변경 없는 구현 및 기존 test 근거를 보존했다.
테스트 근거: tests/test_account_valuations.py, tests/test_issue_12_regressions.py, tests/test_contract_regression.py, tests/test_service.py
판정 근거: 기존 인수 판정과 검증 및 상태 불변조건을 원문 그대로 보존했다.
BASE-REQ-003.09-AC01 — satisfied
계약: REQ-003.09-AC01 — shared adapters and auth Cases (정상/경계/실패): MCP stdio/http config; authenticated Dashboard render; unauthenticated gate. State Invariants: auth precedes DB; render does not write; response envelope has success. 판정 기준: actual tool/gateway names resolve and existing auth/menu tests pass. 검증: tests/test_mcp_http_runtime.py, tests/test_dashboard_authentication_app.py, tests/test_dashboard_menu_transition.py, server.py and gateways. 검증 분류: level=integration; backend=dashboard
구현 근거: docs/requirements/req-003_account-valuation-history.md; REQ current AC REQ-003.09-AC01; pinned base and head whole block comparison; referenced existing test bodies reviewed; 재검토에서는 이전 head부터 후속 전체 diff가 두 설계 문서와 추가 문서 test에만 한정됨을 확인했고 변경 없는 구현 및 기존 test 근거를 보존했다.
테스트 근거: tests/test_account_valuations.py, tests/test_issue_12_regressions.py, tests/test_contract_regression.py, tests/test_service.py
판정 근거: 기존 인수 판정과 검증 및 상태 불변조건을 원문 그대로 보존했다.
BASE-REQ-003.10-AC01 — satisfied
계약: REQ-003.10-AC01 — privacy and compatibility Cases (정상/경계/실패): synthetic fixture; redaction search; actual secret/data detection. State Invariants: no credential/token/cookie/real financial data in docs/tests/evidence. 판정 기준: semantic inventory missing=0 and ambiguous=0; placeholder=0. 검증: tests/test_requirement_docs.py, auth/menu evidence tests, repository redaction/static search. 검증 분류: level=static; backend=dashboard
구현 근거: docs/requirements/req-003_account-valuation-history.md; REQ current AC REQ-003.10-AC01; pinned base and head whole block comparison; referenced existing test bodies reviewed; 재검토에서는 이전 head부터 후속 전체 diff가 두 설계 문서와 추가 문서 test에만 한정됨을 확인했고 변경 없는 구현 및 기존 test 근거를 보존했다.
테스트 근거: tests/test_account_valuations.py, tests/test_issue_12_regressions.py, tests/test_contract_regression.py, tests/test_service.py
판정 근거: 기존 인수 판정과 검증 및 상태 불변조건을 원문 그대로 보존했다.
범위 판정
누락: 없음
범위 초과: 없음
명세 모순: 없음
결론
이전 review71의 프로젝트 구조 연결과 런타임 취소 및 재생성 문서 누락 두 건이 모두 해소됐다. 현재 head의 57개 필수 criterion을 충족하고 범위 누락 및 초과와 명세 모순이 없어 approve다. 코드와 fixture 및 dependency 변경은 없고 두 문서 test만 추가됐다. 생산자 exact-head 전체 검증은398 passed,4 skipped,1 warning 및 lint 통과이며 reviewer 독립 제품 실행이나 CI 성공이 아니다.
## 구현 명세 적합성 검토
- Source Issue: #15
- Pull Request: #16
- Reviewed head: `bae137dce77245f1f506c2a0086101b6a067c9ab`
- Contract SHA-256: `347e1e9d4ef3514754f93515ccfe71d94daa880bcd4129ad3fc1989c53b0641c`
- Verdict: `approve`
### Acceptance criteria 판정
- `IN-01` — `satisfied`
- 계약: 초안 ID, 정산 월·기준일, 상태, 생성자·생성/변경 시각, 메모, 동시 편집 버전, 생성 중복 방지 키, 최종 마감 ID 및 정정 관계를 영속 저장한다. 자료가 없어도 생성·저장할 수 있고 생성 자체로 마감 run이나 확정 금액을 만들지 않는다. 정산 월별 활성 초안은 일반/정정 구분 없이 하나로 제한하고, 완료·취소 후 새 초안을 열 수 있다. 생성 키 재시도는 같은 초안을 반환하고 다른 요청의 활성 중복은 충돌한다. 이미 마감한 기준일의 새 초안은 이전 run과 정정 사유를 연결한다. 정산 기준일은 해당 월말로 고정하며 입력한 날짜도 월말과 일치하는지 검증한다.
- 구현 근거: jarca_ledger_mcp/application/settlement_draft_service.py, jarca_ledger_mcp/infrastructure/sqlite/migrations.py; service 153-185, 394-396; migration 21-45; tests 54-98, 262-277; 재검토에서는 이전 head부터 후속 전체 diff가 두 설계 문서와 추가 문서 test에만 한정됨을 확인했고 변경 없는 구현 및 기존 test 근거를 보존했다.
- 테스트 근거: tests/test_monthly_settlement_drafts.py, tests/test_settlement_draft_correction_contract.py
- 판정 근거: 무자료 생성은 run을 쓰지 않는다. 월말과 단일 활성 초안, 생성 재시도 및 정정 연결을 검증한다.
- `IN-02` — `satisfied`
- 계약: 초안의 정산 대상 계좌·자산·부채와 포함/제외 여부·사유를 관리한다. 계좌별 valuation_id, 선택 방식·사유, 선택자·시각, 항목 버전, 대체 승인 근거와 준비 상태를 저장한다. 새로운 계좌·대상 변경을 자동 반영하지 않고 명시적 대상 갱신으로만 반영하며 기존 선택과 승인에 미치는 차이를 검토한다.
- 구현 근거: jarca_ledger_mcp/application/settlement_draft_service.py; service 63-140, 219-258, 261-307; frozen-target and refresh tests; 재검토에서는 이전 head부터 후속 전체 diff가 두 설계 문서와 추가 문서 test에만 한정됨을 확인했고 변경 없는 구현 및 기존 test 근거를 보존했다.
- 테스트 근거: tests/test_monthly_settlement_drafts.py, tests/test_settlement_draft_authority.py
- 판정 근거: 대상 동결과 명시적 갱신, 포함 및 제외 사유와 선택 감사 정보를 보존한다.
- `IN-03` — `satisfied`
- 계약: 기존 평가 등록·조회·정정 기능을 재사용한다. 선택한 자료의 계좌 소속, 통화, 평가 목적과 대표 부채 정의를 검증하고 계좌별 대표 합산 금액은 하나만 사용한다. 투자 원금·현금성 잔액·평가액을 중복 합산하지 않는다. 증빙/등록 중복 방지와 append-only 정정을 보존한다.
- 구현 근거: jarca_ledger_mcp/application/settlement_draft_service.py, jarca_ledger_mcp/application/assets_service.py, jarca_ledger_mcp/application/account_valuation_service.py; service 261-307; contract scenario 56-73; representative and liability registration tests; 재검토에서는 이전 head부터 후속 전체 diff가 두 설계 문서와 추가 문서 test에만 한정됨을 확인했고 변경 없는 구현 및 기존 test 근거를 보존했다.
- 테스트 근거: tests/test_settlement_draft_selection.py, tests/test_settlement_draft_contract_scenarios.py
- 판정 근거: 기존 등록과 정정 검증을 재사용하고 계좌별 대표 정수 금액만 합산한다.
- `IN-04` — `satisfied`
- 계약: exact는 같은 기준일의 확인 자료, carried_before는 이전 확인 자료의 승인된 이월, manual_substitute는 특정 자료의 명시적 직접 지정이다. 자동 선택은 이후 날짜 자료를 선택하지 않는다. 수동 대체는 실제 날짜·방향을 포함한 날짜 차이·사유·승인을 보존한다. 등록일과 평가 기준일을 구분한다. 미확인 자료는 초안 선택·검토용으로 보존하되 잠정 합계의 authority 금액에 포함하지 않고 확인 필요 상태로 표시한다. 최종 합산하려면 append-only 확인/정정 자료를 사용자가 명시적으로 다시 선택하고 재검토·승인한다. 끝내 미확인인 항목은 누락/제외로 표시하고 조건부 마감 시 그 누락을 승인한다. 확인 승인을 이유로 원본 verification_status를 덮어쓰지 않는다.
- 구현 근거: jarca_ledger_mcp/application/settlement_draft_service.py, jarca_ledger_mcp/application/assets_service.py; service 93-140, 261-307; tests 136-175; contract scenario 76-94; 재검토에서는 이전 head부터 후속 전체 diff가 두 설계 문서와 추가 문서 test에만 한정됨을 확인했고 변경 없는 구현 및 기존 test 근거를 보존했다.
- 테스트 근거: tests/test_monthly_settlement_drafts.py, tests/test_settlement_draft_selection.py, tests/test_settlement_draft_contract_scenarios.py
- 판정 근거: 자동 미래 선택은 금지하고 직접 지정의 실제 날짜와 사유를 보존한다. 미확인 금액은 authority에서 제외하며 확인 child는 재선택한다.
- `IN-05` — `satisfied`
- 계약: 초안 조회·검토·미리보기에서 대상/제외 목록, 자료 ID, 대표 금액·통화·자산/부채 분류, 실제 평가일, 선택 방식·날짜 차이, 증빙 출처·확인 상태, 선택/대체/제외 사유, 누락·승인 필요 항목, 잠정 총자산·총부채·순자산을 제공한다. 미선택 금액은 0으로 표시하지 않고 자료 완전성, 미등록 부채 및 대체 포함 여부를 명시한다.
- 구현 근거: jarca_ledger_mcp/application/settlement_draft_service.py, jarca_ledger_mcp/application/assets_service.py, jarca_ledger_mcp/application/monthly_settlement_service.py; service 93-140, 375-387; contract scenario 32-54, 119-173; read-model tests 9-35; 재검토에서는 이전 head부터 후속 전체 diff가 두 설계 문서와 추가 문서 test에만 한정됨을 확인했고 변경 없는 구현 및 기존 test 근거를 보존했다.
- 테스트 근거: tests/test_settlement_draft_contract_scenarios.py, tests/test_settlement_draft_read_models.py
- 판정 근거: NULL과 0, 준비 상태와 제외 및 누락, 원본 날짜 및 날짜 방향과 잠정 합계가 응답과 마감 읽기 모델에 전파된다.
- `IN-06` — `satisfied`
- 계약: 최종 마감은 사용자가 검토한 초안 버전과 선택 증거를 고정한다. 승인 뒤 대상·선택·사유·금액/분류·경고 또는 관련 증거가 달라지면 기존 승인을 사용할 수 없다. 계좌의 현재값이나 최신 정정본으로 조용히 다시 선택하지 않는다.
- 구현 근거: jarca_ledger_mcp/application/settlement_draft_service.py; service 63-140, 202-211, 319-360; tests 191-202; authority drift scenarios; 재검토에서는 이전 head부터 후속 전체 diff가 두 설계 문서와 추가 문서 test에만 한정됨을 확인했고 변경 없는 구현 및 기존 test 근거를 보존했다.
- 테스트 근거: tests/test_monthly_settlement_drafts.py, tests/test_settlement_draft_authority.py
- 판정 근거: 변경은 승인 binding을 무효화한다. 외부 drift에서도 최종화가 새 fingerprint 또는 review-needed guard로 차단되고 최신 자료로 자동 교체하지 않는다.
- `IN-07` — `satisfied`
- 계약: 초안 최종 상태 전이, 연결된 asset_snapshot_runs 및 asset_snapshots 저장을 하나의 트랜잭션으로 처리한다. 중복 클릭/동일 요청 재시도는 같은 마감을 반환하고 다른 payload의 키 재사용은 충돌한다. 실패 시 부분 마감과 완료 초안이 남지 않는다.
- 구현 근거: jarca_ledger_mcp/application/settlement_draft_service.py; service 338-391; tests 204-247; contract scenario 145-173; 재검토에서는 이전 head부터 후속 전체 diff가 두 설계 문서와 추가 문서 test에만 한정됨을 확인했고 변경 없는 구현 및 기존 test 근거를 보존했다.
- 테스트 근거: tests/test_monthly_settlement_drafts.py, tests/test_settlement_draft_contract_scenarios.py
- 판정 근거: 하나의 BEGIN IMMEDIATE에서 run과 rows 및 초안 완료를 저장한다. 실패 rollback과 동시 재시도 persisted response를 검증한다.
- `IN-08` — `satisfied`
- 계약: 원본 초안 ID·버전, 월·기준일, 적용 자료/금액/통화/분류, 실제 날짜·선택 방식·날짜 차이, 증빙/확인 상태, 포함·제외·대체 사유, 승인자·시각·근거와 누락/경고를 마감 이력에 보존한다. 완전한 exact 마감, 이월·대체 포함, 승인된 누락을 별도로 식별한다. 대체 사용과 누락은 하나의 모호한 상태로 합치지 않는다.
- 구현 근거: jarca_ledger_mcp/application/settlement_draft_service.py, jarca_ledger_mcp/application/assets_service.py, jarca_ledger_mcp/application/monthly_settlement_service.py; service 365-387; assets 424-464, 1046-1060; scenario 32-54, 167-173; 재검토에서는 이전 head부터 후속 전체 diff가 두 설계 문서와 추가 문서 test에만 한정됨을 확인했고 변경 없는 구현 및 기존 test 근거를 보존했다.
- 테스트 근거: tests/test_settlement_draft_contract_scenarios.py, tests/test_settlement_draft_read_models.py, tests/test_settlement_draft_audit_reproductions.py
- 판정 근거: 마감 증거는 초안 버전과 날짜, 승인 flags 및 제외 사유를 고정한다. 대체와 승인된 누락은 독립 flags이며 readiness와 included, exclusion_reason으로 누락과 명시적 제외도 구분 가능하다.
- `IN-09` — `satisfied`
- 계약: 초안에서 선택 자료에 정정본이 생기면 검토 필요를 표시하고 사용자가 교체 여부를 결정한다. 확정 마감은 이후 평가 등록·정정으로 변경하지 않는다. 명시적 정정 초안과 사유로 새 마감을 이전 run에 연결하며 이전 기록을 보존한다.
- 구현 근거: jarca_ledger_mcp/application/settlement_draft_service.py, jarca_ledger_mcp/application/assets_service.py; service 63-91, 153-170, 352-369; authority and correction-parent tests; 재검토에서는 이전 head부터 후속 전체 diff가 두 설계 문서와 추가 문서 test에만 한정됨을 확인했고 변경 없는 구현 및 기존 test 근거를 보존했다.
- 테스트 근거: tests/test_settlement_draft_authority.py, tests/test_settlement_draft_correction_contract.py
- 판정 근거: 정정 child는 검토 필요로 표시하고 자동 교체하지 않는다. 새 정정 run은 이전 run에 연결하며 기존 마감은 불변이다.
- `IN-10` — `satisfied`
- 계약: 기존 수동 자산·부채도 대상과 합계에 포함한다. 검토 당시의 값·날짜·분류·출처를 증거로 고정하고 원본 변경을 drift로 검출한다. 갱신하려면 명시적 재검토를 거치며 마감 때 live 값을 몰래 재사용하지 않는다. 수동 자료의 자동 날짜 선택은 기존 exact/as_of 제한을 유지한다.
- 구현 근거: jarca_ledger_mcp/application/settlement_draft_service.py, jarca_ledger_mcp/application/assets_service.py; service 63-140, 219-258; tests 177-188; manual drift authority scenarios; 재검토에서는 이전 head부터 후속 전체 diff가 두 설계 문서와 추가 문서 test에만 한정됨을 확인했고 변경 없는 구현 및 기존 test 근거를 보존했다.
- 테스트 근거: tests/test_monthly_settlement_drafts.py, tests/test_settlement_draft_authority.py
- 판정 근거: 수동 자산과 부채는 frozen source에 결합하고 원본 변경을 drift로 검출하며 명시적 갱신이 필요하다.
- `IN-11` — `satisfied`
- 계약: Dashboard에서 생성·목록·상세·저장·취소, 계좌 자료 조회·등록·지정·해제, 포함/제외 및 사유 수정, 검토·승인·최종 마감, 확정 조회·정정 초안 생성을 제공한다. MCP도 같은 작업을 공통 application service로 제공한다.
- 구현 근거: jarca_ledger_mcp/application/settlement_draft_service.py, jarca_ledger_mcp/service.py, jarca_ledger_mcp/adapters/mcp/server.py, jarca_ledger_mcp/adapters/mcp/tool_contracts.py, jarca_ledger_mcp/adapters/streamlit/settlement_gateway.py, dashboard/page_views/settlement_drafts.py, dashboard/page_views/assets.py, dashboard/page_views/monthly_settlement.py; shared application entrypoints, thin MCP and Streamlit gateway, explicit panel actions; adapter and real MCP stdio tests; 재검토에서는 이전 head부터 후속 전체 diff가 두 설계 문서와 추가 문서 test에만 한정됨을 확인했고 변경 없는 구현 및 기존 test 근거를 보존했다.
- 테스트 근거: tests/test_settlement_draft_adapters.py, tests/test_settlement_draft_mcp_runtime.py, tests/test_settlement_draft_dashboard.py, tests/test_settlement_draft_panel_workflow.py, tests/test_settlement_draft_panel_feedback.py, tests/test_settlement_draft_liability_registration.py
- 판정 근거: UI와 MCP는 공통 application에 위임한다. 자료 등록과 지정 및 해제, 저장과 취소, 검토와 승인 및 마감, 확정 조회와 정정 생성 경로를 제공한다.
- `IN-12` — `satisfied`
- 계약: 합성 자료로 원본 수락 기준을 검증한다. 특히 2026-09 초안에 2026-10-05/07 자료 직접 지정, 늦게 등록한 2026-09-30 자료의 exact 구분, 자동 미래 선택 금지, 승인 후 변경 차단, 정정·동시 편집·재시도·트랜잭션 실패와 기존 API/마이그레이션 회귀를 포함한다.
- 구현 근거: jarca_ledger_mcp/application/settlement_draft_service.py, jarca_ledger_mcp/application/assets_service.py, jarca_ledger_mcp/infrastructure/sqlite/migrations.py, jarca_ledger_mcp/application/monthly_settlement_service.py; 새 canonical i15rw2-final manifest source는 검토 head와 일치한다. 모든 163개 file blob 및 SHA256, 실제 argv와 exit 및 output을 독립 대조했다. 생산자 전체 398 passed, 4 skipped, 1 warning 및 lint exit0. Canonical collection 400에서 402로 두 문서 test만 추가되고 기존 ID와 skip 및 xfail status는 보존됐다.
- 테스트 근거: tests/test_monthly_settlement_drafts.py, tests/test_settlement_draft_contract_scenarios.py, tests/test_settlement_draft_authority.py, tests/test_settlement_draft_selection.py, tests/test_settlement_draft_correction_contract.py, tests/test_ledger_categories.py, tests/test_review_decision_workbench.py
- 판정 근거: 생산자가 현재 head의 전체 제품 테스트를 실행했다. Reviewer는 immutable source와 기록을 읽기 전용 확인했으며 제품 테스트를 실행하지 않았다. PDF sample 4개 skip과 기존 warning을 명시하고 CI 성공을 별도로 검증한 결과로 취급하지 않는다.
- `EX-01` — `satisfied`
- 계약: 거래 분류 완료 보장, 실제 월말 평가액 역산, 투자 성과 추정, 자산 증감을 수입·지출/투자 수익 거래로 자동 생성하는 기능.
- 구현 근거: jarca_ledger_mcp/application/settlement_draft_service.py, jarca_ledger_mcp/application/assets_service.py, jarca_ledger_mcp/application/monthly_settlement_service.py; exact base-to-head 38-file scope review and immutable source; no transaction insert or external price call introduced; 재검토에서는 이전 head부터 후속 전체 diff가 두 설계 문서와 추가 문서 test에만 한정됨을 확인했고 변경 없는 구현 및 기존 test 근거를 보존했다.
- 테스트 근거: tests/test_settlement_draft_contract_scenarios.py, tests/test_settlement_draft_authority.py, tests/test_settlement_draft_correction_contract.py
- 판정 근거: 제외된 가격 및 FX, 자동 승인, 거래 생성, 기존 이력 삭제, 인증과 메뉴 재설계는 추가하지 않았다. Discovery 단계 제한은 후속 구현 PR 생성 금지가 아니다.
- `EX-02` — `satisfied`
- 계약: 외부 가격 API, 새 환율 변환 정책, 자동 승인, 실제 계좌번호·금융자료·credential을 문서나 fixture에 저장하는 작업.
- 구현 근거: jarca_ledger_mcp/application/settlement_draft_service.py, jarca_ledger_mcp/application/assets_service.py, jarca_ledger_mcp/application/monthly_settlement_service.py; exact base-to-head 38-file scope review and immutable source; no transaction insert or external price call introduced; 재검토에서는 이전 head부터 후속 전체 diff가 두 설계 문서와 추가 문서 test에만 한정됨을 확인했고 변경 없는 구현 및 기존 test 근거를 보존했다.
- 테스트 근거: tests/test_settlement_draft_contract_scenarios.py, tests/test_settlement_draft_authority.py, tests/test_settlement_draft_correction_contract.py
- 판정 근거: 제외된 가격 및 FX, 자동 승인, 거래 생성, 기존 이력 삭제, 인증과 메뉴 재설계는 추가하지 않았다. Discovery 단계 제한은 후속 구현 PR 생성 금지가 아니다.
- `EX-03` — `satisfied`
- 계약: Dashboard 인증·쿠키/logout 또는 메뉴 순서 재설계, MCP 인증의 신규 도입.
- 구현 근거: jarca_ledger_mcp/application/settlement_draft_service.py, jarca_ledger_mcp/application/assets_service.py, jarca_ledger_mcp/application/monthly_settlement_service.py; exact base-to-head 38-file scope review and immutable source; no transaction insert or external price call introduced; 재검토에서는 이전 head부터 후속 전체 diff가 두 설계 문서와 추가 문서 test에만 한정됨을 확인했고 변경 없는 구현 및 기존 test 근거를 보존했다.
- 테스트 근거: tests/test_settlement_draft_contract_scenarios.py, tests/test_settlement_draft_authority.py, tests/test_settlement_draft_correction_contract.py
- 판정 근거: 제외된 가격 및 FX, 자동 승인, 거래 생성, 기존 이력 삭제, 인증과 메뉴 재설계는 추가하지 않았다. Discovery 단계 제한은 후속 구현 PR 생성 금지가 아니다.
- `EX-04` — `satisfied`
- 계약: 초안 취소에 따른 원본 평가·마감 이력 삭제, 기존 마감 덮어쓰기, 원본 평가일 소급 변경.
- 구현 근거: jarca_ledger_mcp/application/settlement_draft_service.py, jarca_ledger_mcp/application/assets_service.py, jarca_ledger_mcp/application/monthly_settlement_service.py; exact base-to-head 38-file scope review and immutable source; no transaction insert or external price call introduced; 재검토에서는 이전 head부터 후속 전체 diff가 두 설계 문서와 추가 문서 test에만 한정됨을 확인했고 변경 없는 구현 및 기존 test 근거를 보존했다.
- 테스트 근거: tests/test_settlement_draft_contract_scenarios.py, tests/test_settlement_draft_authority.py, tests/test_settlement_draft_correction_contract.py
- 판정 근거: 제외된 가격 및 FX, 자동 승인, 거래 생성, 기존 이력 삭제, 인증과 메뉴 재설계는 추가하지 않았다. Discovery 단계 제한은 후속 구현 PR 생성 금지가 아니다.
- `EX-05` — `satisfied`
- 계약: 정산 월의 월말과 다른 기준일, 같은 월의 복수 활성 초안, 미확인 자료의 단순 사용 승인만으로 금액을 최종 합산하는 경로.
- 구현 근거: jarca_ledger_mcp/application/settlement_draft_service.py, jarca_ledger_mcp/application/assets_service.py, jarca_ledger_mcp/application/monthly_settlement_service.py; exact base-to-head 38-file scope review and immutable source; no transaction insert or external price call introduced; 재검토에서는 이전 head부터 후속 전체 diff가 두 설계 문서와 추가 문서 test에만 한정됨을 확인했고 변경 없는 구현 및 기존 test 근거를 보존했다.
- 테스트 근거: tests/test_settlement_draft_contract_scenarios.py, tests/test_settlement_draft_authority.py, tests/test_settlement_draft_correction_contract.py
- 판정 근거: 제외된 가격 및 FX, 자동 승인, 거래 생성, 기존 이력 삭제, 인증과 메뉴 재설계는 추가하지 않았다. Discovery 단계 제한은 후속 구현 PR 생성 금지가 아니다.
- `EX-06` — `satisfied`
- 계약: Discovery 단계의 제품 코드·요구사항명세서·설계문서 작성 또는 수정, PR/브랜치 생성. 아래 산출물은 후속 구현 시의 문서 계약이다.
- 구현 근거: jarca_ledger_mcp/application/settlement_draft_service.py, jarca_ledger_mcp/application/assets_service.py, jarca_ledger_mcp/application/monthly_settlement_service.py; exact base-to-head 38-file scope review and immutable source; no transaction insert or external price call introduced; 재검토에서는 이전 head부터 후속 전체 diff가 두 설계 문서와 추가 문서 test에만 한정됨을 확인했고 변경 없는 구현 및 기존 test 근거를 보존했다.
- 테스트 근거: tests/test_settlement_draft_contract_scenarios.py, tests/test_settlement_draft_authority.py, tests/test_settlement_draft_correction_contract.py
- 판정 근거: 제외된 가격 및 FX, 자동 승인, 거래 생성, 기존 이력 삭제, 인증과 메뉴 재설계는 추가하지 않았다. Discovery 단계 제한은 후속 구현 PR 생성 금지가 아니다.
- `CON-01` — `satisfied`
- 계약: 조사 기준은 main의 고정 revision 68212e773b94dd89b6c036e6616759542c178de3이다. Gitea authoritative SHA와 갱신한 bare cache의 local ref를 비교했다.
- 구현 근거: docs/requirements/req-003_account-valuation-history.md; pinned base and default branch 68212e773b94dd89b6c036e6616759542c178de3; 재검토에서는 이전 head부터 후속 전체 diff가 두 설계 문서와 추가 문서 test에만 한정됨을 확인했고 변경 없는 구현 및 기존 test 근거를 보존했다.
- 테스트 근거: tests/test_monthly_settlement_drafts.py
- 판정 근거: authoritative API와 cache base SHA 일치를 확인했다.
- `CON-02` — `satisfied`
- 계약: SQLite schema 12에서 additive migration하며 기존 테이블·행·이력·인덱스의 의미를 보존한다. 실제 새 스키마 버전 및 물리 필드는 구현 결과와 함께 문서화하고 기존 자료를 추정 이주하지 않는다.
- 구현 근거: jarca_ledger_mcp/infrastructure/sqlite/migrations.py, jarca_ledger_mcp/infrastructure/sqlite/schema.py, docs/data-model.md; migrate_db 19-45, 120-147, 198; schema13 idempotency test 249-260 and schema11 preservation regression; exact-head source delta; 재검토에서는 이전 head부터 후속 전체 diff가 두 설계 문서와 추가 문서 test에만 한정됨을 확인했고 변경 없는 구현 및 기존 test 근거를 보존했다.
- 테스트 근거: tests/test_monthly_settlement_drafts.py, tests/test_issue_12_regressions.py, tests/test_account_valuations.py
- 판정 근거: 신규 테이블과 run lineage 컬럼만 additive하게 확장하며 기존 rows와 인덱스를 삭제하지 않는다. schema12 입력의 별도 실행은 없으나 공통 무조건 additive DDL과 기존 이력 및 반복 초기화 회귀를 함께 검토했다.
- `CON-03` — `satisfied`
- 계약: 기존 자동 exact/as_of와 기존 직접 마감의 호출/응답 계약을 유지한다. 미래 사용 예외는 직접 지정·검토·승인된 초안 마감에 한정하며 자동 선택 계약을 전역 완화하지 않는다. 기존 직접 마감이 초안의 승인·변경 검증을 우회해 선택 자료를 대신 확정하는 경로를 만들지 않는다.
- 구현 근거: jarca_ledger_mcp/application/settlement_draft_service.py, jarca_ledger_mcp/application/assets_service.py; existing automatic selector and direct close retained; draft finalize 338-391 does not use live direct-close shortcut; 재검토에서는 이전 head부터 후속 전체 diff가 두 설계 문서와 추가 문서 test에만 한정됨을 확인했고 변경 없는 구현 및 기존 test 근거를 보존했다.
- 테스트 근거: tests/test_settlement_draft_selection.py, tests/test_settlement_draft_legacy_shapes.py, tests/test_contract_regression.py
- 판정 근거: 기존 exact와 as_of 및 직접 마감의 envelope와 선택 의미를 보존한다.
- `CON-04` — `satisfied`
- 계약: rejected/unknown 날짜, 잘못된 계좌·통화·목적·대표 부채 정의와 모호한 대표 선택은 승인만으로 정상 자료가 되지 않는다. 미확인 자료는 초안에서 선택·검토할 수 있지만 미확인 금액 자체를 승인으로 합산하지 않는다. 최종 합산 전 append-only 확인/정정 자료를 명시적으로 다시 선택하고 재검토·승인해야 한다. 미확인으로 남으면 누락/제외와 그 누락에 대한 조건부 승인만 허용한다.
- 구현 근거: jarca_ledger_mcp/application/settlement_draft_service.py; service 261-307, 319-360; rejected, unverified, loan and wrong-scope scenarios; 재검토에서는 이전 head부터 후속 전체 diff가 두 설계 문서와 추가 문서 test에만 한정됨을 확인했고 변경 없는 구현 및 기존 test 근거를 보존했다.
- 테스트 근거: tests/test_settlement_draft_selection.py, tests/test_settlement_draft_authority.py, tests/test_settlement_draft_contract_scenarios.py
- 판정 근거: 승인은 자료의 잘못된 계좌나 목적 또는 확인 상태를 정상화하지 않는다.
- `CON-05` — `satisfied`
- 계약: 정수 금액의 정확도와 NULL/0 구분, 순자산의 자산−부채 계산, KRW 중심 기존 정책을 유지한다. FX 정책 없는 비KRW 금액은 단순 합산하지 않고 제외/경고를 표시한다.
- 구현 근거: jarca_ledger_mcp/application/settlement_draft_service.py, jarca_ledger_mcp/application/assets_service.py; contract scenario 56-73, 119-173; integer and NULL handling in review; 재검토에서는 이전 head부터 후속 전체 diff가 두 설계 문서와 추가 문서 test에만 한정됨을 확인했고 변경 없는 구현 및 기존 test 근거를 보존했다.
- 테스트 근거: tests/test_settlement_draft_contract_scenarios.py
- 판정 근거: 큰 정수 정밀도와 자산 minus 부채 계산, NULL 구분 및 비KRW 제외를 검토했다.
- `CON-06` — `satisfied`
- 계약: carried_before는 초안의 이전 자료 선택 의미이고 기존 public as_of를 제거하거나 이름을 바꾸지 않는다. 기존 age_days의 의미를 변경하지 않고 수동 미래 자료의 방향 있는 날짜 차이 계약을 별도로 명확히 한다.
- 구현 근거: jarca_ledger_mcp/application/settlement_draft_service.py, jarca_ledger_mcp/application/assets_service.py, docs/interface-contract.md; review date fields and scenario 32-54; existing as_of API unchanged; 재검토에서는 이전 head부터 후속 전체 diff가 두 설계 문서와 추가 문서 test에만 한정됨을 확인했고 변경 없는 구현 및 기존 test 근거를 보존했다.
- 테스트 근거: tests/test_settlement_draft_contract_scenarios.py, tests/test_settlement_draft_selection.py
- 판정 근거: 공개 as_of와 age_days의 방향을 유지하고 새 날짜 차이 field를 별도로 제공한다.
- `CON-07` — `satisfied`
- 계약: get_monthly_settlement_summary()와 기존 preview/report/render는 읽기 전용을 유지한다. 새 초안 mutation은 명시적 버튼·도구 호출로만 수행한다. missing DB 조회는 기존 db_not_initialized/no-create 계약을 유지한다.
- 구현 근거: jarca_ledger_mcp/application/settlement_draft_service.py, jarca_ledger_mcp/application/monthly_settlement_service.py, jarca_ledger_mcp/infrastructure/sqlite/connection.py; review 310-316 uses read_db; monthly existing read_db path and explicit new read helpers; missing DB cases; 재검토에서는 이전 head부터 후속 전체 diff가 두 설계 문서와 추가 문서 test에만 한정됨을 확인했고 변경 없는 구현 및 기존 test 근거를 보존했다.
- 테스트 근거: tests/test_monthly_settlement_drafts.py, tests/test_service.py, tests/test_settlement_draft_adapters.py
- 판정 근거: 읽기 전용 연결과 missing DB no-create를 보존한다. 새로운 mutation은 명시적 action에서만 실행된다.
- `CON-08` — `satisfied`
- 계약: Dashboard auth-before-DB, 기존 성공/오류 envelope, 기존 MCP transport와 application → SQLite 의존 방향을 유지한다. 업무 검증·선택·마감은 UI/MCP에서 중복 구현하지 않는다.
- 구현 근거: jarca_ledger_mcp/application/settlement_draft_service.py, dashboard/app.py, dashboard/page_views/settlement_drafts.py, jarca_ledger_mcp/adapters/mcp/server.py; existing app auth guard before protected page and shared service transport delegation; 재검토에서는 이전 head부터 후속 전체 diff가 두 설계 문서와 추가 문서 test에만 한정됨을 확인했고 변경 없는 구현 및 기존 test 근거를 보존했다.
- 테스트 근거: tests/test_dashboard_app.py, tests/test_settlement_draft_mcp_runtime.py, tests/test_settlement_draft_dashboard.py
- 판정 근거: 인증 이후 DB 접근과 기존 transport 및 오류 envelope를 보존하고 UI에 SQL 업무 검증을 추가하지 않았다.
- `CON-09` — `satisfied`
- 계약: 거래 import/분류/대사가 미완료라는 이유만으로 평가 등록과 자산 마감을 막지 않는다. 거래 준비 상태와 자산 마감 상태를 별도로 표시한다.
- 구현 근거: jarca_ledger_mcp/application/settlement_draft_service.py, jarca_ledger_mcp/application/monthly_settlement_service.py; contract scenario 97-117 and monthly summary asset-state propagation; 재검토에서는 이전 head부터 후속 전체 diff가 두 설계 문서와 추가 문서 test에만 한정됨을 확인했고 변경 없는 구현 및 기존 test 근거를 보존했다.
- 테스트 근거: tests/test_settlement_draft_contract_scenarios.py
- 판정 근거: 거래 미정리 blocker를 남겨도 자산 초안 승인과 마감은 가능하며 거래 rows는 그대로다.
- `CON-10` — `satisfied`
- 계약: 월별 단일 활성 초안·월말 기준일·미확인 금액 제외 정책을 생성/편집/검토/최종화 및 모든 후속 문서에 동일하게 적용한다. 활성 초안 중복은 일반/정정 구분으로 우회하지 않으며 취소는 증빙이나 기존 마감을 삭제하지 않는다. 사용자 선택은 제품 구현/시험 완료의 증거가 아니다.
- 구현 근거: jarca_ledger_mcp/application/settlement_draft_service.py, jarca_ledger_mcp/infrastructure/sqlite/migrations.py, docs/requirements/req-003_account-valuation-history.md, docs/data-model.md, docs/interface-contract.md, docs/project-structure.md, docs/runtime-flow.md; all layer single active month, fixed month-end and verified authority policy inspection; 재검토에서는 이전 head부터 후속 전체 diff가 두 설계 문서와 추가 문서 test에만 한정됨을 확인했고 변경 없는 구현 및 기존 test 근거를 보존했다.
- 테스트 근거: tests/test_monthly_settlement_drafts.py, tests/test_settlement_draft_correction_contract.py, tests/test_settlement_draft_contract_scenarios.py
- 판정 근거: 월별 단일 active, 월말 고정, 미확인 금액 제외 및 child 재선택 정책의 모든 layer 소유권과 문서 전파를 확인했다. 이전 두 설계문서 누락도 현재 추가된 섹션에서 해소됐다.
- `DEC-01` — `satisfied`
- 계약: 자료 확보 전 영속 초안을 만들고 계좌별 자료를 순차적으로 채우는 흐름이 필요하다. 조건부 마감을 초안처럼 반복 생성하는 것으로 대체하지 않는다.
- 구현 근거: jarca_ledger_mcp/application/settlement_draft_service.py, jarca_ledger_mcp/infrastructure/sqlite/migrations.py; service 153-185, 394-396; migration 21-45; tests 54-98, 262-277; 재검토에서는 이전 head부터 후속 전체 diff가 두 설계 문서와 추가 문서 test에만 한정됨을 확인했고 변경 없는 구현 및 기존 test 근거를 보존했다.
- 테스트 근거: tests/test_monthly_settlement_drafts.py, tests/test_settlement_draft_correction_contract.py
- 판정 근거: 무자료 생성은 run을 쓰지 않는다. 월말과 단일 활성 초안, 생성 재시도 및 정정 연결을 검증한다.
- `DEC-02` — `satisfied`
- 계약: 기준일 이후 자료는 사용자가 특정 평가를 직접 지정하고 이유 및 최종 승인을 남긴 경우에만 허용한다. 원본 기준일은 그대로 두고 “정확한 월말 평가액”으로 표시하지 않는다.
- 구현 근거: jarca_ledger_mcp/application/settlement_draft_service.py, jarca_ledger_mcp/application/assets_service.py; service 93-140, 261-307; tests 136-175; contract scenario 76-94; 재검토에서는 이전 head부터 후속 전체 diff가 두 설계 문서와 추가 문서 test에만 한정됨을 확인했고 변경 없는 구현 및 기존 test 근거를 보존했다.
- 테스트 근거: tests/test_monthly_settlement_drafts.py, tests/test_settlement_draft_selection.py, tests/test_settlement_draft_contract_scenarios.py
- 판정 근거: 자동 미래 선택은 금지하고 직접 지정의 실제 날짜와 사유를 보존한다. 미확인 금액은 authority에서 제외하며 확인 child는 재선택한다.
- `DEC-03` — `satisfied`
- 계약: 승인은 검토한 초안 버전/증거에 결합하며 변경 후 재검토·재승인이 필요하다. 마감은 선택한 자료와 적용 금액을 불변 증거로 저장한다.
- 구현 근거: jarca_ledger_mcp/application/settlement_draft_service.py; service 63-140, 202-211, 319-360; tests 191-202; authority drift scenarios; 재검토에서는 이전 head부터 후속 전체 diff가 두 설계 문서와 추가 문서 test에만 한정됨을 확인했고 변경 없는 구현 및 기존 test 근거를 보존했다.
- 테스트 근거: tests/test_monthly_settlement_drafts.py, tests/test_settlement_draft_authority.py
- 판정 근거: 변경은 승인 binding을 무효화한다. 외부 drift에서도 최종화가 새 fingerprint 또는 review-needed guard로 차단되고 최신 자료로 자동 교체하지 않는다.
- `DEC-04` — `satisfied`
- 계약: 취소·정정은 원본 증빙과 이전 마감을 보존한다. 정정본은 자동 교체하지 않고 정정 마감은 새 run으로 연결한다.
- 구현 근거: jarca_ledger_mcp/application/settlement_draft_service.py, jarca_ledger_mcp/application/assets_service.py; service 63-91, 153-170, 352-369; authority and correction-parent tests; 재검토에서는 이전 head부터 후속 전체 diff가 두 설계 문서와 추가 문서 test에만 한정됨을 확인했고 변경 없는 구현 및 기존 test 근거를 보존했다.
- 테스트 근거: tests/test_settlement_draft_authority.py, tests/test_settlement_draft_correction_contract.py
- 판정 근거: 정정 child는 검토 필요로 표시하고 자동 교체하지 않는다. 새 정정 run은 이전 run에 연결하며 기존 마감은 불변이다.
- `DEC-05` — `satisfied`
- 계약: 기존 계좌 이력, 자동 exact/as_of, 수동 자산·부채와 Dashboard/MCP 공통 서비스 경계를 유지한다. 거래 정산과 자산 마감은 분리한다.
- 구현 근거: jarca_ledger_mcp/application/settlement_draft_service.py, jarca_ledger_mcp/service.py, jarca_ledger_mcp/adapters/mcp/server.py, jarca_ledger_mcp/adapters/mcp/tool_contracts.py, jarca_ledger_mcp/adapters/streamlit/settlement_gateway.py, dashboard/page_views/settlement_drafts.py, dashboard/page_views/assets.py, dashboard/page_views/monthly_settlement.py; shared application entrypoints, thin MCP and Streamlit gateway, explicit panel actions; adapter and real MCP stdio tests; 재검토에서는 이전 head부터 후속 전체 diff가 두 설계 문서와 추가 문서 test에만 한정됨을 확인했고 변경 없는 구현 및 기존 test 근거를 보존했다.
- 테스트 근거: tests/test_settlement_draft_adapters.py, tests/test_settlement_draft_mcp_runtime.py, tests/test_settlement_draft_dashboard.py, tests/test_settlement_draft_panel_workflow.py, tests/test_settlement_draft_panel_feedback.py, tests/test_settlement_draft_liability_registration.py
- 판정 근거: UI와 MCP는 공통 application에 위임한다. 자료 등록과 지정 및 해제, 저장과 취소, 검토와 승인 및 마감, 확정 조회와 정정 생성 경로를 제공한다.
- `DEC-06` — `satisfied`
- 계약: 문서 분류는 기존 계좌 평가·자산 마감 기능과 월정산 propagation의 동작/정책 확장이므로 기존 REQ-003을 갱신한다. 새 테이블/초안 lifecycle의 추가나 기존 문서의 제외 범위만으로 별도 ID를 만들지 않는다. 이는 문서 배치 판정이며 OQ의 제품 정책을 결정하지 않는다.
- 구현 근거: jarca_ledger_mcp/application/settlement_draft_service.py, jarca_ledger_mcp/infrastructure/sqlite/migrations.py, docs/requirements/req-003_account-valuation-history.md; service 153-185, 394-396; migration 21-45; tests 54-98, 262-277; 재검토에서는 이전 head부터 후속 전체 diff가 두 설계 문서와 추가 문서 test에만 한정됨을 확인했고 변경 없는 구현 및 기존 test 근거를 보존했다.
- 테스트 근거: tests/test_monthly_settlement_drafts.py, tests/test_settlement_draft_correction_contract.py
- 판정 근거: 무자료 생성은 run을 쓰지 않는다. 월말과 단일 활성 초안, 생성 재시도 및 정정 연결을 검증한다.
- `DEC-07` — `satisfied`
- 계약: 사용자 선택 — 활성 초안: 정산 월마다 활성 초안을 하나만 허용한다. 일반/정정 초안을 같은 제한으로 관리하고 완료·취소 후 새 초안을 열 수 있다. 이미 마감한 기준일의 새 초안은 이전 run과 정정 사유를 연결하며, 동일 키 재시도는 기존 초안을 반환하고 다른 요청의 중복 생성은 충돌한다.
- 구현 근거: jarca_ledger_mcp/application/settlement_draft_service.py, jarca_ledger_mcp/infrastructure/sqlite/migrations.py; service 153-185, 394-396; migration 21-45; tests 54-98, 262-277; 재검토에서는 이전 head부터 후속 전체 diff가 두 설계 문서와 추가 문서 test에만 한정됨을 확인했고 변경 없는 구현 및 기존 test 근거를 보존했다.
- 테스트 근거: tests/test_monthly_settlement_drafts.py, tests/test_settlement_draft_correction_contract.py
- 판정 근거: 무자료 생성은 run을 쓰지 않는다. 월말과 단일 활성 초안, 생성 재시도 및 정정 연결을 검증한다.
- `DEC-08` — `satisfied`
- 계약: 사용자 선택 — 정산 기준일: 정산 기준일은 정산 월의 마지막 날짜로 고정한다. 사용자가 입력했다면 월말과 일치하는지 검증하고 월정산 summary의 현재 월말 읽기 의미를 유지한다.
- 구현 근거: jarca_ledger_mcp/application/settlement_draft_service.py, jarca_ledger_mcp/infrastructure/sqlite/migrations.py; service 153-185, 394-396; migration 21-45; tests 54-98, 262-277; 재검토에서는 이전 head부터 후속 전체 diff가 두 설계 문서와 추가 문서 test에만 한정됨을 확인했고 변경 없는 구현 및 기존 test 근거를 보존했다.
- 테스트 근거: tests/test_monthly_settlement_drafts.py, tests/test_settlement_draft_correction_contract.py
- 판정 근거: 무자료 생성은 run을 쓰지 않는다. 월말과 단일 활성 초안, 생성 재시도 및 정정 연결을 검증한다.
- `DEC-09` — `satisfied`
- 계약: 사용자 선택 — 미확인 자료: 미확인 자료는 초안에서 선택·검토할 수 있으나 최종 금액에 반영하려면 append-only 확인/정정 자료를 명시적으로 다시 선택하고 재검토·승인해야 한다. 끝내 확인되지 않은 항목은 누락/제외로 표시하고 조건부 마감 시 그 누락을 승인한다. 기존 verified authority를 유지한다.
- 구현 근거: jarca_ledger_mcp/application/settlement_draft_service.py, jarca_ledger_mcp/application/assets_service.py; service 93-140, 261-307; tests 136-175; contract scenario 76-94; 재검토에서는 이전 head부터 후속 전체 diff가 두 설계 문서와 추가 문서 test에만 한정됨을 확인했고 변경 없는 구현 및 기존 test 근거를 보존했다.
- 테스트 근거: tests/test_monthly_settlement_drafts.py, tests/test_settlement_draft_selection.py, tests/test_settlement_draft_contract_scenarios.py
- 판정 근거: 자동 미래 선택은 금지하고 직접 지정의 실제 날짜와 사유를 보존한다. 미확인 금액은 authority에서 제외하며 확인 child는 재선택한다.
- `DOC-REQ-structural` — `satisfied`
- 계약: - 조치: 갱신 - 경로: docs/requirements/req-003_account-valuation-history.md - 문서 ID: REQ-003 - 제목: 계좌 기준일 평가 이력과 자산 마감 연동 - 변경 내용: 기존 ID·파일명·제목을 유지하고 초안 생성/편집/취소, 계좌별 직접 지정, 날짜 차이와 대체 승인, 대상 갱신, 검토 버전/fingerprint, 최종화·정정 초안 및 공통 adapter 요구사항/인수 기준을 추가한다. 미래 제외 규칙을 자동/직접 마감과 승인된 초안 예외로 분리한다. 월별 단일 활성 초안과 월말 기준일 검증을 추가하고 미확인 선택·검토는 허용하되 확인/정정 자료의 명시적 재선택·재검토·승인 전 금액 합산을 금지한다. 미확인으로 남은 항목은 누락/제외 및 조건부 누락 승인으로 처리한다. 기존 append-only, 정수/NULL, 대표 부채, no-fake-transaction, auth/menu·읽기 전용 계약을 유지한다. revision과 변경 이력을 갱신하고 기존 12/13 추적성을 보존하면서 이번 근거 15, 이번 구현 PR 미정을 구분한다. - 포함할 내용: 무자료 생성과 no-close, 같은 키 재사용/다른 payload 충돌, 일반/정정 통합 월별 단일 활성 초안, 완료/취소 후 재생성과 기존 마감의 정정 연결, 월말 고정 기준일과 입력 일치 검증, 대상의 명시적 갱신, 준비 상태와 금액의 NULL/0, 계좌/통화/목적/대표 부채 검증, exact/carried_before/manual_substitute와 자동 미래 금지, 이후 자료의 원본 날짜·사유·승인, 미확인 초안 선택/검토, 확인/정정 자료의 명시적 재선택·재검토·승인, 미확인 금액 합산 금지 및 미해소 항목의 승인된 누락/제외, 잠정 합계·완전성·누락/제외/대체 구분, 수동 자산/부채 보존 및 drift, 검토 이후 모든 의미 있는 변경의 재승인, 단일 트랜잭션과 동시 편집 충돌/no-partial-write, persisted evidence 기반 재시도, immutable close와 명시적 정정, 거래/자산 상태 분리, Dashboard/MCP 동등 동작, schema migration 및 기존 API/보안/legacy 회귀를 정상·경계·실패 사례로 명세한다. - 제외할 내용: 거래 완료/성과 추정 보장, FX/가격 API, 자동 승인·자동 미래 선택, 인증/메뉴 재설계, 실제 금융자료, 원본 날짜 변경 및 이력 삭제. - 근거: REQ-003.02/.06/.07/.08/.09의 기존 기능과 정책을 직접 확장하는 작업이다. 영속 초안이 새 aggregate라는 이유만으로 별도 REQ-004를 만들지 않고 현 작성 규칙에 따라 갱신한다. 동일 ID를 유지하므로 신규 ID 할당은 없다.
- 구현 근거: docs/requirements/req-003_account-valuation-history.md; exact approved path exists; metadata 1-13; requirements 53-181; new AC 201-539; old AC 541-648; traceability 665-667; 재검토에서는 이전 head부터 후속 전체 diff가 두 설계 문서와 추가 문서 test에만 한정됨을 확인했고 변경 없는 구현 및 기존 test 근거를 보존했다.
- 테스트 근거: tests/test_settlement_draft_docs.py, tests/test_requirement_docs.py
- 판정 근거: 정본 경로와 문서 구조를 확인했다. REQ metadata 및 11개 번호 섹션, 영향 범위와 인수 기준 및 traceability는 trusted README와 TEMPLATE에 대조했다.
- `DOC-REQ-semantic` — `satisfied`
- 계약: - 조치: 갱신 - 경로: docs/requirements/req-003_account-valuation-history.md - 문서 ID: REQ-003 - 제목: 계좌 기준일 평가 이력과 자산 마감 연동 - 변경 내용: 기존 ID·파일명·제목을 유지하고 초안 생성/편집/취소, 계좌별 직접 지정, 날짜 차이와 대체 승인, 대상 갱신, 검토 버전/fingerprint, 최종화·정정 초안 및 공통 adapter 요구사항/인수 기준을 추가한다. 미래 제외 규칙을 자동/직접 마감과 승인된 초안 예외로 분리한다. 월별 단일 활성 초안과 월말 기준일 검증을 추가하고 미확인 선택·검토는 허용하되 확인/정정 자료의 명시적 재선택·재검토·승인 전 금액 합산을 금지한다. 미확인으로 남은 항목은 누락/제외 및 조건부 누락 승인으로 처리한다. 기존 append-only, 정수/NULL, 대표 부채, no-fake-transaction, auth/menu·읽기 전용 계약을 유지한다. revision과 변경 이력을 갱신하고 기존 12/13 추적성을 보존하면서 이번 근거 15, 이번 구현 PR 미정을 구분한다. - 포함할 내용: 무자료 생성과 no-close, 같은 키 재사용/다른 payload 충돌, 일반/정정 통합 월별 단일 활성 초안, 완료/취소 후 재생성과 기존 마감의 정정 연결, 월말 고정 기준일과 입력 일치 검증, 대상의 명시적 갱신, 준비 상태와 금액의 NULL/0, 계좌/통화/목적/대표 부채 검증, exact/carried_before/manual_substitute와 자동 미래 금지, 이후 자료의 원본 날짜·사유·승인, 미확인 초안 선택/검토, 확인/정정 자료의 명시적 재선택·재검토·승인, 미확인 금액 합산 금지 및 미해소 항목의 승인된 누락/제외, 잠정 합계·완전성·누락/제외/대체 구분, 수동 자산/부채 보존 및 drift, 검토 이후 모든 의미 있는 변경의 재승인, 단일 트랜잭션과 동시 편집 충돌/no-partial-write, persisted evidence 기반 재시도, immutable close와 명시적 정정, 거래/자산 상태 분리, Dashboard/MCP 동등 동작, schema migration 및 기존 API/보안/legacy 회귀를 정상·경계·실패 사례로 명세한다. - 제외할 내용: 거래 완료/성과 추정 보장, FX/가격 API, 자동 승인·자동 미래 선택, 인증/메뉴 재설계, 실제 금융자료, 원본 날짜 변경 및 이력 삭제. - 근거: REQ-003.02/.06/.07/.08/.09의 기존 기능과 정책을 직접 확장하는 작업이다. 영속 초안이 새 aggregate라는 이유만으로 별도 REQ-004를 만들지 않고 현 작성 규칙에 따라 갱신한다. 동일 ID를 유지하므로 신규 ID 할당은 없다.
- 구현 근거: docs/requirements/req-003_account-valuation-history.md, jarca_ledger_mcp/application/settlement_draft_service.py; metadata 1-13; requirements 53-181; new AC 201-539; old AC 541-648; traceability 665-667; 재검토에서는 이전 head부터 후속 전체 diff가 두 설계 문서와 추가 문서 test에만 한정됨을 확인했고 변경 없는 구현 및 기존 test 근거를 보존했다.
- 테스트 근거: tests/test_settlement_draft_docs.py, tests/test_monthly_settlement_drafts.py
- 판정 근거: REQ-003 ID와 제목 및 기존 추적성을 유지하며 기존 AC 10개 중 9개는 원문 보존, migration AC는 schema13 현재 버전으로 승인된 확장을 반영했다. v12 이름의 테스트도 실제 단언은 13이므로 stale verification으로 보지 않는다.
- `DOC-DM-structural` — `satisfied`
- 계약: - 조치: 갱신 - 경로: docs/data-model.md - 변경 내용: 초안과 항목의 영속 엔터티를 추가해 초안→대상 항목, 항목→계좌/valuation, 초안→최종 run, 정정 초안→이전 run 관계와 필수/선택성·유일성·삭제 금지를 기록한다. 초안의 월·기준일·상태·작성자·시각·메모·버전·중복 키·완료 연결, 항목의 source identity·선택 자료·방식/사유·포함/제외·선택자·시각·버전·승인 결합 정보를 명세한다. 수동 자료는 검토 증거 값을 고정하고 원본 drift를 검출한다. 최종 run/rows에는 실제 날짜·방향 있는 차이·확인 상태·적용 금액·분류·사유·승인·누락/경고·초안 버전/fingerprint를 보존한다. 일반/정정 통합 정산 월별 활성 초안 유일성을 저장 제약과 동시성 검증으로 강제하고 완료·취소 이력은 보존한다. 월·기준일의 월말 일치 검증을 명세한다. 미확인 항목은 검토용 선택과 금액 authority를 분리하며 확인/정정 child의 명시적 재선택 후에만 합산한다. 미확인으로 남은 항목의 제외 사유와 누락 승인도 보존한다. 기존 correction/idempotency 제약, read alias와 nullable 금액 의미를 보존하고 schema 12→새 버전의 additive·반복 가능한 migration/legacy 조회/실패 및 백업 복구 경계를 문서화한다. - 근거: schema 12에는 초안/항목 persistence가 없으며 기존 account_valuations와 run/rows를 재사용·연결해야 한다. 원본 이력의 변경/삭제나 guessed migration은 필요하지 않다.
- 구현 근거: docs/data-model.md; exact approved path exists; settlement draft entities and fields 178-195; 재검토에서는 이전 head부터 후속 전체 diff가 두 설계 문서와 추가 문서 test에만 한정됨을 확인했고 변경 없는 구현 및 기존 test 근거를 보존했다.
- 테스트 근거: tests/test_settlement_draft_docs.py, tests/test_requirement_docs.py
- 판정 근거: 정본 경로와 문서 구조를 확인했다. REQ metadata 및 11개 번호 섹션, 영향 범위와 인수 기준 및 traceability는 trusted README와 TEMPLATE에 대조했다.
- `DOC-DM-semantic` — `satisfied`
- 계약: - 조치: 갱신 - 경로: docs/data-model.md - 변경 내용: 초안과 항목의 영속 엔터티를 추가해 초안→대상 항목, 항목→계좌/valuation, 초안→최종 run, 정정 초안→이전 run 관계와 필수/선택성·유일성·삭제 금지를 기록한다. 초안의 월·기준일·상태·작성자·시각·메모·버전·중복 키·완료 연결, 항목의 source identity·선택 자료·방식/사유·포함/제외·선택자·시각·버전·승인 결합 정보를 명세한다. 수동 자료는 검토 증거 값을 고정하고 원본 drift를 검출한다. 최종 run/rows에는 실제 날짜·방향 있는 차이·확인 상태·적용 금액·분류·사유·승인·누락/경고·초안 버전/fingerprint를 보존한다. 일반/정정 통합 정산 월별 활성 초안 유일성을 저장 제약과 동시성 검증으로 강제하고 완료·취소 이력은 보존한다. 월·기준일의 월말 일치 검증을 명세한다. 미확인 항목은 검토용 선택과 금액 authority를 분리하며 확인/정정 child의 명시적 재선택 후에만 합산한다. 미확인으로 남은 항목의 제외 사유와 누락 승인도 보존한다. 기존 correction/idempotency 제약, read alias와 nullable 금액 의미를 보존하고 schema 12→새 버전의 additive·반복 가능한 migration/legacy 조회/실패 및 백업 복구 경계를 문서화한다. - 근거: schema 12에는 초안/항목 persistence가 없으며 기존 account_valuations와 run/rows를 재사용·연결해야 한다. 원본 이력의 변경/삭제나 guessed migration은 필요하지 않다.
- 구현 근거: docs/data-model.md, jarca_ledger_mcp/application/settlement_draft_service.py; settlement draft entities and fields 178-195; 재검토에서는 이전 head부터 후속 전체 diff가 두 설계 문서와 추가 문서 test에만 한정됨을 확인했고 변경 없는 구현 및 기존 test 근거를 보존했다.
- 테스트 근거: tests/test_settlement_draft_docs.py, tests/test_monthly_settlement_drafts.py
- 판정 근거: 승인된 필수 의미를 pinned 문서의 해당 섹션과 구현 및 참조 테스트에 대조했다.
- `DOC-IC-structural` — `satisfied`
- 계약: - 조치: 갱신 - 경로: docs/interface-contract.md - 변경 내용: 공통 초안 생성·목록·상세·수정/대상 갱신·취소·계좌 자료 지정/해제·포함/제외·검토/검증·승인 최종화·정정 초안 operation을 정의하고 실제 구현의 snake_case 함수/MCP 도구/gateway 이름과 exact signature를 고정한다. 입력에는 초안/항목 ID·기대 버전, 월·기준일, 자료 ID·선택 방식·사유, 명시적 포함/제외와 사유, 생성/마감 키, 검토 fingerprint 및 승인자·시각/근거를 기록한다. 출력에는 준비 상태·버전, 대상/선택 증거, 날짜 차이·확인 상태, 잠정 합계·완전성·누락/승인 필요 목록, 완료 run/정정 연결과 persisted replay를 정의한다. 검증/대상 부재/상태·버전·증거 drift/승인 부족/키 충돌/동시 마감 오류의 조건·재시도·no-write를 명확히 한다. 기존 success/error_code/error, 자동 selector, 기존 close/report 키와 provenance 의미, Dashboard 인증 및 MCP 인증 범위를 보존한다. 초안 사용 시 직접 마감으로 안전 검증을 우회하지 못하는 경계를 규정한다. 생성·정정 생성은 같은 월의 활성 초안 중복을 검사하고 월말 아닌 입력 기준일은 거절한다. 미확인 선택은 검토용 상태를 반환하고 합계/최종화는 금액을 제외한다. 확인/정정 child를 명시적으로 다시 선택하면 버전·검토/승인을 갱신하고, 끝내 미확인인 항목은 누락/제외 승인 대상으로만 반환한다. - 근거: 기존 MCP/gateway에는 초안 mutation이 없고 현재 close는 basis-date 자료 자동 재조회 경로다. 새 공통 계약과 legacy 경로 구분이 필요하다.
- 구현 근거: docs/interface-contract.md; exact approved path exists; shared operation signatures and response, errors, read-only and evidence contract 438-466; 재검토에서는 이전 head부터 후속 전체 diff가 두 설계 문서와 추가 문서 test에만 한정됨을 확인했고 변경 없는 구현 및 기존 test 근거를 보존했다.
- 테스트 근거: tests/test_settlement_draft_docs.py, tests/test_requirement_docs.py
- 판정 근거: 정본 경로와 문서 구조를 확인했다. REQ metadata 및 11개 번호 섹션, 영향 범위와 인수 기준 및 traceability는 trusted README와 TEMPLATE에 대조했다.
- `DOC-IC-semantic` — `satisfied`
- 계약: - 조치: 갱신 - 경로: docs/interface-contract.md - 변경 내용: 공통 초안 생성·목록·상세·수정/대상 갱신·취소·계좌 자료 지정/해제·포함/제외·검토/검증·승인 최종화·정정 초안 operation을 정의하고 실제 구현의 snake_case 함수/MCP 도구/gateway 이름과 exact signature를 고정한다. 입력에는 초안/항목 ID·기대 버전, 월·기준일, 자료 ID·선택 방식·사유, 명시적 포함/제외와 사유, 생성/마감 키, 검토 fingerprint 및 승인자·시각/근거를 기록한다. 출력에는 준비 상태·버전, 대상/선택 증거, 날짜 차이·확인 상태, 잠정 합계·완전성·누락/승인 필요 목록, 완료 run/정정 연결과 persisted replay를 정의한다. 검증/대상 부재/상태·버전·증거 drift/승인 부족/키 충돌/동시 마감 오류의 조건·재시도·no-write를 명확히 한다. 기존 success/error_code/error, 자동 selector, 기존 close/report 키와 provenance 의미, Dashboard 인증 및 MCP 인증 범위를 보존한다. 초안 사용 시 직접 마감으로 안전 검증을 우회하지 못하는 경계를 규정한다. 생성·정정 생성은 같은 월의 활성 초안 중복을 검사하고 월말 아닌 입력 기준일은 거절한다. 미확인 선택은 검토용 상태를 반환하고 합계/최종화는 금액을 제외한다. 확인/정정 child를 명시적으로 다시 선택하면 버전·검토/승인을 갱신하고, 끝내 미확인인 항목은 누락/제외 승인 대상으로만 반환한다. - 근거: 기존 MCP/gateway에는 초안 mutation이 없고 현재 close는 basis-date 자료 자동 재조회 경로다. 새 공통 계약과 legacy 경로 구분이 필요하다.
- 구현 근거: docs/interface-contract.md, jarca_ledger_mcp/application/settlement_draft_service.py; shared operation signatures and response, errors, read-only and evidence contract 438-466; 재검토에서는 이전 head부터 후속 전체 diff가 두 설계 문서와 추가 문서 test에만 한정됨을 확인했고 변경 없는 구현 및 기존 test 근거를 보존했다.
- 테스트 근거: tests/test_settlement_draft_docs.py, tests/test_monthly_settlement_drafts.py
- 판정 근거: 승인된 필수 의미를 pinned 문서의 해당 섹션과 구현 및 참조 테스트에 대조했다.
- `DOC-PS-structural` — `satisfied`
- 계약: - 조치: 갱신 - 경로: docs/project-structure.md - 변경 내용: 기존 application/monthly_settlement_service.py의 read model을 보존하면서 초안 lifecycle의 application-layer 책임과 account_valuation_service.py(등록·검증·정정), assets_service.py(금액/증거·run 최종화), infrastructure/sqlite/schema.py/migrations.py(영속 제약/이주)의 소유권을 명확히 한다. service.py 공개 re-export, adapters/mcp/server.py/tool_contracts.py, adapters/streamlit gateway와 dashboard/page_views/monthly_settlement.py/assets.py의 연결을 실제 경로로 기록한다. 새 파일을 추가하면 그 exact 경로·책임·진입점을 문서에 반영하되 UI/MCP direct SQL, application의 Dashboard 역의존과 중복 업무 검증을 금지한다. 월별 활성 초안 유일성·월말 검증·미확인 금액 제외/확인 후 재선택의 책임을 공통 application과 SQLite 제약에 두고 adapter별 예외를 만들지 않는다. 각 변경에 대응하는 합성 테스트, 문서 검증과 기존 auth/menu/legacy 회귀 위치를 연결한다. - 근거: 기존 구조 문서는 service→SQLite와 page/tool→gateway/service 방향을 정본으로 규정한다. 새 초안 작업은 해당 책임 경계를 확장하며 별도 UI 전용 마감 로직을 만들지 않는다.
- 구현 근거: docs/project-structure.md; exact approved path exists; ownership table 214-226; 재검토에서는 이전 head부터 후속 전체 diff가 두 설계 문서와 추가 문서 test에만 한정됨을 확인했고 변경 없는 구현 및 기존 test 근거를 보존했다.
- 테스트 근거: tests/test_settlement_draft_docs.py, tests/test_requirement_docs.py
- 판정 근거: 정본 경로와 문서 구조를 확인했다. REQ metadata 및 11개 번호 섹션, 영향 범위와 인수 기준 및 traceability는 trusted README와 TEMPLATE에 대조했다.
- `DOC-PS-semantic` — `satisfied`
- 계약: - 조치: 갱신 - 경로: docs/project-structure.md - 변경 내용: 기존 application/monthly_settlement_service.py의 read model을 보존하면서 초안 lifecycle의 application-layer 책임과 account_valuation_service.py(등록·검증·정정), assets_service.py(금액/증거·run 최종화), infrastructure/sqlite/schema.py/migrations.py(영속 제약/이주)의 소유권을 명확히 한다. service.py 공개 re-export, adapters/mcp/server.py/tool_contracts.py, adapters/streamlit gateway와 dashboard/page_views/monthly_settlement.py/assets.py의 연결을 실제 경로로 기록한다. 새 파일을 추가하면 그 exact 경로·책임·진입점을 문서에 반영하되 UI/MCP direct SQL, application의 Dashboard 역의존과 중복 업무 검증을 금지한다. 월별 활성 초안 유일성·월말 검증·미확인 금액 제외/확인 후 재선택의 책임을 공통 application과 SQLite 제약에 두고 adapter별 예외를 만들지 않는다. 각 변경에 대응하는 합성 테스트, 문서 검증과 기존 auth/menu/legacy 회귀 위치를 연결한다. - 근거: 기존 구조 문서는 service→SQLite와 page/tool→gateway/service 방향을 정본으로 규정한다. 새 초안 작업은 해당 책임 경계를 확장하며 별도 UI 전용 마감 로직을 만들지 않는다.
- 구현 근거: docs/project-structure.md, jarca_ledger_mcp/application/settlement_draft_service.py; 이전 review71 DOC-PS-semantic 보완: docs/project-structure.md 229-252에 실제 service re-export, MCP server와 tool_contracts, settlement_gateway, reusable panel과 두 page entrypoint 연결을 추가했다. 246-252에 월별 active partial unique index, 월말 검증 및 unverified authority와 명시적 child 재선택의 공통 책임과 synthetic test를 대응한다. 신규 named 문서 regression도 해당 연결을 검증한다.
- 테스트 근거: tests/test_settlement_draft_docs.py, tests/test_monthly_settlement_drafts.py
- 판정 근거: 이전 최소 보완 요청의 actual 경로와 책임, 진입점 및 의존 방향과 세 공통 정책 소유권이 모두 문서화됐다. 기존 기능이나 adapter 예외를 새로 만들지 않았다.
- `DOC-RF-structural` — `satisfied`
- 계약: - 조치: 갱신 - 경로: docs/runtime-flow.md - 변경 내용: 인증→명시적 무자료 초안 생성→대상 동결→자료 등록/지정·해제/제외→읽기 전용 검토→버전·증거에 결합한 승인→동일 transaction에서 증거 재검증·run/rows 저장·초안 완료→불변 조회 흐름을 정의한다. 생성/정정 생성 guard는 일반/정정 통합 월별 단일 활성 초안과 월말 일치를 검증한다. 완료·취소 후 재생성은 가능하지만 기존 마감이 있으면 이전 run과 정정 사유를 연결한다. 미확인 자료 선택은 검토 필요로 전이하며 합계에는 포함하지 않는다. 확인/정정 자료를 명시적으로 재선택하면 재검토·재승인 후 최종화하고, 끝내 확인되지 않으면 누락/제외 및 조건부 누락 승인을 거친다. 변경/정정/대상 갱신은 승인을 무효화하고 검토 단계로 돌아간다. 취소는 기존 증거/run을 삭제하지 않으며 재마감은 이전 run 연결·사유·단일 correction 제약을 유지한다. 거래 준비와 자산 상태를 별도로 표시하고 외부 가격/환율 호출·추정 거래 생성은 없다. SQLite 동시 편집·키/버전 충돌, stale approval, 정정본 등장, 중복 최종화, DB 실패에 대해 no-partial-write·rollback·안전 재시도/사용자 재검토와 반환 오류를 기록한다. 관찰 정보는 초안/버전/run 상관 ID와 상태/경고 코드로 제한하고 credential/실제 계좌 자료를 로그에 남기지 않는다. - 근거: 현 runtime은 read-only preview→live authority 기반 close이며 영속 준비 단계가 없다. 기존 fingerprint drift·원자 저장·persisted replay guard를 초안 선택에 결합해 확장해야 한다.
- 구현 근거: docs/runtime-flow.md; exact approved path exists; lifecycle and failure/recovery guards 243-259; 재검토에서는 이전 head부터 후속 전체 diff가 두 설계 문서와 추가 문서 test에만 한정됨을 확인했고 변경 없는 구현 및 기존 test 근거를 보존했다.
- 테스트 근거: tests/test_settlement_draft_docs.py, tests/test_requirement_docs.py
- 판정 근거: 정본 경로와 문서 구조를 확인했다. REQ metadata 및 11개 번호 섹션, 영향 범위와 인수 기준 및 traceability는 trusted README와 TEMPLATE에 대조했다.
- `DOC-RF-semantic` — `satisfied`
- 계약: - 조치: 갱신 - 경로: docs/runtime-flow.md - 변경 내용: 인증→명시적 무자료 초안 생성→대상 동결→자료 등록/지정·해제/제외→읽기 전용 검토→버전·증거에 결합한 승인→동일 transaction에서 증거 재검증·run/rows 저장·초안 완료→불변 조회 흐름을 정의한다. 생성/정정 생성 guard는 일반/정정 통합 월별 단일 활성 초안과 월말 일치를 검증한다. 완료·취소 후 재생성은 가능하지만 기존 마감이 있으면 이전 run과 정정 사유를 연결한다. 미확인 자료 선택은 검토 필요로 전이하며 합계에는 포함하지 않는다. 확인/정정 자료를 명시적으로 재선택하면 재검토·재승인 후 최종화하고, 끝내 확인되지 않으면 누락/제외 및 조건부 누락 승인을 거친다. 변경/정정/대상 갱신은 승인을 무효화하고 검토 단계로 돌아간다. 취소는 기존 증거/run을 삭제하지 않으며 재마감은 이전 run 연결·사유·단일 correction 제약을 유지한다. 거래 준비와 자산 상태를 별도로 표시하고 외부 가격/환율 호출·추정 거래 생성은 없다. SQLite 동시 편집·키/버전 충돌, stale approval, 정정본 등장, 중복 최종화, DB 실패에 대해 no-partial-write·rollback·안전 재시도/사용자 재검토와 반환 오류를 기록한다. 관찰 정보는 초안/버전/run 상관 ID와 상태/경고 코드로 제한하고 credential/실제 계좌 자료를 로그에 남기지 않는다. - 근거: 현 runtime은 read-only preview→live authority 기반 close이며 영속 준비 단계가 없다. 기존 fingerprint drift·원자 저장·persisted replay guard를 초안 선택에 결합해 확장해야 한다.
- 구현 근거: docs/runtime-flow.md, jarca_ledger_mcp/application/settlement_draft_service.py; 이전 review71 DOC-RF-semantic 보완: docs/runtime-flow.md 262-274의 Cancellation and reopening에서 active 상태와 version 및 actor/reason guard, BEGIN IMMEDIATE, cancel audit, 승인 무효화, 이력 보존, rollback과 재시도, 신규 키와 이전 마감 정정 연결을 명시했다. service 202-211 및394-396과153-185, 기존 cancellation/correction tests 및 신규 named 문서 regression에 대조했다.
- 테스트 근거: tests/test_settlement_draft_docs.py, tests/test_monthly_settlement_drafts.py
- 판정 근거: 취소와 재생성의 승인된 상태 전이가 실제 구현에 맞게 명시됐다. 같은 create key의 과거 초안 재사용과 새 키의 신규 초안 생성, 최신 prior run 및 정정 사유를 구분했고 원본 증거와 마감 삭제가 없다.
- `BASE-REQ-003.01-AC01` — `satisfied`
- 계약: REQ-003.01-AC01 — migration and preservation Cases (정상/경계/실패): 정상 schema 12 init twice; 경계 schema 11 legacy DB; 실패 malformed legacy DB. State Invariants: legacy tables/rows remain; migration repeats without duplicate columns. 판정 기준: schema_version=12, required tables/columns/indexes exist and old rows remain. 검증: tests/test_account_valuations.py::test_account_valuation_schema_is_v12_and_idempotent, tests/test_issue_12_regressions.py::test_schema12_migration_preserves_legacy_rows_indexes_and_is_idempotent. 검증 분류: level=integration; backend=sqlite
- 구현 근거: docs/requirements/req-003_account-valuation-history.md; REQ current AC REQ-003.01-AC01; pinned base and head whole block comparison; referenced existing test bodies reviewed; 재검토에서는 이전 head부터 후속 전체 diff가 두 설계 문서와 추가 문서 test에만 한정됨을 확인했고 변경 없는 구현 및 기존 test 근거를 보존했다.
- 테스트 근거: tests/test_account_valuations.py, tests/test_issue_12_regressions.py, tests/test_contract_regression.py, tests/test_service.py
- 판정 근거: schema 11 legacy 보존 및 반복 초기화와 malformed failure 의미를 유지하고 현재 schema_version만 12에서 13으로 승인된 additive migration에 맞춰 변경했다. 참조 테스트는 실제로 13을 단언한다.
- `BASE-REQ-003.02-AC01` — `satisfied`
- 계약: REQ-003.02-AC01 — selection policy Cases (정상/경계/실패): exact verified; as_of carry-forward; future/unverified/ambiguous excluded/warned. State Invariants: no future/unverified row is selected. 판정 기준: exact returns same-date verified leaf; as_of returns latest prior verified and age/warning. 검증: tests/test_account_valuations.py::test_select_exact_and_as_of_excludes_unverified_and_reports_carry_forward, source _account_valuation_items(). 검증 분류: level=unit; backend=application
- 구현 근거: docs/requirements/req-003_account-valuation-history.md; REQ current AC REQ-003.02-AC01; pinned base and head whole block comparison; referenced existing test bodies reviewed; 재검토에서는 이전 head부터 후속 전체 diff가 두 설계 문서와 추가 문서 test에만 한정됨을 확인했고 변경 없는 구현 및 기존 test 근거를 보존했다.
- 테스트 근거: tests/test_account_valuations.py, tests/test_issue_12_regressions.py, tests/test_contract_regression.py, tests/test_service.py
- 판정 근거: 기존 인수 판정과 검증 및 상태 불변조건을 원문 그대로 보존했다.
- `BASE-REQ-003.03-AC01` — `satisfied`
- 계약: REQ-003.03-AC01 — idempotent correction Cases (정상/경계/실패): same payload reuse; different payload conflict; second correction fails. State Invariants: one row/child per operation and original immutable. 판정 기준: exact error codes and count 2 after one correction. 검증: tests/test_account_valuations.py::test_register_same_idempotency_payload_reuses_row_and_changed_payload_conflicts, tests/test_account_valuations.py::test_correction_is_append_only_reasoned_and_single_child, tests/test_issue_12_regressions.py::test_empty_conditional_close_is_closed_and_second_close_requires_correction. 검증 분류: level=integration; backend=sqlite
- 구현 근거: docs/requirements/req-003_account-valuation-history.md; REQ current AC REQ-003.03-AC01; pinned base and head whole block comparison; referenced existing test bodies reviewed; 재검토에서는 이전 head부터 후속 전체 diff가 두 설계 문서와 추가 문서 test에만 한정됨을 확인했고 변경 없는 구현 및 기존 test 근거를 보존했다.
- 테스트 근거: tests/test_account_valuations.py, tests/test_issue_12_regressions.py, tests/test_contract_regression.py, tests/test_service.py
- 판정 근거: 기존 인수 판정과 검증 및 상태 불변조건을 원문 그대로 보존했다.
- `BASE-REQ-003.04-AC01` — `satisfied`
- 계약: REQ-003.04-AC01 — precision and representative loan Cases (정상/경계/실패): integer zero; NULL optional metrics; loan missing definition rejected. State Invariants: no float amount and no double sum. 판정 기준: optional fields round-trip exactly and loan definition validation is enforced. 검증: test_correction_preserves_optional_fields_unless_overridden, _validate_common() and schema static checks. 검증 분류: level=static; backend=sqlite
- 구현 근거: docs/requirements/req-003_account-valuation-history.md; REQ current AC REQ-003.04-AC01; pinned base and head whole block comparison; referenced existing test bodies reviewed; 재검토에서는 이전 head부터 후속 전체 diff가 두 설계 문서와 추가 문서 test에만 한정됨을 확인했고 변경 없는 구현 및 기존 test 근거를 보존했다.
- 테스트 근거: tests/test_account_valuations.py, tests/test_issue_12_regressions.py, tests/test_contract_regression.py, tests/test_service.py
- 판정 근거: 기존 인수 판정과 검증 및 상태 불변조건을 원문 그대로 보존했다.
- `BASE-REQ-003.05-AC01` — `satisfied`
- 계약: REQ-003.05-AC01 — authority separation Cases (정상/경계/실패): dated candidate; late historical candidate; name-only update. State Invariants: current/latest display cannot roll backward and candidate is unverified. 판정 기준: dated account write creates only unverified candidate; name-only does not. 검증: test_account_balance_write_records_unverified_candidate_only_with_real_basis_date, test_account_name_only_update_does_not_create_candidate. 검증 분류: level=unit; backend=application
- 구현 근거: docs/requirements/req-003_account-valuation-history.md; REQ current AC REQ-003.05-AC01; pinned base and head whole block comparison; referenced existing test bodies reviewed; 재검토에서는 이전 head부터 후속 전체 diff가 두 설계 문서와 추가 문서 test에만 한정됨을 확인했고 변경 없는 구현 및 기존 test 근거를 보존했다.
- 테스트 근거: tests/test_account_valuations.py, tests/test_issue_12_regressions.py, tests/test_contract_regression.py, tests/test_service.py
- 판정 근거: 기존 인수 판정과 검증 및 상태 불변조건을 원문 그대로 보존했다.
- `BASE-REQ-003.06-AC01` — `satisfied`
- 계약: REQ-003.06-AC01 — preview and approval Cases (정상/경계/실패): complete exact close; incomplete draft; missing approval rejected. State Invariants: preview row count unchanged; no unsafe evidence approved. 판정 기준: preview is read-only and close returns conditional_approval_required without metadata. 검증: test_manual_asset_update_deactivate_preview_and_close_correction_policy, preview_asset_snapshot_close(). 검증 분류: level=integration; backend=application
- 구현 근거: docs/requirements/req-003_account-valuation-history.md; REQ current AC REQ-003.06-AC01; pinned base and head whole block comparison; referenced existing test bodies reviewed; 재검토에서는 이전 head부터 후속 전체 diff가 두 설계 문서와 추가 문서 test에만 한정됨을 확인했고 변경 없는 구현 및 기존 test 근거를 보존했다.
- 테스트 근거: tests/test_account_valuations.py, tests/test_issue_12_regressions.py, tests/test_contract_regression.py, tests/test_service.py
- 판정 근거: 기존 인수 판정과 검증 및 상태 불변조건을 원문 그대로 보존했다.
- `BASE-REQ-003.07-AC01` — `satisfied`
- 계약: REQ-003.07-AC01 — immutable close correction Cases (정상/경계/실패): first close; same-date correction; second unreasoned close. State Invariants: old run/rows remain and latest run alone reports. 판정 기준: correction_of_run_id, count, and net worth match. 검증: test_manual_asset_update_deactivate_preview_and_close_correction_policy, assets_service.py close path. 검증 분류: level=integration; backend=sqlite
- 구현 근거: docs/requirements/req-003_account-valuation-history.md; REQ current AC REQ-003.07-AC01; pinned base and head whole block comparison; referenced existing test bodies reviewed; 재검토에서는 이전 head부터 후속 전체 diff가 두 설계 문서와 추가 문서 test에만 한정됨을 확인했고 변경 없는 구현 및 기존 test 근거를 보존했다.
- 테스트 근거: tests/test_account_valuations.py, tests/test_issue_12_regressions.py, tests/test_contract_regression.py, tests/test_service.py
- 판정 근거: 기존 인수 판정과 검증 및 상태 불변조건을 원문 그대로 보존했다.
- `BASE-REQ-003.08-AC01` — `satisfied`
- 계약: REQ-003.08-AC01 — reconciliation/monthly Cases (정상/경계/실패): regular ledger calculation; verified investment; missing baseline. State Invariants: no fake transaction; provenance fields present; monthly read is non-mutating. 판정 기준: status VALUATION_MANAGED for verified investment and monthly summary reads report. 검증: tests/test_service.py::test_statement_status_account_update_and_balance_reconciliation, tests/test_issue_12_regressions.py::test_reconciliation_uses_corrected_investment_leaf_without_transaction_count_change, tests/test_service.py::test_monthly_settlement_summary_read_model_foundation. 검증 분류: level=unit; backend=application
- 구현 근거: docs/requirements/req-003_account-valuation-history.md; REQ current AC REQ-003.08-AC01; pinned base and head whole block comparison; referenced existing test bodies reviewed; 재검토에서는 이전 head부터 후속 전체 diff가 두 설계 문서와 추가 문서 test에만 한정됨을 확인했고 변경 없는 구현 및 기존 test 근거를 보존했다.
- 테스트 근거: tests/test_account_valuations.py, tests/test_issue_12_regressions.py, tests/test_contract_regression.py, tests/test_service.py
- 판정 근거: 기존 인수 판정과 검증 및 상태 불변조건을 원문 그대로 보존했다.
- `BASE-REQ-003.09-AC01` — `satisfied`
- 계약: REQ-003.09-AC01 — shared adapters and auth Cases (정상/경계/실패): MCP stdio/http config; authenticated Dashboard render; unauthenticated gate. State Invariants: auth precedes DB; render does not write; response envelope has success. 판정 기준: actual tool/gateway names resolve and existing auth/menu tests pass. 검증: tests/test_mcp_http_runtime.py, tests/test_dashboard_authentication_app.py, tests/test_dashboard_menu_transition.py, server.py and gateways. 검증 분류: level=integration; backend=dashboard
- 구현 근거: docs/requirements/req-003_account-valuation-history.md; REQ current AC REQ-003.09-AC01; pinned base and head whole block comparison; referenced existing test bodies reviewed; 재검토에서는 이전 head부터 후속 전체 diff가 두 설계 문서와 추가 문서 test에만 한정됨을 확인했고 변경 없는 구현 및 기존 test 근거를 보존했다.
- 테스트 근거: tests/test_account_valuations.py, tests/test_issue_12_regressions.py, tests/test_contract_regression.py, tests/test_service.py
- 판정 근거: 기존 인수 판정과 검증 및 상태 불변조건을 원문 그대로 보존했다.
- `BASE-REQ-003.10-AC01` — `satisfied`
- 계약: REQ-003.10-AC01 — privacy and compatibility Cases (정상/경계/실패): synthetic fixture; redaction search; actual secret/data detection. State Invariants: no credential/token/cookie/real financial data in docs/tests/evidence. 판정 기준: semantic inventory missing=0 and ambiguous=0; placeholder=0. 검증: tests/test_requirement_docs.py, auth/menu evidence tests, repository redaction/static search. 검증 분류: level=static; backend=dashboard
- 구현 근거: docs/requirements/req-003_account-valuation-history.md; REQ current AC REQ-003.10-AC01; pinned base and head whole block comparison; referenced existing test bodies reviewed; 재검토에서는 이전 head부터 후속 전체 diff가 두 설계 문서와 추가 문서 test에만 한정됨을 확인했고 변경 없는 구현 및 기존 test 근거를 보존했다.
- 테스트 근거: tests/test_account_valuations.py, tests/test_issue_12_regressions.py, tests/test_contract_regression.py, tests/test_service.py
- 판정 근거: 기존 인수 판정과 검증 및 상태 불변조건을 원문 그대로 보존했다.
### 범위 판정
- 누락: 없음
- 범위 초과: 없음
- 명세 모순: 없음
### 결론
이전 review71의 프로젝트 구조 연결과 런타임 취소 및 재생성 문서 누락 두 건이 모두 해소됐다. 현재 head의 57개 필수 criterion을 충족하고 범위 누락 및 초과와 명세 모순이 없어 approve다. 코드와 fixture 및 dependency 변경은 없고 두 문서 test만 추가됐다. 생산자 exact-head 전체 검증은398 passed,4 skipped,1 warning 및 lint 통과이며 reviewer 독립 제품 실행이나 CI 성공이 아니다.
<!-- gitea-agent:implementation-spec-review/v1 owner=jsfamily repository=jarca-ledger-mcp issue=15 pr=16 head=bae137dce77245f1f506c2a0086101b6a067c9ab contract-sha256=347e1e9d4ef3514754f93515ccfe71d94daa880bcd4129ad3fc1989c53b0641c result-sha256=b6f00d41edfee4da681380676c53bd6dc203495599ad5150dc8e1d9a18cd4b59 correlation=dffff50e949709425e01ff4ba6363fa44dc4af17035fd465f1e3a97ae7838c91 -->
제한된 수정/재검증 방향: 기존 _summarize_valuation_items()와 동일한 부채 정규화/합계 정책을 초안 검토부터 사용하고 final.totals/상위 합계/report/replay를 하나의 의미로 맞춘다. 음수·양수 부채 혼합 및 승인→확정→조회/재시도 회귀 추가.
발생 조건: bank 계좌에 verified cash_balance 평가20을 public register API로 등록; 자동 선택한 초안 항목에 동일 valuation_id를 exact로 명시적 지정
직접 관찰: legacy 및 draft 자동 합계는20이고 항목은 ready이나 동일 자료를 set_settlement_draft_item()로 재선택하면 validation_error(valuation purpose or representative liability is invalid).
영향/이번 범위의 차단 이유: 등록/자동 선택과 편집/직접 지정의 평가 목적 정책이 서로 다르다. 해당 은행 자료를 수동 대체하거나 명시적으로 재선택할 수 없어 이 PR의 계좌별 자료 지정 기능이 유효한 기존 자료에서 막힌다.
계약 관계: Issue #15: 기존 평가 등록/조회·목적 검증 재사용, 기존 자동 selector 계약 유지, 특정 자료 명시적 지정
근거: reviewer-manifest-v3.json / bank-selection-v3; test_supported_bank_cash_balance_can_be_explicitly_selected. Initial runner KeyError is excluded; v3 is genuine validation_error assertion.
제한된 수정/재검증 방향: 등록/자동 selector가 사용하는 계좌 유형별 유효한 대표 목적과 명시적 선택 validator를 정합화한다. 은행 balance/cash_balance의 exact·이월·future 직접 지정 및 잘못된 투자/부채 목적 거절을 함께 검증.
실제 검증 및 한계
Reviewer isolated environment, exact HEAD: 398 passed / 4 skipped, Ruff exit 0. 기존 suite GREEN과 별개로 독립 public-API correctness assertions 3개 RED를 확인했습니다.
Immutable Git blob의 실제 baseline 코드에서 299개, 현재 HEAD에서 402개를 collect. 103개 추가 / 0개 삭제, 신규 skip/xfail 없음. 변경된 기존 test body 7개의 의미를 검토했고 check-tests 통과.
실제 schema12 public API로 생성/마감한 합성 DB의 반복 migration 및 기존 report/timeseries/monthly source ID 비교 통과. 최초 parser 오류는 보존하고 해당 probe만 재실행.
제공된 baseline inventory는 선언 base에 없는 파일의 ID 93/392개를 포함하여 재사용하지 않음. 이 리뷰는 독립 수집 결과를 채택했습니다.
Risk matrix 필수 R02(선택/통화), R05(수동 금액) 실패; 나머지 범위는 저장된 코드/직접 실행 근거로 통과. Structural guard PASS는 제품 승인으로 해석하지 않습니다.
실제 금융자료/계정·운영 DB·deployment는 사용/검증하지 않음.
실제 stdio와 Streamlit AppTest는 실행했으나 browser 실사용/E2E 및 별도 adapter 내부 모듈 직접 실행은 검증하지 않음. 문서화된 jarca_ledger_mcp.server 경로의 runtime 검증만 채택.
PDF sample 파일 부재로 기존4개 skip 유지; 신규 skip/xfail 없음.
MCP1.30.0 및 실제 설치 버전을 기록했고 declared compatible range 안에서 검증; 모든 dependency version 조합이나 부하 benchmark를 실행한 것은 아님.
Source/test/Discovery 수정, commit/push/merge/deploy/Issue 변경은 하지 않았습니다.
수정은 기존 PR에서 수행하고 새 HEAD의 fresh spec pass → 독립 code 재리뷰가 필요합니다. 이전 HEAD의 spec/code 결과는 새 HEAD 승인으로 이월하지 않습니다.
<!-- gitea-agent:code-review/v1 owner=jsfamily repository=jarca-ledger-mcp issue=15 pr=16 head=bae137dce77245f1f506c2a0086101b6a067c9ab contract-sha256=347e1e9d4ef3514754f93515ccfe71d94daa880bcd4129ad3fc1989c53b0641c -->
- Verdict: `request_changes`
# 독립 코드 리뷰 — Issue #15 / PR #16
- Reviewed HEAD: `bae137dce77245f1f506c2a0086101b6a067c9ab`
- Base: `68212e773b94dd89b6c036e6616759542c178de3`
- Contract SHA-256: `347e1e9d4ef3514754f93515ccfe71d94daa880bcd4129ad3fc1989c53b0641c`
- Exact-head spec pass: native review **#72** (`gitea-spec-agent`, APPROVED)
- Harness scoped `gitea-code-review` **v0.1.2** 적용. 전체 변경 **38개**와 호출자·테스트·문서 검토. 중요 확정 결함3개로 승인하지 않습니다.
## F-001 — 수동 부채의 부호를 그대로 합산하여 검토/승인 금액과 확정 응답이 서로 달라짐 (high)
- 위치: `jarca_ledger_mcp/application/settlement_draft_service.py:129-133,381`
- 발생 조건: 기존 public create_manual_asset()로 자산 100, loan 분류의 부채 -40을 등록하고 같은 기준일 초안을 검토·승인·최종화
- 직접 관찰: legacy preview/report와 final top-level: assets100, liabilities40, net_worth60. draft review와 persisted final.totals: assets100, liabilities-40, net_worth140. 정상 성공으로 마감되어 모순된 final_response가 저장됨.
- 영향/이번 범위의 차단 이유: Dashboard/MCP가 잘못된 순자산을 검토·승인하게 되며 같은 확정 응답 안에도 금액이 상충한다. 금융 합계·승인 대상의 정합성이므로 이번 신규 초안 경로에서 수정해야 한다.
- 계약 관계: Issue #15: 수동 자산/부채와 정수 금액·순자산 및 기존 KRW/합계 의미 보존; 검토한 금액 고정
- 근거: `reviewer-manifest-v2.json / reviewer-boundaries-v2; test_signed_manual_liability_review_finalize_and_report_agree; baseline public-write fixture confirms supported signed debt`
- 제한된 수정/재검증 방향: 기존 _summarize_valuation_items()와 동일한 부채 정규화/합계 정책을 초안 검토부터 사용하고 final.totals/상위 합계/report/replay를 하나의 의미로 맞춘다. 음수·양수 부채 혼합 및 승인→확정→조회/재시도 회귀 추가.
## F-002 — 기존에 지원되는 소문자 KRW 수동 자산을 비KRW 누락으로 처리함 (medium)
- 위치: `jarca_ledger_mcp/application/settlement_draft_service.py:78,107-115`
- 발생 조건: create_manual_asset(... valuation_amount=25, currency="krw") 후 같은 기준일 초안 생성/검토
- 직접 관찰: legacy preview의 total_assets25와 canonical KRW evidence에 비해 draft total_assets0, amountNULL, candidate_amount25, currency"krw", non_krw warning/missing이 반환됨.
- 영향/이번 범위의 차단 이유: 유효한 기존 자산이 초안 합계에서 빠지거나 불필요한 누락 승인을 요구한다. 승인된 누락으로 진행하면 해당 자산이 NULL로 마감될 수 있다. 기존 통화 정책을 새 경로에서 깨는 결함이며 FX 신규 정책 요구가 아니다.
- 계약 관계: Issue #15: 기존 수동 자료·KRW 중심 통화/금액 정책 유지; 비KRW만 제외
- 근거: `reviewer-manifest-v2.json / reviewer-boundaries-v2; test_supported_lowercase_krw_manual_value_keeps_authority; existing tests/test_issue_12_review59_reports.py:260-269 supports currency normalization`
- 제한된 수정/재검증 방향: 원본 frozen evidence를 변조하지 않으면서 authority 판정·public currency에 기존 (currency or "KRW").upper() 정규화 의미를 공유한다. lowercase KRW와 실제 USD, NULL/0, 마감/조회 회귀 추가.
## F-003 — 자동 authority로 인정한 은행 cash_balance 평가를 명시적 재선택에서는 거절함 (medium)
- 위치: `jarca_ledger_mcp/application/settlement_draft_service.py:283-287`
- 발생 조건: bank 계좌에 verified cash_balance 평가20을 public register API로 등록; 자동 선택한 초안 항목에 동일 valuation_id를 exact로 명시적 지정
- 직접 관찰: legacy 및 draft 자동 합계는20이고 항목은 ready이나 동일 자료를 set_settlement_draft_item()로 재선택하면 validation_error(valuation purpose or representative liability is invalid).
- 영향/이번 범위의 차단 이유: 등록/자동 선택과 편집/직접 지정의 평가 목적 정책이 서로 다르다. 해당 은행 자료를 수동 대체하거나 명시적으로 재선택할 수 없어 이 PR의 계좌별 자료 지정 기능이 유효한 기존 자료에서 막힌다.
- 계약 관계: Issue #15: 기존 평가 등록/조회·목적 검증 재사용, 기존 자동 selector 계약 유지, 특정 자료 명시적 지정
- 근거: `reviewer-manifest-v3.json / bank-selection-v3; test_supported_bank_cash_balance_can_be_explicitly_selected. Initial runner KeyError is excluded; v3 is genuine validation_error assertion.`
- 제한된 수정/재검증 방향: 등록/자동 selector가 사용하는 계좌 유형별 유효한 대표 목적과 명시적 선택 validator를 정합화한다. 은행 balance/cash_balance의 exact·이월·future 직접 지정 및 잘못된 투자/부채 목적 거절을 함께 검증.
## 실제 검증 및 한계
- Reviewer isolated environment, exact HEAD: **398 passed / 4 skipped**, Ruff exit **0**. 기존 suite GREEN과 별개로 독립 public-API correctness assertions **3개 RED**를 확인했습니다.
- Immutable Git blob의 실제 baseline 코드에서 **299개**, 현재 HEAD에서 **402개**를 collect. **103개 추가 / 0개 삭제**, 신규 skip/xfail 없음. 변경된 기존 test body **7개**의 의미를 검토했고 `check-tests` 통과.
- 실제 schema12 public API로 생성/마감한 합성 DB의 반복 migration 및 기존 report/timeseries/monthly source ID 비교 통과. 최초 parser 오류는 보존하고 해당 probe만 재실행.
- 제공된 baseline inventory는 선언 base에 없는 파일의 ID **93/392개**를 포함하여 재사용하지 않음. 이 리뷰는 독립 수집 결과를 채택했습니다.
- Risk matrix 필수 R02(선택/통화), R05(수동 금액) 실패; 나머지 범위는 저장된 코드/직접 실행 근거로 통과. Structural guard PASS는 제품 승인으로 해석하지 않습니다.
- 실제 금융자료/계정·운영 DB·deployment는 사용/검증하지 않음.
- 실제 stdio와 Streamlit AppTest는 실행했으나 browser 실사용/E2E 및 별도 adapter 내부 모듈 직접 실행은 검증하지 않음. 문서화된 jarca_ledger_mcp.server 경로의 runtime 검증만 채택.
- PDF sample 파일 부재로 기존4개 skip 유지; 신규 skip/xfail 없음.
- MCP1.30.0 및 실제 설치 버전을 기록했고 declared compatible range 안에서 검증; 모든 dependency version 조합이나 부하 benchmark를 실행한 것은 아님.
- Private redacted report: `/opt/data/gitea-agent/logs/gitea-review-agent/runs/issue-15-pr-16-20261010T141712Z/review-result.json`
- Command/environment/JUnit evidence: `/opt/data/gitea-agent/repositories/jsfamily/jarca-ledger-mcp/worktrees/issue-15/verification/issue-15-pr-16-20261010T141712Z`
- Source/test/Discovery 수정, commit/push/merge/deploy/Issue 변경은 하지 않았습니다.
수정은 기존 PR에서 수행하고 **새 HEAD의 fresh spec pass → 독립 code 재리뷰**가 필요합니다. 이전 HEAD의 spec/code 결과는 새 HEAD 승인으로 이월하지 않습니다.
변경: jarca_ledger_mcp/application/settlement_draft_service.py and tests/test_settlement_draft_policy_consistency.py
검증: /opt/data/gitea-agent/runtime/issue15-20261009T023318Z/venv/bin/python -B -m pytest -o addopts= -p no:cacheprovider --basetemp /tmp/i15rw3-main-tests-haa4zjeo/pytest -ra -q 'tests/test_settlement_draft_policy_consistency.py::test_signed_manual_loan_totals_remain_consistent_across_close_and_reports[debts0]'; exit0; named RED exit1 /opt/data/gitea-agent/repositories/jsfamily/jarca-ledger-mcp/worktrees/issue-15/verification/i15rw3-regressions/main-red-liability-primary.json; GREEN /opt/data/gitea-agent/repositories/jsfamily/jarca-ledger-mcp/worktrees/issue-15/verification/i15rw3-regressions/green-liability-v2.json; final blob equivalence verified in /opt/data/gitea-agent/repositories/jsfamily/jarca-ledger-mcp/worktrees/issue-15/verification/i15rw3-final/independent-final-evidence-access.json
근거: Shared signed-loan bucket policy now agrees across review, approval, final totals, report and replay; normalized totals bind approval so historical amount approvals require a fresh review. SEC-FIN-01 has a separate named assertion RED then GREEN; completed history replay stays immutable.
F-002 — resolved
분류: valid_fix
변경: jarca_ledger_mcp/application/settlement_draft_service.py and tests/test_settlement_draft_policy_consistency.py
검증: /opt/data/gitea-agent/runtime/issue15-20261009T023318Z/venv/bin/python -B -m pytest -o addopts= -p no:cacheprovider --basetemp /tmp/i15rw3-main-tests-w131k2vv/pytest -ra -q tests/test_settlement_draft_policy_consistency.py::test_lowercase_supported_currency_normalizes_without_mutating_frozen_evidence; exit0; named RED exit1 /opt/data/gitea-agent/repositories/jsfamily/jarca-ledger-mcp/worktrees/issue-15/verification/i15rw3-regressions/main-red-currency.json; GREEN /opt/data/gitea-agent/repositories/jsfamily/jarca-ledger-mcp/worktrees/issue-15/verification/i15rw3-regressions/green-currency-v2.json; final blob equivalence verified in /opt/data/gitea-agent/repositories/jsfamily/jarca-ledger-mcp/worktrees/issue-15/verification/i15rw3-final/independent-final-evidence-access.json
근거: Existing supported lowercase KRW retains authority and canonical public currency without mutating raw frozen evidence; genuine non-KRW, missing values and zero boundaries remain unchanged.
F-003 — resolved
분류: valid_fix
변경: jarca_ledger_mcp/application/settlement_draft_service.py and tests/test_settlement_draft_policy_consistency.py
검증: /opt/data/gitea-agent/runtime/issue15-20261009T023318Z/venv/bin/python -B -m pytest -o addopts= -p no:cacheprovider --basetemp /tmp/i15rw3-main-tests-29omp2cd/pytest -ra -q tests/test_settlement_draft_policy_consistency.py::test_verified_cash_balance_can_be_explicitly_reselected_without_losing_authority; exit0; named RED exit1 /opt/data/gitea-agent/repositories/jsfamily/jarca-ledger-mcp/worktrees/issue-15/verification/i15rw3-regressions/main-red-bank-selection.json; GREEN /opt/data/gitea-agent/repositories/jsfamily/jarca-ledger-mcp/worktrees/issue-15/verification/i15rw3-regressions/green-bank-selection-v2.json; final blob equivalence verified in /opt/data/gitea-agent/repositories/jsfamily/jarca-ledger-mcp/worktrees/issue-15/verification/i15rw3-final/independent-final-evidence-access.json
근거: Registered supported bank balance/cash_balance can be explicitly selected in exact, carried and reasoned future substitute modes while existing date, unverified, investment and representative-loan guards remain intact.
Runtime/browser: Full suite includes real stdio MCP and Streamlit AppTest at their actual levels. No real Chromium run or browser-evidence reuse claim. Independent 57-criterion spec/code-security gate and immutable exact-head evidence gate PASS. SEC-FIN-01 RED/GREEN: /opt/data/gitea-agent/repositories/jsfamily/jarca-ledger-mcp/worktrees/issue-15/verification/i15rw3-regressions/main-red-approval-binding.json and /opt/data/gitea-agent/repositories/jsfamily/jarca-ledger-mcp/worktrees/issue-15/verification/i15rw3-regressions/green-approval-binding-v2.json. Earlier primary RED file hashes refer to the preserved 31-test prefix; exact named bodies/AST remain unchanged, all final GREEN full-file hashes match the committed blobs.
Commit status: pending
Actions runs: 없음
다음 단계
Reviewer가 rework head를 새 snapshot으로 다시 검토해야 하며 이 comment는 기존 REQUEST_CHANGES를 해제하거나 승인을 의미하지 않는다.
## 구현 재작업 결과
- Source Issue: #15
- Pull Request: #16
- Source Review: #73
- Reviewed head: `bae137dce77245f1f506c2a0086101b6a067c9ab`
- Rework head: `fa51b4dbb5acee0c42e2b33394c0607256032602`
- Contract SHA-256: `347e1e9d4ef3514754f93515ccfe71d94daa880bcd4129ad3fc1989c53b0641c`
- Result: `rework_delivered`
### 지적 처리
- F-001 — `resolved`
- 분류: valid_fix
- 변경: jarca_ledger_mcp/application/settlement_draft_service.py and tests/test_settlement_draft_policy_consistency.py
- 검증: /opt/data/gitea-agent/runtime/issue15-20261009T023318Z/venv/bin/python -B -m pytest -o addopts= -p no:cacheprovider --basetemp /tmp/i15rw3-main-tests-haa4zjeo/pytest -ra -q 'tests/test_settlement_draft_policy_consistency.py::test_signed_manual_loan_totals_remain_consistent_across_close_and_reports[debts0]'; exit0; named RED exit1 /opt/data/gitea-agent/repositories/jsfamily/jarca-ledger-mcp/worktrees/issue-15/verification/i15rw3-regressions/main-red-liability-primary.json; GREEN /opt/data/gitea-agent/repositories/jsfamily/jarca-ledger-mcp/worktrees/issue-15/verification/i15rw3-regressions/green-liability-v2.json; final blob equivalence verified in /opt/data/gitea-agent/repositories/jsfamily/jarca-ledger-mcp/worktrees/issue-15/verification/i15rw3-final/independent-final-evidence-access.json
- 근거: Shared signed-loan bucket policy now agrees across review, approval, final totals, report and replay; normalized totals bind approval so historical amount approvals require a fresh review. SEC-FIN-01 has a separate named assertion RED then GREEN; completed history replay stays immutable.
- F-002 — `resolved`
- 분류: valid_fix
- 변경: jarca_ledger_mcp/application/settlement_draft_service.py and tests/test_settlement_draft_policy_consistency.py
- 검증: /opt/data/gitea-agent/runtime/issue15-20261009T023318Z/venv/bin/python -B -m pytest -o addopts= -p no:cacheprovider --basetemp /tmp/i15rw3-main-tests-w131k2vv/pytest -ra -q tests/test_settlement_draft_policy_consistency.py::test_lowercase_supported_currency_normalizes_without_mutating_frozen_evidence; exit0; named RED exit1 /opt/data/gitea-agent/repositories/jsfamily/jarca-ledger-mcp/worktrees/issue-15/verification/i15rw3-regressions/main-red-currency.json; GREEN /opt/data/gitea-agent/repositories/jsfamily/jarca-ledger-mcp/worktrees/issue-15/verification/i15rw3-regressions/green-currency-v2.json; final blob equivalence verified in /opt/data/gitea-agent/repositories/jsfamily/jarca-ledger-mcp/worktrees/issue-15/verification/i15rw3-final/independent-final-evidence-access.json
- 근거: Existing supported lowercase KRW retains authority and canonical public currency without mutating raw frozen evidence; genuine non-KRW, missing values and zero boundaries remain unchanged.
- F-003 — `resolved`
- 분류: valid_fix
- 변경: jarca_ledger_mcp/application/settlement_draft_service.py and tests/test_settlement_draft_policy_consistency.py
- 검증: /opt/data/gitea-agent/runtime/issue15-20261009T023318Z/venv/bin/python -B -m pytest -o addopts= -p no:cacheprovider --basetemp /tmp/i15rw3-main-tests-29omp2cd/pytest -ra -q tests/test_settlement_draft_policy_consistency.py::test_verified_cash_balance_can_be_explicitly_reselected_without_losing_authority; exit0; named RED exit1 /opt/data/gitea-agent/repositories/jsfamily/jarca-ledger-mcp/worktrees/issue-15/verification/i15rw3-regressions/main-red-bank-selection.json; GREEN /opt/data/gitea-agent/repositories/jsfamily/jarca-ledger-mcp/worktrees/issue-15/verification/i15rw3-regressions/green-bank-selection-v2.json; final blob equivalence verified in /opt/data/gitea-agent/repositories/jsfamily/jarca-ledger-mcp/worktrees/issue-15/verification/i15rw3-final/independent-final-evidence-access.json
- 근거: Registered supported bank balance/cash_balance can be explicitly selected in exact, carried and reasoned future substitute modes while existing date, unverified, investment and representative-loan guards remain intact.
### 최종 검증
- Local checks: /opt/data/gitea-agent/runtime/issue15-20261009T023318Z/venv/bin/python -B -m pytest -o addopts= -p no:cacheprovider --basetemp /tmp/i15rw3-final-yp9tsl52/pytest-base -ra -q tests; exit0, 431 passed, 4 skipped, 1 warning; /opt/data/gitea-agent/runtime/issue15-20261009T023318Z/venv/bin/python -B -m ruff check --no-cache .; exit0. Manifest /opt/data/gitea-agent/repositories/jsfamily/jarca-ledger-mcp/worktrees/issue-15/verification/i15rw3-final/evidence-manifest.json SHA256 e58d857d546c1cc4a75eabdcd8b41272b31db549b3c8a33b01fa076155828930; plan SHA256 c097f5a62361b332a05c9023b0e46d8081930ce04371887e27dad851c806e1f2; independently verified same-UID read access and exact immutable 164-file content. Four existing unavailable PDF samples; 435 collected, 402 baseline tests preserved and 33 ordinary additions.
- Runtime/browser: Full suite includes real stdio MCP and Streamlit AppTest at their actual levels. No real Chromium run or browser-evidence reuse claim. Independent 57-criterion spec/code-security gate and immutable exact-head evidence gate PASS. SEC-FIN-01 RED/GREEN: /opt/data/gitea-agent/repositories/jsfamily/jarca-ledger-mcp/worktrees/issue-15/verification/i15rw3-regressions/main-red-approval-binding.json and /opt/data/gitea-agent/repositories/jsfamily/jarca-ledger-mcp/worktrees/issue-15/verification/i15rw3-regressions/green-approval-binding-v2.json. Earlier primary RED file hashes refer to the preserved 31-test prefix; exact named bodies/AST remain unchanged, all final GREEN full-file hashes match the committed blobs.
- Commit status: pending
- Actions runs: 없음
### 다음 단계
Reviewer가 rework head를 새 snapshot으로 다시 검토해야 하며 이 comment는 기존 `REQUEST_CHANGES`를 해제하거나 승인을 의미하지 않는다.
<!-- gitea-agent:implementation-rework/v1 owner=jsfamily repository=jarca-ledger-mcp issue=15 pr=16 review=73 reviewed-head=bae137dce77245f1f506c2a0086101b6a067c9ab head=fa51b4dbb5acee0c42e2b33394c0607256032602 contract-sha256=347e1e9d4ef3514754f93515ccfe71d94daa880bcd4129ad3fc1989c53b0641c result-sha256=f7a8c04d0a38ce7265af45650df17129136d020ad3220df544fcc48c157bbac9 correlation=58cf3a377520a21ba121654697fe51b4d888639ef04be45f64c893c9b97a2665 -->
계약: 초안 ID, 정산 월·기준일, 상태, 생성자·생성/변경 시각, 메모, 동시 편집 버전, 생성 중복 방지 키, 최종 마감 ID 및 정정 관계를 영속 저장한다. 자료가 없어도 생성·저장할 수 있고 생성 자체로 마감 run이나 확정 금액을 만들지 않는다. 정산 월별 활성 초안은 일반/정정 구분 없이 하나로 제한하고, 완료·취소 후 새 초안을 열 수 있다. 생성 키 재시도는 같은 초안을 반환하고 다른 요청의 활성 중복은 충돌한다. 이미 마감한 기준일의 새 초안은 이전 run과 정정 사유를 연결한다. 정산 기준일은 해당 월말로 고정하며 입력한 날짜도 월말과 일치하는지 검증한다.
구현 근거: jarca_ledger_mcp/application/settlement_draft_service.py, jarca_ledger_mcp/infrastructure/sqlite/migrations.py; service 153-185, 394-396; migration 21-45; tests 54-98, 262-277; 현재 승인 계약은 동일하고 이 항목에 영향을 주는 구현/문서/test blob은 이전 검토 head와 byte-identical이다. 2개 변경 함수 및 신규 policy test의 전체 delta 영향과 현재 exact-head 생산자 실행을 별도 검증했다.
테스트 근거: tests/test_monthly_settlement_drafts.py, tests/test_settlement_draft_correction_contract.py
판정 근거: 무자료 생성은 run을 쓰지 않는다. 월말과 단일 활성 초안, 생성 재시도 및 정정 연결을 검증한다.
IN-02 — satisfied
계약: 초안의 정산 대상 계좌·자산·부채와 포함/제외 여부·사유를 관리한다. 계좌별 valuation_id, 선택 방식·사유, 선택자·시각, 항목 버전, 대체 승인 근거와 준비 상태를 저장한다. 새로운 계좌·대상 변경을 자동 반영하지 않고 명시적 대상 갱신으로만 반영하며 기존 선택과 승인에 미치는 차이를 검토한다.
구현 근거: jarca_ledger_mcp/application/settlement_draft_service.py; service 63-140, 219-258, 261-307; frozen-target and refresh tests; 현재 승인 계약은 동일하고 이 항목에 영향을 주는 구현/문서/test blob은 이전 검토 head와 byte-identical이다. 2개 변경 함수 및 신규 policy test의 전체 delta 영향과 현재 exact-head 생산자 실행을 별도 검증했다.
테스트 근거: tests/test_monthly_settlement_drafts.py, tests/test_settlement_draft_authority.py
판정 근거: 대상 동결과 명시적 갱신, 포함 및 제외 사유와 선택 감사 정보를 보존한다.
IN-03 — satisfied
계약: 기존 평가 등록·조회·정정 기능을 재사용한다. 선택한 자료의 계좌 소속, 통화, 평가 목적과 대표 부채 정의를 검증하고 계좌별 대표 합산 금액은 하나만 사용한다. 투자 원금·현금성 잔액·평가액을 중복 합산하지 않는다. 증빙/등록 중복 방지와 append-only 정정을 보존한다.
구현 근거: jarca_ledger_mcp/application/settlement_draft_service.py, jarca_ledger_mcp/application/assets_service.py, jarca_ledger_mcp/application/account_valuation_service.py; service 280-294와 assets_service 168-176을 직접 대조했다. bank 및 비투자 비부채 계좌의 balance와 cash_balance 목적을 자동 선택과 명시적 선택에서 정합화했다. 계좌 소속과 통화, 투자 목적 및 대표 부채 정의 guard는 유지된다.
테스트 근거: tests/test_settlement_draft_selection.py, tests/test_settlement_draft_contract_scenarios.py, tests/test_settlement_draft_policy_consistency.py
판정 근거: 코드 리뷰73 F-003을 현재 source와 named bank 재선택 및 세 선택방식 정상/잘못된 목적 회귀에 대조해 해소했다.
IN-04 — satisfied
계약: exact는 같은 기준일의 확인 자료, carried_before는 이전 확인 자료의 승인된 이월, manual_substitute는 특정 자료의 명시적 직접 지정이다. 자동 선택은 이후 날짜 자료를 선택하지 않는다. 수동 대체는 실제 날짜·방향을 포함한 날짜 차이·사유·승인을 보존한다. 등록일과 평가 기준일을 구분한다. 미확인 자료는 초안 선택·검토용으로 보존하되 잠정 합계의 authority 금액에 포함하지 않고 확인 필요 상태로 표시한다. 최종 합산하려면 append-only 확인/정정 자료를 사용자가 명시적으로 다시 선택하고 재검토·승인한다. 끝내 미확인인 항목은 누락/제외로 표시하고 조건부 마감 시 그 누락을 승인한다. 확인 승인을 이유로 원본 verification_status를 덮어쓰지 않는다.
구현 근거: jarca_ledger_mcp/application/settlement_draft_service.py, jarca_ledger_mcp/application/assets_service.py; service 107-125,261-307은 exact 당일, carried_before 이전 날짜, 사유 있는 특정 future manual_substitute와 verified-only authority를 유지한다. 새 policy tests117-212는 bank balance와 cash_balance의 세 방식, 미래 exact 및 사유 부재 거절, unverified NULL과 미해소 제외를 검증한다.
테스트 근거: tests/test_monthly_settlement_drafts.py, tests/test_settlement_draft_selection.py, tests/test_settlement_draft_contract_scenarios.py, tests/test_settlement_draft_policy_consistency.py
판정 근거: 지원 목적 재선택만 정합화했고 자동 미래 선택이나 미확인 금액 authority를 완화하지 않았다.
IN-05 — satisfied
계약: 초안 조회·검토·미리보기에서 대상/제외 목록, 자료 ID, 대표 금액·통화·자산/부채 분류, 실제 평가일, 선택 방식·날짜 차이, 증빙 출처·확인 상태, 선택/대체/제외 사유, 누락·승인 필요 항목, 잠정 총자산·총부채·순자산을 제공한다. 미선택 금액은 0으로 표시하지 않고 자료 완전성, 미등록 부채 및 대체 포함 여부를 명시한다.
구현 근거: jarca_ledger_mcp/application/settlement_draft_service.py, jarca_ledger_mcp/application/assets_service.py, jarca_ledger_mcp/application/monthly_settlement_service.py; service 79,108-116,131-133은 기존 통화 upper 정규화와 assets_service 516-555 공용 합계 정책을 사용한다. 새 tests29-95는 부호 혼합 수동 부채와 소문자 KRW에서 review 및 final.totals와 상위 합계와 report, timeseries와 replay의 정합성을 검증한다.
테스트 근거: tests/test_settlement_draft_contract_scenarios.py, tests/test_settlement_draft_read_models.py, tests/test_settlement_draft_policy_consistency.py
판정 근거: 코드 리뷰73 F-001과 F-002의 금액 상충 및 지원 KRW 누락이 해소됐으며 NULL과0을 혼동하지 않는다.
IN-06 — satisfied
계약: 최종 마감은 사용자가 검토한 초안 버전과 선택 증거를 고정한다. 승인 뒤 대상·선택·사유·금액/분류·경고 또는 관련 증거가 달라지면 기존 승인을 사용할 수 없다. 계좌의 현재값이나 최신 정정본으로 조용히 다시 선택하지 않는다.
구현 근거: jarca_ledger_mcp/application/settlement_draft_service.py; service 133의 검토 fingerprint에 정규화 totals가 포함되고 approve 325-333 및 finalize 351-356이 재계산 fingerprint와 버전/승인을 대조한다. 새 tests227-267은 역사적 합계 승인으로 변경된 합계를 마감하지 못하고 zero run/rows 및 active 보존 후 재승인만 성공함을 검증한다.
테스트 근거: tests/test_monthly_settlement_drafts.py, tests/test_settlement_draft_authority.py, tests/test_settlement_draft_policy_consistency.py
판정 근거: 세 금액 정책 수정에 기존 승인을 무검증 이월하지 않는다. 이 판단은 현재 immutable source와 exact-head full suite에 포함된 named regression 근거이며 별도 중간 RED source의 검증을 주장하지 않는다.
IN-07 — satisfied
계약: 초안 최종 상태 전이, 연결된 asset_snapshot_runs 및 asset_snapshots 저장을 하나의 트랜잭션으로 처리한다. 중복 클릭/동일 요청 재시도는 같은 마감을 반환하고 다른 payload의 키 재사용은 충돌한다. 실패 시 부분 마감과 완료 초안이 남지 않는다.
구현 근거: jarca_ledger_mcp/application/settlement_draft_service.py; finalize 342-350의 저장 응답 replay가 재검토보다 먼저이고 369-388의 run/row/completion 원자 저장은 변경되지 않았다. 새 tests29-67와270-290은 정확한 final_response/replay와 완료 이력의 재해석 금지를 검증한다.
테스트 근거: tests/test_monthly_settlement_drafts.py, tests/test_settlement_draft_contract_scenarios.py, tests/test_settlement_draft_policy_consistency.py
판정 근거: 신규 승인에는 수정된 totals가 적용되지만 과거 완료 마감은 재계산하거나 덮어쓰지 않는다.
IN-08 — satisfied
계약: 원본 초안 ID·버전, 월·기준일, 적용 자료/금액/통화/분류, 실제 날짜·선택 방식·날짜 차이, 증빙/확인 상태, 포함·제외·대체 사유, 승인자·시각·근거와 누락/경고를 마감 이력에 보존한다. 완전한 exact 마감, 이월·대체 포함, 승인된 누락을 별도로 식별한다. 대체 사용과 누락은 하나의 모호한 상태로 합치지 않는다.
구현 근거: jarca_ledger_mcp/application/settlement_draft_service.py, jarca_ledger_mcp/application/assets_service.py, jarca_ledger_mcp/application/monthly_settlement_service.py; service 75의 raw evidence_json 제거,79의 public 통화 정규화,83-86의 원본 state_hash/drift 비교,365-388의 적용 evidence와 승인 저장을 직접 확인했다. 새 tests69-95는 raw frozen currency가 krw 그대로인 반면 public authority만KRW이고 저장 응답과 replay가 일치함을 검증한다.
테스트 근거: tests/test_settlement_draft_contract_scenarios.py, tests/test_settlement_draft_read_models.py, tests/test_settlement_draft_audit_reproductions.py, tests/test_settlement_draft_policy_consistency.py
판정 근거: 원본 값/날짜/분류/출처와 불변 증거를 변조하지 않고 기존 amount/currency 의미를 복원했다.
IN-09 — satisfied
계약: 초안에서 선택 자료에 정정본이 생기면 검토 필요를 표시하고 사용자가 교체 여부를 결정한다. 확정 마감은 이후 평가 등록·정정으로 변경하지 않는다. 명시적 정정 초안과 사유로 새 마감을 이전 run에 연결하며 이전 기록을 보존한다.
구현 근거: jarca_ledger_mcp/application/settlement_draft_service.py, jarca_ledger_mcp/application/assets_service.py; 완료 마감은 finalize 343-350에서 저장 final_response로 반환한다. 새 completed_close_replay test는 _review를 호출하면 실패하도록 patch해 replay가 기존 응답을 반환함을 검증한다. 정정 child/원본 drift guard 및 correction parent check는 이전과 동일하다.
테스트 근거: tests/test_settlement_draft_authority.py, tests/test_settlement_draft_correction_contract.py, tests/test_settlement_draft_policy_consistency.py
판정 근거: 현재 합계 정책 변경으로 과거 완료 이력을 소급 계산하지 않는다. 정정과 취소/기존 증거 보존 계약은 유지된다.
IN-10 — satisfied
계약: 기존 수동 자산·부채도 대상과 합계에 포함한다. 검토 당시의 값·날짜·분류·출처를 증거로 고정하고 원본 변경을 drift로 검출한다. 갱신하려면 명시적 재검토를 거치며 마감 때 live 값을 몰래 재사용하지 않는다. 수동 자료의 자동 날짜 선택은 기존 exact/as_of 제한을 유지한다.
구현 근거: jarca_ledger_mcp/application/settlement_draft_service.py, jarca_ledger_mcp/application/assets_service.py; service 79,131-133과 assets_service 237-270,516-555를 비교해 기존 manual signed-loan bucket 절대 합계와 currency upper 정책을 재사용함을 확인했다. tests29-95 및152-164는 원본 manual row와 frozen evidence 불변, 실제 비KRW 제외, NULL과0, 합계와 읽기 모델 정합성을 검증한다.
테스트 근거: tests/test_monthly_settlement_drafts.py, tests/test_settlement_draft_authority.py, tests/test_settlement_draft_policy_consistency.py
판정 근거: 코드 리뷰73 F-001/F-002를 실제 승인 계약에 대응했다. 새 FX 또는 부채 정책을 만들지 않고 기존 동작을 새 초안 경로에 일치시켰다.
IN-11 — satisfied
계약: Dashboard에서 생성·목록·상세·저장·취소, 계좌 자료 조회·등록·지정·해제, 포함/제외 및 사유 수정, 검토·승인·최종 마감, 확정 조회·정정 초안 생성을 제공한다. MCP도 같은 작업을 공통 application service로 제공한다.
구현 근거: jarca_ledger_mcp/application/settlement_draft_service.py, jarca_ledger_mcp/service.py, jarca_ledger_mcp/adapters/mcp/server.py, jarca_ledger_mcp/adapters/mcp/tool_contracts.py, jarca_ledger_mcp/adapters/streamlit/settlement_gateway.py, dashboard/page_views/settlement_drafts.py, dashboard/page_views/assets.py, dashboard/page_views/monthly_settlement.py; shared application entrypoints, thin MCP and Streamlit gateway, explicit panel actions; adapter and real MCP stdio tests; 현재 재작업은 service 79,131-133,285의 공유 통화/합계/선택 목적 및 승인 fingerprint 정합화이고 실제 public signature와 상태/원자 저장/읽기 adapter는 보존했다. 해당 구현 영향과 새 policy regression 및 변경 없는 정본 문서를 직접 대조했다.
테스트 근거: tests/test_settlement_draft_adapters.py, tests/test_settlement_draft_mcp_runtime.py, tests/test_settlement_draft_dashboard.py, tests/test_settlement_draft_panel_workflow.py, tests/test_settlement_draft_panel_feedback.py, tests/test_settlement_draft_liability_registration.py, tests/test_settlement_draft_policy_consistency.py
판정 근거: UI와 MCP는 공통 application에 위임한다. 자료 등록과 지정 및 해제, 저장과 취소, 검토와 승인 및 마감, 확정 조회와 정정 생성 경로를 제공한다.
IN-12 — satisfied
계약: 합성 자료로 원본 수락 기준을 검증한다. 특히 2026-09 초안에 2026-10-05/07 자료 직접 지정, 늦게 등록한 2026-09-30 자료의 exact 구분, 자동 미래 선택 금지, 승인 후 변경 차단, 정정·동시 편집·재시도·트랜잭션 실패와 기존 API/마이그레이션 회귀를 포함한다.
구현 근거: jarca_ledger_mcp/application/settlement_draft_service.py, jarca_ledger_mcp/application/assets_service.py, jarca_ledger_mcp/infrastructure/sqlite/migrations.py, jarca_ledger_mcp/application/monthly_settlement_service.py; canonical i15rw3-final source가 현재 검토 head와 일치한다. 164개 file의 blob과SHA256 및 manifest/plan, 실제 argv/exit/output을 독립 대조했다. 생산자 431 passed,4 skipped,1 warning 및 lint exit0; canonical collection402에서435로33개 새 policy case만 추가됐다. 기존ID/skip/xfail과 기존 test 파일은 전부 보존됐다.
테스트 근거: tests/test_monthly_settlement_drafts.py, tests/test_settlement_draft_contract_scenarios.py, tests/test_settlement_draft_authority.py, tests/test_settlement_draft_selection.py, tests/test_settlement_draft_correction_contract.py, tests/test_ledger_categories.py, tests/test_review_decision_workbench.py, tests/test_settlement_draft_policy_consistency.py
판정 근거: Reviewer는 제품 코드를 실행하지 않았다. F-001~003의 기존 runtime RED assertion 및 현재 구현/정확한 test scope GREEN을 읽기 전용 검증했다. 별도 approval-binding intermediate RED는 source equivalence를 확증하지 못해 채택하지 않았다. 현재 final-head 역사 승인 거절 test와 full suite는 독립 결속됐다. CI success와 실제 Chromium run은 인증하지 않는다.
EX-01 — satisfied
계약: 거래 분류 완료 보장, 실제 월말 평가액 역산, 투자 성과 추정, 자산 증감을 수입·지출/투자 수익 거래로 자동 생성하는 기능.
구현 근거: jarca_ledger_mcp/application/settlement_draft_service.py, jarca_ledger_mcp/application/assets_service.py, jarca_ledger_mcp/application/monthly_settlement_service.py; exact base-to-head 38-file scope review and immutable source; no transaction insert or external price call introduced; 현재 승인 계약은 동일하고 이 항목에 영향을 주는 구현/문서/test blob은 이전 검토 head와 byte-identical이다. 2개 변경 함수 및 신규 policy test의 전체 delta 영향과 현재 exact-head 생산자 실행을 별도 검증했다.
테스트 근거: tests/test_settlement_draft_contract_scenarios.py, tests/test_settlement_draft_authority.py, tests/test_settlement_draft_correction_contract.py
판정 근거: 제외된 가격 및 FX, 자동 승인, 거래 생성, 기존 이력 삭제, 인증과 메뉴 재설계는 추가하지 않았다. Discovery 단계 제한은 후속 구현 PR 생성 금지가 아니다.
EX-02 — satisfied
계약: 외부 가격 API, 새 환율 변환 정책, 자동 승인, 실제 계좌번호·금융자료·credential을 문서나 fixture에 저장하는 작업.
구현 근거: jarca_ledger_mcp/application/settlement_draft_service.py, jarca_ledger_mcp/application/assets_service.py, jarca_ledger_mcp/application/monthly_settlement_service.py; exact base-to-head 38-file scope review and immutable source; no transaction insert or external price call introduced; 현재 승인 계약은 동일하고 이 항목에 영향을 주는 구현/문서/test blob은 이전 검토 head와 byte-identical이다. 2개 변경 함수 및 신규 policy test의 전체 delta 영향과 현재 exact-head 생산자 실행을 별도 검증했다.
테스트 근거: tests/test_settlement_draft_contract_scenarios.py, tests/test_settlement_draft_authority.py, tests/test_settlement_draft_correction_contract.py
판정 근거: 제외된 가격 및 FX, 자동 승인, 거래 생성, 기존 이력 삭제, 인증과 메뉴 재설계는 추가하지 않았다. Discovery 단계 제한은 후속 구현 PR 생성 금지가 아니다.
EX-03 — satisfied
계약: Dashboard 인증·쿠키/logout 또는 메뉴 순서 재설계, MCP 인증의 신규 도입.
구현 근거: jarca_ledger_mcp/application/settlement_draft_service.py, jarca_ledger_mcp/application/assets_service.py, jarca_ledger_mcp/application/monthly_settlement_service.py; exact base-to-head 38-file scope review and immutable source; no transaction insert or external price call introduced; 현재 승인 계약은 동일하고 이 항목에 영향을 주는 구현/문서/test blob은 이전 검토 head와 byte-identical이다. 2개 변경 함수 및 신규 policy test의 전체 delta 영향과 현재 exact-head 생산자 실행을 별도 검증했다.
테스트 근거: tests/test_settlement_draft_contract_scenarios.py, tests/test_settlement_draft_authority.py, tests/test_settlement_draft_correction_contract.py
판정 근거: 제외된 가격 및 FX, 자동 승인, 거래 생성, 기존 이력 삭제, 인증과 메뉴 재설계는 추가하지 않았다. Discovery 단계 제한은 후속 구현 PR 생성 금지가 아니다.
EX-04 — satisfied
계약: 초안 취소에 따른 원본 평가·마감 이력 삭제, 기존 마감 덮어쓰기, 원본 평가일 소급 변경.
구현 근거: jarca_ledger_mcp/application/settlement_draft_service.py, jarca_ledger_mcp/application/assets_service.py, jarca_ledger_mcp/application/monthly_settlement_service.py; exact base-to-head 38-file scope review and immutable source; no transaction insert or external price call introduced; 현재 승인 계약은 동일하고 이 항목에 영향을 주는 구현/문서/test blob은 이전 검토 head와 byte-identical이다. 2개 변경 함수 및 신규 policy test의 전체 delta 영향과 현재 exact-head 생산자 실행을 별도 검증했다.
테스트 근거: tests/test_settlement_draft_contract_scenarios.py, tests/test_settlement_draft_authority.py, tests/test_settlement_draft_correction_contract.py
판정 근거: 제외된 가격 및 FX, 자동 승인, 거래 생성, 기존 이력 삭제, 인증과 메뉴 재설계는 추가하지 않았다. Discovery 단계 제한은 후속 구현 PR 생성 금지가 아니다.
EX-05 — satisfied
계약: 정산 월의 월말과 다른 기준일, 같은 월의 복수 활성 초안, 미확인 자료의 단순 사용 승인만으로 금액을 최종 합산하는 경로.
구현 근거: jarca_ledger_mcp/application/settlement_draft_service.py, jarca_ledger_mcp/application/assets_service.py, jarca_ledger_mcp/application/monthly_settlement_service.py; exact base-to-head 38-file scope review and immutable source; no transaction insert or external price call introduced; 현재 승인 계약은 동일하고 이 항목에 영향을 주는 구현/문서/test blob은 이전 검토 head와 byte-identical이다. 2개 변경 함수 및 신규 policy test의 전체 delta 영향과 현재 exact-head 생산자 실행을 별도 검증했다.
테스트 근거: tests/test_settlement_draft_contract_scenarios.py, tests/test_settlement_draft_authority.py, tests/test_settlement_draft_correction_contract.py
판정 근거: 제외된 가격 및 FX, 자동 승인, 거래 생성, 기존 이력 삭제, 인증과 메뉴 재설계는 추가하지 않았다. Discovery 단계 제한은 후속 구현 PR 생성 금지가 아니다.
EX-06 — satisfied
계약: Discovery 단계의 제품 코드·요구사항명세서·설계문서 작성 또는 수정, PR/브랜치 생성. 아래 산출물은 후속 구현 시의 문서 계약이다.
구현 근거: jarca_ledger_mcp/application/settlement_draft_service.py, jarca_ledger_mcp/application/assets_service.py, jarca_ledger_mcp/application/monthly_settlement_service.py; exact base-to-head 38-file scope review and immutable source; no transaction insert or external price call introduced; 현재 승인 계약은 동일하고 이 항목에 영향을 주는 구현/문서/test blob은 이전 검토 head와 byte-identical이다. 2개 변경 함수 및 신규 policy test의 전체 delta 영향과 현재 exact-head 생산자 실행을 별도 검증했다.
테스트 근거: tests/test_settlement_draft_contract_scenarios.py, tests/test_settlement_draft_authority.py, tests/test_settlement_draft_correction_contract.py
판정 근거: 제외된 가격 및 FX, 자동 승인, 거래 생성, 기존 이력 삭제, 인증과 메뉴 재설계는 추가하지 않았다. Discovery 단계 제한은 후속 구현 PR 생성 금지가 아니다.
CON-01 — satisfied
계약: 조사 기준은 main의 고정 revision 68212e773b94dd89b6c036e6616759542c178de3이다. Gitea authoritative SHA와 갱신한 bare cache의 local ref를 비교했다.
구현 근거: docs/requirements/req-003_account-valuation-history.md; pinned base and default branch 68212e773b94dd89b6c036e6616759542c178de3; 현재 승인 계약은 동일하고 이 항목에 영향을 주는 구현/문서/test blob은 이전 검토 head와 byte-identical이다. 2개 변경 함수 및 신규 policy test의 전체 delta 영향과 현재 exact-head 생산자 실행을 별도 검증했다.
테스트 근거: tests/test_monthly_settlement_drafts.py
판정 근거: authoritative API와 cache base SHA 일치를 확인했다.
CON-02 — satisfied
계약: SQLite schema 12에서 additive migration하며 기존 테이블·행·이력·인덱스의 의미를 보존한다. 실제 새 스키마 버전 및 물리 필드는 구현 결과와 함께 문서화하고 기존 자료를 추정 이주하지 않는다.
구현 근거: jarca_ledger_mcp/infrastructure/sqlite/migrations.py, jarca_ledger_mcp/infrastructure/sqlite/schema.py, docs/data-model.md; migrate_db 19-45, 120-147, 198; schema13 idempotency test 249-260 and schema11 preservation regression; exact-head source delta; 현재 승인 계약은 동일하고 이 항목에 영향을 주는 구현/문서/test blob은 이전 검토 head와 byte-identical이다. 2개 변경 함수 및 신규 policy test의 전체 delta 영향과 현재 exact-head 생산자 실행을 별도 검증했다.
테스트 근거: tests/test_monthly_settlement_drafts.py, tests/test_issue_12_regressions.py, tests/test_account_valuations.py
판정 근거: 신규 테이블과 run lineage 컬럼만 additive하게 확장하며 기존 rows와 인덱스를 삭제하지 않는다. schema12 입력의 별도 실행은 없으나 공통 무조건 additive DDL과 기존 이력 및 반복 초기화 회귀를 함께 검토했다.
CON-03 — satisfied
계약: 기존 자동 exact/as_of와 기존 직접 마감의 호출/응답 계약을 유지한다. 미래 사용 예외는 직접 지정·검토·승인된 초안 마감에 한정하며 자동 선택 계약을 전역 완화하지 않는다. 기존 직접 마감이 초안의 승인·변경 검증을 우회해 선택 자료를 대신 확정하는 경로를 만들지 않는다.
구현 근거: jarca_ledger_mcp/application/settlement_draft_service.py, jarca_ledger_mcp/application/assets_service.py; existing automatic selector and direct close retained; draft finalize 338-391 does not use live direct-close shortcut; 현재 재작업은 service 79,131-133,285의 공유 통화/합계/선택 목적 및 승인 fingerprint 정합화이고 실제 public signature와 상태/원자 저장/읽기 adapter는 보존했다. 해당 구현 영향과 새 policy regression 및 변경 없는 정본 문서를 직접 대조했다.
테스트 근거: tests/test_settlement_draft_selection.py, tests/test_settlement_draft_legacy_shapes.py, tests/test_contract_regression.py, tests/test_settlement_draft_policy_consistency.py
판정 근거: 기존 exact와 as_of 및 직접 마감의 envelope와 선택 의미를 보존한다.
CON-04 — satisfied
계약: rejected/unknown 날짜, 잘못된 계좌·통화·목적·대표 부채 정의와 모호한 대표 선택은 승인만으로 정상 자료가 되지 않는다. 미확인 자료는 초안에서 선택·검토할 수 있지만 미확인 금액 자체를 승인으로 합산하지 않는다. 최종 합산 전 append-only 확인/정정 자료를 명시적으로 다시 선택하고 재검토·승인해야 한다. 미확인으로 남으면 누락/제외와 그 누락에 대한 조건부 승인만 허용한다.
구현 근거: jarca_ledger_mcp/application/settlement_draft_service.py; service 280-294의 소속/통화/목적/대표 부채/상태/날짜/정정 guard와107-125의 확인 전 authority NULL을 유지한다. 새 invalid_date_or_missing_reason, unverified_bank 및 purpose/representative_liability tests에서 실패/no-write를 확인했다.
테스트 근거: tests/test_settlement_draft_selection.py, tests/test_settlement_draft_authority.py, tests/test_settlement_draft_contract_scenarios.py, tests/test_settlement_draft_policy_consistency.py
판정 근거: cash_balance 인정은 기존 지원 목적의 정합화다. 미확인/잘못된 자료가 승인만으로 권한 금액이 되지 않는다.
CON-05 — satisfied
계약: 정수 금액의 정확도와 NULL/0 구분, 순자산의 자산−부채 계산, KRW 중심 기존 정책을 유지한다. FX 정책 없는 비KRW 금액은 단순 합산하지 않고 제외/경고를 표시한다.
구현 근거: jarca_ledger_mcp/application/settlement_draft_service.py, jarca_ledger_mcp/application/assets_service.py; service 79,131-133이 assets_service 516-555의 정수/bucket/총부채 absolute aggregate와 자산-부채 계산 및237의 KRW upper 정책을 공유한다. 새 tests는 부채 부호 혼합, KRW/krw/USD/공백 통화, NULL/0과 strict account amount 거절을 정상/경계/실패로 검증한다.
테스트 근거: tests/test_settlement_draft_contract_scenarios.py, tests/test_settlement_draft_policy_consistency.py
판정 근거: 세 기존 정책 상충을 고쳤고 새 FX 변환이나 금액 자료 추정을 하지 않았다. 431 passed 보고를 reviewer 실행이나 금융 현실 검증으로 표현하지 않는다.
CON-06 — satisfied
계약: carried_before는 초안의 이전 자료 선택 의미이고 기존 public as_of를 제거하거나 이름을 바꾸지 않는다. 기존 age_days의 의미를 변경하지 않고 수동 미래 자료의 방향 있는 날짜 차이 계약을 별도로 명확히 한다.
구현 근거: jarca_ledger_mcp/application/settlement_draft_service.py, jarca_ledger_mcp/application/assets_service.py, docs/interface-contract.md; review date fields and scenario 32-54; existing as_of API unchanged; 현재 승인 계약은 동일하고 이 항목에 영향을 주는 구현/문서/test blob은 이전 검토 head와 byte-identical이다. 2개 변경 함수 및 신규 policy test의 전체 delta 영향과 현재 exact-head 생산자 실행을 별도 검증했다.
테스트 근거: tests/test_settlement_draft_contract_scenarios.py, tests/test_settlement_draft_selection.py
판정 근거: 공개 as_of와 age_days의 방향을 유지하고 새 날짜 차이 field를 별도로 제공한다.
CON-07 — satisfied
계약: get_monthly_settlement_summary()와 기존 preview/report/render는 읽기 전용을 유지한다. 새 초안 mutation은 명시적 버튼·도구 호출로만 수행한다. missing DB 조회는 기존 db_not_initialized/no-create 계약을 유지한다.
구현 근거: jarca_ledger_mcp/application/settlement_draft_service.py, jarca_ledger_mcp/application/monthly_settlement_service.py, jarca_ledger_mcp/infrastructure/sqlite/connection.py; review 310-316 uses read_db; monthly existing read_db path and explicit new read helpers; missing DB cases; 현재 승인 계약은 동일하고 이 항목에 영향을 주는 구현/문서/test blob은 이전 검토 head와 byte-identical이다. 2개 변경 함수 및 신규 policy test의 전체 delta 영향과 현재 exact-head 생산자 실행을 별도 검증했다.
테스트 근거: tests/test_monthly_settlement_drafts.py, tests/test_service.py, tests/test_settlement_draft_adapters.py
판정 근거: 읽기 전용 연결과 missing DB no-create를 보존한다. 새로운 mutation은 명시적 action에서만 실행된다.
CON-08 — satisfied
계약: Dashboard auth-before-DB, 기존 성공/오류 envelope, 기존 MCP transport와 application → SQLite 의존 방향을 유지한다. 업무 검증·선택·마감은 UI/MCP에서 중복 구현하지 않는다.
구현 근거: jarca_ledger_mcp/application/settlement_draft_service.py, dashboard/app.py, dashboard/page_views/settlement_drafts.py, jarca_ledger_mcp/adapters/mcp/server.py; existing app auth guard before protected page and shared service transport delegation; 현재 재작업은 service 79,131-133,285의 공유 통화/합계/선택 목적 및 승인 fingerprint 정합화이고 실제 public signature와 상태/원자 저장/읽기 adapter는 보존했다. 해당 구현 영향과 새 policy regression 및 변경 없는 정본 문서를 직접 대조했다.
테스트 근거: tests/test_dashboard_app.py, tests/test_settlement_draft_mcp_runtime.py, tests/test_settlement_draft_dashboard.py, tests/test_settlement_draft_policy_consistency.py
판정 근거: 인증 이후 DB 접근과 기존 transport 및 오류 envelope를 보존하고 UI에 SQL 업무 검증을 추가하지 않았다.
CON-09 — satisfied
계약: 거래 import/분류/대사가 미완료라는 이유만으로 평가 등록과 자산 마감을 막지 않는다. 거래 준비 상태와 자산 마감 상태를 별도로 표시한다.
구현 근거: jarca_ledger_mcp/application/settlement_draft_service.py, jarca_ledger_mcp/application/monthly_settlement_service.py; contract scenario 97-117 and monthly summary asset-state propagation; 현재 승인 계약은 동일하고 이 항목에 영향을 주는 구현/문서/test blob은 이전 검토 head와 byte-identical이다. 2개 변경 함수 및 신규 policy test의 전체 delta 영향과 현재 exact-head 생산자 실행을 별도 검증했다.
테스트 근거: tests/test_settlement_draft_contract_scenarios.py
판정 근거: 거래 미정리 blocker를 남겨도 자산 초안 승인과 마감은 가능하며 거래 rows는 그대로다.
CON-10 — satisfied
계약: 월별 단일 활성 초안·월말 기준일·미확인 금액 제외 정책을 생성/편집/검토/최종화 및 모든 후속 문서에 동일하게 적용한다. 활성 초안 중복은 일반/정정 구분으로 우회하지 않으며 취소는 증빙이나 기존 마감을 삭제하지 않는다. 사용자 선택은 제품 구현/시험 완료의 증거가 아니다.
구현 근거: jarca_ledger_mcp/application/settlement_draft_service.py, jarca_ledger_mcp/infrastructure/sqlite/migrations.py, docs/requirements/req-003_account-valuation-history.md, docs/data-model.md, docs/interface-contract.md, docs/project-structure.md, docs/runtime-flow.md; all layer single active month, fixed month-end and verified authority policy inspection; 현재 승인 계약은 동일하고 이 항목에 영향을 주는 구현/문서/test blob은 이전 검토 head와 byte-identical이다. 2개 변경 함수 및 신규 policy test의 전체 delta 영향과 현재 exact-head 생산자 실행을 별도 검증했다.
테스트 근거: tests/test_monthly_settlement_drafts.py, tests/test_settlement_draft_correction_contract.py, tests/test_settlement_draft_contract_scenarios.py
판정 근거: 월별 단일 active, 월말 고정, 미확인 금액 제외 및 child 재선택 정책의 모든 layer 소유권과 문서 전파를 확인했다. 이전 두 설계문서 누락도 현재 추가된 섹션에서 해소됐다.
DEC-01 — satisfied
계약: 자료 확보 전 영속 초안을 만들고 계좌별 자료를 순차적으로 채우는 흐름이 필요하다. 조건부 마감을 초안처럼 반복 생성하는 것으로 대체하지 않는다.
구현 근거: jarca_ledger_mcp/application/settlement_draft_service.py, jarca_ledger_mcp/infrastructure/sqlite/migrations.py; service 153-185, 394-396; migration 21-45; tests 54-98, 262-277; 현재 승인 계약은 동일하고 이 항목에 영향을 주는 구현/문서/test blob은 이전 검토 head와 byte-identical이다. 2개 변경 함수 및 신규 policy test의 전체 delta 영향과 현재 exact-head 생산자 실행을 별도 검증했다.
테스트 근거: tests/test_monthly_settlement_drafts.py, tests/test_settlement_draft_correction_contract.py
판정 근거: 무자료 생성은 run을 쓰지 않는다. 월말과 단일 활성 초안, 생성 재시도 및 정정 연결을 검증한다.
DEC-02 — satisfied
계약: 기준일 이후 자료는 사용자가 특정 평가를 직접 지정하고 이유 및 최종 승인을 남긴 경우에만 허용한다. 원본 기준일은 그대로 두고 “정확한 월말 평가액”으로 표시하지 않는다.
구현 근거: jarca_ledger_mcp/application/settlement_draft_service.py, jarca_ledger_mcp/application/assets_service.py; service 93-140, 261-307; tests 136-175; contract scenario 76-94; 현재 승인 계약은 동일하고 이 항목에 영향을 주는 구현/문서/test blob은 이전 검토 head와 byte-identical이다. 2개 변경 함수 및 신규 policy test의 전체 delta 영향과 현재 exact-head 생산자 실행을 별도 검증했다.
테스트 근거: tests/test_monthly_settlement_drafts.py, tests/test_settlement_draft_selection.py, tests/test_settlement_draft_contract_scenarios.py
판정 근거: 자동 미래 선택은 금지하고 직접 지정의 실제 날짜와 사유를 보존한다. 미확인 금액은 authority에서 제외하며 확인 child는 재선택한다.
DEC-03 — satisfied
계약: 승인은 검토한 초안 버전/증거에 결합하며 변경 후 재검토·재승인이 필요하다. 마감은 선택한 자료와 적용 금액을 불변 증거로 저장한다.
구현 근거: jarca_ledger_mcp/application/settlement_draft_service.py; service 133에서 totals를 private fingerprint에 결합하고 승인/최종화의 동일 fingerprint guard가 적용된다. tests227-290은 historical approval 거절과 재검토/재승인, completed stored-response replay를 구분한다.
테스트 근거: tests/test_monthly_settlement_drafts.py, tests/test_settlement_draft_authority.py, tests/test_settlement_draft_policy_consistency.py
계약: 취소·정정은 원본 증빙과 이전 마감을 보존한다. 정정본은 자동 교체하지 않고 정정 마감은 새 run으로 연결한다.
구현 근거: jarca_ledger_mcp/application/settlement_draft_service.py, jarca_ledger_mcp/application/assets_service.py; service 63-91, 153-170, 352-369; authority and correction-parent tests; 현재 승인 계약은 동일하고 이 항목에 영향을 주는 구현/문서/test blob은 이전 검토 head와 byte-identical이다. 2개 변경 함수 및 신규 policy test의 전체 delta 영향과 현재 exact-head 생산자 실행을 별도 검증했다.
테스트 근거: tests/test_settlement_draft_authority.py, tests/test_settlement_draft_correction_contract.py
판정 근거: 정정 child는 검토 필요로 표시하고 자동 교체하지 않는다. 새 정정 run은 이전 run에 연결하며 기존 마감은 불변이다.
DEC-05 — satisfied
계약: 기존 계좌 이력, 자동 exact/as_of, 수동 자산·부채와 Dashboard/MCP 공통 서비스 경계를 유지한다. 거래 정산과 자산 마감은 분리한다.
구현 근거: jarca_ledger_mcp/application/settlement_draft_service.py, jarca_ledger_mcp/service.py, jarca_ledger_mcp/adapters/mcp/server.py, jarca_ledger_mcp/adapters/mcp/tool_contracts.py, jarca_ledger_mcp/adapters/streamlit/settlement_gateway.py, dashboard/page_views/settlement_drafts.py, dashboard/page_views/assets.py, dashboard/page_views/monthly_settlement.py; shared application entrypoints, thin MCP and Streamlit gateway, explicit panel actions; adapter and real MCP stdio tests; 현재 재작업은 service 79,131-133,285의 공유 통화/합계/선택 목적 및 승인 fingerprint 정합화이고 실제 public signature와 상태/원자 저장/읽기 adapter는 보존했다. 해당 구현 영향과 새 policy regression 및 변경 없는 정본 문서를 직접 대조했다.
테스트 근거: tests/test_settlement_draft_adapters.py, tests/test_settlement_draft_mcp_runtime.py, tests/test_settlement_draft_dashboard.py, tests/test_settlement_draft_panel_workflow.py, tests/test_settlement_draft_panel_feedback.py, tests/test_settlement_draft_liability_registration.py, tests/test_settlement_draft_policy_consistency.py
판정 근거: UI와 MCP는 공통 application에 위임한다. 자료 등록과 지정 및 해제, 저장과 취소, 검토와 승인 및 마감, 확정 조회와 정정 생성 경로를 제공한다.
DEC-06 — satisfied
계약: 문서 분류는 기존 계좌 평가·자산 마감 기능과 월정산 propagation의 동작/정책 확장이므로 기존 REQ-003을 갱신한다. 새 테이블/초안 lifecycle의 추가나 기존 문서의 제외 범위만으로 별도 ID를 만들지 않는다. 이는 문서 배치 판정이며 OQ의 제품 정책을 결정하지 않는다.
구현 근거: jarca_ledger_mcp/application/settlement_draft_service.py, jarca_ledger_mcp/infrastructure/sqlite/migrations.py, docs/requirements/req-003_account-valuation-history.md; service 153-185, 394-396; migration 21-45; tests 54-98, 262-277; 현재 승인 계약은 동일하고 이 항목에 영향을 주는 구현/문서/test blob은 이전 검토 head와 byte-identical이다. 2개 변경 함수 및 신규 policy test의 전체 delta 영향과 현재 exact-head 생산자 실행을 별도 검증했다.
테스트 근거: tests/test_monthly_settlement_drafts.py, tests/test_settlement_draft_correction_contract.py
판정 근거: 무자료 생성은 run을 쓰지 않는다. 월말과 단일 활성 초안, 생성 재시도 및 정정 연결을 검증한다.
DEC-07 — satisfied
계약: 사용자 선택 — 활성 초안: 정산 월마다 활성 초안을 하나만 허용한다. 일반/정정 초안을 같은 제한으로 관리하고 완료·취소 후 새 초안을 열 수 있다. 이미 마감한 기준일의 새 초안은 이전 run과 정정 사유를 연결하며, 동일 키 재시도는 기존 초안을 반환하고 다른 요청의 중복 생성은 충돌한다.
구현 근거: jarca_ledger_mcp/application/settlement_draft_service.py, jarca_ledger_mcp/infrastructure/sqlite/migrations.py; service 153-185, 394-396; migration 21-45; tests 54-98, 262-277; 현재 승인 계약은 동일하고 이 항목에 영향을 주는 구현/문서/test blob은 이전 검토 head와 byte-identical이다. 2개 변경 함수 및 신규 policy test의 전체 delta 영향과 현재 exact-head 생산자 실행을 별도 검증했다.
테스트 근거: tests/test_monthly_settlement_drafts.py, tests/test_settlement_draft_correction_contract.py
판정 근거: 무자료 생성은 run을 쓰지 않는다. 월말과 단일 활성 초안, 생성 재시도 및 정정 연결을 검증한다.
DEC-08 — satisfied
계약: 사용자 선택 — 정산 기준일: 정산 기준일은 정산 월의 마지막 날짜로 고정한다. 사용자가 입력했다면 월말과 일치하는지 검증하고 월정산 summary의 현재 월말 읽기 의미를 유지한다.
구현 근거: jarca_ledger_mcp/application/settlement_draft_service.py, jarca_ledger_mcp/infrastructure/sqlite/migrations.py; service 153-185, 394-396; migration 21-45; tests 54-98, 262-277; 현재 승인 계약은 동일하고 이 항목에 영향을 주는 구현/문서/test blob은 이전 검토 head와 byte-identical이다. 2개 변경 함수 및 신규 policy test의 전체 delta 영향과 현재 exact-head 생산자 실행을 별도 검증했다.
테스트 근거: tests/test_monthly_settlement_drafts.py, tests/test_settlement_draft_correction_contract.py
판정 근거: 무자료 생성은 run을 쓰지 않는다. 월말과 단일 활성 초안, 생성 재시도 및 정정 연결을 검증한다.
DEC-09 — satisfied
계약: 사용자 선택 — 미확인 자료: 미확인 자료는 초안에서 선택·검토할 수 있으나 최종 금액에 반영하려면 append-only 확인/정정 자료를 명시적으로 다시 선택하고 재검토·승인해야 한다. 끝내 확인되지 않은 항목은 누락/제외로 표시하고 조건부 마감 시 그 누락을 승인한다. 기존 verified authority를 유지한다.
구현 근거: jarca_ledger_mcp/application/settlement_draft_service.py, jarca_ledger_mcp/application/assets_service.py; service 93-140, 261-307; tests 136-175; contract scenario 76-94; 현재 승인 계약은 동일하고 이 항목에 영향을 주는 구현/문서/test blob은 이전 검토 head와 byte-identical이다. 2개 변경 함수 및 신규 policy test의 전체 delta 영향과 현재 exact-head 생산자 실행을 별도 검증했다.
테스트 근거: tests/test_monthly_settlement_drafts.py, tests/test_settlement_draft_selection.py, tests/test_settlement_draft_contract_scenarios.py
판정 근거: 자동 미래 선택은 금지하고 직접 지정의 실제 날짜와 사유를 보존한다. 미확인 금액은 authority에서 제외하며 확인 child는 재선택한다.
DOC-REQ-structural — satisfied
계약: - 조치: 갱신 - 경로: docs/requirements/req-003_account-valuation-history.md - 문서 ID: REQ-003 - 제목: 계좌 기준일 평가 이력과 자산 마감 연동 - 변경 내용: 기존 ID·파일명·제목을 유지하고 초안 생성/편집/취소, 계좌별 직접 지정, 날짜 차이와 대체 승인, 대상 갱신, 검토 버전/fingerprint, 최종화·정정 초안 및 공통 adapter 요구사항/인수 기준을 추가한다. 미래 제외 규칙을 자동/직접 마감과 승인된 초안 예외로 분리한다. 월별 단일 활성 초안과 월말 기준일 검증을 추가하고 미확인 선택·검토는 허용하되 확인/정정 자료의 명시적 재선택·재검토·승인 전 금액 합산을 금지한다. 미확인으로 남은 항목은 누락/제외 및 조건부 누락 승인으로 처리한다. 기존 append-only, 정수/NULL, 대표 부채, no-fake-transaction, auth/menu·읽기 전용 계약을 유지한다. revision과 변경 이력을 갱신하고 기존 12/13 추적성을 보존하면서 이번 근거 15, 이번 구현 PR 미정을 구분한다. - 포함할 내용: 무자료 생성과 no-close, 같은 키 재사용/다른 payload 충돌, 일반/정정 통합 월별 단일 활성 초안, 완료/취소 후 재생성과 기존 마감의 정정 연결, 월말 고정 기준일과 입력 일치 검증, 대상의 명시적 갱신, 준비 상태와 금액의 NULL/0, 계좌/통화/목적/대표 부채 검증, exact/carried_before/manual_substitute와 자동 미래 금지, 이후 자료의 원본 날짜·사유·승인, 미확인 초안 선택/검토, 확인/정정 자료의 명시적 재선택·재검토·승인, 미확인 금액 합산 금지 및 미해소 항목의 승인된 누락/제외, 잠정 합계·완전성·누락/제외/대체 구분, 수동 자산/부채 보존 및 drift, 검토 이후 모든 의미 있는 변경의 재승인, 단일 트랜잭션과 동시 편집 충돌/no-partial-write, persisted evidence 기반 재시도, immutable close와 명시적 정정, 거래/자산 상태 분리, Dashboard/MCP 동등 동작, schema migration 및 기존 API/보안/legacy 회귀를 정상·경계·실패 사례로 명세한다. - 제외할 내용: 거래 완료/성과 추정 보장, FX/가격 API, 자동 승인·자동 미래 선택, 인증/메뉴 재설계, 실제 금융자료, 원본 날짜 변경 및 이력 삭제. - 근거: REQ-003.02/.06/.07/.08/.09의 기존 기능과 정책을 직접 확장하는 작업이다. 영속 초안이 새 aggregate라는 이유만으로 별도 REQ-004를 만들지 않고 현 작성 규칙에 따라 갱신한다. 동일 ID를 유지하므로 신규 ID 할당은 없다.
구현 근거: docs/requirements/req-003_account-valuation-history.md; exact approved path exists; metadata 1-13; requirements 53-181; new AC 201-539; old AC 541-648; traceability 665-667; 현재 승인 계약은 동일하고 이 항목에 영향을 주는 구현/문서/test blob은 이전 검토 head와 byte-identical이다. 2개 변경 함수 및 신규 policy test의 전체 delta 영향과 현재 exact-head 생산자 실행을 별도 검증했다.
테스트 근거: tests/test_settlement_draft_docs.py, tests/test_requirement_docs.py
판정 근거: 정본 경로와 문서 구조를 확인했다. REQ metadata 및 11개 번호 섹션, 영향 범위와 인수 기준 및 traceability는 trusted README와 TEMPLATE에 대조했다.
DOC-REQ-semantic — satisfied
계약: - 조치: 갱신 - 경로: docs/requirements/req-003_account-valuation-history.md - 문서 ID: REQ-003 - 제목: 계좌 기준일 평가 이력과 자산 마감 연동 - 변경 내용: 기존 ID·파일명·제목을 유지하고 초안 생성/편집/취소, 계좌별 직접 지정, 날짜 차이와 대체 승인, 대상 갱신, 검토 버전/fingerprint, 최종화·정정 초안 및 공통 adapter 요구사항/인수 기준을 추가한다. 미래 제외 규칙을 자동/직접 마감과 승인된 초안 예외로 분리한다. 월별 단일 활성 초안과 월말 기준일 검증을 추가하고 미확인 선택·검토는 허용하되 확인/정정 자료의 명시적 재선택·재검토·승인 전 금액 합산을 금지한다. 미확인으로 남은 항목은 누락/제외 및 조건부 누락 승인으로 처리한다. 기존 append-only, 정수/NULL, 대표 부채, no-fake-transaction, auth/menu·읽기 전용 계약을 유지한다. revision과 변경 이력을 갱신하고 기존 12/13 추적성을 보존하면서 이번 근거 15, 이번 구현 PR 미정을 구분한다. - 포함할 내용: 무자료 생성과 no-close, 같은 키 재사용/다른 payload 충돌, 일반/정정 통합 월별 단일 활성 초안, 완료/취소 후 재생성과 기존 마감의 정정 연결, 월말 고정 기준일과 입력 일치 검증, 대상의 명시적 갱신, 준비 상태와 금액의 NULL/0, 계좌/통화/목적/대표 부채 검증, exact/carried_before/manual_substitute와 자동 미래 금지, 이후 자료의 원본 날짜·사유·승인, 미확인 초안 선택/검토, 확인/정정 자료의 명시적 재선택·재검토·승인, 미확인 금액 합산 금지 및 미해소 항목의 승인된 누락/제외, 잠정 합계·완전성·누락/제외/대체 구분, 수동 자산/부채 보존 및 drift, 검토 이후 모든 의미 있는 변경의 재승인, 단일 트랜잭션과 동시 편집 충돌/no-partial-write, persisted evidence 기반 재시도, immutable close와 명시적 정정, 거래/자산 상태 분리, Dashboard/MCP 동등 동작, schema migration 및 기존 API/보안/legacy 회귀를 정상·경계·실패 사례로 명세한다. - 제외할 내용: 거래 완료/성과 추정 보장, FX/가격 API, 자동 승인·자동 미래 선택, 인증/메뉴 재설계, 실제 금융자료, 원본 날짜 변경 및 이력 삭제. - 근거: REQ-003.02/.06/.07/.08/.09의 기존 기능과 정책을 직접 확장하는 작업이다. 영속 초안이 새 aggregate라는 이유만으로 별도 REQ-004를 만들지 않고 현 작성 규칙에 따라 갱신한다. 동일 ID를 유지하므로 신규 ID 할당은 없다.
구현 근거: docs/requirements/req-003_account-valuation-history.md, jarca_ledger_mcp/application/settlement_draft_service.py; metadata 1-13; requirements 53-181; new AC 201-539; old AC 541-648; traceability 665-667; 현재 재작업은 service 79,131-133,285의 공유 통화/합계/선택 목적 및 승인 fingerprint 정합화이고 실제 public signature와 상태/원자 저장/읽기 adapter는 보존했다. 해당 구현 영향과 새 policy regression 및 변경 없는 정본 문서를 직접 대조했다.
테스트 근거: tests/test_settlement_draft_docs.py, tests/test_monthly_settlement_drafts.py, tests/test_settlement_draft_policy_consistency.py
판정 근거: REQ-003 ID와 제목 및 기존 추적성을 유지하며 기존 AC 10개 중 9개는 원문 보존, migration AC는 schema13 현재 버전으로 승인된 확장을 반영했다. v12 이름의 테스트도 실제 단언은 13이므로 stale verification으로 보지 않는다.
DOC-DM-structural — satisfied
계약: - 조치: 갱신 - 경로: docs/data-model.md - 변경 내용: 초안과 항목의 영속 엔터티를 추가해 초안→대상 항목, 항목→계좌/valuation, 초안→최종 run, 정정 초안→이전 run 관계와 필수/선택성·유일성·삭제 금지를 기록한다. 초안의 월·기준일·상태·작성자·시각·메모·버전·중복 키·완료 연결, 항목의 source identity·선택 자료·방식/사유·포함/제외·선택자·시각·버전·승인 결합 정보를 명세한다. 수동 자료는 검토 증거 값을 고정하고 원본 drift를 검출한다. 최종 run/rows에는 실제 날짜·방향 있는 차이·확인 상태·적용 금액·분류·사유·승인·누락/경고·초안 버전/fingerprint를 보존한다. 일반/정정 통합 정산 월별 활성 초안 유일성을 저장 제약과 동시성 검증으로 강제하고 완료·취소 이력은 보존한다. 월·기준일의 월말 일치 검증을 명세한다. 미확인 항목은 검토용 선택과 금액 authority를 분리하며 확인/정정 child의 명시적 재선택 후에만 합산한다. 미확인으로 남은 항목의 제외 사유와 누락 승인도 보존한다. 기존 correction/idempotency 제약, read alias와 nullable 금액 의미를 보존하고 schema 12→새 버전의 additive·반복 가능한 migration/legacy 조회/실패 및 백업 복구 경계를 문서화한다. - 근거: schema 12에는 초안/항목 persistence가 없으며 기존 account_valuations와 run/rows를 재사용·연결해야 한다. 원본 이력의 변경/삭제나 guessed migration은 필요하지 않다.
구현 근거: docs/data-model.md; exact approved path exists; settlement draft entities and fields 178-195; 현재 승인 계약은 동일하고 이 항목에 영향을 주는 구현/문서/test blob은 이전 검토 head와 byte-identical이다. 2개 변경 함수 및 신규 policy test의 전체 delta 영향과 현재 exact-head 생산자 실행을 별도 검증했다.
테스트 근거: tests/test_settlement_draft_docs.py, tests/test_requirement_docs.py
판정 근거: 정본 경로와 문서 구조를 확인했다. REQ metadata 및 11개 번호 섹션, 영향 범위와 인수 기준 및 traceability는 trusted README와 TEMPLATE에 대조했다.
DOC-DM-semantic — satisfied
계약: - 조치: 갱신 - 경로: docs/data-model.md - 변경 내용: 초안과 항목의 영속 엔터티를 추가해 초안→대상 항목, 항목→계좌/valuation, 초안→최종 run, 정정 초안→이전 run 관계와 필수/선택성·유일성·삭제 금지를 기록한다. 초안의 월·기준일·상태·작성자·시각·메모·버전·중복 키·완료 연결, 항목의 source identity·선택 자료·방식/사유·포함/제외·선택자·시각·버전·승인 결합 정보를 명세한다. 수동 자료는 검토 증거 값을 고정하고 원본 drift를 검출한다. 최종 run/rows에는 실제 날짜·방향 있는 차이·확인 상태·적용 금액·분류·사유·승인·누락/경고·초안 버전/fingerprint를 보존한다. 일반/정정 통합 정산 월별 활성 초안 유일성을 저장 제약과 동시성 검증으로 강제하고 완료·취소 이력은 보존한다. 월·기준일의 월말 일치 검증을 명세한다. 미확인 항목은 검토용 선택과 금액 authority를 분리하며 확인/정정 child의 명시적 재선택 후에만 합산한다. 미확인으로 남은 항목의 제외 사유와 누락 승인도 보존한다. 기존 correction/idempotency 제약, read alias와 nullable 금액 의미를 보존하고 schema 12→새 버전의 additive·반복 가능한 migration/legacy 조회/실패 및 백업 복구 경계를 문서화한다. - 근거: schema 12에는 초안/항목 persistence가 없으며 기존 account_valuations와 run/rows를 재사용·연결해야 한다. 원본 이력의 변경/삭제나 guessed migration은 필요하지 않다.
구현 근거: docs/data-model.md, jarca_ledger_mcp/application/settlement_draft_service.py; settlement draft entities and fields 178-195; 현재 재작업은 service 79,131-133,285의 공유 통화/합계/선택 목적 및 승인 fingerprint 정합화이고 실제 public signature와 상태/원자 저장/읽기 adapter는 보존했다. 해당 구현 영향과 새 policy regression 및 변경 없는 정본 문서를 직접 대조했다.
테스트 근거: tests/test_settlement_draft_docs.py, tests/test_monthly_settlement_drafts.py, tests/test_settlement_draft_policy_consistency.py
판정 근거: 승인된 필수 의미를 pinned 문서의 해당 섹션과 구현 및 참조 테스트에 대조했다.
DOC-IC-structural — satisfied
계약: - 조치: 갱신 - 경로: docs/interface-contract.md - 변경 내용: 공통 초안 생성·목록·상세·수정/대상 갱신·취소·계좌 자료 지정/해제·포함/제외·검토/검증·승인 최종화·정정 초안 operation을 정의하고 실제 구현의 snake_case 함수/MCP 도구/gateway 이름과 exact signature를 고정한다. 입력에는 초안/항목 ID·기대 버전, 월·기준일, 자료 ID·선택 방식·사유, 명시적 포함/제외와 사유, 생성/마감 키, 검토 fingerprint 및 승인자·시각/근거를 기록한다. 출력에는 준비 상태·버전, 대상/선택 증거, 날짜 차이·확인 상태, 잠정 합계·완전성·누락/승인 필요 목록, 완료 run/정정 연결과 persisted replay를 정의한다. 검증/대상 부재/상태·버전·증거 drift/승인 부족/키 충돌/동시 마감 오류의 조건·재시도·no-write를 명확히 한다. 기존 success/error_code/error, 자동 selector, 기존 close/report 키와 provenance 의미, Dashboard 인증 및 MCP 인증 범위를 보존한다. 초안 사용 시 직접 마감으로 안전 검증을 우회하지 못하는 경계를 규정한다. 생성·정정 생성은 같은 월의 활성 초안 중복을 검사하고 월말 아닌 입력 기준일은 거절한다. 미확인 선택은 검토용 상태를 반환하고 합계/최종화는 금액을 제외한다. 확인/정정 child를 명시적으로 다시 선택하면 버전·검토/승인을 갱신하고, 끝내 미확인인 항목은 누락/제외 승인 대상으로만 반환한다. - 근거: 기존 MCP/gateway에는 초안 mutation이 없고 현재 close는 basis-date 자료 자동 재조회 경로다. 새 공통 계약과 legacy 경로 구분이 필요하다.
구현 근거: docs/interface-contract.md; exact approved path exists; shared operation signatures and response, errors, read-only and evidence contract 438-466; 현재 승인 계약은 동일하고 이 항목에 영향을 주는 구현/문서/test blob은 이전 검토 head와 byte-identical이다. 2개 변경 함수 및 신규 policy test의 전체 delta 영향과 현재 exact-head 생산자 실행을 별도 검증했다.
테스트 근거: tests/test_settlement_draft_docs.py, tests/test_requirement_docs.py
판정 근거: 정본 경로와 문서 구조를 확인했다. REQ metadata 및 11개 번호 섹션, 영향 범위와 인수 기준 및 traceability는 trusted README와 TEMPLATE에 대조했다.
DOC-IC-semantic — satisfied
계약: - 조치: 갱신 - 경로: docs/interface-contract.md - 변경 내용: 공통 초안 생성·목록·상세·수정/대상 갱신·취소·계좌 자료 지정/해제·포함/제외·검토/검증·승인 최종화·정정 초안 operation을 정의하고 실제 구현의 snake_case 함수/MCP 도구/gateway 이름과 exact signature를 고정한다. 입력에는 초안/항목 ID·기대 버전, 월·기준일, 자료 ID·선택 방식·사유, 명시적 포함/제외와 사유, 생성/마감 키, 검토 fingerprint 및 승인자·시각/근거를 기록한다. 출력에는 준비 상태·버전, 대상/선택 증거, 날짜 차이·확인 상태, 잠정 합계·완전성·누락/승인 필요 목록, 완료 run/정정 연결과 persisted replay를 정의한다. 검증/대상 부재/상태·버전·증거 drift/승인 부족/키 충돌/동시 마감 오류의 조건·재시도·no-write를 명확히 한다. 기존 success/error_code/error, 자동 selector, 기존 close/report 키와 provenance 의미, Dashboard 인증 및 MCP 인증 범위를 보존한다. 초안 사용 시 직접 마감으로 안전 검증을 우회하지 못하는 경계를 규정한다. 생성·정정 생성은 같은 월의 활성 초안 중복을 검사하고 월말 아닌 입력 기준일은 거절한다. 미확인 선택은 검토용 상태를 반환하고 합계/최종화는 금액을 제외한다. 확인/정정 child를 명시적으로 다시 선택하면 버전·검토/승인을 갱신하고, 끝내 미확인인 항목은 누락/제외 승인 대상으로만 반환한다. - 근거: 기존 MCP/gateway에는 초안 mutation이 없고 현재 close는 basis-date 자료 자동 재조회 경로다. 새 공통 계약과 legacy 경로 구분이 필요하다.
구현 근거: docs/interface-contract.md, jarca_ledger_mcp/application/settlement_draft_service.py; shared operation signatures and response, errors, read-only and evidence contract 438-466; 현재 재작업은 service 79,131-133,285의 공유 통화/합계/선택 목적 및 승인 fingerprint 정합화이고 실제 public signature와 상태/원자 저장/읽기 adapter는 보존했다. 해당 구현 영향과 새 policy regression 및 변경 없는 정본 문서를 직접 대조했다.
테스트 근거: tests/test_settlement_draft_docs.py, tests/test_monthly_settlement_drafts.py, tests/test_settlement_draft_policy_consistency.py
판정 근거: 승인된 필수 의미를 pinned 문서의 해당 섹션과 구현 및 참조 테스트에 대조했다.
DOC-PS-structural — satisfied
계약: - 조치: 갱신 - 경로: docs/project-structure.md - 변경 내용: 기존 application/monthly_settlement_service.py의 read model을 보존하면서 초안 lifecycle의 application-layer 책임과 account_valuation_service.py(등록·검증·정정), assets_service.py(금액/증거·run 최종화), infrastructure/sqlite/schema.py/migrations.py(영속 제약/이주)의 소유권을 명확히 한다. service.py 공개 re-export, adapters/mcp/server.py/tool_contracts.py, adapters/streamlit gateway와 dashboard/page_views/monthly_settlement.py/assets.py의 연결을 실제 경로로 기록한다. 새 파일을 추가하면 그 exact 경로·책임·진입점을 문서에 반영하되 UI/MCP direct SQL, application의 Dashboard 역의존과 중복 업무 검증을 금지한다. 월별 활성 초안 유일성·월말 검증·미확인 금액 제외/확인 후 재선택의 책임을 공통 application과 SQLite 제약에 두고 adapter별 예외를 만들지 않는다. 각 변경에 대응하는 합성 테스트, 문서 검증과 기존 auth/menu/legacy 회귀 위치를 연결한다. - 근거: 기존 구조 문서는 service→SQLite와 page/tool→gateway/service 방향을 정본으로 규정한다. 새 초안 작업은 해당 책임 경계를 확장하며 별도 UI 전용 마감 로직을 만들지 않는다.
구현 근거: docs/project-structure.md; exact approved path exists; ownership table 214-226; 현재 승인 계약은 동일하고 이 항목에 영향을 주는 구현/문서/test blob은 이전 검토 head와 byte-identical이다. 2개 변경 함수 및 신규 policy test의 전체 delta 영향과 현재 exact-head 생산자 실행을 별도 검증했다.
테스트 근거: tests/test_settlement_draft_docs.py, tests/test_requirement_docs.py
판정 근거: 정본 경로와 문서 구조를 확인했다. REQ metadata 및 11개 번호 섹션, 영향 범위와 인수 기준 및 traceability는 trusted README와 TEMPLATE에 대조했다.
DOC-PS-semantic — satisfied
계약: - 조치: 갱신 - 경로: docs/project-structure.md - 변경 내용: 기존 application/monthly_settlement_service.py의 read model을 보존하면서 초안 lifecycle의 application-layer 책임과 account_valuation_service.py(등록·검증·정정), assets_service.py(금액/증거·run 최종화), infrastructure/sqlite/schema.py/migrations.py(영속 제약/이주)의 소유권을 명확히 한다. service.py 공개 re-export, adapters/mcp/server.py/tool_contracts.py, adapters/streamlit gateway와 dashboard/page_views/monthly_settlement.py/assets.py의 연결을 실제 경로로 기록한다. 새 파일을 추가하면 그 exact 경로·책임·진입점을 문서에 반영하되 UI/MCP direct SQL, application의 Dashboard 역의존과 중복 업무 검증을 금지한다. 월별 활성 초안 유일성·월말 검증·미확인 금액 제외/확인 후 재선택의 책임을 공통 application과 SQLite 제약에 두고 adapter별 예외를 만들지 않는다. 각 변경에 대응하는 합성 테스트, 문서 검증과 기존 auth/menu/legacy 회귀 위치를 연결한다. - 근거: 기존 구조 문서는 service→SQLite와 page/tool→gateway/service 방향을 정본으로 규정한다. 새 초안 작업은 해당 책임 경계를 확장하며 별도 UI 전용 마감 로직을 만들지 않는다.
구현 근거: docs/project-structure.md, jarca_ledger_mcp/application/settlement_draft_service.py; 이전 review71 DOC-PS-semantic 보완: docs/project-structure.md 229-252에 실제 service re-export, MCP server와 tool_contracts, settlement_gateway, reusable panel과 두 page entrypoint 연결을 추가했다. 246-252에 월별 active partial unique index, 월말 검증 및 unverified authority와 명시적 child 재선택의 공통 책임과 synthetic test를 대응한다. 신규 named 문서 regression도 해당 연결을 검증한다.; 현재 재작업은 service 79,131-133,285의 공유 통화/합계/선택 목적 및 승인 fingerprint 정합화이고 실제 public signature와 상태/원자 저장/읽기 adapter는 보존했다. 해당 구현 영향과 새 policy regression 및 변경 없는 정본 문서를 직접 대조했다.
테스트 근거: tests/test_settlement_draft_docs.py, tests/test_monthly_settlement_drafts.py, tests/test_settlement_draft_policy_consistency.py
판정 근거: 이전 최소 보완 요청의 actual 경로와 책임, 진입점 및 의존 방향과 세 공통 정책 소유권이 모두 문서화됐다. 기존 기능이나 adapter 예외를 새로 만들지 않았다.
DOC-RF-structural — satisfied
계약: - 조치: 갱신 - 경로: docs/runtime-flow.md - 변경 내용: 인증→명시적 무자료 초안 생성→대상 동결→자료 등록/지정·해제/제외→읽기 전용 검토→버전·증거에 결합한 승인→동일 transaction에서 증거 재검증·run/rows 저장·초안 완료→불변 조회 흐름을 정의한다. 생성/정정 생성 guard는 일반/정정 통합 월별 단일 활성 초안과 월말 일치를 검증한다. 완료·취소 후 재생성은 가능하지만 기존 마감이 있으면 이전 run과 정정 사유를 연결한다. 미확인 자료 선택은 검토 필요로 전이하며 합계에는 포함하지 않는다. 확인/정정 자료를 명시적으로 재선택하면 재검토·재승인 후 최종화하고, 끝내 확인되지 않으면 누락/제외 및 조건부 누락 승인을 거친다. 변경/정정/대상 갱신은 승인을 무효화하고 검토 단계로 돌아간다. 취소는 기존 증거/run을 삭제하지 않으며 재마감은 이전 run 연결·사유·단일 correction 제약을 유지한다. 거래 준비와 자산 상태를 별도로 표시하고 외부 가격/환율 호출·추정 거래 생성은 없다. SQLite 동시 편집·키/버전 충돌, stale approval, 정정본 등장, 중복 최종화, DB 실패에 대해 no-partial-write·rollback·안전 재시도/사용자 재검토와 반환 오류를 기록한다. 관찰 정보는 초안/버전/run 상관 ID와 상태/경고 코드로 제한하고 credential/실제 계좌 자료를 로그에 남기지 않는다. - 근거: 현 runtime은 read-only preview→live authority 기반 close이며 영속 준비 단계가 없다. 기존 fingerprint drift·원자 저장·persisted replay guard를 초안 선택에 결합해 확장해야 한다.
구현 근거: docs/runtime-flow.md; exact approved path exists; lifecycle and failure/recovery guards 243-259; 현재 승인 계약은 동일하고 이 항목에 영향을 주는 구현/문서/test blob은 이전 검토 head와 byte-identical이다. 2개 변경 함수 및 신규 policy test의 전체 delta 영향과 현재 exact-head 생산자 실행을 별도 검증했다.
테스트 근거: tests/test_settlement_draft_docs.py, tests/test_requirement_docs.py
판정 근거: 정본 경로와 문서 구조를 확인했다. REQ metadata 및 11개 번호 섹션, 영향 범위와 인수 기준 및 traceability는 trusted README와 TEMPLATE에 대조했다.
DOC-RF-semantic — satisfied
계약: - 조치: 갱신 - 경로: docs/runtime-flow.md - 변경 내용: 인증→명시적 무자료 초안 생성→대상 동결→자료 등록/지정·해제/제외→읽기 전용 검토→버전·증거에 결합한 승인→동일 transaction에서 증거 재검증·run/rows 저장·초안 완료→불변 조회 흐름을 정의한다. 생성/정정 생성 guard는 일반/정정 통합 월별 단일 활성 초안과 월말 일치를 검증한다. 완료·취소 후 재생성은 가능하지만 기존 마감이 있으면 이전 run과 정정 사유를 연결한다. 미확인 자료 선택은 검토 필요로 전이하며 합계에는 포함하지 않는다. 확인/정정 자료를 명시적으로 재선택하면 재검토·재승인 후 최종화하고, 끝내 확인되지 않으면 누락/제외 및 조건부 누락 승인을 거친다. 변경/정정/대상 갱신은 승인을 무효화하고 검토 단계로 돌아간다. 취소는 기존 증거/run을 삭제하지 않으며 재마감은 이전 run 연결·사유·단일 correction 제약을 유지한다. 거래 준비와 자산 상태를 별도로 표시하고 외부 가격/환율 호출·추정 거래 생성은 없다. SQLite 동시 편집·키/버전 충돌, stale approval, 정정본 등장, 중복 최종화, DB 실패에 대해 no-partial-write·rollback·안전 재시도/사용자 재검토와 반환 오류를 기록한다. 관찰 정보는 초안/버전/run 상관 ID와 상태/경고 코드로 제한하고 credential/실제 계좌 자료를 로그에 남기지 않는다. - 근거: 현 runtime은 read-only preview→live authority 기반 close이며 영속 준비 단계가 없다. 기존 fingerprint drift·원자 저장·persisted replay guard를 초안 선택에 결합해 확장해야 한다.
구현 근거: docs/runtime-flow.md, jarca_ledger_mcp/application/settlement_draft_service.py; 이전 review71 DOC-RF-semantic 보완: docs/runtime-flow.md 262-274의 Cancellation and reopening에서 active 상태와 version 및 actor/reason guard, BEGIN IMMEDIATE, cancel audit, 승인 무효화, 이력 보존, rollback과 재시도, 신규 키와 이전 마감 정정 연결을 명시했다. service 202-211 및394-396과153-185, 기존 cancellation/correction tests 및 신규 named 문서 regression에 대조했다.; 현재 재작업은 service 79,131-133,285의 공유 통화/합계/선택 목적 및 승인 fingerprint 정합화이고 실제 public signature와 상태/원자 저장/읽기 adapter는 보존했다. 해당 구현 영향과 새 policy regression 및 변경 없는 정본 문서를 직접 대조했다.
테스트 근거: tests/test_settlement_draft_docs.py, tests/test_monthly_settlement_drafts.py, tests/test_settlement_draft_policy_consistency.py
판정 근거: 취소와 재생성의 승인된 상태 전이가 실제 구현에 맞게 명시됐다. 같은 create key의 과거 초안 재사용과 새 키의 신규 초안 생성, 최신 prior run 및 정정 사유를 구분했고 원본 증거와 마감 삭제가 없다.
BASE-REQ-003.01-AC01 — satisfied
계약: REQ-003.01-AC01 — migration and preservation Cases (정상/경계/실패): 정상 schema 12 init twice; 경계 schema 11 legacy DB; 실패 malformed legacy DB. State Invariants: legacy tables/rows remain; migration repeats without duplicate columns. 판정 기준: schema_version=12, required tables/columns/indexes exist and old rows remain. 검증: tests/test_account_valuations.py::test_account_valuation_schema_is_v12_and_idempotent, tests/test_issue_12_regressions.py::test_schema12_migration_preserves_legacy_rows_indexes_and_is_idempotent. 검증 분류: level=integration; backend=sqlite
구현 근거: docs/requirements/req-003_account-valuation-history.md; REQ current AC REQ-003.01-AC01; pinned base and head whole block comparison; referenced existing test bodies reviewed; 현재 승인 계약은 동일하고 이 항목에 영향을 주는 구현/문서/test blob은 이전 검토 head와 byte-identical이다. 2개 변경 함수 및 신규 policy test의 전체 delta 영향과 현재 exact-head 생산자 실행을 별도 검증했다.
테스트 근거: tests/test_account_valuations.py, tests/test_issue_12_regressions.py, tests/test_contract_regression.py, tests/test_service.py
판정 근거: schema 11 legacy 보존 및 반복 초기화와 malformed failure 의미를 유지하고 현재 schema_version만 12에서 13으로 승인된 additive migration에 맞춰 변경했다. 참조 테스트는 실제로 13을 단언한다.
구현 근거: docs/requirements/req-003_account-valuation-history.md; REQ current AC REQ-003.02-AC01; pinned base and head whole block comparison; referenced existing test bodies reviewed; 현재 승인 계약은 동일하고 이 항목에 영향을 주는 구현/문서/test blob은 이전 검토 head와 byte-identical이다. 2개 변경 함수 및 신규 policy test의 전체 delta 영향과 현재 exact-head 생산자 실행을 별도 검증했다.
테스트 근거: tests/test_account_valuations.py, tests/test_issue_12_regressions.py, tests/test_contract_regression.py, tests/test_service.py
판정 근거: 기존 인수 판정과 검증 및 상태 불변조건을 원문 그대로 보존했다.
BASE-REQ-003.03-AC01 — satisfied
계약: REQ-003.03-AC01 — idempotent correction Cases (정상/경계/실패): same payload reuse; different payload conflict; second correction fails. State Invariants: one row/child per operation and original immutable. 판정 기준: exact error codes and count 2 after one correction. 검증: tests/test_account_valuations.py::test_register_same_idempotency_payload_reuses_row_and_changed_payload_conflicts, tests/test_account_valuations.py::test_correction_is_append_only_reasoned_and_single_child, tests/test_issue_12_regressions.py::test_empty_conditional_close_is_closed_and_second_close_requires_correction. 검증 분류: level=integration; backend=sqlite
구현 근거: docs/requirements/req-003_account-valuation-history.md; REQ current AC REQ-003.03-AC01; pinned base and head whole block comparison; referenced existing test bodies reviewed; 현재 승인 계약은 동일하고 이 항목에 영향을 주는 구현/문서/test blob은 이전 검토 head와 byte-identical이다. 2개 변경 함수 및 신규 policy test의 전체 delta 영향과 현재 exact-head 생산자 실행을 별도 검증했다.
테스트 근거: tests/test_account_valuations.py, tests/test_issue_12_regressions.py, tests/test_contract_regression.py, tests/test_service.py
판정 근거: 기존 인수 판정과 검증 및 상태 불변조건을 원문 그대로 보존했다.
BASE-REQ-003.04-AC01 — satisfied
계약: REQ-003.04-AC01 — precision and representative loan Cases (정상/경계/실패): integer zero; NULL optional metrics; loan missing definition rejected. State Invariants: no float amount and no double sum. 판정 기준: optional fields round-trip exactly and loan definition validation is enforced. 검증: test_correction_preserves_optional_fields_unless_overridden, _validate_common() and schema static checks. 검증 분류: level=static; backend=sqlite
구현 근거: docs/requirements/req-003_account-valuation-history.md; REQ current AC REQ-003.04-AC01; pinned base and head whole block comparison; referenced existing test bodies reviewed; 현재 재작업은 service 79,131-133,285의 공유 통화/합계/선택 목적 및 승인 fingerprint 정합화이고 실제 public signature와 상태/원자 저장/읽기 adapter는 보존했다. 해당 구현 영향과 새 policy regression 및 변경 없는 정본 문서를 직접 대조했다.
테스트 근거: tests/test_account_valuations.py, tests/test_issue_12_regressions.py, tests/test_contract_regression.py, tests/test_service.py, tests/test_settlement_draft_policy_consistency.py
판정 근거: 기존 인수 판정과 검증 및 상태 불변조건을 원문 그대로 보존했다.
BASE-REQ-003.05-AC01 — satisfied
계약: REQ-003.05-AC01 — authority separation Cases (정상/경계/실패): dated candidate; late historical candidate; name-only update. State Invariants: current/latest display cannot roll backward and candidate is unverified. 판정 기준: dated account write creates only unverified candidate; name-only does not. 검증: test_account_balance_write_records_unverified_candidate_only_with_real_basis_date, test_account_name_only_update_does_not_create_candidate. 검증 분류: level=unit; backend=application
구현 근거: docs/requirements/req-003_account-valuation-history.md; REQ current AC REQ-003.05-AC01; pinned base and head whole block comparison; referenced existing test bodies reviewed; 현재 승인 계약은 동일하고 이 항목에 영향을 주는 구현/문서/test blob은 이전 검토 head와 byte-identical이다. 2개 변경 함수 및 신규 policy test의 전체 delta 영향과 현재 exact-head 생산자 실행을 별도 검증했다.
테스트 근거: tests/test_account_valuations.py, tests/test_issue_12_regressions.py, tests/test_contract_regression.py, tests/test_service.py
판정 근거: 기존 인수 판정과 검증 및 상태 불변조건을 원문 그대로 보존했다.
BASE-REQ-003.06-AC01 — satisfied
계약: REQ-003.06-AC01 — preview and approval Cases (정상/경계/실패): complete exact close; incomplete draft; missing approval rejected. State Invariants: preview row count unchanged; no unsafe evidence approved. 판정 기준: preview is read-only and close returns conditional_approval_required without metadata. 검증: test_manual_asset_update_deactivate_preview_and_close_correction_policy, preview_asset_snapshot_close(). 검증 분류: level=integration; backend=application
구현 근거: docs/requirements/req-003_account-valuation-history.md; REQ current AC REQ-003.06-AC01; pinned base and head whole block comparison; referenced existing test bodies reviewed; 현재 재작업은 service 79,131-133,285의 공유 통화/합계/선택 목적 및 승인 fingerprint 정합화이고 실제 public signature와 상태/원자 저장/읽기 adapter는 보존했다. 해당 구현 영향과 새 policy regression 및 변경 없는 정본 문서를 직접 대조했다.
테스트 근거: tests/test_account_valuations.py, tests/test_issue_12_regressions.py, tests/test_contract_regression.py, tests/test_service.py, tests/test_settlement_draft_policy_consistency.py
판정 근거: 기존 인수 판정과 검증 및 상태 불변조건을 원문 그대로 보존했다.
BASE-REQ-003.07-AC01 — satisfied
계약: REQ-003.07-AC01 — immutable close correction Cases (정상/경계/실패): first close; same-date correction; second unreasoned close. State Invariants: old run/rows remain and latest run alone reports. 판정 기준: correction_of_run_id, count, and net worth match. 검증: test_manual_asset_update_deactivate_preview_and_close_correction_policy, assets_service.py close path. 검증 분류: level=integration; backend=sqlite
구현 근거: docs/requirements/req-003_account-valuation-history.md; REQ current AC REQ-003.07-AC01; pinned base and head whole block comparison; referenced existing test bodies reviewed; 현재 재작업은 service 79,131-133,285의 공유 통화/합계/선택 목적 및 승인 fingerprint 정합화이고 실제 public signature와 상태/원자 저장/읽기 adapter는 보존했다. 해당 구현 영향과 새 policy regression 및 변경 없는 정본 문서를 직접 대조했다.
테스트 근거: tests/test_account_valuations.py, tests/test_issue_12_regressions.py, tests/test_contract_regression.py, tests/test_service.py, tests/test_settlement_draft_policy_consistency.py
판정 근거: 기존 인수 판정과 검증 및 상태 불변조건을 원문 그대로 보존했다.
BASE-REQ-003.08-AC01 — satisfied
계약: REQ-003.08-AC01 — reconciliation/monthly Cases (정상/경계/실패): regular ledger calculation; verified investment; missing baseline. State Invariants: no fake transaction; provenance fields present; monthly read is non-mutating. 판정 기준: status VALUATION_MANAGED for verified investment and monthly summary reads report. 검증: tests/test_service.py::test_statement_status_account_update_and_balance_reconciliation, tests/test_issue_12_regressions.py::test_reconciliation_uses_corrected_investment_leaf_without_transaction_count_change, tests/test_service.py::test_monthly_settlement_summary_read_model_foundation. 검증 분류: level=unit; backend=application
구현 근거: docs/requirements/req-003_account-valuation-history.md; REQ current AC REQ-003.08-AC01; pinned base and head whole block comparison; referenced existing test bodies reviewed; 현재 승인 계약은 동일하고 이 항목에 영향을 주는 구현/문서/test blob은 이전 검토 head와 byte-identical이다. 2개 변경 함수 및 신규 policy test의 전체 delta 영향과 현재 exact-head 생산자 실행을 별도 검증했다.
테스트 근거: tests/test_account_valuations.py, tests/test_issue_12_regressions.py, tests/test_contract_regression.py, tests/test_service.py
판정 근거: 기존 인수 판정과 검증 및 상태 불변조건을 원문 그대로 보존했다.
BASE-REQ-003.09-AC01 — satisfied
계약: REQ-003.09-AC01 — shared adapters and auth Cases (정상/경계/실패): MCP stdio/http config; authenticated Dashboard render; unauthenticated gate. State Invariants: auth precedes DB; render does not write; response envelope has success. 판정 기준: actual tool/gateway names resolve and existing auth/menu tests pass. 검증: tests/test_mcp_http_runtime.py, tests/test_dashboard_authentication_app.py, tests/test_dashboard_menu_transition.py, server.py and gateways. 검증 분류: level=integration; backend=dashboard
구현 근거: docs/requirements/req-003_account-valuation-history.md; REQ current AC REQ-003.09-AC01; pinned base and head whole block comparison; referenced existing test bodies reviewed; 현재 승인 계약은 동일하고 이 항목에 영향을 주는 구현/문서/test blob은 이전 검토 head와 byte-identical이다. 2개 변경 함수 및 신규 policy test의 전체 delta 영향과 현재 exact-head 생산자 실행을 별도 검증했다.
테스트 근거: tests/test_account_valuations.py, tests/test_issue_12_regressions.py, tests/test_contract_regression.py, tests/test_service.py
판정 근거: 기존 인수 판정과 검증 및 상태 불변조건을 원문 그대로 보존했다.
BASE-REQ-003.10-AC01 — satisfied
계약: REQ-003.10-AC01 — privacy and compatibility Cases (정상/경계/실패): synthetic fixture; redaction search; actual secret/data detection. State Invariants: no credential/token/cookie/real financial data in docs/tests/evidence. 판정 기준: semantic inventory missing=0 and ambiguous=0; placeholder=0. 검증: tests/test_requirement_docs.py, auth/menu evidence tests, repository redaction/static search. 검증 분류: level=static; backend=dashboard
구현 근거: docs/requirements/req-003_account-valuation-history.md; REQ current AC REQ-003.10-AC01; pinned base and head whole block comparison; referenced existing test bodies reviewed; 현재 승인 계약은 동일하고 이 항목에 영향을 주는 구현/문서/test blob은 이전 검토 head와 byte-identical이다. 2개 변경 함수 및 신규 policy test의 전체 delta 영향과 현재 exact-head 생산자 실행을 별도 검증했다.
테스트 근거: tests/test_account_valuations.py, tests/test_issue_12_regressions.py, tests/test_contract_regression.py, tests/test_service.py
판정 근거: 기존 인수 판정과 검증 및 상태 불변조건을 원문 그대로 보존했다.
범위 판정
누락: 없음
범위 초과: 없음
명세 모순: 없음
결론
현재 head에 대해 승인된57개 필수 criterion이 모두 satisfied이고 범위 누락/초과와 명세 모순이 없어 approve다. 이전 code review73의 부호 있는 수동 부채 합계, 지원 소문자 KRW 누락, 은행 cash_balance 재선택 정책 상충3건을 현재 source와33개 추가 회귀에 대조해 해소했다. 정규화 합계를 승인 fingerprint에 결합하고 기존 완료 응답 replay는 보존했다. 이전 spec72의 승인은 이전 head에 대한 기록이며 현재 head의 새 검토로 대체한다. Code review73 자체의 해제나 새 code-review 승인, merge를 의미하지 않는다. 생산자 exact-head431 passed,4 skipped,1 warning 및 lint 통과를 확인했고 reviewer는 제품 테스트를 실행하지 않았다.
## 구현 명세 적합성 검토
- Source Issue: #15
- Pull Request: #16
- Reviewed head: `fa51b4dbb5acee0c42e2b33394c0607256032602`
- Contract SHA-256: `347e1e9d4ef3514754f93515ccfe71d94daa880bcd4129ad3fc1989c53b0641c`
- Verdict: `approve`
### Acceptance criteria 판정
- `IN-01` — `satisfied`
- 계약: 초안 ID, 정산 월·기준일, 상태, 생성자·생성/변경 시각, 메모, 동시 편집 버전, 생성 중복 방지 키, 최종 마감 ID 및 정정 관계를 영속 저장한다. 자료가 없어도 생성·저장할 수 있고 생성 자체로 마감 run이나 확정 금액을 만들지 않는다. 정산 월별 활성 초안은 일반/정정 구분 없이 하나로 제한하고, 완료·취소 후 새 초안을 열 수 있다. 생성 키 재시도는 같은 초안을 반환하고 다른 요청의 활성 중복은 충돌한다. 이미 마감한 기준일의 새 초안은 이전 run과 정정 사유를 연결한다. 정산 기준일은 해당 월말로 고정하며 입력한 날짜도 월말과 일치하는지 검증한다.
- 구현 근거: jarca_ledger_mcp/application/settlement_draft_service.py, jarca_ledger_mcp/infrastructure/sqlite/migrations.py; service 153-185, 394-396; migration 21-45; tests 54-98, 262-277; 현재 승인 계약은 동일하고 이 항목에 영향을 주는 구현/문서/test blob은 이전 검토 head와 byte-identical이다. 2개 변경 함수 및 신규 policy test의 전체 delta 영향과 현재 exact-head 생산자 실행을 별도 검증했다.
- 테스트 근거: tests/test_monthly_settlement_drafts.py, tests/test_settlement_draft_correction_contract.py
- 판정 근거: 무자료 생성은 run을 쓰지 않는다. 월말과 단일 활성 초안, 생성 재시도 및 정정 연결을 검증한다.
- `IN-02` — `satisfied`
- 계약: 초안의 정산 대상 계좌·자산·부채와 포함/제외 여부·사유를 관리한다. 계좌별 valuation_id, 선택 방식·사유, 선택자·시각, 항목 버전, 대체 승인 근거와 준비 상태를 저장한다. 새로운 계좌·대상 변경을 자동 반영하지 않고 명시적 대상 갱신으로만 반영하며 기존 선택과 승인에 미치는 차이를 검토한다.
- 구현 근거: jarca_ledger_mcp/application/settlement_draft_service.py; service 63-140, 219-258, 261-307; frozen-target and refresh tests; 현재 승인 계약은 동일하고 이 항목에 영향을 주는 구현/문서/test blob은 이전 검토 head와 byte-identical이다. 2개 변경 함수 및 신규 policy test의 전체 delta 영향과 현재 exact-head 생산자 실행을 별도 검증했다.
- 테스트 근거: tests/test_monthly_settlement_drafts.py, tests/test_settlement_draft_authority.py
- 판정 근거: 대상 동결과 명시적 갱신, 포함 및 제외 사유와 선택 감사 정보를 보존한다.
- `IN-03` — `satisfied`
- 계약: 기존 평가 등록·조회·정정 기능을 재사용한다. 선택한 자료의 계좌 소속, 통화, 평가 목적과 대표 부채 정의를 검증하고 계좌별 대표 합산 금액은 하나만 사용한다. 투자 원금·현금성 잔액·평가액을 중복 합산하지 않는다. 증빙/등록 중복 방지와 append-only 정정을 보존한다.
- 구현 근거: jarca_ledger_mcp/application/settlement_draft_service.py, jarca_ledger_mcp/application/assets_service.py, jarca_ledger_mcp/application/account_valuation_service.py; service 280-294와 assets_service 168-176을 직접 대조했다. bank 및 비투자 비부채 계좌의 balance와 cash_balance 목적을 자동 선택과 명시적 선택에서 정합화했다. 계좌 소속과 통화, 투자 목적 및 대표 부채 정의 guard는 유지된다.
- 테스트 근거: tests/test_settlement_draft_selection.py, tests/test_settlement_draft_contract_scenarios.py, tests/test_settlement_draft_policy_consistency.py
- 판정 근거: 코드 리뷰73 F-003을 현재 source와 named bank 재선택 및 세 선택방식 정상/잘못된 목적 회귀에 대조해 해소했다.
- `IN-04` — `satisfied`
- 계약: exact는 같은 기준일의 확인 자료, carried_before는 이전 확인 자료의 승인된 이월, manual_substitute는 특정 자료의 명시적 직접 지정이다. 자동 선택은 이후 날짜 자료를 선택하지 않는다. 수동 대체는 실제 날짜·방향을 포함한 날짜 차이·사유·승인을 보존한다. 등록일과 평가 기준일을 구분한다. 미확인 자료는 초안 선택·검토용으로 보존하되 잠정 합계의 authority 금액에 포함하지 않고 확인 필요 상태로 표시한다. 최종 합산하려면 append-only 확인/정정 자료를 사용자가 명시적으로 다시 선택하고 재검토·승인한다. 끝내 미확인인 항목은 누락/제외로 표시하고 조건부 마감 시 그 누락을 승인한다. 확인 승인을 이유로 원본 verification_status를 덮어쓰지 않는다.
- 구현 근거: jarca_ledger_mcp/application/settlement_draft_service.py, jarca_ledger_mcp/application/assets_service.py; service 107-125,261-307은 exact 당일, carried_before 이전 날짜, 사유 있는 특정 future manual_substitute와 verified-only authority를 유지한다. 새 policy tests117-212는 bank balance와 cash_balance의 세 방식, 미래 exact 및 사유 부재 거절, unverified NULL과 미해소 제외를 검증한다.
- 테스트 근거: tests/test_monthly_settlement_drafts.py, tests/test_settlement_draft_selection.py, tests/test_settlement_draft_contract_scenarios.py, tests/test_settlement_draft_policy_consistency.py
- 판정 근거: 지원 목적 재선택만 정합화했고 자동 미래 선택이나 미확인 금액 authority를 완화하지 않았다.
- `IN-05` — `satisfied`
- 계약: 초안 조회·검토·미리보기에서 대상/제외 목록, 자료 ID, 대표 금액·통화·자산/부채 분류, 실제 평가일, 선택 방식·날짜 차이, 증빙 출처·확인 상태, 선택/대체/제외 사유, 누락·승인 필요 항목, 잠정 총자산·총부채·순자산을 제공한다. 미선택 금액은 0으로 표시하지 않고 자료 완전성, 미등록 부채 및 대체 포함 여부를 명시한다.
- 구현 근거: jarca_ledger_mcp/application/settlement_draft_service.py, jarca_ledger_mcp/application/assets_service.py, jarca_ledger_mcp/application/monthly_settlement_service.py; service 79,108-116,131-133은 기존 통화 upper 정규화와 assets_service 516-555 공용 합계 정책을 사용한다. 새 tests29-95는 부호 혼합 수동 부채와 소문자 KRW에서 review 및 final.totals와 상위 합계와 report, timeseries와 replay의 정합성을 검증한다.
- 테스트 근거: tests/test_settlement_draft_contract_scenarios.py, tests/test_settlement_draft_read_models.py, tests/test_settlement_draft_policy_consistency.py
- 판정 근거: 코드 리뷰73 F-001과 F-002의 금액 상충 및 지원 KRW 누락이 해소됐으며 NULL과0을 혼동하지 않는다.
- `IN-06` — `satisfied`
- 계약: 최종 마감은 사용자가 검토한 초안 버전과 선택 증거를 고정한다. 승인 뒤 대상·선택·사유·금액/분류·경고 또는 관련 증거가 달라지면 기존 승인을 사용할 수 없다. 계좌의 현재값이나 최신 정정본으로 조용히 다시 선택하지 않는다.
- 구현 근거: jarca_ledger_mcp/application/settlement_draft_service.py; service 133의 검토 fingerprint에 정규화 totals가 포함되고 approve 325-333 및 finalize 351-356이 재계산 fingerprint와 버전/승인을 대조한다. 새 tests227-267은 역사적 합계 승인으로 변경된 합계를 마감하지 못하고 zero run/rows 및 active 보존 후 재승인만 성공함을 검증한다.
- 테스트 근거: tests/test_monthly_settlement_drafts.py, tests/test_settlement_draft_authority.py, tests/test_settlement_draft_policy_consistency.py
- 판정 근거: 세 금액 정책 수정에 기존 승인을 무검증 이월하지 않는다. 이 판단은 현재 immutable source와 exact-head full suite에 포함된 named regression 근거이며 별도 중간 RED source의 검증을 주장하지 않는다.
- `IN-07` — `satisfied`
- 계약: 초안 최종 상태 전이, 연결된 asset_snapshot_runs 및 asset_snapshots 저장을 하나의 트랜잭션으로 처리한다. 중복 클릭/동일 요청 재시도는 같은 마감을 반환하고 다른 payload의 키 재사용은 충돌한다. 실패 시 부분 마감과 완료 초안이 남지 않는다.
- 구현 근거: jarca_ledger_mcp/application/settlement_draft_service.py; finalize 342-350의 저장 응답 replay가 재검토보다 먼저이고 369-388의 run/row/completion 원자 저장은 변경되지 않았다. 새 tests29-67와270-290은 정확한 final_response/replay와 완료 이력의 재해석 금지를 검증한다.
- 테스트 근거: tests/test_monthly_settlement_drafts.py, tests/test_settlement_draft_contract_scenarios.py, tests/test_settlement_draft_policy_consistency.py
- 판정 근거: 신규 승인에는 수정된 totals가 적용되지만 과거 완료 마감은 재계산하거나 덮어쓰지 않는다.
- `IN-08` — `satisfied`
- 계약: 원본 초안 ID·버전, 월·기준일, 적용 자료/금액/통화/분류, 실제 날짜·선택 방식·날짜 차이, 증빙/확인 상태, 포함·제외·대체 사유, 승인자·시각·근거와 누락/경고를 마감 이력에 보존한다. 완전한 exact 마감, 이월·대체 포함, 승인된 누락을 별도로 식별한다. 대체 사용과 누락은 하나의 모호한 상태로 합치지 않는다.
- 구현 근거: jarca_ledger_mcp/application/settlement_draft_service.py, jarca_ledger_mcp/application/assets_service.py, jarca_ledger_mcp/application/monthly_settlement_service.py; service 75의 raw evidence_json 제거,79의 public 통화 정규화,83-86의 원본 state_hash/drift 비교,365-388의 적용 evidence와 승인 저장을 직접 확인했다. 새 tests69-95는 raw frozen currency가 krw 그대로인 반면 public authority만KRW이고 저장 응답과 replay가 일치함을 검증한다.
- 테스트 근거: tests/test_settlement_draft_contract_scenarios.py, tests/test_settlement_draft_read_models.py, tests/test_settlement_draft_audit_reproductions.py, tests/test_settlement_draft_policy_consistency.py
- 판정 근거: 원본 값/날짜/분류/출처와 불변 증거를 변조하지 않고 기존 amount/currency 의미를 복원했다.
- `IN-09` — `satisfied`
- 계약: 초안에서 선택 자료에 정정본이 생기면 검토 필요를 표시하고 사용자가 교체 여부를 결정한다. 확정 마감은 이후 평가 등록·정정으로 변경하지 않는다. 명시적 정정 초안과 사유로 새 마감을 이전 run에 연결하며 이전 기록을 보존한다.
- 구현 근거: jarca_ledger_mcp/application/settlement_draft_service.py, jarca_ledger_mcp/application/assets_service.py; 완료 마감은 finalize 343-350에서 저장 final_response로 반환한다. 새 completed_close_replay test는 _review를 호출하면 실패하도록 patch해 replay가 기존 응답을 반환함을 검증한다. 정정 child/원본 drift guard 및 correction parent check는 이전과 동일하다.
- 테스트 근거: tests/test_settlement_draft_authority.py, tests/test_settlement_draft_correction_contract.py, tests/test_settlement_draft_policy_consistency.py
- 판정 근거: 현재 합계 정책 변경으로 과거 완료 이력을 소급 계산하지 않는다. 정정과 취소/기존 증거 보존 계약은 유지된다.
- `IN-10` — `satisfied`
- 계약: 기존 수동 자산·부채도 대상과 합계에 포함한다. 검토 당시의 값·날짜·분류·출처를 증거로 고정하고 원본 변경을 drift로 검출한다. 갱신하려면 명시적 재검토를 거치며 마감 때 live 값을 몰래 재사용하지 않는다. 수동 자료의 자동 날짜 선택은 기존 exact/as_of 제한을 유지한다.
- 구현 근거: jarca_ledger_mcp/application/settlement_draft_service.py, jarca_ledger_mcp/application/assets_service.py; service 79,131-133과 assets_service 237-270,516-555를 비교해 기존 manual signed-loan bucket 절대 합계와 currency upper 정책을 재사용함을 확인했다. tests29-95 및152-164는 원본 manual row와 frozen evidence 불변, 실제 비KRW 제외, NULL과0, 합계와 읽기 모델 정합성을 검증한다.
- 테스트 근거: tests/test_monthly_settlement_drafts.py, tests/test_settlement_draft_authority.py, tests/test_settlement_draft_policy_consistency.py
- 판정 근거: 코드 리뷰73 F-001/F-002를 실제 승인 계약에 대응했다. 새 FX 또는 부채 정책을 만들지 않고 기존 동작을 새 초안 경로에 일치시켰다.
- `IN-11` — `satisfied`
- 계약: Dashboard에서 생성·목록·상세·저장·취소, 계좌 자료 조회·등록·지정·해제, 포함/제외 및 사유 수정, 검토·승인·최종 마감, 확정 조회·정정 초안 생성을 제공한다. MCP도 같은 작업을 공통 application service로 제공한다.
- 구현 근거: jarca_ledger_mcp/application/settlement_draft_service.py, jarca_ledger_mcp/service.py, jarca_ledger_mcp/adapters/mcp/server.py, jarca_ledger_mcp/adapters/mcp/tool_contracts.py, jarca_ledger_mcp/adapters/streamlit/settlement_gateway.py, dashboard/page_views/settlement_drafts.py, dashboard/page_views/assets.py, dashboard/page_views/monthly_settlement.py; shared application entrypoints, thin MCP and Streamlit gateway, explicit panel actions; adapter and real MCP stdio tests; 현재 재작업은 service 79,131-133,285의 공유 통화/합계/선택 목적 및 승인 fingerprint 정합화이고 실제 public signature와 상태/원자 저장/읽기 adapter는 보존했다. 해당 구현 영향과 새 policy regression 및 변경 없는 정본 문서를 직접 대조했다.
- 테스트 근거: tests/test_settlement_draft_adapters.py, tests/test_settlement_draft_mcp_runtime.py, tests/test_settlement_draft_dashboard.py, tests/test_settlement_draft_panel_workflow.py, tests/test_settlement_draft_panel_feedback.py, tests/test_settlement_draft_liability_registration.py, tests/test_settlement_draft_policy_consistency.py
- 판정 근거: UI와 MCP는 공통 application에 위임한다. 자료 등록과 지정 및 해제, 저장과 취소, 검토와 승인 및 마감, 확정 조회와 정정 생성 경로를 제공한다.
- `IN-12` — `satisfied`
- 계약: 합성 자료로 원본 수락 기준을 검증한다. 특히 2026-09 초안에 2026-10-05/07 자료 직접 지정, 늦게 등록한 2026-09-30 자료의 exact 구분, 자동 미래 선택 금지, 승인 후 변경 차단, 정정·동시 편집·재시도·트랜잭션 실패와 기존 API/마이그레이션 회귀를 포함한다.
- 구현 근거: jarca_ledger_mcp/application/settlement_draft_service.py, jarca_ledger_mcp/application/assets_service.py, jarca_ledger_mcp/infrastructure/sqlite/migrations.py, jarca_ledger_mcp/application/monthly_settlement_service.py; canonical i15rw3-final source가 현재 검토 head와 일치한다. 164개 file의 blob과SHA256 및 manifest/plan, 실제 argv/exit/output을 독립 대조했다. 생산자 431 passed,4 skipped,1 warning 및 lint exit0; canonical collection402에서435로33개 새 policy case만 추가됐다. 기존ID/skip/xfail과 기존 test 파일은 전부 보존됐다.
- 테스트 근거: tests/test_monthly_settlement_drafts.py, tests/test_settlement_draft_contract_scenarios.py, tests/test_settlement_draft_authority.py, tests/test_settlement_draft_selection.py, tests/test_settlement_draft_correction_contract.py, tests/test_ledger_categories.py, tests/test_review_decision_workbench.py, tests/test_settlement_draft_policy_consistency.py
- 판정 근거: Reviewer는 제품 코드를 실행하지 않았다. F-001~003의 기존 runtime RED assertion 및 현재 구현/정확한 test scope GREEN을 읽기 전용 검증했다. 별도 approval-binding intermediate RED는 source equivalence를 확증하지 못해 채택하지 않았다. 현재 final-head 역사 승인 거절 test와 full suite는 독립 결속됐다. CI success와 실제 Chromium run은 인증하지 않는다.
- `EX-01` — `satisfied`
- 계약: 거래 분류 완료 보장, 실제 월말 평가액 역산, 투자 성과 추정, 자산 증감을 수입·지출/투자 수익 거래로 자동 생성하는 기능.
- 구현 근거: jarca_ledger_mcp/application/settlement_draft_service.py, jarca_ledger_mcp/application/assets_service.py, jarca_ledger_mcp/application/monthly_settlement_service.py; exact base-to-head 38-file scope review and immutable source; no transaction insert or external price call introduced; 현재 승인 계약은 동일하고 이 항목에 영향을 주는 구현/문서/test blob은 이전 검토 head와 byte-identical이다. 2개 변경 함수 및 신규 policy test의 전체 delta 영향과 현재 exact-head 생산자 실행을 별도 검증했다.
- 테스트 근거: tests/test_settlement_draft_contract_scenarios.py, tests/test_settlement_draft_authority.py, tests/test_settlement_draft_correction_contract.py
- 판정 근거: 제외된 가격 및 FX, 자동 승인, 거래 생성, 기존 이력 삭제, 인증과 메뉴 재설계는 추가하지 않았다. Discovery 단계 제한은 후속 구현 PR 생성 금지가 아니다.
- `EX-02` — `satisfied`
- 계약: 외부 가격 API, 새 환율 변환 정책, 자동 승인, 실제 계좌번호·금융자료·credential을 문서나 fixture에 저장하는 작업.
- 구현 근거: jarca_ledger_mcp/application/settlement_draft_service.py, jarca_ledger_mcp/application/assets_service.py, jarca_ledger_mcp/application/monthly_settlement_service.py; exact base-to-head 38-file scope review and immutable source; no transaction insert or external price call introduced; 현재 승인 계약은 동일하고 이 항목에 영향을 주는 구현/문서/test blob은 이전 검토 head와 byte-identical이다. 2개 변경 함수 및 신규 policy test의 전체 delta 영향과 현재 exact-head 생산자 실행을 별도 검증했다.
- 테스트 근거: tests/test_settlement_draft_contract_scenarios.py, tests/test_settlement_draft_authority.py, tests/test_settlement_draft_correction_contract.py
- 판정 근거: 제외된 가격 및 FX, 자동 승인, 거래 생성, 기존 이력 삭제, 인증과 메뉴 재설계는 추가하지 않았다. Discovery 단계 제한은 후속 구현 PR 생성 금지가 아니다.
- `EX-03` — `satisfied`
- 계약: Dashboard 인증·쿠키/logout 또는 메뉴 순서 재설계, MCP 인증의 신규 도입.
- 구현 근거: jarca_ledger_mcp/application/settlement_draft_service.py, jarca_ledger_mcp/application/assets_service.py, jarca_ledger_mcp/application/monthly_settlement_service.py; exact base-to-head 38-file scope review and immutable source; no transaction insert or external price call introduced; 현재 승인 계약은 동일하고 이 항목에 영향을 주는 구현/문서/test blob은 이전 검토 head와 byte-identical이다. 2개 변경 함수 및 신규 policy test의 전체 delta 영향과 현재 exact-head 생산자 실행을 별도 검증했다.
- 테스트 근거: tests/test_settlement_draft_contract_scenarios.py, tests/test_settlement_draft_authority.py, tests/test_settlement_draft_correction_contract.py
- 판정 근거: 제외된 가격 및 FX, 자동 승인, 거래 생성, 기존 이력 삭제, 인증과 메뉴 재설계는 추가하지 않았다. Discovery 단계 제한은 후속 구현 PR 생성 금지가 아니다.
- `EX-04` — `satisfied`
- 계약: 초안 취소에 따른 원본 평가·마감 이력 삭제, 기존 마감 덮어쓰기, 원본 평가일 소급 변경.
- 구현 근거: jarca_ledger_mcp/application/settlement_draft_service.py, jarca_ledger_mcp/application/assets_service.py, jarca_ledger_mcp/application/monthly_settlement_service.py; exact base-to-head 38-file scope review and immutable source; no transaction insert or external price call introduced; 현재 승인 계약은 동일하고 이 항목에 영향을 주는 구현/문서/test blob은 이전 검토 head와 byte-identical이다. 2개 변경 함수 및 신규 policy test의 전체 delta 영향과 현재 exact-head 생산자 실행을 별도 검증했다.
- 테스트 근거: tests/test_settlement_draft_contract_scenarios.py, tests/test_settlement_draft_authority.py, tests/test_settlement_draft_correction_contract.py
- 판정 근거: 제외된 가격 및 FX, 자동 승인, 거래 생성, 기존 이력 삭제, 인증과 메뉴 재설계는 추가하지 않았다. Discovery 단계 제한은 후속 구현 PR 생성 금지가 아니다.
- `EX-05` — `satisfied`
- 계약: 정산 월의 월말과 다른 기준일, 같은 월의 복수 활성 초안, 미확인 자료의 단순 사용 승인만으로 금액을 최종 합산하는 경로.
- 구현 근거: jarca_ledger_mcp/application/settlement_draft_service.py, jarca_ledger_mcp/application/assets_service.py, jarca_ledger_mcp/application/monthly_settlement_service.py; exact base-to-head 38-file scope review and immutable source; no transaction insert or external price call introduced; 현재 승인 계약은 동일하고 이 항목에 영향을 주는 구현/문서/test blob은 이전 검토 head와 byte-identical이다. 2개 변경 함수 및 신규 policy test의 전체 delta 영향과 현재 exact-head 생산자 실행을 별도 검증했다.
- 테스트 근거: tests/test_settlement_draft_contract_scenarios.py, tests/test_settlement_draft_authority.py, tests/test_settlement_draft_correction_contract.py
- 판정 근거: 제외된 가격 및 FX, 자동 승인, 거래 생성, 기존 이력 삭제, 인증과 메뉴 재설계는 추가하지 않았다. Discovery 단계 제한은 후속 구현 PR 생성 금지가 아니다.
- `EX-06` — `satisfied`
- 계약: Discovery 단계의 제품 코드·요구사항명세서·설계문서 작성 또는 수정, PR/브랜치 생성. 아래 산출물은 후속 구현 시의 문서 계약이다.
- 구현 근거: jarca_ledger_mcp/application/settlement_draft_service.py, jarca_ledger_mcp/application/assets_service.py, jarca_ledger_mcp/application/monthly_settlement_service.py; exact base-to-head 38-file scope review and immutable source; no transaction insert or external price call introduced; 현재 승인 계약은 동일하고 이 항목에 영향을 주는 구현/문서/test blob은 이전 검토 head와 byte-identical이다. 2개 변경 함수 및 신규 policy test의 전체 delta 영향과 현재 exact-head 생산자 실행을 별도 검증했다.
- 테스트 근거: tests/test_settlement_draft_contract_scenarios.py, tests/test_settlement_draft_authority.py, tests/test_settlement_draft_correction_contract.py
- 판정 근거: 제외된 가격 및 FX, 자동 승인, 거래 생성, 기존 이력 삭제, 인증과 메뉴 재설계는 추가하지 않았다. Discovery 단계 제한은 후속 구현 PR 생성 금지가 아니다.
- `CON-01` — `satisfied`
- 계약: 조사 기준은 main의 고정 revision 68212e773b94dd89b6c036e6616759542c178de3이다. Gitea authoritative SHA와 갱신한 bare cache의 local ref를 비교했다.
- 구현 근거: docs/requirements/req-003_account-valuation-history.md; pinned base and default branch 68212e773b94dd89b6c036e6616759542c178de3; 현재 승인 계약은 동일하고 이 항목에 영향을 주는 구현/문서/test blob은 이전 검토 head와 byte-identical이다. 2개 변경 함수 및 신규 policy test의 전체 delta 영향과 현재 exact-head 생산자 실행을 별도 검증했다.
- 테스트 근거: tests/test_monthly_settlement_drafts.py
- 판정 근거: authoritative API와 cache base SHA 일치를 확인했다.
- `CON-02` — `satisfied`
- 계약: SQLite schema 12에서 additive migration하며 기존 테이블·행·이력·인덱스의 의미를 보존한다. 실제 새 스키마 버전 및 물리 필드는 구현 결과와 함께 문서화하고 기존 자료를 추정 이주하지 않는다.
- 구현 근거: jarca_ledger_mcp/infrastructure/sqlite/migrations.py, jarca_ledger_mcp/infrastructure/sqlite/schema.py, docs/data-model.md; migrate_db 19-45, 120-147, 198; schema13 idempotency test 249-260 and schema11 preservation regression; exact-head source delta; 현재 승인 계약은 동일하고 이 항목에 영향을 주는 구현/문서/test blob은 이전 검토 head와 byte-identical이다. 2개 변경 함수 및 신규 policy test의 전체 delta 영향과 현재 exact-head 생산자 실행을 별도 검증했다.
- 테스트 근거: tests/test_monthly_settlement_drafts.py, tests/test_issue_12_regressions.py, tests/test_account_valuations.py
- 판정 근거: 신규 테이블과 run lineage 컬럼만 additive하게 확장하며 기존 rows와 인덱스를 삭제하지 않는다. schema12 입력의 별도 실행은 없으나 공통 무조건 additive DDL과 기존 이력 및 반복 초기화 회귀를 함께 검토했다.
- `CON-03` — `satisfied`
- 계약: 기존 자동 exact/as_of와 기존 직접 마감의 호출/응답 계약을 유지한다. 미래 사용 예외는 직접 지정·검토·승인된 초안 마감에 한정하며 자동 선택 계약을 전역 완화하지 않는다. 기존 직접 마감이 초안의 승인·변경 검증을 우회해 선택 자료를 대신 확정하는 경로를 만들지 않는다.
- 구현 근거: jarca_ledger_mcp/application/settlement_draft_service.py, jarca_ledger_mcp/application/assets_service.py; existing automatic selector and direct close retained; draft finalize 338-391 does not use live direct-close shortcut; 현재 재작업은 service 79,131-133,285의 공유 통화/합계/선택 목적 및 승인 fingerprint 정합화이고 실제 public signature와 상태/원자 저장/읽기 adapter는 보존했다. 해당 구현 영향과 새 policy regression 및 변경 없는 정본 문서를 직접 대조했다.
- 테스트 근거: tests/test_settlement_draft_selection.py, tests/test_settlement_draft_legacy_shapes.py, tests/test_contract_regression.py, tests/test_settlement_draft_policy_consistency.py
- 판정 근거: 기존 exact와 as_of 및 직접 마감의 envelope와 선택 의미를 보존한다.
- `CON-04` — `satisfied`
- 계약: rejected/unknown 날짜, 잘못된 계좌·통화·목적·대표 부채 정의와 모호한 대표 선택은 승인만으로 정상 자료가 되지 않는다. 미확인 자료는 초안에서 선택·검토할 수 있지만 미확인 금액 자체를 승인으로 합산하지 않는다. 최종 합산 전 append-only 확인/정정 자료를 명시적으로 다시 선택하고 재검토·승인해야 한다. 미확인으로 남으면 누락/제외와 그 누락에 대한 조건부 승인만 허용한다.
- 구현 근거: jarca_ledger_mcp/application/settlement_draft_service.py; service 280-294의 소속/통화/목적/대표 부채/상태/날짜/정정 guard와107-125의 확인 전 authority NULL을 유지한다. 새 invalid_date_or_missing_reason, unverified_bank 및 purpose/representative_liability tests에서 실패/no-write를 확인했다.
- 테스트 근거: tests/test_settlement_draft_selection.py, tests/test_settlement_draft_authority.py, tests/test_settlement_draft_contract_scenarios.py, tests/test_settlement_draft_policy_consistency.py
- 판정 근거: cash_balance 인정은 기존 지원 목적의 정합화다. 미확인/잘못된 자료가 승인만으로 권한 금액이 되지 않는다.
- `CON-05` — `satisfied`
- 계약: 정수 금액의 정확도와 NULL/0 구분, 순자산의 자산−부채 계산, KRW 중심 기존 정책을 유지한다. FX 정책 없는 비KRW 금액은 단순 합산하지 않고 제외/경고를 표시한다.
- 구현 근거: jarca_ledger_mcp/application/settlement_draft_service.py, jarca_ledger_mcp/application/assets_service.py; service 79,131-133이 assets_service 516-555의 정수/bucket/총부채 absolute aggregate와 자산-부채 계산 및237의 KRW upper 정책을 공유한다. 새 tests는 부채 부호 혼합, KRW/krw/USD/공백 통화, NULL/0과 strict account amount 거절을 정상/경계/실패로 검증한다.
- 테스트 근거: tests/test_settlement_draft_contract_scenarios.py, tests/test_settlement_draft_policy_consistency.py
- 판정 근거: 세 기존 정책 상충을 고쳤고 새 FX 변환이나 금액 자료 추정을 하지 않았다. 431 passed 보고를 reviewer 실행이나 금융 현실 검증으로 표현하지 않는다.
- `CON-06` — `satisfied`
- 계약: carried_before는 초안의 이전 자료 선택 의미이고 기존 public as_of를 제거하거나 이름을 바꾸지 않는다. 기존 age_days의 의미를 변경하지 않고 수동 미래 자료의 방향 있는 날짜 차이 계약을 별도로 명확히 한다.
- 구현 근거: jarca_ledger_mcp/application/settlement_draft_service.py, jarca_ledger_mcp/application/assets_service.py, docs/interface-contract.md; review date fields and scenario 32-54; existing as_of API unchanged; 현재 승인 계약은 동일하고 이 항목에 영향을 주는 구현/문서/test blob은 이전 검토 head와 byte-identical이다. 2개 변경 함수 및 신규 policy test의 전체 delta 영향과 현재 exact-head 생산자 실행을 별도 검증했다.
- 테스트 근거: tests/test_settlement_draft_contract_scenarios.py, tests/test_settlement_draft_selection.py
- 판정 근거: 공개 as_of와 age_days의 방향을 유지하고 새 날짜 차이 field를 별도로 제공한다.
- `CON-07` — `satisfied`
- 계약: get_monthly_settlement_summary()와 기존 preview/report/render는 읽기 전용을 유지한다. 새 초안 mutation은 명시적 버튼·도구 호출로만 수행한다. missing DB 조회는 기존 db_not_initialized/no-create 계약을 유지한다.
- 구현 근거: jarca_ledger_mcp/application/settlement_draft_service.py, jarca_ledger_mcp/application/monthly_settlement_service.py, jarca_ledger_mcp/infrastructure/sqlite/connection.py; review 310-316 uses read_db; monthly existing read_db path and explicit new read helpers; missing DB cases; 현재 승인 계약은 동일하고 이 항목에 영향을 주는 구현/문서/test blob은 이전 검토 head와 byte-identical이다. 2개 변경 함수 및 신규 policy test의 전체 delta 영향과 현재 exact-head 생산자 실행을 별도 검증했다.
- 테스트 근거: tests/test_monthly_settlement_drafts.py, tests/test_service.py, tests/test_settlement_draft_adapters.py
- 판정 근거: 읽기 전용 연결과 missing DB no-create를 보존한다. 새로운 mutation은 명시적 action에서만 실행된다.
- `CON-08` — `satisfied`
- 계약: Dashboard auth-before-DB, 기존 성공/오류 envelope, 기존 MCP transport와 application → SQLite 의존 방향을 유지한다. 업무 검증·선택·마감은 UI/MCP에서 중복 구현하지 않는다.
- 구현 근거: jarca_ledger_mcp/application/settlement_draft_service.py, dashboard/app.py, dashboard/page_views/settlement_drafts.py, jarca_ledger_mcp/adapters/mcp/server.py; existing app auth guard before protected page and shared service transport delegation; 현재 재작업은 service 79,131-133,285의 공유 통화/합계/선택 목적 및 승인 fingerprint 정합화이고 실제 public signature와 상태/원자 저장/읽기 adapter는 보존했다. 해당 구현 영향과 새 policy regression 및 변경 없는 정본 문서를 직접 대조했다.
- 테스트 근거: tests/test_dashboard_app.py, tests/test_settlement_draft_mcp_runtime.py, tests/test_settlement_draft_dashboard.py, tests/test_settlement_draft_policy_consistency.py
- 판정 근거: 인증 이후 DB 접근과 기존 transport 및 오류 envelope를 보존하고 UI에 SQL 업무 검증을 추가하지 않았다.
- `CON-09` — `satisfied`
- 계약: 거래 import/분류/대사가 미완료라는 이유만으로 평가 등록과 자산 마감을 막지 않는다. 거래 준비 상태와 자산 마감 상태를 별도로 표시한다.
- 구현 근거: jarca_ledger_mcp/application/settlement_draft_service.py, jarca_ledger_mcp/application/monthly_settlement_service.py; contract scenario 97-117 and monthly summary asset-state propagation; 현재 승인 계약은 동일하고 이 항목에 영향을 주는 구현/문서/test blob은 이전 검토 head와 byte-identical이다. 2개 변경 함수 및 신규 policy test의 전체 delta 영향과 현재 exact-head 생산자 실행을 별도 검증했다.
- 테스트 근거: tests/test_settlement_draft_contract_scenarios.py
- 판정 근거: 거래 미정리 blocker를 남겨도 자산 초안 승인과 마감은 가능하며 거래 rows는 그대로다.
- `CON-10` — `satisfied`
- 계약: 월별 단일 활성 초안·월말 기준일·미확인 금액 제외 정책을 생성/편집/검토/최종화 및 모든 후속 문서에 동일하게 적용한다. 활성 초안 중복은 일반/정정 구분으로 우회하지 않으며 취소는 증빙이나 기존 마감을 삭제하지 않는다. 사용자 선택은 제품 구현/시험 완료의 증거가 아니다.
- 구현 근거: jarca_ledger_mcp/application/settlement_draft_service.py, jarca_ledger_mcp/infrastructure/sqlite/migrations.py, docs/requirements/req-003_account-valuation-history.md, docs/data-model.md, docs/interface-contract.md, docs/project-structure.md, docs/runtime-flow.md; all layer single active month, fixed month-end and verified authority policy inspection; 현재 승인 계약은 동일하고 이 항목에 영향을 주는 구현/문서/test blob은 이전 검토 head와 byte-identical이다. 2개 변경 함수 및 신규 policy test의 전체 delta 영향과 현재 exact-head 생산자 실행을 별도 검증했다.
- 테스트 근거: tests/test_monthly_settlement_drafts.py, tests/test_settlement_draft_correction_contract.py, tests/test_settlement_draft_contract_scenarios.py
- 판정 근거: 월별 단일 active, 월말 고정, 미확인 금액 제외 및 child 재선택 정책의 모든 layer 소유권과 문서 전파를 확인했다. 이전 두 설계문서 누락도 현재 추가된 섹션에서 해소됐다.
- `DEC-01` — `satisfied`
- 계약: 자료 확보 전 영속 초안을 만들고 계좌별 자료를 순차적으로 채우는 흐름이 필요하다. 조건부 마감을 초안처럼 반복 생성하는 것으로 대체하지 않는다.
- 구현 근거: jarca_ledger_mcp/application/settlement_draft_service.py, jarca_ledger_mcp/infrastructure/sqlite/migrations.py; service 153-185, 394-396; migration 21-45; tests 54-98, 262-277; 현재 승인 계약은 동일하고 이 항목에 영향을 주는 구현/문서/test blob은 이전 검토 head와 byte-identical이다. 2개 변경 함수 및 신규 policy test의 전체 delta 영향과 현재 exact-head 생산자 실행을 별도 검증했다.
- 테스트 근거: tests/test_monthly_settlement_drafts.py, tests/test_settlement_draft_correction_contract.py
- 판정 근거: 무자료 생성은 run을 쓰지 않는다. 월말과 단일 활성 초안, 생성 재시도 및 정정 연결을 검증한다.
- `DEC-02` — `satisfied`
- 계약: 기준일 이후 자료는 사용자가 특정 평가를 직접 지정하고 이유 및 최종 승인을 남긴 경우에만 허용한다. 원본 기준일은 그대로 두고 “정확한 월말 평가액”으로 표시하지 않는다.
- 구현 근거: jarca_ledger_mcp/application/settlement_draft_service.py, jarca_ledger_mcp/application/assets_service.py; service 93-140, 261-307; tests 136-175; contract scenario 76-94; 현재 승인 계약은 동일하고 이 항목에 영향을 주는 구현/문서/test blob은 이전 검토 head와 byte-identical이다. 2개 변경 함수 및 신규 policy test의 전체 delta 영향과 현재 exact-head 생산자 실행을 별도 검증했다.
- 테스트 근거: tests/test_monthly_settlement_drafts.py, tests/test_settlement_draft_selection.py, tests/test_settlement_draft_contract_scenarios.py
- 판정 근거: 자동 미래 선택은 금지하고 직접 지정의 실제 날짜와 사유를 보존한다. 미확인 금액은 authority에서 제외하며 확인 child는 재선택한다.
- `DEC-03` — `satisfied`
- 계약: 승인은 검토한 초안 버전/증거에 결합하며 변경 후 재검토·재승인이 필요하다. 마감은 선택한 자료와 적용 금액을 불변 증거로 저장한다.
- 구현 근거: jarca_ledger_mcp/application/settlement_draft_service.py; service 133에서 totals를 private fingerprint에 결합하고 승인/최종화의 동일 fingerprint guard가 적용된다. tests227-290은 historical approval 거절과 재검토/재승인, completed stored-response replay를 구분한다.
- 테스트 근거: tests/test_monthly_settlement_drafts.py, tests/test_settlement_draft_authority.py, tests/test_settlement_draft_policy_consistency.py
- 판정 근거: 검토 금액 변경은 새로운 승인에만 적용되며 완료 이력과 frozen 원본은 보존된다.
- `DEC-04` — `satisfied`
- 계약: 취소·정정은 원본 증빙과 이전 마감을 보존한다. 정정본은 자동 교체하지 않고 정정 마감은 새 run으로 연결한다.
- 구현 근거: jarca_ledger_mcp/application/settlement_draft_service.py, jarca_ledger_mcp/application/assets_service.py; service 63-91, 153-170, 352-369; authority and correction-parent tests; 현재 승인 계약은 동일하고 이 항목에 영향을 주는 구현/문서/test blob은 이전 검토 head와 byte-identical이다. 2개 변경 함수 및 신규 policy test의 전체 delta 영향과 현재 exact-head 생산자 실행을 별도 검증했다.
- 테스트 근거: tests/test_settlement_draft_authority.py, tests/test_settlement_draft_correction_contract.py
- 판정 근거: 정정 child는 검토 필요로 표시하고 자동 교체하지 않는다. 새 정정 run은 이전 run에 연결하며 기존 마감은 불변이다.
- `DEC-05` — `satisfied`
- 계약: 기존 계좌 이력, 자동 exact/as_of, 수동 자산·부채와 Dashboard/MCP 공통 서비스 경계를 유지한다. 거래 정산과 자산 마감은 분리한다.
- 구현 근거: jarca_ledger_mcp/application/settlement_draft_service.py, jarca_ledger_mcp/service.py, jarca_ledger_mcp/adapters/mcp/server.py, jarca_ledger_mcp/adapters/mcp/tool_contracts.py, jarca_ledger_mcp/adapters/streamlit/settlement_gateway.py, dashboard/page_views/settlement_drafts.py, dashboard/page_views/assets.py, dashboard/page_views/monthly_settlement.py; shared application entrypoints, thin MCP and Streamlit gateway, explicit panel actions; adapter and real MCP stdio tests; 현재 재작업은 service 79,131-133,285의 공유 통화/합계/선택 목적 및 승인 fingerprint 정합화이고 실제 public signature와 상태/원자 저장/읽기 adapter는 보존했다. 해당 구현 영향과 새 policy regression 및 변경 없는 정본 문서를 직접 대조했다.
- 테스트 근거: tests/test_settlement_draft_adapters.py, tests/test_settlement_draft_mcp_runtime.py, tests/test_settlement_draft_dashboard.py, tests/test_settlement_draft_panel_workflow.py, tests/test_settlement_draft_panel_feedback.py, tests/test_settlement_draft_liability_registration.py, tests/test_settlement_draft_policy_consistency.py
- 판정 근거: UI와 MCP는 공통 application에 위임한다. 자료 등록과 지정 및 해제, 저장과 취소, 검토와 승인 및 마감, 확정 조회와 정정 생성 경로를 제공한다.
- `DEC-06` — `satisfied`
- 계약: 문서 분류는 기존 계좌 평가·자산 마감 기능과 월정산 propagation의 동작/정책 확장이므로 기존 REQ-003을 갱신한다. 새 테이블/초안 lifecycle의 추가나 기존 문서의 제외 범위만으로 별도 ID를 만들지 않는다. 이는 문서 배치 판정이며 OQ의 제품 정책을 결정하지 않는다.
- 구현 근거: jarca_ledger_mcp/application/settlement_draft_service.py, jarca_ledger_mcp/infrastructure/sqlite/migrations.py, docs/requirements/req-003_account-valuation-history.md; service 153-185, 394-396; migration 21-45; tests 54-98, 262-277; 현재 승인 계약은 동일하고 이 항목에 영향을 주는 구현/문서/test blob은 이전 검토 head와 byte-identical이다. 2개 변경 함수 및 신규 policy test의 전체 delta 영향과 현재 exact-head 생산자 실행을 별도 검증했다.
- 테스트 근거: tests/test_monthly_settlement_drafts.py, tests/test_settlement_draft_correction_contract.py
- 판정 근거: 무자료 생성은 run을 쓰지 않는다. 월말과 단일 활성 초안, 생성 재시도 및 정정 연결을 검증한다.
- `DEC-07` — `satisfied`
- 계약: 사용자 선택 — 활성 초안: 정산 월마다 활성 초안을 하나만 허용한다. 일반/정정 초안을 같은 제한으로 관리하고 완료·취소 후 새 초안을 열 수 있다. 이미 마감한 기준일의 새 초안은 이전 run과 정정 사유를 연결하며, 동일 키 재시도는 기존 초안을 반환하고 다른 요청의 중복 생성은 충돌한다.
- 구현 근거: jarca_ledger_mcp/application/settlement_draft_service.py, jarca_ledger_mcp/infrastructure/sqlite/migrations.py; service 153-185, 394-396; migration 21-45; tests 54-98, 262-277; 현재 승인 계약은 동일하고 이 항목에 영향을 주는 구현/문서/test blob은 이전 검토 head와 byte-identical이다. 2개 변경 함수 및 신규 policy test의 전체 delta 영향과 현재 exact-head 생산자 실행을 별도 검증했다.
- 테스트 근거: tests/test_monthly_settlement_drafts.py, tests/test_settlement_draft_correction_contract.py
- 판정 근거: 무자료 생성은 run을 쓰지 않는다. 월말과 단일 활성 초안, 생성 재시도 및 정정 연결을 검증한다.
- `DEC-08` — `satisfied`
- 계약: 사용자 선택 — 정산 기준일: 정산 기준일은 정산 월의 마지막 날짜로 고정한다. 사용자가 입력했다면 월말과 일치하는지 검증하고 월정산 summary의 현재 월말 읽기 의미를 유지한다.
- 구현 근거: jarca_ledger_mcp/application/settlement_draft_service.py, jarca_ledger_mcp/infrastructure/sqlite/migrations.py; service 153-185, 394-396; migration 21-45; tests 54-98, 262-277; 현재 승인 계약은 동일하고 이 항목에 영향을 주는 구현/문서/test blob은 이전 검토 head와 byte-identical이다. 2개 변경 함수 및 신규 policy test의 전체 delta 영향과 현재 exact-head 생산자 실행을 별도 검증했다.
- 테스트 근거: tests/test_monthly_settlement_drafts.py, tests/test_settlement_draft_correction_contract.py
- 판정 근거: 무자료 생성은 run을 쓰지 않는다. 월말과 단일 활성 초안, 생성 재시도 및 정정 연결을 검증한다.
- `DEC-09` — `satisfied`
- 계약: 사용자 선택 — 미확인 자료: 미확인 자료는 초안에서 선택·검토할 수 있으나 최종 금액에 반영하려면 append-only 확인/정정 자료를 명시적으로 다시 선택하고 재검토·승인해야 한다. 끝내 확인되지 않은 항목은 누락/제외로 표시하고 조건부 마감 시 그 누락을 승인한다. 기존 verified authority를 유지한다.
- 구현 근거: jarca_ledger_mcp/application/settlement_draft_service.py, jarca_ledger_mcp/application/assets_service.py; service 93-140, 261-307; tests 136-175; contract scenario 76-94; 현재 승인 계약은 동일하고 이 항목에 영향을 주는 구현/문서/test blob은 이전 검토 head와 byte-identical이다. 2개 변경 함수 및 신규 policy test의 전체 delta 영향과 현재 exact-head 생산자 실행을 별도 검증했다.
- 테스트 근거: tests/test_monthly_settlement_drafts.py, tests/test_settlement_draft_selection.py, tests/test_settlement_draft_contract_scenarios.py
- 판정 근거: 자동 미래 선택은 금지하고 직접 지정의 실제 날짜와 사유를 보존한다. 미확인 금액은 authority에서 제외하며 확인 child는 재선택한다.
- `DOC-REQ-structural` — `satisfied`
- 계약: - 조치: 갱신 - 경로: docs/requirements/req-003_account-valuation-history.md - 문서 ID: REQ-003 - 제목: 계좌 기준일 평가 이력과 자산 마감 연동 - 변경 내용: 기존 ID·파일명·제목을 유지하고 초안 생성/편집/취소, 계좌별 직접 지정, 날짜 차이와 대체 승인, 대상 갱신, 검토 버전/fingerprint, 최종화·정정 초안 및 공통 adapter 요구사항/인수 기준을 추가한다. 미래 제외 규칙을 자동/직접 마감과 승인된 초안 예외로 분리한다. 월별 단일 활성 초안과 월말 기준일 검증을 추가하고 미확인 선택·검토는 허용하되 확인/정정 자료의 명시적 재선택·재검토·승인 전 금액 합산을 금지한다. 미확인으로 남은 항목은 누락/제외 및 조건부 누락 승인으로 처리한다. 기존 append-only, 정수/NULL, 대표 부채, no-fake-transaction, auth/menu·읽기 전용 계약을 유지한다. revision과 변경 이력을 갱신하고 기존 12/13 추적성을 보존하면서 이번 근거 15, 이번 구현 PR 미정을 구분한다. - 포함할 내용: 무자료 생성과 no-close, 같은 키 재사용/다른 payload 충돌, 일반/정정 통합 월별 단일 활성 초안, 완료/취소 후 재생성과 기존 마감의 정정 연결, 월말 고정 기준일과 입력 일치 검증, 대상의 명시적 갱신, 준비 상태와 금액의 NULL/0, 계좌/통화/목적/대표 부채 검증, exact/carried_before/manual_substitute와 자동 미래 금지, 이후 자료의 원본 날짜·사유·승인, 미확인 초안 선택/검토, 확인/정정 자료의 명시적 재선택·재검토·승인, 미확인 금액 합산 금지 및 미해소 항목의 승인된 누락/제외, 잠정 합계·완전성·누락/제외/대체 구분, 수동 자산/부채 보존 및 drift, 검토 이후 모든 의미 있는 변경의 재승인, 단일 트랜잭션과 동시 편집 충돌/no-partial-write, persisted evidence 기반 재시도, immutable close와 명시적 정정, 거래/자산 상태 분리, Dashboard/MCP 동등 동작, schema migration 및 기존 API/보안/legacy 회귀를 정상·경계·실패 사례로 명세한다. - 제외할 내용: 거래 완료/성과 추정 보장, FX/가격 API, 자동 승인·자동 미래 선택, 인증/메뉴 재설계, 실제 금융자료, 원본 날짜 변경 및 이력 삭제. - 근거: REQ-003.02/.06/.07/.08/.09의 기존 기능과 정책을 직접 확장하는 작업이다. 영속 초안이 새 aggregate라는 이유만으로 별도 REQ-004를 만들지 않고 현 작성 규칙에 따라 갱신한다. 동일 ID를 유지하므로 신규 ID 할당은 없다.
- 구현 근거: docs/requirements/req-003_account-valuation-history.md; exact approved path exists; metadata 1-13; requirements 53-181; new AC 201-539; old AC 541-648; traceability 665-667; 현재 승인 계약은 동일하고 이 항목에 영향을 주는 구현/문서/test blob은 이전 검토 head와 byte-identical이다. 2개 변경 함수 및 신규 policy test의 전체 delta 영향과 현재 exact-head 생산자 실행을 별도 검증했다.
- 테스트 근거: tests/test_settlement_draft_docs.py, tests/test_requirement_docs.py
- 판정 근거: 정본 경로와 문서 구조를 확인했다. REQ metadata 및 11개 번호 섹션, 영향 범위와 인수 기준 및 traceability는 trusted README와 TEMPLATE에 대조했다.
- `DOC-REQ-semantic` — `satisfied`
- 계약: - 조치: 갱신 - 경로: docs/requirements/req-003_account-valuation-history.md - 문서 ID: REQ-003 - 제목: 계좌 기준일 평가 이력과 자산 마감 연동 - 변경 내용: 기존 ID·파일명·제목을 유지하고 초안 생성/편집/취소, 계좌별 직접 지정, 날짜 차이와 대체 승인, 대상 갱신, 검토 버전/fingerprint, 최종화·정정 초안 및 공통 adapter 요구사항/인수 기준을 추가한다. 미래 제외 규칙을 자동/직접 마감과 승인된 초안 예외로 분리한다. 월별 단일 활성 초안과 월말 기준일 검증을 추가하고 미확인 선택·검토는 허용하되 확인/정정 자료의 명시적 재선택·재검토·승인 전 금액 합산을 금지한다. 미확인으로 남은 항목은 누락/제외 및 조건부 누락 승인으로 처리한다. 기존 append-only, 정수/NULL, 대표 부채, no-fake-transaction, auth/menu·읽기 전용 계약을 유지한다. revision과 변경 이력을 갱신하고 기존 12/13 추적성을 보존하면서 이번 근거 15, 이번 구현 PR 미정을 구분한다. - 포함할 내용: 무자료 생성과 no-close, 같은 키 재사용/다른 payload 충돌, 일반/정정 통합 월별 단일 활성 초안, 완료/취소 후 재생성과 기존 마감의 정정 연결, 월말 고정 기준일과 입력 일치 검증, 대상의 명시적 갱신, 준비 상태와 금액의 NULL/0, 계좌/통화/목적/대표 부채 검증, exact/carried_before/manual_substitute와 자동 미래 금지, 이후 자료의 원본 날짜·사유·승인, 미확인 초안 선택/검토, 확인/정정 자료의 명시적 재선택·재검토·승인, 미확인 금액 합산 금지 및 미해소 항목의 승인된 누락/제외, 잠정 합계·완전성·누락/제외/대체 구분, 수동 자산/부채 보존 및 drift, 검토 이후 모든 의미 있는 변경의 재승인, 단일 트랜잭션과 동시 편집 충돌/no-partial-write, persisted evidence 기반 재시도, immutable close와 명시적 정정, 거래/자산 상태 분리, Dashboard/MCP 동등 동작, schema migration 및 기존 API/보안/legacy 회귀를 정상·경계·실패 사례로 명세한다. - 제외할 내용: 거래 완료/성과 추정 보장, FX/가격 API, 자동 승인·자동 미래 선택, 인증/메뉴 재설계, 실제 금융자료, 원본 날짜 변경 및 이력 삭제. - 근거: REQ-003.02/.06/.07/.08/.09의 기존 기능과 정책을 직접 확장하는 작업이다. 영속 초안이 새 aggregate라는 이유만으로 별도 REQ-004를 만들지 않고 현 작성 규칙에 따라 갱신한다. 동일 ID를 유지하므로 신규 ID 할당은 없다.
- 구현 근거: docs/requirements/req-003_account-valuation-history.md, jarca_ledger_mcp/application/settlement_draft_service.py; metadata 1-13; requirements 53-181; new AC 201-539; old AC 541-648; traceability 665-667; 현재 재작업은 service 79,131-133,285의 공유 통화/합계/선택 목적 및 승인 fingerprint 정합화이고 실제 public signature와 상태/원자 저장/읽기 adapter는 보존했다. 해당 구현 영향과 새 policy regression 및 변경 없는 정본 문서를 직접 대조했다.
- 테스트 근거: tests/test_settlement_draft_docs.py, tests/test_monthly_settlement_drafts.py, tests/test_settlement_draft_policy_consistency.py
- 판정 근거: REQ-003 ID와 제목 및 기존 추적성을 유지하며 기존 AC 10개 중 9개는 원문 보존, migration AC는 schema13 현재 버전으로 승인된 확장을 반영했다. v12 이름의 테스트도 실제 단언은 13이므로 stale verification으로 보지 않는다.
- `DOC-DM-structural` — `satisfied`
- 계약: - 조치: 갱신 - 경로: docs/data-model.md - 변경 내용: 초안과 항목의 영속 엔터티를 추가해 초안→대상 항목, 항목→계좌/valuation, 초안→최종 run, 정정 초안→이전 run 관계와 필수/선택성·유일성·삭제 금지를 기록한다. 초안의 월·기준일·상태·작성자·시각·메모·버전·중복 키·완료 연결, 항목의 source identity·선택 자료·방식/사유·포함/제외·선택자·시각·버전·승인 결합 정보를 명세한다. 수동 자료는 검토 증거 값을 고정하고 원본 drift를 검출한다. 최종 run/rows에는 실제 날짜·방향 있는 차이·확인 상태·적용 금액·분류·사유·승인·누락/경고·초안 버전/fingerprint를 보존한다. 일반/정정 통합 정산 월별 활성 초안 유일성을 저장 제약과 동시성 검증으로 강제하고 완료·취소 이력은 보존한다. 월·기준일의 월말 일치 검증을 명세한다. 미확인 항목은 검토용 선택과 금액 authority를 분리하며 확인/정정 child의 명시적 재선택 후에만 합산한다. 미확인으로 남은 항목의 제외 사유와 누락 승인도 보존한다. 기존 correction/idempotency 제약, read alias와 nullable 금액 의미를 보존하고 schema 12→새 버전의 additive·반복 가능한 migration/legacy 조회/실패 및 백업 복구 경계를 문서화한다. - 근거: schema 12에는 초안/항목 persistence가 없으며 기존 account_valuations와 run/rows를 재사용·연결해야 한다. 원본 이력의 변경/삭제나 guessed migration은 필요하지 않다.
- 구현 근거: docs/data-model.md; exact approved path exists; settlement draft entities and fields 178-195; 현재 승인 계약은 동일하고 이 항목에 영향을 주는 구현/문서/test blob은 이전 검토 head와 byte-identical이다. 2개 변경 함수 및 신규 policy test의 전체 delta 영향과 현재 exact-head 생산자 실행을 별도 검증했다.
- 테스트 근거: tests/test_settlement_draft_docs.py, tests/test_requirement_docs.py
- 판정 근거: 정본 경로와 문서 구조를 확인했다. REQ metadata 및 11개 번호 섹션, 영향 범위와 인수 기준 및 traceability는 trusted README와 TEMPLATE에 대조했다.
- `DOC-DM-semantic` — `satisfied`
- 계약: - 조치: 갱신 - 경로: docs/data-model.md - 변경 내용: 초안과 항목의 영속 엔터티를 추가해 초안→대상 항목, 항목→계좌/valuation, 초안→최종 run, 정정 초안→이전 run 관계와 필수/선택성·유일성·삭제 금지를 기록한다. 초안의 월·기준일·상태·작성자·시각·메모·버전·중복 키·완료 연결, 항목의 source identity·선택 자료·방식/사유·포함/제외·선택자·시각·버전·승인 결합 정보를 명세한다. 수동 자료는 검토 증거 값을 고정하고 원본 drift를 검출한다. 최종 run/rows에는 실제 날짜·방향 있는 차이·확인 상태·적용 금액·분류·사유·승인·누락/경고·초안 버전/fingerprint를 보존한다. 일반/정정 통합 정산 월별 활성 초안 유일성을 저장 제약과 동시성 검증으로 강제하고 완료·취소 이력은 보존한다. 월·기준일의 월말 일치 검증을 명세한다. 미확인 항목은 검토용 선택과 금액 authority를 분리하며 확인/정정 child의 명시적 재선택 후에만 합산한다. 미확인으로 남은 항목의 제외 사유와 누락 승인도 보존한다. 기존 correction/idempotency 제약, read alias와 nullable 금액 의미를 보존하고 schema 12→새 버전의 additive·반복 가능한 migration/legacy 조회/실패 및 백업 복구 경계를 문서화한다. - 근거: schema 12에는 초안/항목 persistence가 없으며 기존 account_valuations와 run/rows를 재사용·연결해야 한다. 원본 이력의 변경/삭제나 guessed migration은 필요하지 않다.
- 구현 근거: docs/data-model.md, jarca_ledger_mcp/application/settlement_draft_service.py; settlement draft entities and fields 178-195; 현재 재작업은 service 79,131-133,285의 공유 통화/합계/선택 목적 및 승인 fingerprint 정합화이고 실제 public signature와 상태/원자 저장/읽기 adapter는 보존했다. 해당 구현 영향과 새 policy regression 및 변경 없는 정본 문서를 직접 대조했다.
- 테스트 근거: tests/test_settlement_draft_docs.py, tests/test_monthly_settlement_drafts.py, tests/test_settlement_draft_policy_consistency.py
- 판정 근거: 승인된 필수 의미를 pinned 문서의 해당 섹션과 구현 및 참조 테스트에 대조했다.
- `DOC-IC-structural` — `satisfied`
- 계약: - 조치: 갱신 - 경로: docs/interface-contract.md - 변경 내용: 공통 초안 생성·목록·상세·수정/대상 갱신·취소·계좌 자료 지정/해제·포함/제외·검토/검증·승인 최종화·정정 초안 operation을 정의하고 실제 구현의 snake_case 함수/MCP 도구/gateway 이름과 exact signature를 고정한다. 입력에는 초안/항목 ID·기대 버전, 월·기준일, 자료 ID·선택 방식·사유, 명시적 포함/제외와 사유, 생성/마감 키, 검토 fingerprint 및 승인자·시각/근거를 기록한다. 출력에는 준비 상태·버전, 대상/선택 증거, 날짜 차이·확인 상태, 잠정 합계·완전성·누락/승인 필요 목록, 완료 run/정정 연결과 persisted replay를 정의한다. 검증/대상 부재/상태·버전·증거 drift/승인 부족/키 충돌/동시 마감 오류의 조건·재시도·no-write를 명확히 한다. 기존 success/error_code/error, 자동 selector, 기존 close/report 키와 provenance 의미, Dashboard 인증 및 MCP 인증 범위를 보존한다. 초안 사용 시 직접 마감으로 안전 검증을 우회하지 못하는 경계를 규정한다. 생성·정정 생성은 같은 월의 활성 초안 중복을 검사하고 월말 아닌 입력 기준일은 거절한다. 미확인 선택은 검토용 상태를 반환하고 합계/최종화는 금액을 제외한다. 확인/정정 child를 명시적으로 다시 선택하면 버전·검토/승인을 갱신하고, 끝내 미확인인 항목은 누락/제외 승인 대상으로만 반환한다. - 근거: 기존 MCP/gateway에는 초안 mutation이 없고 현재 close는 basis-date 자료 자동 재조회 경로다. 새 공통 계약과 legacy 경로 구분이 필요하다.
- 구현 근거: docs/interface-contract.md; exact approved path exists; shared operation signatures and response, errors, read-only and evidence contract 438-466; 현재 승인 계약은 동일하고 이 항목에 영향을 주는 구현/문서/test blob은 이전 검토 head와 byte-identical이다. 2개 변경 함수 및 신규 policy test의 전체 delta 영향과 현재 exact-head 생산자 실행을 별도 검증했다.
- 테스트 근거: tests/test_settlement_draft_docs.py, tests/test_requirement_docs.py
- 판정 근거: 정본 경로와 문서 구조를 확인했다. REQ metadata 및 11개 번호 섹션, 영향 범위와 인수 기준 및 traceability는 trusted README와 TEMPLATE에 대조했다.
- `DOC-IC-semantic` — `satisfied`
- 계약: - 조치: 갱신 - 경로: docs/interface-contract.md - 변경 내용: 공통 초안 생성·목록·상세·수정/대상 갱신·취소·계좌 자료 지정/해제·포함/제외·검토/검증·승인 최종화·정정 초안 operation을 정의하고 실제 구현의 snake_case 함수/MCP 도구/gateway 이름과 exact signature를 고정한다. 입력에는 초안/항목 ID·기대 버전, 월·기준일, 자료 ID·선택 방식·사유, 명시적 포함/제외와 사유, 생성/마감 키, 검토 fingerprint 및 승인자·시각/근거를 기록한다. 출력에는 준비 상태·버전, 대상/선택 증거, 날짜 차이·확인 상태, 잠정 합계·완전성·누락/승인 필요 목록, 완료 run/정정 연결과 persisted replay를 정의한다. 검증/대상 부재/상태·버전·증거 drift/승인 부족/키 충돌/동시 마감 오류의 조건·재시도·no-write를 명확히 한다. 기존 success/error_code/error, 자동 selector, 기존 close/report 키와 provenance 의미, Dashboard 인증 및 MCP 인증 범위를 보존한다. 초안 사용 시 직접 마감으로 안전 검증을 우회하지 못하는 경계를 규정한다. 생성·정정 생성은 같은 월의 활성 초안 중복을 검사하고 월말 아닌 입력 기준일은 거절한다. 미확인 선택은 검토용 상태를 반환하고 합계/최종화는 금액을 제외한다. 확인/정정 child를 명시적으로 다시 선택하면 버전·검토/승인을 갱신하고, 끝내 미확인인 항목은 누락/제외 승인 대상으로만 반환한다. - 근거: 기존 MCP/gateway에는 초안 mutation이 없고 현재 close는 basis-date 자료 자동 재조회 경로다. 새 공통 계약과 legacy 경로 구분이 필요하다.
- 구현 근거: docs/interface-contract.md, jarca_ledger_mcp/application/settlement_draft_service.py; shared operation signatures and response, errors, read-only and evidence contract 438-466; 현재 재작업은 service 79,131-133,285의 공유 통화/합계/선택 목적 및 승인 fingerprint 정합화이고 실제 public signature와 상태/원자 저장/읽기 adapter는 보존했다. 해당 구현 영향과 새 policy regression 및 변경 없는 정본 문서를 직접 대조했다.
- 테스트 근거: tests/test_settlement_draft_docs.py, tests/test_monthly_settlement_drafts.py, tests/test_settlement_draft_policy_consistency.py
- 판정 근거: 승인된 필수 의미를 pinned 문서의 해당 섹션과 구현 및 참조 테스트에 대조했다.
- `DOC-PS-structural` — `satisfied`
- 계약: - 조치: 갱신 - 경로: docs/project-structure.md - 변경 내용: 기존 application/monthly_settlement_service.py의 read model을 보존하면서 초안 lifecycle의 application-layer 책임과 account_valuation_service.py(등록·검증·정정), assets_service.py(금액/증거·run 최종화), infrastructure/sqlite/schema.py/migrations.py(영속 제약/이주)의 소유권을 명확히 한다. service.py 공개 re-export, adapters/mcp/server.py/tool_contracts.py, adapters/streamlit gateway와 dashboard/page_views/monthly_settlement.py/assets.py의 연결을 실제 경로로 기록한다. 새 파일을 추가하면 그 exact 경로·책임·진입점을 문서에 반영하되 UI/MCP direct SQL, application의 Dashboard 역의존과 중복 업무 검증을 금지한다. 월별 활성 초안 유일성·월말 검증·미확인 금액 제외/확인 후 재선택의 책임을 공통 application과 SQLite 제약에 두고 adapter별 예외를 만들지 않는다. 각 변경에 대응하는 합성 테스트, 문서 검증과 기존 auth/menu/legacy 회귀 위치를 연결한다. - 근거: 기존 구조 문서는 service→SQLite와 page/tool→gateway/service 방향을 정본으로 규정한다. 새 초안 작업은 해당 책임 경계를 확장하며 별도 UI 전용 마감 로직을 만들지 않는다.
- 구현 근거: docs/project-structure.md; exact approved path exists; ownership table 214-226; 현재 승인 계약은 동일하고 이 항목에 영향을 주는 구현/문서/test blob은 이전 검토 head와 byte-identical이다. 2개 변경 함수 및 신규 policy test의 전체 delta 영향과 현재 exact-head 생산자 실행을 별도 검증했다.
- 테스트 근거: tests/test_settlement_draft_docs.py, tests/test_requirement_docs.py
- 판정 근거: 정본 경로와 문서 구조를 확인했다. REQ metadata 및 11개 번호 섹션, 영향 범위와 인수 기준 및 traceability는 trusted README와 TEMPLATE에 대조했다.
- `DOC-PS-semantic` — `satisfied`
- 계약: - 조치: 갱신 - 경로: docs/project-structure.md - 변경 내용: 기존 application/monthly_settlement_service.py의 read model을 보존하면서 초안 lifecycle의 application-layer 책임과 account_valuation_service.py(등록·검증·정정), assets_service.py(금액/증거·run 최종화), infrastructure/sqlite/schema.py/migrations.py(영속 제약/이주)의 소유권을 명확히 한다. service.py 공개 re-export, adapters/mcp/server.py/tool_contracts.py, adapters/streamlit gateway와 dashboard/page_views/monthly_settlement.py/assets.py의 연결을 실제 경로로 기록한다. 새 파일을 추가하면 그 exact 경로·책임·진입점을 문서에 반영하되 UI/MCP direct SQL, application의 Dashboard 역의존과 중복 업무 검증을 금지한다. 월별 활성 초안 유일성·월말 검증·미확인 금액 제외/확인 후 재선택의 책임을 공통 application과 SQLite 제약에 두고 adapter별 예외를 만들지 않는다. 각 변경에 대응하는 합성 테스트, 문서 검증과 기존 auth/menu/legacy 회귀 위치를 연결한다. - 근거: 기존 구조 문서는 service→SQLite와 page/tool→gateway/service 방향을 정본으로 규정한다. 새 초안 작업은 해당 책임 경계를 확장하며 별도 UI 전용 마감 로직을 만들지 않는다.
- 구현 근거: docs/project-structure.md, jarca_ledger_mcp/application/settlement_draft_service.py; 이전 review71 DOC-PS-semantic 보완: docs/project-structure.md 229-252에 실제 service re-export, MCP server와 tool_contracts, settlement_gateway, reusable panel과 두 page entrypoint 연결을 추가했다. 246-252에 월별 active partial unique index, 월말 검증 및 unverified authority와 명시적 child 재선택의 공통 책임과 synthetic test를 대응한다. 신규 named 문서 regression도 해당 연결을 검증한다.; 현재 재작업은 service 79,131-133,285의 공유 통화/합계/선택 목적 및 승인 fingerprint 정합화이고 실제 public signature와 상태/원자 저장/읽기 adapter는 보존했다. 해당 구현 영향과 새 policy regression 및 변경 없는 정본 문서를 직접 대조했다.
- 테스트 근거: tests/test_settlement_draft_docs.py, tests/test_monthly_settlement_drafts.py, tests/test_settlement_draft_policy_consistency.py
- 판정 근거: 이전 최소 보완 요청의 actual 경로와 책임, 진입점 및 의존 방향과 세 공통 정책 소유권이 모두 문서화됐다. 기존 기능이나 adapter 예외를 새로 만들지 않았다.
- `DOC-RF-structural` — `satisfied`
- 계약: - 조치: 갱신 - 경로: docs/runtime-flow.md - 변경 내용: 인증→명시적 무자료 초안 생성→대상 동결→자료 등록/지정·해제/제외→읽기 전용 검토→버전·증거에 결합한 승인→동일 transaction에서 증거 재검증·run/rows 저장·초안 완료→불변 조회 흐름을 정의한다. 생성/정정 생성 guard는 일반/정정 통합 월별 단일 활성 초안과 월말 일치를 검증한다. 완료·취소 후 재생성은 가능하지만 기존 마감이 있으면 이전 run과 정정 사유를 연결한다. 미확인 자료 선택은 검토 필요로 전이하며 합계에는 포함하지 않는다. 확인/정정 자료를 명시적으로 재선택하면 재검토·재승인 후 최종화하고, 끝내 확인되지 않으면 누락/제외 및 조건부 누락 승인을 거친다. 변경/정정/대상 갱신은 승인을 무효화하고 검토 단계로 돌아간다. 취소는 기존 증거/run을 삭제하지 않으며 재마감은 이전 run 연결·사유·단일 correction 제약을 유지한다. 거래 준비와 자산 상태를 별도로 표시하고 외부 가격/환율 호출·추정 거래 생성은 없다. SQLite 동시 편집·키/버전 충돌, stale approval, 정정본 등장, 중복 최종화, DB 실패에 대해 no-partial-write·rollback·안전 재시도/사용자 재검토와 반환 오류를 기록한다. 관찰 정보는 초안/버전/run 상관 ID와 상태/경고 코드로 제한하고 credential/실제 계좌 자료를 로그에 남기지 않는다. - 근거: 현 runtime은 read-only preview→live authority 기반 close이며 영속 준비 단계가 없다. 기존 fingerprint drift·원자 저장·persisted replay guard를 초안 선택에 결합해 확장해야 한다.
- 구현 근거: docs/runtime-flow.md; exact approved path exists; lifecycle and failure/recovery guards 243-259; 현재 승인 계약은 동일하고 이 항목에 영향을 주는 구현/문서/test blob은 이전 검토 head와 byte-identical이다. 2개 변경 함수 및 신규 policy test의 전체 delta 영향과 현재 exact-head 생산자 실행을 별도 검증했다.
- 테스트 근거: tests/test_settlement_draft_docs.py, tests/test_requirement_docs.py
- 판정 근거: 정본 경로와 문서 구조를 확인했다. REQ metadata 및 11개 번호 섹션, 영향 범위와 인수 기준 및 traceability는 trusted README와 TEMPLATE에 대조했다.
- `DOC-RF-semantic` — `satisfied`
- 계약: - 조치: 갱신 - 경로: docs/runtime-flow.md - 변경 내용: 인증→명시적 무자료 초안 생성→대상 동결→자료 등록/지정·해제/제외→읽기 전용 검토→버전·증거에 결합한 승인→동일 transaction에서 증거 재검증·run/rows 저장·초안 완료→불변 조회 흐름을 정의한다. 생성/정정 생성 guard는 일반/정정 통합 월별 단일 활성 초안과 월말 일치를 검증한다. 완료·취소 후 재생성은 가능하지만 기존 마감이 있으면 이전 run과 정정 사유를 연결한다. 미확인 자료 선택은 검토 필요로 전이하며 합계에는 포함하지 않는다. 확인/정정 자료를 명시적으로 재선택하면 재검토·재승인 후 최종화하고, 끝내 확인되지 않으면 누락/제외 및 조건부 누락 승인을 거친다. 변경/정정/대상 갱신은 승인을 무효화하고 검토 단계로 돌아간다. 취소는 기존 증거/run을 삭제하지 않으며 재마감은 이전 run 연결·사유·단일 correction 제약을 유지한다. 거래 준비와 자산 상태를 별도로 표시하고 외부 가격/환율 호출·추정 거래 생성은 없다. SQLite 동시 편집·키/버전 충돌, stale approval, 정정본 등장, 중복 최종화, DB 실패에 대해 no-partial-write·rollback·안전 재시도/사용자 재검토와 반환 오류를 기록한다. 관찰 정보는 초안/버전/run 상관 ID와 상태/경고 코드로 제한하고 credential/실제 계좌 자료를 로그에 남기지 않는다. - 근거: 현 runtime은 read-only preview→live authority 기반 close이며 영속 준비 단계가 없다. 기존 fingerprint drift·원자 저장·persisted replay guard를 초안 선택에 결합해 확장해야 한다.
- 구현 근거: docs/runtime-flow.md, jarca_ledger_mcp/application/settlement_draft_service.py; 이전 review71 DOC-RF-semantic 보완: docs/runtime-flow.md 262-274의 Cancellation and reopening에서 active 상태와 version 및 actor/reason guard, BEGIN IMMEDIATE, cancel audit, 승인 무효화, 이력 보존, rollback과 재시도, 신규 키와 이전 마감 정정 연결을 명시했다. service 202-211 및394-396과153-185, 기존 cancellation/correction tests 및 신규 named 문서 regression에 대조했다.; 현재 재작업은 service 79,131-133,285의 공유 통화/합계/선택 목적 및 승인 fingerprint 정합화이고 실제 public signature와 상태/원자 저장/읽기 adapter는 보존했다. 해당 구현 영향과 새 policy regression 및 변경 없는 정본 문서를 직접 대조했다.
- 테스트 근거: tests/test_settlement_draft_docs.py, tests/test_monthly_settlement_drafts.py, tests/test_settlement_draft_policy_consistency.py
- 판정 근거: 취소와 재생성의 승인된 상태 전이가 실제 구현에 맞게 명시됐다. 같은 create key의 과거 초안 재사용과 새 키의 신규 초안 생성, 최신 prior run 및 정정 사유를 구분했고 원본 증거와 마감 삭제가 없다.
- `BASE-REQ-003.01-AC01` — `satisfied`
- 계약: REQ-003.01-AC01 — migration and preservation Cases (정상/경계/실패): 정상 schema 12 init twice; 경계 schema 11 legacy DB; 실패 malformed legacy DB. State Invariants: legacy tables/rows remain; migration repeats without duplicate columns. 판정 기준: schema_version=12, required tables/columns/indexes exist and old rows remain. 검증: tests/test_account_valuations.py::test_account_valuation_schema_is_v12_and_idempotent, tests/test_issue_12_regressions.py::test_schema12_migration_preserves_legacy_rows_indexes_and_is_idempotent. 검증 분류: level=integration; backend=sqlite
- 구현 근거: docs/requirements/req-003_account-valuation-history.md; REQ current AC REQ-003.01-AC01; pinned base and head whole block comparison; referenced existing test bodies reviewed; 현재 승인 계약은 동일하고 이 항목에 영향을 주는 구현/문서/test blob은 이전 검토 head와 byte-identical이다. 2개 변경 함수 및 신규 policy test의 전체 delta 영향과 현재 exact-head 생산자 실행을 별도 검증했다.
- 테스트 근거: tests/test_account_valuations.py, tests/test_issue_12_regressions.py, tests/test_contract_regression.py, tests/test_service.py
- 판정 근거: schema 11 legacy 보존 및 반복 초기화와 malformed failure 의미를 유지하고 현재 schema_version만 12에서 13으로 승인된 additive migration에 맞춰 변경했다. 참조 테스트는 실제로 13을 단언한다.
- `BASE-REQ-003.02-AC01` — `satisfied`
- 계약: REQ-003.02-AC01 — selection policy Cases (정상/경계/실패): exact verified; as_of carry-forward; future/unverified/ambiguous excluded/warned. State Invariants: no future/unverified row is selected. 판정 기준: exact returns same-date verified leaf; as_of returns latest prior verified and age/warning. 검증: tests/test_account_valuations.py::test_select_exact_and_as_of_excludes_unverified_and_reports_carry_forward, source _account_valuation_items(). 검증 분류: level=unit; backend=application
- 구현 근거: docs/requirements/req-003_account-valuation-history.md; REQ current AC REQ-003.02-AC01; pinned base and head whole block comparison; referenced existing test bodies reviewed; 현재 승인 계약은 동일하고 이 항목에 영향을 주는 구현/문서/test blob은 이전 검토 head와 byte-identical이다. 2개 변경 함수 및 신규 policy test의 전체 delta 영향과 현재 exact-head 생산자 실행을 별도 검증했다.
- 테스트 근거: tests/test_account_valuations.py, tests/test_issue_12_regressions.py, tests/test_contract_regression.py, tests/test_service.py
- 판정 근거: 기존 인수 판정과 검증 및 상태 불변조건을 원문 그대로 보존했다.
- `BASE-REQ-003.03-AC01` — `satisfied`
- 계약: REQ-003.03-AC01 — idempotent correction Cases (정상/경계/실패): same payload reuse; different payload conflict; second correction fails. State Invariants: one row/child per operation and original immutable. 판정 기준: exact error codes and count 2 after one correction. 검증: tests/test_account_valuations.py::test_register_same_idempotency_payload_reuses_row_and_changed_payload_conflicts, tests/test_account_valuations.py::test_correction_is_append_only_reasoned_and_single_child, tests/test_issue_12_regressions.py::test_empty_conditional_close_is_closed_and_second_close_requires_correction. 검증 분류: level=integration; backend=sqlite
- 구현 근거: docs/requirements/req-003_account-valuation-history.md; REQ current AC REQ-003.03-AC01; pinned base and head whole block comparison; referenced existing test bodies reviewed; 현재 승인 계약은 동일하고 이 항목에 영향을 주는 구현/문서/test blob은 이전 검토 head와 byte-identical이다. 2개 변경 함수 및 신규 policy test의 전체 delta 영향과 현재 exact-head 생산자 실행을 별도 검증했다.
- 테스트 근거: tests/test_account_valuations.py, tests/test_issue_12_regressions.py, tests/test_contract_regression.py, tests/test_service.py
- 판정 근거: 기존 인수 판정과 검증 및 상태 불변조건을 원문 그대로 보존했다.
- `BASE-REQ-003.04-AC01` — `satisfied`
- 계약: REQ-003.04-AC01 — precision and representative loan Cases (정상/경계/실패): integer zero; NULL optional metrics; loan missing definition rejected. State Invariants: no float amount and no double sum. 판정 기준: optional fields round-trip exactly and loan definition validation is enforced. 검증: test_correction_preserves_optional_fields_unless_overridden, _validate_common() and schema static checks. 검증 분류: level=static; backend=sqlite
- 구현 근거: docs/requirements/req-003_account-valuation-history.md; REQ current AC REQ-003.04-AC01; pinned base and head whole block comparison; referenced existing test bodies reviewed; 현재 재작업은 service 79,131-133,285의 공유 통화/합계/선택 목적 및 승인 fingerprint 정합화이고 실제 public signature와 상태/원자 저장/읽기 adapter는 보존했다. 해당 구현 영향과 새 policy regression 및 변경 없는 정본 문서를 직접 대조했다.
- 테스트 근거: tests/test_account_valuations.py, tests/test_issue_12_regressions.py, tests/test_contract_regression.py, tests/test_service.py, tests/test_settlement_draft_policy_consistency.py
- 판정 근거: 기존 인수 판정과 검증 및 상태 불변조건을 원문 그대로 보존했다.
- `BASE-REQ-003.05-AC01` — `satisfied`
- 계약: REQ-003.05-AC01 — authority separation Cases (정상/경계/실패): dated candidate; late historical candidate; name-only update. State Invariants: current/latest display cannot roll backward and candidate is unverified. 판정 기준: dated account write creates only unverified candidate; name-only does not. 검증: test_account_balance_write_records_unverified_candidate_only_with_real_basis_date, test_account_name_only_update_does_not_create_candidate. 검증 분류: level=unit; backend=application
- 구현 근거: docs/requirements/req-003_account-valuation-history.md; REQ current AC REQ-003.05-AC01; pinned base and head whole block comparison; referenced existing test bodies reviewed; 현재 승인 계약은 동일하고 이 항목에 영향을 주는 구현/문서/test blob은 이전 검토 head와 byte-identical이다. 2개 변경 함수 및 신규 policy test의 전체 delta 영향과 현재 exact-head 생산자 실행을 별도 검증했다.
- 테스트 근거: tests/test_account_valuations.py, tests/test_issue_12_regressions.py, tests/test_contract_regression.py, tests/test_service.py
- 판정 근거: 기존 인수 판정과 검증 및 상태 불변조건을 원문 그대로 보존했다.
- `BASE-REQ-003.06-AC01` — `satisfied`
- 계약: REQ-003.06-AC01 — preview and approval Cases (정상/경계/실패): complete exact close; incomplete draft; missing approval rejected. State Invariants: preview row count unchanged; no unsafe evidence approved. 판정 기준: preview is read-only and close returns conditional_approval_required without metadata. 검증: test_manual_asset_update_deactivate_preview_and_close_correction_policy, preview_asset_snapshot_close(). 검증 분류: level=integration; backend=application
- 구현 근거: docs/requirements/req-003_account-valuation-history.md; REQ current AC REQ-003.06-AC01; pinned base and head whole block comparison; referenced existing test bodies reviewed; 현재 재작업은 service 79,131-133,285의 공유 통화/합계/선택 목적 및 승인 fingerprint 정합화이고 실제 public signature와 상태/원자 저장/읽기 adapter는 보존했다. 해당 구현 영향과 새 policy regression 및 변경 없는 정본 문서를 직접 대조했다.
- 테스트 근거: tests/test_account_valuations.py, tests/test_issue_12_regressions.py, tests/test_contract_regression.py, tests/test_service.py, tests/test_settlement_draft_policy_consistency.py
- 판정 근거: 기존 인수 판정과 검증 및 상태 불변조건을 원문 그대로 보존했다.
- `BASE-REQ-003.07-AC01` — `satisfied`
- 계약: REQ-003.07-AC01 — immutable close correction Cases (정상/경계/실패): first close; same-date correction; second unreasoned close. State Invariants: old run/rows remain and latest run alone reports. 판정 기준: correction_of_run_id, count, and net worth match. 검증: test_manual_asset_update_deactivate_preview_and_close_correction_policy, assets_service.py close path. 검증 분류: level=integration; backend=sqlite
- 구현 근거: docs/requirements/req-003_account-valuation-history.md; REQ current AC REQ-003.07-AC01; pinned base and head whole block comparison; referenced existing test bodies reviewed; 현재 재작업은 service 79,131-133,285의 공유 통화/합계/선택 목적 및 승인 fingerprint 정합화이고 실제 public signature와 상태/원자 저장/읽기 adapter는 보존했다. 해당 구현 영향과 새 policy regression 및 변경 없는 정본 문서를 직접 대조했다.
- 테스트 근거: tests/test_account_valuations.py, tests/test_issue_12_regressions.py, tests/test_contract_regression.py, tests/test_service.py, tests/test_settlement_draft_policy_consistency.py
- 판정 근거: 기존 인수 판정과 검증 및 상태 불변조건을 원문 그대로 보존했다.
- `BASE-REQ-003.08-AC01` — `satisfied`
- 계약: REQ-003.08-AC01 — reconciliation/monthly Cases (정상/경계/실패): regular ledger calculation; verified investment; missing baseline. State Invariants: no fake transaction; provenance fields present; monthly read is non-mutating. 판정 기준: status VALUATION_MANAGED for verified investment and monthly summary reads report. 검증: tests/test_service.py::test_statement_status_account_update_and_balance_reconciliation, tests/test_issue_12_regressions.py::test_reconciliation_uses_corrected_investment_leaf_without_transaction_count_change, tests/test_service.py::test_monthly_settlement_summary_read_model_foundation. 검증 분류: level=unit; backend=application
- 구현 근거: docs/requirements/req-003_account-valuation-history.md; REQ current AC REQ-003.08-AC01; pinned base and head whole block comparison; referenced existing test bodies reviewed; 현재 승인 계약은 동일하고 이 항목에 영향을 주는 구현/문서/test blob은 이전 검토 head와 byte-identical이다. 2개 변경 함수 및 신규 policy test의 전체 delta 영향과 현재 exact-head 생산자 실행을 별도 검증했다.
- 테스트 근거: tests/test_account_valuations.py, tests/test_issue_12_regressions.py, tests/test_contract_regression.py, tests/test_service.py
- 판정 근거: 기존 인수 판정과 검증 및 상태 불변조건을 원문 그대로 보존했다.
- `BASE-REQ-003.09-AC01` — `satisfied`
- 계약: REQ-003.09-AC01 — shared adapters and auth Cases (정상/경계/실패): MCP stdio/http config; authenticated Dashboard render; unauthenticated gate. State Invariants: auth precedes DB; render does not write; response envelope has success. 판정 기준: actual tool/gateway names resolve and existing auth/menu tests pass. 검증: tests/test_mcp_http_runtime.py, tests/test_dashboard_authentication_app.py, tests/test_dashboard_menu_transition.py, server.py and gateways. 검증 분류: level=integration; backend=dashboard
- 구현 근거: docs/requirements/req-003_account-valuation-history.md; REQ current AC REQ-003.09-AC01; pinned base and head whole block comparison; referenced existing test bodies reviewed; 현재 승인 계약은 동일하고 이 항목에 영향을 주는 구현/문서/test blob은 이전 검토 head와 byte-identical이다. 2개 변경 함수 및 신규 policy test의 전체 delta 영향과 현재 exact-head 생산자 실행을 별도 검증했다.
- 테스트 근거: tests/test_account_valuations.py, tests/test_issue_12_regressions.py, tests/test_contract_regression.py, tests/test_service.py
- 판정 근거: 기존 인수 판정과 검증 및 상태 불변조건을 원문 그대로 보존했다.
- `BASE-REQ-003.10-AC01` — `satisfied`
- 계약: REQ-003.10-AC01 — privacy and compatibility Cases (정상/경계/실패): synthetic fixture; redaction search; actual secret/data detection. State Invariants: no credential/token/cookie/real financial data in docs/tests/evidence. 판정 기준: semantic inventory missing=0 and ambiguous=0; placeholder=0. 검증: tests/test_requirement_docs.py, auth/menu evidence tests, repository redaction/static search. 검증 분류: level=static; backend=dashboard
- 구현 근거: docs/requirements/req-003_account-valuation-history.md; REQ current AC REQ-003.10-AC01; pinned base and head whole block comparison; referenced existing test bodies reviewed; 현재 승인 계약은 동일하고 이 항목에 영향을 주는 구현/문서/test blob은 이전 검토 head와 byte-identical이다. 2개 변경 함수 및 신규 policy test의 전체 delta 영향과 현재 exact-head 생산자 실행을 별도 검증했다.
- 테스트 근거: tests/test_account_valuations.py, tests/test_issue_12_regressions.py, tests/test_contract_regression.py, tests/test_service.py
- 판정 근거: 기존 인수 판정과 검증 및 상태 불변조건을 원문 그대로 보존했다.
### 범위 판정
- 누락: 없음
- 범위 초과: 없음
- 명세 모순: 없음
### 결론
현재 head에 대해 승인된57개 필수 criterion이 모두 satisfied이고 범위 누락/초과와 명세 모순이 없어 approve다. 이전 code review73의 부호 있는 수동 부채 합계, 지원 소문자 KRW 누락, 은행 cash_balance 재선택 정책 상충3건을 현재 source와33개 추가 회귀에 대조해 해소했다. 정규화 합계를 승인 fingerprint에 결합하고 기존 완료 응답 replay는 보존했다. 이전 spec72의 승인은 이전 head에 대한 기록이며 현재 head의 새 검토로 대체한다. Code review73 자체의 해제나 새 code-review 승인, merge를 의미하지 않는다. 생산자 exact-head431 passed,4 skipped,1 warning 및 lint 통과를 확인했고 reviewer는 제품 테스트를 실행하지 않았다.
<!-- gitea-agent:implementation-spec-review/v1 owner=jsfamily repository=jarca-ledger-mcp issue=15 pr=16 head=fa51b4dbb5acee0c42e2b33394c0607256032602 contract-sha256=347e1e9d4ef3514754f93515ccfe71d94daa880bcd4129ad3fc1989c53b0641c result-sha256=65a1e446718e8898fd0688f109f1a32ea5f531840b02bfe71744e148868032aa correlation=865ee9626bca69e61822291c5ee5b331ec0bcde2d035a881520cbfa9005f4cdb -->
이전 코드 리뷰 #73의 F-001~F-003 모두 해결 확인. 새 변경·영향 경계에서 추가 중요 결함이나 필수 검증 공백을 발견하지 못했으므로 승인한다. Merge/deployment 승인은 아니며 무결함의 증명도 아니다.
검토 범위와 이전 근거의 적용
전체 PR 변경39개 파일: 이전38개 전체 diff 검토 중 Git-blob/hash로 동일성을 검증한37개 파일의 정적 검토를 재사용했다. 이전 HEAD bae137dce77245f1f506c2a0086101b6a067c9ab 대비 delta2개 파일(jarca_ledger_mcp/application/settlement_draft_service.py, tests/test_settlement_draft_policy_consistency.py)은 전체를 새로 읽었다.
Shared summarizer, selector/registration policy, approval/finalization, frozen evidence/drift, saved response/replay 및 affected public consumers를 직접 대조했다. 과거 실행을 현재 rerun으로 재표시하지 않았다. 아래 실행은 모두 현재 exact head에 대한 reviewer 직접 실행이다.
이전 finding 해결
F-001 — 해결:settlement_draft_service.py:131-133에서 기존 _summarize_valuation_items 정책을 사용한다. 자산100·수동 부채-40의 draft/확정 top-level·nested totals/report가 모두 자산100·부채40·순자산60이다. 혼합 부호, 조회/시계열/월정산, frozen/raw evidence 보존과 replay도 committed 회귀 tests로 통과했다.
F-002 — 해결:settlement_draft_service.py:79,108,115의 기존과 동일한 KRW case normalization으로 currency="krw"의25가 반영된다. 독립 원래 재현 테스트가 통과했으며 non-KRW/공백/NULL/zero 경계와 raw/frozen currency 보존을 확인했다.
F-003 — 해결:settlement_draft_service.py:280-294의 non-investment/non-loan purpose에 cash_balance를 허용해 bank verified20의 자동/명시 선택이 일치한다. 소속·종류·대표 부채·날짜·verified 조건과 exact/carried/manual-substitute 및 부적합 입력의 no-write 경계가 유지된다.
정책 변경에 대한 승인·과거 자료 안전성
review_fingerprint에 corrected totals를 포함한다(:133). 실제 이전 HEAD의 public API로 생성·승인한 active draft는 기존 fingerprint로 확정 시 conflict이며 draft/items/run/snapshot rows가 바뀌지 않는다. 현재 합계로 새 review/approval 후 확정은60으로 성공했다.
실제 이전 HEAD에서 이미 completed된 close는 _review 재실행 없이 저장된 응답을 그대로 replay/get한다. 과거의 잘못된 nested totals까지 소급 재해석·수정하지 않는 immutable-history 동작이다. 이 한계를 새 close의 수정과 구별한다.
Supported base public API로 생성한 schema12 자료의 schema13 반복 migration 후 report/시계열/월정산 consumer 의미 보존도 다시 검증했다.
Reviewer 실행 근거
Isolated Python3.13 environment; mcp==1.30.0, streamlit==1.58.0, pytest==9.1.1, ruff==0.17.0; 실제 전체 package inventory와 command/source manifest를 보존했다.
Current committed suite: 431 passed,4 skipped,1 warning; exit0. Ruff check --no-cache .: All checks passed, exit0.
변경하지 않은 기존 독립 reviewer assertions + schema12 migration: 4 passed. 실제 이전 HEAD public-write approval/history probes: 2 passed.
Git-bound 실제 inventory: approved base299, prior-reviewed402, current435. 추가33개 사례, 기존 테스트 file 수정/삭제0, 신규 skip/xfail0. Canonical manifest validation, check-tests와 protected source compare 통과.
CI/status는 admission 시 빈 collection이었다. 승인 근거는 reviewer 직접 실행 및 hash-verified 정적 검토이지 CI나 구현자 완료 주장으로 대신하지 않았다.
기존4개 PDF sample/password 부재 skip을 유지했다. Starlette/httpx deprecation warning1개와 probe의 PyMuPDF 진단은 environment/dependency 관찰이며 테스트 실패가 아니다.
실제 browser·운영 DB/금융 자료·배포 검증은 수행하지 않았다. AppTest/stdio를 browser 증거로 표현하지 않는다.
Reviewer 실행의 초기 environment-allowlist 오류는 제품 실행 전에 수정했고 원본 오류를 보존했다. 통과로 재표시하지 않았다.
제품 source/test/Discovery, refs/state, source skill 수정·commit·push·merge·deploy·Issue 종료·명시 review dismiss는 하지 않았다.
<!-- gitea-agent:code-review/v1 owner=jsfamily repository=jarca-ledger-mcp issue=15 pr=16 head=fa51b4dbb5acee0c42e2b33394c0607256032602 contract-sha256=347e1e9d4ef3514754f93515ccfe71d94daa880bcd4129ad3fc1989c53b0641c -->
- Verdict: `approve`
## 독립 코드 재리뷰 결과
- Target: `jsfamily/jarca-ledger-mcp`, source Issue `#15`, PR `#16`.
- Reviewed head: `fa51b4dbb5acee0c42e2b33394c0607256032602`; base: `68212e773b94dd89b6c036e6616759542c178de3`.
- Contract SHA-256: `347e1e9d4ef3514754f93515ccfe71d94daa880bcd4129ad3fc1989c53b0641c`; exact-head spec Native 승인 `#74` 재확인.
- 이전 코드 리뷰 `#73`의 F-001~F-003 모두 해결 확인. 새 변경·영향 경계에서 추가 중요 결함이나 필수 검증 공백을 발견하지 못했으므로 승인한다. Merge/deployment 승인은 아니며 무결함의 증명도 아니다.
## 검토 범위와 이전 근거의 적용
- 전체 PR 변경39개 파일: 이전38개 전체 diff 검토 중 Git-blob/hash로 동일성을 검증한37개 파일의 정적 검토를 재사용했다. 이전 HEAD `bae137dce77245f1f506c2a0086101b6a067c9ab` 대비 delta2개 파일(`jarca_ledger_mcp/application/settlement_draft_service.py`, `tests/test_settlement_draft_policy_consistency.py`)은 전체를 새로 읽었다.
- Shared summarizer, selector/registration policy, approval/finalization, frozen evidence/drift, saved response/replay 및 affected public consumers를 직접 대조했다. 과거 실행을 현재 rerun으로 재표시하지 않았다. 아래 실행은 모두 현재 exact head에 대한 reviewer 직접 실행이다.
## 이전 finding 해결
- **F-001 — 해결:** `settlement_draft_service.py:131-133`에서 기존 `_summarize_valuation_items` 정책을 사용한다. 자산100·수동 부채-40의 draft/확정 top-level·nested totals/report가 모두 자산100·부채40·순자산60이다. 혼합 부호, 조회/시계열/월정산, frozen/raw evidence 보존과 replay도 committed 회귀 tests로 통과했다.
- **F-002 — 해결:** `settlement_draft_service.py:79,108,115`의 기존과 동일한 KRW case normalization으로 `currency="krw"`의25가 반영된다. 독립 원래 재현 테스트가 통과했으며 non-KRW/공백/NULL/zero 경계와 raw/frozen currency 보존을 확인했다.
- **F-003 — 해결:** `settlement_draft_service.py:280-294`의 non-investment/non-loan purpose에 `cash_balance`를 허용해 bank verified20의 자동/명시 선택이 일치한다. 소속·종류·대표 부채·날짜·verified 조건과 exact/carried/manual-substitute 및 부적합 입력의 no-write 경계가 유지된다.
## 정책 변경에 대한 승인·과거 자료 안전성
- `review_fingerprint`에 corrected totals를 포함한다(`:133`). 실제 이전 HEAD의 public API로 생성·승인한 active draft는 기존 fingerprint로 확정 시 `conflict`이며 draft/items/run/snapshot rows가 바뀌지 않는다. 현재 합계로 새 review/approval 후 확정은60으로 성공했다.
- 실제 이전 HEAD에서 이미 completed된 close는 `_review` 재실행 없이 저장된 응답을 그대로 replay/get한다. 과거의 잘못된 nested totals까지 소급 재해석·수정하지 않는 immutable-history 동작이다. 이 한계를 새 close의 수정과 구별한다.
- Supported base public API로 생성한 schema12 자료의 schema13 반복 migration 후 report/시계열/월정산 consumer 의미 보존도 다시 검증했다.
## Reviewer 실행 근거
- Isolated Python3.13 environment; `mcp==1.30.0`, `streamlit==1.58.0`, `pytest==9.1.1`, `ruff==0.17.0`; 실제 전체 package inventory와 command/source manifest를 보존했다.
- Current committed suite: **431 passed,4 skipped,1 warning**; exit0. Ruff `check --no-cache .`: **All checks passed**, exit0.
- 변경하지 않은 기존 독립 reviewer assertions + schema12 migration: **4 passed**. 실제 이전 HEAD public-write approval/history probes: **2 passed**.
- Git-bound 실제 inventory: approved base299, prior-reviewed402, current435. 추가33개 사례, 기존 테스트 file 수정/삭제0, 신규 skip/xfail0. Canonical manifest validation, check-tests와 protected source compare 통과.
- CI/status는 admission 시 빈 collection이었다. 승인 근거는 reviewer 직접 실행 및 hash-verified 정적 검토이지 CI나 구현자 완료 주장으로 대신하지 않았다.
- Evidence: `/opt/data/gitea-agent/logs/gitea-review-agent/runs/issue-15-pr-16-rereview-20261011T002954Z/reviewer-test-summary.json`, `/opt/data/gitea-agent/logs/gitea-review-agent/runs/issue-15-pr-16-rereview-20261011T002954Z/scope-reuse.json`, `/opt/data/gitea-agent/logs/gitea-review-agent/runs/issue-15-pr-16-rereview-20261011T002954Z/risk-matrix.json`; `/opt/data/gitea-agent/repositories/jsfamily/jarca-ledger-mcp/worktrees/issue-15/verification/issue-15-pr-16-rereview-20261011T002954Z/reviewer-manifest.json`.
## 한계·경계
- 기존4개 PDF sample/password 부재 skip을 유지했다. Starlette/httpx deprecation warning1개와 probe의 PyMuPDF 진단은 environment/dependency 관찰이며 테스트 실패가 아니다.
- 실제 browser·운영 DB/금융 자료·배포 검증은 수행하지 않았다. AppTest/stdio를 browser 증거로 표현하지 않는다.
- Reviewer 실행의 초기 environment-allowlist 오류는 제품 실행 전에 수정했고 원본 오류를 보존했다. 통과로 재표시하지 않았다.
- 제품 source/test/Discovery, refs/state, source skill 수정·commit·push·merge·deploy·Issue 종료·명시 review dismiss는 하지 않았다.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Closes #15
구현
검증 — exact source
577bd0b9122e99e2aa0ccc859eef5842f6513a72committed-577bd0b.ruff check --no-cache .: PASS, exit 0.56763e15446687b1d5b2b0ec49d0395f7efe9102d65c031dbefc0a02df252ee4; plan SHA-256:f62e7c65d31ecfd532e0ba3ab82e74a0d0876d14f94c41414bf4c126171671bc./opt/data/gitea-agent/repositories/jsfamily/jarca-ledger-mcp/worktrees/issue-15/verification/committed-577bd0b. Same-UID independent harness reviewer read-only 접근 가능; 외부/다른 UID reviewer에게 이 로컬 경로의 접근성을 주장하지 않음.제한·전달 경계
Final verified delivery head
4c5cb0627cdc1aa68b5ef4f51411d4563b0c8199(authenticated readback exact-match).committed-4c5cb06; 396 passed, 4 skipped, 1 pre-existing warning; full-suite exit0; lint exit0.da397c9f210e139d603d0c8df4e1b21073f5617e512f73115b7383a3aa12afe9; plan SHA-256:ded4cbef74fc015393ea90ff9a6e6deb1170c531f4d62a93c24f4c27c99ba782./opt/data/gitea-agent/repositories/jsfamily/jarca-ledger-mcp/worktrees/issue-15/verification/committed-4c5cb06; independent same-UID read-only evidence access receipt recorded separately; external host access not claimed./opt/data/gitea-agent/runtime/issue15-20261009T023318Z/venv/bin/python -B -m pytest -o addopts= -v --tb=short -ra -p no:cacheprovider --basetemp /opt/data/gitea-agent/repositories/jsfamily/jarca-ledger-mcp/worktrees/issue-15/verification/committed-4c5cb06/pytest-tmp tests; exit 0/opt/data/gitea-agent/runtime/issue15-20261009T023318Z/venv/bin/python -B -m ruff check --no-cache .; exit 0구현 명세 적합성 검토
4c5cb0627cdc1aa68b5ef4f51411d4563b0c8199347e1e9d4ef3514754f93515ccfe71d94daa880bcd4129ad3fc1989c53b0641crequest_changesAcceptance criteria 판정
IN-01—satisfiedIN-02—satisfiedIN-03—satisfiedIN-04—satisfiedIN-05—satisfiedIN-06—satisfiedIN-07—satisfiedIN-08—satisfiedIN-09—satisfiedIN-10—satisfiedIN-11—satisfiedIN-12—satisfiedEX-01—satisfiedEX-02—satisfiedEX-03—satisfiedEX-04—satisfiedEX-05—satisfiedEX-06—satisfiedCON-01—satisfied68212e773bCON-02—satisfiedCON-03—satisfiedCON-04—satisfiedCON-05—satisfiedCON-06—satisfiedCON-07—satisfiedCON-08—satisfiedCON-09—satisfiedCON-10—satisfiedDEC-01—satisfiedDEC-02—satisfiedDEC-03—satisfiedDEC-04—satisfiedDEC-05—satisfiedDEC-06—satisfiedDEC-07—satisfiedDEC-08—satisfiedDEC-09—satisfiedDOC-REQ-structural—satisfiedDOC-REQ-semantic—satisfiedDOC-DM-structural—satisfiedDOC-DM-semantic—satisfiedDOC-IC-structural—satisfiedDOC-IC-semantic—satisfiedDOC-PS-structural—satisfiedDOC-PS-semantic—unsatisfiedDOC-RF-structural—satisfiedDOC-RF-semantic—unsatisfiedBASE-REQ-003.01-AC01—satisfiedBASE-REQ-003.02-AC01—satisfiedBASE-REQ-003.03-AC01—satisfiedBASE-REQ-003.04-AC01—satisfiedBASE-REQ-003.05-AC01—satisfiedBASE-REQ-003.06-AC01—satisfiedBASE-REQ-003.07-AC01—satisfiedBASE-REQ-003.08-AC01—satisfiedBASE-REQ-003.09-AC01—satisfiedBASE-REQ-003.10-AC01—satisfied범위 판정
결론
핵심 초안 lifecycle과 승인 및 원자적 최종화 구현은 확인했다. 승인된 필수 문서의 프로젝트 구조 연결과 런타임 취소 및 재생성 흐름 누락 두 건 때문에 request_changes다. 해당 두 정본 문서만 실제 구현과 승인 계약에 맞게 보완하는 것이 최소 요청이다. 생산자 exact-head 검증은 396 passed, 4 skipped 및 lint 통과이며 reviewer의 제품 독립 실행이나 CI 성공으로 표현하지 않는다. schema12만을 입력으로 한 별도 실행은 확인하지 않았으나 공통 additive DDL 및 기존 회귀 근거를 함께 검토했고 그 부재만으로 추가 필수 테스트를 요구하지 않는다.
구현 재작업 결과
4c5cb0627cdc1aa68b5ef4f51411d4563b0c8199bae137dce77245f1f506c2a0086101b6a067c9ab347e1e9d4ef3514754f93515ccfe71d94daa880bcd4129ad3fc1989c53b0641crework_delivered지적 처리
resolvedresolved최종 검증
다음 단계
Reviewer가 rework head를 새 snapshot으로 다시 검토해야 하며 이 comment는 기존
REQUEST_CHANGES를 해제하거나 승인을 의미하지 않는다.구현 명세 적합성 검토
bae137dce77245f1f506c2a0086101b6a067c9ab347e1e9d4ef3514754f93515ccfe71d94daa880bcd4129ad3fc1989c53b0641capproveAcceptance criteria 판정
IN-01—satisfiedIN-02—satisfiedIN-03—satisfiedIN-04—satisfiedIN-05—satisfiedIN-06—satisfiedIN-07—satisfiedIN-08—satisfiedIN-09—satisfiedIN-10—satisfiedIN-11—satisfiedIN-12—satisfiedEX-01—satisfiedEX-02—satisfiedEX-03—satisfiedEX-04—satisfiedEX-05—satisfiedEX-06—satisfiedCON-01—satisfiedCON-02—satisfiedCON-03—satisfiedCON-04—satisfiedCON-05—satisfiedCON-06—satisfiedCON-07—satisfiedCON-08—satisfiedCON-09—satisfiedCON-10—satisfiedDEC-01—satisfiedDEC-02—satisfiedDEC-03—satisfiedDEC-04—satisfiedDEC-05—satisfiedDEC-06—satisfiedDEC-07—satisfiedDEC-08—satisfiedDEC-09—satisfiedDOC-REQ-structural—satisfiedDOC-REQ-semantic—satisfiedDOC-DM-structural—satisfiedDOC-DM-semantic—satisfiedDOC-IC-structural—satisfiedDOC-IC-semantic—satisfiedDOC-PS-structural—satisfiedDOC-PS-semantic—satisfiedDOC-RF-structural—satisfiedDOC-RF-semantic—satisfiedBASE-REQ-003.01-AC01—satisfiedBASE-REQ-003.02-AC01—satisfiedBASE-REQ-003.03-AC01—satisfiedBASE-REQ-003.04-AC01—satisfiedBASE-REQ-003.05-AC01—satisfiedBASE-REQ-003.06-AC01—satisfiedBASE-REQ-003.07-AC01—satisfiedBASE-REQ-003.08-AC01—satisfiedBASE-REQ-003.09-AC01—satisfiedBASE-REQ-003.10-AC01—satisfied범위 판정
결론
이전 review71의 프로젝트 구조 연결과 런타임 취소 및 재생성 문서 누락 두 건이 모두 해소됐다. 현재 head의 57개 필수 criterion을 충족하고 범위 누락 및 초과와 명세 모순이 없어 approve다. 코드와 fixture 및 dependency 변경은 없고 두 문서 test만 추가됐다. 생산자 exact-head 전체 검증은398 passed,4 skipped,1 warning 및 lint 통과이며 reviewer 독립 제품 실행이나 CI 성공이 아니다.
request_changes독립 코드 리뷰 — Issue #15 / PR #16
bae137dce77245f1f506c2a0086101b6a067c9ab68212e773b94dd89b6c036e6616759542c178de3347e1e9d4ef3514754f93515ccfe71d94daa880bcd4129ad3fc1989c53b0641cgitea-spec-agent, APPROVED)gitea-code-reviewv0.1.2 적용. 전체 변경 38개와 호출자·테스트·문서 검토. 중요 확정 결함3개로 승인하지 않습니다.F-001 — 수동 부채의 부호를 그대로 합산하여 검토/승인 금액과 확정 응답이 서로 달라짐 (high)
jarca_ledger_mcp/application/settlement_draft_service.py:129-133,381reviewer-manifest-v2.json / reviewer-boundaries-v2; test_signed_manual_liability_review_finalize_and_report_agree; baseline public-write fixture confirms supported signed debtF-002 — 기존에 지원되는 소문자 KRW 수동 자산을 비KRW 누락으로 처리함 (medium)
jarca_ledger_mcp/application/settlement_draft_service.py:78,107-115reviewer-manifest-v2.json / reviewer-boundaries-v2; test_supported_lowercase_krw_manual_value_keeps_authority; existing tests/test_issue_12_review59_reports.py:260-269 supports currency normalizationF-003 — 자동 authority로 인정한 은행 cash_balance 평가를 명시적 재선택에서는 거절함 (medium)
jarca_ledger_mcp/application/settlement_draft_service.py:283-287reviewer-manifest-v3.json / bank-selection-v3; test_supported_bank_cash_balance_can_be_explicitly_selected. Initial runner KeyError is excluded; v3 is genuine validation_error assertion.실제 검증 및 한계
Reviewer isolated environment, exact HEAD: 398 passed / 4 skipped, Ruff exit 0. 기존 suite GREEN과 별개로 독립 public-API correctness assertions 3개 RED를 확인했습니다.
Immutable Git blob의 실제 baseline 코드에서 299개, 현재 HEAD에서 402개를 collect. 103개 추가 / 0개 삭제, 신규 skip/xfail 없음. 변경된 기존 test body 7개의 의미를 검토했고
check-tests통과.실제 schema12 public API로 생성/마감한 합성 DB의 반복 migration 및 기존 report/timeseries/monthly source ID 비교 통과. 최초 parser 오류는 보존하고 해당 probe만 재실행.
제공된 baseline inventory는 선언 base에 없는 파일의 ID 93/392개를 포함하여 재사용하지 않음. 이 리뷰는 독립 수집 결과를 채택했습니다.
Risk matrix 필수 R02(선택/통화), R05(수동 금액) 실패; 나머지 범위는 저장된 코드/직접 실행 근거로 통과. Structural guard PASS는 제품 승인으로 해석하지 않습니다.
실제 금융자료/계정·운영 DB·deployment는 사용/검증하지 않음.
실제 stdio와 Streamlit AppTest는 실행했으나 browser 실사용/E2E 및 별도 adapter 내부 모듈 직접 실행은 검증하지 않음. 문서화된 jarca_ledger_mcp.server 경로의 runtime 검증만 채택.
PDF sample 파일 부재로 기존4개 skip 유지; 신규 skip/xfail 없음.
MCP1.30.0 및 실제 설치 버전을 기록했고 declared compatible range 안에서 검증; 모든 dependency version 조합이나 부하 benchmark를 실행한 것은 아님.
Private redacted report:
/opt/data/gitea-agent/logs/gitea-review-agent/runs/issue-15-pr-16-20261010T141712Z/review-result.jsonCommand/environment/JUnit evidence:
/opt/data/gitea-agent/repositories/jsfamily/jarca-ledger-mcp/worktrees/issue-15/verification/issue-15-pr-16-20261010T141712ZSource/test/Discovery 수정, commit/push/merge/deploy/Issue 변경은 하지 않았습니다.
수정은 기존 PR에서 수행하고 새 HEAD의 fresh spec pass → 독립 code 재리뷰가 필요합니다. 이전 HEAD의 spec/code 결과는 새 HEAD 승인으로 이월하지 않습니다.
구현 재작업 결과
bae137dce77245f1f506c2a0086101b6a067c9abfa51b4dbb5acee0c42e2b33394c0607256032602347e1e9d4ef3514754f93515ccfe71d94daa880bcd4129ad3fc1989c53b0641crework_delivered지적 처리
resolvedresolvedresolved최종 검증
다음 단계
Reviewer가 rework head를 새 snapshot으로 다시 검토해야 하며 이 comment는 기존
REQUEST_CHANGES를 해제하거나 승인을 의미하지 않는다.구현 명세 적합성 검토
fa51b4dbb5acee0c42e2b33394c0607256032602347e1e9d4ef3514754f93515ccfe71d94daa880bcd4129ad3fc1989c53b0641capproveAcceptance criteria 판정
IN-01—satisfiedIN-02—satisfiedIN-03—satisfiedIN-04—satisfiedIN-05—satisfiedIN-06—satisfiedIN-07—satisfiedIN-08—satisfiedIN-09—satisfiedIN-10—satisfiedIN-11—satisfiedIN-12—satisfiedEX-01—satisfiedEX-02—satisfiedEX-03—satisfiedEX-04—satisfiedEX-05—satisfiedEX-06—satisfiedCON-01—satisfiedCON-02—satisfiedCON-03—satisfiedCON-04—satisfiedCON-05—satisfiedCON-06—satisfiedCON-07—satisfiedCON-08—satisfiedCON-09—satisfiedCON-10—satisfiedDEC-01—satisfiedDEC-02—satisfiedDEC-03—satisfiedDEC-04—satisfiedDEC-05—satisfiedDEC-06—satisfiedDEC-07—satisfiedDEC-08—satisfiedDEC-09—satisfiedDOC-REQ-structural—satisfiedDOC-REQ-semantic—satisfiedDOC-DM-structural—satisfiedDOC-DM-semantic—satisfiedDOC-IC-structural—satisfiedDOC-IC-semantic—satisfiedDOC-PS-structural—satisfiedDOC-PS-semantic—satisfiedDOC-RF-structural—satisfiedDOC-RF-semantic—satisfiedBASE-REQ-003.01-AC01—satisfiedBASE-REQ-003.02-AC01—satisfiedBASE-REQ-003.03-AC01—satisfiedBASE-REQ-003.04-AC01—satisfiedBASE-REQ-003.05-AC01—satisfiedBASE-REQ-003.06-AC01—satisfiedBASE-REQ-003.07-AC01—satisfiedBASE-REQ-003.08-AC01—satisfiedBASE-REQ-003.09-AC01—satisfiedBASE-REQ-003.10-AC01—satisfied범위 판정
결론
현재 head에 대해 승인된57개 필수 criterion이 모두 satisfied이고 범위 누락/초과와 명세 모순이 없어 approve다. 이전 code review73의 부호 있는 수동 부채 합계, 지원 소문자 KRW 누락, 은행 cash_balance 재선택 정책 상충3건을 현재 source와33개 추가 회귀에 대조해 해소했다. 정규화 합계를 승인 fingerprint에 결합하고 기존 완료 응답 replay는 보존했다. 이전 spec72의 승인은 이전 head에 대한 기록이며 현재 head의 새 검토로 대체한다. Code review73 자체의 해제나 새 code-review 승인, merge를 의미하지 않는다. 생산자 exact-head431 passed,4 skipped,1 warning 및 lint 통과를 확인했고 reviewer는 제품 테스트를 실행하지 않았다.
approve독립 코드 재리뷰 결과
jsfamily/jarca-ledger-mcp, source Issue#15, PR#16.fa51b4dbb5acee0c42e2b33394c0607256032602; base:68212e773b94dd89b6c036e6616759542c178de3.347e1e9d4ef3514754f93515ccfe71d94daa880bcd4129ad3fc1989c53b0641c; exact-head spec Native 승인#74재확인.#73의 F-001~F-003 모두 해결 확인. 새 변경·영향 경계에서 추가 중요 결함이나 필수 검증 공백을 발견하지 못했으므로 승인한다. Merge/deployment 승인은 아니며 무결함의 증명도 아니다.검토 범위와 이전 근거의 적용
bae137dce77245f1f506c2a0086101b6a067c9ab대비 delta2개 파일(jarca_ledger_mcp/application/settlement_draft_service.py,tests/test_settlement_draft_policy_consistency.py)은 전체를 새로 읽었다.이전 finding 해결
settlement_draft_service.py:131-133에서 기존_summarize_valuation_items정책을 사용한다. 자산100·수동 부채-40의 draft/확정 top-level·nested totals/report가 모두 자산100·부채40·순자산60이다. 혼합 부호, 조회/시계열/월정산, frozen/raw evidence 보존과 replay도 committed 회귀 tests로 통과했다.settlement_draft_service.py:79,108,115의 기존과 동일한 KRW case normalization으로currency="krw"의25가 반영된다. 독립 원래 재현 테스트가 통과했으며 non-KRW/공백/NULL/zero 경계와 raw/frozen currency 보존을 확인했다.settlement_draft_service.py:280-294의 non-investment/non-loan purpose에cash_balance를 허용해 bank verified20의 자동/명시 선택이 일치한다. 소속·종류·대표 부채·날짜·verified 조건과 exact/carried/manual-substitute 및 부적합 입력의 no-write 경계가 유지된다.정책 변경에 대한 승인·과거 자료 안전성
review_fingerprint에 corrected totals를 포함한다(:133). 실제 이전 HEAD의 public API로 생성·승인한 active draft는 기존 fingerprint로 확정 시conflict이며 draft/items/run/snapshot rows가 바뀌지 않는다. 현재 합계로 새 review/approval 후 확정은60으로 성공했다._review재실행 없이 저장된 응답을 그대로 replay/get한다. 과거의 잘못된 nested totals까지 소급 재해석·수정하지 않는 immutable-history 동작이다. 이 한계를 새 close의 수정과 구별한다.Reviewer 실행 근거
mcp==1.30.0,streamlit==1.58.0,pytest==9.1.1,ruff==0.17.0; 실제 전체 package inventory와 command/source manifest를 보존했다.check --no-cache .: All checks passed, exit0./opt/data/gitea-agent/logs/gitea-review-agent/runs/issue-15-pr-16-rereview-20261011T002954Z/reviewer-test-summary.json,/opt/data/gitea-agent/logs/gitea-review-agent/runs/issue-15-pr-16-rereview-20261011T002954Z/scope-reuse.json,/opt/data/gitea-agent/logs/gitea-review-agent/runs/issue-15-pr-16-rereview-20261011T002954Z/risk-matrix.json;/opt/data/gitea-agent/repositories/jsfamily/jarca-ledger-mcp/worktrees/issue-15/verification/issue-15-pr-16-rereview-20261011T002954Z/reviewer-manifest.json.한계·경계