수정 뒤 확인을 다시 요구하는 업무 전환기 / Revision-bound workflow
독립 합성 교육용 코드입니다. 실제 업체의 소스나 자료를 포함하지 않습니다.
Independent synthetic teaching code. No client source, records, credentials or external dependencies.

사용 / Use: Node.js에서 node test.mjs. 브라우저에서는 demo-ko.html 또는 demo-en.html을 엽니다.
Run node test.mjs in Node.js. Open either self-contained HTML demo locally.
Import {initialWorkflow, transitionWorkflow, workflowView, snapshotWorkflow, restoreWorkflow} from './workflow.mjs'.
Actions: edit with quantity string, prepare, confirm, cancel, reset. A changed quantity increments revision and invalidates both preparation and confirmation. Same-value edits and repeated actions do not create duplicate progress. Invalid draft text up to 12 chars is preserved, but preparation is blocked. Quantity must be 1..20. Cancellation blocks edits/progress until reset.
Snapshots only accept synthetic-review-v1 and exact known keys, current revision stamps, safe revision integers and <=1200 characters. A snapshot is a teaching example, not a signed approval record. Page memory is not persistent storage.
실무 운영용이 아닌 합성 예제입니다. 담당자 인증·서버 권한·전자서명·취소 전표·재고·결제·동시 편집·중복 요청 방지는 구현하지 않습니다.
Does not implement actor authentication, server authorization, signatures, credit notes, stock, payments, concurrency or network request idempotency. Apply those independently in a production service.
