Feature/homebrew data preservation#29
Merged
Merged
Conversation
WSL2 can't reliably reach a loopback-bound dev server from the Windows browser, so bind 0.0.0.0. Keep the default loopback for everyone else and make it opt-in via `lein with-profile +wsl fig:dev`, which sets :orcpub-http-host through environ. Document the ORCPUB_HTTP_HOST env var (Docker/script launches) alongside it in .env.example.
Save and load previously named their specs independently, so the two sides could drift: if the load floor ever grew stricter than a save spec, content that saved fine would be quarantined on the next boot. content_specs.cljc makes the mapping explicit — save-spec-for gives the strict per-type save spec, valid-for-load? the loose load floor (an :option-pack string plus a letter-leading key) that never falsely quarantines real content — with a generative test proving save specs are a subset of the load floor.
Make plugin loading fault-tolerant instead of all-or-nothing. salvage-plugins keeps every source that satisfies the load floor and routes the rest to a name-keyed, self-clearing plugins:rejected quarantine, surfaced in My Content for rename/rekey repair, rather than silently dropping them. Unreadable localStorage slots are moved to a :corrupt slot for recovery instead of being deleted, and a quota-exceeded write now surfaces a warning with a backup offer instead of losing data on the next refresh.
Toggling a flag could collapse a whole list to a bare true/false/nil and persist that, quietly wiping the list. Route toggles through common/toggle-in, which guards the write and self-heals a legacy collapse instead of crashing, and strip-export-blanks drops meaningless false/nil/empty entries on export so they stop accumulating in saved and exported content.
Derive each builder's save spec from the registry instead of a per-call argument, so save and load can't drift. Add a Save-anyway path that force-fills the fields blocking a save (option source, name, key) with placeholders and lands imperfect work in My Content instead of trapping it in the builder, with specific located field-error messages. Fix the post-save export link, which passed the plugin map wrapped in str — a string that failed validate-before-export's map? check with a munged predicate error.
A source whose item name derives an invalid key (e.g. "9 Lives" -> :9-lives) used to import successfully and then silently never appear in the builder — no error, no explanation. Route only those sources to the same quarantine the loader uses, so the existing rename/rekey repair UI surfaces them, while other imperfections still auto-clean and land (the export-draft escape hatch keeps working). Also report import de-duplication readably and flag non-ASCII names that break key derivation.
Split the pure serialize step from the saveAs side effect and wire a raw-export fallback into every homebrew builder, so when normal export fails validation the user can still download a raw backup of their content instead of losing it. Includes an export-draft path for unsaved work in progress.
JVM and cljs coverage for the resilient loader (salvage/quarantine, no false quarantine on real content), the spec-registry save-subset-of-load drift guard, keyword-trap rekey, quota-failure reporting, toggle self-healing, and import/export validation. Tests mirror source namespaces: the loader/audit guards fold into e5-test, the toggle re-frame integration into events-test, and the event-handler toggle nil-hygiene into event-handlers-test. Fixtures are original QA content; test-pak is a large multi-source pak with all human-readable text replaced by public-domain filler (no copyrighted content).
opt5e/evasion returns a plain trait map, which is dead weight in a :modifiers vector (apply-modifiers yields nil for it). The Hunter's level-15 Evasion option carried a bare (opt5e/evasion 15 93) alongside the real mod5e/trait-cfg that actually renders the trait, plus a comment explaining the no-op. Drop the no-op and the comment; the trait-cfg is unchanged so the displayed trait and page are identical. Other call sites are correct (Monk/Rogue use it in :traits; ua_revised_ranger wraps it in mod5e/trait-cfg).
The agentic knowledge base had leaked onto the human-facing docs tree: docs/kb/ lived on develop and docs/README.md advertised an 'Agent Knowledge Base' nav section. The KB belongs on the agents/develop silo (which now also carries the speculation-flagging contribution rules that were unique to develop's stray kb README). Remove docs/kb/ here, drop the KB nav section and an agent-facing PHB reconciliation gotcha from docs/README.md, and genericize the licensed source name in CONFLICT_RESOLUTION.md's example (Player's Handbook -> Core Rulebook).
Single dated entry for staging/june-bug-patches-01, grouped Fixed/Added/Changed: spell-selection/source-label fix, Hunter's Evasion + never-black-screen rendering fixes, orcbrew import/export validation, and homebrew data-preservation (resilient loading, quarantine/repair, builder escape hatches).
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.
Description:
Related issue (if applicable): fixes #
Checklist: