Skip to content

fix: repair stale/broken links across 4 READMEs - #666

Merged
dev-jodee merged 2 commits into
solana-foundation:mainfrom
NikkiAung:fix/stale-broken-doc-links
Aug 5, 2026
Merged

fix: repair stale/broken links across 4 READMEs#666
dev-jodee merged 2 commits into
solana-foundation:mainfrom
NikkiAung:fix/stale-broken-doc-links

Conversation

@NikkiAung

Copy link
Copy Markdown
Contributor

Summary

Ran a systematic sweep over every README.md/readme.MD/*.mdx in the repo — 47 markdown files, 119 relative links extracted and resolved against disk — and found 4 files with genuinely broken content. Each was verified by hand against the current source it's supposed to document (not just a link-existence check).

  • basics/close-account/anchor/README.md — the program was renamed from destroy-an-account to close-account (directory, file names, and implementation approach all changed — close_user.rs now uses a declarative close = user account constraint instead of the old imperative .close() call), but the README was never updated. This is the meatiest fix: 3 dead links, 2 stale code snippets rewritten to match current source, and the test-description prose corrected (the old README described checking fetchNullable both before creation and after closing; the current test only checks null after closing).
  • basics/favorites/anchor/README.md — link text and URL were swapped: [url](text) instead of [text](url).
  • tokens/transfer-tokens/README.md — links to tokens/spl-token-minter and tokens/nft-minter, neither of which exists. Repointed to the current equivalents covering the same topics: tokens/create-token and tokens/nft-operations.
  • tokens/token-2022/nft-meta-data-pointer/README.md — a copy-paste artifact had merged two separate links into one broken nested construct; restored the single intended cookbook link.

All docs-only, zero code/build risk.

Test plan

  • Re-ran the link-resolution sweep after editing — 0 broken relative links out of 119 (down from 7 broken across these 4 files before)
  • Verified every replacement target exists with exact case via git ls-files (what Linux CI sees, not macOS's case-insensitive filesystem)
  • Manually re-read close-account/anchor/README.md end-to-end against create_user.rs, close_user.rs, and tests/test.ts to confirm the rewritten snippets/prose are accurate to current code
  • Repo-wide search for other references to the old renamed paths (destroy-an-account, spl-token-minter, nft-minter) — none found outside these files

Systematic sweep over every README.md/readme.MD/*.mdx in the repo
(47 files, 119 relative links extracted and resolved against disk)
found 4 files with genuinely broken content, each verified by hand
against the current source it documents:

- basics/close-account/anchor/README.md: the program was renamed
  from destroy-an-account to close-account (dir, file names, and
  implementation approach all changed - close_user.rs now uses a
  declarative `close = user` account constraint instead of the old
  imperative `.close()` call) but the README was never updated.
  Fixes 3 dead links and rewrites 2 stale code snippets plus the
  test-description prose to match what tests/test.ts actually does.
- basics/favorites/anchor/README.md: link text and URL were swapped
  ([url](text) instead of [text](url)).
- tokens/transfer-tokens/README.md: links to tokens/spl-token-minter
  and tokens/nft-minter, neither of which exist; repointed to the
  current equivalents, tokens/create-token and tokens/nft-operations.
- tokens/token-2022/nft-meta-data-pointer/README.md: a copy-paste
  artifact had merged two separate links into one broken nested
  construct; restored the intended single link.

Verified: re-ran the link sweep after editing - 0 broken links out
of 119 (down from 7 broken across these 4 files before).
@NikkiAung
NikkiAung requested a review from dev-jodee as a code owner August 5, 2026 00:04
@greptile-apps

greptile-apps Bot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

The PR repairs stale or malformed documentation links and updates the close-account tutorial to match the current implementation.

  • Renames stale close-account references and synchronizes its snippets and test description with the current source.
  • Corrects malformed links in the Favorites and Token-2022 documentation.
  • Replaces removed token-example links and accurately describes the replacement examples as related resources.

Confidence Score: 5/5

The documentation-only PR appears safe to merge.

No blocking failure remains.

Important Files Changed

Filename Overview
basics/close-account/anchor/README.md Updates paths, snippets, terminology, and test prose to document the current close-account Anchor example.
basics/favorites/anchor/README.md Corrects the reversed Markdown syntax for the course link.
tokens/token-2022/nft-meta-data-pointer/README.md Repairs the malformed nested Markdown link to the Solana cookbook.
tokens/transfer-tokens/README.md Replaces stale example links and resolves the prior overstatement by describing the targets as related token and NFT examples.

Reviews (2): Last reviewed commit: "fix(#666): stop overpromising ATA covera..." | Re-trigger Greptile

Comment thread tokens/transfer-tokens/README.md Outdated
You can use the `transfer()` function provided by the SPL Token Program to conduct a transfer of any SPL Token with the appropriate permissions.

Check out [SPL Token Minter](../spl-token-minter) or [NFT Minter](../nft-minter) to learn more about Associated Token Accounts.
Check out [Create an SPL Token](../create-token) or [NFT Operations](../nft-operations) to learn more about Associated Token Accounts.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P2 Links overstate ATA coverage

The changed sentence directs readers to these examples to learn about Associated Token Accounts, but create-token does not cover ATAs and nft-operations only uses them incidentally. Describe them as related token and NFT examples instead so readers are not promised an explanation the targets do not provide.

Suggested change
Check out [Create an SPL Token](../create-token) or [NFT Operations](../nft-operations) to learn more about Associated Token Accounts.
Check out [Create an SPL Token](../create-token) and [NFT Operations](../nft-operations) for related token creation and NFT examples.

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

…er-tokens README

Greptile review caught it: neither create-token nor nft-operations
actually explains Associated Token Accounts (verified - neither
README mentions ATAs at all), so pointing readers there "to learn
more about Associated Token Accounts" was inaccurate. Reworded to
describe them as related examples instead.
@NikkiAung

Copy link
Copy Markdown
Contributor Author

Good catch — neither example actually explains ATAs, so that was overpromising. Reworded per your suggestion in 3352271.

@dev-jodee
dev-jodee merged commit b4847c2 into solana-foundation:main Aug 5, 2026
19 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