Skip to content

fix: resolve all 4 CI job failures on main#106

Merged
glandua merged 3 commits into
regen-network:mainfrom
brawlaphant:fix/ci-green-all-jobs
Apr 25, 2026
Merged

fix: resolve all 4 CI job failures on main#106
glandua merged 3 commits into
regen-network:mainfrom
brawlaphant:fix/ci-green-all-jobs

Conversation

@brawlaphant

Copy link
Copy Markdown
Contributor

Summary

All 4 CI jobs currently fail on main. This PR fixes them all in one shot so the full matrix goes green:

Job Root Cause Fix
Contracts (Rust) Clippy errors: redundant_closure, op_ref, manual_range_contains, unnecessary_map_or, too_many_arguments across 6 contracts Fix each lint; refactor too_many_arguments into param structs; wire 3 orphaned contracts into workspace
Agents (Node 20 & 22) workspace:* protocol unsupported by npm ci Replace workspace:* with *
Verify Specs npm ci fails — no package-lock.json in root Remove unnecessary npm ci step (verify scripts use only node:* built-ins)
WASM Size Report Multi-line report breaks JS string literal via ${{ }} substitution Pass report through process.env instead

Supersedes #90, #91, #92 — each of those fixes one job but fails the others. This combines all three so CI actually goes green.

Test plan

  • All 4 CI jobs pass (Contracts, Agents Node 20, Agents Node 22, Verify Specs)
  • WASM Size Report runs correctly on PRs touching contracts/
  • cargo clippy --workspace -- -D warnings passes locally
  • node scripts/verify.mjs passes locally (verified ✅)
  • node scripts/build-mechanism-index.mjs --check passes locally (verified ✅)

🤖 Generated with Claude Code

Combines three independent fixes that each need the others to produce
a fully green CI run:

1. Contracts (Rust) — fix clippy errors across 6 contracts: replace
   redundant closures, op_ref on Uint128, manual_range_contains,
   unnecessary_map_or. Refactor too_many_arguments into param structs
   for credit-class-voting, contribution-rewards, service-escrow.
   Wire 3 orphaned contracts (reputation-signal, marketplace-curation,
   validator-governance) into the workspace so cargo clippy --workspace
   actually lints them.

2. Agents (Node) — replace workspace:* protocol with * in agent
   package.json files. npm ci on GitHub Actions doesn't support the
   workspace: protocol (pnpm-only feature).

3. Verify Specs — remove the npm ci step that fails because the root
   package.json has no lock file. The verify scripts only import
   built-in node:* modules, so no install is needed.

4. WASM Size Report — pass multi-line report through env var instead
   of inline ${{ }} substitution which breaks JS string literals.

Supersedes PRs regen-network#90, regen-network#91, regen-network#92 which each fix one job but fail the others.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
PRs opened from forks run with a read-only GITHUB_TOKEN (GitHub
security policy), so the Comment on PR step returns 403 and fails
the job. The WASM build itself already succeeded — the report is
informational only, not a merge gate.

With continue-on-error the comment attempts to post (works on
branches inside the base repo) but won't fail the check when it
can't (fork PRs). That lets fork PRs show a fully green CI run
instead of a red check for a non-blocking reason.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request updates package dependencies in the agents workspace and adds several new contract members to the main workspace. Across multiple contracts, it refactors execution functions to use parameter structs (e.g., UpdateConfigParams, RecordActivityParams) to address clippy lints regarding argument counts. Additionally, it simplifies Option mapping, updates comparison logic, and adopts range-based validation. I have no feedback to provide.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request updates dependency versioning in the agents packages from workspace:* to * and adds new contract members (dynamic-supply, fee-router, and reputation-signal) to the workspace. It also introduces parameter structs in several contracts—including contribution-rewards, credit-class-voting, reputation-signal, and service-escrow—to group arguments and avoid linting issues. Additionally, the code was refactored to use more idiomatic Rust patterns, such as is_none_or and range-based validation. The reviewer suggests pinning internal dependency versions in package.json files to specific ranges instead of using wildcards to improve build predictability.

Comment thread agents/packages/agents/package.json Outdated
Comment on lines +8 to +10
"@regen/core": "*",
"@regen/plugin-ledger-mcp": "*",
"@regen/plugin-koi-mcp": "*"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

Using "*" for dependency versions can introduce unexpected breaking changes from future updates. While this fixes the npm ci issue with the workspace:* protocol, it's safer to pin dependencies to a more specific version range for better stability and predictable builds. Consider using ^0.1.0 to allow non-breaking updates for these internal packages.

Suggested change
"@regen/core": "*",
"@regen/plugin-ledger-mcp": "*",
"@regen/plugin-koi-mcp": "*"
"@regen/core": "^0.1.0",
"@regen/plugin-ledger-mcp": "^0.1.0",
"@regen/plugin-koi-mcp": "^0.1.0"

"types": "./src/index.ts",
"dependencies": {
"@regen/core": "workspace:*"
"@regen/core": "*"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

Using "*" for the dependency version can introduce unexpected breaking changes. While this fixes the npm ci issue, it's safer to pin @regen/core to a more specific version range like ^0.1.0 for better stability and predictable builds.

Suggested change
"@regen/core": "*"
"@regen/core": "^0.1.0"

"types": "./src/index.ts",
"dependencies": {
"@regen/core": "workspace:*"
"@regen/core": "*"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

Using "*" for the dependency version can introduce unexpected breaking changes. While this fixes the npm ci issue, it's safer to pin @regen/core to a more specific version range like ^0.1.0 for better stability and predictable builds.

Suggested change
"@regen/core": "*"
"@regen/core": "^0.1.0"

…stalls

Replace "*" with "^0.1.0" for the three internal workspace deps. The
original workaround was just to escape the workspace:* protocol that
npm ci rejects, and "*" does that — but it also matches any future
version, so an accidental major bump inside the workspace would still
resolve. Pinning to ^0.1.0 keeps the workspace-resolution behavior
(all three packages are versioned 0.1.0, private:true) while giving
npm ci a stable range to lock against.

Addresses Gemini review on fix/ci-green-all-jobs:
  - agents/packages/agents/package.json:8-10
  - agents/packages/plugin-koi-mcp/package.json:9
  - agents/packages/plugin-ledger-mcp/package.json:9

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@glandua
glandua merged commit 2f5b6e0 into regen-network:main Apr 25, 2026
6 checks passed
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.

2 participants