AtlatestRepositorysigil-ui
1
# Reproducing the combined Mac qualification3
This repository owns the font/window/UI integration fixture and its combined4
packet. Font-specific C models/object gates remain in sigil-font. The single5
resource monitor is scripts/macos/setup.sgl, shared by the UI check and native6
dependency audit. Limits and candidate source directories are explicit inputs;7
the font gates contain no machine-specific affinity, memory or disk policy.9
Use Sigil 0.24.8 and Zig 0.16.0 on Linux. Set SIGIL_MACOS_FONT_SOURCE and10
SIGIL_MACOS_WINDOW_SOURCE to absolute accepted candidate source directories.11
Set SIGIL_FEATURES=cross,darwin for dependency installation and Mac builds.12
From test/macos-drawing, run `sigil deps install` then13
`sigil build -c darwin-arm64`. The manifest selects this repository's UI and the14
two supplied candidates by qualified local names.16
The drawing host deliberately enables `SIGIL_FONT_CORETEXT_TEST` so the private17
fixture can use allocation/test-constructor hooks. Ordinary font/UI release18
builds omit that test-hook flag.20
From the font source's21
test/coretext-host, install dependencies and build both darwin-arm64 and22
darwin-amd64. The drawing host and all its integration source are tracked here;23
no generated project outside the repository is required.25
To use the shared Linux process/resource guard, run from this repository:27
```text28
sigil scripts/macos/check.sgl FONT WINDOW ZIG HEADERS RESOURCE_ROOT CPUS NICE MEMORY_BYTES FREE_BYTES SCRATCH_BYTES TIMEOUT_SECONDS ACTION [EXTRA]29
```31
The actions are objects, loader-model, caller-error (EXTRA is a matching Linux32
runtime archive), ownership-model (also takes that archive), font-arm64,33
font-amd64 and drawing. Linux-build,34
linux-unicode and linux-conformance use font's tracked test/freetype-host.35
The check delegates the first three to font's own gate and builds integration packages for36
the rest. Every child inherits the supplied affinity, priority and address37
limit; the shared monitor checks process-group RSS, free disk, owned build38
directories and deadline. Nested build directories are counted only once.39
RESOURCE_ROOT identifies additional owned build/cache scratch to count.41
The optional full dependency object audit has the same arguments; use audit as42
ACTION and an installed registry source directory as EXTRA with43
scripts/macos/audit-native-groups.sgl. It compiles the selected locked FFI,44
crypto, TLS and SVG sources for both architectures. Then run:46
```text47
sigil scripts/macos/verify.sgl FONT FONT_OBJECT_DIRECTORY NATIVE_AUDIT_DIRECTORY48
```50
This shares font's Mach-O parser and checks font, dependency/runtime objects51
and the real drawing image. Object proof does not replace a full application52
link or native Mac behavior.54
Assemble the prebuilt packet using the independently accepted host packet:56
```text57
sigil scripts/macos/prepare-qualification.sgl FONT HOST_PACKET HOST_MANIFEST_SHA256 OUTPUT58
```60
Record the resulting manifest hash independently. Transfer OUTPUT intact to61
an arm64 Mac and run:63
```text64
sigil /absolute/packet/qualify.sgl /absolute/fresh/run-directory EXPECTED_MANIFEST_SHA256 --execute65
```67
Omit --execute for a read-only plan. The script verifies the external manifest68
pin and each fixture's owner execute bit before creating any scratch. Assembly69
explicitly sets all six executables to mode 0755. The execute mode copies70
sources/fonts/bundles to fresh scratch, checks every copied input71
against the validated manifest, clears quarantine on its own copies, and72
directly executes each copied bundle executable once, retaining its real process73
exit status as well as its PID/hash/exit receipt. Host, conformance, WK adoption74
and initialization receive RUN only; font and drawing receive RUN RESOURCES.75
An exit before START reports its own error and actual process status, with76
pre-START stdout/stderr retained beside the native receipts. No compiler, package download77
or system font installation runs on the Mac. Process-only test registrations78
are cleaned up. Native results remain a release gate.80
An individual fixture's behavior failure is recorded in fixture.failure, and81
the remaining independent fixtures still run, including drawing. The aggregate82
qualification.result lists every PASS/FAIL and the command fails if any fixture83
failed. Manifest or copied-input integrity failures remain fatal before launch.85
The portable Unicode font suite must pass on Linux FreeType before sealing86
each packet. It uses the pinned cmap's U+1F800 supplementary outline and a87
small synthetic missing-outline admission case; an oversized system emoji file88
does not qualify outline refusal. The font CI also runs these portable cases.90
For a Linux-only packet control run, use91
`sigil scripts/macos/test-packet.sgl PACKET FRESH_ABSOLUTE_MODEL_DIRECTORY`.92
It substitutes controlled OS tools, verifies valid/invalid plan behavior, and93
modifies a copied scratch executable to prove refusal before launch. Its logs94
are explicitly models; they never count as real Mac behavior. The shared95
check's packet action accepts those two paths after ACTION for the same run96
under the supplied resource limits.97
The font-only failure control also requires the subsequent drawing fixture to98
pass while the aggregate command remains a failure.99
The non-executable-fixture control changes only a fixture's mode to 0644,100
verifies that every content hash still matches, and requires the plan to refuse101
it without creating its destination.103
The native drawing capture searches all content subviews for the host canvas.104
It converts known sRGB background/white colors into the bitmap's attached ICC105
colorSpace and compares raw getPixel components in that profile, handling106
alpha-first/last RGB layouts explicitly. The supported cache is 8-bit RGB(A).107
The background uses a two-level channel tolerance and must cover at least 75%108
of all pixels. Near-white coverage uses a 14-level tolerance around the109
profile-matched white and must reach 200 pixels. The capture logs colorSpaceName110
separately from the attached profile, expected device values, raw samples,111
dimensions, format and counts. colorAtX:y: is unsuitable here because its named112
calibrated RGB decode can differ from the attached display profile. The113
renderer's sRGB image path is unchanged.115
Run `sigil scripts/macos/test-fixture-arguments.sgl WINDOW FONT C_COMPILER FRESH_OUTPUT`116
on Linux to test the launcher's shared argv against all six actual argument117
admission prefixes. The control compiles the native C main guards and evaluates118
the Sigil main admission forms, replacing only probe setup with a side-effect-free119
stub. It never invokes native Mac or drawing behavior. Use the shared check's120
arguments action with C_COMPILER and FRESH_OUTPUT for resource-guarded execution.