Skip to content

Migrate fjs/ci/nix to .f.mjs - #1493

Merged
sergey-shandar merged 8 commits into
mainfrom
claude/convert-f-ts-to-f-mjs-13
Aug 11, 2026
Merged

Migrate fjs/ci/nix to .f.mjs#1493
sergey-shandar merged 8 commits into
mainfrom
claude/convert-f-ts-to-f-mjs-13

Conversation

@sergey-shandar

Copy link
Copy Markdown
Contributor

Summary

  • Migrates fjs/ci/nix/module.f.ts from authored TypeScript to JSDoc-typed .f.mjs, per todo/migrate-typescript-to-mjs.md.
  • Splits the public NixJob type into a sibling types.ts.
  • proof.f.ts stays TypeScript for now — it has runtime dependencies on effects/node/virtual/module.f.ts and ci/node/module.f.ts, both still unmigrated.
  • Updates the two dependents (fjs/ci, fjs/ci/node) to import runtime values from .f.mjs and types from types.ts separately, and fixes stale module.f.ts doc references across three files, including two with stale line-number citations.

Test plan

  • npx tsc --noEmit clean
  • node ./fjs/module.ts t — 2357/2357 pass

Generated by Claude Code

claude added 2 commits August 11, 2026 20:56
Updates the two dependents (fjs/ci, fjs/ci/node) to import runtime
values from .f.mjs and types from types.ts separately, and fixes
stale module.f.ts doc references including two with stale
line-number citations.
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Aug 11, 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 a085863 Commit Preview URL

Branch Preview URL
Aug 11 2026, 09:26 PM

claude added 2 commits August 11, 2026 21:03
No local types to split; proof.f.ts migrates alongside it since its
only dependencies (ci/common, asserts) are already migrated. Updates
three dependents (ci, ci/nix's module and proof) and fixes stale
module.f.ts doc references, including two with stale line-number
citations.
proof.f.ts stays TypeScript for now: it has runtime dependencies on
effects/node/virtual/module.f.ts and media/json/module.f.ts, both
still unmigrated. Updates the fjs/module.f.ts dependent and fixes
stale module.f.ts doc references across eight files, including one
with a stale line-number citation. Verified npm run ci-update
produces no drift in the generated workflow.

@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.

Approving. Reviewed at 5c07521 against main (caa5894). Three modules — fjs/ci, fjs/ci/nix, fjs/ci/node.

The generated CI workflow doesn't move

fjs/ci is the generator for this repo's own workflow, so behaviour preservation is checkable at the output rather than only at the source: I ran npm run ci-update on the branch and git status came back empty. The workflow the migrated generator produces is byte-for-byte what is committed.

Source-level equivalence

fjs/ci and fjs/ci/nix are token-identical to main's compiled output. fjs/ci/node differs by exactly one thing — a parameter rename inside the non-exported installNode (versionv) — which cannot be observed from outside the module.

The two changed declarations are both inert:

  • ci: ({ nodeExtra }: Setup)(setup: Setup) — parameter name only, same type.
  • nodeMainSteps: typeof platformNodeSteps(version: string) => readonly MetaStep[]. I checked these are the same type and they are: main emits platformNodeSteps: (version: string) => readonly MetaStep[] and nodeMainSteps: typeof platformNodeSteps, so the branch just spells the expansion. Unlike an alias being dropped, nothing is orphaned here — typeof queries a value, not a named type, and platformNodeSteps is still exported and still referenced.

Everything else

  • npx tsc clean; 2357 pass / 0 fail, matching main.
  • Public API: 0 removed, 0 added, and the two changed entries are the ones above.
  • No any as a type in any emitted declaration.
  • Links 144/144, none added, 0 label/target mismatches.
  • Both new types.ts files keep their @module header through emit.
  • CHANGELOG covers all three.
  • fjs/ci and fjs/ci/nix proofs correctly stay TypeScript — both import effects/node/virtual/module.f.ts, still unmigrated. fjs/ci/node's proof had no such dependency and moved to .f.mjs, which is the right discrimination rather than a blanket rule.

claude and others added 2 commits August 11, 2026 21:19
Splits DetectState, DetectMeta, and the internal _Signature/_MagicState/
_Utf8Detect types into a sibling types.ts. proof.f.ts migrates alongside
it since its own dependencies were already clean. Updates the sole
external dependent (fjs/mcp/cas/module.f.ts) and the type-only import in
fjs/media/module.f.ts, plus stale doc references and line-number
citations across fjs/effects/todo, fjs/media/type/todo,
fjs/media/todo/detect-cbor.md, and todo/plan/roadmap.md.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Y9bV7Civ4LaC6GPsjcgnJY
@sergey-shandar

Copy link
Copy Markdown
Contributor Author

@codex review

@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: 23423a71b2

ℹ️ 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/ci/module.f.mjs
/**
* Continuous integration helper commands for repository automation tasks.
*
* See `./types.ts` for the `Setup` type-level API.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Update stale CI module paths in the README

After these modules move to .f.mjs and Setup moves to types.ts, fjs/ci/README.md:10-22,45-46 still directs readers to the deleted module.f.ts, node/module.f.ts, and nix/module.f.ts files and omits the new type companion. Anyone following the repository's primary CI documentation therefore reaches nonexistent paths; update those entries as part of the migration.

Useful? React with 👍 / 👎.

claude added 2 commits August 11, 2026 21:25
module.f.ts, node/module.f.ts, and nix/module.f.ts were renamed to
.f.mjs in this PR; the README's Files section and the "Generated Nix
environments" section still pointed at the deleted paths. Flagged by
Codex review.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Y9bV7Civ4LaC6GPsjcgnJY
@sergey-shandar

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Chef's kiss.

Reviewed commit: a0858635e2

ℹ️ 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".

@sergey-shandar
sergey-shandar added this pull request to the merge queue Aug 11, 2026
Merged via the queue into main with commit 2b058dc Aug 11, 2026
19 checks passed
@sergey-shandar
sergey-shandar deleted the claude/convert-f-ts-to-f-mjs-13 branch August 11, 2026 21:35
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