Skip to content

docs(api): inventory and document non-conflicting TypeScript API - #86

Draft
seonghobae wants to merge 13 commits into
mainfrom
docs/rate-limit-public-api
Draft

docs(api): inventory and document non-conflicting TypeScript API#86
seonghobae wants to merge 13 commits into
mainfrom
docs/rate-limit-public-api

Conversation

@seonghobae

@seonghobae seonghobae commented Aug 9, 2026

Copy link
Copy Markdown
Contributor

Purpose

Advance #82 with a deterministic repository-wide TypeScript export inventory plus a non-conflicting documentation slice. This branch is intentionally Draft because src/index.ts and src/worker.ts remain active source surfaces in #83/#71; it does not race those branches or pretend the repository-wide documentation requirement is complete.

Exact source identity

  • Base: main at live tip 9adb784902cae19a150146a8fadd6a0491f67814, revalidated immediately before this metadata update.
  • Head branch: docs/rate-limit-public-api.
  • Exact head: d6194f5407a33e0db0d556669c6df9d30a8c63f1.
  • Draft remains intentional until the remaining active-source documentation gaps can be integrated without racing their writers and exact-head gates are clean.

Implemented on this branch

Runtime behavior is unchanged. The branch adds or improves beginner-readable public JSDoc on non-conflicting credential-boundary modules:

  • src/rate-limit.ts: environment/decision/error contracts, trusted client identity, hashed bucket identity, distributed check, Durable Object constructor/methods, cleanup semantics;
  • src/entrypoint.ts: runtime environment, bounded exchange request, exact GitHub origin trust, bounded OIDC bearer envelope, streamed JSON byte boundary, default Worker/fetch contract;
  • src/runtime-entrypoint.ts: deployment environment and /ready-owning Worker wrapper;
  • src/outbound-fetch-policy.ts: fetch host/callable contracts, destination/request allowlists, fail-closed redirect/response-size/timeout behavior, installation/tamper detection, test-only reset;
  • src/oidc-replay.ts: replay environment/decision/errors, hashed jti object identity, atomic claim, Durable Object constructor/fetch/alarm semantics.

test/rate-limit-public-api-docs.test.ts now recursively discovers every owned src/**/*.ts file using the filesystem and parses source text with the TypeScript compiler API without importing or executing production modules. It inventories direct exported interfaces/types/classes/functions/enums/modules/variables and default exports, requires meaningful adjacent JSDoc, requires @param/@returns on discovered callable exports, and permits named re-exports only when a single documented original exists (or the re-export itself is documented). Targeted assertions retain security/trust semantics for the credential-boundary modules instead of accepting label-only comments.

Test-first lineage

The slice was developed incrementally: each newly covered module was first added to the static documentation contract while its public declarations were still undocumented, followed by a comment-only source remediation. d6194f5407a33e0db0d556669c6df9d30a8c63f1 then replaces the narrow marker-only inventory with the recursive TypeScript AST inventory required by #82. The repository-wide inventory is intentionally capable of exposing remaining active-file gaps; current CI evidence must determine the exact remaining set rather than this body asserting GREEN prematurely.

Deliberately deferred, not waived

Acceptance

Before leaving Draft, refetch unchanged exact head and independently resolved live base; resolve every inventory gap after its active writer lease clears; require exact-head typecheck/tests/100% owned production coverage/security/reviewer gates, zero valid unresolved findings, and actual Noema governance including qualifying independent approval where required. Queued/status/model evidence is not merge authority.

Related: #82, #71, #76, #83, #85

@coderabbitai

coderabbitai Bot commented Aug 9, 2026

Copy link
Copy Markdown

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 58c347bf-0246-46f3-858b-3905374e92cd

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@seonghobae seonghobae changed the title docs(api): document rate-limit public TypeScript API docs(api): inventory and document non-conflicting TypeScript API Aug 9, 2026
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.

1 participant