Repository navigation
Commit 62c2ffb
committed
test(journeys): a learner's week, asserted on what they are told
Around 230 tests already covered this feature's units and contracts. Nothing walked
a learner's week: publish, read, annotate, pull, fold back, republish. So the suite
proved the parts were correct and could not fail because the experience was
confusing — which is the gap the owner asked to close.
Three model families each planned this independently and agreed on the shape:
one journey per provider, as ONE ordered test, at the integration layer, adding
nothing at unit level. The arbitration and their three plans are in
reviews/2026-09-04-user-harness/.
The distinguishing idea, which all three reached separately: **assert on what the
learner is TOLD.** Every value here is already proven elsewhere. A publish that
writes the right bytes and says nothing is a correct function and a broken
experience, and only a test at this level can tell them apart.
Twelve numbered beats, numbered the same way in the evidence transcript so a
failure names something a human can go and look at. Among them: a dry run must
preview AND its listing must equal what the publish then writes; a publish must say
where; `pull` must return the learner's own note and never StudyLoop's frontmatter;
a missing note must not read as a crash; an unchanged republish must say so and
claim nothing written; a fold-in must move the derived progress and render the
checkbox. The learner's own `.notes.md` is digested after every beat, so a failure
names the step that lost it rather than the fact of loss.
The journeys drive the real CLI as subprocesses in a world with a complete
environment that inherits nothing. `plan new --activate`, `plan milestone --done`
and `plan show --markdown` were measured non-interactive first — two planners named
"is plan creation interactive?" as their highest-risk assumption, because seeding
through the API would start the journey one step after the learner does.
A product gap the harness found, and a validation council named precisely:
`WriteOutcome` gains `REPLACED`. A learner whose hand-edited projection was
overwritten saw `written Study/Plans/<id>.md` — character for character what a
first publish prints — and their words were gone with nothing said. The writer
always knew the difference; it compares bytes to decide whether to write at all.
That information now reaches the surface as a warning that names the file and
points at `.notes.md`.
Two findings in my own harness, both caught by reading real output rather than code:
evidence transcripts contained `pytest-of-<username>`, an account name in an
artefact, so paths are redacted to placeholders; and Rich soft-wrapped absolute
paths across lines, defeating that redaction in two halves, so the child's COLUMNS
is pinned.
Screenshots: `scripts/capture-vault-screenshots.py` renders the published notes for
reading, from a hermetic world, publishing through the real CLI. It is deliberately
NOT a picture of Obsidian and says so in its own pixels. One planner proposed
opening the temp vault through an `obsidian://` URI; rejected, because registering a
throwaway vault in the switcher of a tool someone uses daily is an unverified side
effect on a real environment and no documentation image is worth it. A real-app
glance lives in the live suite instead: it never launches Obsidian, skips when it is
closed, and FAILS when it is open on a vault that is not allow-listed.1 parent 61e1770 commit 62c2ffb
14 files changed
Lines changed: 2320 additions & 4 deletions
File tree
- packages/studyloop
- src/studyloop/second_brain
- tests
- journeys
- scripts
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
154 | 154 | | |
155 | 155 | | |
156 | 156 | | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
157 | 169 | | |
158 | 170 | | |
159 | 171 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
181 | 181 | | |
182 | 182 | | |
183 | 183 | | |
184 | | - | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
185 | 195 | | |
186 | 196 | | |
187 | 197 | | |
188 | 198 | | |
189 | | - | |
| 199 | + | |
190 | 200 | | |
191 | 201 | | |
192 | 202 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
63 | 63 | | |
64 | 64 | | |
65 | 65 | | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
66 | 74 | | |
67 | 75 | | |
68 | 76 | | |
| 77 | + | |
69 | 78 | | |
70 | 79 | | |
71 | 80 | | |
| |||
307 | 316 | | |
308 | 317 | | |
309 | 318 | | |
| 319 | + | |
310 | 320 | | |
311 | 321 | | |
312 | 322 | | |
| |||
322 | 332 | | |
323 | 333 | | |
324 | 334 | | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
325 | 338 | | |
326 | 339 | | |
327 | 340 | | |
| |||
380 | 393 | | |
381 | 394 | | |
382 | 395 | | |
383 | | - | |
| 396 | + | |
384 | 397 | | |
385 | 398 | | |
386 | 399 | | |
| |||
Whitespace-only changes.
0 commit comments