Skip to content

Commit aede507

Browse files
authored
docs: fix broken MessageDelivery API reference links in state_variables.md (#23801)
## What Fixes the 3 broken API reference links flagged by the docs `validate:api-ref-links` checker (reported in #docs-alerts against PR #23695): ``` docs-developers/docs/aztec-nr/framework-description/state_variables.md -> aztec-nr-api/mainnet/noir_aztec/messages/message_delivery/struct.MessageDelivery ``` ## Why they were broken (validated) The links targeted `struct.MessageDelivery#method.{onchain_constrained,onchain_unconstrained,offchain}`. In the docs build `#api_ref_version` resolves to **`mainnet`** (v4.3.0), and the committed `static/aztec-nr-api/mainnet/` snapshot does **not** contain `struct.MessageDelivery.html`. In v4.3.0 the symbol is exposed as a global: - `noir_aztec/messages/message_delivery/global.MessageDelivery.html` ✓ (exists) - `noir_aztec/messages/message_delivery/struct.MessageDeliveryEnum.html` ✓ (exists) - `noir_aztec/messages/message_delivery/struct.MessageDelivery.html` ✗ (does not exist) The page source was updated to describe the newer method-based `MessageDelivery` struct API (which matches current `next` code and the `#include_code` example on the page), but `#api_ref_version` still pins API-ref links to the released mainnet snapshot, so `struct.MessageDelivery` 404s. The prose/examples are left unchanged because they correctly match the current code. These links are **pre-existing on `next`**; PR #23695 only touches governance/token docs and did not introduce them — the checker simply surfaced them on that PR. ## Fix Repoint the three links to `global.MessageDelivery`, the page that documents `MessageDelivery` in the pinned mainnet API. The per-method anchors are dropped since the global page has none. ## Validation `scripts/validate_api_ref_links.sh` over the preprocessed page (with `#api_ref_version` resolved to `mainnet`): - Before: `Broken links: 3` - After: `Broken links: 0` (`Version mismatches: 0`) --- *Created by [claudebox](https://claudebox.work/v2/sessions/97d92d02ac088b2d) · group: `slackbot`*
2 parents 48cdee3 + be3cd56 commit aede507

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

docs/docs-developers/docs/aztec-nr/framework-description/state_variables.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -273,9 +273,9 @@ When working with private state variables, many operations return a `NoteMessage
273273
#### Delivery Methods
274274

275275
Private notes need to be communicated to their recipients so they know the note exists and can use it. The [`NoteMessage`](pathname:///aztec-nr-api/#api_ref_version/noir_aztec/note/struct.NoteMessage) wrapper forces you to make an explicit choice about how this happens:
276-
- [`MessageDelivery::onchain_constrained()`](pathname:///aztec-nr-api/#api_ref_version/noir_aztec/messages/message_delivery/struct.MessageDelivery#method.onchain_constrained): Verified in the circuit (most secure, but highest cost) - Use when the sender cannot be trusted to deliver correctly (e.g., protocol fees, multisig config updates). **Warning:** Currently [not fully constrained](https://github.com/AztecProtocol/aztec-packages/issues/14565) - the log's tag is unconstrained.
277-
- [`MessageDelivery::onchain_unconstrained()`](pathname:///aztec-nr-api/#api_ref_version/noir_aztec/messages/message_delivery/struct.MessageDelivery#method.onchain_unconstrained): Message stored onchain but no guarantees on content - Use when the sender is incentivized to deliver correctly but may not have an offchain channel to the recipient.
278-
- [`MessageDelivery::offchain()`](pathname:///aztec-nr-api/#api_ref_version/noir_aztec/messages/message_delivery/struct.MessageDelivery#method.offchain): Lowest cost, no onchain data - Use when the sender and recipient can communicate and the sender is incentivized to deliver correctly.
276+
- [`MessageDelivery::onchain_constrained()`](pathname:///aztec-nr-api/#api_ref_version/noir_aztec/messages/message_delivery/global.MessageDelivery): Verified in the circuit (most secure, but highest cost) - Use when the sender cannot be trusted to deliver correctly (e.g., protocol fees, multisig config updates). **Warning:** Currently [not fully constrained](https://github.com/AztecProtocol/aztec-packages/issues/14565) - the log's tag is unconstrained.
277+
- [`MessageDelivery::onchain_unconstrained()`](pathname:///aztec-nr-api/#api_ref_version/noir_aztec/messages/message_delivery/global.MessageDelivery): Message stored onchain but no guarantees on content - Use when the sender is incentivized to deliver correctly but may not have an offchain channel to the recipient.
278+
- [`MessageDelivery::offchain()`](pathname:///aztec-nr-api/#api_ref_version/noir_aztec/messages/message_delivery/global.MessageDelivery): Lowest cost, no onchain data - Use when the sender and recipient can communicate and the sender is incentivized to deliver correctly.
279279

280280
#include_code note_delivery /noir-projects/noir-contracts/contracts/app/private_token_contract/src/main.nr rust
281281

0 commit comments

Comments
 (0)