Repository navigation
feat(writing-specs): data-state examples for logic-spec scenarios - #49
Merged
Merged
Conversation
…eep literal U+E000
…eak on CR line endings
…arkdown parser stays fast
… and link URLs literal in example panes
…scenario-data-states
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.
Summary
Logic-spec scenarios can now carry an optional data-state example: the records before, a numbered walkthrough, and the records after. The Then stays the contract, and the example is a checked restatement of it. Spec: logic.md, tech.md.
render_spec.pyvalidates theexamplefield, and an open[ASK]gap blocks its scenario's sign-off until the answer is in the Then.logic.mdrenders each example as labelled sub-bullets. Specs without examples render byte-for-byte as before, and the new goldens intests/test_render_goldens.pyhold that.skills/writing-specs/scenario-examples.mdis the one copy of the conventions, and both rubrics link to it.[ASK]blocks). On the page it sits full-width below the three columns, with tables, lists and code blocks intact and code shown exactly as written. Inlogic.mdit's a sub-bullet labelled with its title. This was added through a dated amendment to the logic spec.Fixes that apply page-wide, beyond examples:
http(s):,mailto:and#targets. Before this,[x](jAvAsCrIp:...)produced a live script link.logic.jsontext fields are capped at 10,000 characters (BUG-13). The Astryx Markdown parser is quadratic per paragraph, and 400k characters of[a](froze the page for seconds. The cap keeps the worst field to about 24ms.Review
Five rounds of adversarial review with a cross-family reviewer (correctness, spec and security lenses) ran up to the round cap. Every CRITICAL and HIGH finding is fixed.
4*,5*greyed only the first value) and C3 (a lone CR line ending didn't break) were fixed after round 5. Both have tests and passed the full suite, but no further review round looked at them.SpecMarkdownpredates this branch and is logged as BUG-14.Test plan
python3 -m pytest -q: 1271 passedpnpm run checkinskills/writing-specs/interactive/app: typecheck, layout, example and template checks pass, andreview-template.htmlmatches a fresh buildrender_spec.py renderon a spec with a 400k-character field exits 1 with the field's pointer and writes noreview.html. At 10,000 characters it renders.tests/fixtures/interactive/v2/examples) and check the three panes and colours in the focus dialogtests/fixtures/interactive/v2/details) and check the titled pane, the table, and the layout when a scenario has both forms