KB-6E78
05 — Điều 39 rerun MARK result
3 min read Revision 1
dieu44dieu39rerun-mark
05 — Điều 39 rerun MARK result
Pre-rerun state transitions
marked → mark_rejected (actor: dieu39_remark_cut_request_transition, via fn_cut_verify_mark(approve=false))
mark_rejected → mark_in_progress (actor: dieu39_remark_with_schema_v1, via new fn_cut_mark_staged_file)
mark_in_progress → marked (actor: dieu39_remark_with_schema_v1, via new fn_cut_mark_staged_file)
Staging record 3d9d0388-… was first marked lifecycle_status=rejected via fn_iu_verify_mark(p_apply=true) for an audit trail (problems recorded in metadata.verify_mark_problems).
Piece construction
Derived from the previous bad manifest's pieces. Mapping rules:
| new field | source |
|---|---|
local_piece_id |
`'P' |
source_position |
piece_index::int |
piece_role |
'section_body' (uniform — no vocab yet) |
section_type |
normative_section → section (vocab membership); other values kept as-is |
content_text |
unchanged |
canonical_address |
unchanged |
parent_local_id |
null (flat structure) |
title, unit_kind, source_ref, piece_index |
preserved verbatim (informational) |
Re-mark invocation
SELECT public.fn_cut_mark_staged_file(
p_cut_request_id := '146f1520-aaa2-4bda-af2c-06a8f76cd36a'::uuid,
p_pieces := <16 v1-schema pieces>,
p_actor := 'dieu39_remark_with_schema_v1',
p_mark_report_md := '...'
);
Result
{
"status": "marked",
"cut_request_id": "146f1520-aaa2-4bda-af2c-06a8f76cd36a",
"manifest_staging_record_id": "9fa4685e-d35a-45d4-aee7-aa2836785ca5",
"manifest_digest": "aded6af91fb9643fb2ea99ff024a1ede",
"pieces_count": 16,
"piece_schema_validated": "cut_manifest_piece_schema_v1",
"alias_result": {
"alias": "fn_iu_op_mark_file",
"source_hash": "a732962665691c620a050265de246050",
"source_bytes": 23394,
"idempotency_key": "cut-mark-146f1520-aaa2-4bda-af2c-06a8f76cd36a-a12e85d0cc07a3a5fd9dd5e9f9f78753",
"inner_result": {
"ok": true,
"expires_at": "2026-06-11T02:51:13.561188+00:00",
"lifecycle_status": "pending_review"
}
}
}
Manifest field-completeness AFTER rerun
| field | count |
|---|---|
local_piece_id |
16/16 |
content_text |
16/16 |
canonical_address |
16/16 |
source_position (integer-like) |
16/16 |
piece_role |
16/16 |
section_type (in vocab) |
16/16 |
source_hash (a732962665691c620a050265de246050) and source_bytes (23394) unchanged from the original COPY — confirming COPY_TO_CUT_ZONE was correct all along; only the MARK output contract had been wrong.
No manual jsonb_set was used — pieces were correct at the boundary entry, MARK validated and accepted, staging record + payload created cleanly.