Skip to content

fix(dashmate): load ZeroSSL config in force mode - #4298

Open
thepastaclaw wants to merge 1 commit into
dashpay:v5.1-devfrom
thepastaclaw:tracker-1419-zerossl-force-csr
Open

thepastaclaw wants to merge 1 commit into
dashpay:v5.1-devfrom
thepastaclaw:tracker-1419-zerossl-force-csr

Conversation

@thepastaclaw

@thepastaclaw thepastaclaw commented Aug 5, 2026 •

Copy link
Copy Markdown
Collaborator

Issue being fixed or feature implemented

Fixes #3803
Fixes #4249

Tracking: https://github.com/thepastaclaw/tracker/issues/1419

dashmate ssl obtain --force skipped the ZeroSSL validation task that also initialized the task context. As a result, required values such as the API key, external IP, and certificate paths were undefined before key and CSR generation.

What was done?

  • Initialize the ZeroSSL configuration and certificate paths before the existing-certificate check, including in force mode.
  • Keep --force limited to bypassing existing-certificate validation and resetting prior certificate/artifact state so a fresh keypair, CSR, certificate, and bundle are generated.
  • Add focused regression coverage for force-mode context initialization, stale artifact state, and missing required configuration.

How Has This Been Tested?

  • yarn exec mocha --require ./test/bootstrap.js test/unit/ssl/zerossl/obtainZeroSSLCertificateTaskFactory.spec.js test/unit/ssl/zerossl/validateZeroSslCertificateFactory.spec.js — 16 passing
  • yarn exec eslint src/listr/tasks/ssl/zerossl/obtainZeroSSLCertificateTaskFactory.js test/unit/ssl/zerossl/obtainZeroSSLCertificateTaskFactory.spec.js
  • yarn workspace dashmate lint via the pre-commit hook
  • Independent exact-head pre-PR review — ship, 0 findings

Breaking Changes

None.

Checklist:

  • I have performed a self-review of my own code
  • 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

For repository code-owners and collaborators only

  • I have assigned this pull request to a milestone

Summary by CodeRabbit

  • Bug Fixes
    • Improved ZeroSSL certificate setup and validation.
    • Added more reliable handling of certificate files and SSL directories.
    • Fixed forced regeneration so stale certificate state is cleared correctly.
    • Improved error reporting when the API key or external IP is missing.
    • Ensured cleanup does not hide errors from the certificate generation process.

PR Hygiene · e35d964

  • Bots — coderabbitai skipped after the window · thepastaclaw ✓
  • Self-review — not asked of a bot author
  • Build green
  • Approvals
    • dashmate (packages/dashmate/src/listr/tasks/ssl/zerossl/obtainZeroSSLCertificateTaskFactory.js, packages/dashmate/test/unit/ssl/zerossl/obtainZeroSSLCertificateTaskFactory.spec.js) — ktechmidas or shumkov

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.

@coderabbitai

coderabbitai Bot commented Aug 5, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

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
  • Configuration used: Repository: dashpay/platform/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: cd8dac49-403e-4594-93db-6662f1ab3bc8

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
📝 Walkthrough

The ZeroSSL task pipeline now initializes API configuration, external IP, certificate paths, and SSL directory state before certificate generation. Forced regeneration clears stale state and proceeds with fresh keypair, CSR, and certificate generation. Unit tests cover successful and invalid forced runs.

Changes: ZeroSSL certificate acquisition

Layer / File(s) Summary
Initialize ZeroSSL certificate context
packages/dashmate/src/listr/tasks/ssl/zerossl/obtainZeroSSLCertificateTaskFactory.js
The pipeline loads and validates the API key and external IP, derives SSL file paths, creates the SSL directory, and clears stale certificate state when --force is enabled.
Validate forced regeneration
packages/dashmate/test/unit/ssl/zerossl/obtainZeroSSLCertificateTaskFactory.spec.js
Tests verify forced regeneration, path and configuration initialization, regeneration despite stale state, verification-server cleanup, and early failures for missing API key or external IP.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Suggested reviewers: shumkov, quantumexplorer

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Linked Issues check ✅ Passed The changes initialize ZeroSSL context and paths before force-mode regeneration, addressing the requirements in issues [#3803] and [#4249].
Out of Scope Changes check ✅ Passed The implementation and regression tests remain within the linked issues' scope of fixing ZeroSSL force-mode certificate renewal.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly describes the main change: loading ZeroSSL configuration when force mode is enabled.
✨ Finishing Touches 💡 1
🛠️ Fix failing CI checks 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

Comment @coderabbitai help to get the list of available commands.

@github-actions github-actions Bot added this to the v4.1.0 milestone Aug 5, 2026
@thepastaclaw

Copy link
Copy Markdown
Collaborator Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Aug 5, 2026 •

Copy link
Copy Markdown
Contributor
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@thepastaclaw

thepastaclaw commented Aug 5, 2026 •

Copy link
Copy Markdown
Collaborator Author

✅ Final review complete — no blockers (commit e35d964) · triage: normal

@coderabbitai

coderabbitai Bot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor
✅ Action performed

Reviews resumed.

@thepastaclaw

Copy link
Copy Markdown
Collaborator Author

The failing CodeRabbit or PastaClaw review check is unrelated to this PR's code changes. The gate ran when the PR opened, before either reviewer had submitted a formal GitHub review, and its log explicitly says it will rerun automatically when a review is submitted. CodeRabbit has since completed its analysis, and the PastaClaw review is queued separately. The ZeroSSL change is proper as-is; no branch change, rebase, empty commit, or CI retrigger is needed for this failure.

@thepastaclaw thepastaclaw left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Preliminary review — Codex only

The PR fixes force mode's missing ZeroSSL configuration and path initialization, but the new regeneration path can persist a replacement certificate ID while leaving the previous certificate's key and CSR on disk. If renewal is interrupted and later retried without force, the pipeline can install a certificate bundle that does not match the retained private key.

Source: reviewers codex/general=gpt-5.6-sol(completed); verifier=codex/verifier=gpt-5.6-sol(completed); coordinator=openclaw-agent/cliproxy/gpt-5.6-sol(orchestration-only).

Validated blockers were found in the Codex precheck. Opus is deferred until a fresh Codex revalidation clears the blocker gate.

Review provenance

  • Codex reviewers: gpt-5.6-sol — general (completed)
  • Verifier: gpt-5.6-sol — verifier
  • Opus: not run (deferred by blocker gate)

🔴 1 blocking

🤖 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/listr/tasks/ssl/zerossl/obtainZeroSSLCertificateTaskFactory.js`:
- [BLOCKING] packages/dashmate/src/listr/tasks/ssl/zerossl/obtainZeroSSLCertificateTaskFactory.js:75-81: Keep forced renewal artifacts consistent with the persisted certificate ID
  Force mode clears only the in-memory presence flags; the previous `private.key`, `csr.pem`, and `bundle.crt` remain on disk. After generating a replacement key and CSR, the create task persists the new certificate ID at lines 180-185 before verification, download, or any artifact save occurs. If a later task fails, a subsequent non-force run loads that new pending certificate while `validateZeroSslCertificate` reports the old key and CSR as present; its pending-certificate branch clears only the bundle flag. Key/CSR generation and save are therefore skipped, while the new bundle is downloaded and written beside the old private key, producing a certificate/key mismatch. Stage the replacement ID, key, CSR, and bundle and commit them together after successful download, or roll back the persisted ID on failure so a retry cannot associate the old artifacts with the replacement certificate. Add a regression test covering a force run that fails after certificate creation followed by a non-force retry.

Note: GitHub does not allow me to request changes on my own PR, so this COMMENT review preserves the verified blocking finding and should still be treated as merge-blocking feedback.

@thepastaclaw
thepastaclaw force-pushed the tracker-1419-zerossl-force-csr branch from 91431c2 to e910329 Compare August 5, 2026 17:54
@thepastaclaw

Copy link
Copy Markdown
Collaborator Author

Addressed the blocking forced-renewal consistency finding in e9103295d1 (amended PR commit):

  • delay publishing the replacement ZeroSSL certificate ID until key/CSR/bundle download succeeds
  • stage and install artifacts together, rolling back artifacts/config if persistence fails
  • add regression coverage for a failed force run followed by a non-force retry, plus persistence failure paths

Validation: targeted unit spec (8 passing), changed-file ESLint, and git diff --check.

@thepastaclaw thepastaclaw left a comment •

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Preliminary review — Codex only

The carried-forward blocker, "Keep forced renewal artifacts consistent with the persisted certificate ID," is resolved: the current head delays publishing the replacement ID until the artifacts are ready and rolls back artifacts and configuration when persistence fails. The latest delta introduces a new blocking security regression because the staged replacement private key is installed with the process-default file mode rather than preserving owner-only access.

Source: reviewers codex/general=gpt-5.6-sol(completed); verifier=codex/verifier=gpt-5.6-sol(completed); coordinator=openclaw-agent/cliproxy/gpt-5.6-sol(orchestration-only).

Validated blockers were found in the Codex precheck. Sonnet is deferred until a fresh Codex revalidation clears the blocker gate.

Review provenance

  • Codex reviewers: gpt-5.6-sol — general (completed)
  • Verifier: gpt-5.6-sol — verifier
  • Sonnet: not run (deferred by blocker gate)

🔴 1 blocking

🤖 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/listr/tasks/ssl/zerossl/obtainZeroSSLCertificateTaskFactory.js`:
- [BLOCKING] packages/dashmate/src/listr/tasks/ssl/zerossl/obtainZeroSSLCertificateTaskFactory.js:338-357: Preserve restrictive permissions when installing the replacement private key
  The staged private key is created with Node's default mode (`0666` masked by the process umask), and `renameSync` replaces the destination inode instead of overwriting it. A forced renewal therefore changes an existing owner-only `0600` key to `0644` under the usual `0022` umask. Dashmate also creates its default and nested home directories without an explicitly restrictive mode, so on typical installations other local users can traverse the path and read the gateway TLS private key. Create the staged `private.key` with mode `0600` or explicitly chmod it before or after installation, while leaving the CSR and certificate bundle modes unchanged, and add a regression assertion for the installed key mode.

Note: GitHub does not allow me to request changes on my own PR, so this COMMENT review preserves the verified blocking finding and should still be treated as merge-blocking feedback.

@PastaPastaPasta
PastaPastaPasta marked this pull request as ready for review August 22, 2026 15:49

@thepastaclaw thepastaclaw left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Preliminary review — Codex only

The force-mode configuration initialization now works, and the prior private-key permission issue is fixed by staging the key with mode 0600. One blocker remains: replacing certificate files with renameSync disconnects successful renewals from the gateway's existing file-level bind mounts, so its SIGHUP hot restart continues serving the old certificate.
Source: reviewer codex/general=gpt-5.6-sol; final verifier codex/verifier=gpt-5.6-sol; orchestration-only and not reviewer evidence: openclaw-agent/cliproxy/gpt-5.6-sol.

Validated blockers were found in the Codex precheck. Opus is deferred until a fresh Codex revalidation clears the blocker gate.

Review provenance

  • Codex reviewers: gpt-5.6-sol — general (completed)
  • Verifier: gpt-5.6-sol — verifier
  • Sonnet: not run (deferred by blocker gate)

🔴 1 blocking

🤖 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/listr/tasks/ssl/zerossl/obtainZeroSSLCertificateTaskFactory.js`:
- [BLOCKING] packages/dashmate/src/listr/tasks/ssl/zerossl/obtainZeroSSLCertificateTaskFactory.js:358-361: Preserve bind-mounted certificate inodes during renewal
  The gateway mounts bundle.crt and private.key as individual files in docker-compose.yml lines 208-209. Replacing either destination with renameSync creates a new inode on the host, while the running container's bind mount remains attached to the old inode. The renewal scheduler then sends SIGHUP to PID 1, whose hot-restart supervisor forks another Envoy process in the same mount namespace, so that process also reads the old certificate. Normal expiration renewal replaces bundle.crt, and force mode replaces both mounted files; either path can publish the new certificate ID and report success while the gateway continues serving the expiring certificate. Overwrite existing destinations in place to preserve their mounted inodes, and use renameSync only for first-time installation.

Canonical verifier result: REQUEST_CHANGES. GitHub does not allow authors to approve or request changes on their own pull requests, so this review was submitted using COMMENT transport. The findings and blocker status above are unchanged.

@PastaPastaPasta
PastaPastaPasta force-pushed the tracker-1419-zerossl-force-csr branch from 9955519 to 41dc4bf Compare August 24, 2026 14:32

@thepastaclaw thepastaclaw left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Final validation — Codex/Sol only (Phase 2 disabled)

At exact head 41dc4bf, the prior bind-mount blocker is fixed: existing certificate artifacts are overwritten in place, while first-time installations still use rename, and regression coverage confirms the behavior. The targeted ZeroSSL suites pass with 21 tests, and ESLint passes for both changed files.
Source: reviewers codex/general=gpt-5.6-sol and codex/security-auditor=gpt-5.6-sol; final verifier codex/verifier=gpt-5.6-sol; openclaw-agent/cliproxy/gpt-5.6-sol is orchestration-only and not reviewer evidence.

Validated zero-blocker Codex/Sol precheck evidence was promoted to final because Phase 2 (Sonnet/Opus) is temporarily disabled. This is Codex/Sol-only final validation, not Codex + Sonnet/Opus coverage.

Review provenance

  • Codex reviewers: gpt-5.6-sol — general (completed), gpt-5.6-sol — security-auditor (completed)
  • Verifier: gpt-5.6-sol — verifier
  • Sonnet/Opus: not run (Phase 2 disabled — temporary Codex/Sol-only final)
  • Secondary pass: disabled (temporary_phase2_sonnet_disable)

Canonical verifier result: APPROVE. GitHub does not allow authors to approve or request changes on their own pull requests, so this review was submitted using COMMENT transport. The findings and blocker status above are unchanged.

@thepastaclaw

Copy link
Copy Markdown
Collaborator Author

Friendly review reminder for @QuantumExplorer and @shumkov on the current head. This PR is mergeable with no failed or pending checks; when you have a chance, could you review the live Tenderdash version handling? Thanks.

@QuantumExplorer
QuantumExplorer changed the base branch from v4.1-dev to v4.3-dev September 16, 2026 14:17
@github-actions github-actions Bot modified the milestones: v4.1.0, v4.3.0 Sep 16, 2026
@github-actions

Copy link
Copy Markdown
Contributor

@coderabbitai review

No review for 41dc4bf7 yet, so PR Hygiene is asking once. If nothing arrives, the requirement is dropped for this commit and the pull request is labelled bot-review-missed.

@github-actions github-actions Bot added waiting-self-review Waiting for the author to post /self-reviewed bot-review-skipped A required review bot did not report; it was skipped by the window or by a person. labels Sep 20, 2026
@github-actions github-actions Bot removed bot-review-skipped A required review bot did not report; it was skipped by the window or by a person. waiting-self-review Waiting for the author to post /self-reviewed labels Sep 30, 2026
@github-actions

github-actions Bot commented Oct 2, 2026

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 bot-review-skipped A required review bot did not report; it was skipped by the window or by a person. labels Oct 2, 2026
@github-actions

github-actions Bot commented Oct 2, 2026

Copy link
Copy Markdown
Contributor

Ready for review — dashmate: ktechmidas or shumkov.
Full checklist in the description.

@github-actions github-actions Bot added ready-for-human Bots have reported, the author has self-reviewed, and the build is green: this needs a human. and removed waiting-self-review Waiting for the author to post /self-reviewed labels Oct 2, 2026
@github-actions
github-actions Bot requested a review from ktechmidas October 2, 2026 11:27
Co-Authored-By: Claude Code <noreply@anthropic.com>
@thepastaclaw
thepastaclaw force-pushed the tracker-1419-zerossl-force-csr branch from 41dc4bf to e35d964 Compare October 13, 2026 18:54
@github-actions

github-actions Bot commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

Waiting for bot review — coderabbitai not yet · thepastaclaw ✓. 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 waiting-bots Waiting for the review bots to report on this head and removed ready-for-human Bots have reported, the author has self-reviewed, and the build is green: this needs a human. bot-review-skipped A required review bot did not report; it was skipped by the window or by a person. labels Oct 13, 2026

@thepastaclaw thepastaclaw left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Re-review — Final validation — Phase 1 + Phase 2

The force-mode ZeroSSL fix correctly initializes configuration and paths before bypassing certificate validation, and resets stale artifact state so regeneration can proceed. No blocking correctness or security issues were identified. Two targeted regression-coverage gaps remain: the new missing-configuration errors are untested, and the added force-mode test stops before artifact persistence.

🟡 2 suggestion(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); reviewer 4: gpt-6.1-sol (agent: phase2-reviewer, role: security-auditor); reviewer 5: gpt-6.1-sol (agent: phase2-reviewer, role: general); reviewer 6: gpt-6.1-sol (agent: phase2-reviewer, role: architecture-layering); reviewer 7: gpt-6.1-sol (agent: phase2-reviewer, role: security-auditor); final verifier: gpt-6.1-sol (agent: sol-verifier, role: final-verifier)

  • Triage: normal by gpt-6.1-sol (effort low) — This is a small, well-contained behavioral fix in dashmate's ZeroSSL certificate generation flow, but it changes key and certificate handling and therefore warrants the default review effort rather than a trivial or low classification.
  • 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 below 15% reserve: weekly 14% left, 5h 100% left), 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; agent sol-verifier
  • Phase 2 reviewers: gpt-6.1-sol — general (completed, effort high); agent phase2-reviewer, gpt-6.1-sol — architecture-layering (completed, effort high); agent phase2-reviewer, gpt-6.1-sol — security-auditor (completed, effort high); agent phase2-reviewer, gpt-6.1-sol — general (completed, effort high); agent phase2-reviewer, gpt-6.1-sol — architecture-layering (completed, effort high); agent phase2-reviewer, gpt-6.1-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. Verify each finding against the current code and only fix it if needed.

In `packages/dashmate/src/listr/tasks/ssl/zerossl/obtainZeroSSLCertificateTaskFactory.js`:
- [SUGGESTION] packages/dashmate/src/listr/tasks/ssl/zerossl/obtainZeroSSLCertificateTaskFactory.js:69-75: Add regression tests for force-mode missing configuration errors
  The new force-only branches for a missing ZeroSSL API key and missing external IP are user-facing behavior introduced by this change, but the test suite does not exercise either branch. Add cases that run the task with force enabled and each configuration value absent, then assert the corresponding clear error message. Without these tests, a future refactor could remove the friendly validation and restore the less actionable key-generation failure that this change is intended to prevent.

In `packages/dashmate/test/unit/ssl/zerossl/obtainZeroSSLCertificateTaskFactory.spec.js`:
- [SUGGESTION] packages/dashmate/test/unit/ssl/zerossl/obtainZeroSSLCertificateTaskFactory.spec.js:102-121: Exercise forced artifact replacement through persistence
  The force-mode regression test verifies that stale flags are reset far enough to generate a new keypair, CSR, and certificate request, but it deliberately rejects at certificate creation and never reaches the save tasks. Consequently, it would still pass if the force reset of isPrivateKeyFilePresent or isBundleFilePresent were removed. Add a successful force-mode case using a temporary home directory with existing artifact files, then assert that the generated private key, CSR, and downloaded bundle replace the existing contents at the configured paths.

Comment on lines +69 to +75
if (ctx.force && !ctx.apiKey) {
throw new Error('ZeroSSL API key is not set. Please set it in the config file');
}

if (ctx.force && !ctx.externalIp) {
throw new Error('External IP is not set. Please set it in the config file');
}

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

🟡 Suggestion: Add regression tests for force-mode missing configuration errors

The new force-only branches for a missing ZeroSSL API key and missing external IP are user-facing behavior introduced by this change, but the test suite does not exercise either branch. Add cases that run the task with force enabled and each configuration value absent, then assert the corresponding clear error message. Without these tests, a future refactor could remove the friendly validation and restore the less actionable key-generation failure that this change is intended to prevent.

source: muse-spark-1.3-contributor (phase1-reviewer: general)

Comment on lines +102 to +121
await expect(task.run({
expirationDays: 30,
force: true,
isCsrFilePresent: true,
isPrivateKeyFilePresent: true,
isBundleFilePresent: true,
certificate: { id: 'old-certificate' },
})).to.be.rejectedWith(sentinel);

expect(validate).to.not.have.been.called();
expect(generateKeyPair).to.have.been.calledOnce();
expect(generateCsr).to.have.been.calledOnceWithExactly(
{ privateKey: 'private-key' },
'1.2.3.4',
);
expect(createCertificate).to.have.been.calledOnceWithExactly(
'certificate-request',
'1.2.3.4',
'test-api-key',
);

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

🟡 Suggestion: Exercise forced artifact replacement through persistence

The force-mode regression test verifies that stale flags are reset far enough to generate a new keypair, CSR, and certificate request, but it deliberately rejects at certificate creation and never reaches the save tasks. Consequently, it would still pass if the force reset of isPrivateKeyFilePresent or isBundleFilePresent were removed. Add a successful force-mode case using a temporary home directory with existing artifact files, then assert that the generated private key, CSR, and downloaded bundle replace the existing contents at the configured paths.

source: gpt-6.1-sol (phase2-reviewer: general, architecture-layering, security-auditor)

@thepastaclaw

Copy link
Copy Markdown
Collaborator Author

/skip-bots

@github-actions

Copy link
Copy Markdown
Contributor

Ready for review — dashmate: ktechmidas or shumkov.
Full checklist in the description.

@github-actions github-actions Bot added ready-for-human Bots have reported, the author has self-reviewed, and the build is green: this needs a human. bot-review-skipped A required review bot did not report; it was skipped by the window or by a person. and removed waiting-bots Waiting for the review bots to report on this head labels Oct 15, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bot-review-skipped A required review bot did not report; it was skipped by the window or by a person. ready-for-human Bots have reported, the author has self-reviewed, and the build is green: this needs a human.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants