Repository navigation
Shared picks namespace (walker moved, remove-at/put-at); lint clean - #47
Merged
Merged
Conversation
…t-at orcpub.dnd.e5.picks (cljc) is one engine over a character's stored picks, for the character-rescue work (which must list and remove picks on the server, without the app) and the hidden-pick work (which sets picks aside and puts them back). walk-entries, walk-picks, picks-of and relink-picks move from the browser-only content_reconciliation.cljs, bodies token-identical, as walk (now public), walk-typed, keys-of and relink. Callers updated; no aliases. Their test moves to test/cljc, so it also runs in the JVM suite CI gates on. New: remove-at and put-at, addressing a pick by [selection key, entry key] pairs (the app's option-path format), never by index, so removing one pick does not move another. A multi-pick keeps its vector and its metadata; put-at returns nil when the path to the pick is gone and checks no rule. Tests fail when remove-at drops by position or put-at loses the metadata. entity/flatten-options (the build) and extract-content-keys (Missing Content) are not touched.
The removed-pick record's flag is now :multiselect?, the template's own word (::t/multiselect?) for a selection that stores a vector. The namespace and remove-at/put-at docstrings state the shapes: a multiselect keeps its vector, emptied by its last pick as unticking does; a single pick's selection is dissoc'd; the flag tells put-at which, since neither shows it afterwards.
Behaviour-preserving only:
- locals that shadowed core or library vars renamed for what they hold:
old/new pairs -> before/after (library, library_links, e5 re-key),
after -> plugins-after (homebrew and pack deletion), var -> env-var,
get -> lookup, integer? -> integer-setting? (config report),
import -> imported-pack, choice-tags -> tags-by-selection, and test
locals; map keys unchanged ({env-var :var ...});
- unused refers and imports removed; the seven in equipment_subs were
used only by the commented-out ORPHANED remote-item block and come
back with it;
- three nested lets merged, two redundant str calls and a duplicate
require dropped, export_paths_test refers clojure.test explicitly.
lein lint: 0 errors, 0 warnings.
Owner
Author
|
@greptileai review |
codeGlaze
added a commit
that referenced
this pull request
Oct 4, 2026
|
… the runner put-at for a multiselect now leaves the vector as it is when it already holds the pick's key (the player picked it again while it was set aside), instead of appending a duplicate that a later remove-at would take out together. The new test fails without the check. picks-test is added to orcpub.test-runner's list, so the per-test reporter mode runs it too; the full browser suite already did (546 tests, now 2828 assertions with the new one).
Owner
Author
|
Both review findings are addressed in
Checks on |
Owner
Author
|
@greptileai review |
CHANGELOG.md conflicted: both sides added a Summer Patch block in the same place; both kept, integration's first.
Defined with the tests in 402ea5e and never used: the file explains the locale defect cannot be reproduced in one JVM, and the guard is running the suite under a non-English JVM. It was the one lint warning the locale-safety merge brought in; lint is back to 0 warnings.
Owner
Author
|
@greptileai review |
…othing is written put-at now behaves the same for both shapes: it writes the pick back only into an empty place. A multiselect vector already holding the key, or a one-pick selection already holding any pick, is left alone and put-at returns nil, as it does when the path is gone. A pick the player made while the old one was set aside is never overwritten or duplicated; nil tells the caller the held copy is retired. Tests: the re-picked key and a one-pick selection chosen again both return nil; each fails when its guard is removed.
Owner
Author
|
@greptileai review |
codeGlaze
added a commit
that referenced
this pull request
Oct 4, 2026
codeGlaze
added a commit
that referenced
this pull request
Oct 5, 2026
codeGlaze
added a commit
that referenced
this pull request
Oct 7, 2026
continuous-integration.yml ran only for develop and main, so no PR into integration (#47 to #56) was linted or had the app build checked; only locale.yml's JVM suite ran there. Integration is added to its push and pull_request branches. The dependency-graph job keeps to develop and main, as before. Checked on integration's code: lint 0 errors 0 warnings, fig:build clean.
6 tasks done
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:
Two pieces, in separate commits so they review apart.
1. A shared
picksnamespace (439593dd,b33c765a,909655cf,453aff1d)One engine over a character's stored picks, for two pieces of planned work:
The KB spec is
character-rescue.md, "Layer 1 spec", onfeature/grant-rows.walk-entries,walk-picks,picks-ofandrelink-picksleave the browser-onlycontent_reconciliation.cljsforsrc/cljc/orcpub/dnd/e5/picks.cljc, aswalk(now public),walk-typed,keys-ofandrelink.test/cljc, so it also runs in the JVM suite that CI gates on. It's also listed in the browser test runner.remove-atandput-at.[selection key, entry key]pairs (the app's option-path format), never by index, so removing one pick can't move another.:removedrecords:multiselect?(the template's own word) because an emptied or absent selection no longer shows its shape. An emptied multiselect keeps[], the same state unticking leaves, and saving strips it (entity/remove-empty-fields).put-atwrites a pick back only into an empty place. If a multiselect already holds the key, or a one-pick selection already holds any pick, it writes nothing and returns nil, as it does when the path is gone. A pick the player made while the old one was set aside is never overwritten or duplicated; nil tells the caller the held copy is retired. It checks no rule.remove-atdrops by position, ifput-atloses a vector's metadata, if it duplicates a re-picked key, or if it overwrites a one-pick selection (each checked by removing the guard).entity/flatten-options(the build) andextract-content-keys(Missing Content).2. Lint is clean (
ad3c612b,29e9e2b6)The 50 warnings and 3 infos on
integrationare fixed, not suppressed. No behaviour change.old/newpairs becomebefore/after.afterbecomesplugins-after;varbecomesenv-var;getbecomeslookup;integer?becomesinteger-setting?;importbecomesimported-pack;choice-tagsbecomestags-by-selection; plus test locals.{env-var :var …}).equipment_subswere used only by the commented-out ORPHANED remote-item block; they come back with it.strcalls and a duplicate require dropped.hostile-localesinpedestal_test. It's removed too.integration(locale safety, #46) is merged in (8877678f). The only conflict was CHANGELOG.md; both blocks are kept.A follow-up is recorded in the shared TODO on
agents/develop: declare which config settings expect a whole number, rather than inferring it from thecapacitygroup.Checklist:
lein lint0 errors, 0 warnings;lein test571 tests / 0 failures; cljs suite 546 tests / 0 failures (run by hand);lein fig:buildclean.docs/branch-changelog.mdis updated in the house style (docs/branch-changelog.template.md), and I decided whether this branch earns a## Highlights. No Highlights (refactor and cleanup); folded into Summer Patch (3cbe12df).