on master help sign in
Check the remaining doc fragments

Fully check the import-only example and consumers of all three import forms, view-day, step, and the cmd/sub prelude molds through detailed and legacy inference. Share the fixture with the fake ship and reject missing reader and module inputs.

commit0e8ecb4cf94b2d0fa2d19f952ea8a6e56280de27 authoriko <mail@iko.soy> dateMon 2 Nov 2026, 11:19 (7 hours ago) parentfb6373f
6 files changed+225−4
README.md+2 docs/development.md+2 docs/prelude-inventory.md+3−3 docs/status.md+3−1 tests/lib/jibb-doc-examples.hoon+166 tools/type-doc-examples-test+49
README.md+2
@@ -48,6 +48,8 @@ The focused `tools/type-page-main-test` fully checks the byte-identical static a
4848
4949The focused `tools/type-buttons-test` fully checks the documented `labelled` and `wide` definitions and the unchanged module's exact source-located unresolved-`%add` error through detailed and legacy inference. The eval test and fake-ship arm share the valid source, schemes and error fixtures. It does not render or execute UI.
5050
51+The focused `tools/type-doc-examples-test` fully checks the import-only example with real Hoon readers and the card module, the `view-day` and `step` modules, and the `cmd`/`sub` molds at their prelude path through detailed and legacy inference. The same fixture runs on the fake ship.
52+
5153The focused `tools/type-theme-test` fully checks the byte-identical real theme against the exact prelude mold, including its exported type, structural downstream import, dark absent/present forms and malformed-field negatives under eval with a shared fake-ship arm. It does not check contrast, render themes or route fonts.
5254
5355The focused `tools/type-store-test` checks the byte-identical cart store and basket through detailed and legacy inference, exact main and derived schemes, structural imports, direct store watch evidence and rejection controls under eval with a shared fake-ship arm. It does not lower or execute stores, support multi-action declarations, or permit store requests in page loads.
docs/development.md+2
@@ -93,6 +93,7 @@ git clone https://github.com/urbit/tools /root/src/tools
9393| `tools/type-direct-gate-test` | Checks a synthetic source-backed program report and direct gate provenance under eval and on the ship |
9494| `tools/type-page-main-test` | Fully checks byte-identical static and direct data pages through real readers, exact main types, downstream imports and rejection guards under eval and on the ship |
9595| `tools/type-buttons-test` | Checks the documented valid button helpers and the unchanged unresolved-`%add` module through detailed and legacy inference under eval and on the ship |
96+| `tools/type-doc-examples-test` | Fully checks the import-only, view-day, step and cmd/sub doc fragments in their intended contexts through detailed and legacy inference under eval and on the ship |
9697| `tools/type-theme-test` | Fully checks the byte-identical real theme, its exact exported type, structural downstream import, dark absent/present forms and rejection guards under eval and on the ship |
9798| `tools/type-program-main-test` | Checks the narrow closed subscription-free program-main interface, downstream import and rejection guards under eval and on the ship |
9899| `tools/type-program-init-test` | Checks transactional direct-program initializer recovery, exact exported/imported types and fail-closed boundaries under eval and on the ship |
@@ -151,6 +152,7 @@ tools/type-todo-api-test # real todo API partial inference and reader
151152tools/type-direct-gate-test # direct gate source and provenance guards pass
152153tools/type-page-main-test # static/data pages, exact types, imports and rejection guards pass
153154tools/type-buttons-test # documented buttons schemes and exact pending-tag error
155+tools/type-doc-examples-test # remaining doc fragments fully check in context
154156tools/type-theme-test # real theme, exact type, structural import and rejection guards pass
155157tools/type-program-main-test # closed program-main interface and rejection guards pass
156158tools/type-program-init-test # transactional direct-program initializer context guards pass
docs/prelude-inventory.md+3−3
@@ -4,13 +4,13 @@ This is a working inventory, not a completed prelude interface. It lists top-lev
44
55The source is the fake ship's `%base` `/sys/hoon.hoon` (Hoon version 135), read through Clay with `tools/ship scry /cx/=base=/sys/hoon/hoon --raw`. SHA-256: `ef538ced0877230f02ff86f9fb7a0abc6833bb1cf0e8675742b4d6ce478fcc92`. It differs in bytes from [upstream Hoon at the inspected commit](https://github.com/urbit/urbit/blob/5a187fededc4582a34fcd6055c67bb63e0917b94/pkg/arvo/sys/hoon.hoon); verify against the actual target ship when updating this inventory.
66
7−The vendored prelude defines `poke` in its private internal module and re-exports it as a transparent type. The partial checker resolves its supported source shape and a narrow imported API constructor; complete checking of the private body, other API shapes, effect lowering and runtime execution remain unfinished. `qath` is defined there as a transparent recursive knot sequence and re-exported by the public prelude; the partial checker supports its named identity, selected construction and matching, and static application-path literals. The internal prelude also defines a transparent generic `ask` with pure, agent and store cases; the public prelude re-exports it and defines `pure`. Supported source construction and matching infer, while derived requests, source-schema validation and execution remain unfinished.
7+The vendored prelude defines `raw-poke` in its private internal module and re-exports it as a transparent type. Derived API/store `poke` helpers take an action and reply and return `(cmd M)` after checking the canonical `raw-poke`, `cmd` and `unit` shapes; complete checking of the private body, other API shapes, effect lowering and runtime execution remain unfinished. `qath` is defined there as a transparent recursive knot sequence and re-exported by the public prelude; the partial checker supports its named identity, selected construction and matching, and static application-path literals. The internal prelude also defines a transparent generic `ask` with pure, agent and store cases; the public prelude re-exports it and defines `pure`. Supported source construction and matching infer, while derived requests, source-schema validation and execution remain unfinished.
88
9−The prelude also declares the generic `cmd` mold exactly as in Overview, Effects. The partial checker infers its five cases and independent message types in the supported examples; complete module checking and backend validation remain outstanding. The public prelude also declares `sub`; the partial checker infers supported constructions, while request watchability and execution remain outstanding.
9+The prelude also declares the generic `cmd` mold exactly as in Overview, Effects. The partial checker infers its five cases and independent message types in the supported examples; the doc's `cmd`/`sub` block also passes full detailed and legacy checking at the prelude path with matching printed schemes. Backend validation, request watchability and execution remain outstanding.
1010
1111The public prelude now defines the UI `length`, `align`, `role`, `tone` and `attr` molds, a nonrecursive generic `element` union with one case per UI node, and the exact `program` and `page` records with their builders. Nested child, keyed-item and table payloads in the runtime union are erased to `*`; the public constructors retain typed children and independent key types, and `island` stores `[program data]` in its erased payload. The focused `types-prelude-ui` golden infers the complete union and constructor schemes, including static and message-bearing composition. Raw-constructor encapsulation, duplicate-attribute rejection, rendering, storage, navigation and execution are not established by this slice.
1212
13−The public prelude defines the approved generic `store` record `[init=S update=*]` and its builder, whose update argument is `$-([A S] S)` while the result exposes only `S`. Focused store coverage checks both exact schemes, the unchanged cart's closed main and derived state/action gates, and downstream structural imports. Store declaration checking and watch evidence are implemented; multi-action declarations, lowering and runtime execution are not.
13+The public prelude defines the approved generic `store` record `[init=S update=*]` and its builder, whose update argument is `$-([A S] S)` while the result exposes only `S`. Focused store coverage checks both exact schemes, the unchanged cart's closed main and derived generic poke/state gates, malformed-prelude controls and downstream structural imports. The local `+$ poke` remains an ordinary action mold. Store declaration checking and watch evidence are implemented; multi-action declarations, lowering and runtime execution are not.
1414
1515The public prelude also defines the exact `theme` mold: three space cords, five normal tone cords, `wide`, `lang` and `zone` cords, `(unit qath)` for `font`, and a unit containing the same five dark tone cords. The shared `type-theme` fixture fully checks the byte-identical real theme and its structural downstream import, including dark absent/present and malformed-field negatives. It does not implement contrast checking, rendering, routing or any other theme behavior.
1616
docs/status.md+3−1
@@ -39,6 +39,8 @@ The internal prelude defines a transparent generic `ask` with pure, agent and st
3939
4040The public prelude now contains the source-backed UI length/attribute molds, all element constructors, and exact program/page records and builders. The full 19-case generic `element` union is nonrecursive: nested child, keyed-item and table payloads are `*`, while public constructor schemes preserve typed composition and independent key types. `island` returns `(element !!)` with `[program data]` as its erased payload. The focused UI golden checks exact schemes, static and message-bearing composition, concrete programs/pages/islands, malformed inputs and selected mismatches. A child-message mismatch fails closed as an unsupported constraint. Raw-constructor encapsulation, duplicate-attribute checks, rendering, storage, navigation and execution are not claimed.
4141
42+The remaining doc fragments now also have full detailed and legacy checks: the import-only module resolves its real `/sur`, mark and Jibb-module inputs; `view-day` and `step` check with their exact exported schemes; and the `cmd`/`sub` block checks at the prelude path against the canonical printed schemes. Additional consumers use all three imported names, and the shared eval/ship fixture rejects missing `/sur`, mark and Jibb-module inputs.
43+
4244The documented buttons library now fully checks its valid `labelled` and `wide` definitions with their exact generic element and attribute-list schemes. Ordinary positional calls unify a variable argument with the body of an expected faced sample slot without propagating that slot face. When full checking would otherwise reject an incomplete module, a failure-only retry of at most 64 missing definitions can report a still-pending tag at its source; the unchanged buttons module thus reports that nothing fixes the union of `%add`, with the actual excerpt, through both detailed and legacy inference. Successful checks do not run that retry. The shared eval/ship fixture is type checking only and claims no UI runtime.
4345
4446The public prelude now defines the exact documented `theme` record, including required text tokens, an optional `qath` font and optional dark tones. A shared eval/ship fixture fully checks the byte-identical `my-app/ui/theme.jibb`, checks its exact exported type and structural downstream import, and covers absent dark tones plus wrong nested auras, missing fields and wrong font/dark types. On 2026-11-01, @iko chose explicit backtick syntax for present units, and the documented dark record now uses it. No contrast check, rendering, routing or other theme behavior is implemented.
@@ -108,7 +110,7 @@ What the plan asks for, and where it is:
108110Besides the plan's list:
109111
110112- 660 golden cases: 440 that parse and 220 that fail, each failure at a stated line and column. One failing case has an unclear expectation (corpus question 3). The newer type-output cases exercise only the partial inference fragment. Each case's `about.txt` quotes the doc's words it tests.
111−- The 660-case corpus passed under `urbit eval` in 111.3 s while other checks were running. The fake ship passed all 716 tests, including the source-overlap, structural-overlap, generic-union source and alias-overlap, full-module overlap, deferred-context, generic-recursion, generic-construction, generic-pattern, deferred-inference, empty-mold and cell-branch fixtures, importer, importer/checker and mark/checker bridges, module scope, unification, hole, qath, ask, default-wrapper importer, projection, arithmetic, generic-alias, positional-face, API-evidence, request, closed-gate, todo API, constructor, sub, nested-union, gate-free and direct-gate guards and the unchanged todo report. Desk sync took 110.2 s and the ship's `-test` run took 290.7 s. The importer golden compares 221 projections; `tools/clay-fixtures` builds the example Hoon fixtures through Clay, checks a recursive Ford import's origin, and passes Clay-built types through the Clay-built importer and partial checker.
113+- The 660-case corpus passed under `urbit eval` in 109.0 s while other checks were running. The fake ship passed all 717 tests, including the source-overlap, structural-overlap, generic-union source and alias-overlap, full-module overlap, deferred-context, generic-recursion, generic-construction, generic-pattern, deferred-inference, empty-mold and cell-branch fixtures, importer, importer/checker and mark/checker bridges, module scope, unification, hole, qath, ask, default-wrapper importer, projection, arithmetic, generic-alias, positional-face, API-evidence, request, closed-gate, todo API, constructor, sub, nested-union, gate-free and direct-gate guards and the unchanged todo report. Desk sync took 109.1 s and the ship's `-test` run took 249.0 s. The importer golden compares 221 projections; `tools/clay-fixtures` builds the example Hoon fixtures through Clay, checks a recursive Ford import's origin, and passes Clay-built types through the Clay-built importer and partial checker.
112114- `tools/testdata/selftest` (22 checks), `tools/testdata/ship-selftest` and `tools/testdata/clay-fixtures-selftest` test the tools themselves; the last checks temporary Clay fixture cleanup and signal handling without a ship.
113115- Two independent audits before 7c739b7, one of which compared the library with a reference parser written in Python from the doc over about 19,000 generated programs. Before ab797a9, a second Python parser, written from the decisions, agreed with the library on 8,000 generated programs and 900 hand-written probes.
114116- Speed: starting `urbit eval` and building the library takes about 8 s. After that, a 2,000-line module of 400 definitions parses in about a second. Loops over definitions, arms, lines and items grow no stack; nesting costs a few stack frames a level, and 100,000 nested brackets still parse (library section 3).
tests/lib/jibb-doc-examples.hoonnew file+166
@@ -0,0 +1,166 @@
1+:: Full checking for doc fragments in their intended module/prelude contexts.
2+/+ jibb, jibb-import
3+/* prelude %jibb /lib/jibb/prelude/jibb
4+/* internal %jibb /lib/jibb/internal/jibb
5+/* imports %jibb /tests/golden/doc-grammar-01-imports/source/jibb
6+/* view-day %jibb /tests/golden/doc-grammar-03-view-day/source/jibb
7+/* step %jibb /tests/golden/doc-grammar-04-step/source/jibb
8+/* cmd-sub %jibb /tests/golden/doc-overview-01-cmd-sub/source/jibb
9+/* todo-sur %txt /tests/type-api-paths/todo-sur/txt
10+/* todo-action %txt /tests/type-api-paths/todo-action/txt
11+/* blog-sur %txt /tests/type-page-main/blog-sur/txt
12+/* card %txt /tests/type-page-main/card/txt
13+|%
14+++ text
15+ |= lines=wain
16+ ^- @t
17+ (rap 3 (turn lines |=(line=@t (cat 3 line '\0a'))))
18+::
19+++ doc-detailed
20+ |= [at=path src=@t externals=iexternals:jibb marks=imark-externals:jibb modules=jbundle:jibb prepared=iprelude:jibb]
21+ ^- jfile-detailed-result:jibb
22+ (infer-jibb-file-detailed:jibb at src externals marks modules ~[at] values.prepared molds.prepared ~ `iface.prepared)
23+::
24+++ doc-legacy
25+ |= [at=path src=@t externals=iexternals:jibb marks=imark-externals:jibb modules=jbundle:jibb prepared=iprelude:jibb]
26+ ^- jfile-result:jibb
27+ (infer-jibb-file:jibb at src externals marks modules ~[at] values.prepared molds.prepared ~ `iface.prepared)
28+::
29+++ doc-reader-inputs
30+ |= [sur=@t action=@t blog=@t]
31+ ^- [marks=imark-externals:jibb externals=iexternals:jibb]
32+ =/ todo=type -:(ride -:!>(..zuse) sur)
33+ =/ todo-subject=type [%cell [%face %todo todo] -:!>(..zuse)]
34+ =/ action-result=* (read-mark:jibb-import %todo-action -:(ride todo-subject action))
35+ =/ item-input=* (read-named:jibb-import %todo %item todo)
36+ =/ posts=type -:(ride -:!>(..zuse) blog)
37+ =/ post-input=* (read-named:jibb-import %blog %post posts)
38+ :_ ~[[%todo %item item-input] [%blog %post post-input]]
39+ ~[[%todo-action action-result]]
40+::
41+++ doc-value-errors
42+ |= [label=tape name=term expected=@t checked=ifile:jibb]
43+ ^- (list tape)
44+ =/ value=(unit ischeme:jibb) (ienv-lookup:jibb name values.checked)
45+ ?~ value ~[(weld label ": value is missing")]
46+ =/ printed=itype:jibb (canonical-itype:jibb typ.u.value vars.u.value)
47+ =/ actual=@t (crip (show-itype:jibb printed ~))
48+ ?. =(actual expected) ~[(weld label (weld ": type was " (trip actual)))]
49+ ~
50+::
51+++ doc-positive
52+ |= [label=tape at=path src=@t name=term expected=@t prepared=iprelude:jibb]
53+ ^- (list tape)
54+ =/ detailed=jfile-detailed-result:jibb (doc-detailed at src ~ ~ ~ prepared)
55+ ?: ?=(%| -.detailed) ~[(weld label (weld ": detailed rejected: " (trip message.p.detailed)))]
56+ =/ legacy=jfile-result:jibb (doc-legacy at src ~ ~ ~ prepared)
57+ ?: ?=(%| -.legacy) ~[(weld label (weld ": legacy rejected: " (trip p.legacy)))]
58+ =/ failures=(list tape)
59+ (doc-value-errors (weld label ": detailed") name expected iface.p.detailed)
60+ =? failures !=(values.iface.p.detailed values.iface.p.legacy)
61+ [(weld label ": detailed and legacy values differ") failures]
62+ =? failures !=(molds.iface.p.detailed molds.iface.p.legacy)
63+ [(weld label ": detailed and legacy molds differ") failures]
64+ (weld failures (doc-value-errors (weld label ": legacy") name expected iface.p.legacy))
65+::
66+++ doc-cmd-prelude
67+ |= prepared=iprelude:jibb
68+ ^- iprelude:jibb
69+ =/ excluded=(list term) ~[%cmd %sub]
70+ =/ kept=imold-types:jibb
71+ (skim molds.iface.prepared |=(m=[name=term template=ischeme:jibb] !(lien excluded |=(n=term =(n name.m)))))
72+ =/ names=(list term)
73+ (skim molds.prepared |=(n=term !(lien excluded |=(x=term =(x n)))))
74+ [iface.prepared(molds kept) values.prepared names]
75+::
76+++ doc-cmd-interface-errors
77+ |= [label=tape checked=ifile:jibb original=ifile:jibb]
78+ ^- (list tape)
79+ =/ failures=(list tape) ~
80+ =/ names=(list term) ~[%cmd %sub]
81+ |-
82+ ?~ names failures
83+ =/ actual=(unit ischeme:jibb) (find-jibb-mold:jibb i.names checked)
84+ =/ expected=(unit ischeme:jibb) (find-jibb-mold:jibb i.names original)
85+ ?~ actual $(names t.names, failures [(weld label ": mold is missing") failures])
86+ ?~ expected $(names t.names, failures [(weld label ": canonical mold is missing") failures])
87+ =/ actual-type=itype:jibb (canonical-itype:jibb typ.u.actual vars.u.actual)
88+ =/ expected-type=itype:jibb (canonical-itype:jibb typ.u.expected vars.u.expected)
89+ =/ shown=@t (crip (show-itype:jibb actual-type ~))
90+ =/ expected-shown=@t (crip (show-itype:jibb expected-type ~))
91+ ?. =(shown expected-shown)
92+ $(names t.names, failures [(weld label (weld ": mold scheme was " (trip shown))) failures])
93+ $(names t.names)
94+::
95+++ doc-cmd-errors
96+ |= [src=@t prepared=iprelude:jibb]
97+ ^- (list tape)
98+ =/ at=path /lib/jibb/prelude/jibb
99+ =/ reduced=iprelude:jibb (doc-cmd-prelude prepared)
100+ =/ detailed=jfile-detailed-result:jibb (doc-detailed at src ~ ~ ~ reduced)
101+ ?: ?=(%| -.detailed) ~[(weld "cmd/sub detailed rejected: " (trip message.p.detailed))]
102+ =/ legacy=jfile-result:jibb (doc-legacy at src ~ ~ ~ reduced)
103+ ?: ?=(%| -.legacy) ~[(weld "cmd/sub legacy rejected: " (trip p.legacy))]
104+ =/ failures=(list tape)
105+ (doc-cmd-interface-errors "cmd/sub detailed" iface.p.detailed iface.prepared)
106+ =? failures !=(molds.iface.p.detailed molds.iface.p.legacy)
107+ ["cmd/sub detailed and legacy molds differ" failures]
108+ (weld failures (doc-cmd-interface-errors "cmd/sub legacy" iface.p.legacy iface.prepared))
109+::
110+++ doc-import-errors
111+ |= [src=@t sur=@t action=@t blog=@t card-source=@t prepared=iprelude:jibb]
112+ ^- (list tape)
113+ =/ at=path /ui/imports/jibb
114+ =/ inputs=[marks=imark-externals:jibb externals=iexternals:jibb]
115+ (doc-reader-inputs sur action blog)
116+ =/ modules=jbundle:jibb ~[[/ui/components/card/jibb card-source]]
117+ =/ detailed=jfile-detailed-result:jibb
118+ (doc-detailed at src externals.inputs marks.inputs modules prepared)
119+ ?: ?=(%| -.detailed) ~[(weld "imports detailed rejected: " (trip message.p.detailed))]
120+ =/ legacy=jfile-result:jibb
121+ (doc-legacy at src externals.inputs marks.inputs modules prepared)
122+ ?: ?=(%| -.legacy) ~[(weld "imports legacy rejected: " (trip p.legacy))]
123+ =/ use-source=@t
124+ %+ rap 3
125+ :~ src
126+ '++ use-item |= i=item.todo i\0a'
127+ '++ use-action |= a=todo-action a\0a'
128+ '++ use-card card.card\0a'
129+ ==
130+ =/ used=jfile-detailed-result:jibb
131+ (doc-detailed at use-source externals.inputs marks.inputs modules prepared)
132+ ?: ?=(%| -.used) ~[(weld "import consumers rejected: " (trip message.p.used))]
133+ =/ used-legacy=jfile-result:jibb
134+ (doc-legacy at use-source externals.inputs marks.inputs modules prepared)
135+ ?: ?=(%| -.used-legacy) ~[(weld "legacy import consumers rejected: " (trip p.used-legacy))]
136+ =/ failures=(list tape) ~
137+ =/ missing-module=jfile-detailed-result:jibb
138+ (doc-detailed at use-source externals.inputs marks.inputs ~ prepared)
139+ =? failures ?=(%& -.missing-module) ["imports accepted a missing Jibb module" failures]
140+ =/ missing-mark=jfile-detailed-result:jibb
141+ (doc-detailed at use-source externals.inputs ~ modules prepared)
142+ =? failures ?=(%& -.missing-mark) ["imports accepted a missing mark" failures]
143+ =/ missing-sur=jfile-detailed-result:jibb
144+ (doc-detailed at use-source ~ marks.inputs modules prepared)
145+ =? failures ?=(%& -.missing-sur) ["imports accepted missing /sur molds" failures]
146+ failures
147+::
148+++ doc-examples-errors
149+ |= [public=@t private=@t import-source=@t view-source=@t step-source=@t cmd-source=@t sur=@t action=@t blog=@t card-source=@t]
150+ ^- (list tape)
151+ =/ prepared=(unit iprelude:jibb)
152+ (prepare-prelude-with-internal:jibb public private)
153+ ?~ prepared ~["doc-example prelude did not prepare"]
154+ ;: weld
155+ (doc-positive "view-day" /ui/view-day/jibb view-source %view '$-([day=@da n=@ud] (element A))' u.prepared)
156+ (doc-positive "step" /ui/step/jibb step-source %describe '$-(step @t)' u.prepared)
157+ (doc-cmd-errors cmd-source u.prepared)
158+ (doc-import-errors import-source sur action blog card-source u.prepared)
159+ ==
160+::
161+++ test-doc-examples
162+ ^- tang
163+ =/ failures=(list tape)
164+ (doc-examples-errors prelude internal imports view-day step cmd-sub (text todo-sur) (text todo-action) (text blog-sur) (text card))
165+ (turn failures |=(reason=tape leaf+reason))
166+--
tools/type-doc-examples-testnew file+49
@@ -0,0 +1,49 @@
1+#!/usr/bin/env python3
2+"""Fully check the remaining doc fragments in their intended contexts."""
3+from pathlib import Path
4+import argparse
5+import subprocess
6+import sys
7+import tempfile
8+
9+root = Path(__file__).resolve().parent.parent
10+parser = argparse.ArgumentParser(description=__doc__)
11+parser.add_argument('--lib', default=str(root / 'jibb-dev/lib/jibb.hoon'))
12+parser.add_argument('--timeout', type=float, default=300,
13+ help='seconds allowed for urbit eval (default: 300)')
14+args = parser.parse_args()
15+tests = (root / 'tests/lib/jibb-doc-examples.hoon').read_text()
16+tests = tests[tests.index('\n|%\n') + 1:]
17+tests = tests[:tests.index('\n++ test-doc-examples')] + '\n--\n'
18+program = ('=/ jibb .\n=/ jibb-import\n' +
19+ (root / 'jibb-dev/lib/jibb-import.hoon').read_text() +
20+ '=/ suite\n' + tests +
21+ '\n=/ failures=(list tape) (doc-examples-errors:suite prelude internal imports view-day step cmd-sub todo-sur todo-action blog-sur card)\n'
22+ '^- @t\n?~ failures \'documented fragments passed\'\n'
23+ '(of-wain:format (turn failures crip))\n')
24+fixtures = {
25+ 'prelude': 'jibb-dev/lib/jibb/prelude.jibb',
26+ 'internal': 'jibb-dev/lib/jibb/internal.jibb',
27+ 'imports': 'tests/golden/doc-grammar-01-imports/source.jibb',
28+ 'view-day': 'tests/golden/doc-grammar-03-view-day/source.jibb',
29+ 'step': 'tests/golden/doc-grammar-04-step/source.jibb',
30+ 'cmd-sub': 'tests/golden/doc-overview-01-cmd-sub/source.jibb',
31+ 'todo-sur': 'tests/type-api-paths/todo-sur.txt',
32+ 'todo-action': 'tests/type-api-paths/todo-action.txt',
33+ 'blog-sur': 'tests/type-page-main/blog-sur.txt',
34+ 'card': 'tests/type-page-main/card.txt',
35+}
36+with tempfile.TemporaryDirectory(prefix='jibb-doc-examples-') as tmp:
37+ path = Path(tmp) / 'doc-examples.hoon'
38+ path.write_text(program)
39+ command = [str(root / 'tools/hoon'), '--lib', args.lib, '--raw', '-f', str(path),
40+ '--timeout', str(args.timeout)]
41+ for name, filename in fixtures.items():
42+ command += ['--cord', name + '=' + str(root / filename)]
43+ result = subprocess.run(command, stdout=subprocess.PIPE)
44+if result.returncode:
45+ sys.exit(result.returncode)
46+if result.stdout != b'documented fragments passed\n':
47+ sys.stderr.buffer.write(result.stdout)
48+ sys.exit(1)
49+print('documented imports, view-day, step and cmd/sub detailed/legacy checks passed')