문서 목록으로 돌아가기
operations / wp_status.md

Work Package 진행 현황

작성일: 2026-04-19

상태: active

대상: item 2 등록임대 계약신고 자동화 MVP

WP 목록

WP-001 테스트/기초 구현 정리

  • 상태: 완료
  • 완료 일시: 2026-04-19 00:25 KST
  • 범위:
  • python-multipart 의존성 추가
  • lease-reporting API happy path 구현
  • unregistered landlord 차단 테스트 통과
  • lease-reporting HTML 스모크 기대값 정리
  • 검증:
  • `pytest tests/ -q` 통과
  • 커밋:
  • `c9c2543` `chore: initialize autonomous-sales-ops as standalone repo`

WP-002 작업 허브 구조화

  • 상태: 완료
  • 완료 일시: 2026-04-19 00:41 KST
  • 목표:
  • lease-reporting 페이지의 작업 허브를 요약 카드 + 버튼 구조로 정리
  • 문서 목록은 기존 /docs 유지
  • 작업 목록은 별도 리스트 페이지로 분리
  • WP / 백로그 현황과 완료 일시를 볼 수 있게 구성
  • 커밋:
  • `15733fa` `feat: simplify lease-reporting hub and add work list page`

WP-003 landlord / property / contract GET 조회 API 보강

  • 상태: 완료
  • 완료 일시: 2026-04-19 00:49 KST
  • 목표:
  • GET landlord/property/contract 조회 엔드포인트 보강
  • 타임라인/상태 조회 응답 정리
  • 결과:
  • `GET /api/landlords/{landlord_id}` 추가
  • `GET /api/properties/{property_id}` 추가
  • `GET /api/contracts/{contract_event_id}` 추가
  • contract detail 응답에 `files`, `filing_jobs` 포함
  • 누락 시 404 테스트 추가
  • 검증:
  • `pytest tests/ -q` 통과
  • 커밋:
  • `43d3d02` `feat: add lease-reporting detail read APIs`

WP-004 filing-job detail / local agent package read API

  • 상태: 완료
  • 완료 일시: 2026-04-19 01:03 KST
  • 목표:
  • `GET /api/filing-jobs/{filing_job_id}` 추가
  • local agent가 package/checklist/source files를 읽을 수 있게 정리
  • 결과:
  • filing job detail API 추가
  • 응답에 `package`, `checklist`, `contract`, `source_files`, `result_files` 포함
  • 누락 시 404 테스트 추가
  • 검증:
  • `pytest tests/ -q` 통과
  • 커밋:
  • `bf98a57` `feat: add filing-job detail API for local agent`

WP-005 local agent handshake payload / 상태 갱신 구체화

  • 상태: 완료
  • 완료 일시: 2026-04-19 08:35 KST
  • 목표:
  • agent-session/status payload를 local_agent_spec_v1 기준으로 보강
  • 최근 상태 메시지 / step / review_items를 읽을 수 있게 정리
  • 결과:
  • `POST /api/filing-jobs/{id}/agent-session` 응답에 `assigned_agent`, `current_status` 추가
  • `POST /api/filing-jobs/{id}/status` 응답에 `assigned_agent`, `current_status` 추가
  • `GET /api/filing-jobs/{id}` 응답에 최신 audit 기반 `current_status` 추가
  • `awaiting_login` 기본 메시지/화면 정보(`screen=login`, `message=사용자 로그인 대기`) 노출
  • 검증:
  • `python3 -m pytest tests/test_lease_reporting_api.py -q` 통과
  • `python3 -m pytest tests/ -q`
  • 커밋:
  • `2e53da0` `feat: complete lease-reporting MVP validation flow`

WP-006 실패 / manual handoff 시나리오 구현

  • 상태: 완료
  • 완료 일시: 2026-04-19 08:59 KST
  • 목표:
  • 로그인 실패
  • 첨부 실패
  • selector 변경
  • manual_handoff 경로를 API/테스트에 반영
  • 결과:
  • 로그인 실패 시 `failed` 상태와 `current_status.message/recoverable`를 응답·조회 API에서 그대로 노출
  • selector drift/manual handoff 플래그를 `current_status.manual_handoff`로 응답·조회 API에서 확인 가능하게 정리
  • `GET /api/contracts/{id}`와 `GET /api/contracts/{id}/timeline`의 `filing_jobs` 항목에도 최신 `current_status` 포함
  • 실패 경로가 contract detail / timeline에서도 숨지 않게 보강
  • 검증:
  • `python3 -m pytest tests/test_lease_reporting_api.py -q` 통과
  • `python3 -m pytest tests/ -q` 통과
  • 커밋:
  • `2e53da0` `feat: complete lease-reporting MVP validation flow`

WP-007 결과 회수 / partial 처리 보강

  • 상태: 완료
  • 완료 일시: 2026-04-19 09:02 KST
  • 목표:
  • partial result
  • receipt/certificate 누락
  • 결과 재업로드 방지
  • followup 생성 규칙 보강
  • 결과:
  • `submission_status=partial` 업로드 시 receipt/capture만 있어도 `result_collected`로 처리되고 상태 조회에 반영
  • partial 결과의 `receipt_number`, `submission_status`를 `current_status`와 timeline에서 바로 읽을 수 있게 유지
  • certificate 누락 상황에서도 `result_files`는 실제 회수 파일만 저장되도록 검증 추가
  • 동일 `filing_job_id`에 대한 결과 재업로드를 400으로 차단
  • 검증:
  • `python3 -m pytest tests/test_lease_reporting_api.py tests/test_smoke.py -q` 통과
  • `python3 -m pytest tests/ -q` 통과
  • 커밋:
  • `2e53da0` `feat: complete lease-reporting MVP validation flow`

WP-008 followup / timeline 읽기 개선

  • 상태: 완료
  • 완료 일시: 2026-04-19 09:05 KST
  • 목표:
  • timeline / followups 응답 가독성 개선
  • 작업/운영 화면 연결용 필드 정리
  • 결과:
  • `GET /api/followups` 추가
  • `task_status`, `task_kind`, `due_from`, `due_to`, `contract_event_id` 필터 지원
  • timeline 응답에 `filing_job_count`, `followup_count`, `latest_job_status` 추가
  • timeline / followups 항목에 `filing_job_id`, `followup_task_id` 별칭 필드 추가
  • 검증:
  • `python3 -m pytest tests/test_lease_reporting_api.py tests/test_smoke.py -q` 통과
  • `python3 -m pytest tests/ -q` 통과
  • 커밋:
  • `2e53da0` `feat: complete lease-reporting MVP validation flow`

WP-009 filing job preflight validation 상세화

  • 상태: 완료
  • 완료 일시: 2026-04-19 09:35 KST
  • 목표:
  • filing job 생성 전 필수 첨부/필수 필드 누락을 사전 차단
  • checklist_json에 preflight 결과를 담아 local agent가 바로 읽게 정리
  • 결과:
  • `create_filing_job`에서 source files + package 기반 preflight 검사 추가
  • 필수 첨부 누락 시 `required attachment missing: contract_pdf`로 400 반환
  • 필수 입력값 누락 시 `required field missing: tenant_name`로 400 반환
  • package에 `input_values`, `attachments` 포함
  • checklist에 `required_fields`, `required_files`, `missing_fields`, `missing_files`, `ready` 포함
  • 검증:
  • `python3 -m pytest tests/test_lease_reporting_api.py tests/test_smoke.py -q` 통과
  • `python3 -m pytest tests/ -q` 통과
  • 커밋:
  • `2e53da0` `feat: complete lease-reporting MVP validation flow`

WP-010 local agent 실행 스텁 / 연결 포인트 정리

  • 상태: 완료
  • 완료 일시: 2026-04-19 09:46 KST
  • 목표:
  • filing job을 읽고 preflight를 확인하는 local agent 실행 스텁 추가
  • dry-run / session-start 연결 포인트를 CLI로 정리
  • 결과:
  • `scripts/local_filing_agent.py` 추가
  • `--base-url`, `--filing-job-id`, `--agent-id`, `--start-session` CLI 지원
  • dry-run 시 preflight / 권장 로컬 경로 / 다음 endpoint를 출력
  • `--start-session` 시 `POST /api/filing-jobs/{id}/agent-session`까지 연결
  • README에 local agent 스텁 실행 예시 추가
  • 검증:
  • `python3 -m pytest tests/test_local_filing_agent.py -q` 통과
  • `python3 -m pytest tests/ -q` 통과
  • `python3 scripts/local_filing_agent.py --help` 확인
  • 커밋:
  • `b5ea68c` `feat: add local filing agent stub`

WP-011 윈도우 배포/설치/업데이트 구조화

  • 상태: 완료
  • 완료 일시: 2026-04-19 10:06 KST
  • 목표:
  • 로컬 에이전트 코드를 윈도우 운영자 PC 기준으로 정리
  • 사용자가 다운로드/설치/업데이트 가능한 구조 추가
  • 결과:
  • `build_local_paths()`를 윈도우 `LOCALAPPDATA\\DuduAgent` 기준으로 확장
  • `scripts/build_local_agent_release.py` 추가
  • `local_agent/windows/install-local-agent.ps1` 추가
  • `local_agent/windows/update-local-agent.ps1` 추가
  • `local_agent/windows/README.windows.md` 추가
  • README를 윈도우 운영자 설치/업데이트 흐름 기준으로 갱신
  • `dist/` 생성물은 `.gitignore`로 제외
  • 검증:
  • `python3 -m pytest tests/ -q` 통과
  • `python3 scripts/build_local_agent_release.py --clean --release-base-url http://server:8876/downloads/local-agent` 확인
  • 커밋:
  • `110f05f` `feat: add windows local agent packaging flow`

WP-012 server 로컬 에이전트 다운로드 경로 연결

  • 상태: 완료
  • 완료 일시: 2026-04-19 10:06 KST
  • 목표:
  • server에서 manifest/zip을 실제로 내려받을 수 있게 경로 연결
  • 결과:
  • `GET /downloads/local-agent/latest.json` 추가
  • `GET /downloads/local-agent/local-filing-agent-win.zip` 추가
  • README / Windows 문서의 설치 URL을 `http://server:8876/downloads/local-agent/latest.json` 기준으로 갱신
  • 검증:
  • 다운로드 endpoint 테스트 추가 및 통과
  • `python3 scripts/build_local_agent_release.py --clean --release-base-url http://server:8876/downloads/local-agent` 확인
  • 커밋:
  • `053bd3b` `feat: serve local agent downloads from server`

WP-013 resident worker CLI / manifest / exe scaffold

  • 상태: 완료
  • 완료 일시: 2026-04-19 12:18 KST
  • 목표:
  • local agent를 resident worker 방향으로 확장
  • manifest에 worker launch metadata 추가
  • Windows exe / installer 스캐폴드 문서화
  • 결과:
  • `scripts/local_filing_agent.py`에 `--worker`, `--once`, `--poll-interval` 및 `worker_loop()` 추가
  • non-worker single-run은 기존 dry-run / start-session 흐름 유지
  • `scripts/build_local_agent_release.py` manifest에 `entry_script`, `launch_mode`, `poll_interval_seconds` 추가
  • `scripts/build_local_agent_exe.py` 추가
  • `local_agent/windows/DuduAgent.iss` 추가
  • README / Windows 문서 resident worker 기준으로 갱신
  • 검증:
  • `python3 -m pytest tests/test_local_filing_agent.py tests/test_local_agent_release.py -q`
  • `python3 -m pytest tests/ -q`
  • 커밋:
  • `2ee559f` `feat: add resident local agent control plane`

WP-014 agent runtime control-plane / polling foundation

  • 상태: 완료
  • 완료 일시: 2026-04-19 12:40 KST
  • 목표:
  • 서버가 로컬 에이전트를 등록/heartbeat/작업할당할 수 있게 control-plane API 추가
  • local agent가 assigned job을 polling으로 가져와 session 시작까지 자동 수행하게 구성
  • 결과:
  • `POST /api/agents/register` 추가
  • `POST /api/agents/heartbeat` 추가
  • `GET /api/agents/{agent_id}/next-task` 추가
  • `POST /api/agents/{agent_id}/logs` 추가
  • `scripts/local_filing_agent.py`에 `run_worker_cycle()` 추가
  • 실서버에서 `--worker --once`로 `package_ready -> awaiting_login` 전이 확인
  • 검증:
  • `python3 -m pytest tests/test_agent_runtime_api.py tests/test_local_filing_agent.py -q`
  • `python3 -m pytest tests/ -q`
  • `python3 scripts/local_filing_agent.py --base-url http://127.0.0.1:8876 --agent-id server-worker-test --worker --once`
  • 커밋:
  • `2ee559f` `feat: add resident local agent control plane`

WP-015 release bundle 정합성 / Windows 빌드 제약 정리

  • 상태: 완료
  • 완료 일시: 2026-04-19 12:40 KST
  • 목표:
  • release manifest가 실제 zip 내용과 일치하도록 정리
  • Linux 서버에서 Windows exe를 직접 만들 수 없는 제약을 코드/문서/테스트에 반영
  • 사용자용 설치 흐름과 개발자용 exe 빌드 흐름을 분리
  • 결과:
  • exe가 없으면 manifest `entry_script=local_filing_agent.py`, 있으면 `DuduAgent.exe`를 가리키도록 수정
  • release zip 현재 구성과 manifest가 일치하도록 정리
  • `scripts/build_local_agent_exe.py`가 Windows 호스트에서만 실행되도록 가드 추가
  • `tests/test_build_local_agent_exe.py` 추가
  • README / Windows 문서에 사용자용 설치 흐름과 개발자용 exe 빌드 흐름을 분리 명시
  • `.gitignore`에 `build/`, `*.spec` 추가
  • 검증:
  • `python3 -m pytest tests/test_local_agent_release.py -q`
  • `python3 -m pytest tests/test_build_local_agent_exe.py -q`
  • `python3 -m pytest tests/ -q`
  • `curl -sS https://hidudu.xyz/downloads/local-agent/latest.json`
  • 커밋:
  • `2ee559f` `feat: add resident local agent control plane`

WP-016 user config / resident launcher flow

  • 상태: 완료
  • 완료 일시: 2026-04-19 12:54 KST
  • 목표:
  • 사용자가 base_url / agent_id를 반복 입력하지 않도록 agent-config 기반 실행 흐름 추가
  • start-resident-agent.ps1로 설치 후 worker 실행 진입점을 단순화
  • install/update가 config를 보존하도록 정리
  • 결과:
  • `scripts/local_filing_agent.py`에 `load_agent_config()`, `resolve_runtime_options()`, `--config-path` 추가
  • config에서 `base_url`, `agent_id`, `poll_interval_seconds`를 읽어 worker/non-worker 실행값을 보강
  • `local_agent/windows/start-resident-agent.ps1` 추가
  • `install-local-agent.ps1`에 `-BaseUrl`, `-AgentId`, `-PollIntervalSeconds` 추가 및 `agent-config.json` 저장 필드 확장
  • `update-local-agent.ps1`가 `base_url`, `agent_id`, `poll_interval_seconds`를 보존하고 manifest 기반 필드만 갱신하도록 정리
  • release zip에 `start-resident-agent.ps1` 포함
  • 검증:
  • `python3 -m pytest tests/test_local_filing_agent.py tests/test_local_agent_release.py tests/test_build_local_agent_exe.py -q`
  • `python3 -m pytest tests/ -q`
  • 커밋:
  • `86b30c8` `feat: add local agent config launcher flow`

WP-017 Windows resident worker 실기 검증 / 작업 허브 동기화

  • 상태: 완료
  • 완료 일시: 2026-04-19 13:08 KST
  • 목표:
  • 한별님 PC에서 최신 설치/worker 실행 결과를 실서버 상태와 대조 검증
  • `operations` 문서와 `/2/work-items.html` live 페이지 불일치를 바로 수정
  • 이번 검증 이력을 git 커밋까지 남겨 이후 복구 기준으로 사용
  • 결과:
  • Windows에서 `install-local-agent.ps1` 0.2.0 재설치 성공 확인
  • Windows에서 `start-resident-agent.ps1 -Once` 실행 결과 `filing_job_id=3`, `status=running`, `job_status=awaiting_login` 확인
  • 서버 `GET /api/filing-jobs/3`에서 `assigned_agent=windows-hb-local`, `current_status.message=사용자 로그인 대기`, `started_at=2026-04-19 04:05:23` 대조 확인
  • `scripts/sync_work_hub.py` 재실행으로 `lease-reporting.html`, `work-items.html`을 `operations` 기준으로 재생성
  • 검증:
  • 한별님 PC PowerShell 실행 결과 원문 확인
  • `curl -sS https://hidudu.xyz/api/filing-jobs/3`
  • `python3 scripts/sync_work_hub.py`
  • live browser에서 `https://hidudu.xyz/2/work-items.html` 확인
  • 커밋:
  • `7f63d33` `fix: sync work hub state after windows worker validation`

WP-018 work-items에 WP별 git 커밋 가시화

  • 상태: 완료
  • 완료 일시: 2026-04-19 13:19 KST
  • 목표:
  • `/2/work-items.html`에서 각 WP별 git 커밋 존재 여부를 바로 확인할 수 있게 표시
  • `operations/wp_status.md`의 커밋 기록을 상세 목록 HTML에 그대로 반영
  • smoke test로 커밋 가시화가 계속 유지되게 고정
  • 결과:
  • `scripts/sync_work_hub.py`가 WP 섹션의 `- 커밋:` 블록을 파싱하도록 확장
  • work-items 각 WP 카드에 `깃 커밋 여부`, `깃 커밋` 항목 추가
  • 커밋 해시가 있으면 `있음`, `대기 중`/미기록이면 `없음`으로 노출
  • `tests/test_smoke.py`에 커밋 정보 노출 회귀 테스트 추가
  • 검증:
  • `python3 scripts/sync_work_hub.py`
  • `python3 -m pytest tests/test_smoke.py -q`
  • live browser에서 `https://hidudu.xyz/2/work-items.html` 확인
  • 커밋:
  • `36b2221` `feat: show wp commit status in work items`

WP-019 과거 WP 커밋 이력 소급 정리

  • 상태: 완료
  • 완료 일시: 2026-04-19 13:19 KST
  • 목표:
  • 과거 완료 WP 중 `대기 중`으로 남아 있던 커밋 기록을 실제 git 히스토리 기준으로 소급 정리
  • work-items 페이지의 `깃 커밋 여부` 신뢰도를 높이기 위해 오래된 WP도 가능한 범위에서 매핑
  • 이후 완료 WP는 문서와 git이 같이 남는 기준을 강화
  • 결과:
  • `git log --reverse`와 관련 커밋 diff를 대조해 WP-004, WP-005~WP-009, WP-012의 실제 커밋을 매핑
  • WP-004 → `bf98a57` `feat: add filing-job detail API for local agent`
  • WP-005~WP-009 → `2e53da0` `feat: complete lease-reporting MVP validation flow`
  • WP-012 → `053bd3b` `feat: serve local agent downloads from server`
  • work-items 재동기화 후 기존 `없음/대기 중` 항목 상당수를 실제 커밋 기준으로 갱신
  • 검증:
  • `git log --oneline --decorate --reverse`
  • `git show --stat --oneline bf98a57 2e53da0 053bd3b`
  • `python3 scripts/sync_work_hub.py`
  • live browser에서 `https://hidudu.xyz/2/work-items.html` 확인
  • 커밋:
  • `e2bc980` `docs: backfill wp commit history`

WP-020 local agent runtime 로그 업로드 기초

  • 상태: 완료
  • 완료 일시: 2026-04-19 13:28 KST
  • 목표:
  • local agent가 worker cycle 주요 단계를 `/api/agents/{agent_id}/logs`로 남기게 만든다
  • idle / session_started / heartbeat 전송 결과를 서버 runtime log에 기록한다
  • 테스트로 로그 업로드 흐름을 고정한다
  • 결과:
  • `scripts/local_filing_agent.py`에 `send_agent_log()` 추가
  • `run_worker_cycle()`가 idle 시 `worker idle: no task assigned` 로그를 업로드하도록 확장
  • task 수락 시 `worker accepted task`, session 시작 시 `agent session started`, heartbeat 이후 `heartbeat sent` 로그를 업로드하도록 정리
  • worker 결과 JSON에 업로드된 로그 요약(`logs`) 포함
  • `tests/test_local_filing_agent.py`에 로그 업로드 helper/idle/running 경로 테스트 추가 및 기존 worker_loop 테스트 갱신
  • 검증:
  • `python3 -m pytest tests/test_local_filing_agent.py tests/test_agent_runtime_api.py -q`
  • `python3 scripts/sync_work_hub.py`
  • `python3 -m pytest tests/test_smoke.py -q`
  • 커밋:
  • `35a757f` `feat: upload worker runtime logs`

WP-021 agent runtime logs 조회 API

  • 상태: 완료
  • 완료 일시: 2026-04-19 13:34 KST
  • 목표:
  • 운영자가 서버에서 agent runtime logs를 바로 조회할 수 있는 GET API 추가
  • agent_id와 filing_job_id 기준으로 최근 로그를 필터해 확인 가능하게 정리
  • 테스트와 work-items 기록까지 함께 남긴다
  • 결과:
  • `GET /api/agents/{agent_id}/logs` 추가
  • `filing_job_id`, `limit` 파라미터로 최근 로그 조회 지원
  • 응답에 `count`, `logs`, 파싱된 `payload` 포함
  • `tests/test_agent_runtime_api.py`에 logs 조회 API 테스트 추가
  • 검증:
  • `python3 -m pytest tests/test_agent_runtime_api.py::test_agent_runtime_logs_api_lists_recent_logs -q`
  • `python3 -m pytest tests/test_local_filing_agent.py tests/test_agent_runtime_api.py tests/test_smoke.py -q`
  • `python3 scripts/sync_work_hub.py`
  • 커밋:
  • `0595f44` `feat: add agent runtime logs api`

WP-022 agent runtime sessions 조회 API

  • 상태: 완료
  • 완료 일시: 2026-04-19 13:38 KST
  • 목표:
  • 운영자가 현재 agent runtime session 상태를 한 번에 조회할 수 있게 한다
  • 최근 heartbeat 기준으로 agent_id, status, current_job_id, hostname을 볼 수 있게 정리
  • 테스트와 work-items 기록까지 함께 남긴다
  • 결과:
  • `GET /api/agents/runtime-sessions` 추가
  • `limit`, `status` 파라미터로 최근 session 목록 필터 지원
  • 응답에 `count`, `sessions` 포함
  • `tests/test_agent_runtime_api.py`에 runtime sessions 조회 API 테스트 추가
  • 검증:
  • `python3 -m pytest tests/test_agent_runtime_api.py::test_agent_runtime_sessions_api_lists_recent_agent_state -q`
  • `python3 -m pytest tests/test_agent_runtime_api.py::test_agent_runtime_logs_api_lists_recent_logs -q`
  • `python3 scripts/sync_work_hub.py`
  • 커밋:
  • `8aee82f` `feat: add agent runtime sessions api`

WP-023 agent runtime overview API

  • 상태: 완료
  • 완료 일시: 2026-04-19 13:42 KST
  • 목표:
  • 운영자가 agent sessions와 recent logs를 한 번에 보는 overview API 추가
  • total_agents / running_agents / active_jobs 요약 수치를 같이 제공
  • 테스트와 work-items 기록까지 함께 남긴다
  • 결과:
  • `GET /api/agents/runtime-overview` 추가
  • `session_limit`, `log_limit` 파라미터로 overview 범위 제어 지원
  • 응답에 `summary`, `sessions`, `recent_logs` 포함
  • `tests/test_agent_runtime_api.py`에 overview API 테스트 추가
  • 검증:
  • `python3 -m pytest tests/test_agent_runtime_api.py::test_agent_runtime_overview_api_summarizes_sessions_and_recent_logs -q`
  • `python3 -m pytest tests/test_agent_runtime_api.py::test_agent_runtime_sessions_api_lists_recent_agent_state tests/test_agent_runtime_api.py::test_agent_runtime_logs_api_lists_recent_logs -q`
  • `python3 scripts/sync_work_hub.py`
  • 커밋:
  • `a6a9726` `feat: add agent runtime overview api`

WP-024 agent runtime detail API

  • 상태: 완료
  • 완료 일시: 2026-04-19 13:47 KST
  • 목표:
  • 운영자가 특정 agent의 session 상태와 recent logs를 한 번에 조회할 수 있게 한다
  • agent_id 기준 단건 조회로 디버깅 접근 경로를 단순화한다
  • 테스트와 work-items 기록까지 함께 남긴다
  • 결과:
  • `GET /api/agents/{agent_id}` 추가
  • `log_limit` 파라미터로 recent logs 개수 제한 지원
  • 응답에 `agent`, `recent_logs` 포함
  • runtime-overview/runtime-sessions와 충돌하지 않도록 라우트 순서 정리
  • `tests/test_agent_runtime_api.py`에 agent detail API 테스트 추가
  • 검증:
  • `python3 -m pytest tests/test_agent_runtime_api.py::test_agent_runtime_agent_detail_api_returns_session_and_recent_logs -q`
  • `python3 -m pytest tests/test_agent_runtime_api.py::test_agent_runtime_overview_api_summarizes_sessions_and_recent_logs tests/test_agent_runtime_api.py::test_agent_runtime_sessions_api_lists_recent_agent_state tests/test_agent_runtime_api.py::test_agent_runtime_logs_api_lists_recent_logs -q`
  • `python3 scripts/sync_work_hub.py`
  • 커밋:
  • `496b8e6` `feat: add agent runtime detail api`

WP-025 agent current job summary API

  • 상태: 완료
  • 완료 일시: 2026-04-19 13:59 KST
  • 목표:
  • 운영자가 특정 agent detail 조회에서 현재 붙어 있는 filing job 상태를 바로 확인할 수 있게 한다
  • 별도 filing-job 조회 없이 current_status와 assigned_agent를 한 번에 확인하게 정리한다
  • 테스트와 work-items 기록까지 함께 남긴다
  • 결과:
  • `GET /api/agents/{agent_id}` 응답에 `current_job` 추가
  • `current_job`에 `filing_job_id`, `channel`, `assigned_agent`, `current_status` 포함
  • agent session/audit 기반 `awaiting_login` 상태 메시지가 agent detail 응답에도 그대로 노출되게 정리
  • `tests/test_agent_runtime_api.py`에 current job summary 테스트 추가
  • 검증:
  • `python3 -m pytest tests/test_agent_runtime_api.py::test_agent_runtime_agent_detail_api_includes_current_job_summary -q`
  • `python3 -m pytest tests/test_agent_runtime_api.py tests/test_smoke.py -q`
  • `python3 scripts/sync_work_hub.py`
  • 커밋:
  • `ba13fb6` `feat: add agent current job summary api`

WP-026 overview current job summary API

  • 상태: 완료
  • 완료 일시: 2026-04-19 14:02 KST
  • 목표:
  • 운영자가 runtime overview 한 번으로 각 agent의 현재 job 상태까지 같이 볼 수 있게 한다
  • detail API로 한 번 더 들어가기 전 overview 단계에서 awaiting_login 같은 상태를 바로 파악하게 정리한다
  • 테스트와 work-items 기록까지 함께 남긴다
  • 결과:
  • `GET /api/agents/runtime-overview`의 각 `sessions` 항목에 `current_job` 추가
  • `current_job`에 `filing_job_id`, `current_status`가 포함되어 현재 job 상태를 overview에서 바로 확인 가능
  • `tests/test_agent_runtime_api.py` overview 테스트를 current job summary 기준으로 확장
  • 검증:
  • `python3 -m pytest tests/test_agent_runtime_api.py::test_agent_runtime_overview_api_summarizes_sessions_and_recent_logs -q`
  • `python3 -m pytest tests/test_agent_runtime_api.py tests/test_smoke.py -q`
  • `python3 scripts/sync_work_hub.py`
  • 커밋:
  • `15ca219` `feat: add overview current job summaries`

WP-027 MVP 실행 순서표 작성

  • 상태: 완료
  • 완료 일시: 2026-04-19 14:16 KST
  • 목표:
  • MVP까지 남은 작업을 근거 문서 기준으로 다시 정리한다
  • 10분 안팎 WP로 바로 꺼내 쓸 수 있는 순서표를 만든다
  • 다음 구현 WP가 자연스럽게 이어지도록 stage/우선순위를 고정한다
  • 결과:
  • `operations/mvp_execution_sequence.md` 추가
  • 완료 범위 / MVP 완료 기준 / 남은 큰 덩어리 / 실행 순서표 / 바로 다음 WP 묶음 정리
  • WP-028 이후 작업이 `준비 → 상태뼈대 → 승인직전 → 결과회수 → happy path → 실패 path → 운영마감` 순서로 이어지게 고정
  • 검증:
  • `read_file operations/mvp_execution_sequence.md`로 내용 확인
  • `python3 -m pytest tests/test_local_filing_agent.py tests/test_agent_runtime_api.py tests/test_smoke.py -q`
  • 커밋:
  • `341c8a6` `docs: add mvp execution sequence and sync work items`

WP-028 worker filing job context preload

  • 상태: 완료
  • 완료 일시: 2026-04-19 14:16 KST
  • 목표:
  • worker가 next-task를 받은 뒤 실제 실행에 필요한 filing job detail을 함께 확보하게 한다
  • 실행 시작 전에 preflight와 로컬 작업 경로를 바로 계산하게 한다
  • 이후 자동 입력/첨부 업로드 단계가 worker result를 바로 재사용하게 준비한다
  • 결과:
  • `scripts/local_filing_agent.py`에 `fetch_filing_job()` 추가
  • `run_worker_cycle()`이 filing job detail을 읽고 `job`, `preflight`, `paths`를 결과에 포함하도록 확장
  • `tests/test_local_filing_agent.py`에서 worker cycle이 package/preflight/paths를 함께 반환하는지 검증 추가
  • 검증:
  • `python3 -m pytest tests/test_local_filing_agent.py::test_run_worker_cycle_starts_assigned_filing_job -q`
  • `python3 -m pytest tests/test_local_filing_agent.py tests/test_agent_runtime_api.py tests/test_smoke.py -q`
  • 커밋:
  • `764374c` `feat: preload filing job context in worker cycle`

WP-029 local agent status payload helper

  • 상태: 완료
  • 완료 일시: 2026-04-19 14:16 KST
  • 목표:
  • local agent의 단계 전환 payload 형식을 공통 helper로 고정한다
  • 이후 `filling`, `awaiting_final_approval`, `submitted`, `failed` 상태 전환이 같은 구조를 쓰게 준비한다
  • review_items/message 같은 operator-facing 필드가 빠지지 않게 정리한다
  • 결과:
  • `scripts/local_filing_agent.py`에 `build_status_update_payload()` 추가
  • helper가 `job_status`, `error_message`, `payload.step`, `payload.message` 및 추가 payload 필드를 한 번에 조합
  • `tests/test_local_filing_agent.py`에 awaiting_final_approval payload 테스트 추가
  • 검증:
  • `python3 -m pytest tests/test_local_filing_agent.py::test_build_status_update_payload_for_awaiting_final_approval -q`
  • `python3 -m pytest tests/test_local_filing_agent.py tests/test_agent_runtime_api.py tests/test_smoke.py -q`
  • 커밋:
  • `6a8cc93` `feat: add local agent status payload helper`

WP-030 승인 직전 상태 전환 helper

  • 상태: 완료
  • 완료 일시: 2026-04-19 14:29 KST
  • 목표:
  • local agent가 승인 직전 상태를 서버 status API에 일관된 형식으로 올릴 수 있게 한다
  • `awaiting_final_approval`에서 `attachments_uploaded`, `message`, `review_items`를 빠짐없이 전달하게 만든다
  • 이후 자동 입력/첨부 완료 후 승인대기 전환을 바로 연결할 수 있게 준비한다
  • 결과:
  • `scripts/local_filing_agent.py`에 `send_filing_job_status_update()` 추가
  • `scripts/local_filing_agent.py`에 `mark_awaiting_final_approval()` 추가
  • `build_status_update_payload()`가 `step` override를 지원하도록 확장
  • `tests/test_local_filing_agent.py`에 승인 직전 status update POST 테스트 추가
  • 검증:
  • `python3 -m pytest tests/test_local_filing_agent.py::test_mark_awaiting_final_approval_posts_status_update -q`
  • `python3 -m pytest tests/test_local_filing_agent.py tests/test_agent_runtime_api.py tests/test_smoke.py -q`
  • 커밋:
  • `10421c3` `feat: add final approval status helper`

WP-031 결과 업로드 helper

  • 상태: 완료
  • 완료 일시: 2026-04-19 14:54 KST
  • 목표:
  • local agent가 partial/success 결과를 results API에 바로 올릴 수 있게 한다
  • receipt_number, result_message, receipt/certificate/capture 파일을 한 번에 전달하게 만든다
  • happy path 통합 테스트 직전 결과 회수 업로드 경로를 고정한다
  • 결과:
  • `scripts/local_filing_agent.py`에 `_encode_multipart_formdata()` 추가
  • `scripts/local_filing_agent.py`에 `api_multipart_request()` 추가
  • `scripts/local_filing_agent.py`에 `_load_optional_file()` 추가
  • `scripts/local_filing_agent.py`에 `upload_filing_results()` 추가
  • `tests/test_local_filing_agent.py`에 partial result + file upload helper 테스트 추가
  • 검증:
  • `python3 -m pytest tests/test_local_filing_agent.py::test_upload_filing_results_posts_partial_result_with_files -q`
  • `python3 -m pytest tests/test_local_filing_agent.py tests/test_agent_runtime_api.py tests/test_smoke.py -q`
  • 커밋:
  • `1bf60c7` `feat: add filing result upload helper`

WP-032 happy path 통합 테스트

  • 상태: 완료
  • 완료 일시: 2026-04-19 15:01 KST
  • 목표:
  • local agent 기준 happy path를 worker → 승인직전 → 결과회수까지 한 줄로 검증한다
  • 실제 results API 응답에서 current_status까지 함께 확인해 operator/read API 흐름을 고정한다
  • 한별님이 MVP를 테스트할 때 필요한 최소 end-to-end 골격을 먼저 확보한다
  • 결과:
  • `tests/test_local_filing_agent.py`에 `test_local_agent_happy_path_updates_status_and_collects_results()` 추가
  • `_client_request_fn()`이 multipart file upload를 지원하도록 확장
  • `POST /api/filing-jobs/{id}/results` 응답에 `current_status` 포함되도록 보강
  • worker session 시작 → awaiting_final_approval → results upload → filing job detail 확인까지 한 테스트로 묶음
  • 검증:
  • `python3 -m pytest tests/test_local_filing_agent.py::test_local_agent_happy_path_updates_status_and_collects_results -q`
  • `python3 -m pytest tests/test_local_filing_agent.py tests/test_lease_reporting_api.py tests/test_agent_runtime_api.py tests/test_smoke.py -q`
  • 커밋:
  • `011857f` `feat: add local agent happy path integration flow`

WP-033 실패 path 통합 helper

  • 상태: 완료
  • 완료 일시: 2026-04-19 15:06 KST
  • 목표:
  • local agent가 selector drift 같은 실패 상황에서 manual handoff를 일관된 형식으로 서버에 올릴 수 있게 한다
  • filing job detail / contract timeline까지 manual_handoff가 그대로 보이게 한다
  • 한별님이 실제 테스트할 때 실패 화면도 운영자가 바로 읽을 수 있게 정리한다
  • 결과:
  • `scripts/local_filing_agent.py`에 `mark_manual_handoff()` 추가
  • failed status payload를 `manual_handoff=True`, `recoverable=False`, `error_message`와 함께 전송 가능하게 정리
  • `tests/test_local_filing_agent.py`에 manual handoff failure 통합 테스트 추가
  • 검증:
  • `python3 -m pytest tests/test_local_filing_agent.py::test_local_agent_manual_handoff_updates_failed_status -q`
  • `python3 -m pytest tests/test_local_filing_agent.py tests/test_lease_reporting_api.py tests/test_agent_runtime_api.py tests/test_smoke.py -q`
  • 커밋:
  • `40f7450` `feat: add manual handoff failure helper`

WP-034 실제 테스트 가이드 정리

  • 상태: 완료
  • 완료 일시: 2026-04-19 15:06 KST
  • 목표:
  • 한별님이 Windows PC에서 지금 당장 어떤 순서로 MVP를 테스트할지 문서로 고정한다
  • happy path / 실패 path에서 무엇을 확인해야 하는지 운영자 관점으로 정리한다
  • 설치 문서에서 바로 테스트 가이드로 이어지게 연결한다
  • 결과:
  • `operations/mvp_test_guide.md` 추가
  • 테스트 가능한 범위 / 사전 준비 / 설치 / worker 1회 실행 / happy path / 실패 path / 확인 URL / 테스트 가능 판단 기준 정리
  • `local_agent/windows/README.windows.md`에 "MVP 테스트 빠른 경로" 추가
  • 검증:
  • `read_file operations/mvp_test_guide.md`
  • `python3 -m pytest tests/test_local_filing_agent.py tests/test_lease_reporting_api.py tests/test_agent_runtime_api.py tests/test_smoke.py -q`
  • 커밋:
  • `4081534` `docs: add mvp testing guide`

WP-035 렌트홈 로그인/UI 판독 helper

  • 상태: 완료
  • 완료 일시: 2026-04-19 15:40 KST
  • 목표:
  • 렌트홈 HTML snapshot만 있어도 로그인 화면과 신고 입력 화면을 구분할 수 있게 한다
  • 신고 화면의 입력 필드/라벨/selector를 추출해 filing job input_values와 매핑 가능한 구조를 만든다
  • 실제 브라우저 자동화 전 단계에서 selector drift와 입력 누락을 먼저 판독할 수 있게 준비한다
  • 결과:
  • `scripts/renthome_ui_helper.py` 추가
  • `detect_renthome_screen()`으로 `login` / `filing_form` / `unknown` 화면 분류 지원
  • `extract_form_fields()`로 label/id/name/selector/keywords 추출 지원
  • `build_filing_input_plan()`으로 tenant/deposit/monthly_rent/date/address/registered_number 입력 액션 계획 생성
  • `operations/renthome_login_ui_plan.md`로 로그인/UI 판독 중심 다음 WP 순서를 문서화
  • `tests/test_renthome_ui_helper.py` 추가
  • 검증:
  • `python3 -m pytest tests/test_renthome_ui_helper.py -q`
  • `python3 -m pytest tests/test_renthome_ui_helper.py tests/test_local_filing_agent.py tests/test_lease_reporting_api.py tests/test_agent_runtime_api.py tests/test_smoke.py -q`
  • 커밋:
  • `1a62e00` `feat: add renthome ui analysis helper`

WP-036 snapshot 분석 CLI 연결

  • 상태: 완료
  • 완료 일시: 2026-04-19 15:53 KST
  • 목표:
  • local agent가 저장한 렌트홈 HTML snapshot 파일을 바로 읽어 분석 결과 JSON을 출력하게 한다
  • job payload JSON을 함께 넣으면 화면 분류 + field 목록 + 입력 액션 계획까지 한 번에 보이게 한다
  • Windows 실기에서 HTML만 회수해도 로그인 가능 여부와 신고 UI 매핑 가능 여부를 바로 판독하게 한다
  • 결과:
  • `scripts/local_filing_agent.py`에 `analyze_page_snapshot()` 추가
  • `--page-html-path`, `--job-payload-path` CLI 옵션 추가
  • snapshot 분석 모드에서는 `login` / `filing_form` / `unknown`, field list, primary action, input_plan JSON 출력
  • 스크립트를 파일 직접 실행할 때도 import가 깨지지 않도록 fallback import 보강
  • `tests/test_local_filing_agent.py`에 snapshot 분석/CLI 파서/런타임 해석 테스트 추가
  • 검증:
  • `python3 -m pytest tests/test_local_filing_agent.py tests/test_renthome_ui_helper.py tests/test_lease_reporting_api.py tests/test_agent_runtime_api.py tests/test_smoke.py -q`
  • `python3 scripts/local_filing_agent.py --page-html-path <page.html> --job-payload-path <job.json>` 수동 실행 확인
  • 커밋:
  • `e95b571` `feat: add renthome snapshot analysis cli`

WP-037 전체 UX/프로세스 설계 재정리

  • 상태: 완료
  • 완료 일시: 2026-04-19 16:05 KST
  • 목표:
  • 다운로드/설치부터 최종 제출/후속 절차까지 사용자 경험 기준 전체 프로세스를 다시 정리한다
  • 핵심 검증 단계와 현재 커버리지를 같은 표에서 읽을 수 있게 만든다
  • 앞으로 WP를 "어느 UX Phase를 완성하는가" 기준으로 기록할 기준 문서를 만든다
  • 결과:
  • `requirements/ux_process_v1.md` 추가
  • 다운로드/설치 → 첫 실행 → 패키지 준비 → 렌트홈 로그인 → 신고 페이지 이동 → 자동 입력/첨부 → 최종 검토/제출 → 결과 회수까지 전체 여정 정리
  • 각 Phase별 사용자에게 보여야 하는 것 / 에이전트가 해야 하는 것 / 현재 커버 상태를 문서화
  • 핵심 검증 단계 8개와 현재 커버/부분 커버/미커버 구간을 정리
  • `requirements/requirements_v1.md`에서 UX 프로세스 문서를 전체 프로세스 기준 문서로 연결
  • 검증:
  • `read_file requirements/ux_process_v1.md`
  • `read_file requirements/requirements_v1.md`
  • 커밋:
  • `4ed4fa1` `docs: add end-to-end ux process spec`

WP-038 로컬 에이전트 리뷰 UI 패키지 추가

  • 상태: 완료
  • 완료 일시: 2026-04-19 16:18 KST
  • 목표:
  • 한별님이 서버 문서가 아니라 실제 로컬 에이전트 설치 환경에서 UX 흐름을 바로 리뷰할 수 있게 한다
  • 설치된 DuduAgent 폴더에서 한 번에 열 수 있는 리뷰용 화면과 런처를 패키지에 포함한다
  • 릴리스 zip/manifest 경로까지 다시 빌드해 실제 배포 산출물에 반영한다
  • 결과:
  • `local_agent/windows/review-agent-flow.html` 추가
  • `local_agent/windows/start-review-ui.ps1` 추가
  • 리뷰 UI를 설명문서가 아니라 실제 탭 전환형 3개 화면 프로토타입(홈 화면 / 신고 준비 화면 / 최종 검토 화면)으로 구현
  • 리뷰 런처가 `file:///...` 직접 열기 대신 `http://127.0.0.1:8765/review-agent-flow.html` localhost 프리뷰를 띄우도록 보강
  • `scripts/build_local_agent_release.py`에 리뷰 UI 파일 포함
  • `local_agent/windows/README.windows.md`에 리뷰 UI 실행 명령 추가
  • 릴리스 번들을 다시 생성해 zip 안에 `review-agent-flow.html`, `start-review-ui.ps1` 포함 확인
  • 검증:
  • `python3 -m pytest tests/test_local_agent_release.py -q`
  • `python3 scripts/build_local_agent_release.py --clean --release-base-url https://hidudu.xyz/downloads/local-agent`
  • zip 내용에 `review-agent-flow.html`, `start-review-ui.ps1` 포함 확인
  • 커밋:
  • `37fa5eb` `feat: add local agent review ui package`
  • `0a16ce6` `feat: implement local agent review screens`
  • `1f97e36` `feat: launch review screens over localhost preview`

WP-040 웹앱 중심 구조로 UX 방향 전환

  • 상태: 완료
  • 완료 일시: 2026-04-19 17:00 KST
  • 목표:
  • 전체 사용자 경험의 중심을 로컬 에이전트가 아니라 웹앱으로 다시 고정한다
  • 로컬 에이전트는 렌트홈 로그인/자동입력/결과회수처럼 반드시 로컬이 필요한 구간만 담당하도록 역할을 좁힌다
  • 이후 구현과 검증을 웹앱(control plane) + 로컬 에이전트(execution plane) 구조 기준으로 이어갈 수 있게 문서를 수정한다
  • 결과:
  • `requirements/requirements_v1.md`에 웹앱 중심 아키텍처 반영
  • `requirements/ux_process_v1.md`의 사용자 여정을 웹앱 가입/로그인 → 계약 등록/보정 → 필요 시 로컬 에이전트 설치 구조로 재정리
  • `requirements/local_agent_spec_v1.md`에서 로컬 에이전트를 thin execution client로 정의
  • 로컬 에이전트가 맡지 않을 범위(회원가입/로그인/계약 등록/OCR 보정 등)를 명시
  • 검증:
  • `read_file requirements/requirements_v1.md`
  • `read_file requirements/ux_process_v1.md`
  • `read_file requirements/local_agent_spec_v1.md`
  • 커밋:
  • `7cd13f9` `docs: pivot ux architecture to web app plus thin agent`

WP-041 렌트홈 실기 probe 모드

  • 상태: 완료
  • 완료 일시: 2026-04-19 18:19 KST
  • 목표:
  • 로컬 에이전트가 실제 브라우저를 열고 렌트홈 로그인 전/후 DOM을 회수할 수 있게 한다
  • 로그인 후 페이지가 신고 화면인지 즉시 판독하고 input plan까지 이어지는 실기 검증 루프를 만든다
  • 한별님이 Windows PC에서 HTML/PNG/analysis JSON을 바로 남길 수 있는 실행 명령을 패키지에 포함한다
  • 결과:
  • `scripts/local_filing_agent.py`에 `analyze_page_html()` 추가
  • `scripts/local_filing_agent.py`에 `run_renthome_login_probe()` 추가
  • `--renthome-login-url`, `--capture-output-dir`, `--browser-channel`, `--probe-wait-timeout`, `--probe-poll-interval` CLI 옵션 추가
  • 로그인 전 `01-login-page.*`, 로그인 후 `02-post-login-page.*` 산출물(HTML/PNG/analysis JSON) 저장 지원
  • `local_agent/windows/start-renthome-probe.ps1` 추가
  • Windows README / MVP 테스트 가이드에 실기 probe 절차 추가
  • Windows 번들 누락이던 `renthome_ui_helper.py`를 패키지에 포함하도록 보강
  • local agent 번들을 `0.2.4`로 올려 update-local-agent.ps1로 자동 업데이트 가능하게 재빌드
  • 검증:
  • `source .venv/bin/activate && python -m pytest tests/test_local_filing_agent.py -q`
  • `source .venv/bin/activate && python -m pytest tests/test_local_agent_release.py -q`
  • 커밋:
  • `ef7862d` `feat: add renthome live probe mode`
  • `f405f7b` `fix: include renthome helper in windows bundle`
  • `88c5863` `chore: bump local agent bundle to 0.2.4`

WP-042 로컬 디버그 워커 아티팩트 업로드

  • 상태: 완료
  • 완료 일시: 2026-04-19 19:05 KST
  • 목표:
  • 한별님이 콘솔 출력을 매번 붙여넣지 않아도 로컬 probe 산출물이 서버로 자동 올라가게 한다
  • agent detail/runtime 쪽에서 최신 렌트홈 probe 결과를 바로 읽을 수 있게 한다
  • start-renthome-probe.ps1만 실행해도 base_url/agent_id를 재사용해 서버와 통신하는 디버그 루프를 만든다
  • 결과:
  • `app/db.py`에 `agent_probe_artifacts` 테이블 추가
  • `app/main.py`에 `POST /api/agents/{agent_id}/probe-artifacts` 추가
  • `app/main.py`에 `GET /api/agents/{agent_id}/probe-artifacts` 추가
  • `GET /api/agents/{agent_id}` 응답에 `recent_probe_artifacts` 추가
  • `scripts/local_filing_agent.py`에 `upload_probe_artifact()` 추가
  • `run_renthome_login_probe()`가 base_url/agent_id가 있으면 HTML/PNG/analysis JSON과 probe summary log를 서버로 자동 업로드하도록 보강
  • `start-renthome-probe.ps1`가 installed `agent-config.json`의 base_url/agent_id를 함께 넘기도록 보강
  • local agent 번들을 `0.2.4`로 올려 update-local-agent.ps1로 자동 갱신 가능하게 재빌드
  • 검증:
  • `source .venv/bin/activate && python -m pytest tests/test_agent_runtime_api.py tests/test_local_filing_agent.py tests/test_local_agent_release.py -q`
  • `source .venv/bin/activate && python -m pytest tests/test_local_agent_release.py tests/test_local_filing_agent.py tests/test_agent_runtime_api.py tests/test_renthome_ui_helper.py tests/test_smoke.py -q`
  • 커밋:
  • `480c7b0` `feat: upload local probe artifacts to server`

WP-043 BOM 안전 config 로드 및 상시 에이전트 기준 정리

  • 상태: 완료
  • 완료 일시: 2026-04-19 18:59 KST
  • 목표:
  • Windows PowerShell이 UTF-8 BOM으로 저장한 agent-config.json 때문에 probe 실행이 실패하는 문제를 막는다
  • local agent를 사람이 매번 수동 실행하지 않아도 되는 상시 에이전트 구조의 바로 다음 단계를 정리한다
  • 사용자 업데이트 경로가 끊기지 않도록 번들을 새 버전으로 올린다
  • 결과:
  • `scripts/local_filing_agent.py`의 `load_agent_config()`와 `load_json_file()`를 `utf-8-sig` 기준으로 읽도록 수정
  • BOM 포함 `agent-config.json` 회귀 테스트 추가
  • local agent 번들을 `0.2.4`으로 올려 update-local-agent.ps1로 자동 갱신 가능하게 재빌드
  • 상시 실행 구조는 기존 resident worker를 기반으로, 다음 단계에서 `업데이트 체크 + 테스트 시그널 polling + 결과 업로드`를 한 루프에 넣는 방향으로 고정
  • 검증:
  • `source .venv/bin/activate && python -m pytest tests/test_local_filing_agent.py::test_load_agent_config_reads_utf8_bom_json -q`
  • `source .venv/bin/activate && python -m pytest tests/test_local_agent_release.py tests/test_local_filing_agent.py tests/test_agent_runtime_api.py tests/test_renthome_ui_helper.py tests/test_smoke.py -q`
  • 커밋:
  • `b123397` `fix: support BOM agent config files`

WP-044 상시 실행 로컬 에이전트 1차

  • 상태: 완료
  • 완료 일시: 2026-04-19 19:20 KST
  • 목표:
  • 한별님이 probe/worker를 매번 수동 실행하지 않도록 상시 실행 구조의 첫 버전을 만든다
  • 서버가 debug task를 넣으면 로컬 에이전트가 polling으로 받아 처리할 수 있게 한다
  • 자동 업데이트 확인 + daemon cycle을 한 루프로 묶는 Windows 런처를 패키지에 포함한다
  • 결과:
  • `app/db.py`에 `agent_debug_tasks` 테이블 추가
  • `app/main.py`에 debug task 생성/조회/lease/완료 API 추가
  • `scripts/local_filing_agent.py`에 `fetch_next_debug_task()`, `complete_debug_task()`, `run_daemon_cycle()`, `daemon_loop()` 추가
  • CLI에 `--daemon` 모드 추가
  • `local_agent/windows/start-managed-agent.ps1` 추가
  • `local_agent/windows/register-managed-agent-task.ps1` 추가
  • 릴리스 번들을 `0.2.4`로 올려 update-local-agent.ps1로 자동 갱신 가능하게 재빌드
  • 검증:
  • `source .venv/bin/activate && python -m pytest tests/test_agent_runtime_api.py::test_agent_debug_task_queue_round_trip tests/test_local_filing_agent.py::test_run_daemon_cycle_prefers_debug_task_over_worker -q`
  • `source .venv/bin/activate && python -m pytest tests/test_local_agent_release.py tests/test_local_filing_agent.py tests/test_agent_runtime_api.py tests/test_renthome_ui_helper.py tests/test_smoke.py -q`
  • 커밋:
  • `d3d8b08` `feat: add managed local agent daemon`

WP-045 agent runtime debug task 요약 노출

  • 상태: 완료
  • 완료 일시: 2026-04-19 21:01 KST
  • 목표:
  • 운영자가 agent detail / sessions / overview에서 현재 debug task 상태를 바로 볼 수 있게 한다
  • debug task가 leased인지 pending인지 별도 목록 API 없이 즉시 판단 가능하게 만든다
  • overview summary에 debug task 대기/실행 수치를 함께 노출해 상시 에이전트 관측성을 높인다
  • 결과:
  • `app/main.py`에 `_build_runtime_current_debug_task()` 추가
  • `app/main.py`에 `_annotate_agent_sessions_with_runtime_state()` 추가
  • `GET /api/agents/{agent_id}` 응답에 `current_debug_task` 추가
  • `GET /api/agents/runtime-sessions`의 각 session 항목에 `current_debug_task` 추가
  • `GET /api/agents/runtime-overview`의 각 session 항목에 `current_debug_task` 추가
  • `GET /api/agents/runtime-overview` summary에 `pending_debug_tasks`, `leased_debug_tasks` 추가
  • `tests/test_agent_runtime_api.py`에 debug task summary 회귀 테스트 추가
  • 검증:
  • `python3 -m pytest tests/test_agent_runtime_api.py::test_agent_runtime_agent_detail_api_includes_current_debug_task_summary tests/test_agent_runtime_api.py::test_agent_runtime_overview_api_summarizes_sessions_and_recent_logs tests/test_agent_runtime_api.py::test_agent_runtime_sessions_api_lists_recent_agent_state -q`
  • `python3 -m pytest tests/test_agent_runtime_api.py tests/test_local_filing_agent.py tests/test_local_agent_release.py tests/test_renthome_ui_helper.py tests/test_smoke.py -q`
  • 커밋:
  • `93975c0` `feat: add runtime debug task summaries`

WP-046 stale debug task lease 복구

  • 상태: 완료
  • 완료 일시: 2026-04-19 21:04 KST
  • 목표:
  • 로컬 에이전트가 debug task를 lease한 뒤 중간에 종료돼도 task가 영구 정체되지 않게 한다
  • `next-debug-task` 재조회 시 오래된 leased task를 자동으로 다시 집을 수 있게 한다
  • 상시 실행 에이전트 재시작 후 probe/debug 루프가 수동 DB 수정 없이 복구되게 한다
  • 결과:
  • `app/main.py`에 `DEBUG_TASK_LEASE_TIMEOUT_MINUTES = 10` 추가
  • `GET /api/agents/{agent_id}/next-debug-task`가 pending task뿐 아니라 lease timeout을 넘긴 leased task도 재할당 대상으로 보도록 수정
  • stale lease를 다시 집을 때 `leased_at`, `updated_at`를 현재 시각으로 갱신하도록 정리
  • `tests/test_agent_runtime_api.py`에 stale lease 재할당 회귀 테스트 추가
  • 검증:
  • `python3 -m pytest tests/test_agent_runtime_api.py::test_agent_next_debug_task_releases_stale_lease tests/test_agent_runtime_api.py::test_agent_debug_task_queue_round_trip tests/test_agent_runtime_api.py::test_agent_runtime_agent_detail_api_includes_current_debug_task_summary -q`
  • `python3 -m pytest tests/test_agent_runtime_api.py tests/test_local_filing_agent.py tests/test_local_agent_release.py tests/test_renthome_ui_helper.py tests/test_smoke.py -q`
  • 커밋:
  • `3d3c357` `feat: recover stale debug task leases`

WP-047 렌트홈 로그인 후 진입 경로 탐색 자동화

  • 상태: 완료
  • 완료 일시: 2026-04-20 14:55 KST
  • 목표:
  • 로그인 직후 메인 포털에서 신고 입력 화면으로 들어가는 실제 경로를 자동으로 탐색하게 한다
  • 현재 `already_post_login` 뒤에 멈추는 문제를 줄이고 신고 메뉴 후보를 구조적으로 수집한다
  • 실패 시 어떤 메뉴/버튼까지 봤는지 서버와 산출물에 남기게 한다
  • 결과:
  • direct URL 우선 진입(`--renthome-target-url`) 경로와 target snapshot(`03-target-page`) 구조를 갖췄다
  • Chrome 기본 채널, readonly field DOM fallback, 1회 reload recovery, probe 중간 heartbeat/log/artifact 업로드, probe artifact 자동 정리까지 반영했다
  • managed agent 기준으로 probe 실행 자체와 서버측 관측은 안정화했다
  • 완료 기준 충족:
  • 로그인/대상 URL/probe artifact 업로드 경로가 실제 managed agent에서 반복 관측 가능
  • `01-login-page`, `02-post-login-page`, `03-target-page` 단계별 산출물 구조 확보
  • “에이전트가 죽었는지 / 로그인 전환이 막힌 것인지”를 서버 로그만으로 구분 가능
  • 검증:
  • `source .venv/bin/activate && pytest tests/test_local_filing_agent.py tests/test_register_renthome_probe_task.py tests/test_renthome_ui_helper.py tests/test_agent_runtime_api.py -q`
  • 최신 회귀 결과: 68 passed
  • 메모:
  • WP-047의 잔여 이슈처럼 보이던 항목은 이제 진입 경로 문제가 아니라 로그인 전환/DOM 판독 문제로 분리되었음

WP-048 live post-login DOM 판독/신고 화면 판별 보강

  • 상태: 진행 중
  • 시작 일시: 2026-04-20 14:55 KST
  • 목표:
  • 로그인 후 live browser DOM에서 실제 신고 화면 여부를 더 정확히 판별한다
  • filing_form이 아니어도 다음 이동 후보와 핵심 field 후보를 같이 남기게 한다
  • 한별님 PC 실기 probe 결과만으로 다음 보정 포인트를 바로 읽게 한다
  • 현재 진행/근거:
  • 0.2.10 diagnostic build로 probe 로그에 `login_state`를 추가해 visible/hidden field 길이, `kignCaseYn`, `KeySecurity`, `UsingKeyboardSecurity` 상태를 서버에서 직접 읽게 했다
  • 실측 결과, reload 직후에는 `visible_id_length=6`, `visible_pw_length=10`인데 post-login 대기 상태에서는 `visible_*`와 `hidden_*`가 모두 0으로 돌아간다
  • 즉 현재 병목은 “버튼 클릭 자체”보다 `#mber_idBf/#pwdBf → #mber_id/#pwd` hidden field/암호화 submit 체인으로 값이 넘어가지 않는 지점으로 좁혀졌다
  • live 페이지 스크립트상 `#btnLogin` 클릭 시 `fn_nProtectKaypadDecryptionForIdAndPasswordLogIn(...)`와 `fn_encrytCallback(...)`가 hidden field(`mber_id`, `pwd`)를 채운 뒤 제출하는 구조임을 재확인했다
  • 현재 병목:
  • reload 직후 입력은 잠깐 살아 있으나 hidden field가 끝내 채워지지 않고, 이후 visible field도 다시 비워져 로그인 화면에 머문다
  • 따라서 핵심 blocker는 보안토글/KeySecurity 조작 이후 로그인 JS callback 체인이 실제 submit까지 이어지지 않는 점이다
  • 다음 작업:
  • `fn_nProtectKaypadDecryptionForIdAndPasswordLogIn` / `fn_encrytCallback` 분기와 hidden field 반영 차이를 자동/수동 흐름으로 비교
  • 필요 시 callback 직접 호출 또는 hidden field 주입 기반 보조 경로 검증
  • post-login 성공 케이스를 다시 만들면 filing_form 판독과 field inventory를 이어서 확정

WP-049 신고 양식 fill-in action helper 1차

  • 상태: 진행 중
  • 시작 일시: 2026-04-20 21:45 KST
  • 목표:
  • filing job input_values를 실제 화면 필드에 넣는 action plan을 live DOM 기준으로 구체화한다
  • tenant/deposit/monthly_rent/date/address/registered_number 우선으로 입력 액션을 확정한다
  • 필수 매핑이 안 되면 즉시 manual_handoff로 빠지게 한다
  • 현재 진행:
  • live target artifact 기준 alias를 보강해 `selectHrrNam`, `selectRntGtnAmt`, `selectMnrntAmt`, `rstnoYr`까지 실제 fill plan이 생성되게 했다
  • `run_renthome_login_probe()`에 target page 도달 후 input plan 적용 + `임시저장` 클릭 시도를 추가했다
  • 회귀 테스트에 live RentHome field id 매핑과 `임시저장` 클릭 시나리오를 추가해 `70 passed`를 확인했다
  • 남은 병목:
  • live artifact에서는 `lease_start_date`, `lease_end_date`, `road_address`가 독립 input으로 아직 드러나지 않아 `임대주택 불러오기`/표 row 처리 단계가 추가로 필요하다
  • `registered_number`도 현재는 `#rstnoYr` 1개만 직접 잡히므로 분할 입력 구조 확인이 더 필요하다
  • 다음 작업:
  • 0.2.12 배포본으로 실제 managed agent에서 1차 fill + `임시저장` 시도가 되는지 재실행
  • target snapshot 재수집 후 `임대주택 불러오기`와 표 row selector를 확정
  • 시연용 웹→OCR→패키지→자동신고 흐름에서 어디까지 자동/어디서 수동인지 화면 기준으로 정리

WP-050 managed agent 로컬 로그 파일 보강

  • 상태: 예정
  • 목표:
  • Windows 상시 에이전트가 재시작/실패 시 콘솔 없이도 로컬 파일 로그를 남기게 한다
  • 작업 스케줄러로 실행된 경우에도 마지막 오류를 운영자 PC에서 바로 확인 가능하게 한다
  • start-managed-agent.ps1 기준 로그 경로와 회전 규칙을 고정한다
  • 예정 범위:
  • PowerShell 런처 또는 agent 쪽 파일 로그 추가
  • README/테스트 문서 반영
  • 회귀 테스트 또는 스크립트 검증 추가

WP-051 debug task 등록 빠른 경로 정리

  • 상태: 진행 중
  • 목표:
  • 실제 probe/debug task를 서버에 넣는 운영 절차를 한 번에 보이게 정리한다
  • 한별님 또는 운영자가 어떤 task_type/payload를 넣어야 하는지 헷갈리지 않게 한다
  • 장기적으로는 `start-managed-agent`가 task를 받고, 한별님은 로그인/인증/최종 확인만 하는 흐름으로 정리한다
  • 웹앱/문서/스크립트 중 최소 1개 빠른 경로를 고정한다
  • 현재 진행:
  • direct probe 직접 실행 대신 managed agent가 받을 `renthome_probe` debug task를 서버에 넣는 helper를 먼저 만든다
  • 두두는 서버에서 task를 넣고, 한별님은 로컬에서 로그인/인증/확인만 하는 흐름으로 바꾸는 중
  • `scripts/register_renthome_probe_task.py`를 추가해 서버에서 `renthome_probe` debug task를 바로 등록할 수 있게 함
  • probe task payload가 필요 시 one-off 로그인 ID/비밀번호도 함께 넘길 수 있게 보강해 managed agent 기준 자동 로그인 실험이 가능해짐
  • `operations/mvp_test_guide.md`에 managed agent가 probe task를 자동 수신하는 실행 예시를 추가함
  • 이번 로그인 안정화 수정이 실제 설치본 업데이트로 이어지도록 로컬 에이전트 버전을 `0.2.6`으로 올리고 Windows 번들을 재생성했다
  • 2026-04-20 아침 기준 target 신고 화면 재캡처용 task 7은 lease 이후 heartbeat/artifact가 갱신되지 않아 `stalled_no_new_heartbeat`로 정리했다
  • 예정 범위:
  • debug task 생성용 문서 또는 helper 스크립트 추가
  • payload 예시와 검증 절차 정리
  • managed agent 기준 사용자 개입 지점을 로그인/인증/최종 확인으로 축소
  • work-items/wp_status 동기화

WP-052 표준 계약서 OCR ingest / filing package 연결

  • 상태: 완료
  • 목표:
  • 공식 표준 임대차계약서 샘플을 확보해 OCR 또는 텍스트 추출 후 구조화 데이터를 만든다
  • `contract_files.ocr_status`, `contract_files.ocr_text`, `contract_events.extracted_data_json`을 실제로 채우는 서버 경로를 추가한다
  • OCR 결과를 filing package 생성에 연결해 샘플 계약서만으로 신고 패키지 초안을 만들 수 있게 한다
  • 결과:
  • 공식 표준계약서 샘플 소스로 `adrhome.reb.or.kr` 공개 PDF를 확보해 `data/fixtures/contracts/housing_lease_standard_contract.pdf`에 저장했다
  • `scripts/contract_ocr.py`를 추가해 PDF 텍스트 추출, 핵심 계약 필드 파싱, 표준계약서 기반 machine-readable 샘플 PDF 생성 helper를 구현했다
  • `POST /api/contracts/{contract_event_id}/ocr-extract`를 추가해 업로드된 `contract_pdf`를 처리하고 `contract_files.ocr_status`, `contract_files.ocr_text`, `contract_events.extracted_data_json`을 갱신하게 했다
  • `_build_package()`가 `corrected_data > extracted_data > raw row` 순으로 패키지 값을 병합하도록 보강했다
  • `GET /api/contracts/{contract_event_id}` 응답에 `corrected_data`, `extracted_data` 파싱 필드를 함께 노출하도록 정리했다
  • 검증:
  • `pytest tests/test_contract_ocr.py tests/test_contract_ocr_api.py -q`
  • `pytest tests/test_lease_reporting_api.py -q`
  • `pytest tests/test_local_filing_agent.py tests/test_register_renthome_probe_task.py tests/test_renthome_ui_helper.py -q`
  • 예정 후속:
  • 실제 스캔 문서 OCR fallback 추가 검토
  • 공식 원본 PDF와 machine-readable 샘플 생성 script 실행 경로 안정화

WP-053 RentHome live filing form inventory / 첨부 자동화 1차

  • 상태: 진행 중
  • 목표:
  • 실제 신고 화면 기준 입력 필드/버튼/첨부 input inventory를 확보한다
  • local agent 단계별 캡처 산출물을 서버에서 읽어 첨부 요구사항까지 구조화한다
  • 이후 자동 fill/upload helper의 기준 selector 세트를 확정한다
  • 선행 조건:
  • WP-051 managed agent stepwise capture 안정화
  • WP-052 OCR 기반 package 초안 생성 가능
  • 현재 진행:
  • 서버 Playwright 기준 로그인 페이지의 readonly/nProtect 구조는 확인 완료
  • managed agent target-page 재캡처 task 7은 lease 이후 heartbeat/artifact가 정체되어 `stalled_no_new_heartbeat`로 정리함
  • 따라서 live filing form inventory는 local agent stepwise capture 안정화 후 재개해야 함
  • 예정 범위:
  • live target-page HTML/PNG/analysis 재수집
  • field/button/file input inventory JSON 정리
  • `renthome_ui_helper.py` alias/mapping 보강
  • 첨부 자동화 helper 설계 및 테스트 추가
  • wp_status/work-items 반영