Skip to content

docs: restructure separate-private-types TODO into two stages - #1746

Merged
sergey-shandar merged 6 commits into
mainfrom
claude/private-ts-todo-partial-bydyc9
Aug 28, 2026
Merged

docs: restructure separate-private-types TODO into two stages#1746
sergey-shandar merged 6 commits into
mainfrom
claude/private-ts-todo-partial-bydyc9

Conversation

@sergey-shandar

@sergey-shandar sergey-shandar commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

This change reorganizes the separate-private-types.md TODO document to clarify that the work can be completed in two independent, shippable stages.

Summary

The document previously presented all requirements as a single monolithic task. This update splits the work into:

  • Stage 1 — source restructuring: file organization, type declarations, and prescriptive policy documentation
  • Stage 2 — packaging cleanup: declaration emission, artifact removal, and package validation

This staging allows Stage 1 to be completed and shipped independently, with Stage 2 following as a separate change.

Key changes

  • Added a new "Staging" section explaining the two-stage approach and why Stage 1 is independently shippable
  • Clarified that generated private.d.ts files are safe to ship during Stage 1: types.ts must not depend on private.ts, so no shipped public declaration semantically depends on private.d.ts — it is declaration noise consolidated into one file per module, covered by the existing _ leak-tolerance policy
  • Marked the "Rules" section as Stage 1 and "Declaration emission and packaging" as Stage 2, which may land separately
  • Split "Repository policy", "Tasks", and "Acceptance criteria" into Stage 1 and Stage 2 subsections with distinct success conditions
  • Distinguished the leak-tolerance contract from the prescriptions: the prescriptive documents that contradict Stage 1 (the fjs/fsc/README.md instruction to create file-scope _ typedefs, and the blocked wait-for-@internal/stripInternal TODO) are rewritten or deleted in Stage 1, not Stage 2
  • Documented the _ contract as permanent: _ helpers retained in types.ts by the public declaration closure and _ constants exported from meta/module.f.mjs keep shipping in emitted declarations after Stage 2, so Stage 2 retires only the private.d.ts tolerance

Notable details

  • Stage 1 acceptance criteria explicitly allow private.d.ts files to ship (they're removed in Stage 2)
  • The shipped-private.d.ts tolerance stays documented until Stage 2 removes the last such leak; the _ contract stays documented permanently
  • The Stage 2 PR will delete this TODO file once complete

https://claude.ai/code/session_01LqeS5t2ZKkSu3chRPMXR7n

Stage 1 covers the source restructuring (typedef prohibition, types.ts
closure, optional private.ts and meta/module.f.mjs, dependency order,
breaking migrations). Stage 2 defers the packaging cleanup: deleting
generated private.d.ts at prepack and semantic package validation.

Stage 1 is shippable alone because types.ts must not depend on
private.ts, so a shipped private.d.ts is declaration noise covered by
the existing _ leak-tolerance policy, not a semantic dependency of the
public surface.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LqeS5t2ZKkSu3chRPMXR7n
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
functionalscript fdfeb14 Commit Preview URL

Branch Preview URL
Aug 28 2026, 01:09 AM

@sergey-shandar
sergey-shandar marked this pull request as ready for review August 28, 2026 00:24
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for security reviews. Please try again later.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 57ccdf3e33

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread fjs/todo/separate-private-types.md Outdated
Stage 1 bans file-scope JSDoc typedefs, so the documents that prescribe
creating them (fjs/fsc/README.md) or waiting for @internal/stripInternal
(the blocked TODO) must be rewritten in Stage 1, not Stage 2. Only the
leak-tolerance contract for emitted _ names and shipped private.d.ts
survives until Stage 2 unships the last private declaration.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LqeS5t2ZKkSu3chRPMXR7n

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: e369f2c90b

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread fjs/todo/separate-private-types.md Outdated
Stage 2 removes only generated private.d.ts. Underscore helpers retained
in types.ts by the public declaration closure and underscore constants
exported from meta/module.f.mjs keep shipping in emitted declarations,
so the contract that emitted underscore names are not API survives
Stage 2. Narrow the Stage 2 cleanup to the private.d.ts tolerance.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LqeS5t2ZKkSu3chRPMXR7n

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: bd40ed4b28

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread fjs/todo/separate-private-types.md Outdated
todo/migrate-typescript-to-mjs.md prescribes file-scope _ typedefs and
defers to stripInternal in its migration section and visibility task,
and fjs/ci/todo/f-mjs-package-support.md repeats the prescription and
requires such a typedef in a future fixture. Both must be reconciled in
Stage 1 for its no-conflicting-prescriptions acceptance criterion to be
meetable.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LqeS5t2ZKkSu3chRPMXR7n

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: dc7f7c848e

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread fjs/todo/separate-private-types.md Outdated
Review keeps surfacing one more document that prescribes a file-scope
typedef (latest: sync-interpreter-owner.md's proposed MemoryState); an
enumerated list can never be shown complete. Make the sweep a repo-wide
search for such prescriptions, keep the known instances as illustrative
examples, and state the acceptance criterion as search-verified.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LqeS5t2ZKkSu3chRPMXR7n

@o2alexanderfedin o2alexanderfedin left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Approved. Verified at fdfeb14a4: docs-only (one file, +107/-15), npm test 3478/3478 exit 0 and tsc --noEmit exit 0 on both sides, Status: open, all 20 task boxes unchecked, all eight links and the one anchor resolve, and every new factual claim checks out — the three cited sweep targets exist and contain the described text (todo/migrate-typescript-to-mjs.md:341-361, fjs/ci/todo/f-mjs-package-support.md:163-169, fjs/effects/memory/todo/sync-interpreter-owner.md:41-47).

The two-stage split is coherent and, more to the point, stage 1's acceptance criteria at :321-346 are things a reviewer can actually apply — "verified by a repo-wide search, not by checking an enumerated list" is a definition of done, not an aspiration.

I checked the commitment I have been tracking through this document's rewrites: the task to rewrite fjs/fsc/README.md's typedef prescription and delete-or-narrow the blocked @internal todo is still a real unchecked task at :301-304, and it is still correctly open — on main, fjs/fsc/README.md:129-190 still carries the unrewritten section and todo/blocked/jsdoc-typedef-strip-internal.md still exists. Nothing dropped, nothing falsely claimed done. The "authoritative until this migration is implemented" sentence is gone, but it went in #1740 rather than here, and :33-36/:38-42 now carry the same substance.

Worth noting for anyone reading the file: #1743 was closed, not mergedfjs/ci/prepack.mjs and fjs/djs/tokenizer/private.ts do not exist on main. This restructure correctly treats that work as future stage 2 rather than describing it as shipped.

@sergey-shandar
sergey-shandar added this pull request to the merge queue Aug 28, 2026
Merged via the queue into main with commit 39b4724 Aug 28, 2026
19 checks passed
@sergey-shandar
sergey-shandar deleted the claude/private-ts-todo-partial-bydyc9 branch August 28, 2026 06:04
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.

3 participants