Add upstream compatibility baseline check and commit-trace helpers#17
Conversation
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: fdf33752c6
ℹ️ 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".
| } | ||
|
|
||
| function resolveCurrentPinnedCommit() { | ||
| return cp.execFileSync('git', ['rev-parse', `HEAD:${submodulePath}`], { |
There was a problem hiding this comment.
Read submodule gitlink from index instead of HEAD
git rev-parse HEAD:upstream reads the gitlink from the current commit tree, so this check ignores submodule pointer changes that are staged but not yet committed (git add upstream). In the documented bump workflow, the script can therefore report that the baseline matches even after changing the pinned upstream commit, and only fail later once a commit is created in CI. Resolve the gitlink from the index (for example :upstream) or cached submodule status so staged updates are detected immediately.
Useful? React with 👍 / 👎.
|
@codex fix comment |
Summary
Testing
|
Motivation
upstream/submodule by making the pinned upstream commit explicit and traceable in CI output.Description
formatUpstreamCommitTraceLine(...)andreportUpstreamCommitRegression(...)helpers tosrc/spec-node/migration/upstreamCompatibility.tsto format trace log lines and report commit-change regressions.src/test/upstreamCompatibility.test.tsto cover trace formatting and regression detection, and extend existing compatibility contract tests.build/check-upstream-compatibility.jsand baseline metadata atdocs/upstream/compatibility-baseline.jsonto emit the pinned commit trace and fail CI when recorded and current pinned commits diverge.check-upstream-compatibility) and the CI workflow (.github/workflows/dev-containers.yml), and add the recommended update sequence toREADME.mdand mark TODO subtasks complete.Testing
node -r ts-node/register ./node_modules/mocha/bin/mocha --exit src/test/upstreamCompatibility.test.tswhich passed (6 passing).npm run check-upstream-compatibilitywhich printed the pinned commit trace and reported the baseline as matching (exit 0).npm run check-upstream-submodulewhich passed the existing upstream presence checks (exit 0).npm run type-checkwhich completed successfully (no TypeScript build errors).npm test -- --grep "upstream compatibility contract helpers"failed in this environment due to ESM/ts-noderesolution quirks, so tests were validated via the directnode -r ts-node/registermocha invocation above.Codex Task