Skip to content

feat: implement JSDoc-based documentation validation and automated MDX generation workflow - #197

Merged
max-ostapenko merged 8 commits into
mainfrom
yappy-peacock
Aug 25, 2026
Merged

feat: implement JSDoc-based documentation validation and automated MDX generation workflow#197
max-ostapenko merged 8 commits into
mainfrom
yappy-peacock

Conversation

@max-ostapenko

@max-ostapenko max-ostapenko commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

This pull request introduces automated workflows and supporting scripts for validating and syncing JSDoc-based documentation with code. The primary focus is on ensuring documentation parity and providing a mechanism to generate and synchronize documentation with the har.fyi repository.

Example of the validated and generated docs: HTTPArchive/har.fyi#167

GitHub Actions Workflows:

  • Added a new workflow .github/workflows/docs.yml to validate JSDoc comments against code and automatically sync generated documentation to the har.fyi repository via a pull request. This workflow runs on pushes, pull requests, and can be triggered manually.
  • Updated .github/workflows/linter.yml to include a new validate-docs job that runs the documentation validation as part of the CI process.

Documentation Scripts and Tooling:

  • Added new npm scripts validate:docs and generate:docs in package.json to run documentation validation and generation tools.

…X generation workflow

Signed-off-by: Max Ostapenko <1611259+max-ostapenko@users.noreply.github.com>
…c scripts

Signed-off-by: Max Ostapenko <1611259+max-ostapenko@users.noreply.github.com>
…ric properties and nested object keys

Signed-off-by: Max Ostapenko <1611259+max-ostapenko@users.noreply.github.com>
…tion generation, and update validation tool to traverse promise chains.

Signed-off-by: Max Ostapenko <1611259+max-ostapenko@users.noreply.github.com>
…ilities for documentation validation

Signed-off-by: Max Ostapenko <1611259+max-ostapenko@users.noreply.github.com>
…e compatibility validation

Signed-off-by: Max Ostapenko <1611259+max-ostapenko@users.noreply.github.com>

@tunetheweb tunetheweb left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks mostly OK to me but have some comments.

My two main concerns would be:

  1. Will this make it less likely for contributors to want to edit custom metrics? Probably not?
  2. You're planning on migrating har.fyi to httparchive.org so if this the right time to introduce this?

Comment thread .github/workflows/docs.yml
Comment thread .github/workflows/linter.yml
Comment thread dist/ads.js
Comment thread dist/ads.js
Comment thread dist/privacy.js
Signed-off-by: Max Ostapenko <1611259+max-ostapenko@users.noreply.github.com>
@max-ostapenko

max-ostapenko commented Aug 25, 2026

Copy link
Copy Markdown
Contributor Author
  1. Will this make it less likely for contributors to want to edit custom metrics? Probably not?

That's why I decided to keep the code as-is, just require comments.
We can add a quick guide on JSDoc if there will be questions. But I hope by expanding it to other metrics will give plenty of examples.

  1. You're planning on migrating har.fyi to httparchive.org so if this the right time to introduce this?

Switching to another destination repo is not a big effort.

…mplementations

Signed-off-by: Max Ostapenko <1611259+max-ostapenko@users.noreply.github.com>
@github-actions

Copy link
Copy Markdown
https://almanac.httparchive.org/en/2022/

WPT result details

Changed custom metrics values:

{
  "_ads": {
    "ads": {
      "present": false,
      "status": 404,
      "redirected": true
    },
    "app_ads": {
      "present": false,
      "status": 404,
      "redirected": true
    },
    "sellers": {
      "present": false,
      "redirected": true,
      "status": 404
    }
  },
  "_privacy": {
    "iab_tcf_v1": {
      "present": false
    },
    "iab_tcf_v2": {
      "present": false
    },
    "iab_gpp": {
      "present": false
    },
    "iab_usp": {
      "present": false
    },
    "navigator_doNotTrack": false,
    "navigator_globalPrivacyControl": true,
    "document_permissionsPolicy": false,
    "document_featurePolicy": true,
    "referrerPolicy": {
      "entire_document_policy": null,
      "individual_requests": null,
      "link_relations": null
    },
    "request_hostnames_with_cname": {},
    "ccpa_link": {
      "hasCCPALink": false
    },
    "iab_ddr": {
      "present": false,
      "status": 404
    }
  }
}

@max-ostapenko
max-ostapenko merged commit 6bf3417 into main Aug 25, 2026
8 checks passed
@max-ostapenko
max-ostapenko deleted the yappy-peacock branch August 25, 2026 21:56
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