pubid 2.0.34 → 2.0.35

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 25950246723409f8462f360040d4f4d10778b2c0891cd73584e3fd114a6eba52
4
- data.tar.gz: 6978f1e00c74ac6c3acdeb743dded123f9df8aca3464056e88be14c68d45ed5c
3
+ metadata.gz: 10f4f47a46595c3e5ba212176f9e40f784885b02651b4f7fddf929cd670998d9
4
+ data.tar.gz: d0a6c7e6da3c3d8b5588430fa89196fcacef5c258a46f494e6132facc092972e
5
5
  SHA512:
6
- metadata.gz: 1193aa950c2deaca9748f0c1bbfa2e6cd2533d07537ce33dac075593054da549dfad7463ae6b26541abc95cfbc3fee3d6d8e1c90e39ad39dd474ec1d26e2cb2f
7
- data.tar.gz: f94436ddc84215ab53864298422303d1a74b2e468014362cb56254d00232779f90edd5ed73982e19611b6eb921073c1514ebd32a4ac856033f77cd04cba08a6d
6
+ metadata.gz: 2970f1e3bf25171ad9cd39a04f0854e33af6c40a2ded9b5116196622e414ac51e6872ee1877ad0c7ccf18e668fca03bc3dbcf8e84ef7aae672966131cb7f7067
7
+ data.tar.gz: 33d1c50ce30986ccf16b16d392f86395f7e38571e4584893506cc03e42a2864aafc16e3f0097e542de4ba79e6fdb82d44d34986a6b09906b22dea6fbda15969f
@@ -148,3 +148,15 @@ stage RFDIS/50.00 — a snapshot of the project's plan, not a code rename.
148
148
  harmonized system is joint ISO/IEC and #237's own list maps RR to
149
149
  9092 — IEC's table simply does not name IEC stage codes for the
150
150
  review sub-states. Locked by `spec/pubid/iec/stage_reconciliation_spec.rb`.
151
+ - **Registry alignment (pubid#733, applied):** the TR/TS/PAS point rows
152
+ this table gives codes of their own — `CDPAS` 50.20, `CDTR`/`CDTS`
153
+ 50.20, `ADTR`/`ADTS` 40.99, `NDTR`/`NDTS`/`DTRM`/`DTSM` 50.92 — are
154
+ typed-stage rows (`TYPED_STAGES`), not PROJECT_STAGES entries, so the
155
+ official `urn:iec:std:` stage slot carries the table's code per
156
+ spelling instead of folding every point spelling onto the 50.00
157
+ ladder. `DTRM`/`NDTR` and `DTSM`/`NDTS` share 50.92 in the table, so
158
+ each pair shares one official-URN slot; the pair stays distinct in the
159
+ pubid-scheme URN and the reverse lookup resolves the first row. The
160
+ translation/preparation families (`TDTR`/`TDTS`/`PRVDTR`/`PRVDTS`/
161
+ `PRVDPAS`, …) stay PROJECT_STAGES — queryable, deliberately
162
+ unparseable. Locked by `spec/pubid/iec/stage_point_codes_spec.rb`.
@@ -51,6 +51,8 @@ These notes were part of the root `CLAUDE.md`. Read them before you change `lib/
51
51
 
52
52
  - **The fragment-ladder spellings are rejected at parse (issue #731).** `CDFRAG`, `DFRAG`, `FDFRAG`, `PRF Frag`, `PWI Frag` (and the `NP`/`ANW`/`WD` " Frag" siblings from the same `FragmentIdentifier::TYPED_STAGES` ladder) parsed into broken shapes, and **one condition on the BUILT object covers every route** (`reject_unrenderable_fragment`, the #727 shape-not-grammar-route ruling, called from `Identifier.parse` after the dotted check): a fragment whose `base` is nil — the ladder token, and even the published `FRAG` token, in the primary type position builds a `FragmentIdentifier` with no base (the builder captures the designation into a local `fragment_number` but never reaches `wrap_with_fragment`, since the `:base` grammar key is absent, and `assign_attributes` cannot store number/date/edition on the fragment — they delegate to the missing base), which renders bare `/FRAG` (itself unparseable — the render is not a fixed point), carries a nil official URN, keys the empty index string, and silently drops the input's designation/date/edition; or a fragment whose `typed_stage.stage_code` is not `published` — the ladder token in a SUPPLEMENT layer (`IEC 60038/CDFRAG 1`) builds a base-carrying fragment whose stage has no printed face (`render_fragment` prints `/FRAG<n>` unconditionally), so the stage was dropped at render and `parse(to_s) != parse`. **Attestation searched before rejecting** (the issue's stop condition): gem fixtures (`spec/fixtures/iec/identifiers/full/` — only `…/AMDn/FRAGn EDn`, `…/FRAGn EDn` and the tracked-debt `…/COR1/FRAGC1 ED1`, which does not parse at main), the testsuite ledger (`tests/iec/fragment_identifier.yaml` — 16 rows, all base-carrying; the "ANW Frag"/"PRF Frag"/"PWI Frag" strings in `_debt.yaml` are parslet expected-token lists inside error-message notes, not identifiers), the stage-codes SSOT (`data/iec/stage-codes.md` — only "MERGED | Fragment merged" and "SPLIT | Project Fragmented", no ladder rows) and the IEC/ISO Harmonized APIs PDFs in `reference-docs/iec/` (an empty `<FRAG/>` presence element plus `<stdFragment>1</stdFragment>` for the number, and the bilingual-fragment workflow — no ladder token). So parse-reject is the direction; the TS side already rejects these spellings (pubid-ts#193 pinned them as a recorded gem divergence), so the two engines now AGREE with no TS change. **One message covers both facets** (`FRAGMENT_LADDER_MESSAGE`); the walk descends through `base` AND the `identifiers` members (AllParts/Consolidated), so `IEC DFRAG 60038 (all parts)` rejects too while `IEC 60038/FRAG1 CSV` (a Vap over a sound fragment) passes. **`from_hash` stays open** (stored-data compatibility): a stored `{"_type" => "pubid:iec:fragment-identifier", "stage" => "dfrag"}` still deserializes to the degenerate fragment it always built — pinned with what the residue hashes contain. **The registry is untouched**: `Pubid::Iec.locate_stage` still answers every ladder abbreviation (metanorma-iec stage lookups and the URN stage slot resolve through the rows), and the #727-era TYPED_STAGES registration specs keep passing. **Neighbours pinned byte-identical**: the eight attested `/FRAG<n>` faces (IS/amendment/corrigendum bases, copublishers, dated, multi-digit), the Vap-over-fragment and all-parts forms. No corpus round follows (nothing attested). (hand-off: iec-frag-ladder-reject.)
53
53
 
54
+ - **The TR/TS/PAS point stages carry the correspondence table's own codes (issue #733).** The registry contradicted the SSOT it cites: the `:cdpas` row was a **fabricated** committee-draft state (stage_code `:cd`, harmonized leading 30.xx) with no row in the table, while the `:dpas` row's abbr list still folded `"CDPAS"` beside a comment admitting CDPAS is the 50.20 row; and the TR/TS ladders folded the point spellings onto the 50.00 ladder rows (`:dtr` `abbr: %w[DTR ADTR CDTR DTRM NDTR DTSM DTRM]` — DTRM listed **twice**), so every spelling emitted `tr-stage-50.00`/`ts-stage-50.00` and `IEC DTSM 60038` (a DTS stage!) decoded as a TechnicalReport because only the TR row claimed the token. The ruling: the IEC/ISO Harmonized APIs stage-code table (section 3 "IEC/ISO Stage Code correspondance", identical in v0.0.7 2021-05 and v0.0.8 2023-06; the extract is `data/iec/stage-codes.md`) is correct, the gem was wrong. The fix wires the per-spelling data that was already sitting in each file's `PROJECT_STAGES` hash into `TypedStage.new` rows: **CDPAS** 50.20 ("Draft circulated as DPAS", stage_code `:draft` — the fabricated 30.xx row deleted, the duplicate fold removed), **ADTR** 40.99 / **CDTR** 50.20 / **NDTR** 50.92 / **DTRM** 50.92 (TR), **ADTS** 40.99 / **CDTS** 50.20 / **NDTS** 50.92 / **DTSM** 50.92 (TS); plain **DTR/DTS** keep the folded 50.00 ladder (the registration step) and **DPAS** is untouched. Row order follows the correspondence table, which makes the official-URN reverse lookup (`urn_parser.rb#type_slot_to_code`, first row matching `(type_code, harmonized_stages.first)`) resolve the shared 50.92 slot to **DTRM/DTSM** — NDTR and DTRM (NDTS and DTSM) share the slot because the TABLE gives both spellings the same code; the official URN is the harmonized code and is honestly lossy there, while the pubid-scheme URN (`stage-ndtr` vs `stage-dtrm`) keeps the pair distinct. `pnw_stage_spec.rb`'s uniqueness tripwire gained an `ALLOWED_COLLISIONS` allow-list for exactly those two pairs — any other (type, leading-code) collision still fails. **Render keeps the parsed spelling per row** (`abbr.first` of its own row), the #191/#193 pattern — the old fold-to-DTR/DTS render was a consequence of the fold, not a separate normalization. **The grammar needed NO extension and NO rebake**: all nine tokens were already in `tables/iec_typed_stages.yaml` (the table only lists acceptable tokens; the token→row decode is the builder's `locate_stage`), so `data/parg/iec.json` is byte-identical. `from_hash` residue: stored hashes carry the stage CODE (`"stage" => "dtr"`), so pre-#733 stored rows deserialize to the ladder row they always named — no index migration. **Measured by the replay gate**: over all 12,488 full-fixture inputs, `to_s`/`to_urn`/`to_pubid_urn`/`to_mr_string`/`to_hash`/class/`root.number` are byte-identical to the 2.0.34 baseline — 0 diffs (zero attested rows carry any of the spellings; verified in the gem fixtures and the testsuite ledger `tests/iec/*.yaml`). Locked by `spec/pubid/iec/stage_point_codes_spec.rb` (every probe row: class, render, official-URN slot, pubid URN + round trip; the shared-slot pins; plain DTR/DTS/DPAS byte-identical; the abbr-list unfolds; the #570 harmonized-code lookups unchanged). (hand-off: iec-stage-point-codes.)
55
+
54
56
  ## pubid-scheme URN (issue #670; gaps closed by #687)
55
57
 
56
58
  `lib/pubid/iec/pubid_urn_schema.rb` completes the partial schema the IEEE
@@ -43,19 +43,23 @@ module Pubid
43
43
  ),
44
44
  Pubid::Components::TypedStage.new(
45
45
  code: :cdpas,
46
- stage_code: :cd,
46
+ stage_code: :draft,
47
47
  type_code: :pas,
48
+ # CDPAS is PAS's 50.20 row of IEC's stage-code correspondence
49
+ # table ("Draft circulated as DPAS") — IEC/ISO Harmonized APIs,
50
+ # section 3 "IEC/ISO Stage Code correspondance", identical in
51
+ # v0.0.7 (2021-05) and v0.0.8 (2023-06); extracted at
52
+ # data/iec/stage-codes.md (pubid#733). It is not a
53
+ # committee-draft state and claims no 30.xx code.
48
54
  abbr: ["CDPAS"],
49
- name: "Committee Draft Publicly Available Specification",
50
- harmonized_stages: %w[30.00 30.20 30.60 30.92 30.98 30.99],
55
+ name: "Draft circulated as DPAS",
56
+ harmonized_stages: %w[50.20],
51
57
  ),
52
58
  Pubid::Components::TypedStage.new(
53
59
  code: :dpas,
54
60
  stage_code: :draft,
55
61
  type_code: :pas,
56
- # CDPAS is the 50.20 row of IEC's stage-code table
57
- # ("Draft circulated as DPAS") — see data/iec/stage-codes.md
58
- abbr: ["DPAS", "CDPAS"],
62
+ abbr: ["DPAS"],
59
63
  name: "Draft Publicly Available Specification",
60
64
  harmonized_stages: %w[50.00 50.20 50.60 50.92 50.98 50.99],
61
65
  ),
@@ -53,10 +53,57 @@ module Pubid
53
53
  code: :dtr,
54
54
  stage_code: :draft,
55
55
  type_code: :tr,
56
- abbr: %w[DTR ADTR CDTR DTRM NDTR DTSM DTRM],
56
+ # Plain DTR keeps the folded 50.00 ladder (the registration
57
+ # step). The point spellings below are rows of their own, each
58
+ # with the exact code IEC's stage-code correspondence table
59
+ # gives it (pubid#733).
60
+ abbr: %w[DTR],
57
61
  name: "Draft Technical Report",
58
62
  harmonized_stages: %w[50.00 50.20 50.60 50.92 50.98 50.99],
59
63
  ),
64
+ # The TR ladder's point spellings, with the codes from IEC's
65
+ # stage-code correspondence table (IEC/ISO Harmonized APIs,
66
+ # section 3 "IEC/ISO Stage Code correspondance", identical in
67
+ # v0.0.7 2021-05 and v0.0.8 2023-06; extracted at
68
+ # data/iec/stage-codes.md). The per-spelling data was already in
69
+ # PROJECT_STAGES below; wiring it into rows makes the official
70
+ # URN's stage slot (harmonized_stages.first) carry the table's
71
+ # code instead of folding every spelling onto 50.00 (pubid#733).
72
+ # Row order follows the correspondence table; NDTR and DTRM
73
+ # share 50.92 there, so their official-URN slot is the same and
74
+ # the reverse lookup resolves the first row (DTRM).
75
+ Pubid::Components::TypedStage.new(
76
+ code: :adtr,
77
+ stage_code: :draft,
78
+ type_code: :tr,
79
+ abbr: %w[ADTR],
80
+ name: "Approved for DTR",
81
+ harmonized_stages: %w[40.99],
82
+ ),
83
+ Pubid::Components::TypedStage.new(
84
+ code: :cdtr,
85
+ stage_code: :draft,
86
+ type_code: :tr,
87
+ abbr: %w[CDTR],
88
+ name: "Draft circulated as DTR",
89
+ harmonized_stages: %w[50.20],
90
+ ),
91
+ Pubid::Components::TypedStage.new(
92
+ code: :dtrm,
93
+ stage_code: :draft,
94
+ type_code: :tr,
95
+ abbr: %w[DTRM],
96
+ name: "Rejected DTR to be discussed at meeting",
97
+ harmonized_stages: %w[50.92],
98
+ ),
99
+ Pubid::Components::TypedStage.new(
100
+ code: :ndtr,
101
+ stage_code: :draft,
102
+ type_code: :tr,
103
+ abbr: %w[NDTR],
104
+ name: "DTR rejected",
105
+ harmonized_stages: %w[50.92],
106
+ ),
60
107
  Pubid::Components::TypedStage.new(
61
108
  code: :tr,
62
109
  stage_code: :published,
@@ -53,10 +53,57 @@ module Pubid
53
53
  code: :dts,
54
54
  stage_code: :draft,
55
55
  type_code: :ts,
56
- abbr: %w[DTS ADTS CDTS NDTS],
56
+ # Plain DTS keeps the folded 50.00 ladder (the registration
57
+ # step). The point spellings below are rows of their own, each
58
+ # with the exact code IEC's stage-code correspondence table
59
+ # gives it (pubid#733).
60
+ abbr: %w[DTS],
57
61
  name: "Draft Technical Specification",
58
62
  harmonized_stages: %w[50.00 50.20 50.60 50.92 50.98 50.99],
59
63
  ),
64
+ # The TS ladder's point spellings, with the codes from IEC's
65
+ # stage-code correspondence table (IEC/ISO Harmonized APIs,
66
+ # section 3 "IEC/ISO Stage Code correspondance", identical in
67
+ # v0.0.7 2021-05 and v0.0.8 2023-06; extracted at
68
+ # data/iec/stage-codes.md). The per-spelling data was already in
69
+ # PROJECT_STAGES below; wiring it into rows makes the official
70
+ # URN's stage slot (harmonized_stages.first) carry the table's
71
+ # code instead of folding every spelling onto 50.00 (pubid#733).
72
+ # Row order follows the correspondence table; NDTS and DTSM
73
+ # share 50.92 there, so their official-URN slot is the same and
74
+ # the reverse lookup resolves the first row (DTSM).
75
+ Pubid::Components::TypedStage.new(
76
+ code: :adts,
77
+ stage_code: :draft,
78
+ type_code: :ts,
79
+ abbr: %w[ADTS],
80
+ name: "Approved for DTS",
81
+ harmonized_stages: %w[40.99],
82
+ ),
83
+ Pubid::Components::TypedStage.new(
84
+ code: :cdts,
85
+ stage_code: :draft,
86
+ type_code: :ts,
87
+ abbr: %w[CDTS],
88
+ name: "Draft circulated as DTS",
89
+ harmonized_stages: %w[50.20],
90
+ ),
91
+ Pubid::Components::TypedStage.new(
92
+ code: :dtsm,
93
+ stage_code: :draft,
94
+ type_code: :ts,
95
+ abbr: %w[DTSM],
96
+ name: "Rejected DTS to be discussed at meeting",
97
+ harmonized_stages: %w[50.92],
98
+ ),
99
+ Pubid::Components::TypedStage.new(
100
+ code: :ndts,
101
+ stage_code: :draft,
102
+ type_code: :ts,
103
+ abbr: %w[NDTS],
104
+ name: "DTS rejected",
105
+ harmonized_stages: %w[50.92],
106
+ ),
60
107
  Pubid::Components::TypedStage.new(
61
108
  code: :ts,
62
109
  stage_code: :published,
data/lib/pubid/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Pubid
4
- VERSION = "2.0.34"
4
+ VERSION = "2.0.35"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pubid
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.34
4
+ version: 2.0.35
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.