docs: add JSDoc to all re-exported symbols — api-documented 0% → 100%#65
Conversation
Co-authored-by: kayodebristol <3579196+kayodebristol@users.noreply.github.com> Agent-Logs-Url: https://github.com/plures/chronos/sessions/1b155ddc-7123-4c54-b553-2ba67ea63107
Co-authored-by: kayodebristol <3579196+kayodebristol@users.noreply.github.com> Agent-Logs-Url: https://github.com/plures/chronos/sessions/1b155ddc-7123-4c54-b553-2ba67ea63107
There was a problem hiding this comment.
Pull request overview
Improves API documentation coverage by attaching JSDoc blocks at the re-export site for symbols that are otherwise invisible to the api-documented evaluator.
Changes:
- Add per-symbol JSDoc blocks for
withCauseandcurrentCausere-exports insrc/index.jsandsrc/chronicle.js. - Add JSDoc (
@type {object}+@example) for the four named Praxis module re-exports insrc/praxis.js. - Bump
@plures/praxisinpackage-lock.jsonto match the updated dependency range.
Reviewed changes
Copilot reviewed 3 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| src/index.js | Adds JSDoc blocks directly on withCause/currentCause re-exports so documentation coverage counts them. |
| src/chronicle.js | Same as src/index.js, but for the @plures/chronos/chronicle entrypoint. |
| src/praxis.js | Documents the four named module re-exports (*Module) with @type + examples at the export site. |
| package-lock.json | Updates the lockfile entry for @plures/praxis to ^2.4.27. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| * Re-exported from `@plures/chronos/causal` for convenience. | ||
| * | ||
| * @param {string} causeId - ID of the parent node to set as the active cause | ||
| * @param {Function} fn - Synchronous or async function to execute inside the scope |
There was a problem hiding this comment.
JSDoc uses @param {Function} fn here, but elsewhere (e.g. src/causal.js) the project documents function parameters with the lowercase {function} type. Consider changing this to {function} for consistency (and to avoid any doc-tool quirks around the built-in Function constructor type).
| * @param {Function} fn - Synchronous or async function to execute inside the scope | |
| * @param {function} fn - Synchronous or async function to execute inside the scope |
| * Re-exported from `@plures/chronos/causal` for convenience. | ||
| * | ||
| * @param {string} causeId - ID of the parent node to set as the active cause | ||
| * @param {Function} fn - Synchronous or async function to execute inside the scope |
There was a problem hiding this comment.
JSDoc uses @param {Function} fn here, but elsewhere (notably src/causal.js) function parameters are typed as lowercase {function}. Aligning to {function} would keep the public re-export docs consistent with the source API docs and avoid any tooling differences between Function vs function.
| * @param {Function} fn - Synchronous or async function to execute inside the scope | |
| * @param {function} fn - Synchronous or async function to execute inside the scope |
kayodebristol
left a comment
There was a problem hiding this comment.
Auto-approved: CI green + Copilot code review complete.
The
api-documenteddimension repeatedly regresses to 0% because JSDoc tooling measures coverage at the export site, not the original declaration. Bare re-exports (export { withCause, currentCause }) were invisible to the evaluator even when the underlying implementation was fully documented.Changes
src/index.js— splitexport { withCause, currentCause }into two separate statements; add full@param/@returns/@exampleJSDoc to eachsrc/chronicle.js— same fix asindex.jssrc/praxis.js— add@type {object}+@exampleto all four named module re-exports (diffClassificationModule,retentionPolicyModule,alertingModule,integrityModule)Coverage after: 56/56 exports with
@exampleand@returns/@type(was 49/57 = 86%).Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
dl.deno.land/usr/bin/curl curl -s REDACTED(dns block)If you need me to access, download, or install something from one of these locations, you can either:
Original prompt
📱 Kick off Copilot coding agent tasks wherever you are with GitHub Mobile, available on iOS and Android.