Skip to content

AutoStory: screen events and story step types (PLZA upstream S1) - #522

Draft
dayfine wants to merge 9 commits into
autostory/shared-statsfrom
plza/upstream/s1
Draft

dayfine wants to merge 9 commits into
autostory/shared-statsfrom
plza/upstream/s1

Conversation

@dayfine

@dayfine dayfine commented Nov 15, 2026 •

Copy link
Copy Markdown
Owner

Depends on #519

First PR of the rebuilt PLZA upstream chain (plan: autostory/plza/UPSTREAM_PLAN.md, S1). It adds CommonTools/ScreenEvents (what the screen is doing, since when) and the shared story vocabulary: step types, the step executor, story events, the step and checkpoint JSON readers, the story log and the shared failure classes. The files are cut from plza/fault-sweep (24133e1) with only what PLZA AutoStory builds; no engine, tile navigation, SV or lab code. Two changes from that tip: the failure classes drop their sim-fault mapping (it returns with the fault sweep after M3), and record_story_counts() feeds #519's renamed stats, counting checkpoints started.

Tests: the new ScreenEvents, StoryActionArg, StoryLog, StoryEvents, StoryFailureClasses, StoryStepExecutor, StoryStepJson and AuthoredCheckpointJson suites, all synthetic; no CommandLineTests frames needed. Fork Draft CI builds and runs them.

CheckpointId parses "SS.CC" ids like "03.08" (exactly two digits, a dot,
two digits), prints them back, orders them, and starts_segment() tells a
caller when a run enters a new segment so it can count Segments Started.
FRLG splits boss battles out of a checkpoint without renumbering the
ones after it (00.12b, 12.02b). The suffix sorts after the bare id and
before the next checkpoint; starts_segment ignores it.
suffix is std::optional<char> instead of a '\0' sentinel, the fields have defaults and are private behind accessors, so parse() is the only way to build an id. Order tests take ids as text. The parse test expects one optional. Sorted the CMake list and the test-runner include; shortened the starts_segment comment.
CommonTools/ScreenEvents (what the screen is doing, since when) and the
shared story vocabulary every AutoStory engine game builds on: the step
types, the step executor, story events, the step JSON reader, the story
log and the shared failure classes. Cut from plza/fault-sweep with only
what PLZA AutoStory builds; the fault sweep's sim-fault mapping comes
with the sweep later.
…ry()

Keeps the unit test runner's list under the function length limit.
@dayfine

dayfine commented Nov 15, 2026

Copy link
Copy Markdown
Owner Author

Superseded by the re-split chain #529 to #534 (S1 part, about 500-800 non-test lines each, each with its own tests); its files continue through #535 to #545. The chain's last branch, plza/upstream/s2-11, has the same tree as #525's 00c6ceb. Leaving this open for reference; review the new PRs bottom-up instead.

@dayfine
dayfine changed the base branch from autostory/checkpoint-id to autostory/shared-stats November 15, 2026 20:35
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