Skip to content

test(identity): cover the missing signing-record warning through block validation - #1278

Draft
hackobi wants to merge 3 commits into
chef/d4-foreign-signature-no-recordfrom
chef/d4-no-record-warning-test
Draft

hackobi wants to merge 3 commits into
chef/d4-foreign-signature-no-recordfrom
chef/d4-no-record-warning-test

Conversation

@hackobi

@hackobi hackobi commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

This adds a Jest regression for the warning introduced by #1189. It exercises verifyBlock with the real signing-record and warning modules. A valid block signed by this node should warn once when the local signing record is missing. A matching record and a block signed only by other nodes should both stay quiet. The draft targets the branch of #1189.

Verification

  • npx jest --maxWorkers=1 src/libs/blockchain/validation/verifyBlock.ownKeyWarning.test.ts passed all three cases at f847eccd3ec14c58a9f78d08a33174eb021f451f. Restoring the implementation from before fix(identity): warn when our key signed a block and no signing record exists #1189 made only the missing-record case fail.
  • The first revision had 12.7% duplication on new code. The revised fixture shares one signer pool and constructs the signatures for each case. Sonar measured 0.0% duplication and passed on this commit. Sonar check.
  • The consensus workflow filters out this stacked target. The repository's local consensus runner discovers and passes the new file. The build-style type check, release checks and rehearsal passed. The checker reported the same 413 TypeScript diagnostics and the same lint output as the parent. The parent also has failures in the launcher wipe guard, consensus runner and lockstep stub.
  • The rehearsal scenario also built with the pinned Bun 1.4.4. An independent Hermes review ran the final Jest suite and mutation controls, checked test discovery and the hosted Sonar result, and approved the exact commit.

…thout a signing record

Runs verifyBlock with the real foreignSignature and signingRecord modules: a block our key signed with no signing record logs the warning once; a block matching the signing record, or one without our signature, logs nothing. Each case uses its own temporary identity file.
@coderabbitai

coderabbitai Bot commented Nov 20, 2026

Copy link
Copy Markdown
Contributor

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true
  • 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

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