Story 1.7: the Observation, part two, the remaining sections and the readable form - #61
Merged
watchthelight merged 3 commits intoSep 6, 2026
Conversation
…readable form The Observation is now the nine sections of ADR-0005: the hero, the inventory, the journal, the log, the valid Actions and the open Prompt join the header, the map and the actors, and the schema version is 2. Each new section cites the view it mirrors: the hero as the status pane, the hero window, the talents pane, the bag window and the quickslots draw it; the inventory in the belongings' own order, since an item reference is a position in it; the journal's notes and the appearances identified this Run; the log's messages with their tones, capped at sixty-four; the Prompt's kind, title, text and button labels. The Action records of ADR-0014 exist from here, one per kind with item use split by the shape of its target, and the actions section sorts them by kind and bytes; the Observation refuses an Action naming what it does not carry, a cell off the map, an item reference the inventory does not list, an answer past the prompt's options. The valid set is computed from the rest, so an Observer builds the record with no Actions and fills them with withActions. The readable form is canonical JSON from a JsonWriter the Run log shares: sorted keys, no whitespace, integers only, the required escapes, with the hash and the section hashes as fields and no reader anywhere in api. The Belief is an opaque versioned value the harness hashes without reading; it is not a field of the Observation. CodecEqualityTest holds equality to the hash, the bytes and the JSON over a corpus of every accepted single-component variation of two Observations, one with the chasm Prompt open.
…he log claim corrected, the reader test pins the module The fairness review passed on parity and found seven things to fix, all taken. UseItemOption is gone: the window of options an item opens lists labels that are not known at the Input wait the item is used from, and since story 1.5 a recognised window in front is an Input wait of its own, so that window is a Prompt answered at the next wait; ADR-0014's amendment says so. The actions section refuses MoveTo, which is a human's click and never valid. The hero's buffs are ordered by name, then timed, then turns, as an actor's are, so one screen has one hash. A lone surrogate is escaped in the JSON, so the text is the same UTF-8 everywhere. The log's Javadoc, ADR-0005 and the rule row said every message had been shown; the pane takes a frame's messages in one batch and trims before drawing, so a burst can lose its oldest lines unseen. The Observation keeps the raw signal, which non-negotiable 1 names as a source and which is reproducible where frame timing is not, and the trade-off is recorded. The reader test now pins the set of classes in api, scans constructors as well as methods, and treats an array, a collection, an Object or a stream as text; five cites are corrected, the wand's status, both status panes' exp text, the energy number, the talents pane's tier gates, and the item packages without a family of their own.
… to review The story file records the twenty-one-mutation battery on the committed tree, the fairness review's seven findings and how each was taken, the corpus of the equality test, and the limitations handed to stories 1.9, 1.10 and 1.12: the talents pane's tier gates, the log listener that must capture exactly what the pane receives, a Prompt kind for an item's option window, and the valid set that does not exist until 1.12.
watchthelight
deleted the
story/1-7-the-observation-part-two-the-remaining-sections-and-the-read
branch
September 6, 2026 01:57
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.
Closes #20
Summary
The Observation is now the nine sections of ADR-0005: the hero, the inventory, the journal, the log, the valid Actions and the open Prompt join the header, the map and the actors, under schema version 2.
The
Actionrecords of ADR-0014 exist from here (item use split by the shape of its target,MoveTofor a human's click, which the valid set refuses), the actions section sorts them canonically, and the Observation refuses an Action naming what it does not carry: a cell off the map, an item reference the inventory does not list, an answer past the prompt's options.The readable form is canonical JSON from a
JsonWriterthe Run log shares, with the hash and the section hashes as fields and no reader anywhere inapi; the Belief is an opaque versioned value the harness hashes without reading, and no record of the schema has it as a component.The one thing to look at:
Observation's constructor is where the sections are held to each other (hero in view and alone, header and prompt agreeing, every Action parameter carried), andHeroSectionandItemVieware where the new free-form strings enter.What changed
shatterfish/api/src/main/java/org/shatterfish/api/:HeroSection(TalentView,QuickslotView),InventorySection(ItemView,ItemRef),JournalSection(NoteView,KnownAppearance),LogSection(LogLine),ActionsSectionover the sealedActionwith twenty records,PromptSection; enumsHeroSubclass,Hunger,ItemKind,EquipSlot,NoteKind,LogTone;Observationwith nine sections,withActionsandjson();ObservationCodecat version 2;JsonWriter(sorted keys, no whitespace, integers, the required escapes) andObservationJson;Belief.Variants(the schema by reflection, through sealed kinds),CodecReflectionTest(every component reaches the bytes and the JSON; one record per kind),CodecEqualityTest(equality against hash, bytes and JSON over 470 Observations),JsonRenderingTestwithStrictJson(the hash field, canonical shape, escapes, writer misuse, no reader inapiby ArchUnit),BeliefTest,CodecCanonicalTest(the new set-like and positional lists),SchemaRulesTest(header and prompt agreement, Action parameters, the hero in view, the belongings' order, item and note shapes, the log's bound),ObservationHashTestrepinned.docs/rules/ui.md(status pane and hero window numbers, hunger icon, log retention, quickslots, belongings order, talents pane);docs/architecture.md.How it was tested
./gradlew build: green, 383 tests across 22 suites, 317 of them inapi.fairness-revieweron5731279a0: FINDINGS with none blocking, seven should-fix findings all taken inb89047e0d(story file, The fairness review): the reader test pins the module's class set and scans constructors;UseItemOptiondropped, since an item's option window is a Prompt at its own Input wait; the log claim corrected to what the pane does; hero buffs ordered as an actor's;MoveTorefused by the valid set; five cites fixed; lone surrogates escaped.Docs
docs/adr/0005-observation-schema-and-hashing.md: amendment (the six sections' shapes with cites, the two-step construction, the JSON rules, the Belief, version 2).docs/adr/0014-action-schema-and-executor-contract.md: amendment (the records from 1.7, item use as four kinds,MoveTo,ItemRefchecked at construction).docs/rules/ui.md: six rows.docs/architecture.md: theapiline._bmad-output/implementation-artifacts/1-7-the-observation-part-two-the-remaining-sections-and-the-read.md.Upstream files touched