Skip to content

Draw a public mock call inside a @Sendable builder function in the public mock corpus - #1216

Open
dfed wants to merge 9 commits into
claude/project-thread-knsfr2-lazy-apart-drawfrom
claude/project-thread-r9iqwa-sendable-roll-on-1214
Open

dfed wants to merge 9 commits into
claude/project-thread-knsfr2-lazy-apart-drawfrom
claude/project-thread-r9iqwa-sendable-roll-on-1214

Conversation

@dfed

@dfed dfed commented Dec 2, 2026 •

Copy link
Copy Markdown
Owner

Requested by Dan · project thread

The graph fuzzer's public mock corpus now draws a call of another module's public mock, made inside a @Sendable builder function, whose place the calling module fills.

A mock that made such a call took the builder for the filled place from the plain family instead of the @Sendable one. Its record then dropped the fill's override, so a second mock that built the same holder by value read a configuration field no mock declared, and the generated code did not compile. The fix landed with the mock layout from node records (#1209). The fuzzer did not draw this shape, so this change adds the draw.

The draw fires in one Sendable graph in four, on a random stream of its own, so every other shape is drawn as before. Most of the time a second mock builds the same holder by value, so the module's mocks build it both inside and outside a @Sendable function. Four draw features name the variants, and the corpus pins how many accepted graphs draw each one.

With the fix reverted, seeds 42, 110, 148 and 197 of the public mock corpus fail to compile. With the fix, they compile.

Found and not fixed: nothing.

🤖 Generated with Claude Code

…ilds

The public mock corpus draws, on a stream of its own, PluggedHost's mock building
PluggedHolder inside a SendableInstantiator or SendableLazilyInstantiated whose
tree calls PluggedPlug's public mock with its @sendable builder, now and then
through an instantiator, beside a by-value sibling, or with the fill reading the
holder's value. With the @sendable builder fix reverted, seeds 42, 110, 148 and
197 fail to compile (PluggedSibling's mock reads a field PluggedHolder's
configuration lacks). Drawn counts pinned; accepted counts come from CI.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HLuVQK5BH1ia1a6ByCnyiF
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HLuVQK5BH1ia1a6ByCnyiF
@dfed dfed self-assigned this Dec 2, 2026
Re-pins the smoke and public mock fixture hashes, which both sides moved.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HLuVQK5BH1ia1a6ByCnyiF
@github-actions

github-actions Bot commented Dec 3, 2026 •

Copy link
Copy Markdown
Contributor

Timing of 0d68575

Wall times measured in this run. A wall time, peak memory, size or growth row over its limit is reported here and fails no check; a shape the tool cannot generate still fails "Check Generate Time on Linux". Every run rewrites this comment, and a check that did not run in it is not listed.

generate, head against base: 0 failure(s).

Every shape and row

generate time and peak memory, head against base: median of 5 alternating runs; a shape fails at 2 times the base's wall time or 1.3 times its peak memory, there or on the median peak of 5 more runs with one allocator arena, and C1500-mock-chain, E32-inline-mocks, S12-mocks, S16 at 1.1 times with one arena. APP100x800x3, APP300x3000x3, E24-public-mock, MR20x1000-many-roots, ORD400-ordinary are compared on their runs with one arena alone, at 1.3 or at the shape's own memory limit.

Shape Runs Base wall / CPU Head wall / CPU Head / base (wall) Base peak Head peak Head / base (peak) Generated code Verdict
every shape 0 not compared: the head tool is the base tool

.safedi size, head against base: a module fails at 2 times the base's bytes.

Shape Module Base bytes Head bytes Head / base Verdict

Growth, the head tool alone: each row at its layers and at 2 more, or at the two numbers it names; median of 3 alternating runs for time, and of 3 more with one allocator arena for peak memory. A measure fails at 2 times the smaller graph's, or at the limit beside it.

Row Layers Wall: fewer layers, more, ratio Peak memory .safedi bytes Generated code Verdict
P-seam-hole-at-every-screen 6 and 8 0.295 s, 2.286 s, 7.76 (limit 13) 60.4 MB, 200.3 MB, 3.32 (limit 5.5) 291416 bytes, 3379022 bytes, 11.60 (limit 12.5) 80978 bytes, 123266 bytes, 1.52 within the limits
L-label-declared-again 9 and 11 0.298 s, 0.145 s, 0.49 47.3 MB, 47.9 MB, 1.01 10443 bytes, 12982 bytes, 1.24 17699 bytes, 22475 bytes, 1.27 within the limits
K-mock-at-every-screen 6 and 8 0.067 s, 0.087 s, 1.30 (limit 6.5) 51.3 MB, 51.5 MB, 1.00 3135 bytes, 4255 bytes, 1.36 116509 bytes, 159533 bytes, 1.37 (limit 10.5) within the limits
M-public-mock-layers 6 and 8 0.105 s, 0.182 s, 1.74 (limit 5) 50.4 MB, 54.7 MB, 1.09 6955 bytes, 9179 bytes, 1.32 128150 bytes, 191046 bytes, 1.49 (limit 9) within the limits
MH-public-mock-hole-at-every-screen 6 and 8 0.277 s, 2.002 s, 7.24 (limit 12.5) 62.5 MB, 184.6 MB, 2.95 (limit 5.5) 224758 bytes, 2506094 bytes, 11.15 (limit 12.5) 490878 bytes, 3360205 bytes, 6.85 (limit 9) within the limits
Q-seam-own-module-paths 9 and 11 0.103 s, 0.113 s, 1.09 48.2 MB, 49.0 MB, 1.02 10422 bytes, 12665 bytes, 1.22 59796 bytes, 75892 bytes, 1.27 within the limits
B-cycles-through-instantiators 3 and 5 0.068 s, 0.071 s, 1.04 (limit 27) 46.1 MB, 45.9 MB, 1.00 (limit 3.6) 1706 bytes, 2680 bytes, 1.57 4492 bytes, 7990 bytes, 1.78 within the limits
W-ring-of-screens-that-open-each-other 10 and 12 0.040 s, 0.041 s, 1.03 (limit 4) 45.9 MB, 46.1 MB, 1.00 2498 bytes, 2962 bytes, 1.19 7147 bytes, 8555 bytes, 1.20 within the limits
WL-ring-of-screens-receiving-labels 2 and 4 0.242 s, 0.664 s, 2.75 (limit 5.5) 62.9 MB, 99.3 MB, 1.58 (limit 2.4) 46751 bytes, 60851 bytes, 1.30 50201 bytes, 76701 bytes, 1.53 within the limits
BM-mocks-of-cycles-through-instantiators 2 and 4 0.092 s, 0.197 s, 2.14 (limit 48) 50.4 MB, 52.3 MB, 1.04 (limit 6.5) 1262 bytes, 2221 bytes, 1.76 72987 bytes, 237796 bytes, 3.26 (limit 275) within the limits
F9-public-mock-seam-chain 3 and 5 0.300 s, 2.906 s, 9.69 (limit 16) 54.9 MB, 203.7 MB, 3.71 (limit 6) 108330 bytes, 3474647 bytes, 32.07 (limit 36) 264483 bytes, 4101514 bytes, 15.51 (limit 19) within the limits
H-seam-holes-in-cycles 3 and 5 0.128 s, 1.465 s, 11.42 (limit 22) 47.7 MB, 88.0 MB, 1.85 (limit 2.6) 22299 bytes, 1376085 bytes, 61.71 (limit 65) 28228 bytes, 121080 bytes, 4.29 (limit 5) within the limits
TA-all-to-all-tangle 4 and 6 0.133 s, 2.569 s, 19.31 (limit 27) 49.5 MB, 164.1 MB, 3.31 (limit 4.7) 32535 bytes, 1247861 bytes, 38.35 (limit 47) 78851 bytes, 5566907 bytes, 70.60 (limit 83) within the limits
LS-layered-screens-opening-screen-above 6 and 8 0.045 s, 0.049 s, 1.10 46.6 MB, 46.6 MB, 1.00 3824 bytes, 5040 bytes, 1.32 11776 bytes, 15982 bytes, 1.36 within the limits
LST-layered-screens-opening-screen-above-over-twin-cycle 4 and 6 0.072 s, 0.675 s, 9.44 (limit 13) 48.3 MB, 79.8 MB, 1.65 1358 bytes, 1811 bytes, 1.33 3427 bytes, 4893 bytes, 1.43 within the limits
LSH-seam-layered-screens-opening-screen-above-hole-at-leaves 3 and 5 0.140 s, 2.286 s, 16.34 (limit 26) 50.0 MB, 140.7 MB, 2.81 (limit 4.5) 29722 bytes, 1005186 bytes, 33.82 (limit 38) 79021 bytes, 3078304 bytes, 38.96 (limit 47) within the limits
O-only-if-available-at-every-screen 6 and 8 0.042 s, 0.044 s, 1.05 46.0 MB, 46.5 MB, 1.01 3364 bytes, 4438 bytes, 1.32 9413 bytes, 12671 bytes, 1.35 within the limits
R-received-instantiator-at-every-screen 6 and 8 0.045 s, 0.049 s, 1.10 45.9 MB, 46.2 MB, 1.01 3230 bytes, 4316 bytes, 1.34 21143 bytes, 31547 bytes, 1.49 within the limits
N-rename-at-every-screen 8 and 10 0.045 s, 0.049 s, 1.08 46.6 MB, 47.0 MB, 1.01 4432 bytes, 5507 bytes, 1.24 13439 bytes, 16889 bytes, 1.26 within the limits
V-renames-in-alternate-layers 10 and 12 0.054 s, 0.058 s, 1.07 47.4 MB, 47.8 MB, 1.01 6952 bytes, 8388 bytes, 1.21 22258 bytes, 27706 bytes, 1.24 within the limits
VO-only-if-available-renames-in-alternate-layers 10 and 12 0.054 s, 0.058 s, 1.08 47.4 MB, 47.5 MB, 1.00 7027 bytes, 8475 bytes, 1.21 22277 bytes, 27729 bytes, 1.24 within the limits
PR-parents-router 8 and 10 0.044 s, 0.046 s, 1.05 46.3 MB, 46.8 MB, 1.01 4300 bytes, 5373 bytes, 1.25 15705 bytes, 19869 bytes, 1.27 within the limits
PRS-seam-parents-router 8 and 10 0.088 s, 0.092 s, 1.05 46.9 MB, 47.3 MB, 1.01 7954 bytes, 9849 bytes, 1.24 17103 bytes, 21357 bytes, 1.25 within the limits
T-leaves-reached-twice-at-depth 1 and 3 0.437 s, 1.360 s, 3.11 (limit 6) 83.8 MB, 161.0 MB, 1.92 (limit 3.8) 214719 bytes, 665319 bytes, 3.10 (limit 3.5) 419959 bytes, 1288909 bytes, 3.07 (limit 3.5) within the limits
CH-chain-of-instantiators 1000 and 2000 0.244 s, 0.490 s, 2.01 (limit 2.3) 65.6 MB, 85.8 MB, 1.31 (limit 2.3) 107683 bytes, 219498 bytes, 2.04 (limit 2.3) 207492 bytes, 423492 bytes, 2.04 (limit 2.3) within the limits
RG-ring-of-instantiators 1000 and 2000 0.277 s, 0.589 s, 2.12 (limit 2.3) 66.1 MB, 86.4 MB, 1.31 (limit 2.3) 112707 bytes, 229523 bytes, 2.04 (limit 2.3) 234611 bytes, 477611 bytes, 2.04 (limit 2.3) within the limits
DC-chain-of-declarations-at-depth 2 and 4 0.716 s, 1.458 s, 2.04 (limit 2.3) 105.4 MB, 165.9 MB, 1.57 (limit 2.3) 341402 bytes, 693402 bytes, 2.03 (limit 2.3) 703337 bytes, 1415337 bytes, 2.01 (limit 2.3) within the limits
LC-chain-inside-lazy-cycle-function 2 and 4 1.141 s, 2.393 s, 2.10 (limit 3.2) 145.9 MB, 244.9 MB, 1.68 (limit 2.3) 565618 bytes, 1174902 bytes, 2.08 (limit 2.3) 1182142 bytes, 2394938 bytes, 2.03 (limit 2.3) within the limits
DL-deep-lazy-cycle 300 and 600 0.089 s, 0.145 s, 1.63 (limit 2.3) 50.2 MB, 54.7 MB, 1.09 (limit 2.3) 24944 bytes, 50144 bytes, 2.01 (limit 2.3) 53193 bytes, 106593 bytes, 2.00 (limit 2.3) within the limits
TS-leaves-reached-from-two-screens 2 and 4 0.714 s, 1.466 s, 2.05 (limit 2.3) 105.2 MB, 164.2 MB, 1.56 (limit 2.8) 317851 bytes, 647451 bytes, 2.04 (limit 2.3) 565355 bytes, 1150955 bytes, 2.04 (limit 2.3) within the limits
TC-leaves-reached-three-times-down-chain 2 and 4 0.448 s, 0.932 s, 2.08 (limit 3.6) 82.7 MB, 120.3 MB, 1.45 (limit 2.1) 211144 bytes, 431644 bytes, 2.04 (limit 2.3) 455533 bytes, 915033 bytes, 2.01 (limit 2.3) within the limits
TW-components-on-two-wide-screens 2 and 4 0.928 s, 1.884 s, 2.03 (limit 2.5) 121.2 MB, 193.1 MB, 1.59 (limit 2.3) 440981 bytes, 875561 bytes, 1.99 (limit 2.3) 790823 bytes, 1558723 bytes, 1.97 (limit 2.3) within the limits
BL-back-links-to-feature-entries 1 and 3 0.053 s, 0.053 s, 1.01 46.9 MB, 47.2 MB, 1.01 7344 bytes, 7394 bytes, 1.01 25102 bytes, 25352 bytes, 1.01 within the limits
BL4-back-links-to-most-feature-entries 4 and 6 0.054 s, 0.054 s, 1.01 (limit 6) 47.1 MB, 47.1 MB, 1.00 (limit 2.4) 7425 bytes, 7475 bytes, 1.01 25477 bytes, 25727 bytes, 1.01 within the limits
BLO-back-links-with-state-only-if-available 1 and 3 0.071 s, 0.104 s, 1.46 (limit 8) 47.8 MB, 50.0 MB, 1.05 7409 bytes, 7459 bytes, 1.01 25156 bytes, 25406 bytes, 1.01 within the limits
BLS-back-links-with-feature-labels-over-shared-tree 1 and 3 0.572 s, 0.919 s, 1.61 106.0 MB, 141.2 MB, 1.33 (limit 2.3) 260378 bytes, 435233 bytes, 1.67 375861 bytes, 642061 bytes, 1.71 within the limits
MB-calling-mocks-of-many-hole-types 40 and 80 0.307 s, 0.533 s, 1.73 (limit 2.2) 65.3 MB, 78.0 MB, 1.19 36220 bytes, 69448 bytes, 1.92 2316408 bytes, 4639408 bytes, 2.00 (limit 2.2) within the limits
LP-lifelike-chain-under-the-plugin 5 and 10 0.531 s, 1.024 s, 1.93 (limit 2.35) 78.8 MB, 107.5 MB, 1.36 0 bytes, 0 bytes, 1.00 1653445 bytes, 3012762 bytes, 1.82 (limit 2.2) within the limits
LPB-lifelike-chain-with-back-edges 5 and 10 1.798 s, 3.420 s, 1.90 (limit 2.3) 152.2 MB, 250.0 MB, 1.64 (limit 2.3) 0 bytes, 0 bytes, 1.00 (limit 2.3) 15700461 bytes, 25279140 bytes, 1.61 (limit 2.3) within the limits

@dfed
dfed marked this pull request as ready for review December 3, 2026 12:40
…roject-thread-r9iqwa-sendable-roll-on-1214

# Conflicts:
#	Tests/SafeDIToolFuzzerTests/SafeDIToolGraphFuzzerTests.swift
The public mock corpus now accepts graphs of the four sendableHolderOfPublicMockCall draws, so their accepted counts join publicMockCorpusAcceptedDrawFeatureCounts, and the retention and level-function capture oracles judge more graphs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HLuVQK5BH1ia1a6ByCnyiF
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants