Repository navigation
chore: merge v5.1-dev into v5.2-dev - #6323
Conversation
Co-authored-by: Claude Sonnet 5.5 <[email protected]>
…the deb (#6267) Co-authored-by: Claude Opus 5.5 <[email protected]>
Co-authored-by: Claude Opus 5.5 <[email protected]>
…6209) Co-authored-by: Claude Opus 5.5 <[email protected]>
Co-authored-by: Claude Opus 5.5 <[email protected]>
…doctor report (#6316) Co-authored-by: Claude Opus 5.5 <[email protected]>
Co-authored-by: Claude Opus 5.5 <[email protected]>
Brings v5.1-dev's 7 commits into v5.2-dev: #6315, #6316, #6289, #6209, #6210, #6267 and #6274. Conflicts, all in dashmate doctor, where #6316 (v5.1-dev) and #6317 (v5.2-dev) changed the same code: - archiveSamples.js: combined. Config secrets are scrubbed, samples are staged in a private mkdtemp directory that is removed afterwards, and the tar is portable and lists the staged files (#6316). The archive name is Windows-safe, the archive is packed into a `wx` 0600 partial file renamed into place inside its cleanup guard, and its path is returned (#6317). The staging directory and the mkdtemp prefix use the Windows-safe name. When the archive fails, the staging directory is removed inside a guard, so the error that stopped the archive is the one reported, as #6317 already did for the partial file. - report.js: passes the config and prints the returned archive path. - collectSamplesTaskFactory.js: both sides' imports. - archiveSamples.spec.js (add/add): v5.1's tests take the archive path from the return value; the "did not write" test plants a directory under both earlier staging names; v5.2's tests sit in an "archive file" block and pass the config. New test: the packing error is reported when removing the staged files fails too (fails on a plain `finally`, passes on the resolution). - collectSamplesTaskFactory.spec.js: both sides' imports. Merged without mergiraf (core.attributesFile=/dev/null). Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ive file The merge of v5.1-dev combined #6317's archive file, opened before its cleanup guard, with #6316's list of staged samples. That list was read after the file was opened, as an argument to tar. If reading it failed, packing never started, so nothing closed the file: its descriptor stayed open, and on Windows the partial file could not be removed. The list is now read before the file is opened. Test would have caught this: ✖ before the fix (the `.partial` file was opened), ✔ after. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…cking fails The test of error precedence passed even if the staging directory was never removed on failure, since the packing error is reported either way. It now also checks that the removal was attempted and failed. The packing-failure test checks that the staged samples are gone along with the partial archive. Both now fail when the failure branch skips the staging removal, and pass on the merged code. Test-only change. 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
|
|
Waiting for bot review — thepastaclaw not yet. Wait for the missing reviews, or a writer can post |
|
✅ Final review complete — no blockers (commit e3b1962) |
thepastaclaw
left a comment
There was a problem hiding this comment.
Final validation — Phase 1 + Phase 2
This sync brings seven v5.1-dev commits into v5.2-dev, including the Core 24 config migration, Debian packaging and release automation, and Dashmate report redaction. The doctor conflict resolution combines private staging and redaction with Windows-safe archive names and atomic publication. Dashmate unit and E2E tests, JS lint, the Platform suites, and NPM release validation passed; PR Hygiene and the automated review check were pending, and the live APT publish path was not exercised.
🟡 5 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.
Review provenance
Source: reviewer 1: muse-spark-1.3-contributor (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); reviewer 4: gpt-6.2-sol (agent: phase2-reviewer, role: security-auditor); reviewer 5: gpt-6.2-sol (agent: phase2-reviewer, role: general); reviewer 6: gpt-6.2-sol (agent: phase2-reviewer, role: architecture-layering); reviewer 7: gpt-6.2-sol (agent: phase2-reviewer, role: security-auditor); final verifier: gpt-6.2-sol (agent: sol-verifier, role: final-verifier)
- Triage:
normalbygpt-6.2-sol(effort low) — The doctor archive merge, Core image configuration migration, and apt release integration warrant substantive review, but the diff does not make an intricate change to 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) - Second Phase-2 pass: on this first full review every Phase-2 reviewer also ran a second, independent time, and the verifier weighed both sets
- Fresh verifier:
gpt-6.2-sol— final-verifier; agentsol-verifier - Phase 2 reviewers:
gpt-6.2-sol— general (completed, effort high); agentphase2-reviewer,gpt-6.2-sol— architecture-layering (completed, effort high); agentphase2-reviewer,gpt-6.2-sol— security-auditor (completed, effort high); agentphase2-reviewer,gpt-6.2-sol— general (completed, effort high); agentphase2-reviewer,gpt-6.2-sol— architecture-layering (completed, effort high); agentphase2-reviewer,gpt-6.2-sol— security-auditor (completed, effort high); 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/doctor/removeLegacyReportStagingDirs.js`:
- [SUGGESTION] packages/dashmate/src/doctor/removeLegacyReportStagingDirs.js:7-12: Doctor cleanup skips credential-bearing reports left by earlier v5.2-dev builds
Impact: On a shared Linux host, an operator who ran `dashmate doctor report` from a #6317 development build under a typical `022` umask can still have readable Core RPC credentials in the staging directory after running the updated command.
The updated command neither warns about nor restricts these leftover directories. The cleanup is unchanged from v5.1-dev, but the target branch's #6317 writer used a fixed, dash-separated timestamp, kept Docker inspect environment values, and left the staging tree behind. The colon-only matcher skips that target-specific layout before checking permissions or contents. No release tag contains #6317, so this affects development-build users only. Recognize both fixed timestamp forms and check `date.txt` against the canonical ISO timestamp, keeping the existing ownership, layout, and deletion-confirmation checks.
In `packages/dashmate/src/doctor/archiveSamples.js`:
- [SUGGESTION] packages/dashmate/src/doctor/archiveSamples.js:24-37: Saved doctor reports can hide a PoSe ban or flag a matching node ID
Impact: If a config secret matches part of a diagnostic value, an operator or support engineer replaying a report can miss a real PoSe ban or be told to replace a node ID that already matches.
The same samples can yield different diagnoses live and after export. The merged collector puts Core's actual response in `masternodeStatus`, and the archive scrubber masks all strings in that sample. A password equal to `POSE_BANNED` erases the exact token `analyseCoreFactory` looks up. If a secret matches part of the registered `platformNodeID` and no key-derived ID sample exists, `analyseConfigFactory` compares the masked registration against the unchanged saved ID and reports a false mismatch. The v5.2 parent archived these fields unchanged, while the v5.1 parent stored the sync response under `masternodeStatus`. Capture the typed diagnostic outcomes before scrubbing, keep free text redacted, and verify both verdicts in an archive round-trip test.
- [SUGGESTION] packages/dashmate/src/doctor/archiveSamples.js:139-146: Failed report packing can leave staged diagnostics without a cleanup warning
Impact: If both packing and staging removal fail, the operator sees the packing error but may not know that private diagnostic files remain or where to remove them.
The operator can be left with diagnostic files containing sensitive log text and no warning that removal failed. The merge correctly gives the original error priority, but the empty cleanup catch discards the removal error and staging path; the legacy scanner will not discover the new randomly suffixed directory on a later run. Keep the original error and surface the cleanup failure and directory separately. Extend the existing double-failure test to check both.
- [SUGGESTION] packages/dashmate/src/doctor/archiveSamples.js:100-127: An empty staging directory leaves the partial archive's descriptor open
Impact: If a temp cleanup removes all staged samples before they are listed, report creation fails and the partial archive's file descriptor stays open until the process exits.
Moving the listing before the open handles a failed listing, but not a successful listing that returns `[]`. Tar 7.5.22 rejects an empty entry list synchronously, so `create()` throws after the partial file opens but before `pipeline()` can take ownership of the stream. The catch tries to remove the path without closing the descriptor. Neither parent had this path: v5.2 passed `['.']`, and v5.1 let tar open the archive. Reject an empty list before opening the partial file and test it alongside the listing-error case.
In `packages/dashmate/test/unit/doctor/archiveSamples.spec.js`:
- [SUGGESTION] packages/dashmate/test/unit/doctor/archiveSamples.spec.js:506-517: The new archive-listing error test never injects its error on Windows
Impact: A developer running this test on Windows gets a failed rejection assertion because archiving succeeds instead of hitting the injected `EACCES` error.
The test only injects `EACCES` for a staging directory directly under `archiveRoot`. The shared setup sets `TMPDIR`, but Node on Windows uses `TEMP` or `TMP`, so the writer stages elsewhere and the stub lets the listing succeed. This affects the new test independently of the inherited colon-bearing fixture. Stub `os.tmpdir()` after creating the test root so the writer and fault injection agree; for the full spec, create only the Windows-safe legacy fixture on Windows.
|
Bots are done — your move: post |
Basic explanation
What this does: Brings the 7 commits merged into
v5.1-devsince the last sync (#6283, merge base544efd7ec7) intov5.2-dev. All 7 are dashmate, release workflow and documentation changes. Five files conflicted, all indashmate doctor, because #6316 (onv5.1-dev) and #6317 (onv5.2-dev) changed the same code. The resolution keeps the behaviour of both, and both sides' tests pass.Value: 5.2 gets the 5.1 doctor report redaction, the Core 24 image migration, the apt packaging and release automation, and the docs.
v5.2-devstays a small sync away fromv5.1-dev.Risks: Low, and limited to dashmate. No Rust, consensus or SDK code changes here. The hand-made part is
archiveSamples, where both PRs rewrote how the archive file is staged and written; see the "Conflicts" section below.Important
Merge this with "Create a merge commit", not "Squash and merge". A squash drops the link to
v5.1-dev, the merge base stays at544efd7ec7, and the same five conflicts come back at the next sync.Issue being fixed or feature implemented
v5.1-devhas 7 commits thatv5.2-devlacks;v5.2-devhas 52 commits since the merge base.What was done?
v5.1-dev(ec8dca69f1) is merged intov5.2-dev(646273dd29), with mergiraf off (-c core.attributesFile=/dev/null) so every conflict shows.What comes in
ec8dca69f157f3b6d6880560c59c3fd8b216c77c5.1.0-rc.2)1ef8f8478a1dea35d460bb3b2036e1Conflicts and how they were resolved
src/doctor/archiveSamples.js: combined. #6316 and #6317 both rewrote how the archive is staged and written:archiveSamplesnow requires the config). The samples are staged in a freshmkdtempdirectory only the operator can read, which is removed afterwards. The tar is portable and lists the staged files rather than..:becomes-). The archive is packed into a temporary.partialfile openedwxwith mode 0600, and renamed into place inside a guard that removes only that file and rethrows the packing error. The function returns the archive path.The merged function does all of that. The archive is packed from the private staging directory into the
wx0600 partial file, then renamed. The Windows-safe name is also used for themkdtempprefix, since Windows cannot create a directory with:in its name either.One addition neither side needed alone. #6316 removed the staging directory in a
finally, so if packing failed and that removal also failed, the removal's error would replace the packing error. That would break the #6317 rule that the packing error is the one reported. On failure, the staging directory is now removed inside a guard and the original error is rethrown. On success it is removed unguarded, as #6316 had it. A new test pins this: it fails on the plainfinally(EPERM reported instead of EACCES) and passes on the resolution.A commit after the merge (
4d99ab4a3a) reads the list of staged samples before the partial file is opened. Otherwise a failure to read that list would leave the open file with nothing to close it.src/commands/doctor/report.js: passes the config (#6316) and prints the patharchiveSamplesreturns (#6317).src/listr/tasks/doctor/collectSamplesTaskFactory.js: an import block. Both sides' imports are kept:deriveTenderdashNodeIdfrom #6317,commandLineOptionandgetOperatorIdentityfrom #6316. The rest merged without a conflict: #6317'snodeIdFromKeysample and Core status order, and #6316's redaction and scrubbing.test/unit/doctor/archiveSamples.spec.js(add/add): both PRs created this file.archiveSamples's return value instead of rebuilding the name from the ISO time.archive fileblock with their own output directory, fixed date and version, and pass the config.test/unit/listr/tasks/doctor/collectSamplesTaskFactory.spec.js: an import block; both sides' imports are kept.After the merge commit
4d99ab4a3afix(dashmate): list the staged report samples before opening the archive file. Its test fails before the fix (the.partialfile was opened) and passes after it.e3b19623dbtest(dashmate): the error-precedence test also checks that the staging removal was attempted, and the packing-failure test checks that the staged samples are gone. Both fail when the failure branch skips the staging removal.Checked, no change needed
v5.1-dev, and every file onlyv5.2-devchanged is identical tov5.2-dev. Neither branch changed the other's files after the merge base.5.1.0-rc.2(fix(dashmate): move every Core 23 image of dashpay/dashd to Core 24 #6209): it is now the newest migration key.v5.2-devhas no key above5.1.0-dev.2, and its package version is still5.1.0-rc.1, sogetConfigFormatVersiongives5.1.0-rc.2. The migration runs for every config stamped below that: configs from 5.1 prereleases up to5.1.0-rc.1, and configs written byv5.2-devbuilds so far. A config written by a later 5.1 release has already run it. Nov5.2tag exists, so no 5.2 prerelease stamp skips it. The Core image defaults are identical on both branches; the migrations file is the only difference underconfigs/.dashmate-report-<ISO time with ':'>, so it never matches the mergedmkdtempdirectories. No release contains fix(dashmate): make doctor's masternode, node-ID and container checks fire, and write a Windows-safe report archive #6317, so no released build left staging directories under its dash-separated name.nodeIdFromKey(fix(dashmate): make doctor's masternode, node-ID and container checks fire, and write a Windows-safe report archive #6317): fix(dashmate): redact container environment and known secrets in the doctor report #6316's list of known sample files already includes it, and it passes through the archive scrub as a text sample.v5.2-devdid not changerelease.yml,npm-runner-validation.yml,scripts/pack_dashmate.shorscripts/release/*after the merge base, so they are exactly as onv5.1-dev.How Has This Been Tested?
Locally on macOS, on the merged tree:
yarn test:unit): 1317 passing, 0 failing, after the last commit.yarn lintinpackages/dashmate: 0 errors. The 46 warnings are in files this merge does not touch. The five resolved files pass with--max-warnings 0.archiveSamples.spec.js(fix(dashmate): redact container environment and known secrets in the doctor report #6316's, fix(dashmate): make doctor's masternode, node-ID and container checks fire, and write a Windows-safe report archive #6317's, and the two new ones).finallyform of the resolution and passes on the merged one.actionlintonrelease.ymlandnpm-runner-validation.yml: clean. shellcheck in anubuntu:24.04container was not run, because the scripts did not diverge.git -c core.attributesFile=/dev/null show --remerge-diff HEAD). It reported 5 must-fixes:4d99ab4a3a) and the weak cleanup tests (e3b19623db).archiveSamples.spec.jscreates a directory with:in its name and relies onTMPDIR, so it would not run on Windows. Both are as fix(dashmate): redact container environment and known secrets in the doctor report #6316 wrote the spec, and no CI job runs dashmate tests on Windows.Not run: a real
dashmate doctor reportagainst a running node, dashmate integration and e2e tests, and the apt publish path. CI covers the rest.Breaking Changes
Those of the merged
v5.1-devcommits; none is new here.Checklist:
structure.rs, regeneratedgrovedb-structure.json, and checked the structure viewer link posted on this pull requestFor repository code-owners and collaborators only
🤖 Generated with Claude Code
PR Hygiene ·
e3b1962/self-reviewedclaude— you own itgithub(.github/scripts/tests/test_check_dashmate_apt_publish.py,.github/scripts/tests/test_dashmate_apt_publish.py,.github/scripts/tests/test_dashmate_deb_versions.pyand 4 more) — ktechmidasdashmate— you own itWhen every merge requirement is met, the
PR Hygienecheck passes. Reviewer limits do not block merging; other required GitHub checks and protections still apply.