Repository navigation
feat(doc): the documentation is world-readable — /Doc links unfurl, docs get indexed - #2838
Conversation
…olicy Mesh links pasted into Teams/Slack/LinkedIn unfurl only for pages an ANONYMOUS crawler may read — SeoResolver fails closed through the AnonymousGate, which is right. Doc was gated to authenticated users (Public→Viewer reaches no logged-out visitor), so every shared /Doc/… link arrived as a bare URL and the docs were invisible to search. Doc/_Policy now carries PublicRead = true — the grant-to-everyone bit whose own XML docs name Documentation as the intended user. The docs GitSync from the public MeshWeaver repository, so anonymous read reveals nothing not already on github.com. CUD stays false; the Public→Viewer grant stays so signed-in users keep comment/thread. Also adds Doc/Architecture/LinkPreviews — the investigation's findings as a doc page: the two features both answering to "OG card" (outbound SEO head vs the inbound OgCard layout area), the anonymous-read rule, the PublicRead opt-in shape, and the curl check that stands in for pasting a link into chat. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QoG4USP5fd8wsxCD7e9q4x
There was a problem hiding this comment.
Pull request overview
This PR makes the Documentation partition (/Doc) anonymously readable by seeding Doc/_Policy with PublicRead = true, enabling Open Graph link unfurling (og:* head + /api/og/{path}.png) and crawler indexing for docs that are already public via GitHub.
Changes:
- Seed
Doc/_PolicywithPublicRead = truewhile keeping C/U/D capped off and preserving the signed-in Public→Viewer grant for comments/threads. - Add a regression test ensuring anonymous users have Read (and no C/U/D) on
Docroot and a representative doc page. - Add a new architecture doc page explaining link preview behavior and the anonymous-read gate.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| test/MeshWeaver.Content.Test/SyncedPartitionReadOnlyTest.cs | Adds coverage for anonymous-read permissions on /Doc (root + a page). |
| src/MeshWeaver.Documentation/DocumentationExtensions.cs | Seeds Doc/_Policy with PublicRead = true to make docs world-readable. |
| src/MeshWeaver.Documentation/Data/Architecture/LinkPreviews.md | Documents how outbound link previews work and why anonymous-read is required. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Test Results (shard 0)792 tests 788 ✅ 4m 30s ⏱️ Results for commit a535bbf. ♻️ This comment has been updated with latest results. |
Test Results (shard 1)951 tests 951 ✅ 5m 13s ⏱️ Results for commit a535bbf. ♻️ This comment has been updated with latest results. |
Test Results (shard 4)1 085 tests 1 085 ✅ 5m 18s ⏱️ Results for commit a535bbf. ♻️ This comment has been updated with latest results. |
Test Results (shard 3)1 186 tests 1 186 ✅ 8m 1s ⏱️ Results for commit a535bbf. ♻️ This comment has been updated with latest results. |
Test Results (shard 5) 8 files 8 suites 5m 31s ⏱️ Results for commit a535bbf. ♻️ This comment has been updated with latest results. |
Test Results (shard 2)3 025 tests 2 833 ✅ 5m 58s ⏱️ Results for commit a535bbf. ♻️ This comment has been updated with latest results. |
Test Results 44 files 44 suites 34m 34s ⏱️ Results for commit a535bbf. ♻️ This comment has been updated with latest results. |
This red is not yours — and it is a RECURRENCE of a flake the tree believes it fixedTriaged while draining the merge queue. Shard 2's failure is: A documentation PR cannot reach the kernel script language service, so this is not attributable to the diff. 🚨 Why it is worth more than a re-runThat test is named verbatim in
#2769 is already merged ( That is informative rather than disappointing, because it narrows the remaining cause. The fix removed the permanent freeze; it cannot remove the transient one. A fresh composition still only sees what is loaded at that instant, so a completion computed before the assembly carrying "Mesh" has lazily loaded still shorts the symbol. Under parallel shard load that window is real. So the residue is a startup-ordering race, not a caching bug — and the fix that would close it is different in kind: the completion path has to wait for (or force) the assembly set it depends on, rather than sample whatever is loaded. There is no open issue for it — #2616 is closed and was about One more thing in the same log, unexplainedI have not chased it and it may be benign, but it appears in both jobs and it is the kind of line that matters given tonight's registry trouble. Flagging rather than asserting. What I would do with this PRNothing to fix here. The shard is red on an unrelated, pre-existing flake with a named mechanism — so a re-run is diagnosis-backed, not the hope-based re-run AGENTS.md forbids. Worth saying so explicitly in the PR record, and worth filing the recurrence separately so the next occurrence is the second data point rather than the first again. |
Requested by the maintainer: mesh links pasted into Teams show no card. The outbound SEO pipeline (SeoHead +
/api/og/{path}.png) is live and complete — measured today, all 81 store covers on memex serve full OG cards anonymously — butSeoResolverfails closed through theAnonymousGate, so only anonymous-readable pages unfurl./Docwasn't one: its seeded policy granted Viewer toPublic(all authenticated users) and never carriedPublicRead.Change
Doc/_Policy(code-seeded inDocumentationExtensions) gainsPublicRead = true— exactly the shapePartitionAccessPolicy.PublicRead's own docs name Documentation as the intended user of. The docs GitSync from this public repository, so an anonymous reader learns nothing that is not already on github.com. CUD stays false; thePublic→Viewergrant stays for the signed-in comment/thread surface.Everything downstream keys off this one bit: the crawler-facing head (
og:*, JSON-LD), the/api/ogshare card,<noscript>content for indexing.Also:
Doc/Architecture/LinkPreviewsA new doc page conserving today's investigation — the two features both called "OG card" (outbound SEO head vs the inbound
OgCardlayout-area package), the anonymous-read rule and why a private page must never unfurl, thePublicReadopt-in shape, and how to verify an unfurl with curl instead of pasting into chat. Pairs with MeshWeaver.Plugins (OgCard package description fix +og:site_nameempty-string fix).Tests
SyncedPartitionReadOnlyTestgainsDoc_IsAnonymouslyReadable(root + a page): anonymous holds Read and never C/U/D. Suite: 6/6 passed.🤖 Generated with Claude Code
https://claude.ai/code/session_01QoG4USP5fd8wsxCD7e9q4x