실제 현장 사례가 아닌 가상 교육자료입니다. PASS는 의도적으로 잘못된 행을 기대한 방식으로 찾아낸 결과도 포함합니다.
전체 실습팩 · 기본 결과 CSV · 경계 결과 CSV · 기본 코드 · 경계 코드 · 파일 해시
current_loan.csv가 현재 대여·자산을 지정하고 loans.csv가 대여-자산 관계를 연결합니다. 현재 대여와 그 자산의 반납만 구성품별로 합산합니다. 등록된 다른 대여나 미등록 대여는 제외하고 현재 관계 자체가 다르면 명시적 입력 오류로 멈춥니다. 수량 일치는 실물 수령·기능·안전 확인을 대신하지 않습니다.
기본 예시 6개 필드와 별도 경계 5사례가 각각 독립 기대값과 일치했습니다. 기본 예시의 기존 수치와 expected/report.json은 보존했습니다.
기본 실행 UTC 2026-10-30T06:52:58.066086+00:00 · Python 3.14.8 / Darwin.
| loan | asset |
|---|---|
| L01 | KIT01 |
| asset | part | expected_qty |
|---|---|---|
| KIT01 | body | 1 |
| KIT01 | adapter | 1 |
| KIT01 | cable | 2 |
| loan | asset |
|---|---|
| L01 | KIT01 |
| L02 | KIT01 |
| L03 | KIT02 |
| loan | asset | starts_at |
|---|---|---|
| L02 | KIT01 | 2026-10-03T14:00 |
| loan | part | qty |
|---|---|---|
| L01 | body | 1 |
| L01 | adapter | 1 |
| L01 | cable | 1 |
| 반납행 | 대여번호 | 연결자산 | 구성품 | 수량 | 현재반납포함 | 사유 |
|---|---|---|---|---|---|---|
| 1 | L01 | KIT01 | body | 1 | 포함 | 현재 대여·자산에 연결 |
| 2 | L01 | KIT01 | adapter | 1 | 포함 | 현재 대여·자산에 연결 |
| 3 | L01 | KIT01 | cable | 1 | 포함 | 현재 대여·자산에 연결 |
실제값 JSON · 실제값·기본 기대값 대조 · 기본 독립 기대값
각 사례는 기본 예시의 사본에 명시된 값만 바꿉니다. 결과를 본 뒤 기대값을 복사한 것이 아니라, 올바른 누락·연결·수행 판단을 사례별 expected.json에 별도로 정했습니다. 아래 PASS는 단순히 명령이 실패하거나 종료됐다는 뜻이 아니라 실제 판단이 그 기대와 맞았다는 뜻입니다.
| 경계사례 | 확인 질문 | 결과 |
|---|---|---|
| current_asset_mismatch | 현재 대여의 자산이 등록 관계와 다르면 입력 오류 | PASS |
| other_asset_loan | 다른 자산 KIT02에 연결된 L03 반납은 제외 | PASS |
| same_asset_other_loan | 자산이 같아도 다른 대여 L02의 반납은 제외 | PASS |
| split_return_sum | 같은 현재 대여의 추가 케이블 반납은 덮어쓰기 대신 합산 | PASS |
| unknown_loan_return | 미등록 대여 L99의 반납은 현재 L01 반납으로 세지 않음 | PASS |
{
"error": "current_loan_asset_mismatch"
}{
"error": "current_loan_asset_mismatch"
}{
"actual": {
"returned_piece_total": 0,
"return_event_exists": false
},
"details": {
"current_asset": "KIT01",
"accepted_return_rows": 0
}
}{
"actual": {
"expected_piece_total": 4,
"returned_piece_total": 0,
"missing_parts": {
"body": 1,
"adapter": 1,
"cable": 2
},
"return_event_exists": false,
"available_for_next_loan": false,
"needs_contact": [
"L02"
]
},
"details": {
"current_loan": "L01",
"current_asset": "KIT01",
"accepted_return_rows": 0,
"excluded_return_rows": [
{
"row": 1,
"loan": "L03",
"part": "body",
"reason": "현재 대여가 아님"
},
{
"row": 2,
"loan": "L03",
"part": "adapter",
"reason": "현재 대여가 아님"
},
{
"row": 3,
"loan": "L03",
"part": "cable",
"reason": "현재 대여가 아님"
}
],
"count_scope": "Only quantities of the current loan and its registered asset. No physical receipt,condition or identity verification."
}
}{
"actual": {
"returned_piece_total": 0,
"return_event_exists": false,
"missing_parts": {
"body": 1,
"adapter": 1,
"cable": 2
}
},
"details": {
"accepted_return_rows": 0
}
}{
"actual": {
"expected_piece_total": 4,
"returned_piece_total": 0,
"missing_parts": {
"body": 1,
"adapter": 1,
"cable": 2
},
"return_event_exists": false,
"available_for_next_loan": false,
"needs_contact": [
"L02"
]
},
"details": {
"current_loan": "L01",
"current_asset": "KIT01",
"accepted_return_rows": 0,
"excluded_return_rows": [
{
"row": 1,
"loan": "L02",
"part": "body",
"reason": "현재 대여가 아님"
},
{
"row": 2,
"loan": "L02",
"part": "adapter",
"reason": "현재 대여가 아님"
},
{
"row": 3,
"loan": "L02",
"part": "cable",
"reason": "현재 대여가 아님"
}
],
"count_scope": "Only quantities of the current loan and its registered asset. No physical receipt,condition or identity verification."
}
}{
"actual": {
"expected_piece_total": 4,
"returned_piece_total": 4,
"missing_parts": {},
"return_event_exists": true,
"available_for_next_loan": true,
"needs_contact": []
},
"details": {
"accepted_return_rows": 4
}
}{
"actual": {
"expected_piece_total": 4,
"returned_piece_total": 4,
"missing_parts": {},
"return_event_exists": true,
"available_for_next_loan": true,
"needs_contact": []
},
"details": {
"current_loan": "L01",
"current_asset": "KIT01",
"accepted_return_rows": 4,
"excluded_return_rows": [],
"count_scope": "Only quantities of the current loan and its registered asset. No physical receipt,condition or identity verification."
}
}{
"actual": {
"expected_piece_total": 4,
"returned_piece_total": 0,
"missing_parts": {
"body": 1,
"adapter": 1,
"cable": 2
},
"return_event_exists": false,
"available_for_next_loan": false,
"needs_contact": [
"L02"
]
},
"details": {
"current_loan": "L01",
"current_asset": "KIT01",
"accepted_return_rows": 0
}
}{
"actual": {
"expected_piece_total": 4,
"returned_piece_total": 0,
"missing_parts": {
"body": 1,
"adapter": 1,
"cable": 2
},
"return_event_exists": false,
"available_for_next_loan": false,
"needs_contact": [
"L02"
]
},
"details": {
"current_loan": "L01",
"current_asset": "KIT01",
"accepted_return_rows": 0,
"excluded_return_rows": [
{
"row": 1,
"loan": "L99",
"part": "body",
"reason": "등록되지 않은 대여번호"
},
{
"row": 2,
"loan": "L99",
"part": "adapter",
"reason": "등록되지 않은 대여번호"
},
{
"row": 3,
"loan": "L99",
"part": "cable",
"reason": "등록되지 않은 대여번호"
}
],
"count_scope": "Only quantities of the current loan and its registered asset. No physical receipt,condition or identity verification."
}
}경계 실행 결과 전체 JSON · 경계 실행 결과 CSV
아래 도해는 변경하지 않은 기본 예시의 수치를 요약합니다. 추가 경계사례의 다른 수치를 실제 현장 결과로 덧씌우지 않습니다.
Python3.10 이상에서 python3 validate.py와 python3 regression.py를 실행할 수 있습니다. 기본 입력을 바꾸면 기존 기대값과 달라질 수 있으므로 결과의 actual과 누락 이유를 읽습니다. 이 HTML은 배포 시점 기록이며 재실행 때 자동 갱신되지 않습니다.
current_loan.csv가 현재 대여·자산을 지정하고 loans.csv가 대여-자산 관계를 연결합니다. 현재 대여와 그 자산의 반납만 구성품별로 합산합니다. 등록된 다른 대여나 미등록 대여는 제외하고 현재 관계 자체가 다르면 명시적 입력 오류로 멈춥니다. 수량 일치는 실물 수령·기능·안전 확인을 대신하지 않습니다.