Repository navigation
Conversation
Story M11.8. The start section is an open "new database" dialog beside the closing line: a directory field, a segmented fsync choice, the snippet for those choices, and one button that copies it and says so for 1.5 seconds. The snippet comes from one template in web/src/data/snippet.json. tests/test_snippet.py renders the same template for every fsync choice, writes it to a file, runs it as a subprocess and reopens the database it claims to have written to check the record is there. Another test asserts the snippet still matches the engine's real constructor, so renaming a parameter breaks a test rather than shipping a snippet that no longer runs. The directory is free text, so it is escaped into a Python string literal and a test parses the result with a quote and a backslash in the path. Two more house rules were tightened on the way: the one shadow the page is allowed is now a token, and the tab walk knows that a radio group is one tab stop, which is the platform's rule and not this page's. Co-Authored-By: Claude <noreply@anthropic.com> Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QWNkuNh5Bysnfo2KrxL9Sp
Owner
Author
|
Closing as a duplicate: M11.8 was implemented and merged in #97 from a local session, at the owner's request to take over the remaining stories by hand. The routine has been disabled. |
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.
The last section of the page: an open "new database" dialog that writes the Python for the choices a visitor makes, beside the closing line.
The snippet is code that has been run
There is one template,
web/src/data/snippet.json. The page renders it (snippet.ts) andtests/test_snippet.pyrenders the same template for every fsync choice, writes it to a file, runs it as a subprocess, checks what it printed, and then reopens the database it claims to have written to confirm the record is really there. A snippet composed by the page alone would be code nobody ever ran, and "getting started takes one copy" is only true if the thing copied works.A second test asserts the snippet still matches the engine's real constructor and parameter names, so renaming
fsync_policyinsrc/ledgerlogbreaks a test rather than quietly shipping a snippet that no longer runs.The directory field is free text, so it is escaped into a Python string literal on both sides, and a test parses the rendered snippet with a quote and a backslash in the path.
Acceptance criteria
src/ledgerlog, and pytest executes the snippet the page generates for each fsync choice, from one shared template.What ran, and what passed
pytest: 1311 passed (7 new).ruff check src testsandruff format --check src tests: clean.web/:npm ci, lint, typecheck, build: clean.npx playwright test: 118 passed across both projects. Playwright ran locally, not only in CI.The clipboard test reads the clipboard back rather than trusting the button's label, so "copied" cannot be true while nothing was copied. The keyboard test drives the whole dialog with no pointer at all: type the directory, arrow between the fsync segments, Enter on the button, then read the clipboard and check it is the snippet for those choices.
I looked at the section at 1440 and 390.
Two more house rules tightened
Both came out of the spec failing on this work rather than being designed around:
[data-ui]fragment, and it is now--shadow-dialogin the token file, where a second one would be visible as a second token.start.spec.tsasserts the arrow key movement.Decisions taken without asking
<dialog open>laid out as a panel. Section 6 asks for a dialog that is already open, and using the element means the shadow section 7 permits is permitted by the rule as written rather than by an exception. A non-modal<dialog open>is absolutely positioned by default, which took it out of the grid and over the closing line, so it is set back to static.always, the engine's own constructor default, so the snippet a visitor copies without touching anything is the snippet for the engine's defaults.Closes #86
Generated by Claude Code