Skip to content

test(esign): pin fixture certificate start so it covers the frozen clock - #86

Merged
lorenzocorallo merged 1 commit into
mainfrom
fix/esign-fixture-cert-validity
Oct 20, 2026
Merged

lorenzocorallo merged 1 commit into
mainfrom
fix/esign-fixture-cert-validity

Conversation

@lorenzocorallo

Copy link
Copy Markdown
Member

The esign service tests freeze their clock at 2026-10-17T10:00Z, but the fixture CA and signer certificates had notBefore = Date.now() - 1 day. From 2026-10-18 the certificates were not yet valid at the frozen time, so agentPrepare threw certificate_invalid ("The CIE certificate is expired") and 14 tests in tests/esign-service.test.ts failed on every branch (e.g. #85).

notBefore is now fixed at 2026-01-01. notAfter stays relative to now, because the OCSP and diff tests use real time.

The fixture certificates started one day before the real time, while the
service tests freeze their clock at 2026-10-17. From 2026-10-18 the
certificates were not yet valid at the frozen time, so agentPrepare
refused them as expired and every esign service test failed.
@coderabbitai

coderabbitai Bot commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 47d73d9d-aa77-409b-832a-0c8b68f1f84d
📥 Commits

Reviewing files that changed from the base of the PR and between 6a0b866 and 6307637.

📒 Files selected for processing: 1
  • tests/esign-fixtures.ts

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

Walkthrough

Certificate fixtures now use a fixed VALID_FROM date for the CA and issued leaf certificates instead of a date relative to the current time.

Changes

Certificate fixture dates

Layer / File(s) Summary
Set fixed certificate start dates
tests/esign-fixtures.ts
The CA and issued leaf certificates use VALID_FROM for their notBefore value.

Priority: ⬇️ Low

Change: Bug fix

Merge Risk: ⚪ Minimal · up to 63076

The fixture certificates should remain valid for the frozen-clock tests; the change is ready to merge.

Pre-merge checks: Passed 3 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 functions across 1 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 3 passed
Check name Status Explanation
Title check Passed The title clearly and concisely describes the main change: pinning the e-sign fixture certificate start date to support the frozen clock tests.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches: 💡 1
📝 Generate docstrings: 💡
  • Commit to this branch
  • Create a new PR
  • 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

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

@lorenzocorallo
lorenzocorallo merged commit 5867df6 into main Oct 20, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant