From ea0bc835f5bedb7d81171c46da5019e44e80ede9 Mon Sep 17 00:00:00 2001 From: David Abram Date: Wed, 15 Jul 2026 15:53:41 +0200 Subject: [PATCH] actions: Scaffold remap-git-notes TypeScript action Add the package skeleton for a GitHub Action that remaps Git notes after rebase merges: action.yml with the full seven-input/seven-output contract (runs on node24), strict TypeScript config, typed module stubs (main, github, git, mapping, notes, summary), vitest setup, and exactly-pinned npm dependencies. main.ts only validates inputs and exits cleanly; mapping and notes logic land in later tasks. Co-authored-by: SCE --- actions/remap-git-notes/.gitignore | 1 + actions/remap-git-notes/action.yml | 58 + actions/remap-git-notes/package-lock.json | 1912 ++++++++++++++++++++ actions/remap-git-notes/package.json | 24 + actions/remap-git-notes/src/git.ts | 37 + actions/remap-git-notes/src/github.ts | 23 + actions/remap-git-notes/src/main.ts | 44 + actions/remap-git-notes/src/mapping.ts | 35 + actions/remap-git-notes/src/notes.ts | 27 + actions/remap-git-notes/src/summary.ts | 20 + actions/remap-git-notes/tests/main.test.ts | 73 + actions/remap-git-notes/tsconfig.json | 19 + actions/remap-git-notes/vitest.config.ts | 7 + context/context-map.md | 1 + context/plans/remap-git-notes-action.md | 146 ++ context/sce/remap-git-notes-action.md | 51 + 16 files changed, 2478 insertions(+) create mode 100644 actions/remap-git-notes/.gitignore create mode 100644 actions/remap-git-notes/action.yml create mode 100644 actions/remap-git-notes/package-lock.json create mode 100644 actions/remap-git-notes/package.json create mode 100644 actions/remap-git-notes/src/git.ts create mode 100644 actions/remap-git-notes/src/github.ts create mode 100644 actions/remap-git-notes/src/main.ts create mode 100644 actions/remap-git-notes/src/mapping.ts create mode 100644 actions/remap-git-notes/src/notes.ts create mode 100644 actions/remap-git-notes/src/summary.ts create mode 100644 actions/remap-git-notes/tests/main.test.ts create mode 100644 actions/remap-git-notes/tsconfig.json create mode 100644 actions/remap-git-notes/vitest.config.ts create mode 100644 context/plans/remap-git-notes-action.md create mode 100644 context/sce/remap-git-notes-action.md diff --git a/actions/remap-git-notes/.gitignore b/actions/remap-git-notes/.gitignore new file mode 100644 index 00000000..c2658d7d --- /dev/null +++ b/actions/remap-git-notes/.gitignore @@ -0,0 +1 @@ +node_modules/ diff --git a/actions/remap-git-notes/action.yml b/actions/remap-git-notes/action.yml new file mode 100644 index 00000000..3f952fd2 --- /dev/null +++ b/actions/remap-git-notes/action.yml @@ -0,0 +1,58 @@ +name: Remap Git Notes +description: >- + Best-effort remediation of Git notes after a pull request is merged with the + "Rebase and merge" strategy. Maps original PR commits to their rebased + counterparts using a conservative multi-signal confidence model and copies + notes only for high-confidence mappings. +author: CroCoder + +inputs: + github-token: + description: Token used to call the GitHub REST API and push the notes ref. + required: true + notes-ref: + description: Fully qualified notes ref to remap. + required: false + default: refs/notes/commits + remote: + description: Git remote to fetch from and push to. + required: false + default: origin + target-branch: + description: Branch the PR was merged into. Defaults to the PR base branch. + required: false + default: "" + search-depth: + description: >- + Fallback number of commits to walk back from the target branch tip when + the merge commit SHA is missing or unreachable. + required: false + default: "50" + fail-on-unmapped: + description: Fail the action when a noted commit cannot be mapped. + required: false + default: "false" + dry-run: + description: Report the proposed mapping without writing or pushing notes. + required: false + default: "false" + +outputs: + mapped-count: + description: Number of PR commits mapped to rebased commits with copyable confidence. + copied-count: + description: Number of notes copied to rebased commits. + skipped-count: + description: Number of mappings skipped (identical note already present, low confidence, or no note). + unmapped-count: + description: Number of noted PR commits that could not be mapped reliably. + conflict-count: + description: Number of destination commits where a differing existing note was merged. + changed: + description: Whether the notes ref was modified and pushed ("true"/"false"). + mapping-report: + description: Concise JSON report of every proposed mapping decision. + +runs: + using: node24 + main: dist/index.js diff --git a/actions/remap-git-notes/package-lock.json b/actions/remap-git-notes/package-lock.json new file mode 100644 index 00000000..5ce7fc32 --- /dev/null +++ b/actions/remap-git-notes/package-lock.json @@ -0,0 +1,1912 @@ +{ + "name": "remap-git-notes", + "version": "0.1.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "remap-git-notes", + "version": "0.1.0", + "dependencies": { + "@actions/core": "3.0.1", + "@actions/exec": "3.0.0", + "@actions/github": "9.1.1", + "@actions/io": "3.0.2" + }, + "devDependencies": { + "@types/node": "26.1.1", + "@vercel/ncc": "0.44.1", + "typescript": "7.0.2", + "vitest": "4.1.10" + } + }, + "node_modules/@actions/core": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/@actions/core/-/core-3.0.1.tgz", + "integrity": "sha512-a6d/Nwahm9fliVGRhdhofo40HjHQasUPusmc7vBfyky+7Z+P2A1J68zyFVaNcEclc/Se+eO595oAr5nwEIoIUA==", + "license": "MIT", + "dependencies": { + "@actions/exec": "^3.0.0", + "@actions/http-client": "^4.0.0" + } + }, + "node_modules/@actions/exec": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@actions/exec/-/exec-3.0.0.tgz", + "integrity": "sha512-6xH/puSoNBXb72VPlZVm7vQ+svQpFyA96qdDBvhB8eNZOE8LtPf9L4oAsfzK/crCL8YZ+19fKYVnM63Sl+Xzlw==", + "license": "MIT", + "dependencies": { + "@actions/io": "^3.0.2" + } + }, + "node_modules/@actions/github": { + "version": "9.1.1", + "resolved": "https://registry.npmjs.org/@actions/github/-/github-9.1.1.tgz", + "integrity": "sha512-tL5JbYOBZHc0ngEnCsaDcryUizIUIlQyIMwy1Wkx93H5HzbBJ7TbiPx2PnFjBwZW0Vh05JmfFZhecE6gglYegA==", + "license": "MIT", + "dependencies": { + "@actions/http-client": "^3.0.2", + "@octokit/core": "^7.0.6", + "@octokit/plugin-paginate-rest": "^14.0.0", + "@octokit/plugin-rest-endpoint-methods": "^17.0.0", + "@octokit/request": "^10.0.7", + "@octokit/request-error": "^7.1.0", + "undici": "^6.23.0" + } + }, + "node_modules/@actions/github/node_modules/@actions/http-client": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/@actions/http-client/-/http-client-3.0.2.tgz", + "integrity": "sha512-JP38FYYpyqvUsz+Igqlc/JG6YO9PaKuvqjM3iGvaLqFnJ7TFmcLyy2IDrY0bI0qCQug8E9K+elv5ZNfw62ZJzA==", + "license": "MIT", + "dependencies": { + "tunnel": "^0.0.6", + "undici": "^6.23.0" + } + }, + "node_modules/@actions/http-client": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/@actions/http-client/-/http-client-4.0.1.tgz", + "integrity": "sha512-+Nvd1ImaOZBSoPbsUtEhv+1z99H12xzncCkz0a3RuehINE81FZSe2QTj3uvAPTcJX/SCzUQHQ0D1GrPMbrPitg==", + "license": "MIT", + "dependencies": { + "tunnel": "^0.0.6", + "undici": "^6.23.0" + } + }, + "node_modules/@actions/io": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/@actions/io/-/io-3.0.2.tgz", + "integrity": "sha512-nRBchcMM+QK1pdjO7/idu86rbJI5YHUKCvKs0KxnSYbVe3F51UfGxuZX4Qy/fWlp6l7gWFwIkrOzN+oUK03kfw==", + "license": "MIT" + }, + "node_modules/@emnapi/core": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@emnapi/core/-/core-1.11.1.tgz", + "integrity": "sha512-RSvbQmHzdKzNsLYa/wHrbc3KN4sYLKAdPZxqiM2HATqv/SBk2/ENSHpvXGaLOMcsAyz0poEGqkmmKYG3OWiJEQ==", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "@emnapi/wasi-threads": "1.2.2", + "tslib": "^2.4.0" + } + }, + "node_modules/@emnapi/runtime": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@emnapi/runtime/-/runtime-1.11.1.tgz", + "integrity": "sha512-vgj7R3y3Wgx24IQaGPA/R6YFXLHVMOZ0uVEyIQPaWs+rd1AzfEMXlAC22FYwO1XkKR6NPsq7mUandH8oIRdZFw==", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "tslib": "^2.4.0" + } + }, + "node_modules/@emnapi/wasi-threads": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/@emnapi/wasi-threads/-/wasi-threads-1.2.2.tgz", + "integrity": "sha512-c95qOXkHdydNKhscBTebqEC1CVAZpyqOfVfBzQ1qgzyl3gfeldUjIggDbIZgDKsHLgnsM+igH7TJ/eAasaVuMA==", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "tslib": "^2.4.0" + } + }, + "node_modules/@jridgewell/sourcemap-codec": { + "version": "1.5.5", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.5.tgz", + "integrity": "sha512-cYQ9310grqxueWbl+WuIUIaiUaDcj7WOq5fVhEljNVgRfOUhY9fy2zTvfoqWsnebh8Sl70VScFbICvJnLKB0Og==", + "dev": true, + "license": "MIT" + }, + "node_modules/@napi-rs/wasm-runtime": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/@napi-rs/wasm-runtime/-/wasm-runtime-1.1.6.tgz", + "integrity": "sha512-ZLv/JdUfkvOy9eCnnBaGfiO+XimbjebAeO+MRQqD/B+FR1tnRN0tpKSJHRbE8sFfS6aqsXZ67TQjfwfsxULVbg==", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "@tybys/wasm-util": "^0.10.3" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/Brooooooklyn" + }, + "peerDependencies": { + "@emnapi/core": "^1.7.1", + "@emnapi/runtime": "^1.7.1" + } + }, + "node_modules/@octokit/auth-token": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/@octokit/auth-token/-/auth-token-6.0.0.tgz", + "integrity": "sha512-P4YJBPdPSpWTQ1NU4XYdvHvXJJDxM6YwpS0FZHRgP7YFkdVxsWcpWGy/NVqlAA7PcPCnMacXlRm1y2PFZRWL/w==", + "license": "MIT", + "engines": { + "node": ">= 20" + } + }, + "node_modules/@octokit/core": { + "version": "7.0.6", + "resolved": "https://registry.npmjs.org/@octokit/core/-/core-7.0.6.tgz", + "integrity": "sha512-DhGl4xMVFGVIyMwswXeyzdL4uXD5OGILGX5N8Y+f6W7LhC1Ze2poSNrkF/fedpVDHEEZ+PHFW0vL14I+mm8K3Q==", + "license": "MIT", + "dependencies": { + "@octokit/auth-token": "^6.0.0", + "@octokit/graphql": "^9.0.3", + "@octokit/request": "^10.0.6", + "@octokit/request-error": "^7.0.2", + "@octokit/types": "^16.0.0", + "before-after-hook": "^4.0.0", + "universal-user-agent": "^7.0.0" + }, + "engines": { + "node": ">= 20" + } + }, + "node_modules/@octokit/endpoint": { + "version": "11.0.3", + "resolved": "https://registry.npmjs.org/@octokit/endpoint/-/endpoint-11.0.3.tgz", + "integrity": "sha512-FWFlNxghg4HrXkD3ifYbS/IdL/mDHjh9QcsNyhQjN8dplUoZbejsdpmuqdA76nxj2xoWPs7p8uX2SNr9rYu0Ag==", + "license": "MIT", + "dependencies": { + "@octokit/types": "^16.0.0", + "universal-user-agent": "^7.0.2" + }, + "engines": { + "node": ">= 20" + } + }, + "node_modules/@octokit/graphql": { + "version": "9.0.3", + "resolved": "https://registry.npmjs.org/@octokit/graphql/-/graphql-9.0.3.tgz", + "integrity": "sha512-grAEuupr/C1rALFnXTv6ZQhFuL1D8G5y8CN04RgrO4FIPMrtm+mcZzFG7dcBm+nq+1ppNixu+Jd78aeJOYxlGA==", + "license": "MIT", + "dependencies": { + "@octokit/request": "^10.0.6", + "@octokit/types": "^16.0.0", + "universal-user-agent": "^7.0.0" + }, + "engines": { + "node": ">= 20" + } + }, + "node_modules/@octokit/openapi-types": { + "version": "27.0.0", + "resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-27.0.0.tgz", + "integrity": "sha512-whrdktVs1h6gtR+09+QsNk2+FO+49j6ga1c55YZudfEG+oKJVvJLQi3zkOm5JjiUXAagWK2tI2kTGKJ2Ys7MGA==", + "license": "MIT" + }, + "node_modules/@octokit/plugin-paginate-rest": { + "version": "14.0.0", + "resolved": "https://registry.npmjs.org/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-14.0.0.tgz", + "integrity": "sha512-fNVRE7ufJiAA3XUrha2omTA39M6IXIc6GIZLvlbsm8QOQCYvpq/LkMNGyFlB1d8hTDzsAXa3OKtybdMAYsV/fw==", + "license": "MIT", + "dependencies": { + "@octokit/types": "^16.0.0" + }, + "engines": { + "node": ">= 20" + }, + "peerDependencies": { + "@octokit/core": ">=6" + } + }, + "node_modules/@octokit/plugin-rest-endpoint-methods": { + "version": "17.0.0", + "resolved": "https://registry.npmjs.org/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-17.0.0.tgz", + "integrity": "sha512-B5yCyIlOJFPqUUeiD0cnBJwWJO8lkJs5d8+ze9QDP6SvfiXSz1BF+91+0MeI1d2yxgOhU/O+CvtiZ9jSkHhFAw==", + "license": "MIT", + "dependencies": { + "@octokit/types": "^16.0.0" + }, + "engines": { + "node": ">= 20" + }, + "peerDependencies": { + "@octokit/core": ">=6" + } + }, + "node_modules/@octokit/request": { + "version": "10.0.11", + "resolved": "https://registry.npmjs.org/@octokit/request/-/request-10.0.11.tgz", + "integrity": "sha512-+s7HUxjfFqOMS9VlIwDffq0MikjSAK0gSpG73W+meAvVAvX4MBrHYTK5Bj3Uot55qFT4gzUtfzE4mGWY4Br8/Q==", + "license": "MIT", + "dependencies": { + "@octokit/endpoint": "^11.0.3", + "@octokit/request-error": "^7.0.2", + "@octokit/types": "^16.0.0", + "content-type": "^2.0.0", + "json-with-bigint": "^3.5.3", + "universal-user-agent": "^7.0.2" + }, + "engines": { + "node": ">= 20" + } + }, + "node_modules/@octokit/request-error": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/@octokit/request-error/-/request-error-7.1.0.tgz", + "integrity": "sha512-KMQIfq5sOPpkQYajXHwnhjCC0slzCNScLHs9JafXc4RAJI+9f+jNDlBNaIMTvazOPLgb4BnlhGJOTbnN0wIjPw==", + "license": "MIT", + "dependencies": { + "@octokit/types": "^16.0.0" + }, + "engines": { + "node": ">= 20" + } + }, + "node_modules/@octokit/types": { + "version": "16.0.0", + "resolved": "https://registry.npmjs.org/@octokit/types/-/types-16.0.0.tgz", + "integrity": "sha512-sKq+9r1Mm4efXW1FCk7hFSeJo4QKreL/tTbR0rz/qx/r1Oa2VV83LTA/H/MuCOX7uCIJmQVRKBcbmWoySjAnSg==", + "license": "MIT", + "dependencies": { + "@octokit/openapi-types": "^27.0.0" + } + }, + "node_modules/@oxc-project/types": { + "version": "0.139.0", + "resolved": "https://registry.npmjs.org/@oxc-project/types/-/types-0.139.0.tgz", + "integrity": "sha512-r9gHphtCs+1M7J0pw6Sn/hh/Wpa/iQrOOkrNAlVLF/gHq+/CJmHIWKKUUhdWjcD6CIa8idarspCsASiXCXvFUw==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/Boshen" + } + }, + "node_modules/@rolldown/binding-android-arm64": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/@rolldown/binding-android-arm64/-/binding-android-arm64-1.1.5.tgz", + "integrity": "sha512-lZg8fqIv2v7FF237bwMgzGZEJvGL79/s5knJ/i6FmsGF4XXlzccZ4jb+TrFIxtSSxFtIpdsgrPZeMk1I9AFcyQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-darwin-arm64": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/@rolldown/binding-darwin-arm64/-/binding-darwin-arm64-1.1.5.tgz", + "integrity": "sha512-51Bnx9pNiMRKSUNtBfySkNJ9vMU9Hh3I1ozDd6gyPPYzaXCfnptUcEZxXGYFn+ul2dtcMUiqGR1Yai2K10uoTw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-darwin-x64": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/@rolldown/binding-darwin-x64/-/binding-darwin-x64-1.1.5.tgz", + "integrity": "sha512-Tm+gbfC0aHu1tBA/JvKQh32S0K6YgCHkiAF4/W6xX0K0RmNuc94VeK419dJoE65R5aRxmo+noZQSWrAMF6yb6g==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-freebsd-x64": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/@rolldown/binding-freebsd-x64/-/binding-freebsd-x64-1.1.5.tgz", + "integrity": "sha512-JMzDKCCXq93YccG5gz3hvOs1oXRKAf0XYpfOS88e+wZrC8Iugj6j68867vrYZkvpDDpKn/KoKORThmchMpF6TA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-linux-arm-gnueabihf": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm-gnueabihf/-/binding-linux-arm-gnueabihf-1.1.5.tgz", + "integrity": "sha512-uML21j2K5TfPGutKxub+M+nLjZIrWjXQ5Grx4lCe/nimTj9B4L63zHpjXLl4y0L3mcm2htEQIb06oCG/szerNw==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-linux-arm64-gnu": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm64-gnu/-/binding-linux-arm64-gnu-1.1.5.tgz", + "integrity": "sha512-navSiuTMogvnQoZoM/v+l3ZWo50/NTwSHSzheABx/RCnmUPaKwq9qSo4Br2OYRs21+Fz8uFqITZM3H4opOB0/Q==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-linux-arm64-musl": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm64-musl/-/binding-linux-arm64-musl-1.1.5.tgz", + "integrity": "sha512-lAryqH7IteztmCXQXk0etKj4wBQ7Gx5S6LjKhsgp9zb8I5bsuvU/2llH1hDQcjsFeqIsovMVN339/8pUDDBXxA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-linux-ppc64-gnu": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-ppc64-gnu/-/binding-linux-ppc64-gnu-1.1.5.tgz", + "integrity": "sha512-fsK/sNBnxzBlL4O1JNrZakVQxPspqpED5dLtNsZS9oOKmtSpdNIzxH2kkol5HYTWJN47sE20ztMJPxfZ89qGOg==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-linux-s390x-gnu": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-s390x-gnu/-/binding-linux-s390x-gnu-1.1.5.tgz", + "integrity": "sha512-gLYb4BIadlfTOYT5gO503n8zQjXflgzpD0FcyKh0Mzx3rqCZKnHoJWV9xe1KXUJ5lx2JfcSHr/mhzS0PC/McAA==", + "cpu": [ + "s390x" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-linux-x64-gnu": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-x64-gnu/-/binding-linux-x64-gnu-1.1.5.tgz", + "integrity": "sha512-FjcpEKUyJygHgs1o50VYNvkt5+7Le/VEdYt0AkRpkL33MnyQfwr8l5mXwMmfmTbyMPr5vJLC+8/Gd9gXnwU1QQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-linux-x64-musl": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-x64-musl/-/binding-linux-x64-musl-1.1.5.tgz", + "integrity": "sha512-Me+PfPI2TMeOQk0gYWfLQZtTktrmzbr8cDboqX83XKc7UrgAi55gF+2dUkWdxd19n55Essp2yeca+O9N5rBxHg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-openharmony-arm64": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/@rolldown/binding-openharmony-arm64/-/binding-openharmony-arm64-1.1.5.tgz", + "integrity": "sha512-yc5WrLzXks6zCQfn9Oxr8pORKyl/pF+QjHmW/Qx3qu0oyrrNC+y2JLTU1E2rcWYAmzlnqngWXHQjy51VzW70Vw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openharmony" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-wasm32-wasi": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/@rolldown/binding-wasm32-wasi/-/binding-wasm32-wasi-1.1.5.tgz", + "integrity": "sha512-VbQGPX2b4r48TAMIM2cjgluIM1HYutm4pcTEJsle7iEP7sB1dFqtPLBVbdLAZCxy1txCcPxf4QFf4v8uvltPqA==", + "cpu": [ + "wasm32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "@emnapi/core": "1.11.1", + "@emnapi/runtime": "1.11.1", + "@napi-rs/wasm-runtime": "^1.1.6" + }, + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-win32-arm64-msvc": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/@rolldown/binding-win32-arm64-msvc/-/binding-win32-arm64-msvc-1.1.5.tgz", + "integrity": "sha512-gHv82k63z4qpV5+Q1y/12KrK0ltWBukVDI8nZcbT7Tt/ZlOIVwppazneq0F93oDxTo3IgAMEDIoQh3E2n6mVsw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-win32-x64-msvc": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/@rolldown/binding-win32-x64-msvc/-/binding-win32-x64-msvc-1.1.5.tgz", + "integrity": "sha512-tTZuDBPw85tEN5PQi1pnEBzDy0Z49HtScLAbD5t6hyeU92A95pRWaSMw1GZZi/RwgSgUIl0xrSlXIT/9QzvYSA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/pluginutils": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@rolldown/pluginutils/-/pluginutils-1.0.1.tgz", + "integrity": "sha512-2j9bGt5Jh8hj+vPtgzPtl72j0yRxHAyumoo6TNfAjsLB04UtpSvPbPcDcBMxz7n+9CYB0c1GxQFxYRg2jimqGw==", + "dev": true, + "license": "MIT" + }, + "node_modules/@standard-schema/spec": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@standard-schema/spec/-/spec-1.1.0.tgz", + "integrity": "sha512-l2aFy5jALhniG5HgqrD6jXLi/rUWrKvqN/qJx6yoJsgKhblVd+iqqU4RCXavm/jPityDo5TCvKMnpjKnOriy0w==", + "dev": true, + "license": "MIT" + }, + "node_modules/@tybys/wasm-util": { + "version": "0.10.3", + "resolved": "https://registry.npmjs.org/@tybys/wasm-util/-/wasm-util-0.10.3.tgz", + "integrity": "sha512-F3fo1MYrRJYL3zER0OUOmkutjr1Vp23m7OsSgp7nq4SP6OqX6C/56XFIPAl5bt3zaBRjmW7SGz3u/6LwFpYcOg==", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "tslib": "^2.4.0" + } + }, + "node_modules/@types/chai": { + "version": "5.2.3", + "resolved": "https://registry.npmjs.org/@types/chai/-/chai-5.2.3.tgz", + "integrity": "sha512-Mw558oeA9fFbv65/y4mHtXDs9bPnFMZAL/jxdPFUpOHHIXX91mcgEHbS5Lahr+pwZFR8A7GQleRWeI6cGFC2UA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/deep-eql": "*", + "assertion-error": "^2.0.1" + } + }, + "node_modules/@types/deep-eql": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/@types/deep-eql/-/deep-eql-4.0.2.tgz", + "integrity": "sha512-c9h9dVVMigMPc4bwTvC5dxqtqJZwQPePsWjPlpSOnojbor6pGqdk541lfA7AqFQr5pB1BRdq0juY9db81BwyFw==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/estree": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.9.tgz", + "integrity": "sha512-GhdPgy1el4/ImP05X05Uw4cw2/M93BCUmnEvWZNStlCzEKME4Fkk+YpoA5OiHNQmoS7Cafb8Xa3Pya8m1Qrzeg==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/node": { + "version": "26.1.1", + "resolved": "https://registry.npmjs.org/@types/node/-/node-26.1.1.tgz", + "integrity": "sha512-nxAkRSVkN1Y0JC1W8ky/fTfkGsMmcrRsbx+3XoZE+rMOX71kLYTV7fLXpqud1GpbpP5TuffXFqfX7fH2GgZREw==", + "dev": true, + "license": "MIT", + "dependencies": { + "undici-types": "~8.3.0" + } + }, + "node_modules/@typescript/typescript-aix-ppc64": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@typescript/typescript-aix-ppc64/-/typescript-aix-ppc64-7.0.2.tgz", + "integrity": "sha512-MTKKkWB7p/0E9xi1d1tHtZ5PiLkGEMIq88pK2CubZjOsLtYTLqhgIgi6zepFa+9GHZ6h05NMCkQxGKiPXMxXtQ==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "aix" + ], + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/@typescript/typescript-darwin-arm64": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@typescript/typescript-darwin-arm64/-/typescript-darwin-arm64-7.0.2.tgz", + "integrity": "sha512-gowzar9MwS/aRWp6f3a4KUqzRjAZjOsmGNCM6LcTgXum+dBfgsBVMN+AgvOCCbguXyick6LJhpBszxMebJ8syA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/@typescript/typescript-darwin-x64": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@typescript/typescript-darwin-x64/-/typescript-darwin-x64-7.0.2.tgz", + "integrity": "sha512-SZ9xZInqApNlNGc9s0W1VSsktYSOe9cFqNOIqmN1Gs8SmkjKZYFt017G4VwPxASInODuAdbTW7sXiFUf893RgA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/@typescript/typescript-freebsd-arm64": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@typescript/typescript-freebsd-arm64/-/typescript-freebsd-arm64-7.0.2.tgz", + "integrity": "sha512-W5NH4y/J0plIIS5b2xvTEkU7JFxyqdMAOgf+Ilhl0vHQXKO5dZoxd+C/jEtq56c4F3wk71RB4BMRQ2XdI+bwYQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/@typescript/typescript-freebsd-x64": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@typescript/typescript-freebsd-x64/-/typescript-freebsd-x64-7.0.2.tgz", + "integrity": "sha512-UMGDx5sTpzNw3WiPebH7l90IWfJggEd+egHt/q6p7/Cm3zqoV7VxkGXt+3DxPIw8CcmvAB0j3sVVfbhX+M4Tpw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/@typescript/typescript-linux-arm": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@typescript/typescript-linux-arm/-/typescript-linux-arm-7.0.2.tgz", + "integrity": "sha512-gffT3xPz9sR7j/YJExkyPntrI0P2EP9XbOyWzth2/Gs0RstK+90RBcO0ncXoXy/beYll1SXw846Nf2zdnEz0QQ==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/@typescript/typescript-linux-arm64": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@typescript/typescript-linux-arm64/-/typescript-linux-arm64-7.0.2.tgz", + "integrity": "sha512-Qh4eU4/y3yDjnfjjyPYihMj5/ODIlmt+Bzu17OI+fiSRDW57QmU5SiN63exPRNJPKUzcc1INa1NXdrJ+MqHjUQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/@typescript/typescript-linux-loong64": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@typescript/typescript-linux-loong64/-/typescript-linux-loong64-7.0.2.tgz", + "integrity": "sha512-uEHck9i8hoAzXPiYRib1O7miOnz23SxIeVl6F4LXox+qov1K35jHcEW6VHKvZI+pyvl7fZEP4MCU5LYvIq1GuQ==", + "cpu": [ + "loong64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/@typescript/typescript-linux-mips64el": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@typescript/typescript-linux-mips64el/-/typescript-linux-mips64el-7.0.2.tgz", + "integrity": "sha512-R4KvAMnE43W5Qeqb0Ly56O3mWMWIAgsMyz36DCaycd5nbg/9kzm0liw3JocfRqyJY0KPmzFjbswozXyW0DnIYA==", + "cpu": [ + "mips64el" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/@typescript/typescript-linux-ppc64": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@typescript/typescript-linux-ppc64/-/typescript-linux-ppc64-7.0.2.tgz", + "integrity": "sha512-DORx5b3sd/4S7eayxm4FQv+A7CrkUIGRaHiwI8oiHTAI1fAPWhF4J0vAlkC8biAlHSVVwxMQ3tjZ2/DVbnQiiA==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/@typescript/typescript-linux-riscv64": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@typescript/typescript-linux-riscv64/-/typescript-linux-riscv64-7.0.2.tgz", + "integrity": "sha512-wf0jqEDOjrPRnKwYRyyJDRo11KMbvMFrU+q4zqKyChODBzvlkbhNQfKvLxQCcwTpdDaXSHZTVuh0JoCrKCUMHQ==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/@typescript/typescript-linux-s390x": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@typescript/typescript-linux-s390x/-/typescript-linux-s390x-7.0.2.tgz", + "integrity": "sha512-IkwJc3L7yhytWd/ewjyxNDfOmswCm9GWMJT/ue/dU4aZNbwZeYAetq42VyLmsmSjvoX7z74X6ZaYCtzAr0EuGw==", + "cpu": [ + "s390x" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/@typescript/typescript-linux-x64": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@typescript/typescript-linux-x64/-/typescript-linux-x64-7.0.2.tgz", + "integrity": "sha512-EYdf2cNg7rgCWJnxCdJ+F3V39O8ihb37eHAu1LK8oAFizgTQbPOK7zHHXbPt8rX24COqODXeI3sIf0fCXG7H/A==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/@typescript/typescript-netbsd-arm64": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@typescript/typescript-netbsd-arm64/-/typescript-netbsd-arm64-7.0.2.tgz", + "integrity": "sha512-+polYF4MF04aPpO5FTkHran9yUQDSXqy5GiSDKpsll5jy3l3+g9QLhpf39T+ePtefhXLOGrLl0QIjkQP6VnelA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/@typescript/typescript-netbsd-x64": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@typescript/typescript-netbsd-x64/-/typescript-netbsd-x64-7.0.2.tgz", + "integrity": "sha512-8YIT0EHM/3dq10ZOVF/A7pc/YSMtbcecct4rWtexrnSCHOPcpC2KTLXfTCR6vDpnSiY12heNb1GiN/wu+T/FyA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/@typescript/typescript-openbsd-arm64": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@typescript/typescript-openbsd-arm64/-/typescript-openbsd-arm64-7.0.2.tgz", + "integrity": "sha512-APT8+ClYnuYm1u9+kgGXoMj2VzWzcymwh2gNSQVySHfkRDGOTVkoWLjCmOQSaO+PoqQ57B0flRp9SA+7GnnkzQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/@typescript/typescript-openbsd-x64": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@typescript/typescript-openbsd-x64/-/typescript-openbsd-x64-7.0.2.tgz", + "integrity": "sha512-yX7s+Q0Dln0Dt9tEzZsAjXXR/+ytBM7AlglaqyeMPxQszJ1JhlJdZ6jLA+IzldHtflX81em7lDao1xXu+aRRkg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/@typescript/typescript-sunos-x64": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@typescript/typescript-sunos-x64/-/typescript-sunos-x64-7.0.2.tgz", + "integrity": "sha512-dLJDGaLZ1D4HPQn62u1n8mBDkJREwMsAkCdkwd4Ieqw+x3TUyTsqY0YiBCtE6H6OzzgGk3iuZ3vFWRS+E8/d1g==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "sunos" + ], + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/@typescript/typescript-win32-arm64": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@typescript/typescript-win32-arm64/-/typescript-win32-arm64-7.0.2.tgz", + "integrity": "sha512-Gyl1Vy6OsWesLzmq+EP0Fb7b4Nid5232AvcA2SFcdYreldpNtYFFofPjnt62y9hQy7VTaZp65ICJjuAQRaVcIQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/@typescript/typescript-win32-x64": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@typescript/typescript-win32-x64/-/typescript-win32-x64-7.0.2.tgz", + "integrity": "sha512-0BQ3HkAHHlKLSp1qRvf3SUhGpGsDuhB/jgFw75guyqbxJqEaS0Cw/VFO8i2nHglJUzQCRtMMR/IBAKE3ETMC4g==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/@vercel/ncc": { + "version": "0.44.1", + "resolved": "https://registry.npmjs.org/@vercel/ncc/-/ncc-0.44.1.tgz", + "integrity": "sha512-cUjIE5P2YY1n+Kt9rFIazMMpGoPn1Fic04rOmTkElMkiDP5oszGfERMpo2shVkFKDL7rVppdM2pqJKC59shQWQ==", + "dev": true, + "license": "MIT", + "bin": { + "ncc": "dist/ncc/cli.js" + } + }, + "node_modules/@vitest/expect": { + "version": "4.1.10", + "resolved": "https://registry.npmjs.org/@vitest/expect/-/expect-4.1.10.tgz", + "integrity": "sha512-YsCn+qAk1GWjQOWFEsEcL2gNQ0zmVmQu3T03qP6UyjhtmdtwtbuI+DASn/7iQB3HGTXkdBwGddzxPlmiql5vlA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@standard-schema/spec": "^1.1.0", + "@types/chai": "^5.2.2", + "@vitest/spy": "4.1.10", + "@vitest/utils": "4.1.10", + "chai": "^6.2.2", + "tinyrainbow": "^3.1.0" + }, + "funding": { + "url": "https://opencollective.com/vitest" + } + }, + "node_modules/@vitest/mocker": { + "version": "4.1.10", + "resolved": "https://registry.npmjs.org/@vitest/mocker/-/mocker-4.1.10.tgz", + "integrity": "sha512-v0xaezt+DKEmKfaxg133ldzADrwLGd7Ze1MfQQTYfvs8OqZIwbxyxaYURivwV7sWy5fqn3rH5uOrSp07bp44Ow==", + "dev": true, + "license": "MIT", + "dependencies": { + "@vitest/spy": "4.1.10", + "estree-walker": "^3.0.3", + "magic-string": "^0.30.21" + }, + "funding": { + "url": "https://opencollective.com/vitest" + }, + "peerDependencies": { + "msw": "^2.4.9", + "vite": "^6.0.0 || ^7.0.0 || ^8.0.0" + }, + "peerDependenciesMeta": { + "msw": { + "optional": true + }, + "vite": { + "optional": true + } + } + }, + "node_modules/@vitest/pretty-format": { + "version": "4.1.10", + "resolved": "https://registry.npmjs.org/@vitest/pretty-format/-/pretty-format-4.1.10.tgz", + "integrity": "sha512-W1HsjSH4MXQ9YfmmhLAoIYf1HRfekQCGngeIgcei6MP5QQGWUe0gkopdZQaVCFO+JDJMrAJGwa5pRpNpvy4P8Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "tinyrainbow": "^3.1.0" + }, + "funding": { + "url": "https://opencollective.com/vitest" + } + }, + "node_modules/@vitest/runner": { + "version": "4.1.10", + "resolved": "https://registry.npmjs.org/@vitest/runner/-/runner-4.1.10.tgz", + "integrity": "sha512-IKI6kpIH+LmpROplyLwBBaCfMgOZOMsygVa6BARD6ahA04VRuJSa6OaVG7kRvSEMD870Vd91rSSw0eegtWyLGg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@vitest/utils": "4.1.10", + "pathe": "^2.0.3" + }, + "funding": { + "url": "https://opencollective.com/vitest" + } + }, + "node_modules/@vitest/snapshot": { + "version": "4.1.10", + "resolved": "https://registry.npmjs.org/@vitest/snapshot/-/snapshot-4.1.10.tgz", + "integrity": "sha512-xRkfOT1qpTAi/Ti4Y1LtfRc3kEuqxGw59eN2jN9pRWMtS/XDevekhcFSqvQqjUNGksfjMJu3Y+oJ+4Ypn2OaJw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@vitest/pretty-format": "4.1.10", + "@vitest/utils": "4.1.10", + "magic-string": "^0.30.21", + "pathe": "^2.0.3" + }, + "funding": { + "url": "https://opencollective.com/vitest" + } + }, + "node_modules/@vitest/spy": { + "version": "4.1.10", + "resolved": "https://registry.npmjs.org/@vitest/spy/-/spy-4.1.10.tgz", + "integrity": "sha512-PLf/Ugvoq5wO/b4rwYCR1h2PSIdXz7wnkQFMiUpLdtM7l6pqVFcQIBEHyT1+l+cj7mNwAfZHzqXqDyjvOuwbDw==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://opencollective.com/vitest" + } + }, + "node_modules/@vitest/utils": { + "version": "4.1.10", + "resolved": "https://registry.npmjs.org/@vitest/utils/-/utils-4.1.10.tgz", + "integrity": "sha512-fy9am/HWxbaGt/Sawrp90vt6Y6jQwf1RX77cz3uwoJwJVMli/e1IEwRPnMNJ7vKfPTwo0diXifkpPvwH9v7nGA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@vitest/pretty-format": "4.1.10", + "convert-source-map": "^2.0.0", + "tinyrainbow": "^3.1.0" + }, + "funding": { + "url": "https://opencollective.com/vitest" + } + }, + "node_modules/assertion-error": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-2.0.1.tgz", + "integrity": "sha512-Izi8RQcffqCeNVgFigKli1ssklIbpHnCYc6AknXGYoB6grJqyeby7jv12JUQgmTAnIDnbck1uxksT4dzN3PWBA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + } + }, + "node_modules/before-after-hook": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/before-after-hook/-/before-after-hook-4.0.0.tgz", + "integrity": "sha512-q6tR3RPqIB1pMiTRMFcZwuG5T8vwp+vUvEG0vuI6B+Rikh5BfPp2fQ82c925FOs+b0lcFQ8CFrL+KbilfZFhOQ==", + "license": "Apache-2.0" + }, + "node_modules/chai": { + "version": "6.2.2", + "resolved": "https://registry.npmjs.org/chai/-/chai-6.2.2.tgz", + "integrity": "sha512-NUPRluOfOiTKBKvWPtSD4PhFvWCqOi0BGStNWs57X9js7XGTprSmFoz5F0tWhR4WPjNeR9jXqdC7/UpSJTnlRg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + } + }, + "node_modules/content-type": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/content-type/-/content-type-2.0.0.tgz", + "integrity": "sha512-j/O/d7GcZCyNl7/hwZAb606rzqkyvaDctLmckbxLzHvFBzTJHuGEdodATcP3yIRoDrLHkIATJuvzbFlp/ki2cQ==", + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" + } + }, + "node_modules/convert-source-map": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", + "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==", + "dev": true, + "license": "MIT" + }, + "node_modules/detect-libc": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.1.2.tgz", + "integrity": "sha512-Btj2BOOO83o3WyH59e8MgXsxEQVcarkUOpEYrubB0urwnN10yQ364rsiByU11nZlqWYZm05i/of7io4mzihBtQ==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=8" + } + }, + "node_modules/es-module-lexer": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-2.3.1.tgz", + "integrity": "sha512-shc1dbU90Yl/xq1QrC7QRtfcwURZuVRfPhZbDoldJ1cn1gzDvBaBWlv0eFolj5+0znnPJz5TXLxsN77X/12KTA==", + "dev": true, + "license": "MIT" + }, + "node_modules/estree-walker": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-3.0.3.tgz", + "integrity": "sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/estree": "^1.0.0" + } + }, + "node_modules/expect-type": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/expect-type/-/expect-type-1.4.0.tgz", + "integrity": "sha512-KfYbmpRm0VbLjEvVa9yGwCi9GI34xvi7A/HXYWQO65CSD2u3MczUJSuwXKFIxlGsgBQizV9q5J9NHj4VG0n+pA==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=12.0.0" + } + }, + "node_modules/fdir": { + "version": "6.5.0", + "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.5.0.tgz", + "integrity": "sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12.0.0" + }, + "peerDependencies": { + "picomatch": "^3 || ^4" + }, + "peerDependenciesMeta": { + "picomatch": { + "optional": true + } + } + }, + "node_modules/fsevents": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, + "node_modules/json-with-bigint": { + "version": "3.5.10", + "resolved": "https://registry.npmjs.org/json-with-bigint/-/json-with-bigint-3.5.10.tgz", + "integrity": "sha512-Vcx+JVNEBts/xfcoCS69sKrOhOk/3TVlvlT+XzUOefVKnnrbYSCKpDCm10pohsJFtsJVYnwa/cXRZ4eElzaM6w==", + "license": "MIT" + }, + "node_modules/lightningcss": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss/-/lightningcss-1.32.0.tgz", + "integrity": "sha512-NXYBzinNrblfraPGyrbPoD19C1h9lfI/1mzgWYvXUTe414Gz/X1FD2XBZSZM7rRTrMA8JL3OtAaGifrIKhQ5yQ==", + "dev": true, + "license": "MPL-2.0", + "dependencies": { + "detect-libc": "^2.0.3" + }, + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + }, + "optionalDependencies": { + "lightningcss-android-arm64": "1.32.0", + "lightningcss-darwin-arm64": "1.32.0", + "lightningcss-darwin-x64": "1.32.0", + "lightningcss-freebsd-x64": "1.32.0", + "lightningcss-linux-arm-gnueabihf": "1.32.0", + "lightningcss-linux-arm64-gnu": "1.32.0", + "lightningcss-linux-arm64-musl": "1.32.0", + "lightningcss-linux-x64-gnu": "1.32.0", + "lightningcss-linux-x64-musl": "1.32.0", + "lightningcss-win32-arm64-msvc": "1.32.0", + "lightningcss-win32-x64-msvc": "1.32.0" + } + }, + "node_modules/lightningcss-android-arm64": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss-android-arm64/-/lightningcss-android-arm64-1.32.0.tgz", + "integrity": "sha512-YK7/ClTt4kAK0vo6w3X+Pnm0D2cf2vPHbhOXdoNti1Ga0al1P4TBZhwjATvjNwLEBCnKvjJc2jQgHXH0NEwlAg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-darwin-arm64": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss-darwin-arm64/-/lightningcss-darwin-arm64-1.32.0.tgz", + "integrity": "sha512-RzeG9Ju5bag2Bv1/lwlVJvBE3q6TtXskdZLLCyfg5pt+HLz9BqlICO7LZM7VHNTTn/5PRhHFBSjk5lc4cmscPQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-darwin-x64": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss-darwin-x64/-/lightningcss-darwin-x64-1.32.0.tgz", + "integrity": "sha512-U+QsBp2m/s2wqpUYT/6wnlagdZbtZdndSmut/NJqlCcMLTWp5muCrID+K5UJ6jqD2BFshejCYXniPDbNh73V8w==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-freebsd-x64": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss-freebsd-x64/-/lightningcss-freebsd-x64-1.32.0.tgz", + "integrity": "sha512-JCTigedEksZk3tHTTthnMdVfGf61Fky8Ji2E4YjUTEQX14xiy/lTzXnu1vwiZe3bYe0q+SpsSH/CTeDXK6WHig==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-linux-arm-gnueabihf": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss-linux-arm-gnueabihf/-/lightningcss-linux-arm-gnueabihf-1.32.0.tgz", + "integrity": "sha512-x6rnnpRa2GL0zQOkt6rts3YDPzduLpWvwAF6EMhXFVZXD4tPrBkEFqzGowzCsIWsPjqSK+tyNEODUBXeeVHSkw==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-linux-arm64-gnu": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss-linux-arm64-gnu/-/lightningcss-linux-arm64-gnu-1.32.0.tgz", + "integrity": "sha512-0nnMyoyOLRJXfbMOilaSRcLH3Jw5z9HDNGfT/gwCPgaDjnx0i8w7vBzFLFR1f6CMLKF8gVbebmkUN3fa/kQJpQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-linux-arm64-musl": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss-linux-arm64-musl/-/lightningcss-linux-arm64-musl-1.32.0.tgz", + "integrity": "sha512-UpQkoenr4UJEzgVIYpI80lDFvRmPVg6oqboNHfoH4CQIfNA+HOrZ7Mo7KZP02dC6LjghPQJeBsvXhJod/wnIBg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-linux-x64-gnu": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss-linux-x64-gnu/-/lightningcss-linux-x64-gnu-1.32.0.tgz", + "integrity": "sha512-V7Qr52IhZmdKPVr+Vtw8o+WLsQJYCTd8loIfpDaMRWGUZfBOYEJeyJIkqGIDMZPwPx24pUMfwSxxI8phr/MbOA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-linux-x64-musl": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss-linux-x64-musl/-/lightningcss-linux-x64-musl-1.32.0.tgz", + "integrity": "sha512-bYcLp+Vb0awsiXg/80uCRezCYHNg1/l3mt0gzHnWV9XP1W5sKa5/TCdGWaR/zBM2PeF/HbsQv/j2URNOiVuxWg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-win32-arm64-msvc": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss-win32-arm64-msvc/-/lightningcss-win32-arm64-msvc-1.32.0.tgz", + "integrity": "sha512-8SbC8BR40pS6baCM8sbtYDSwEVQd4JlFTOlaD3gWGHfThTcABnNDBda6eTZeqbofalIJhFx0qKzgHJmcPTnGdw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-win32-x64-msvc": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss-win32-x64-msvc/-/lightningcss-win32-x64-msvc-1.32.0.tgz", + "integrity": "sha512-Amq9B/SoZYdDi1kFrojnoqPLxYhQ4Wo5XiL8EVJrVsB8ARoC1PWW6VGtT0WKCemjy8aC+louJnjS7U18x3b06Q==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/magic-string": { + "version": "0.30.21", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.21.tgz", + "integrity": "sha512-vd2F4YUyEXKGcLHoq+TEyCjxueSeHnFxyyjNp80yg0XV4vUhnDer/lvvlqM/arB5bXQN5K2/3oinyCRyx8T2CQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/sourcemap-codec": "^1.5.5" + } + }, + "node_modules/nanoid": { + "version": "3.3.16", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.16.tgz", + "integrity": "sha512-bzlKTyNJ7+LdGIIwy8ijFpIqEQIvafahV7eYykJ8Cvh42EdJeODoJ6gUJXpQJvej1BddH8OqTXZNE/KfbWAu8Q==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "bin": { + "nanoid": "bin/nanoid.cjs" + }, + "engines": { + "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" + } + }, + "node_modules/obug": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/obug/-/obug-2.1.3.tgz", + "integrity": "sha512-9miFgM2OFba7hB+pRgvtV84pYTBaoTHohvmIgiRt6dRIzbwEOIaNaP+dIlGs2fNFoB0SeISs0Jz5WFVRid6Xyg==", + "dev": true, + "funding": [ + "https://github.com/sponsors/sxzz", + "https://opencollective.com/debug" + ], + "license": "MIT", + "engines": { + "node": ">=12.20.0" + } + }, + "node_modules/pathe": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/pathe/-/pathe-2.0.3.tgz", + "integrity": "sha512-WUjGcAqP1gQacoQe+OBJsFA7Ld4DyXuUIjZ5cc75cLHvJ7dtNsTugphxIADwspS+AraAUePCKrSVtPLFj/F88w==", + "dev": true, + "license": "MIT" + }, + "node_modules/picocolors": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", + "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==", + "dev": true, + "license": "ISC" + }, + "node_modules/picomatch": { + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.5.tgz", + "integrity": "sha512-RvwwcruNjI1ncT5xRakeyS9Lf8lcItv34KD+aif+VH9kduAyfYBipGh12274xtenIPZ119/R9BdTBa8gAwSh0A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/postcss": { + "version": "8.5.19", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.19.tgz", + "integrity": "sha512-Mz8SaolMd8nB+G13WkORcxQKHZ/NE4xXevtkJHVuG+guo9/wYKlIMTKAqGdEmYOXR2ijPjTYNHssizdaVSUNdQ==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/postcss" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "dependencies": { + "nanoid": "^3.3.12", + "picocolors": "^1.1.1", + "source-map-js": "^1.2.1" + }, + "engines": { + "node": "^10 || ^12 || >=14" + } + }, + "node_modules/rolldown": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/rolldown/-/rolldown-1.1.5.tgz", + "integrity": "sha512-t9z29cJjXf/vxQ8dyhCSpt6H6aSwHTk8cT5I3iy6SMXuFpk5mB6PL6XfC8PCwrPTx93udwKUm9HRteAlTGBLiA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@oxc-project/types": "=0.139.0", + "@rolldown/pluginutils": "^1.0.0" + }, + "bin": { + "rolldown": "bin/cli.mjs" + }, + "engines": { + "node": "^20.19.0 || >=22.12.0" + }, + "optionalDependencies": { + "@rolldown/binding-android-arm64": "1.1.5", + "@rolldown/binding-darwin-arm64": "1.1.5", + "@rolldown/binding-darwin-x64": "1.1.5", + "@rolldown/binding-freebsd-x64": "1.1.5", + "@rolldown/binding-linux-arm-gnueabihf": "1.1.5", + "@rolldown/binding-linux-arm64-gnu": "1.1.5", + "@rolldown/binding-linux-arm64-musl": "1.1.5", + "@rolldown/binding-linux-ppc64-gnu": "1.1.5", + "@rolldown/binding-linux-s390x-gnu": "1.1.5", + "@rolldown/binding-linux-x64-gnu": "1.1.5", + "@rolldown/binding-linux-x64-musl": "1.1.5", + "@rolldown/binding-openharmony-arm64": "1.1.5", + "@rolldown/binding-wasm32-wasi": "1.1.5", + "@rolldown/binding-win32-arm64-msvc": "1.1.5", + "@rolldown/binding-win32-x64-msvc": "1.1.5" + } + }, + "node_modules/siginfo": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/siginfo/-/siginfo-2.0.0.tgz", + "integrity": "sha512-ybx0WO1/8bSBLEWXZvEd7gMW3Sn3JFlW3TvX1nREbDLRNQNaeNN8WK0meBwPdAaOI7TtRRRJn/Es1zhrrCHu7g==", + "dev": true, + "license": "ISC" + }, + "node_modules/source-map-js": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz", + "integrity": "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/stackback": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/stackback/-/stackback-0.0.2.tgz", + "integrity": "sha512-1XMJE5fQo1jGH6Y/7ebnwPOBEkIEnT4QF32d5R1+VXdXveM0IBMJt8zfaxX1P3QhVwrYe+576+jkANtSS2mBbw==", + "dev": true, + "license": "MIT" + }, + "node_modules/std-env": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/std-env/-/std-env-4.2.0.tgz", + "integrity": "sha512-oCUKSupKTHX53EyjDtuZQ64pjLJ6yYCtpmEw0goYxtjG9KpbRe8KAsl2tBUGU9DyMcJ0RwJ8GqJAFzMXcXW1Rw==", + "dev": true, + "license": "MIT" + }, + "node_modules/tinybench": { + "version": "2.9.0", + "resolved": "https://registry.npmjs.org/tinybench/-/tinybench-2.9.0.tgz", + "integrity": "sha512-0+DUvqWMValLmha6lr4kD8iAMK1HzV0/aKnCtWb9v9641TnP/MFb7Pc2bxoxQjTXAErryXVgUOfv2YqNllqGeg==", + "dev": true, + "license": "MIT" + }, + "node_modules/tinyexec": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/tinyexec/-/tinyexec-1.2.4.tgz", + "integrity": "sha512-SHf/r48b7vOrjve9PxJo3MN5v5yuyjHvdUcrQffT3WXMUfnGmHDVbC4k3sHJaJTgZCwpUplIaAo5ANtMyp3YHg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + } + }, + "node_modules/tinyglobby": { + "version": "0.2.17", + "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.17.tgz", + "integrity": "sha512-wXR/dYpcqKmfWpEdZjiKJOwCNFndD0DMnrW/cYjVGttEkBfVgcLFHoNrlj47mjOVic9yyNu65alsgF4NQyTa2g==", + "dev": true, + "license": "MIT", + "dependencies": { + "fdir": "^6.5.0", + "picomatch": "^4.0.4" + }, + "engines": { + "node": ">=12.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/SuperchupuDev" + } + }, + "node_modules/tinyrainbow": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/tinyrainbow/-/tinyrainbow-3.1.0.tgz", + "integrity": "sha512-Bf+ILmBgretUrdJxzXM0SgXLZ3XfiaUuOj/IKQHuTXip+05Xn+uyEYdVg0kYDipTBcLrCVyUzAPz7QmArb0mmw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/tslib": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", + "dev": true, + "license": "0BSD", + "optional": true + }, + "node_modules/tunnel": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/tunnel/-/tunnel-0.0.6.tgz", + "integrity": "sha512-1h/Lnq9yajKY2PEbBadPXj3VxsDDu844OnaAo52UVmIzIvwwtBPIuNvkjuzBlTWpfJyUbG3ez0KSBibQkj4ojg==", + "license": "MIT", + "engines": { + "node": ">=0.6.11 <=0.7.0 || >=0.7.3" + } + }, + "node_modules/typescript": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-7.0.2.tgz", + "integrity": "sha512-8FYau96o3NKOhbjKi/qNvG/W5jhzxkbdm5sj9AbZ/5T5sWqn3hJgLfGx27sRKZWTvyzCP8dLRBTf5tBTSRVUNA==", + "dev": true, + "license": "Apache-2.0", + "bin": { + "tsc": "bin/tsc" + }, + "engines": { + "node": ">=16.20.0" + }, + "optionalDependencies": { + "@typescript/typescript-aix-ppc64": "7.0.2", + "@typescript/typescript-darwin-arm64": "7.0.2", + "@typescript/typescript-darwin-x64": "7.0.2", + "@typescript/typescript-freebsd-arm64": "7.0.2", + "@typescript/typescript-freebsd-x64": "7.0.2", + "@typescript/typescript-linux-arm": "7.0.2", + "@typescript/typescript-linux-arm64": "7.0.2", + "@typescript/typescript-linux-loong64": "7.0.2", + "@typescript/typescript-linux-mips64el": "7.0.2", + "@typescript/typescript-linux-ppc64": "7.0.2", + "@typescript/typescript-linux-riscv64": "7.0.2", + "@typescript/typescript-linux-s390x": "7.0.2", + "@typescript/typescript-linux-x64": "7.0.2", + "@typescript/typescript-netbsd-arm64": "7.0.2", + "@typescript/typescript-netbsd-x64": "7.0.2", + "@typescript/typescript-openbsd-arm64": "7.0.2", + "@typescript/typescript-openbsd-x64": "7.0.2", + "@typescript/typescript-sunos-x64": "7.0.2", + "@typescript/typescript-win32-arm64": "7.0.2", + "@typescript/typescript-win32-x64": "7.0.2" + } + }, + "node_modules/undici": { + "version": "6.27.0", + "resolved": "https://registry.npmjs.org/undici/-/undici-6.27.0.tgz", + "integrity": "sha512-YmfV3YnEDzXRC5lZ2jWtWWHKGUm1zIt8AhesR1tens+HTNv+YZlN/dp6G727LOvMJ8xjP9Be7Y2Sdr96LDm+pg==", + "license": "MIT", + "engines": { + "node": ">=18.17" + } + }, + "node_modules/undici-types": { + "version": "8.3.0", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-8.3.0.tgz", + "integrity": "sha512-j375ScV60dom+YkPFIfTLcOiPxkN/buHz5GobjLhixFuANaNs3C9l4GmrWqejgXWJ7BbJcFYpTEUkS1Ge8bpZQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/universal-user-agent": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/universal-user-agent/-/universal-user-agent-7.0.3.tgz", + "integrity": "sha512-TmnEAEAsBJVZM/AADELsK76llnwcf9vMKuPz8JflO1frO8Lchitr0fNaN9d+Ap0BjKtqWqd/J17qeDnXh8CL2A==", + "license": "ISC" + }, + "node_modules/vite": { + "version": "8.1.4", + "resolved": "https://registry.npmjs.org/vite/-/vite-8.1.4.tgz", + "integrity": "sha512-bTT9PsdWO+MQMNG9ZXIP/qM9wGh37DFxTV/sPq9cFpHr3w4jkgef032PkAL9jAqhk3Nz8NQw3O8n6/xFkqO4QQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "lightningcss": "^1.32.0", + "picomatch": "^4.0.5", + "postcss": "^8.5.16", + "rolldown": "~1.1.4", + "tinyglobby": "^0.2.17" + }, + "bin": { + "vite": "bin/vite.js" + }, + "engines": { + "node": "^20.19.0 || >=22.12.0" + }, + "funding": { + "url": "https://github.com/vitejs/vite?sponsor=1" + }, + "optionalDependencies": { + "fsevents": "~2.3.3" + }, + "peerDependencies": { + "@types/node": "^20.19.0 || >=22.12.0", + "@vitejs/devtools": "^0.3.0", + "esbuild": "^0.27.0 || ^0.28.0", + "jiti": ">=1.21.0", + "less": "^4.0.0", + "sass": "^1.70.0", + "sass-embedded": "^1.70.0", + "stylus": ">=0.54.8", + "sugarss": "^5.0.0", + "terser": "^5.16.0", + "tsx": "^4.8.1", + "yaml": "^2.4.2" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + }, + "@vitejs/devtools": { + "optional": true + }, + "esbuild": { + "optional": true + }, + "jiti": { + "optional": true + }, + "less": { + "optional": true + }, + "sass": { + "optional": true + }, + "sass-embedded": { + "optional": true + }, + "stylus": { + "optional": true + }, + "sugarss": { + "optional": true + }, + "terser": { + "optional": true + }, + "tsx": { + "optional": true + }, + "yaml": { + "optional": true + } + } + }, + "node_modules/vitest": { + "version": "4.1.10", + "resolved": "https://registry.npmjs.org/vitest/-/vitest-4.1.10.tgz", + "integrity": "sha512-R9jUTe5S4Qb0HCd4TNqpC7oGcrMssMRGXLW80ubjWsW9VH5GF8y1Y0SFLY9AbqSk6nt0PnOx4H4WNJYZ13GUPw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@vitest/expect": "4.1.10", + "@vitest/mocker": "4.1.10", + "@vitest/pretty-format": "4.1.10", + "@vitest/runner": "4.1.10", + "@vitest/snapshot": "4.1.10", + "@vitest/spy": "4.1.10", + "@vitest/utils": "4.1.10", + "es-module-lexer": "^2.0.0", + "expect-type": "^1.3.0", + "magic-string": "^0.30.21", + "obug": "^2.1.1", + "pathe": "^2.0.3", + "picomatch": "^4.0.3", + "std-env": "^4.0.0-rc.1", + "tinybench": "^2.9.0", + "tinyexec": "^1.0.2", + "tinyglobby": "^0.2.15", + "tinyrainbow": "^3.1.0", + "vite": "^6.0.0 || ^7.0.0 || ^8.0.0", + "why-is-node-running": "^2.3.0" + }, + "bin": { + "vitest": "vitest.mjs" + }, + "engines": { + "node": "^20.0.0 || ^22.0.0 || >=24.0.0" + }, + "funding": { + "url": "https://opencollective.com/vitest" + }, + "peerDependencies": { + "@edge-runtime/vm": "*", + "@opentelemetry/api": "^1.9.0", + "@types/node": "^20.0.0 || ^22.0.0 || >=24.0.0", + "@vitest/browser-playwright": "4.1.10", + "@vitest/browser-preview": "4.1.10", + "@vitest/browser-webdriverio": "4.1.10", + "@vitest/coverage-istanbul": "4.1.10", + "@vitest/coverage-v8": "4.1.10", + "@vitest/ui": "4.1.10", + "happy-dom": "*", + "jsdom": "*", + "vite": "^6.0.0 || ^7.0.0 || ^8.0.0" + }, + "peerDependenciesMeta": { + "@edge-runtime/vm": { + "optional": true + }, + "@opentelemetry/api": { + "optional": true + }, + "@types/node": { + "optional": true + }, + "@vitest/browser-playwright": { + "optional": true + }, + "@vitest/browser-preview": { + "optional": true + }, + "@vitest/browser-webdriverio": { + "optional": true + }, + "@vitest/coverage-istanbul": { + "optional": true + }, + "@vitest/coverage-v8": { + "optional": true + }, + "@vitest/ui": { + "optional": true + }, + "happy-dom": { + "optional": true + }, + "jsdom": { + "optional": true + }, + "vite": { + "optional": false + } + } + }, + "node_modules/why-is-node-running": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/why-is-node-running/-/why-is-node-running-2.3.0.tgz", + "integrity": "sha512-hUrmaWBdVDcxvYqnyh09zunKzROWjbZTiNy8dBEjkS7ehEDQibXJ7XvlmtbwuTclUiIyN+CyXQD4Vmko8fNm8w==", + "dev": true, + "license": "MIT", + "dependencies": { + "siginfo": "^2.0.0", + "stackback": "0.0.2" + }, + "bin": { + "why-is-node-running": "cli.js" + }, + "engines": { + "node": ">=8" + } + } + } +} diff --git a/actions/remap-git-notes/package.json b/actions/remap-git-notes/package.json new file mode 100644 index 00000000..8d673130 --- /dev/null +++ b/actions/remap-git-notes/package.json @@ -0,0 +1,24 @@ +{ + "name": "remap-git-notes", + "version": "0.1.0", + "private": true, + "description": "GitHub Action that remaps Git notes to rebased commits after a rebase merge", + "type": "module", + "scripts": { + "build": "tsc", + "test": "vitest run", + "package": "ncc build src/main.ts -o dist --license licenses.txt" + }, + "dependencies": { + "@actions/core": "3.0.1", + "@actions/exec": "3.0.0", + "@actions/github": "9.1.1", + "@actions/io": "3.0.2" + }, + "devDependencies": { + "@types/node": "26.1.1", + "@vercel/ncc": "0.44.1", + "typescript": "7.0.2", + "vitest": "4.1.10" + } +} diff --git a/actions/remap-git-notes/src/git.ts b/actions/remap-git-notes/src/git.ts new file mode 100644 index 00000000..5c30bf71 --- /dev/null +++ b/actions/remap-git-notes/src/git.ts @@ -0,0 +1,37 @@ +export interface GitResult { + stdout: string; + stderr: string; + exitCode: number; +} + +export interface CommitMetadata { + sha: string; + subject: string; + authorName: string; + authorEmail: string; + authorTimestamp: number; + trailers: Record; + changedPaths: string[]; + diffstat: { insertions: number; deletions: number }; +} + +export async function runGit(_args: string[]): Promise { + throw new Error("not implemented"); +} + +export async function computePatchId(_sha: string): Promise { + throw new Error("not implemented"); +} + +export async function readCommitMetadata(_sha: string): Promise { + throw new Error("not implemented"); +} + +export async function listCandidateRange( + _anchorSha: string | null, + _branch: string, + _count: number, + _searchDepth: number, +): Promise { + throw new Error("not implemented"); +} diff --git a/actions/remap-git-notes/src/github.ts b/actions/remap-git-notes/src/github.ts new file mode 100644 index 00000000..07297072 --- /dev/null +++ b/actions/remap-git-notes/src/github.ts @@ -0,0 +1,23 @@ +export interface PullRequestEvent { + merged: boolean; + prNumber: number; + baseBranch: string; + headBranch: string; + mergeCommitSha: string | null; +} + +export interface PrCommit { + sha: string; + position: number; +} + +export function parsePullRequestEvent(_eventPayload: unknown): PullRequestEvent { + throw new Error("not implemented"); +} + +export async function listPrCommits( + _token: string, + _prNumber: number, +): Promise { + throw new Error("not implemented"); +} diff --git a/actions/remap-git-notes/src/main.ts b/actions/remap-git-notes/src/main.ts new file mode 100644 index 00000000..7944d1ec --- /dev/null +++ b/actions/remap-git-notes/src/main.ts @@ -0,0 +1,44 @@ +import * as core from "@actions/core"; + +export interface ActionInputs { + githubToken: string; + notesRef: string; + remote: string; + targetBranch: string; + searchDepth: number; + failOnUnmapped: boolean; + dryRun: boolean; +} + +export function readInputs(): ActionInputs { + const searchDepth = Number.parseInt(core.getInput("search-depth"), 10); + if (!Number.isInteger(searchDepth) || searchDepth <= 0) { + throw new Error("search-depth must be a positive integer"); + } + return { + githubToken: core.getInput("github-token", { required: true }), + notesRef: core.getInput("notes-ref"), + remote: core.getInput("remote"), + targetBranch: core.getInput("target-branch"), + searchDepth, + failOnUnmapped: core.getBooleanInput("fail-on-unmapped"), + dryRun: core.getBooleanInput("dry-run"), + }; +} + +export async function run(): Promise { + try { + const inputs = readInputs(); + core.info( + `remap-git-notes scaffold: notes-ref=${inputs.notesRef} remote=${inputs.remote} ` + + `search-depth=${inputs.searchDepth} dry-run=${inputs.dryRun}`, + ); + core.info("No remapping logic implemented yet; exiting cleanly."); + } catch (error) { + core.setFailed(error instanceof Error ? error.message : String(error)); + } +} + +if (process.env.VITEST === undefined) { + await run(); +} diff --git a/actions/remap-git-notes/src/mapping.ts b/actions/remap-git-notes/src/mapping.ts new file mode 100644 index 00000000..04a3cda5 --- /dev/null +++ b/actions/remap-git-notes/src/mapping.ts @@ -0,0 +1,35 @@ +export type Confidence = "very-high" | "high" | "medium" | "low" | "none"; + +export type MappingSignal = + | "unique-patch-id" + | "provenance-trailer" + | "monotonic-sequence" + | "content-similarity"; + +export interface CommitFacts { + sha: string; + position: number; + patchId: string | null; + subject: string; + authorEmail: string; + authorTimestamp: number; + trailers: Record; + changedPaths: string[]; + diffstat: { insertions: number; deletions: number }; +} + +export interface MappingDecision { + originalSha: string; + rebasedSha: string | null; + confidence: Confidence; + signals: MappingSignal[]; + copyable: boolean; + reason: string; +} + +export function mapCommits( + _originals: CommitFacts[], + _candidates: CommitFacts[], +): MappingDecision[] { + throw new Error("not implemented"); +} diff --git a/actions/remap-git-notes/src/notes.ts b/actions/remap-git-notes/src/notes.ts new file mode 100644 index 00000000..0cb3dabd --- /dev/null +++ b/actions/remap-git-notes/src/notes.ts @@ -0,0 +1,27 @@ +export type NoteApplyResult = + | { kind: "noop" } + | { kind: "copied" } + | { kind: "merged" }; + +export async function readNote( + _notesRef: string, + _sha: string, +): Promise { + throw new Error("not implemented"); +} + +export async function applyNote( + _notesRef: string, + _originalSha: string, + _destinationSha: string, + _note: string, +): Promise { + throw new Error("not implemented"); +} + +export async function pushNotesRef( + _remote: string, + _notesRef: string, +): Promise { + throw new Error("not implemented"); +} diff --git a/actions/remap-git-notes/src/summary.ts b/actions/remap-git-notes/src/summary.ts new file mode 100644 index 00000000..0ce93c2e --- /dev/null +++ b/actions/remap-git-notes/src/summary.ts @@ -0,0 +1,20 @@ +import type { MappingDecision } from "./mapping.js"; + +export interface RunReport { + prNumber: number; + baseBranch: string; + targetBranch: string; + notesRef: string; + rebaseMergeDetected: boolean; + decisions: MappingDecision[]; + mappedCount: number; + copiedCount: number; + skippedCount: number; + unmappedCount: number; + conflictCount: number; + changed: boolean; +} + +export function renderJobSummary(_report: RunReport): string { + throw new Error("not implemented"); +} diff --git a/actions/remap-git-notes/tests/main.test.ts b/actions/remap-git-notes/tests/main.test.ts new file mode 100644 index 00000000..57f36d9f --- /dev/null +++ b/actions/remap-git-notes/tests/main.test.ts @@ -0,0 +1,73 @@ +import { afterEach, describe, expect, it } from "vitest"; + +import { readInputs } from "../src/main.js"; + +const INPUT_ENV_KEYS = [ + "INPUT_GITHUB-TOKEN", + "INPUT_NOTES-REF", + "INPUT_REMOTE", + "INPUT_TARGET-BRANCH", + "INPUT_SEARCH-DEPTH", + "INPUT_FAIL-ON-UNMAPPED", + "INPUT_DRY-RUN", +] as const; + +function setInputs(values: Partial>): void { + for (const key of INPUT_ENV_KEYS) { + const value = values[key]; + if (value === undefined) { + delete process.env[key]; + } else { + process.env[key] = value; + } + } +} + +afterEach(() => { + setInputs({}); +}); + +describe("readInputs", () => { + it("parses all inputs", () => { + setInputs({ + "INPUT_GITHUB-TOKEN": "token-value", + "INPUT_NOTES-REF": "refs/notes/sce-agent-trace", + "INPUT_REMOTE": "origin", + "INPUT_TARGET-BRANCH": "main", + "INPUT_SEARCH-DEPTH": "50", + "INPUT_FAIL-ON-UNMAPPED": "false", + "INPUT_DRY-RUN": "true", + }); + + expect(readInputs()).toEqual({ + githubToken: "token-value", + notesRef: "refs/notes/sce-agent-trace", + remote: "origin", + targetBranch: "main", + searchDepth: 50, + failOnUnmapped: false, + dryRun: true, + }); + }); + + it("rejects a missing github-token", () => { + setInputs({ + "INPUT_SEARCH-DEPTH": "50", + "INPUT_FAIL-ON-UNMAPPED": "false", + "INPUT_DRY-RUN": "false", + }); + + expect(() => readInputs()).toThrow(/github-token/); + }); + + it("rejects a non-positive search-depth", () => { + setInputs({ + "INPUT_GITHUB-TOKEN": "token-value", + "INPUT_SEARCH-DEPTH": "0", + "INPUT_FAIL-ON-UNMAPPED": "false", + "INPUT_DRY-RUN": "false", + }); + + expect(() => readInputs()).toThrow(/search-depth/); + }); +}); diff --git a/actions/remap-git-notes/tsconfig.json b/actions/remap-git-notes/tsconfig.json new file mode 100644 index 00000000..341f206f --- /dev/null +++ b/actions/remap-git-notes/tsconfig.json @@ -0,0 +1,19 @@ +{ + "compilerOptions": { + "target": "es2023", + "module": "nodenext", + "moduleResolution": "nodenext", + "lib": ["es2023"], + "strict": true, + "noUncheckedIndexedAccess": true, + "exactOptionalPropertyTypes": true, + "noImplicitOverride": true, + "noFallthroughCasesInSwitch": true, + "forceConsistentCasingInFileNames": true, + "isolatedModules": true, + "declaration": false, + "noEmit": true, + "types": ["node"] + }, + "include": ["src/**/*.ts", "tests/**/*.ts"] +} diff --git a/actions/remap-git-notes/vitest.config.ts b/actions/remap-git-notes/vitest.config.ts new file mode 100644 index 00000000..19384e80 --- /dev/null +++ b/actions/remap-git-notes/vitest.config.ts @@ -0,0 +1,7 @@ +import { defineConfig } from "vitest/config"; + +export default defineConfig({ + test: { + include: ["tests/**/*.test.ts"], + }, +}); diff --git a/context/context-map.md b/context/context-map.md index 163a9586..69d84295 100644 --- a/context/context-map.md +++ b/context/context-map.md @@ -62,6 +62,7 @@ Feature/domain context: - `context/sce/cli-release-artifact-contract.md` (shared `sce` binary release artifact naming, checksum/manifest outputs, pre-archive staged-binary preparation including macOS `libiconv` install-name sanitization/ad-hoc re-signing, native portability audit app/check for forbidden `/nix/store/` runtime references, GitHub Releases as the canonical artifact publication surface, manual dispatch `prerelease` flag behavior, the current three-target Linux/macOS release workflow topology including pre-upload extracted-archive smoke/audit validation in each native lane, implemented Flatpak source-manifest and source-built `.flatpak` bundle package assets uploaded by `.github/workflows/release-sce.yml`, and Flatpak's explicit source-built non-binary exception) - `context/sce/cli-npm-distribution-contract.md` (implemented `sce` npm launcher package, release-manifest/checksum-verified native binary install flow, the supported darwin/arm64 plus linux x64+arm64 npm platform matrix, the prerequisite that npm-consumed native archives are portable and free of forbidden `/nix/store/` runtime references before upload, and dedicated `.github/workflows/publish-npm.yml` downstream npm publish-stage contract including prerelease publication via npm `next` dist-tag instead of `latest`) - `context/sce/cli-cargo-distribution-contract.md` (implemented `sce` Cargo publication posture plus supported crates.io, git, and local checkout install guidance, dedicated crates.io publish workflow with semver prerelease guard, and ephemeral crate-local generated-asset mirror requirement for published builds) +- `context/sce/remap-git-notes-action.md` (local TypeScript GitHub Action at `actions/remap-git-notes/` for post-rebase-merge Git notes remediation targeting `refs/notes/sce-agent-trace`; currently a T01 scaffold — action.yml input/output contract, exactly-pinned npm toolchain, strict TypeScript module stubs, vitest — with mapping/notes logic in later plan tasks) - `context/sce/flatpak-distribution-patterns.md` (implementation conventions for the source-built `dev.crocoder.sce` Flatpak channel: manifest generation, flake app surface, local and release builds, release assets, runtime Git access via host-git bridge, and general distribution patterns) Working areas: diff --git a/context/plans/remap-git-notes-action.md b/context/plans/remap-git-notes-action.md new file mode 100644 index 00000000..5c63e623 --- /dev/null +++ b/context/plans/remap-git-notes-action.md @@ -0,0 +1,146 @@ +# Plan: remap-git-notes-action + +## Change summary + +Build a production-ready TypeScript GitHub Action at `actions/remap-git-notes/` that performs best-effort remediation of Git notes after a PR is merged with GitHub's "Rebase and merge" strategy. GitHub's server-side rebase rewrites commit SHAs, so notes attached to original PR commits are orphaned. The action retrieves the original PR commit SHAs via the GitHub REST API, identifies the corresponding rebased commits on the target branch using a conservative multi-signal confidence model (stable patch ID, monotonic sequence order, content similarity, provenance trailers), copies notes only for high-confidence mappings, merges idempotently with any existing destination notes, and pushes the notes ref with fetch-reconcile-retry on non-fast-forward rejection. + +Additionally, wire this repository's own workflow to run the action against `refs/notes/sce-agent-trace` (the Agent Trace notes ref), commit the `dist/` bundle, and add a CI freshness check ensuring `dist/` matches `src/`. + +Guiding principle: a missed mapping is acceptable; an incorrect mapping is not. The action never knowingly copies a note to an uncertain commit and never discards an existing destination note. + +## Success criteria + +- Workflow triggered by `pull_request: [closed]` exits successfully (no-op) when: PR not merged, merge inconsistent with rebase merge, no notes to copy, or no reliable mapping found. +- Inputs supported: `github-token` (required), `notes-ref` (default `refs/notes/commits`), `remote` (default `origin`), `target-branch` (default PR base), `search-depth` (default `50`), `fail-on-unmapped` (default `false`), `dry-run` (default `false`). +- Outputs exposed: `mapped-count`, `copied-count`, `skipped-count`, `unmapped-count`, `conflict-count`, `changed`, `mapping-report` (concise JSON, no large note bodies). +- Mapping uses explicit confidence levels; only high-confidence mappings copy notes by default; every proposed mapping reports old SHA, new SHA, confidence, signals used, and accept/reject reason. +- Note handling is idempotent across reruns: identical notes are no-ops; empty destinations get copies; differing destinations produce a structured merged note (never overwrite/discard) exactly once; conflicts are counted and reported. +- Notes push uses no blind force push; on rejection it fetches, reconciles, reapplies, and retries a bounded number of times. +- Security: no untrusted PR code executed, `execFile`-style argument-safe process execution, token never logged, minimal permissions documented (`contents: write`, `pull-requests: read`), fork considerations documented. +- Markdown job summary written to `$GITHUB_STEP_SUMMARY` including the `| Original | Rebased | Confidence | Result | Reason |` table. +- Unit tests (vitest) cover all listed mapping/notes/error scenarios; integration tests use temporary Git repositories for the eight required scenarios. +- `dist/index.js` bundled with `@vercel/ncc`, committed, with a CI job that fails if `dist/` is stale relative to `src/`. +- `.github/workflows/remap-git-notes.yml` in this repo runs the action with `notes-ref: refs/notes/sce-agent-trace`. +- README documents problem, usage, inputs/outputs, permissions, fork security, mapping limitations, concurrency/retry behavior, dry-run and custom notes-ref examples, troubleshooting. + +## Constraints and non-goals + +- Node.js 24 runtime (`runs.using: node24`), TypeScript strict mode, `@actions/core`, `@actions/github`, `@actions/exec` (or thin safe wrapper), `@actions/io` where useful. +- Toolchain: plain npm with `package-lock.json`, vitest for tests, `@vercel/ncc` for bundling. All introduced dependencies use their latest published versions (checked at implementation time), pinned exactly. Self-contained under `actions/remap-git-notes/` — no coupling to the repo's Rust/Nix/Pkl toolchain beyond CI wiring. +- Modular layout: `src/main.ts`, `github.ts`, `git.ts`, `mapping.ts`, `notes.ts`, `summary.ts`; no monolithic `main.ts`. +- Conservative defaults: action must not fail because the notes ref doesn't exist, commits lack notes, a commit can't be mapped, the merge was squash/merge-commit, or API metadata is incomplete. It must fail on missing required inputs, unexpected git failures, auth failures, exhausted push retries, or `fail-on-unmapped=true` with unmapped noted commits. +- Provenance trailer names (e.g., `Original-Commit:`) configurable internally (constant list), not exposed as an action input for now. +- Non-goals: squash-merge note remediation, notes remediation for merge-commit merges, GraphQL API usage, publishing to the GitHub Marketplace, cross-repo (fork-writeback) note pushes. + +## Assumptions + +- Repo workflow will use `github.token` with `contents: write`; the Agent Trace notes ref is pushed by existing hooks per `context/sce/agent-trace-commit-msg-coauthor-policy.md` and this action only remaps after rebase merges. +- "Consistent with a rebase merge" is detected heuristically: merge commit SHA exists, PR base advanced by ≥ PR commit count, and the merge SHA is not a 2-parent merge commit; squash (1 rewritten commit for N>1 PR commits) is treated as non-rebase and skipped. For 1-commit PRs (where squash and rebase are indistinguishable) the action proceeds and relies on the patch-id safety net: notes copy only if the patch-id matches. +- Candidate range anchoring: walk back N (PR commit count) commits from `merge_commit_sha` (GitHub sets it to the last rebased commit); `search-depth` is only a fallback window from branch tip when `merge_commit_sha` is missing or unreachable. + +## Task stack + +- [x] T01: Scaffold `actions/remap-git-notes/` package (status:done) + - Completed: 2026-07-15 + - Files changed: actions/remap-git-notes/{action.yml,package.json,package-lock.json,tsconfig.json,vitest.config.ts,.gitignore,src/{main,github,git,mapping,notes,summary}.ts,tests/main.test.ts} + - Evidence: `npm ci`, `npm run build` (tsc), `npm test` 3/3 passed, `npx tsc --noEmit` clean; action.yml declares 7 inputs + 7 outputs, `runs.using: node24` + - Notes: deps pinned exactly at latest (@actions/core 3.0.1, @actions/github 9.1.1, @actions/exec 3.0.0, @actions/io 3.0.2; typescript 7.0.2, vitest 4.1.10, @vercel/ncc 0.44.1, @types/node 26.1.1); placeholder `main.ts` reads/validates inputs and exits cleanly; module stubs expose typed interfaces for T02–T08 + - Task ID: T01 + - Goal: Create the action skeleton: `action.yml` (inputs/outputs/runs node24), `package.json` (npm, deps: @actions/core, @actions/github, @actions/exec, @actions/io; devDeps: typescript, vitest, @vercel/ncc — every dependency added at its latest published version at implementation time, then pinned exactly, no `^`/`~` ranges, for deterministic `dist/` rebuilds; verify with `npm view version` before pinning), `tsconfig.json` (strict), vitest config, `src/` module stubs with typed interfaces, `.gitignore` for `node_modules`. + - Boundaries (in/out of scope): In — directory layout, build/test scripts (`build`, `test`, `package` via ncc), placeholder `main.ts` that reads inputs and exits cleanly. Out — any real mapping/notes logic, dist bundle, README. + - Done when: `npm ci && npm run build && npm test` pass inside `actions/remap-git-notes/`; `action.yml` declares all seven inputs and seven outputs with documented defaults. + - Verification notes (commands or checks): `cd actions/remap-git-notes && npm ci && npm run build && npm test`; `npx tsc --noEmit`. + +- [ ] T02: Implement `github.ts` event parsing and PR commit retrieval (status:todo) + - Task ID: T02 + - Goal: Parse the `pull_request` payload from `GITHUB_EVENT_PATH`, expose merged/not-merged state, base/head branches, merge commit SHA, PR number; retrieve ordered original PR commit SHAs via the REST API (paginated). + - Boundaries (in/out of scope): In — typed payload model, octokit wiring via `@actions/github`, treating all API strings as untrusted, unit tests with fixture payloads. Out — git operations, mapping. + - Done when: unit tests cover merged PR, unmerged PR, missing payload fields, and >100-commit pagination; no token value ever appears in log output. + - Verification notes (commands or checks): `npm test -- tests/github.test.ts`. + +- [ ] T03: Implement `git.ts` safe plumbing layer (status:todo) + - Task ID: T03 + - Goal: Argument-safe git execution (via `@actions/exec`, never shell interpolation) for: fetching branch/notes refs and commit objects, shallow-clone detection with bounded incremental deepening (`git fetch --deepen`, then `--unshallow` as a last step) until `merge_commit_sha` and PR commits are reachable (clear failure if still unreachable after the cap), `rev-list` of the candidate target range anchored at `merge_commit_sha` walking back the PR commit count (fallback: branch tip + `search-depth` window when `merge_commit_sha` is missing/unreachable), stable patch-id computation (`git show --pretty=format: --binary | git patch-id --stable`), commit metadata reads (subject, author, timestamp, trailers, changed paths, diffstat). + - Boundaries (in/out of scope): In — exec wrapper with captured stdout/stderr and explicit error typing, graceful handling of a missing notes ref, unit tests against a temp git repo. Out — note read/write/push (T05/T06), mapping logic. + - Done when: patch-ids, rev-lists, metadata, and trailer extraction verified against a scripted temp repository; missing notes ref returns a typed "absent" result instead of throwing; a shallow temp clone auto-deepens until required commits are reachable and fails clearly when they are not. + - Verification notes (commands or checks): `npm test -- tests/git.test.ts`. + +- [ ] T04: Implement `mapping.ts` confidence model (status:todo) + - Task ID: T04 + - Goal: Pure-function mapping engine: candidate generation from the target range, signal scoring (unique stable patch-id, provenance trailer, monotonic sequence position, secondary file/diffstat/subject/author/timestamp similarity), explicit confidence levels, monotonic-order enforcement, ambiguity rejection, and per-mapping structured reasons. + - Boundaries (in/out of scope): In — deterministic scoring over plain data structures (no git calls), rebase-merge consistency heuristic, unit tests for unique patch-id, duplicate patch-ids, monotonic sequences, reordered candidates, trailer matches, ambiguity rejection, subject-only rejection, and the 1-commit-PR case (squash/rebase indistinguishable: proceed, copy only on patch-id match). Out — note operations, orchestration. + - Done when: only very-high/high-confidence mappings are marked copyable; duplicate patch-ids resolve solely via monotonic order or are rejected; every decision carries old SHA, new SHA, confidence, signals, and reason. + - Verification notes (commands or checks): `npm test -- tests/mapping.test.ts`. + +- [ ] T05: Implement `notes.ts` read/merge/idempotent apply (status:todo) + - Task ID: T05 + - Goal: Read notes per commit from the configured ref, and apply the deterministic merge policy: identical → no-op; destination empty → copy; both differ → structured merged note preserving both (`Existing note:` / `Remapped note from :` layout) with a rerun guard that never appends the same remapped block twice — the guard matches the full generated block header (fixed template + 40-char SHA + delimiters) at line boundaries only, so untrusted note content cannot spoof it via substrings; never discard a destination note. + - Boundaries (in/out of scope): In — note read/write via `git notes --ref=...`, conflict marking, idempotency detection, unit tests for identical/absent/conflicting destination notes and double-run reruns. Out — pushing (T06), mapping. + - Done when: rerunning apply over an already-remediated repo produces zero changes; conflicting notes yield the documented merged format exactly once. + - Verification notes (commands or checks): `npm test -- tests/notes.test.ts`. + +- [ ] T06: Implement notes push with fetch-reconcile-retry (status:todo) + - Task ID: T06 + - Goal: Push the notes ref without force; on non-fast-forward rejection: fetch the remote notes ref, reset local notes ref to it, re-read destination notes, re-run the deterministic T05 merge policy to reapply intended updates, commit, and retry with a bounded attempt count; fail with a clear error after exhaustion. No `git notes merge` machinery (avoids `NOTES_MERGE` state), one idempotent code path. + - Boundaries (in/out of scope): In — push routine in `git.ts`/`notes.ts`, bounded fetch-reset-reapply-retry loop, token-authenticated remote handling without logging the token, tests simulating a concurrently advanced notes ref via a second temp clone. Out — orchestration, summary. + - Done when: concurrent-update test passes (both writers' notes survive); no `--force` in any push invocation; retries capped and surfaced. + - Verification notes (commands or checks): `npm test -- tests/push.test.ts`; `grep -rn '\-\-force' actions/remap-git-notes/src` shows no force push. + +- [ ] T07: Implement `summary.ts` logging and job summary (status:todo) + - Task ID: T07 + - Goal: Produce the Markdown `$GITHUB_STEP_SUMMARY` (PR number, branches, notes ref, rebase-merge detection, commit/candidate counts, mapped/skipped/ambiguous/conflict counts, push status, and the `| Original | Rebased | Confidence | Result | Reason |` table) and annotation policy (`core.info` progress, `core.warning` unmapped/ambiguous, `core.error` real failures). + - Boundaries (in/out of scope): In — summary rendering from a typed report object, Markdown escaping of untrusted strings (subjects, branch names), unit tests on rendered output. Out — computing the report data itself. + - Done when: summary snapshot tests pass; untrusted strings cannot break table/Markdown structure. + - Verification notes (commands or checks): `npm test -- tests/summary.test.ts`. + +- [ ] T08: Wire `main.ts` orchestration, outputs, and error policy (status:todo) + - Task ID: T08 + - Goal: Compose T02–T07 into the full flow: input parsing/validation, merged/rebase gating with clean no-op exits, fetch → map → apply → push pipeline, `dry-run` (report only, no writes/pushes), `fail-on-unmapped` enforcement, all seven action outputs including compact JSON `mapping-report`, and the conservative fail/no-fail error policy. + - Boundaries (in/out of scope): In — orchestration, output setting, exit behavior, unit tests for dry-run, fail-on-unmapped, unmerged-PR no-op, squash-merge no-op, missing notes-ref no-op. Out — new mapping/notes logic. + - Done when: all no-op conditions exit 0 with an explanatory summary; dry-run performs zero git writes; `fail-on-unmapped=true` fails only when a noted commit is unmapped; outputs match counts in the report. + - Verification notes (commands or checks): `npm test -- tests/main.test.ts`; `npm run build`. + +- [ ] T09: Integration tests with temporary Git repositories (status:todo) + - Task ID: T09 + - Goal: End-to-end tests in `tests/integration/` that script real temp repos (bare origin + clone) simulating a server-side rebase merge, covering the eight required scenarios: 3-commit clean rebase; conflict-altered commit; two identical-patch commits; destination with same note; destination with different note; double run; absent notes ref; concurrent notes-ref update. + - Boundaries (in/out of scope): In — temp-repo fixtures/helpers, event-payload fixtures, stubbed PR-commit listing (no live API), assertions on notes content and push results. Out — real GitHub API calls, CI wiring. + - Done when: all eight scenarios pass locally and in CI; identical-patch scenario maps via monotonic order or conservatively rejects — never crosswires notes. + - Verification notes (commands or checks): `npm test -- tests/integration`. + +- [ ] T10: Bundle `dist/` and commit build artifact (status:todo) + - Task ID: T10 + - Goal: Produce `dist/index.js` (plus license file) via `@vercel/ncc`, ensure `action.yml` `runs.main` points at it, and commit the bundle so the action is directly usable. + - Boundaries (in/out of scope): In — `npm run package` script, deterministic bundle output, committed `dist/`. Out — CI freshness check (T12), README. + - Done when: `npm run package` regenerates an identical `dist/` from a clean tree; a local `act`-style or node smoke run of `dist/index.js` with a fixture event exits 0. + - Verification notes (commands or checks): `cd actions/remap-git-notes && npm run package && git diff --exit-code dist/`. + +- [ ] T11: Write README and example workflow (status:todo) + - Task ID: T11 + - Goal: `actions/remap-git-notes/README.md` covering: problem statement (why notes are lost across rebase merges), full workflow usage (including the canonical example with `concurrency` group and permissions), input/output tables, fork security considerations, mapping limitations and confidence model, retry/concurrency behavior, dry-run and custom notes-ref examples, troubleshooting, and key design decisions. + - Boundaries (in/out of scope): In — README plus the documented example workflow snippet. Out — this repo's live workflow (T12), code changes. + - Done when: README includes every documentation item from the spec and the exact example workflow with `concurrency: git-notes-${{ github.repository }}` and `permissions: contents: write / pull-requests: read`. + - Verification notes (commands or checks): manual review against the spec's Documentation checklist. + +- [ ] T12: Add repo workflow and dist freshness CI check (status:todo) + - Task ID: T12 + - Goal: Add `.github/workflows/remap-git-notes.yml` running the local action on merged PRs with `notes-ref: refs/notes/sce-agent-trace`, proper permissions, and the serializing concurrency group; add a CI job (in the same or existing CI workflow) that pins Node to a fixed 24.x via `actions/setup-node`, runs `npm ci && npm run package`, and fails on `git diff --exit-code dist/` (byte-compare; deterministic thanks to exactly-pinned devDependencies). + - Boundaries (in/out of scope): In — the two workflow additions, path filters so the dist check runs on `actions/remap-git-notes/**` changes. Out — action code changes, other CI refactors. + - Done when: workflow YAML validates (actionlint or CI dry parse); dist check demonstrably fails on an intentionally stale bundle and passes on a fresh one. + - Verification notes (commands or checks): `nix run nixpkgs#actionlint -- .github/workflows/remap-git-notes.yml` (or `actionlint` if available); temporarily touch `src/` then confirm `npm run package && git diff --exit-code dist/` catches drift. + +- [ ] T13: Validation, cleanup, and context sync (status:todo) + - Task ID: T13 + - Goal: Full verification pass and shared-context synchronization for the new action. + - Boundaries (in/out of scope): In — run complete test/build/bundle checks, remove dead stubs/TODOs, confirm no token leakage or force pushes, update `context/` docs (context-map entry plus a `context/sce/` note on the remap action and its relation to the Agent Trace notes auto-push policy). Out — new features. + - Done when: `npm ci && npx tsc --noEmit && npm test && npm run package` all pass cleanly with fresh `dist/`; `git diff --exit-code` after packaging; context docs updated and consistent; no unresolved TODOs in `actions/remap-git-notes/src`. + - Verification notes (commands or checks): `cd actions/remap-git-notes && npm ci && npx tsc --noEmit && npm test && npm run package && git diff --exit-code`; `grep -rn "TODO" actions/remap-git-notes/src`; review `context/context-map.md` for the new entries. + +## Open questions + +- None. Confirmed by the user on 2026-07-15: + - Location `actions/remap-git-notes/`; toolchain npm + vitest + ncc; repo workflow on `refs/notes/sce-agent-trace` + committed `dist/` with CI freshness check. + - Candidate range anchored at `merge_commit_sha` with `search-depth` tip-window fallback. + - Merge-method detection: heuristic + patch-id safety net (1-commit PRs proceed, copy only on patch-id match). + - Push reconcile: fetch remote notes ref, reset, reapply T05 merge policy, bounded retry (no `git notes merge`). + - Rerun guard: exact structural block-header match at line boundaries. + - Dist determinism: exactly-pinned devDependencies + pinned Node 24.x in CI; shallow clones auto-deepen with a bounded cap. diff --git a/context/sce/remap-git-notes-action.md b/context/sce/remap-git-notes-action.md new file mode 100644 index 00000000..987b48c8 --- /dev/null +++ b/context/sce/remap-git-notes-action.md @@ -0,0 +1,51 @@ +# Remap Git Notes GitHub Action + +Local TypeScript GitHub Action at `actions/remap-git-notes/` that will perform +best-effort remediation of Git notes after a PR is merged with GitHub's +"Rebase and merge" strategy. GitHub's server-side rebase rewrites commit SHAs, +so notes attached to original PR commits (including Agent Trace notes under +`refs/notes/sce-agent-trace`) are orphaned. The action maps original PR +commits to their rebased counterparts with a conservative multi-signal +confidence model and copies notes only for high-confidence mappings. + +Guiding principle: a missed mapping is acceptable; an incorrect mapping is +not. The action never knowingly copies a note to an uncertain commit and +never discards an existing destination note. + +Active plan: `context/plans/remap-git-notes-action.md`. + +## Current implementation state (T01 scaffold) + +Only the package scaffold exists; no mapping/notes logic is implemented yet. + +- `action.yml` — declares the full contract: 7 inputs (`github-token`, + `notes-ref` default `refs/notes/commits`, `remote` default `origin`, + `target-branch`, `search-depth` default `50`, `fail-on-unmapped` default + `false`, `dry-run` default `false`), 7 outputs (`mapped-count`, + `copied-count`, `skipped-count`, `unmapped-count`, `conflict-count`, + `changed`, `mapping-report`), `runs.using: node24` with `main: dist/index.js` + (bundle not yet committed). +- `package.json` — plain npm, dependencies pinned exactly (no `^`/`~`) for + deterministic `dist/` rebuilds: `@actions/core`, `@actions/github`, + `@actions/exec`, `@actions/io`; devDeps `typescript` (strict), `vitest`, + `@vercel/ncc`, `@types/node`. +- `src/` module stubs with typed interfaces matching planned boundaries: + `main.ts` (input parsing implemented; orchestration placeholder that exits + cleanly), `github.ts` (event parsing/PR commit retrieval), `git.ts` (safe + argument-based git plumbing), `mapping.ts` (confidence model), `notes.ts` + (read/merge/apply/push), `summary.ts` (job summary rendering). +- `tests/main.test.ts` — input parsing coverage; scripts: `build` (tsc + typecheck), `test` (vitest), `package` (ncc bundle). + +## Boundaries + +- Self-contained under `actions/remap-git-notes/`; not coupled to the repo's + Rust/Nix/Pkl toolchain beyond future CI wiring. +- Repo workflow wiring (`.github/workflows/remap-git-notes.yml` targeting + `refs/notes/sce-agent-trace`) and dist freshness CI arrive in later plan + tasks (T10–T12). +- Related: `context/sce/agent-trace-commit-msg-coauthor-policy.md` (Agent + Trace notes are pushed by local hooks; this action only remaps after + rebase merges). + +See also: [context-map.md](../context-map.md)