You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit cada990
Browse filesBrowse the repository at this point in the historyBrowse files
test(map): the History diff's wash is pinned to the diff - History played back without it, or a diff flag left on the live map, paints and exports exactly what the live map does, each label judged on its cushion alone (review F3.2)
Every node /api/snapshots/tree serves carries a prevSize, so a History view
with Diff off holds folders that grew and shrank, and only the guard in
tmDiffWashes keeps their 30% wash off the canvas, out of the SVG export and
out of the ink and the cushion's ease. Every History paint the suite ran was
{active, diff}, so dropping either half of the guard left it green. The two
new tests paint and export the same prevSize'd maps under {active, no diff}
and {no History, diff} and compare them with the live map as it holds them
- the same tiles in the same colours with no prevSize - after checking that
the History diff does wash them. The diff map and the export's tiles are
shared helpers now; paint() also hands back the pxRects.
Mutants (bqg1/mut4/results-f32.txt, all RED, restored by SHA-256): the
guard without its diff half, without its History half, never washing; the
label judged through a wash the guard did not lay; the cushion eased for
one; the export laying unguarded washes; a paint that keeps no cushion.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
test('G09: in the History diff, a label in a folder that grew, shrank or is new reaches 4.5:1 on its tile as the folder\'s wash leaves it — mid-folder, below the folder\'s tag, and under two washes',()=>{
711
-
// Pass 2.5 lays a 30% wash of the folder's own diff colour over every
712
-
// expanded folder that changed, its leaves included, after pass 1 painted
713
-
// them and before pass 4 writes their labels — so a label is read on its
714
-
// cushion seen through that wash, not on the cushion alone. Chosen against
715
-
// the cushion alone, the unchanged grey leaf in the corner of a folder
716
-
// that grew took white at 4.64:1 and measured 3.67:1 under the teal wash
717
-
// (review F2.1). What is measured here is the canvas itself: every fill
718
-
// over the label's top and foot, replayed in the order it was drawn.
719
-
// Two washes of one colour too: under red › red the grey leaf below the
720
-
// tag reads at 4.5:1 only where its cushion eases for the washed colour.
710
+
/**
711
+
* A History map with every diff colour: folders that grew, shrank, are new
712
+
* or are unchanged — alone and one inside another — each holding one leaf of
713
+
* every kind, in the folder's corner below its tag and clear of it, at every
714
+
* label height. Each node carries the prevSize the diff is drawn from.
slots.push({what: `${folders.join(' › ')} folder, ${kind} leaf, ${corner ? 'below the tag' : 'mid-folder'}, ${h} px`,x: x+2, y });
735
731
}
732
+
return{ nodes, slots };
733
+
}
734
+
735
+
test('G09: in the History diff, a label in a folder that grew, shrank or is new reaches 4.5:1 on its tile as the folder\'s wash leaves it — mid-folder, below the folder\'s tag, and under two washes',()=>{
736
+
// Pass 2.5 lays a 30% wash of the folder's own diff colour over every
737
+
// expanded folder that changed, its leaves included, after pass 1 painted
738
+
// them and before pass 4 writes their labels — so a label is read on its
739
+
// cushion seen through that wash, not on the cushion alone. Chosen against
740
+
// the cushion alone, the unchanged grey leaf in the corner of a folder
741
+
// that grew took white at 4.64:1 and measured 3.67:1 under the teal wash
742
+
// (review F2.1). What is measured here is the canvas itself: every fill
743
+
// over the label's top and foot, replayed in the order it was drawn.
744
+
// Two washes of one colour too: under red › red the grey leaf below the
745
+
// tag reads at 4.5:1 only where its cushion eases for the washed colour.
test('G09: the History diff\'s wash is laid only while the diff is on — History played back without it, or a diff flag left over on the live map, paints what the live map paints, each label judged on its cushion alone',()=>{
778
+
// Every node /api/snapshots/tree serves carries a prevSize, so a History
779
+
// view with Diff off holds folders that grew and shrank; only the guard in
780
+
// tmDiffWashes keeps their wash off the map, out of the ink and out of the
781
+
// cushion's ease. Every History paint the suite ran was {active, diff}, so
782
+
// dropping either half of that guard left it green (review F3.2).
783
+
// The reference is the same map as the live map holds it — no prevSize,
784
+
// each tile in the same colour — so a wash drawn from prevSize anywhere,
assert.deepEqual(washesOn(rec),[],`${where}: no wash is laid over any folder`);
795
+
constleaves=rec.px.filter((r)=>r.stops);
796
+
assert.ok(leaves.length>500,`${where}: the leaves were painted (${leaves.length})`);
797
+
for(constrofleaves)assert.deepEqual(r.seen,r.stops,`${where}: ${r.n.name}'s label is judged on the cushion painted, through no wash`);
798
+
assert.ok(JSON.stringify(rec.ops)===live,`${where}: every cushion, label and ink is the one the live map paints`);
799
+
}
800
+
});
801
+
752
802
/* ══════════════ G01/G09 — the SVG export is the map's own recipe ══════════════ */
753
803
754
804
/**
@@ -913,19 +963,24 @@ function svgLines(svg: string, ground: RGB) {
913
963
returnout;
914
964
}
915
965
916
-
test('G09: the SVG export lays the History diff\'s wash over each folder that grew or shrank, as the canvas does, and its labels read 4.5:1 through it',()=>{
917
-
// The canvas picks a label's ink against the cushion seen through its
918
-
// folder's wash (review F2.1); an export that left the wash out would
919
-
// write that ink on a tile it was not chosen for, and lose the diff.
966
+
/** Three folders — one grew, one shrank, one did not change — each holding leaves, with the prevSize the diff is drawn from. */
test('G09: the SVG export lays the History diff\'s wash over each folder that grew or shrank, as the canvas does, and its labels read 4.5:1 through it',()=>{
980
+
// The canvas picks a label's ink against the cushion seen through its
981
+
// folder's wash (review F2.1); an export that left the wash out would
982
+
// write that ink on a tile it was not chosen for, and lose the diff.
constonCanvas=rec.ops.slice(1).filter((op): op is Extract<Op,{kind: 'rect'}>=>op.kind==='rect'&&typeofop.style==='string')
@@ -943,6 +998,22 @@ test('G09: the SVG export lays the History diff\'s wash over each folder that gr
943
998
}
944
999
});
945
1000
1001
+
test('G09: the SVG export lays the History diff\'s wash only while the diff is on — exported from History without it, or with a diff flag left over on the live map, it is the live map\'s own export',()=>{
1002
+
// The export lays each wash tmDiffWashes names (review F2.1), so the same
1003
+
// guard keeps it out of an export made outside the diff (review F3.2).
assert.deepEqual(washesIn(svg),[],`${where}: the export lays no wash`);
1013
+
assert.ok(svg===live,`${where}: the export is the live map's own, rectangle by rectangle and label by label`);
1014
+
}
1015
+
});
1016
+
946
1017
test('G09/G27: the SVG export draws a cloud placeholder hollow and a staged block as an amber dashed outline, as the map does — neither as a cushion — and labels the hollow tile at 4.5:1',()=>{
947
1018
// Every SVG test exported plain leaves, so the export's two other leaf
948
1019
// branches ran under no test: an opaque cloud, a solid one, an undashed
0 commit comments