Add optimized CI workflow with generated-artifact freshness checks#393
Conversation
- add scripts for generated-artifact checks and optimized CI orchestration - refresh package test/build scripts with shardable test commands and artifact-check aliases - skip redundant rebuilds in productionBuild test via ZOLTAR_USE_EXISTING_PRODUCTION_BUILD - parallelize simulation backend bootstrap in active environment test
- Add new `ci.yml` workflow that runs setup, formatting, typecheck, build, tests, checks, knip, and audits - Remove deprecated `ci-optimized.mts` script file - Drop `ci:optimized` npm script from `package.json`
- Update AGENTS validation section with explicit full-test fallback when tsc already passed, and branch-gate procedure that checks `origin/main` before merging. - Clarify artifact freshness policy source-of-truth and add a root `ci.yml` activation note for branch-restricted workflow copying.
|
/review |
There was a problem hiding this comment.
CI Agent Review
The only finding across all agents is an architectural concern from the Architect agent: the CI workflow replaces discrete, named GitHub Actions steps with a single monolithic bash step containing ~80 lines of inline process orchestration code (PID tracking, process group management via setsid, graceful-then-forceful termination). This bypasses the codebase's established pattern of placing CI logic in lintable, type-checkable, testable scripts under scripts/. The Security, Bug Hunter, and Defender agents found no security vulnerabilities, runtime bugs, or sabotage concerns.
| @@ -82,17 +77,151 @@ jobs: | |||
| exit 1 | |||
| fi | |||
|
|
|||
There was a problem hiding this comment.
Architectural concern: This single step embeds approximately 80 lines of bash process management code (start_task, remove_pid, terminate_remaining, wait_for_tasks) inline in the YAML workflow. The codebase has an established pattern of placing CI-related logic in scripts/ as TypeScript files (e.g., check-generated-artifacts.mts, check-mainnet-deployment.mts) that are linted by Biome, type-checked by tsc:scripts, and testable. The inline bash orchestrator cannot be linted, type-checked, or tested by any existing project tooling.
Additionally, this loses GitHub Actions step-level visibility: the old workflow had individually named steps (Tests, Biome and Solidity checks, Dead code analysis, Dependency audit) whose pass/fail status was visible directly in the UI. With the combined step, all sub-task output is interleaved and developers must parse logs to identify which sub-task failed.
Recommendation: extract the orchestration logic into a script under scripts/ to restore testability, lintability, and reusability while preserving the parallelism benefit.
Summary
check:generated-artifactsworkflow and helper script atscripts/check-generated-artifacts.mtsto validate generated outputs exist, are readable, and enforce untracked artifact policy.ci:optimizedpipeline inscripts/ci-optimized.mtsto run generation, formatting, typecheck, production build/deployment check, parallelized tests/check/knip/audit, and worktree cleanliness checks.package.json(test:run,test:run:shard,check:mainnet-deployment:generated,check:mainnet-deployment:current,ci:optimized,ui:build:prod:optimized) to support optimized CI execution.ui/build/productionBuild.test.ts) to optionally reuse an existing production build viaZOLTAR_USE_EXISTING_PRODUCTION_BUILD=1, reducing repeated build cost.ui/ts/tests/activeEnvironment.test.ts) to reduce test runtime.Testing
bun run ci:optimizedbun run check:generated-artifactsbun run testbun run format && bun run check