Skip to content

Define and adopt Phase 2b negotiated Markdown semantics, rework and complete test coverage, and more#9632

Merged
chalin merged 16 commits intoopen-telemetry:mainfrom
chalin:chalin-m24-md-nego-report-all-2026-0411
Apr 13, 2026
Merged

Define and adopt Phase 2b negotiated Markdown semantics, rework and complete test coverage, and more#9632
chalin merged 16 commits intoopen-telemetry:mainfrom
chalin:chalin-m24-md-nego-report-all-2026-0411

Conversation

@chalin
Copy link
Copy Markdown
Contributor

@chalin chalin commented Apr 11, 2026

  • Contributes to Address site observability and data access #9559
  • Fixes Registry-path redirect resolution loops when request uses Accept: text/markdown #9633 by adding an edge function to handle legacy component redirects, dropping the Netlify redirect-rule "hack"
  • Defines and adopts Phase 2b negotiated Markdown semantics by returning the Markdown subresponse directly and emitting asset_fetch for Markdown-preferring GET and HEAD requests across returned 2xx, 3xx, 4xx, and 5xx statuses
  • Switches internal Markdown fetches to redirect: 'manual' so negotiated redirect responses are observable and can be surfaced directly
  • Expands unit and live coverage for negotiated GET and HEAD success, redirect, and failure cases
  • Adds dedicated redirect fixtures under /site/testing/tests/ plus site-level redirect live checks for low-impact verification of redirect behavior
  • Extracts shared live-check helpers/runners into tests/lib and adds grouped node:test runners for edge-function live checks and the combined edge-function plus redirect live suite
  • Enables Markdown output for /search and /ecosystem/registry/ so those routes can participate in negotiated Markdown delivery
  • Updates the markdown-negotiation README and the asset-fetch analytics plan, including the Phase 2b decision and coverage tables
  • Records the follow-up to add a dedicated Markdown-friendly registry template if registry Markdown output is kept
  • Scaffolds negotiated alias-redirect live checks and skips two of them pending a fix to alias redirect code
  • Adds a workflow to run the edge function tests, via test:compound-tests

Preview:


✅ Live tests pass

Details
$ npm run test:all:live -- 9632           

> test:all:live
> npm run _test:all:live -- 9632


> _test:all:live
> node tests/live-check.mjs 9632

[live-check] https://deploy-preview-9632--opentelemetry.netlify.app
▶ edge-functions
  ▶ markdown-negotiation
    ✔ GET /site/testing/tests/regular/ with Accept: text/markdown → markdown + Vary: Accept (242.454459ms)
    ✔ GET /site/testing/tests/regular/ with Accept: text/markdown → X-Asset-Fetch-Ga-Info header (36.475417ms)
    ✔ GET same URL with HTML preferred → HTML (173.356125ms)
    ✔ GET /site/testing/tests/regular/index.html with Accept: text/markdown → markdown + Vary: Accept (83.106875ms)
    ﹣ GET /site/testing/tests/regular/index.HTML with Accept: text/markdown → redirect (0.085292ms) # Deferred while clarifying Netlify handling of uppercase index.HTML paths
    ✔ GET /site/testing/tests/no-md/ with Accept: text/markdown → direct 404 subresponse + Vary: Accept (89.3925ms)
    ﹣ GET /site/testing/tests/redirect-regular/ with Accept: text/markdown → direct redirect subresponse + Vary: Accept (0.097167ms) # Pending a fix to alias redirect code
    ﹣ GET /site/testing/tests/redirect-no-md/ with Accept: text/markdown → direct redirect subresponse + Vary: Accept (0.05825ms) # Pending a fix to alias redirect code
    ✔ HEAD /site/testing/tests/regular/ with Accept: text/markdown → empty body (95.745542ms)
    ✔ HEAD /site/testing/tests/no-md/ with Accept: text/markdown → direct 404 subresponse without a body (109.798792ms)
    ✔ HEAD same URL with HTML preferred → pass-through response (143.591041ms)
    ✔ GET /docs.html → redirect toward /docs/ (382.598917ms)
  ✔ markdown-negotiation (1357.906916ms)
  ▶ asset-tracking
    ✔ GET explicit .md path → markdown response (126.852916ms)
    ✔ GET explicit .md path → X-Asset-Fetch-Ga-Info header (82.464458ms)
    ✔ HEAD explicit .md path → success with empty body (137.836875ms)
    ✔ GET explicit .md path with internal marker → same markdown response (76.625417ms)
    ✔ GET explicit .txt path → text response (79.407458ms)
    ✔ GET explicit .txt path with internal marker → same text response (29.518625ms)
  ✔ asset-tracking (533.47575ms)
  ▶ schema-analytics
    ✔ GET /schemas/1.40.0 → YAML response (57.513334ms)
    ✔ GET /schemas/1.40.0 → X-Asset-Fetch-Ga-Info header (91.381ms)
    ✔ HEAD /schemas/1.40.0 → success with empty body (32.166584ms)
    ✔ GET /schemas/latest → redirect (32.166833ms)
    ✔ GET /schemas/does-not-exist → not found (91.061459ms)
  ✔ schema-analytics (304.72125ms)
✔ edge-functions (2196.502917ms)
▶ redirects
  ✔ GET /docs.html → redirect toward /docs/ (89.944125ms)
  ✔ HEAD /docs.html → redirect toward /docs/ (120.458791ms)
  ✔ GET /site/testing/tests/regular-alias/ → redirect toward canonical page (108.795458ms)
  ✔ GET /site/testing/tests/no-md-alias/ → redirect toward canonical page (138.894917ms)
✔ redirects (458.705917ms)
ℹ tests 32
ℹ suites 0
ℹ pass 29
ℹ fail 0
ℹ cancelled 0
ℹ skipped 3
ℹ todo 0
ℹ duration_ms 2743.715208

@chalin chalin requested a review from a team as a code owner April 11, 2026 19:44
@otelbot-docs otelbot-docs bot added the missing:docs-approval Co-owning SIG has provided approval, PR needs approval from docs maintainer label Apr 11, 2026
@github-actions github-actions bot added the dependencies Pull requests that update a dependency file label Apr 12, 2026
@otelbot-docs otelbot-docs bot requested a review from a team April 12, 2026 09:16
@github-actions github-actions bot added the CI/infra Repo CI & infrastructure label Apr 12, 2026
@chalin chalin force-pushed the chalin-m24-md-nego-report-all-2026-0411 branch from 5f1d2e8 to 1de0364 Compare April 12, 2026 09:20
@otelbot-docs otelbot-docs bot added ready-to-be-merged This PR is ready to be merged by a maintainer and removed missing:docs-approval Co-owning SIG has provided approval, PR needs approval from docs maintainer labels Apr 13, 2026
@chalin chalin added this pull request to the merge queue Apr 13, 2026
Merged via the queue into open-telemetry:main with commit 08e4eec Apr 13, 2026
25 checks passed
@chalin chalin deleted the chalin-m24-md-nego-report-all-2026-0411 branch April 13, 2026 08:54
tiffany76 pushed a commit to tiffany76/opentelemetry.io that referenced this pull request Apr 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CI/infra Repo CI & infrastructure dependencies Pull requests that update a dependency file ready-to-be-merged This PR is ready to be merged by a maintainer

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Registry-path redirect resolution loops when request uses Accept: text/markdown

2 participants