Repository navigation
perf(ci): speed up artifact generation with level-1 optimization - #4597
Conversation
Helix-Harness: pi Helix-Model: openai-codex/gpt-6.1-sol
Helix-Harness: pi Helix-Model: openai-codex/gpt-6.1-sol
|
Cross-review requested. |
helix-white
left a comment
There was a problem hiding this comment.
Approved at 804ea80. It merges cleanly with origin/master (merge-tree exits 0). This verdict comes from reading the code; CI was still running and I did not wait for it.
What I checked:
- Profile:
generatedinheritsdev, includingopt-level = 3and thebacktracepackage override, and only setsdebug = 0.[profile.test]and[profile.dev]have the same settings, socargo test --profile generatedstays at level 3. Cargo still reportsPROFILE=debugto build scripts, anddebug_assertionsstays on. - Generator scripts:
generator-env.shmatches the two blocks it replaces.RUST_ARCHhad no consumer in either script or inbuilder-alias.sh. The alias expands$ARCHand$RUSTFLAGSwhen it is used, so setting them after the alias is defined is safe.--profile releaseand--profile devmap to the old--releaseand default builds, so outputs land in the same target directories. PROFILEfrom Make:build/common.mksetsPROFILE = releasebut does not export it, so thegenerateddefault does reach the scripts. As before,make PROFILE=debug …overrides it. A plainPROFILE=debug make …is overwritten withrelease, and that was already the case.- Single
make -kgraph:start-core-ts-bindingsruns once, so bindings are not recompiled after regeneration dirties the checkout. Drift in one check doesn't stop the others. A bindings failure skips only the MCP generation that depends on it, andfailure()still uploads the regenerated artifacts. - Tests: the new tests run the real scripts, Cargo profile,
build.mkand workflow step rather than copies.make package-ci-testpicks up the new test file through its glob. TheinMschange removes thetest.onlyand fixes the mistitled case.
Not blocking: generated-artifacts.test.mjs makes make package-ci-test need cargo, make and rsync on the host, while the root AGENTS.md line still lists only root npm dependencies. Nothing in the workflow setup removes Rust from the runner; the running Formatting & Lockfiles job will confirm it works there.
Helix-Harness: claude-code
Helix-Model: claude-opus-5-5
Helix-Identity: helix-b
|
Cross-review approved without code changes. The hand-off brief now explicitly names Cargo, Make, and rsync as native fixture prerequisites; those tools are already part of the root contributor setup. Requested @dr-bonez. Full CI and the measured timing improvement remain pending, so this is not yet a passing/faster claim. |
|
At @dr-bonez’s request, a controlled level-1/2/3 experiment is now running on this head with the pinned builder. It compares generator output, compile/test outcomes, elapsed time, and binary size using separate cold Cargo target directories. Keeping level 3 in the current PR was conservative; it was not based on a demonstrated failure at lower levels. The PR stays unchanged until the measurements are available. |
|
All current-head CI checks have now completed successfully (including all product/architecture builds; normal image/deploy skips remain). Generated Artifacts took 56m02s versus the prior ten-run median of 77m24s, about 28% lower; Run Automated Tests took 55m15s. This is a historical comparison, not a controlled same-runner benchmark. Separately, controlled local level-1 and level-3 generator/backend/WRT experiments passed, with identical generated outputs and no observed stack overflow. Level 1 reduced combined generator compile time from 17m47s to 10m32s. Level-2 comparison was interrupted by harness cancellation and is being completed; no optimization-level change has been pushed. |
Helix-Harness: pi Helix-Model: openai-codex/gpt-6.1-sol
|
Updated in d9762f0 at @dr-bonez’s direction: the generated-artifact profile now explicitly uses opt-level 1; its regression assertion and documentation match. Ordinary development/test/release profiles remain unchanged. This is a substantive change from the level-3 profile covered by the previous approval, so fresh cross-review is requested. The completed same-head Rust 1.97.1 experiment passed real generators and backend/exver/worker/WRT suites at levels 1 and 3. Generator outputs matched byte-for-byte; combined generator compile time fell from 17m47s to 10m32s. All five focused generator/profile/orchestration regressions and scoped formatting pass on the updated head. Fresh hosted CI is pending. Level 2 is stopped and will not be restarted. The brief records the measurements, binary sizes, and limitations. |
helix-white
left a comment
There was a problem hiding this comment.
Approved at d9762f0. It merges cleanly with origin/master (merge-tree exits 0). This verdict comes from reading the code; hosted CI for this head was still running and I did not wait for it.
Since my approval at 804ea80, the only functional change is opt-level = 1 in [profile.generated]. The other edits are the matching test assertion and titles and the start-core AGENTS.md sentence.
- Scope of the lower level: only
--profile generateduses it, and onlybuild-manpage.shandbuild-ts.shdefault to it.[profile.dev]and[profile.test]stay at level 3, and release is untouched, so nothing shipped is built at level 1.PROFILE=debug,devandreleasestill select their existing profiles. - Generated output and stack limits: level 1 only changes how the generators are compiled, and the freshness checks still compare what they produce against the committed files. A generator that overflows its stack at this level would fail the job rather than pass silently, and this head's Generated Artifacts run exercises that.
- Root
AGENTS.md: the rule to preserve level 3 in development and test profiles stays accurate, becausegeneratedis neither. It requires binary-size and stack-overflow verification before lowering optimization, and the PR description records those measurements. I read that evidence but did not reproduce it. - Leftover wording: the
AGENTS.mdsentence now says level 1, and no stale level-3 description of this profile remains in the changed files.
The findings from my earlier review of the scripts, the make -k graph and the tests still apply, because those files are unchanged apart from the test assertion and titles above.
Helix-Harness: claude-code
Helix-Model: claude-opus-5-5
Helix-Identity: helix-b
|
The level-1 update has fresh cross-review approval at d9762f0 and is mergeable. The brief records the completed level-1/3 measurements and has been handed back to @dr-bonez. Current-head hosted CI, including Generated Artifacts, automated tests, formatting/lockfiles, and the product/architecture builds, is still running. Level 2 remains stopped. |
|
Retiring the marked review from @helix-b (#4597 (review)). Dismissed by Helix: the changes require a substantive PR brief update. d9762f0 adds opt-level = 1 to [profile.generated], changing the default compile level of the man-page and TypeScript generators from the inherited level 3 to level 1. The brief seen at review said the PR reduces overhead 'without lowering optimization' and that the generators use a profile 'inheriting level-3 development settings'; both facts are now false and must be rewritten, along with the rationale and evidence for the lower level. The review also explicitly relied on the profile staying at level 3. The remaining implementation (shared helper, single make -k graph, test.only fix) and the dev/test/release profiles are unchanged. |
Helix-Harness: pi Helix-Model: openai-codex/gpt-6.1-sol
|
Restored all five original Makefile comments and the man-page exporter note in 066294c. Their removal was unrelated cleanup and is no longer part of this PR. Verified both files have identical non-comment content to the approved level-1 head; Bash syntax and diff whitespace checks pass. This is comment-only and preserves the existing cross-review approval. |
|
Checked the current head 066294c: Conflict Markers and metadata checks passed, but the full CI run has not finished. Formatting/changelog checks are running, and the automated-test, generated-artifact, and product build work remains pending. No failures are currently reported; waiting for the native CI results before claiming the final head passes or quoting its timing. |
|
Thanks for the approval. GitHub now reports this PR merged. The final head restores the original comments and uses level 1 only for the generators; production profiles remain unchanged. Hosted compilation/tests and the final generator timing were still pending at my latest inspection, so the completed local level-1/3 comparison remains the speed evidence for now. |
Cross-review approved the level-1 generator profile; fresh hosted CI is still pending. The preceding level-3 variant passed every hosted check; its Generated Artifacts job took 56m02s versus the earlier ten-run median of 77m24s. That historical improvement is not the new level-1 head's CI result.
Core man-page and TypeScript generators now default to level-1 optimization without debug information. Other development settings, including incremental compilation, debug assertions, and dependency overrides, are inherited. Explicit debug/development/release overrides remain available. The ordinary development, test, release, and shipped product profiles are unchanged.
CI runs the existing man-page, TypeScript, and MCP freshness checks in one Make dependency graph, continuing independent checks after failure. Binding generation runs once rather than being invalidated when regenerated files dirty the checkout between separate Make invocations. Failed prerequisites still block their dependents, and failures still upload regenerated artifacts. Both scripts share their profile/architecture/feature setup through one sourced helper; generation commands and outputs remain distinct.
A separate test fix removes
test.onlyfrom the time parser, restoring nine suppressed cases, and corrects the day-case title. No tests or product/architecture checks were removed. Path gating, compiler caching, linker changes, and broader test-profile changes are outside this PR.Measured optimization choice: on the same head and pinned Rust 1.97.1 Linux/x86_64 builder, sequential runs with separate initially empty Cargo target directories produced these compilation times:
Combined generator compilation fell about 41%. Generated man pages, TypeScript, and MCP outputs matched HEAD byte-for-byte. At both levels, 1,239 backend, 33 exver, three conversion-worker, 806 WRT, and 21 uciedit cases passed, with the existing ignored/export filters retained and no observed stack overflow. The test experiments temporarily varied development/test optimization; this PR does not adopt those broader changes. Local comparisons used the same empty environment-feature set at both levels; fresh CI covers the normal dev/unstable configuration. Level 2 was stopped at the maintainer's request and is not evidence for this choice.
The TS generator executable shrank from about 188 to 158 MiB; the man-page test executable grew from about 173 to 179 MiB. Backend/WRT test executables remained within roughly 1.8–2.0 GiB, including full debug data in those test experiments. These are measured builds and unit paths, not a guarantee about every deployed daemon startup/shutdown path. Production profiles are deliberately unchanged. The existing WRT level-0 binding profile is not reused: this choice uses the verified level-1 setting instead. The new profile also uses its own Cargo target subdirectory, requiring a first build rather than reusing development artifacts.
Implementation diff: +46 / −80 lines in 6 files (excludes lockfiles, tests, docs, release notes, and changelog).
Current-head verification: all five generator/profile/orchestration regression cases and scoped Prettier/Taplo checks pass. The fixtures execute the production scripts, compile a small crate with the actual level-1 profile, and run the workflow's Make command for clean output, simultaneous drift, and generator failure. They require Cargo, Make, and rsync alongside root npm dependencies. The preceding head's 61 action/CI cases, ten parser cases, Docker-mocked builder selection, retarget guard, Bash syntax, and complete hosted product matrix passed and remain relevant to unchanged paths. No VM was used. Full hosted generation/freshness and timings for this head remain pending.
Related: #4596 independently enables existing runner disk cleanup before automated tests; it may affect test-job timing but does not replace these generator changes.
Helix-Harness: pi
Helix-Model: openai-codex/gpt-6.1-sol