Skip to content

Add optimized CI workflow with generated-artifact freshness checks#393

Merged
KillariDev merged 5 commits into
mainfrom
t3code/a5b527db
Jun 24, 2026
Merged

Add optimized CI workflow with generated-artifact freshness checks#393
KillariDev merged 5 commits into
mainfrom
t3code/a5b527db

Conversation

@KillariDev

Copy link
Copy Markdown
Collaborator

Summary

  • Added new check:generated-artifacts workflow and helper script at scripts/check-generated-artifacts.mts to validate generated outputs exist, are readable, and enforce untracked artifact policy.
  • Added ci:optimized pipeline in scripts/ci-optimized.mts to run generation, formatting, typecheck, production build/deployment check, parallelized tests/check/knip/audit, and worktree cleanliness checks.
  • Split testing scripts and CI helpers in 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.
  • Updated production build test (ui/build/productionBuild.test.ts) to optionally reuse an existing production build via ZOLTAR_USE_EXISTING_PRODUCTION_BUILD=1, reducing repeated build cost.
  • Parallelized bootstrap in simulation environment test (ui/ts/tests/activeEnvironment.test.ts) to reduce test runtime.

Testing

  • Not run (PR content generation only; no commands executed).
  • Concrete checks to run before merge:
    • bun run ci:optimized
    • bun run check:generated-artifacts
    • bun run test
    • bun run format && bun run check

- 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.
@KillariDev

Copy link
Copy Markdown
Collaborator Author

/review

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread .github/workflows/ci.yml
@@ -82,17 +77,151 @@ jobs:
exit 1
fi

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@KillariDev KillariDev merged commit 4ac85c6 into main Jun 24, 2026
2 checks passed
@KillariDev KillariDev deleted the t3code/a5b527db branch June 24, 2026 05:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant