Repository navigation
Conversation
Group restart and group start built from the first node that builds anything locally, then told every later step the images were built. Nodes of one group may build different services from local sources, one Drive and another rs-dapi, so the second node's image was never built and the group failed to start after it had been stopped. The build compose files tag their output with fixed local tags (drive:local, rs-dapi:local, dashmate-helper:local, base:local), so a group on one host shares one image per service; a node's configured image only seeds the build cache. Both commands now build for every node that builds an image no earlier node builds, so a development group that copies one config to every node still builds once, and refuse, before anything is built or stopped, two nodes that build the same image with different settings. Moved out of #4283, where it was written test-first and reviewed. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the
|
|
@coderabbitai review |
|
|
✅ Final review complete — no blockers (commit ad6e1b3) · triage: low |
thepastaclaw
left a comment
There was a problem hiding this comment.
Final validation — Phase 1 + Phase 2
The group-level selector correctly coordinates distinct service builds and rejects conflicting settings before stopping nodes. However, it filters candidates through isServiceBuildRequired, which omits base-image builds, so a node configured only to build the base image is silently skipped by both group start and restart. The selector also introduces an order-sensitive settings comparison and leaves its new preflight error outside restart's existing one-line error wrapper.
🔴 1 blocking | 🟡 1 suggestion(s) | 💬 1 nitpick(s)
Review provenance
Source: reviewer 1: muse-spark-1.3-contributor (agent: phase1-reviewer, role: general); reviewer 2: gpt-6.1-sol (agent: phase2-reviewer, role: general); reviewer 3: gpt-6.1-sol (agent: phase2-reviewer, role: architecture-layering); final verifier: gpt-6.1-sol (agent: sol-verifier, role: final-verifier)
- Triage:
normalbygpt-6.1-sol(effort low) — This is a contained but nontrivial change to dashmate group image-build orchestration with conflict detection and coordinated restart/start behavior, so correctness requires more than a straightforward low-effort review but it does not affect a critical surface. - Phase 1 reviewers:
muse-spark-1.3-contributor— general (completed, effort xhigh); agentphase1-reviewer - Phase 1 model:
muse-spark-1.3-contributor— not quota-gated; passed overgemini-3.8-flash-high(antigravity quota lookup failed),glm-5.3-flash(not used above high effort; tier asks max) - Fresh verifier:
gpt-6.1-sol— final-verifier; agentsol-verifier - Phase 2 reviewers:
gpt-6.1-sol— general (completed, effort high); agentphase2-reviewer,gpt-6.1-sol— architecture-layering (completed, effort high); agentphase2-reviewer
🤖 Prompt for all review comments with AI agents
These findings are from an automated code review. Verify each finding against the current code and only fix it if needed.
In `packages/dashmate/src/util/selectGroupBuildConfigs.js`:
- [BLOCKING] packages/dashmate/src/util/selectGroupBuildConfigs.js:48: Include base-only builds in the selected group configurations
`isServiceBuildRequired` checks only the Dashmate helper, Drive, and rs-dapi build flags; it does not check `docker.baseImage.build.enabled`. As a result, a node whose only local build is the base image is removed before `LOCAL_IMAGES` is examined, so both group start and group restart skip the configured base build. This also omits base-only nodes from conflict detection when another node builds a service. Base-image builds are explicitly supported by `buildServicesTaskFactory` and documented as running before the other images, so the candidate filter must include them.
- [SUGGESTION] packages/dashmate/src/util/selectGroupBuildConfigs.js:54-59: Compare build settings without depending on object key order
The selector stores each build subtree as `JSON.stringify(...)` and compares the resulting strings. JSON serialization preserves insertion order, so semantically identical settings can compare differently when object keys—particularly build arguments—were inserted in a different order in two node configurations. The fail-closed result is an unnecessary refusal to start or restart an otherwise valid group. Use the repository's deep equality helper (`lodash.isEqual`, already used by the config layer) to compare the retrieved settings structurally while continuing to treat configured image names as irrelevant.
In `packages/dashmate/src/commands/group/restart.js`:
- [NITPICK] packages/dashmate/src/commands/group/restart.js:42: Wrap group-build conflict errors consistently with other restart failures
`selectGroupBuildConfigs` is called before the `try` block, so a newly detected build conflict escapes as a raw Error. Pull, build, stop, and start failures are all passed through `MuteOneLineError`, and the conflict is part of the same restart preflight path. Moving the selector call into the existing `try` would preserve the fail-before-stop behavior while keeping CLI error formatting consistent.
…onflicts like other restart failures Build settings were compared as JSON strings, so the same build arguments stored in a different key order looked like a conflict and refused a valid group. They are now compared with lodash.isEqual. A build conflict found by group restart is reported through MuteOneLineError, like every other restart failure. Test would have caught this: the key-order selection test and the conflict restart test fail before the fix and pass after it. Co-Authored-By: Claude Opus 5.5 <[email protected]>
The base-only build blocker is answered in its thread: base:local is used by no service, only by the same node service builds, so a node that builds no service has nothing to build it for. This matches isServiceBuildRequired upstream. Both suggestions are fixed in 8c0fa6d.
thepastaclaw
left a comment
There was a problem hiding this comment.
Re-review — Final validation — Phase 1 + Phase 2
The selector still omits configurations whose only local build is the shared base image, so a base-only node cannot prepare base:local for service builds from another node. The group build tasks also preserve configuration order, allowing a dependent service image to build before a later configuration builds base:local; both issues can leave group start or restart using a missing or stale image.
🔴 2 blocking
1 carried-forward finding(s) already raised on this PR; not re-posting as new inline comments.
Review provenance
Source: reviewer 1: muse-spark-1.3-contributor (agent: phase1-reviewer, role: general); reviewer 2: gpt-6.1-sol (agent: phase2-reviewer, role: general); reviewer 3: gpt-6.1-sol (agent: phase2-reviewer, role: architecture-layering); reviewer 4: gpt-6.1-sol (agent: phase2-reviewer, role: general); reviewer 5: gpt-6.1-sol (agent: phase2-reviewer, role: architecture-layering); final verifier: gpt-6.1-sol (agent: sol-verifier, role: final-verifier)
- Triage:
normalbygpt-6.1-sol(effort low) — This is a contained but meaningful dashmate orchestration change affecting image-build selection, startup ordering, conflict detection, and multiple command paths, though it does not modify a critical surface. - Phase 1 reviewers:
muse-spark-1.3-contributor— general (completed, effort xhigh); agentphase1-reviewer - Phase 1 model:
muse-spark-1.3-contributor— not quota-gated; passed overgemini-3.8-flash-high(antigravity quota lookup failed),glm-5.3-flash(not used above high effort; tier asks max) - Fresh final gate: an independent Phase-2 review ran after iterative findings were reconciled
- Fresh verifier:
gpt-6.1-sol— final-verifier; agentsol-verifier - Phase 2 reviewers:
gpt-6.1-sol— general (completed, effort high); agentphase2-reviewer,gpt-6.1-sol— architecture-layering (completed, effort high); agentphase2-reviewer,gpt-6.1-sol— general (completed, effort high); agentphase2-reviewer,gpt-6.1-sol— architecture-layering (completed, effort high); agentphase2-reviewer
🤖 Prompt for all review comments with AI agents
These findings are from an automated code review. Verify each finding against the current code and only fix it if needed.
In `packages/dashmate/src/util/selectGroupBuildConfigs.js`:
- [BLOCKING] packages/dashmate/src/util/selectGroupBuildConfigs.js:70-79: Build the shared base image before dependent service images across group configurations
The returned configurations retain their original group order, and both callers execute the corresponding `buildServicesTask` instances sequentially. `buildServicesTask` builds the base image only immediately before the services of its own configuration, so a group ordered as `[service-only config, base-and-service config]` builds the first service image before `base:local` is produced by the later configuration. A custom service Dockerfile using the documented shared base-image mechanism can therefore fail or consume a stale base. Base-producing work must be scheduled as a group-level prerequisite before any dependent service build, or the selected configurations must be ordered accordingly.
- [BLOCKING] packages/dashmate/src/util/selectGroupBuildConfigs.js:49: Include base-only builds in the selected group configurations
(existing thread: https://github.com/dashpay/platform/pull/5656#discussion_r4412578853)
`buildConfigs` is filtered through `isServiceBuildRequired`, which excludes `docker.baseImage.build.enabled`. Because `base:local` is a fixed host-wide image and the documented base-image behavior is to build it before the remaining images, a group with one base-only configuration and another configuration that builds Drive or rs-dapi skips the base build entirely. The service build can then consume a missing or stale `base:local` image. Include base-enabled configurations in group selection, or represent the base image as an explicit prerequisite of the selected service builds.
| return buildConfigs.filter((config) => { | ||
| const images = LOCAL_IMAGES.filter((image) => image.isBuilt(config)).map(({ name }) => name); | ||
|
|
||
| if (images.every((name) => builtImages.has(name))) { | ||
| return false; | ||
| } | ||
|
|
||
| images.forEach((name) => builtImages.add(name)); | ||
|
|
||
| return true; |
There was a problem hiding this comment.
🔴 Blocking: Build the shared base image before dependent service images across group configurations
The returned configurations retain their original group order, and both callers execute the corresponding buildServicesTask instances sequentially. buildServicesTask builds the base image only immediately before the services of its own configuration, so a group ordered as [service-only config, base-and-service config] builds the first service image before base:local is produced by the later configuration. A custom service Dockerfile using the documented shared base-image mechanism can therefore fail or consume a stale base. Base-producing work must be scheduled as a group-level prerequisite before any dependent service build, or the selected configurations must be ordered accordingly.
source: gpt-6.1-sol (phase2-reviewer: general, architecture-layering)
…ild-every-node Brings in v5.2-dev through the base pull request. Co-Authored-By: Claude Opus 5.5 <[email protected]>
thepastaclaw
left a comment
There was a problem hiding this comment.
Re-review — Final validation — Phase 1 + Phase 2
New on this head: This head merges the stacked base, picking up the --safe flag parser and per-node stop labels without changing how group start or restart selects local builds. Policy and title checks passed, CodeRabbit was skipped for the base branch, and the review check is pending. No Dashmate build, lint, or test result is listed for this head.
🟡 2 suggestion(s)
Approved: nothing here blocks the merge. The non-blocking findings are optional: fix them forward, in this PR or a follow-up, without waiting for another review round.
Still open from earlier rounds (2)
- 🟡 Suggestion: Build the shared base image before dependent service images across group configurations —
packages/dashmate/src/util/selectGroupBuildConfigs.js:70-80(thread) - 🟡 Suggestion: Include base-only builds in the selected group configurations —
packages/dashmate/src/util/selectGroupBuildConfigs.js:48-49(thread)
Review provenance
Source: reviewer 1: glm-5.3-flash (agent: phase1-reviewer, role: general); reviewer 2: gpt-6.2-sol (agent: phase2-reviewer, role: general); reviewer 3: gpt-6.2-sol (agent: phase2-reviewer, role: architecture-layering); final verifier: gpt-6.2-sol (agent: sol-verifier, role: final-verifier)
- Triage:
lowbygpt-6.2-sol(effort low) — The change is confined to Dashmate’s group build orchestration, with one shared helper and focused tests for build selection, conflicts, and ordering. - Phase 1 reviewers:
glm-5.3-flash— general (completed, effort high); agentphase1-reviewer - Phase 1 model:
glm-5.3-flash— zai quota: 5h 99% left, weekly 31% left; passed overgemini-3.8-flash-high(lane failed) - Fresh verifier:
gpt-6.2-sol— final-verifier; agentsol-verifier - Phase 2 reviewers:
gpt-6.2-sol— general (completed, effort medium); agentphase2-reviewer,gpt-6.2-sol— architecture-layering (completed, effort medium); agentphase2-reviewer
🤖 Prompt for all review comments with AI agents
These findings are from an automated code review (PastaClaw). How to work through them:
- Verify each finding against the code; fix only what is real, as narrowly as the finding.
- If a finding is wrong, decline it on its thread in one or two sentences; the bot answers once and stops.
- To defer one, link a tracking issue on its thread (or reply asking the bot to file one).
- Suggestions don't block the merge, but most are worth fixing in this PR; judge each on its merits.
- Keep the PR's scope; don't grow it to satisfy hardening suggestions.
- Carried items were raised in an earlier round: read the thread first, and don't re-fix what you already fixed, declined or deferred there. Disputed and deferred items are already handled and are not listed.
In `packages/dashmate/src/util/selectGroupBuildConfigs.js`:
- [SUGGESTION] packages/dashmate/src/util/selectGroupBuildConfigs.js:70-80: Build the shared base image before dependent service images across group configurations
(carried; thread: https://github.com/dashpay/platform/pull/5656#discussion_r4424415017)
- [SUGGESTION] packages/dashmate/src/util/selectGroupBuildConfigs.js:48-49: Include base-only builds in the selected group configurations
(carried; thread: https://github.com/dashpay/platform/pull/5656#discussion_r4412578853)
Issue being fixed or feature implemented
Stacked on #4283 (base
fix/dashmate/update-path-bugs): it changes the pre-stop build that #4283 adds togroup restart. Retarget it tov5.1-devonce #4283 merges.group restartandgroup startbuild local images from the first node that builds anything, and then tell every later step the images are built. Nodes of one group can build different services from local sources, for example one Drive and another rs-dapi. The second node's image was then never built, and the group failed to start after it had been stopped. Group start had this limitation before #4283.Split out of #4283, where review raised it.
What was done?
The build compose files tag their output with fixed local tags (
drive:local,rs-dapi:local,dashmate-helper:local,base:local), so a group on one host shares one image per service. A node's configured image only seeds the build cache.A new
selectGroupBuildConfigs, used by both commands:How Has This Been Tested?
selectGroupBuildConfigs.spec.js: shared builds, different services, covered images, different configured images, conflicting service and base builds, released images only.restart.spec.jsandstartGroupNodesTaskFactory.spec.js: two different builds run before any node stops; a shared build runs once; a conflict stops nothing.Breaking Changes
None. A group whose nodes build the same image differently now fails before anything is stopped, instead of starting some node on an image built for another.
Checklist:
For repository code-owners and collaborators only
🤖 Generated with Claude Code