fix(spheres): restore archetype sections, Polished Dark talents/drawbacks, audit & class cleanup #61
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/sphere-archetypes-and-polished-dark"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Addresses the review of the class parser and Polished Dark sphere. Key change of direction after evaluation: the JSON declarative engine is sound — the archetype collapse was a DOM-contract break, and the polished-dark loss was a spec-regeneration error. Fixes restore the signals instead of adding per-sphere parse code.
1. Archetype sections restored across all 68 spheres
clean_html_nodewas unwrapping every relative wikidot link before the sphere engine ran, silently destroying the<a>on archetype heading entries thatbuild_archetypesgates on (linked headings = real archetypes; unlinked = junk section labels/statblocks). Every sphere page emitted 0 archetypes since3d2542c. Heading anchors are now preserved (body anchors still unwrapped — content-bloat win intact). Plus: class inference from the wiki page<title>("Darkthrone (Sentinel Archetype)") restored for entries without a heading qualifier — previously class fell back to the sphere slug, missing the spec lookup and degrading cards to summary-only.Result: magic 156 / combat 29 / skill 44 archetypes, junk (statblocks, "Other", "Special Abilities") excluded.
2. Polished Dark fork structure
Talent sections are h3 talents carrying h4 sub-options. Spec now declares
talentHeading: h3+ newoptionHeading: h4;build_talentsgains a generic nested branch embedding each option verbatim under its talent card and feeding option titles into tag extraction. Restores 26 dropped talent cards (7/12/7 vs the erroneous 18/36/30 h4-option cards).3. Polished Dark drawbacks — page-native only
Dropped the
slug == "polished-dark"alias that injected the Original Dark canon (11 entries incl. duplicated Black Spot / Shadowed Brew). Injection now only happens when the page has no native drawbacks section (verified: canonical keys never overlap native sections).4. Audit gate
Removed the two retired fork-parser commands (
parse_polished_dark.py,parse_bear_sphere.py) fromPARSER_CMDS;--regen-checknow passes.5. ClassView cleanup
Removed the dead client-side Class Equipment normalization (parser emits
descriptiondirectly since0a266f8).Corpus regenerated;
audit.pyandaudit.py --regen-checkboth pass with 0 errors; production build passes.Suggested test steps:
Sphere archetype entries often lack a (Class) qualifier on the sphere page ('Darkthrone'); class then fell back to parent_entity (the sphere), so 'Polished Dark' was used for the classSlug, spec lookups missed (specs/archetypes/sentinel/darkthrone.json), and cards degraded to summary-only. Restore the legacy inference: read the archetype page <title> ('Darkthrone (Sentinel Archetype)') before deriving class_slug. Generic fix — affects every sphere-page archetype entry.