Phase 1 / Scene / Cooking .scene.etch → .scene.bin#32
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Milestone M1.0.4 — Cooking
.scene.etch→.scene.bin. Brief: briefs/M1.0.4-scene-cook.md (Status: CLOSED, closed 2026-06-27).Delivers the offline, World-free cook of direct-entity scenes into the zero-copy
.scene.binthe M1.0.5 runtime loader will mmap. New Tier-0 codec undersrc/core/scene/(SceneHeader+ §10 Schema Registry +writer+ zero-copyaccessor, the accessor reused verbatim by M1.0.5) + the Etch cook driversrc/etch/scene_cook.zig(reusescompileTypeDecl+evalConst, groups entities byComponentSignatureinto flat SoA columns).scene_cookCLI. Rejectsinstance of(M1.0.6) + unsupported field kinds with clear diagnostics.Notes de fin
interp.compileTypeDecl(refactored to*Registry) +evalConst+ecs_bridge.writeValueAsBytes; the only genuinely new surface is the.scene.bincodec. Up-front parallel brick-mapping (signatures + file:line for every reused symbol) meant near-zero signature surprises during implementation.format.columnOffset/columnsRegionEndshared helper made writer and accessor agree on SoA column placement by construction. The E3 mixedbool+f64archetype case exercised real inter-column padding (not a no-op) and passed — locking that agreement.XxHash64(0)over content-after-header) — re-cook byte-identity confirmed by both the test and the CLIcmp.interp.compileTypeDeclrefactored*World→*Registry+ madepub(ininterp.zig, outside the brief file list) — approved deviation, World-free registration reuse.ComponentId;SceneHeadergainedschema_count+schema_table_offset.uuidis mandatory (error.MissingUuid, correction Phase -1 / Bootstrap / Repo and CI #1) — reverses E1's zero-fill.format.zig(nominally E2) was created in E1 (the cook model is typed against it); the writer serializes the full file incl. the resources block in E2 (one cohesive codec), with the resource round-trip assertions added in E3.std.hash.XxHash64per the brief Note (overrides the spec's "xxHash3")..etch(component/resource/enum decls + onescene), not a strict §21 single-scenefile: M1.0.4 cooks one self-contained program; cross-fileimportresolution at cook time is future work. The cook parses in general mode and rejects onlyinstance of.idOf(name); the M1.0.4 round-trip is in-process (the cook returns its ownRegistry).FieldKind-dispatch keep M1.0.6 (cross-refs/extensions) and any new 3D/handleFieldKindadditive (no on-disk/loader change).cmp). Cookedarena_wave1.scene.bin= 344 bytes,WSCNmagic @0, 64-byte header.zig build testEXIT 0 (debug + ReleaseSafe via pre-push),zig fmt --check+zig build lintclean.columnOffset); a malformed file beyond that trips an assert rather than a graceful error — fine for cook-produced files; the M1.0.5 loader may add input validation.importresolution at cook time (single self-contained program per cook).Étape 4 — validation (all green)
FieldKind, noinstance offlatten, no.prefab.bin, no runtime loader)debugandReleaseSafe(pre-push runs both)zig build scene-cook -- --output … tests/fixtures/scene/arena_wave1.scene.etch→WSCNmagic + 64-byte header; re-run byte-identical (cmp)zig build,zig build test,zig fmt --check,zig build lintgreentests/scene/target rooted (its tests are counted) perengine-zig-conventions.md§13CLAUDE.md§3.4 updated on the branch (docs(claude-md): update for M1.0.4) — État courant + Tagsv0.10.4-scene-cook+ open decisions (incl. dynamic-collections home + additive-future sections) + dateStatus: CLOSED,Close date: 2026-06-27, final commitdocs(brief): close M1.0.4Acted deviations (traced in the brief)
compileTypeDecl→*Registry— madepuband reparameterized from*Worldto*Registryso the World-free cook reuses the exact registration path;interp.zigwas outside the brief file list (approved in-session).uuidmandatory —parseEntityUuidreturnserror.MissingUuidon an absentuuid:(reverses the E1 zero-fill); explicit identity required, the cook never auto-generates.engine-ecs-internals.md§10), never a raw runtimeComponentId; the in-memoryCookModelkeeps itsComponentId, only the encoding is schema-indexed; M1.0.5 remaps viaidOf(name).Merge strategy: squash-and-merge (one milestone = one commit on
main). Not merged, not tagged — left to Guy after review (thev0.10.4-scene-cooktag is posted post-merge).🤖 Generated with Claude Code