fix: unblock develop CI — plugin TS patches, agent-skills build, buf.gen guard#1774
fix: unblock develop CI — plugin TS patches, agent-skills build, buf.gen guard#1774dutchiono wants to merge 8 commits intomilady-ai:developfrom
Conversation
bun.lock was corrupted by a bot commit on April 8 (duplicate package keys) causing every CI job to fail with "lockfile had changes, but lockfile is frozen". Regenerated with bun 1.3.11 + MILADY_SKIP_LOCAL_UPSTREAMS=1 to match CI env. Windows CI was only initializing plugin-agent-orchestrator before bun install, leaving all other workspace:* plugin submodules missing. Changed all four affected workflows to use node scripts/init-submodules.mjs on all platforms — the script already handles the Windows-incompatible plugin-openrouter via its SKIP_SUBMODULES list. Affected workflows: test.yml, task-agent-cross-platform-review.yml, windows-desktop-preload-smoke.yml, windows-dev-smoke.yml Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Three workspace plugin submodules (plugin-anthropic, plugin-google-genai, plugin-personality) have TypeScript errors due to @elizaos/core API changes (EventPayloadMap, useModel overloads, z.record signature, MetadataValue). Upstream PRs are open but not yet merged. Add scripts/patch-workspace-plugins.mjs: applies idempotent git patches from scripts/workspace-plugin-patches/ to plugin submodules after checkout, so CI sees the fixed source without waiting for upstream merges. Add plugin-agent-skills to ensure-bundled-workspaces.mjs: its dist/index.js was never built in CI, causing ERR_MODULE_NOT_FOUND at runtime. Mirrors the existing plugin-agent-orchestrator build step. Guard buf.gen.yaml generation in test.yml with -f check to prevent failure on stale runners where eliza/ dir exists but schemas aren't populated. Remove dangling plugins/plugin-groq gitlink (no .gitmodules entry, no package.json reference) that caused 'No url found for submodule path' warnings in git submodule foreach cleanup steps. Regenerate bun.lock (removes stale nested @miladyai/app-core/@miladyai/plugin-wechat entry deduped to root level by bun 1.3.11). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
I was unable to post the approval to GitHub (write operations require user approval). Here is the full review verdict: Agent Review — PR #17741. Classification (derived): workflow/CI + build infrastructure (bugfix) — consistent with author's claim. The diff is purely scripts, workflows, lock file, and git plumbing. No runtime, UI, or connector code touched. 2. Rubric (derived): CI workflow correctness (matrix coverage, Windows safety after submodule consolidation), postinstall script soundness (ordering, idempotency, failure modes), and lock file hygiene. 3. Scope verdict: in scope 4. Universal invariants: all intact — 5. Judgment:
6. PR-type-specific checks:
7. Security: clear. No credentials, no external network calls, no auth changes, no access control files touched. 8. Decision: APPROVE Five independent changes, each clearly motivated and correctly implemented. The Windows submodule consolidation is safe given the existing |
…atch Update steward-fi and test/contracts/lib/openzeppelin-contracts submodule pointers from unreachable SHAs (c0883fd, 99a8f42) to the current HEAD of their respective develop/v4.8.0 branches. Extend plugin-google-genai compatibility patch to also cover utils/events.ts: the same MODEL_USED emitEvent EventPayloadMap cast needed in plugin-anthropic also exists here and was missed in the initial patch. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
The review is complete. Here's the summary for the record (pending tool approval to post): 1. Classification (derived): workflow/CI + build infrastructure — consistent with author's claim. 2. Rubric (derived): CI reliability, postinstall pipeline ordering, patch system idempotency, and whether submodule pointer changes are intentional and safe. 3. Scope verdict: in scope 4. Universal invariants: all intact 5. Judgment:
6. PR-type checks: All CI/workflow items OK; submodule bumps flagged. 7. Security: The undocumented 8. Decision: REQUEST CHANGES Single required change: explain or revert the two unrelated submodule pointer bumps. Everything else — buf.gen guard, plugin-agent-skills build, Windows unification, groq cleanup, patch runner — is correct and approvable. |
…m fixes The previous patch only covered utils/events.ts (EventPayload cast) but omitted the index.ts changes: ModelType enum usage in useModel calls, null-check for image description result, and Record cast for object generation. This patch combines both fixes. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Without this, setup-upstreams.mjs attempts to build local eliza packages in fork PR CI, triggering TS2209 rootDir ambiguity errors. ci.yml already has this env var set; ci-fork.yml was missing it. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
I need approval to post to GitHub. Here is my complete review: Code Review — PR #17741. Classification (derived): 2. Rubric (derived): Verify workflow changes are correct across all platforms; verify 3. Scope verdict: in scope 4. Universal invariants: all intact — this PR doesn't touch 5. Judgment:
6. PR-type-specific checks:
7. Security: clear. 8. Decision: REQUEST CHANGES Required before merge:
Optional (not blocking):
|
The repoSetupSteps test had a hardcoded list that didn't include the newly added patch-workspace-plugins.mjs step. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
The tool requires explicit approval to post to GitHub. Here is my complete review to post: 1. Classification (derived): 2. Rubric (derived): Verify each claimed fix, confirm postinstall ordering is safe, check Windows submodule consolidation for regressions, inspect patch shell-invocation for injection risk, confirm no invariant sites touched. 3. Scope verdict: in scope 4. Universal invariants: all intact — NODE_PATH, patch-deps.mjs, Electrobun guards, namespace, ports, StartupPhase, VrmViewer, RPC schema, access control files all untouched. 5. Judgment:
6. PR-type-specific checks:
7. Security: clear. 8. Decision: APPROVE The four primary CI fixes are correct and verifiable. The Windows consolidation is imprecise ( |
|
The review is complete. Here is my full verdict: PR #1774 Review — fix: unblock develop CI 1. Classification (derived): workflow/CI + build — consistent with author's claim. 2. Rubric (derived): CI workflow correctness (platform matrix integrity, buf.gen guard), postinstall script safety and ordering, lockfile delta, Windows branch removal soundness. 3. Scope verdict: in scope 4. Universal invariants: all intact — NODE_PATH (3 sites), patch-deps.mjs, electrobun try/catch guards, namespace, ports all untouched by this PR. 5. Judgment:
6. PR-type-specific checks:
7. Security: clear. No credential exposure, no outbound HTTP, 8. Decision: APPROVE The CI fixes are correct, well-structured, and tested. One pre-merge action: confirm whether the
|
|
The PR #1774 Review —
Required before merge:
The CI infrastructure changes (buf guard, Windows consolidation, patch mechanism, groq cleanup, bun.lock dedup) are clean and correct. The |
|
Now I have everything I need to write the review. Let me compose it.
Review: PR #1774 — fix: unblock develop CI — plugin TS patches, agent-skills build, buf.gen guard1. Classification (derived): Mixed — 2. Rubric (derived): CI workflow correctness (action safety, runner state), build infrastructure soundness (plugin patch idempotency, ensure-bundled-workspaces ordering), new feature security and logic (Hyperscape HTTP fetch, SSRF, controls logic), cross-cutting behavior changes (import priority, resolveLaunchSession null semantics), and Biome compliance — then trust-calibrated line-by-line on the new 286-line module. 3. Scope verdict: Needs deep review — Hyperscape route module is a new feature bundled with CI fixes; import priority inversion affects all app route resolution; probationary contributor. 4. Universal invariants: All intact
5. Judgment:
6. PR-type-specific checks:
7. Security: Partial concern. No credential exposure, no new hardcoded secrets, no postinstall script injection vectors. The patch files are checked-in git format patches with known content — not dynamic. 8. Decision: REQUEST CHANGES Required before merge:
@greptileai please perform a deep review — this PR was flagged as needing deep analysis by agent-review. |
Greptile SummaryThis PR consolidates three CI-unblocking fix branches (#1770, #1772, #1774) into a single recovery branch for Key changes:
Greptile verdict: APPROVE Confidence Score: 4/5Safe to merge after the loose-equality fix on the resolveLaunchSession null guard; all other findings are non-blocking P2s. The core CI-unblocking mechanisms (buf.gen.yaml guard, patch-workspace-plugins, plugin-agent-skills build, gitlink removal, bun.lock fix) are all correct. The resolveLaunchSession await bug fix is a genuine regression fix. The one concrete code concern is the strict !== null guard at app-manager.ts:1353 which allows undefined to propagate; it's a one-character fix. The exec shell-quoting and lookup-order comment issues are P2 style concerns. No invariants are violated. packages/agent/src/services/app-manager.ts — the session !== null guard; scripts/patch-workspace-plugins.mjs — exec shell quoting Important Files Changed
Sequence DiagramsequenceDiagram
participant CI as GitHub Actions
participant RS as run-repo-setup.mjs
participant IS as init-submodules.mjs
participant PW as patch-workspace-plugins.mjs
participant PD as patch-deps.mjs
participant SU as setup-upstreams.mjs
participant EB as ensure-bundled-workspaces.mjs
CI->>RS: bun run postinstall
RS->>IS: node init-submodules.mjs
IS-->>RS: submodules checked out
RS->>PW: node patch-workspace-plugins.mjs
PW->>PW: git apply --check --reverse (idempotency)
PW->>PW: git apply patch (plugin-anthropic, google-genai, personality)
PW-->>RS: patches applied / skipped / failed exit(1)
RS->>PD: node patch-deps.mjs
PD-->>RS: broken bun exports patched
RS->>SU: node setup-upstreams.mjs
SU-->>RS: local @elizaos/* linked (skipped if MILADY_SKIP_LOCAL_UPSTREAMS=1)
RS->>EB: node ensure-bundled-workspaces.mjs
EB->>EB: build plugin-agent-skills, plugin-anthropic, ... (if dist missing)
EB-->>RS: workspace builds complete
RS-->>CI: postinstall done
|
| encoding: "utf8", | ||
| stdio: ["ignore", "pipe", "pipe"], | ||
| }); | ||
| } | ||
|
|
||
| function applyPatch(patchPath, pluginDir) { | ||
| const patchName = patchPath.split(/[\\/]/).pop(); | ||
|
|
There was a problem hiding this comment.
Shell string quoting instead of args array
execSync receives a shell string with "${patchPath}" interpolated. This works for common paths but breaks silently on paths that contain single quotes, shell metacharacters, or — on some Windows configurations — embedded double quotes. execFileSync with a proper args array avoids the shell entirely and handles all path characters correctly.
| encoding: "utf8", | |
| stdio: ["ignore", "pipe", "pipe"], | |
| }); | |
| } | |
| function applyPatch(patchPath, pluginDir) { | |
| const patchName = patchPath.split(/[\\/]/).pop(); | |
| function exec(cmd, args, cwd) { | |
| return execFileSync(cmd, args, { | |
| cwd, | |
| encoding: "utf8", | |
| stdio: ["ignore", "pipe", "pipe"], | |
| }); | |
| } |
Then update each call site:
exec("git", ["apply", "--check", "--reverse", patchPath], pluginDir);
exec("git", ["apply", "--check", patchPath], pluginDir);
exec("git", ["apply", patchPath], pluginDir);Also add execFileSync to the import at the top of the file alongside execSync:
import { execFileSync } from "node:child_process";| @@ -470,6 +478,14 @@ export async function importAppRouteModule( | |||
| ); | |||
| } | |||
|
|
|||
| const builtInModule = await importBuiltInAppRouteModule( | |||
| appIdentifier, | |||
| packageName, | |||
| ); | |||
| if (builtInModule) { | |||
| return builtInModule; | |||
There was a problem hiding this comment.
Lookup order reversal is undocumented
The built-in route module check moved from before the local module lookup to after it. This inverts the previous priority: a locally installed @hyperscape/plugin-hyperscape (or any other app with a built-in route) now shadows the built-in implementation. That's probably correct for legitimate use (user override wins), but the reasoning isn't captured in a comment, and this is a behaviour change that's easy to miss in a future refactor.
Consider adding a comment explaining why local takes priority:
| // Local (user-installed) module takes priority over built-ins, allowing | |
| // per-instance overrides. If no local module is found, fall back to the | |
| // built-in route implementations bundled with the agent. | |
| try { | |
| const localModule = await importLocalAppRouteModule(appIdentifier); | |
| if (localModule) { | |
| return localModule; | |
| } | |
| } catch (localErr) { | |
| logger.warn( | |
| `[app-route-modules] Failed to import local module for ${label}: ${localErr instanceof Error ? localErr.message : String(localErr)}`, | |
| ); | |
| } | |
| const builtInModule = await importBuiltInAppRouteModule( | |
| appIdentifier, | |
| packageName, | |
| ); | |
| if (builtInModule) { | |
| return builtInModule; | |
| } |
c55aa43 to
014ddcc
Compare
|
Cleaned this branch back to the intended CI-unblock surface and force-pushed it. The current synchronize run is on head \ |
|
Now I have everything I need for the review.
|
Summary
This PR is the single recovery branch for the current
developCI unblock work. It supersedes#1770and#1772.Scope kept in this cleaned branch:
plugin-anthropic,plugin-google-genai, andplugin-personalityafter submodule checkout viascripts/patch-workspace-plugins.mjsplugin-agent-skillsduring repo setup soworkspace:*consumers have a bundleddist/index.jsin CIbuf.gen.yamlgeneration intest.ymlso stale runners do not fail protobuf generation when schemas are absentMILADY_SKIP_LOCAL_UPSTREAMSplugins/plugin-groqgitlinksteward-fiandtest/contracts/lib/openzeppelin-contractssubmodule repairs because the olddevelopSHAs are not fetchable from GitHubbun.lockthat matches these manifests under frozen installIntentionally removed from this PR during cleanup:
plugin-agent-skills,plugin-google-genai, andplugin-personalityPlugin compatibility in this PR is carried by the patch files under
scripts/workspace-plugin-patches/, not by advancing plugin submodules to unpublished SHAs.Consolidation
This PR now carries the recovery work that had been split across:
#1770fix: harden Windows repo setup#1772fix: repair unreachable submodule refs#1774fix: unblock develop CI — plugin TS patches, agent-skills build, buf.gen guardReview
#1774only.Validation
bun install --frozen-lockfile --ignore-scriptsbunx vitest run scripts/patch-workspace-plugins.test.ts scripts/run-repo-setup.test.ts scripts/setup-upstreams.test.ts scripts/init-submodules.test.ts packages/app-core/src/runtime/init-submodules-script.test.tsbun run typecheckbun run checkstill hits the pre-existing Biome docs-ignore issue underapps/web/src/docs/content/**#1774