Repository navigation
Prohibit internal register, localize terminology - #4
Merged
Merged
Conversation
Add two class-level controls that apply to Vietnamese and English alike. Internal register gate (references/internal-register-gate.md) - Prose about the manuscript, the project, a verification run, a local artifact, or the drafting conversation is prohibited in publication-facing text, not merely discouraged. - Three ordered tests decide each candidate: admissible semantic subject; survival under a work-continues and a re-typesetting probe; verifiability by a reader holding only the published artifact. - Four verdicts are licensed (delete, recast, relocate, license). Softening is not a verdict: hedging an internal sentence leaves it internal. - Ten classes with quantitative thresholds; assistant_residue, placeholder_residue, and internal_artifact_reference are blocking. - Licensed slots are enumerated so the gate cannot destroy correct writing: one roadmap per document, resolved cross-references, genre-mandated sections, Vietnamese thesis slots, response letters, teaching material. Terminology localization policy (references/terminology-localization.md) - Whether a foreign term is translated, kept, or glossed is one decision per concept, recorded in the glossary with its domain and authority tier. - Four tests, a five-tier authority order, a 139-row polysemy diagnostic across 87 disciplines, load-bearing distinctions, and rigid designators. - overtranslation_of_designator and distinction_collapse_by_translation are blocking: both change what the text refers to, not how it reads. Verification - scripts/internal_register_scan.py: sectioned scan with protected-zone exemption, genre profiles, and threshold reporting. - scripts/test_internal_register_scan.py: 29 tests, symmetric across Vietnamese and English fixtures, including four mandatory false negatives. - validate_skill.py and the CI workflow now run the scan tests, so a missing class in either language turns the gate red. Verified by deliberate mutation: removing the English claim-denial branch fails the validator. - Calibrated on four real manuscripts, which produced three false positives now covered by tests: correlative "không chỉ … mà còn" / "not only", the LaTeX preamble, and repository filenames versus machine-local paths.
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Vì sao
Một bản thảo có thể đúng mọi con số, biên dịch sạch, nằm trong trần trang, và vẫn bị từ chối ngay trang đầu vì câu chữ nói về bản thảo thay vì nói về thế giới. Không có cổng tự động nào bắt được lỗi này: văn bản compile được, trích dẫn resolve hết, không có số bịa.
PR bổ sung hai lớp còn thiếu và biến cả hai thành kiểm định chạy được, áp dụng đối xứng cho tiếng Việt và tiếng Anh.
Nội dung
1. Cổng văn phong nội bộ (
references/internal-register-gate.md)Văn phong nội bộ/tự thuật bị cấm, không phải khuyến nghị. Bốn chế độ bắt buộc:
write(khai chủ thể hợp lệ cho từng đoạn),check(quét trước mọi lần bàn giao),read(kiểm bản của người khác, chỉ báo không tự sửa),sweep(một hit xác nhận thì quét toàn văn, cả hai phiên bản ngôn ngữ).Ba phép thử có thứ tự cho từng câu:
Bốn phán quyết:
delete,recast,relocate,license.softenbị cấm — thêm hedge vào câu nội bộ thì câu vẫn nội bộ, lại thêm mơ hồ.recastphải giữ phạm vi mà câu gốc đang gánh.2. Chính sách thuật ngữ (
references/terminology-localization.md)Quyết theo quy chiếu và người đọc, không theo danh sách từ. Bốn phép thử (tên riêng cứng → cách dịch đã định hình của ngành → phân biệt đang gánh lập luận → người đọc tra được), thang thẩm quyền 5 bậc, bảng chẩn đoán đa nghĩa 139 hàng trên 87 phân ngành.
baselinelà mốc cơ sở khi đánh giá, kỳ gốc trong kinh tế lượng, giá trị ban đầu trong thử nghiệm lâm sàng — nên một danh sách từ toàn cục là công cụ sai.3. Kiểm định
scripts/internal_register_scan.py— 10 lớp, ngưỡng định lượng, hồ sơ thể loại (thư phản biện và học liệu được phép tự thuật), vùng bảo vệ LaTeX/math/verbatim/comment/citation.scripts/test_internal_register_scan.py— 29 test, mỗi test nêu tiêu chí nó kiểm nên khi đỏ thì chỉ vào một quy tắc, không chỉ vào một regex.Ba lỗi chặn:
assistant_residue,placeholder_residue,internal_artifact_reference. Mức nặng đi theo việc người đọc có tiếp cận được đối tượng hay không — đường dẫn repo công khai thuộc tuyên bố tái lập, còn đường dẫn trên một máy thì chặn.Đã kiểm chứng thế nào
Bộ dò được hiệu chỉnh trên bốn bản thảo thật, không chỉ trên fixture. Ba dương tính giả do vòng đó lộ ra và đã vá, kèm ghi lại lý do:
không chỉ … mà còn/not only … but alsolà nhấn mạnh, không phải phủ định — từng gây 5 báo động sai trong một bài.\begin{document}và\end{document}.scripts/foo.pytrong tuyên bố tái lập là định danh công khai;/Users/…thì không. Tách hai lớp đưa một bản thảo từblocksai thành mức sửa đúng, vẫn giữ nguyên blocker thật (commit hash trong văn xuôi).Đối xứng hai ngôn ngữ: văn bản bẩn thuần Anh ban đầu chỉ bắt 7/10 lớp — thiếu
progress_state_limitation,verification_log_prose,defensive_disclaimer_stack. Đã bổ sung mẫu tiếng Anh và fixture bẩn/sạch riêng cho tiếng Anh; nay đủ 10/10 ở cả hai ngôn ngữ.Cổng biết đỏ: đột biến có chủ đích (bỏ nhánh phủ định tiếng Anh khỏi
CLAIM_DENIAL) làm validator exit 1 với 2 test đỏ; phục hồi thì xanh lại. Theo đúng nguyên tắc sẵn có của repo: một phép kiểm tra không bao giờ đỏ thì không phải bằng chứng.Tích hợp
Cổng nội bộ nối vào hợp đồng skill (bước 4/5/6/7 của workflow),
references/quality-rubric.md(mục cổng riêng:SEM/VOICE/CONSkhông thể đạt 4 khi còn lỗi),references/writing-failure-taxonomy.md(7 mã mới),schemas/paragraph-plan.schema.json(admissible_subjectbắt buộc),schemas/audit-record.schema.json(register_verdict, không cósoften).scripts/validate_skill.pygọi bộ test scanner, nên thiếu một lớp ở bất kỳ ngôn ngữ nào cũng làm cổng đỏ. CI thêm một bước tường minh.Kết quả cục bộ
Giới hạn
Bộ dò chỉ nâng sàn.
document_as_subjectvàprogress_state_limitationcó cách diễn đạt vòng mà không mẫu từ vựng nào bắt được, nên báo cáo phải tách riêng hai con số: máy tìm được bao nhiêu, và vòng đọc tay tìm được bao nhiêu. Báo cáo sạch chỉ nhờ máy quét là kiểm chứng một phần, và tài liệu buộc ghi rõ như vậy.