Skip to content

docs: warn that witnesses are test-only and not a published artifact#529

Merged
0xisk merged 1 commit into
mainfrom
chore/move-witneeses-followup
May 29, 2026
Merged

docs: warn that witnesses are test-only and not a published artifact#529
0xisk merged 1 commit into
mainfrom
chore/move-witneeses-followup

Conversation

@0xisk
Copy link
Copy Markdown
Member

@0xisk 0xisk commented May 29, 2026

Types of changes

What types of changes does your code introduce to OpenZeppelin Midnight Contracts?
Put an `` in the boxes that apply

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation Update (if none of the other choices apply)

Fixes #???

PR Checklist

Further comments

If this is a relatively large or complex change, kick off the discussion by explaining why you chose the solution you did and what alternatives you considered, etc...

Summary by CodeRabbit

  • Chores
    • Updated documentation headers across test witness files to clarify they are test-only materials for off-chain testing and must not be used in production environments.

Review Change Stack

Replaces the SPDX-License-Identifier and OpenZeppelin path-stamp
header on each moved witness with a four-line disclaimer that flags
the file as unaudited reference material, used only to drive Compact
circuits during off-chain tests, and not shipped as a consumable
artifact. Production consumers must author and audit their own.

Mirrors the root-README callout added in d3dadbd and addresses
review feedback that these files should not carry an MIT header or
look like production-grade code.
@0xisk 0xisk requested review from a team as code owners May 29, 2026 06:56
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 29, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 906b85d7-a7b0-4735-938d-2d0a20a46763

📥 Commits

Reviewing files that changed from the base of the PR and between 719f29b and 9deb1fb.

📒 Files selected for processing (11)
  • contracts/src/access/test/witnesses/AccessControlWitnesses.ts
  • contracts/src/access/test/witnesses/OwnableWitnesses.ts
  • contracts/src/access/test/witnesses/ShieldedAccessControlWitnesses.ts
  • contracts/src/access/test/witnesses/ZOwnablePKWitnesses.ts
  • contracts/src/archive/test/witnesses/ShieldedTokenWitnesses.ts
  • contracts/src/security/test/witnesses/InitializableWitnesses.ts
  • contracts/src/security/test/witnesses/PausableWitnesses.ts
  • contracts/src/token/test/witnesses/FungibleTokenWitnesses.ts
  • contracts/src/token/test/witnesses/MultiTokenWitnesses.ts
  • contracts/src/token/test/witnesses/NonFungibleTokenWitnesses.ts
  • contracts/src/utils/test/witnesses/UtilsWitnesses.ts

Walkthrough

This PR updates file header comments across 11 witness test modules in the access, archive, security, token, and utils contracts. The changes replace SPDX license and version banners with explicit "TEST-ONLY WITNESS" disclaimers clarifying that the materials are unaudited reference content for off-chain tests and must not be used as production artifacts.

Changes

Test-Only Witness Header Updates

Layer / File(s) Summary
Test-only witness header documentation
contracts/src/access/test/witnesses/AccessControlWitnesses.ts, OwnableWitnesses.ts, ShieldedAccessControlWitnesses.ts, ZOwnablePKWitnesses.ts, contracts/src/archive/test/witnesses/ShieldedTokenWitnesses.ts, contracts/src/security/test/witnesses/InitializableWitnesses.ts, PausableWitnesses.ts, contracts/src/token/test/witnesses/FungibleTokenWitnesses.ts, MultiTokenWitnesses.ts, NonFungibleTokenWitnesses.ts, contracts/src/utils/test/witnesses/UtilsWitnesses.ts
File headers across all witness modules are updated to replace SPDX identifiers and version banners with "TEST-ONLY WITNESS" disclaimers describing unaudited reference material for off-chain tests. No exported types, witness logic, or functionality is altered.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Possibly related PRs

Suggested reviewers

  • andrew-fleming

Poem

🐰 Headers hop and banners bounce,
Test witnesses now loud announce,
"Not for prod!" they proudly shout,
Off-chain only, there's no doubt!
Clean, clear, and audit-free,
Reference code as it should be! ✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and specifically describes the main change: updating documentation headers on witness test files to add warnings that they are test-only and not published artifacts.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/move-witneeses-followup

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

ESLint skipped: no ESLint configuration detected in root package.json. To enable, add eslint to devDependencies.


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

@0xisk 0xisk merged commit 78a5c61 into main May 29, 2026
9 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.

2 participants