Skip to content

Share .differences rules between journeys, excuse text line by line, document the rules - #78

Merged
Mpdreamz merged 1 commit into
mainfrom
fix/shared-differences
Nov 11, 2026
Merged

Mpdreamz merged 1 commit into
mainfrom
fix/shared-differences

Conversation

@Mpdreamz

Copy link
Copy Markdown
Contributor

Fixes #77. Several journeys can now share a file of expected differences, a changed text is excused line by line, and the rules are documented where agents and users look.

Why

Comparing two deployments of a docs site with several journeys in one folder showed three problems (#77): a shared rules file made every journey that did not reach one of its rules fail as stale (and --record into one file did the same); the rule --record suggested for an added line was a truncated changed text naming neither the line nor its URL; and no README or skill mentioned .differences.

What

Shared files

A rule in an include? file counts as stale only where its ## heading matches a section of the run. A rule under a heading that matches and explained nothing is stale as before. The file's own rules stay strict (a heading that matches nothing is a renamed or misspelt step), include and folder files are never stale, and --prune removes only what is stale for the run, so pruning one journey no longer deletes another's rules from a shared file. --record 'known/{name}.differences' gives each journey its own file ({name} is the file's name).

Text, line by line

A read's text or a response's text body that gained or lost lines is compared by lines. added text "GET {origin}/fonts/*.woff2 (Font) 404" and removed text "…" (quoted glob or regex; ignore text "…" for either) name them; every changed line must be named, and the rules are marked used only then. --record now writes those lines. A line rule never excuses a whole text that came or went, and text "name" in a journey is still an accessibility node.

Docs

The rule syntax, include kinds, stale semantics, --record/--prune and {name} are in the docs page, the README, and the Cli, Browser skills.

Verified

  • Full suite passes (1163 of 1164, 1 skipped), zero warnings, curb check clean. 13 new tests: line rules for .http and journeys (named, partially named, removed and changed lines, whole text that came or went, ignore text), reachable-only staleness (including the file's own rules staying strict and pruning a shared file leaving another journey's rules), {name} in --record, and text "name" still an aria node.
  • Not exercised: against the reporter's two real deployments.

🤖 Generated with Claude Code

…, and document the rules

Fixes #77.

- A rule in an include? file counts as stale only where its section heading appears in the run, so
  several journeys can share one file, and --record can fill it from all of them, without the others'
  rules failing each journey. The file's own rules stay strict; include and folder files never go stale.
- A read's text, or a text body, that gained or lost lines is compared by lines: added text "line" and
  removed text "line" name them, every changed line must be named, and the suggestion --record writes
  names the lines instead of a truncated changed text.
- {name} in --record and --prune is the file's name, one file of differences per journey.
- The rules are documented in the README, the Cli and Browser skills and the docs page.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@Mpdreamz Mpdreamz added the bug A defect fixed (patch) label Nov 11, 2026
@Mpdreamz
Mpdreamz merged commit e0203ed into main Nov 11, 2026
12 of 13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug A defect fixed (patch)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

snap journey compare: .differences rules can't be shared, and nothing documents them

1 participant