Skip to content

fix: serve Markdown for every TIP - #8

Open
decofe wants to merge 2 commits into
wevm:mainfrom
decofe:centaur/complete-markdown-coverage-1792342995
Open

decofe wants to merge 2 commits into
wevm:mainfrom
decofe:centaur/complete-markdown-coverage-1792342995

Conversation

@decofe

@decofe decofe commented Oct 18, 2026

Copy link
Copy Markdown
Contributor

Some TIP proposals use suffixed or title-based IDs, but the Markdown router only accepts digits. Requests such as /1061-1.md can fall through to HTML instead of returning the proposal as Markdown.

Serve explicit /<id>.md and negotiated Accept: text/markdown responses from the same TIP lookup and inventory as HTML. Preserve frontmatter, tables, code, math, and Mermaid source; resolve relative links and assets against the appropriate TIP or PR. Add /llms.txt and /index.md with links to every synced proposal, including variants.

Unknown Markdown IDs return 404 and export/database failures return 503. Explicit Markdown URLs remain independently cacheable. Negotiated HTML/Markdown URLs use Vary: Accept, User-Agent and private, no-store because Cloudflare's default cache key does not separate those headers; the existing HTML rendering cache in KV is retained.

Add PR test checks and deployment verification against hashes generated by the intended sync, so a stale remote manifest cannot validate stale content.

Validation:

  • pnpm check, pnpm check:types, pnpm test (33 tests), and pnpm build passed.
  • The built Worker with local D1 passed explicit and negotiated Markdown, content hash, and discovery checks for 60 source TIP documents plus two synthetic variant/slug entries.
  • Local Worker smoke checks passed for browser and Slack preview HTML, cache headers, HEAD, unknown IDs, legacy redirects, and rejection of a deliberately stale manifest.

Production verification runs after merge and deployment; this PR has not been deployed.

Prompted by: @brendanjryan

Co-authored-by: Derek Cofausper <256792747+decofe@users.noreply.github.com>
@socket-security

socket-security Bot commented Oct 18, 2026 •

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Addedremark-frontmatter@​5.0.010010010083100

View full report

Co-authored-by: Derek Cofausper <256792747+decofe@users.noreply.github.com>
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