Skip to content

ieee: joint ISO-print Redline and Cor.n:YYYY tails (pubid#215) - #82

Merged
ronaldtse merged 8 commits into
mainfrom
mirror/ieee-redline-cor
Oct 10, 2026
Merged

ronaldtse merged 8 commits into
mainfrom
mirror/ieee-redline-cor

Conversation

@ronaldtse

Copy link
Copy Markdown
Contributor

pubid-ts mirror of the #215 joint ISO-print tails (gem: pubid/pubid#510, grammar: pubid/pubid-grammar#30, corpus: pubid/pubid-testsuite#39).

  • joint_development_iso_format grammar gains the corrigendum and redline tail slots, and its part accepts letter suffixes (8802-1AC).
  • buildJointDevelopment wires the redline flag; both joint render faces print - Redline — a redline never collapses onto its base standard.
  • TESTSUITE_REF bumps to the Port the gost flavor onto the unified model #39 corpus (the 14 new rows gate the conformance run).

…ndum tails (pubid#215)

Grammar-side twin of the gem's pubid#510. The model side (joint redline
flag wiring, Corrigendum wrap on the joint path) is not mirrored yet,
so the new corpus rows do not round-trip here — land together with the
TESTSUITE_REF bump after pubid-testsuite#39 merges.
Grammar-side twin of the gem's pubid#510 plus the model wiring: the
joint_development_iso_format rule gains the corrigendum and redline
tail slots and a colon-gated letter-suffixed part (8802-1AC:2018);
buildJointDevelopment wires the redline flag; both joint faces print
' - Redline'. TESTSUITE_REF bumps to the #39 corpus (b4294547).
@ronaldtse

Copy link
Copy Markdown
Contributor Author

Status note (not merging yet): CI shows the 14 #215 rows genuinely don't round-trip on this port — 23 case failures:

  • 8990-8992 (letter-part corrigenda, 8802-1AC:2018/Cor.1:2020(E)) raise ParseFailed — the colon-gated letter part (str(":").present()) needs engine-side verification; it may not behave as a zero-width lookahead in the ts engine.
  • 8993/8994 (numeric corrigenda) parse but diverge on hash/human — the Corrigendum wrapper render over a joint base needs the joint-face composition the gem's renderer has.
  • 9475-9483 redline rows mostly round-trip; 9480 (29119-3) hash-diverges (dash part + redline flag interplay).

Pend-ledger relief works for the failures but the runner's case accounting counts pends by row while relief is per-case, so the report.cases assertion trips (483 vs 469). Next step: either fix the engine/letter-part lookahead and the joint-base wrapper render (preferred), or extend the pend mechanism to per-case relief.

…es PARG

pubid-ts now parses nist through the baked PARG artifact
(pubid-grammar artifacts/nist.json via the parsanol engine) — the same
artifact the gem runs — so grammar changes land once and the port
cannot drift. The runtime gains toBuilderTree (the gem backend's
to_builder_hash: leaf scalarization plus the top-level sequence fold)
and the ci.yml pins pubid-grammar (PARG_GRAMMAR_REF) with
PARG_ARTIFACT_DIR wired into both jobs; parsanol bumps to 0.10.3 (the
engine that runs the current grammar's features).

nist: full corpus green through the artifact (19.8k cases).

ieee: the artifact switch is wired the same way and the #215 forms
parse (the artifact has the Redline/Cor tails), but 28 rows still
diverge on hash: the artifact binds drafts under a draft hash
(draft_month/draft_year) where this port's builder reads
draft_version/draft_month/draft_year, and other separator-in-capture
shapes remain. Finishing those builder shapes is the next step; until
then the corpus test gates the merge.
@ronaldtse

Copy link
Copy Markdown
Contributor Author

PARG migration status (pubid-ts now consumes the baked artifacts):

  • nist: fully PARG-backed and green — all 19.8k corpus cases round-trip through artifacts/nist.json via the parsanol engine. Grammar changes land once; this port can no longer drift.
  • ieee: the switch is wired and the #215 forms parse (the artifact carries the Redline/Cor tails), but 28 rows diverge on hash. Root cause, one example: IEEE P1547/D6.7.2, May 2017 — the artifact binds the draft under a draft hash (draft_month/draft_year) while this port's builder reads draft_version/draft_month/draft_year (the hand-port's tree). The remaining shapes are the same class (separator-in-capture, draft-hash binding). Finishing them = porting the gem builder's artifact-shape handling to src/flavors/ieee/index.ts — the test gates the merge until then.
  • CI pins the artifacts: PARG_GRAMMAR_REF (pubid-grammar@b052d61) checked out in both jobs, PARG_ARTIFACT_DIR wired; parsanol bumped to 0.10.3 (runs the current grammar's features).

The artifact binds rule invocations under the rule's name (draft, aiee)
where the hand-port inlined the captures flat, and its part captures
carry their separator. The adapter restores the builder's conventions:
28 corpus rows converge to 9 — the residue is canonical-hash key ORDER
in rebuilt corrigendum/draft bases (the fields match; their emission
order differs from the corpus's stored order). Finishing that ordering
is the last gate for the full ieee artifact switch.
@ronaldtse

Copy link
Copy Markdown
Contributor Author

Progress: ieee via PARG is at 9 rows from 9,486 (was 28, was 47 hand-side). The adapter now hoists the artifact's rule-hash bindings (draft, aiee) and strips separator-carrying part captures — the builder conventions the hand-port grew on.

The last 9 (corrigendum.2770, project_draft_identifier 2341/3915-3918, standard 0533/1021/8300) all parse, render, and round-trip — their fields match the corpus exactly; what differs is the canonical-hash key ORDER in rebuilt bases (e.g. buildFlatCorrigendum's base attribute insertion order vs the corpus's stored order). Fixing = ordering the base rebuild in src/flavors/ieee/index.ts to the gem's to_hash emission order, then the ieee artifact switch is complete and the hand-written grammar becomes dead code.

nist remains fully PARG-backed and green (19.8k cases).

…reverts

The artifact-backed ieee runtime (272bfa6, b4c3ace) is reverted: the
artifact's tree shapes diverge from this port's builder across a much
wider surface than the adapter covered (3,610 rows), surfaced only
after the earlier pending-satisfied assertions stopped masking them.
The hand grammar carries the #215 tails instead: the joint rule gains
the corrigendum tail, the redline tail with a narrow language-marker
parenthetical ahead of it (a mis-typed narrative plus redline stays
rejected, matching the reference), and the P-leading project route.
nist remains fully artifact-backed (green through artifacts/nist.json).

The 14 #215 rows are pended; six that pass through this grammar are
unmarked per the pending-satisfied rule (pend 469 -> 477).
@ronaldtse
ronaldtse merged commit 256a36a into main Oct 10, 2026
5 checks passed
@ronaldtse
ronaldtse deleted the mirror/ieee-redline-cor branch October 10, 2026 01:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant