Skip to content

Upstream submodule cutover: remove duplicated root upstream files, add readiness checks, docs, and tests#18

Merged
jooh merged 3 commits intoupstream_as_submodulefrom
codex/implement-upstream-submodule-cutover-step-919m0s
Apr 3, 2026
Merged

Upstream submodule cutover: remove duplicated root upstream files, add readiness checks, docs, and tests#18
jooh merged 3 commits intoupstream_as_submodulefrom
codex/implement-upstream-submodule-cutover-step-919m0s

Conversation

@jooh
Copy link
Copy Markdown
Owner

@jooh jooh commented Apr 3, 2026

Motivation

  • Make upstream/ the canonical location for upstream TypeScript CLI sources and remove byte-for-byte duplicates at the repository root to simplify ownership and reduce drift.
  • Add automated guardrails and documentation so CI and contributors detect missing submodule initialization, duplicate upstream files, and documentation gaps during cutover.

Description

  • Removed root-level upstream-owned files (examples: CHANGELOG.md, LICENSE.txt, ThirdPartyNotices.txt, devcontainer.js, CODEOWNERS, CONTRIBUTING.md, .gitignore, .gitattributes, tsconfig.base.json, eslint.config.mjs, yarn.lock, etc.) and updated README.md to document the upstream submodule workflow and compatibility contract.
  • Updated package.json to point the CLI bin to upstream/devcontainer.js, adjusted files entries to reference upstream/ copies, and added npm scripts for submodule/compatibility checks (check-upstream-submodule, check-upstream-compatibility).
  • Added migration/readiness tooling in src/spec-node/migration/upstreamSubmoduleCutoverReadiness.ts including collectRootLevelDuplicateUpstreamFiles, collectUpstreamSubmoduleDocumentationGaps, and related helpers that detect duplicate root files, path references to upstream-owned assets, and missing documentation markers.
  • Added and updated tests in src/test/upstreamSubmoduleCutoverReadiness.test.ts and adjusted test config to reference upstream/ (src/test/tsconfig.json), plus small docs and TODO updates (e.g., docs/standalone/cutover.md, TODO.md) to reflect the cutover state.

Testing

  • Ran unit test suite with npm test (Mocha) including the new upstreamSubmoduleCutoverReadiness tests, and all tests passed.
  • Ran the root-level duplicate detection tests which exercise collectRootLevelDuplicateUpstreamFiles and collectRootLevelUpstreamPathReferences, and they passed in CI/local runs.
  • Executed the new submodule checks via npm run check-upstream-submodule and npm run check-upstream-compatibility as part of the readiness workflow, and both checks behaved as expected (no failures against the pinned upstream/ baseline).

Codex Task

@jooh
Copy link
Copy Markdown
Owner Author

jooh commented Apr 3, 2026

@codex review

Copy link
Copy Markdown

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

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: 69270191f1

ℹ️ 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 package.json
"version": "0.85.0",
"bin": {
"devcontainer": "devcontainer.js"
"devcontainer": "upstream/devcontainer.js"
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Keep installer entrypoint aligned with new npm bin path

Changing the bin target to upstream/devcontainer.js moves the packaged executable to package/upstream/devcontainer.js, but the standalone installer still hardcodes package/devcontainer.js (scripts/install.sh checks/uses that path in install_cli, wrapper generation, and verification). That makes fresh standalone installs fail with “entry point not found” even when the tarball is otherwise valid, because the wrapper points to a file path that no longer exists after this package.json change.

Useful? React with 👍 / 👎.

Comment thread eslint.config.mjs
@@ -1,61 +0,0 @@
/*---------------------------------------------------------------------------------------------
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Restore an ESLint flat config for lint/precommit workflows

Removing eslint.config.mjs leaves the repo without any eslint.config.(js|mjs|cjs), so yarn lint now exits immediately with “ESLint couldn't find an eslint.config... file” (ESLint v10). This blocks the CI lint job (.github/workflows/dev-containers.yml, L35) and also breaks build/hygiene.js/precommit because new ESLint() cannot load configuration.

Useful? React with 👍 / 👎.

@jooh
Copy link
Copy Markdown
Owner Author

jooh commented Apr 3, 2026

@codex fix comments

@chatgpt-codex-connector
Copy link
Copy Markdown

Summary

  • Fixed the standalone installer to look for and execute the CLI at package/upstream/devcontainer.js (install check, generated wrapper, and post-install verification), matching the new npm bin layout and preventing “entry point not found” during fresh installs. scripts/install.shL378-L379 scripts/install.shL437-L439 scripts/install.shL467-L469
  • Restored a root ESLint flat config by adding a thin re-export to ./upstream/eslint.config.mjs, so lint/precommit workflows can resolve configuration again without duplicating upstream-owned config content. eslint.config.mjsL1

Testing

  • npm run -s lint
  • bash -n scripts/install.sh
  • npm run -s check-upstream-submodule
  • npm run -s precommit

Committed as 650ec3d, and I also created the follow-up PR message via the make_pr tool as requested.

View task →

@jooh jooh merged commit eea7887 into upstream_as_submodule Apr 3, 2026
13 checks passed
jooh added a commit that referenced this pull request Apr 3, 2026
Merge pull request #18 from jooh/codex/implement-upstream-submodule-cutover-step-919m0s

Upstream submodule cutover: remove duplicated root upstream files, add readiness checks, docs, and tests
@jooh jooh deleted the codex/implement-upstream-submodule-cutover-step-919m0s branch April 3, 2026 19:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant