Repository navigation
feat(hooks): before-generate env reaches the assembler's generate - #525
Conversation
A provider's env_file contribution (contract §2) used to reach the fingerprint pass, the compile and later hooks, but not the labelle-assembler generate process, so a before-generate hook could steer the compile but not what gets generated. assembler_proc.generate now takes the build's accumulated hook environment and runs the assembler with it merged on top of ours (normal builds and watched rebuilds); with nothing contributed it inherits our environment exactly as before. First consumer: labelle-web#24, whose before-generate hook switches on the threaded web build (LABELLE_WASM_THREADS, labelle-assembler#818) from the provider's own config. Docs: provider-contract-v1 §2 scope and provider-hooks. Claude-Session: https://claude.ai/code/session_01LpszrcSrLLijQcxxvgWyUQ
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Team Run ID: 📒 Files selected for processing (6)
Included review availability: This review used your included allowance. 0 included reviews remain after this review. Your included PR review attempts over the past 7 days set your current allowance at 1 review per hour. 📝 WalkthroughWalkthroughProvider-hook environment contributions now reach core assembler generation in normal and watched rebuild pipelines. The assembler composes nonempty contributions over the CLI environment. Documentation describes the generation step and retains exclusions for provider-tool builds and the core-launched game. ChangesAssembler generation environment
Priority: ➖ Normal Estimated code review effort: 2 (Simple) | ~12 minutes Change: Feature Sequence Diagram(s)sequenceDiagram
participant Hooks as before-generate hooks
participant Pipeline as generate pipeline
participant Generate as assembler_proc.generate
participant Run as Assembler.runWithEnv
participant Assembler as labelle-assembler
Hooks->>Pipeline: contribute environment
Pipeline->>Generate: pass hook_site.env
Generate->>Run: pass composed environment
Run->>Assembler: spawn with optional environment
Suggested reviewers: Merge Risk: ⚪ Minimal · up to The reviewed changes preserve the CLI environment while applying hook contributions to assembler generation in normal and watched builds. No material merge risk remains. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
Part of labelle-web#24 (the threaded web build). Design: labelle-toolkit/labelle-web#24 (comment). The owner chose this option in the session.
Problem
A provider's
env_filecontribution (contract §2) reaches the fingerprint pass, the compile and every later hook, but not thelabelle-assembler generateprocess. So abefore generatehook can change how the generated tree compiles, but not what gets generated.labelle-web needs exactly that: its config's
"threads": truemust turn onLABELLE_WASM_THREADSfor the assembler (labelle-assembler#818), so users don't have to set an env var themselves.build_options(1.6) doesn't help, because they're-Dflags on the compile, after generation.Change
assembler_proc.generatetakes the build's accumulated hook environment and runs the assembler with it composed on top of ours. This covers normal builds (pipeline/generate.zig) and watched rebuilds (pipeline/rebuild.zig).provider-contract-v1.md§2 Scope andprovider-hooks.mdnow list the core generation first among the environment's consumers.env_fileformat is unchanged.Tests
zig build test: 13/13 steps, 1163 passed (2 skipped), including the agnosticism guard. NewGenerateEnvSpec:The end-to-end check (labelle-web's hook switching on a threaded build) comes with the labelle-web PR.
https://claude.ai/code/session_01LpszrcSrLLijQcxxvgWyUQ