fix: resolve all 4 CI job failures on main#106
Conversation
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>
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
| "@regen/core": "*", | ||
| "@regen/plugin-ledger-mcp": "*", | ||
| "@regen/plugin-koi-mcp": "*" |
There was a problem hiding this comment.
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.
| "@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": "*" |
There was a problem hiding this comment.
| "types": "./src/index.ts", | ||
| "dependencies": { | ||
| "@regen/core": "workspace:*" | ||
| "@regen/core": "*" |
There was a problem hiding this comment.
…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>
Summary
All 4 CI jobs currently fail on
main. This PR fixes them all in one shot so the full matrix goes green:redundant_closure,op_ref,manual_range_contains,unnecessary_map_or,too_many_argumentsacross 6 contractstoo_many_argumentsinto param structs; wire 3 orphaned contracts into workspaceworkspace:*protocol unsupported bynpm ciworkspace:*with*npm cifails — nopackage-lock.jsonin rootnpm cistep (verify scripts use onlynode:*built-ins)${{ }}substitutionprocess.envinsteadSupersedes #90, #91, #92 — each of those fixes one job but fails the others. This combines all three so CI actually goes green.
Test plan
contracts/cargo clippy --workspace -- -D warningspasses locallynode scripts/verify.mjspasses locally (verified ✅)node scripts/build-mechanism-index.mjs --checkpasses locally (verified ✅)🤖 Generated with Claude Code