Skip to content

Feature/homebrew data preservation#29

Merged
codeGlaze merged 11 commits into
developfrom
feature/homebrew-data-preservation
Jul 7, 2026
Merged

Feature/homebrew data preservation#29
codeGlaze merged 11 commits into
developfrom
feature/homebrew-data-preservation

Conversation

@codeGlaze

Copy link
Copy Markdown
Owner

Description:

Related issue (if applicable): fixes #

Checklist:

  • The code change is tested and works locally.
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation if necessary
  • There is no commented out code in this PR.
  • My changes generate no new warnings (check the console)

codeGlaze added 11 commits July 2, 2026 02:53
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).
@codeGlaze codeGlaze merged commit e632297 into develop Jul 7, 2026
1 check passed
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