Skip to content

chore: merge v5.1-dev into v5.2-dev - #6323

Merged
shumkov merged 10 commits into
v5.2-devfrom
dashmate-merge-51-into-52
Nov 26, 2026
Merged

shumkov merged 10 commits into
v5.2-devfrom
dashmate-merge-51-into-52

Conversation

@shumkov

@shumkov shumkov commented Nov 26, 2026 •

Copy link
Copy Markdown
Collaborator

Basic explanation

What this does: Brings the 7 commits merged into v5.1-dev since the last sync (#6283, merge base 544efd7ec7) into v5.2-dev. All 7 are dashmate, release workflow and documentation changes. Five files conflicted, all in dashmate doctor, because #6316 (on v5.1-dev) and #6317 (on v5.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-dev stays a small sync away from v5.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 at 544efd7ec7, and the same five conflicts come back at the next sync.

Issue being fixed or feature implemented

v5.1-dev has 7 commits that v5.2-dev lacks; v5.2-dev has 52 commits since the merge base.

What was done?

v5.1-dev (ec8dca69f1) is merged into v5.2-dev (646273dd29), with mergiraf off (-c core.attributesFile=/dev/null) so every conflict shows.

What comes in

Commit PR Change
ec8dca69f1 #6315 docs(dashmate): drop the Platform reset from major updates
57f3b6d688 #6316 fix(dashmate): redact container environment and known secrets in the doctor report
0560c59c3f #6289 ci(dashmate): ask the apt publisher to publish a release's debs
d8b216c77c #6209 fix(dashmate): move every Core 23 image of dashpay/dashd to Core 24 (config migration 5.1.0-rc.2)
1ef8f8478a #6210 docs(dashmate): describe updating a Debian package installation
1dea35d460 #6267 feat(dashmate): ship the apt repository's source file and keyring in the deb
bb3b2036e1 #6274 ci: let QuantumExplorer sign dashmate release checksums

Conflicts and how they were resolved

src/doctor/archiveSamples.js: combined. #6316 and #6317 both rewrote how the archive is staged and written:

The merged function does all of that. The archive is packed from the private staging directory into the wx 0600 partial file, then renamed. The Windows-safe name is also used for the mkdtemp prefix, 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 plain finally (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 path archiveSamples returns (#6317).

src/listr/tasks/doctor/collectSamplesTaskFactory.js: an import block. Both sides' imports are kept: deriveTenderdashNodeId from #6317, commandLineOption and getOperatorIdentity from #6316. The rest merged without a conflict: #6317's nodeIdFromKey sample and Core status order, and #6316's redaction and scrubbing.

test/unit/doctor/archiveSamples.spec.js (add/add): both PRs created this file.

test/unit/listr/tasks/doctor/collectSamplesTaskFactory.spec.js: an import block; both sides' imports are kept.

After the merge commit

  • 4d99ab4a3a fix(dashmate): list the staged report samples before opening the archive file. Its test fails before the fix (the .partial file was opened) and passes after it.
  • e3b19623db test(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

How Has This Been Tested?

Locally on macOS, on the merged tree:

Not run: a real dashmate doctor report against 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-dev commits; none is new here.

Checklist:

  • I have performed a self-review of my own code
  • My Rust, FFI, WASM, Swift or Kotlin changes follow the coding conventions (N/A: JavaScript only)
  • I have commented my code, particularly in hard-to-understand areas
  • I have added or updated relevant unit/integration/functional/e2e tests
  • I have added "!" to the title and described breaking changes in the corresponding section if my code contains any
  • I have made corresponding changes to the documentation if needed (N/A)
  • If I added or changed GroveDB structure, I described it in the area's structure.rs, regenerated grovedb-structure.json, and checked the structure viewer link posted on this pull request
  • If I added or changed a system contract's document schemas, I checked the contract viewer link posted on this pull request

For repository code-owners and collaborators only

  • I have assigned this pull request to a milestone

🤖 Generated with Claude Code

PR Hygiene · e3b1962

  • Bots — thepastaclaw ✓
  • Self-review — post /self-reviewed
  • Build green
  • Approvals
    • claude — you own it
    • github (.github/scripts/tests/test_check_dashmate_apt_publish.py, .github/scripts/tests/test_dashmate_apt_publish.py, .github/scripts/tests/test_dashmate_deb_versions.py and 4 more) — ktechmidas
    • dashmate — you own it
    • files with no dedicated owner — you own it

When every merge requirement is met, the PR Hygiene check passes. Reviewer limits do not block merging; other required GitHub checks and protections still apply.

shumkov and others added 10 commits November 25, 2026 20:15
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]>
@shumkov shumkov added this to the v5.2.0 milestone Nov 26, 2026
@coderabbitai

coderabbitai Bot commented Nov 26, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@github-actions

Copy link
Copy Markdown
Contributor

Waiting for bot review — thepastaclaw not yet. Wait for the missing reviews, or a writer can post /skip-bots to proceed without them; blocking findings still need addressing.
Full checklist in the description.

@github-actions github-actions Bot added the waiting-bots Waiting for the review bots to report on this head label Nov 26, 2026
@thepastaclaw

thepastaclaw commented Nov 26, 2026 •

Copy link
Copy Markdown
Collaborator

✅ Final review complete — no blockers (commit e3b1962)

@thepastaclaw thepastaclaw left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

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: normal by gpt-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); agent phase1-reviewer
  • Phase 1 model: muse-spark-1.3-contributor — not quota-gated; passed over gemini-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; agent sol-verifier
  • Phase 2 reviewers: gpt-6.2-sol — general (completed, effort high); agent phase2-reviewer, gpt-6.2-sol — architecture-layering (completed, effort high); agent phase2-reviewer, gpt-6.2-sol — security-auditor (completed, effort high); agent phase2-reviewer, gpt-6.2-sol — general (completed, effort high); agent phase2-reviewer, gpt-6.2-sol — architecture-layering (completed, effort high); agent phase2-reviewer, gpt-6.2-sol — security-auditor (completed, effort high); agent phase2-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.

@github-actions

Copy link
Copy Markdown
Contributor

Bots are done — your move: post /self-reviewed.
Full checklist in the description.

@github-actions github-actions Bot added waiting-self-review Waiting for the author to post /self-reviewed and removed waiting-bots Waiting for the review bots to report on this head labels Nov 26, 2026
@shumkov
shumkov merged commit 673de9d into v5.2-dev Nov 26, 2026
38 of 39 checks passed
@shumkov
shumkov deleted the dashmate-merge-51-into-52 branch November 26, 2026 12:42
@shumkov shumkov mentioned this pull request Nov 26, 2026
6 of 17 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

waiting-self-review Waiting for the author to post /self-reviewed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants