feat(task): Phase 2 — registry/corpus derived from CanonicalStandard - #15
Closed
xianyu9n wants to merge 2 commits into
Closed
feat(task): Phase 2 — registry/corpus derived from CanonicalStandard#15xianyu9n wants to merge 2 commits into
xianyu9n wants to merge 2 commits into
Conversation
added 2 commits
August 20, 2026 18:33
Unify the data chain: raw standard -> CanonicalStandard (Phase 1) -> LeafRegistry + Corpus. The legacy standards_map digests are no longer read by the formal build (audit/legacy only). No Stage1/Stage2 prompt, parser, reward or SFT/RL behavior changes. - canonical_corpus.build_from_standard(): one category per training alias, ordered by first source row; Stage-1 registry fields (id set/order/name/ path/code) byte-identical to committed (verified vs HEAD); registry keeps the historical Stage-1 path (finance L1/L2/leaf, shougang []). - LOSSESS per-entry facts on the corpus: standard_entry_ids + standard_entries (real path, own description, raw_level, standard_data_level, raw_fields with provenance) + scoped_annotations — the finance 5×基本信息 bucket keeps all five entries (237 entries -> 233 categories, nothing first-only). - shougang B3-6: excluded from the active universe and REPORTED (excluded_categories + category_excluded issue), never silently added or dropped; infra reuses the shared shougang standard. - pers_info: no standard -> dataset-derived fallback unchanged, no fabricated standard_data_level/annotations. - documented residual: finance 经营管理/运营管理/档案资料管理信息 description keeps the SOURCE cell's stray space (canonical standard is the fact source; the legacy dict silently dropped it) — whitespace-only, Stage1 never uses description, allowed explicitly in parity tests. - script.canonical.cli reads data/standards/*.standard.json; corpus source points at the standard file; previous-active reference = committed registry. - tests: tests/task/test_canonical_corpus_phase2.py (projection lossless, multi-entry round-trip, B3-6 report, infra reuse, pers_info fallback, determinism, real-data parity); full suite 310 passed, 2 skipped (existing).
…LI, lossless EntryView
- projection policy: DatasetConfig.projection_excluded_category_ids
(shougang=("B3-6",); infra inherits via registry_source); build_from_standard
applies it by default and reports excluded categories; the legacy registry
is NO LONGER read at build time (_previous_active_ids removed) — the formal
chain is CanonicalStandard + policy -> registry/corpus, old registry used
only by parity tests.
- CI fresh clone: canonical CLI integration test now builds from a HERMETIC
tmp canonical-standard fixture (--standard-dir) incl. B3-6, asserting the
policy exclusion + report; no dependency on gitignored data/standards.
Real-standard parity tests keep skipping when files are absent.
- StandardEntryView now carries the full Phase-1 StandardCategory facts:
content (数据资源说明), code, source (file/sheet/row) plus raw_fields —
corpus JSON -> load_corpus_categories() round-trips losslessly; shougang
description(四级定义)/content(数据资源说明)/resource(raw_fields) stay
distinct.
- tests: 28 corpus tests + EntryView round-trip + policy-default tests; full
suite 313 passed, 2 skipped (pre-existing).
Collaborator
Author
|
r? 已按 review 修完 3 项(commit
全仓 313 passed / 2 skipped(既有 verl skip)。 |
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.
Phase 2: registry/corpus 从 CanonicalStandard 派生(docs/design/phase2_registry_corpus.md)。legacy standards_map 脱离正式构建链;Stage1 registry 字段与提交版逐字节一致;corpus 无损携带 standard_entries+scoped_annotations;B3-6 排除并报告;pers_info fallback。全仓 310 passed / 2 skipped。