wal: flush 20260713T1401

This commit is contained in:
pqhuy1987
2026-07-13 14:01:30 +07:00
parent 88bd8e666d
commit 078396d3a0
2 changed files with 19 additions and 27 deletions

View File

@ -40,3 +40,7 @@
- **2026-07-12 (S112 PE sign-off approach-review PRE-fan-out+deploy, security/governance lane) `[fable-real-single]`:** **GO-WITH-ADJUSTMENTS.** (1) EDGE-5 decision-3 hard-lock: spec placement (reject-branch SVC:92 + EnsureCanReject:321 + handler) **INCOMPLETE — bỏ sót admin-override path SVC:290** (`if(isAdmin) evaluation.Phase=targetPhase`) → admin un-terminal DaDuyet bằng decision=Approve (KHÔNG qua reject). Fix = 1 guard TOP-of-method sau `var fromPhase` SVC:53. Lesson: **terminal-lock gác FROM-state ở ĐỈNH method, KHÔNG rải per-branch** (per-branch bỏ sót admin/fall-through). (2) CEO-skip decision-2: A1 (creator tự ký ô mình thay auto-bypass) **TẠO đường CEO-skip MỚI** multi-step-có-CEO — trước A1 bypass advance-qua slot creator (bỏ check finalize); sau A1 creator qua ApproveV2Async → slot có `AllowApproverFinalize`=true + tick → DaDuyet bỏ CEO (SVC:867). invest-C "đã tồn hôm nay" IMPRECISE (chỉ đúng 1-step-no-CEO). Escalate owner. Lesson: **đổi auto-advance→manual-approve = mở lại per-slot flag mà auto-path che khuất** — re-scan flag khi đổi ai-đi-qua-code-nào.
- **2026-07-12 (S112 Supplier Excel-import close-review PRE-deploy, BE+ADJUST) `[fable-real-single]`:** **GO-WITH-ADJ.** 6 axes PASS: OrdinalIgnoreCase preview+confirm (BuildCiIndex:446/batchByCode:157/seen:158), FillNulls:381-409 skip Code/Name/Type, all-or-nothing gate:137-152 pre-mutate + SaveChanges:188, parser abs Cell:284 (KHÔNG CellsUsed) +#REF!→null:289 +NAS-raw:290 +fingerprint-Ordinal-reject:223, Mig 63 reversible+3-file+snapshot:3330, col→field 30/30 OK (Code=col4 viết-tắt, Name=col5 tên-cty). REQUIRED adjust = bake 30 real token → ExpectedHeaderTokens:37-66 (nguồn test RealFileHeaderTokens:420-451 == brief exact; Case 9 auto-flip). **CAUGHT (MAJOR de-risk): Unicode NFC/NFD** — test dựng workbook từ literal NFC nên KHÔNG chứng file Excel THẬT accept; đề `.Normalize(FormC)` NormalizeHeader:306. Lesson: self-flip token-test = internal-consistency KHÔNG external-file-acceptance (artifact ngoài repo = bất-khả-verify).
- **2026-07-12 (S112 FINAL pre-commit+deploy review — BÓ 2-feature PE-signoff + Supplier-import) `[fable-real-single]` — VERDICT GO (0 must-fix):** Cả 2 close-review adjust ĐÃ áp đúng. **F1 PE**: EDGE-5 guard đúng ĐỈNH-method SVC:66 (sau fromPhase:53) exempt admin+system, precede CẢ 5 branch incl admin-override:306 (:306 vốn `if(isAdmin)` nên non-admin không tới) + EnsureCanRejectV2Async:332 untouched; A1 minOwn=Min(Order):607 bypass<minOwn no-auto-sign pointer-stop `if(minOwn>1)`:637 (StepIdx giữ 0 từ submit:265), 4 nhánh (auto-sign/next-Bước/step2/terminal) DELETED; History CHANGE4:751-777 log opinion-cũChangelog TRƯỚC 4 dòng overwrite, chỉ non-empty, keyed per-level-row (matchingLevel.Id) chỉ fire khi CÙNG-NV re-sign, enum Workflow=5/Update=2 tồn. Tests 8-new/4-updated adversarial-grade (EDGE-5 system-exempt chứng qua msg "không hỗ trợ"≠"kết thúc"; history 2-boundary). **F2 import**: 30 ExpectedHeaderTokens==test byte-identical all-NFC (script verify 0-mismatch); NormalizeHeader FormC:313 áp cả 2 phía; endpoint [Authorize(Roles=Admin,CatalogManager)] = pattern Update/Delete; Mig 63 = 2 nullable additive (prod-safe, expansion-cols từ Mig 62 `778fc98` deployed per 4-NCC-in-prod). **Nice-to-have (KHÔNG block)**: (a) test comment :31-37 + svc :31-34 stale "BEST-GUESS chưa khớp" (đã bake) misleading, harmless; (b) test NormalizeJoin:407-414 thiếu `.Normalize(FormC)` svc:313 moot token toàn NFC nhưng latent nếu sau thêm token NFD. **UAT-visible behavior change (by-design, không phải bug)**: A1 bỏ auto-terminal-on-submit TP tạo phiếu-1-bước-tự-là-cấp-cuối GIỜ phải bấm Duyệt thêm 1 lần (trước tự DaDuyet). **Lesson: Case-9 self-adjusting (shouldMatch tính runtime) PASS ≠ chứng real==expected → phải diff byte-level 2 mảng token TAY; build/test-green (458) nhận theo claim, review logic bằng đọc.**
<!-- ===== S116 curate batch (2026-07-13) moved 2 verbose entries (S115, S116) from L1 (hook >17.1KB) ===== -->
- **S115 (2026-07-13) `/fable-real` spec-review presence-not-age adopt (D1 docs + D2 hmw.js STOP-HARD + D3 archive-gate) — PASS-WITH-FIXES (0C/2M/5m):** sub = `runs/2026-07-13-presence-not-age-adopt/spec-review-fable-real.md`. **M1: acceptance-grep can't detect its OWN deliverable's miss** — D2 crit-4 regex `fail-soft.*default subagent\|degrade về default subagent` catches only 1/3 doc-lines (misses ultra-on:21 "cảnh báo" + README:208 order fail-soft-AFTER) → 0-hits=false-PASS; fix = bare-token grep + human-classify vs frozen-history, NOT narrow ordered-pattern. **M2: "skip element" bolted on contiguous-prefix cut = correctness inversion** — naive `if protected continue` leaves skipped entry ABOVE cutLine → STILL archived while code thinks excluded; needs non-contiguous per-entry byte-sum; DRY-RUN bounds harm but 0 acceptance tests after-est. **Lessons: (1) `parallel()` = runtime-builtin NOT in-repo → premise unverifiable-from-source but design robust-under-BOTH-truth-values = endorse-with-caveat; (2) grep-acceptance must bare-token+classify; (3) verify EACH regex-alt vs EACH real target-line by hand; (4) node --check HAS teeth + top-level return/await pass via CJS wrapSafe (empirical > theory).** Spec faithful (3 floors+rec-3+3 honest-notes verified on-disk), scope-clean, honest-caveated; no Smart-Friend lower.
- **S116 (2026-07-13) outward-email GATE se→ai_infra H-22 WAL restart runtime-verify — PASS (0 over-claim / 3 minor):** file `broadcasts/outbox/ai_infra/2026-07-13-se-to-ai_infra-h22-wal-restart-runtime-verify.md`. 6/6 ground-truth re-run MATCH — #1 rev-list=0 · #2 tree clean (modulo email-artifact itself untracked) · #3 HEAD=88bd8e6 · #4 WAL empty-template · #5+#6 EXACT: archive-gate 12/12 sub<25.6KB (tightest investigator-codebase 25237, 363B headroom) + A7 246/246 pointers 0-fail; crystallized 382713B/380K-tok cap/252429-tok headroom. Caveat section STRONG+prominent (own §header "Nấc honest", bold WAL RỖNG/CHƯA, enumerates a/b/c verified vs content-recovery NOT; line31 defers real-persistS111 Stop-hook×2). No implicit "full restart-recovery verified". **Minor: (1) caveat item (a) "WAL persist qua restart" evidentiary-WEAK — `.claude/WAL.md` git-COMMITTED @88bd8e6 empty-template 0-drift → post-reboot existence = git/filesystem guarantee NOT WAL-mechanism proof (self-corrected by line31 defer-to-S111); (2) unit-notation "382.7KB / 380K-tok" juxtaposes bytes-vs-tokens (382.7KB≈95-127K tok not 382.7K) — looks scarier/understates headroom, "(fits)+252K" resolves; (3) current tree clean modulo email-artifact-itself (untracked).** Lesson: persist-claim on git-tracked WAL verify tracked+0-drift FIRST; "file survives restart" = git/filesystem property, mechanism-persist proof lives at Stop-hook run (S111). No Smart-Friend lower report well-calibrated toward humility.