Repository navigation
feat(assemble): add product stages assembled from the exported objects - #64
Merged
Merged
Conversation
A product stage (nnnotes.pipeline.assemble.ProductStage) makes one task
per subject from root objects: the objects of the catalog keys it gives
for the subject, through the address table, and the object ids it names.
Its task reaches the units holding its roots and every unit an item of a
reached unit references, through the unity.export results; a sprite whose
atlas is in another bundle takes its image from sprite.crop.
- The task's input is the object table of what it reaches
(nnnotes.objects/1): each object's class, name, item status and files,
the object holding a contained one, and the referenced objects no census
holds. Its key therefore follows exactly the files it can read.
- The result holds the product's own files as `<task id>#<path>`, its
object table as `<task id>#objects` and one item for the subject.
- The unit request takes the fact `roots` ({keys, objects}):
`assemble.request` gives it from the products asked for, so a run
exports the units their roots reach and nothing else of their bundles.
- layout.product_entries and layout.product_manifest place products for
a player: every file at `assets/<sha256>.<ext>` and a manifest
(nnnotes.product/1) per product listing its files and its objects'
files.
- view.voices reads the address table through the same cached reader.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Summary
Product stages (
nnnotes.pipeline.assemble.ProductStage) assemble a product from theunity.exportresults of the objects it reaches, never from a bundle.Request roots
link.addresses), and the object ids it names.assemble.request(stages, products, env)turns that into the factroots({keys, objects}), which the unit request uses. A run then exports the units those roots reach and nothing else of their bundles.Reach and the object table
reachwalks the units of the roots, then every unit an item of a reached unit references, through the results.imagefrom thesprite.cropresult of that atlas.missing.nnnotes.objects/1), the task's only input: class, name, item status, files by role, the object holding a contained one, and the reason code of a generic, unsupported or failed one. Its key therefore follows exactly the files the product can read.Result and layout
<task id>#<path>, its object table as<task id>#objects, and one item for the subject (exported, orunsupportedwith a reason code).layout.product_entries/layout.product_manifestplace a product for a player: every file and every file of its objects atassets/<sha256>.<ext>, and one manifest (nnnotes.product/1) per product listing its files and its objects' files. A file several products share is written once.view.voicesnow reads the address table through the same cached reader as the unit table.Docs
docs/products.md, with the request, the object table, the layout and the manifest;stages.md,contracts.mdandschemas.mdupdated, plusobjects.schema.jsonandproduct.schema.json.Test plan
tests/pipeline/test_assemble.pyover the bundle fixtures oftest_objexport: the request, the table of a prefab hierarchy, a cross-bundle atlas crop, waiting, the result, pruning and the layoutmkdocs build --strictNot in this PR
The CLI wiring and the first real product (Live2D) come with the assemblers; no command reads a product yet.
🤖 Generated with Claude Code