@codyswann/lisa 5.4.0 → 5.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +60 -3
- package/all/copy-contents/gitignore +16 -0
- package/all/copy-contents/scripts/lisa-mutation.sh +4 -6
- package/all/copy-overwrite/scripts/fetch-test-access-map.d.mts +71 -0
- package/all/copy-overwrite/scripts/fetch-test-access-map.mjs +674 -0
- package/all/copy-overwrite/scripts/lib/affected-tests.mjs +818 -0
- package/all/copy-overwrite/scripts/lib/automation-provenance-local.mjs +48 -3
- package/all/copy-overwrite/scripts/lib/build-marker.mjs +410 -0
- package/all/copy-overwrite/scripts/lib/gate-pass-cache.mjs +537 -0
- package/all/copy-overwrite/scripts/lib/github-attestation-provider.mjs +68 -0
- package/all/copy-overwrite/scripts/lib/github-attestation-recovery.mjs +25 -10
- package/all/copy-overwrite/scripts/lib/github-attestation-verifier.mjs +4 -1
- package/all/copy-overwrite/scripts/lib/kill-marks.mjs +1 -2
- package/all/copy-overwrite/scripts/lib/lisa-cleanup-sweep-processes.mjs +3 -4
- package/all/copy-overwrite/scripts/lib/npm-update-allocate.mjs +1 -6
- package/all/copy-overwrite/scripts/lib/npm-update-authorization.mjs +25 -14
- package/all/copy-overwrite/scripts/lib/npm-update-cancel-origin.mjs +45 -11
- package/all/copy-overwrite/scripts/lib/npm-update-cancellation-proof.mjs +22 -11
- package/all/copy-overwrite/scripts/lib/npm-update-cancellation.mjs +29 -17
- package/all/copy-overwrite/scripts/lib/npm-update-controller-broker.mjs +1 -1
- package/all/copy-overwrite/scripts/lib/npm-update-controller-factory.mjs +19 -1
- package/all/copy-overwrite/scripts/lib/npm-update-gate-hooks.mjs +2 -1
- package/all/copy-overwrite/scripts/lib/npm-update-gate.mjs +5 -0
- package/all/copy-overwrite/scripts/lib/npm-update-gh-requests.mjs +57 -30
- package/all/copy-overwrite/scripts/lib/npm-update-helper-inventory.mjs +9 -1
- package/all/copy-overwrite/scripts/lib/npm-update-hosted-hook.mjs +1 -1
- package/all/copy-overwrite/scripts/lib/npm-update-leaf.mjs +6 -1
- package/all/copy-overwrite/scripts/lib/npm-update-policy.mjs +38 -0
- package/all/copy-overwrite/scripts/lib/npm-update-publication.mjs +21 -3
- package/all/copy-overwrite/scripts/lib/npm-update-publish.mjs +13 -1
- package/all/copy-overwrite/scripts/lib/npm-update-recovery.mjs +29 -4
- package/all/copy-overwrite/scripts/lib/npm-update-supersession.mjs +21 -7
- package/all/copy-overwrite/scripts/lib/npm-update-tool-launcher.mjs +1 -1
- package/all/copy-overwrite/scripts/lib/npm-update-tracker-cancel.mjs +139 -0
- package/all/copy-overwrite/scripts/lib/npm-update-tracker-jira.mjs +149 -19
- package/all/copy-overwrite/scripts/lib/npm-update-tracker-linear.mjs +72 -17
- package/all/copy-overwrite/scripts/lib/npm-update-tracker-wire.mjs +102 -12
- package/all/copy-overwrite/scripts/lib/npm-update-tracker.mjs +91 -13
- package/all/copy-overwrite/scripts/lib/push-admission.mjs +158 -0
- package/all/copy-overwrite/scripts/lib/push-gate-defaults.d.mts +34 -0
- package/all/copy-overwrite/scripts/lib/push-gate-defaults.mjs +147 -0
- package/all/copy-overwrite/scripts/lib/push-timing.mjs +323 -0
- package/all/copy-overwrite/scripts/lib/rspec-selection.mjs +672 -0
- package/all/copy-overwrite/scripts/lisa-affected-tests.mjs +566 -0
- package/all/copy-overwrite/scripts/lisa-automation-provenance.mjs +35 -8
- package/all/copy-overwrite/scripts/lisa-gates.mjs +29 -0
- package/all/copy-overwrite/scripts/lisa-lint-staged-preflight.mjs +10 -1
- package/all/copy-overwrite/scripts/lisa-npm-updater.mjs +8 -5
- package/all/copy-overwrite/scripts/lisa-push-timing-report.mjs +153 -0
- package/all/copy-overwrite/scripts/lisa-rspec-select.mjs +982 -0
- package/all/copy-overwrite/scripts/lisa-run-gates.mjs +231 -6
- package/all/copy-overwrite/scripts/npm-updater-helper-graph.json +148 -41
- package/all/deletions.json +11 -2
- package/cdk/create-only/vitest.config.local.ts +1 -7
- package/cdk/package-lisa/package.lisa.json +4 -4
- package/dist/cli/admit-cmd.d.ts +21 -0
- package/dist/cli/admit-cmd.d.ts.map +1 -0
- package/dist/cli/admit-cmd.js +142 -0
- package/dist/cli/admit-cmd.js.map +1 -0
- package/dist/cli/check-cmd.d.ts +72 -0
- package/dist/cli/check-cmd.d.ts.map +1 -0
- package/dist/cli/check-cmd.js +316 -0
- package/dist/cli/check-cmd.js.map +1 -0
- package/dist/cli/index.d.ts.map +1 -1
- package/dist/cli/index.js +6 -4
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/lisa-test-run-admission.d.ts +18 -0
- package/dist/cli/lisa-test-run-admission.d.ts.map +1 -0
- package/dist/cli/lisa-test-run-admission.js +62 -0
- package/dist/cli/lisa-test-run-admission.js.map +1 -0
- package/dist/cli/lisa-test-run-payload.d.ts +37 -0
- package/dist/cli/lisa-test-run-payload.d.ts.map +1 -0
- package/dist/cli/lisa-test-run-payload.js +55 -0
- package/dist/cli/lisa-test-run-payload.js.map +1 -0
- package/dist/cli/lisa-test-run-shard-files.d.ts +89 -0
- package/dist/cli/lisa-test-run-shard-files.d.ts.map +1 -0
- package/dist/cli/lisa-test-run-shard-files.js +239 -0
- package/dist/cli/lisa-test-run-shard-files.js.map +1 -0
- package/dist/cli/lisa-test-run-shard.d.ts +6 -2
- package/dist/cli/lisa-test-run-shard.d.ts.map +1 -1
- package/dist/cli/lisa-test-run-shard.js +25 -13
- package/dist/cli/lisa-test-run-shard.js.map +1 -1
- package/dist/cli/lisa-test-run.d.ts +1 -1
- package/dist/cli/lisa-test-run.d.ts.map +1 -1
- package/dist/cli/lisa-test-run.js +47 -10
- package/dist/cli/lisa-test-run.js.map +1 -1
- package/dist/cli/update-check-hook.d.ts.map +1 -1
- package/dist/cli/update-check-hook.js +3 -0
- package/dist/cli/update-check-hook.js.map +1 -1
- package/dist/configs/vitest/base.d.ts +58 -135
- package/dist/configs/vitest/base.d.ts.map +1 -1
- package/dist/configs/vitest/base.js +76 -228
- package/dist/configs/vitest/base.js.map +1 -1
- package/dist/configs/vitest/cdk.d.ts.map +1 -1
- package/dist/configs/vitest/cdk.js +3 -2
- package/dist/configs/vitest/cdk.js.map +1 -1
- package/dist/configs/vitest/coverage-include-global-setup.d.ts.map +1 -1
- package/dist/configs/vitest/coverage-include-global-setup.js +3 -4
- package/dist/configs/vitest/coverage-include-global-setup.js.map +1 -1
- package/dist/configs/vitest/coverage-reports-directory.d.ts +27 -5
- package/dist/configs/vitest/coverage-reports-directory.d.ts.map +1 -1
- package/dist/configs/vitest/coverage-reports-directory.js +47 -10
- package/dist/configs/vitest/coverage-reports-directory.js.map +1 -1
- package/dist/configs/vitest/harper-fabric.d.ts.map +1 -1
- package/dist/configs/vitest/harper-fabric.js +3 -2
- package/dist/configs/vitest/harper-fabric.js.map +1 -1
- package/dist/configs/vitest/nestjs.d.ts.map +1 -1
- package/dist/configs/vitest/nestjs.js +3 -2
- package/dist/configs/vitest/nestjs.js.map +1 -1
- package/dist/configs/vitest/phaser.d.ts.map +1 -1
- package/dist/configs/vitest/phaser.js +3 -2
- package/dist/configs/vitest/phaser.js.map +1 -1
- package/dist/configs/vitest/refusal-announcement.d.ts +51 -0
- package/dist/configs/vitest/refusal-announcement.d.ts.map +1 -0
- package/dist/configs/vitest/refusal-announcement.js +97 -0
- package/dist/configs/vitest/refusal-announcement.js.map +1 -0
- package/dist/configs/vitest/socket-safe-temp-base.d.ts +3 -4
- package/dist/configs/vitest/socket-safe-temp-base.d.ts.map +1 -1
- package/dist/configs/vitest/socket-safe-temp-base.js +7 -6
- package/dist/configs/vitest/socket-safe-temp-base.js.map +1 -1
- package/dist/configs/vitest/typescript.d.ts.map +1 -1
- package/dist/configs/vitest/typescript.js +3 -2
- package/dist/configs/vitest/typescript.js.map +1 -1
- package/dist/core/admission-decision.d.ts +110 -0
- package/dist/core/admission-decision.d.ts.map +1 -0
- package/dist/core/admission-decision.js +91 -0
- package/dist/core/admission-decision.js.map +1 -0
- package/dist/core/admission-lock.d.ts +69 -0
- package/dist/core/admission-lock.d.ts.map +1 -0
- package/dist/core/admission-lock.js +278 -0
- package/dist/core/admission-lock.js.map +1 -0
- package/dist/core/admission-settings.d.ts +69 -0
- package/dist/core/admission-settings.d.ts.map +1 -0
- package/dist/core/admission-settings.js +204 -0
- package/dist/core/admission-settings.js.map +1 -0
- package/dist/core/admission-state.d.ts +50 -0
- package/dist/core/admission-state.d.ts.map +1 -0
- package/dist/core/admission-state.js +168 -0
- package/dist/core/admission-state.js.map +1 -0
- package/dist/core/admission.d.ts +70 -0
- package/dist/core/admission.d.ts.map +1 -0
- package/dist/core/admission.js +205 -0
- package/dist/core/admission.js.map +1 -0
- package/dist/core/lisa-owned-hash-ledger.d.ts.map +1 -1
- package/dist/core/lisa-owned-hash-ledger.js +440 -0
- package/dist/core/lisa-owned-hash-ledger.js.map +1 -1
- package/dist/core/nightly-e2e-guard-behavior-certificate.js +2 -2
- package/dist/core/project-config-push-gate.d.ts +66 -0
- package/dist/core/project-config-push-gate.d.ts.map +1 -0
- package/dist/core/project-config-push-gate.js +82 -0
- package/dist/core/project-config-push-gate.js.map +1 -0
- package/dist/core/project-config.d.ts +4 -0
- package/dist/core/project-config.d.ts.map +1 -1
- package/dist/core/project-config.js +14 -9
- package/dist/core/project-config.js.map +1 -1
- package/dist/core/upstream-evidence-manifest.d.ts.map +1 -1
- package/dist/core/upstream-evidence-manifest.js +234 -146
- package/dist/core/upstream-evidence-manifest.js.map +1 -1
- package/expo/package-lisa/package.lisa.json +2 -2
- package/harper-fabric/package-lisa/package.lisa.json +4 -4
- package/nestjs/create-only/vitest.config.local.ts +1 -7
- package/nestjs/package-lisa/package.lisa.json +4 -4
- package/npm-package/package-lisa/package.lisa.json +4 -4
- package/package.json +12 -11
- package/phaser/package-lisa/package.lisa.json +4 -4
- package/plugins/lisa/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa/.codex-plugin/skills/lisa-drive-pr-to-merge/SKILL.md +16 -3
- package/plugins/lisa/.codex-plugin/skills/lisa-git-submit-pr/SKILL.md +1 -1
- package/plugins/lisa/.codex-plugin/skills/lisa-implement/SKILL.md +1 -1
- package/plugins/lisa/skills/lisa-drive-pr-to-merge/SKILL.md +16 -3
- package/plugins/lisa/skills/lisa-git-submit-pr/SKILL.md +1 -1
- package/plugins/lisa/skills/lisa-implement/SKILL.md +1 -1
- package/plugins/lisa-agy/plugin.json +1 -1
- package/plugins/lisa-agy/skills/lisa-drive-pr-to-merge/SKILL.md +16 -3
- package/plugins/lisa-agy/skills/lisa-git-submit-pr/SKILL.md +1 -1
- package/plugins/lisa-agy/skills/lisa-implement/SKILL.md +1 -1
- package/plugins/lisa-cdk/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-cdk/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-cdk-agy/plugin.json +1 -1
- package/plugins/lisa-cdk-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-cdk-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-cdk-devin/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-cdk-devin/.devin-plugin/plugin.json +1 -1
- package/plugins/lisa-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-copilot/skills/lisa-drive-pr-to-merge/SKILL.md +16 -3
- package/plugins/lisa-copilot/skills/lisa-git-submit-pr/SKILL.md +1 -1
- package/plugins/lisa-copilot/skills/lisa-implement/SKILL.md +1 -1
- package/plugins/lisa-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-cursor/skills/lisa-drive-pr-to-merge/SKILL.md +16 -3
- package/plugins/lisa-cursor/skills/lisa-git-submit-pr/SKILL.md +1 -1
- package/plugins/lisa-cursor/skills/lisa-implement/SKILL.md +1 -1
- package/plugins/lisa-devin/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-devin/.devin-plugin/plugin.json +1 -1
- package/plugins/lisa-devin/skills/lisa-drive-pr-to-merge/SKILL.md +16 -3
- package/plugins/lisa-devin/skills/lisa-git-submit-pr/SKILL.md +1 -1
- package/plugins/lisa-devin/skills/lisa-implement/SKILL.md +1 -1
- package/plugins/lisa-expo/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-expo/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-expo-agy/plugin.json +1 -1
- package/plugins/lisa-expo-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-expo-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-expo-devin/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-expo-devin/.devin-plugin/plugin.json +1 -1
- package/plugins/lisa-harper-fabric/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-harper-fabric/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-harper-fabric-agy/plugin.json +1 -1
- package/plugins/lisa-harper-fabric-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-harper-fabric-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-harper-fabric-devin/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-harper-fabric-devin/.devin-plugin/plugin.json +1 -1
- package/plugins/lisa-nestjs/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-nestjs/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-nestjs-agy/plugin.json +1 -1
- package/plugins/lisa-nestjs-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-nestjs-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-nestjs-devin/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-nestjs-devin/.devin-plugin/plugin.json +1 -1
- package/plugins/lisa-phaser/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-phaser/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-phaser-agy/plugin.json +1 -1
- package/plugins/lisa-phaser-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-phaser-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-phaser-devin/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-phaser-devin/.devin-plugin/plugin.json +1 -1
- package/plugins/lisa-rails/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-rails/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-rails-agy/plugin.json +1 -1
- package/plugins/lisa-rails-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-rails-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-rails-devin/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-rails-devin/.devin-plugin/plugin.json +1 -1
- package/plugins/lisa-typescript/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-typescript/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-typescript-agy/plugin.json +1 -1
- package/plugins/lisa-typescript-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-typescript-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-typescript-devin/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-typescript-devin/.devin-plugin/plugin.json +1 -1
- package/plugins/lisa-wiki/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-wiki/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-wiki-agy/plugin.json +1 -1
- package/plugins/lisa-wiki-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-wiki-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-wiki-devin/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-wiki-devin/.devin-plugin/plugin.json +1 -1
- package/plugins/src/base/skills/lisa-drive-pr-to-merge/SKILL.md +16 -3
- package/plugins/src/base/skills/lisa-git-submit-pr/SKILL.md +1 -1
- package/plugins/src/base/skills/lisa-implement/SKILL.md +1 -1
- package/rails/copy-overwrite/Gemfile.lisa +8 -0
- package/rails/copy-overwrite/lefthook.yml +25 -11
- package/rails/copy-overwrite/scripts/lisa-rails-gates.mjs +686 -0
- package/rails/copy-overwrite/scripts/lisa-rspec-shards.mjs +2 -2
- package/rails/copy-overwrite/scripts/lisa_crystalball_recorder.rb +239 -0
- package/rails/copy-overwrite/scripts/lisa_rspec_partial_coverage.rb +83 -0
- package/scripts/build-unless-marked.mjs +83 -0
- package/scripts/check-plugins-sync.sh +22 -5
- package/scripts/classify-markdown-assertions.mjs +141 -0
- package/scripts/integration-shard-build.mjs +143 -0
- package/scripts/lib/history-scanner-suites.mjs +19 -0
- package/scripts/lib/markdown-assertions/classify.mjs +289 -0
- package/scripts/lib/markdown-assertions/context.mjs +53 -0
- package/scripts/lib/markdown-assertions/corpus.mjs +222 -0
- package/scripts/lib/markdown-assertions/manifest-cull.mjs +86 -0
- package/scripts/lib/markdown-assertions/record-setup.mjs +265 -0
- package/scripts/lib/markdown-assertions/record.mjs +115 -0
- package/scripts/lib/markdown-assertions/record.vitest.config.mjs +24 -0
- package/scripts/lib/markdown-assertions/sites.mjs +273 -0
- package/scripts/lib/markdown-assertions/test-cull.mjs +768 -0
- package/scripts/lib/markdown-assertions/tokens.mjs +158 -0
- package/scripts/lib/shell-guard-trace.mjs +6 -0
- package/scripts/lib/test-access-map-setup.mjs +40 -0
- package/scripts/lib/test-access-map-tracer.mjs +205 -0
- package/scripts/lib/test-access-map.d.mts +72 -0
- package/scripts/lib/test-access-map.mjs +395 -0
- package/scripts/lib/test-timings-reporter.d.mts +17 -0
- package/scripts/lib/test-timings-reporter.mjs +99 -0
- package/scripts/plan-integration-shards.mjs +300 -0
- package/scripts/test-timing-report.d.mts +41 -0
- package/scripts/test-timing-report.mjs +361 -0
- package/scripts/two-channel-couplings.json +132 -36
- package/scripts/verify-npm-advisories-4333.mjs +3 -12
- package/typescript/copy-overwrite/.prettierignore +13 -0
- package/typescript/create-only/vitest.config.local.ts +1 -7
- package/typescript/package-lisa/package.lisa.json +4 -4
- package/all/copy-overwrite/scripts/lisa-scratch-run.sh +0 -1078
- package/dist/cli/lisa-test-run-bootstrap.d.ts +0 -3
- package/dist/cli/lisa-test-run-bootstrap.d.ts.map +0 -1
- package/dist/cli/lisa-test-run-bootstrap.js +0 -229
- package/dist/cli/lisa-test-run-bootstrap.js.map +0 -1
- package/dist/cli/lisa-test-run-ipc.d.ts +0 -49
- package/dist/cli/lisa-test-run-ipc.d.ts.map +0 -1
- package/dist/cli/lisa-test-run-ipc.js +0 -226
- package/dist/cli/lisa-test-run-ipc.js.map +0 -1
- package/dist/cli/lisa-test-run-process-group.d.ts +0 -30
- package/dist/cli/lisa-test-run-process-group.d.ts.map +0 -1
- package/dist/cli/lisa-test-run-process-group.js +0 -140
- package/dist/cli/lisa-test-run-process-group.js.map +0 -1
- package/dist/cli/lisa-test-run-reaper.d.ts +0 -3
- package/dist/cli/lisa-test-run-reaper.d.ts.map +0 -1
- package/dist/cli/lisa-test-run-reaper.js +0 -195
- package/dist/cli/lisa-test-run-reaper.js.map +0 -1
- package/dist/cli/lisa-test-run-runtime.d.ts +0 -46
- package/dist/cli/lisa-test-run-runtime.d.ts.map +0 -1
- package/dist/cli/lisa-test-run-runtime.js +0 -123
- package/dist/cli/lisa-test-run-runtime.js.map +0 -1
- package/dist/cli/lisa-test-run-supervisor.d.ts +0 -13
- package/dist/cli/lisa-test-run-supervisor.d.ts.map +0 -1
- package/dist/cli/lisa-test-run-supervisor.js +0 -265
- package/dist/cli/lisa-test-run-supervisor.js.map +0 -1
- package/dist/configs/vitest/fleet-admission-global-setup.d.ts +0 -34
- package/dist/configs/vitest/fleet-admission-global-setup.d.ts.map +0 -1
- package/dist/configs/vitest/fleet-admission-global-setup.js +0 -123
- package/dist/configs/vitest/fleet-admission-global-setup.js.map +0 -1
- package/dist/configs/vitest/fleet-admission.d.ts +0 -129
- package/dist/configs/vitest/fleet-admission.d.ts.map +0 -1
- package/dist/configs/vitest/fleet-admission.js +0 -239
- package/dist/configs/vitest/fleet-admission.js.map +0 -1
- package/dist/configs/vitest/scratch-authority.d.ts +0 -25
- package/dist/configs/vitest/scratch-authority.d.ts.map +0 -1
- package/dist/configs/vitest/scratch-authority.js +0 -107
- package/dist/configs/vitest/scratch-authority.js.map +0 -1
- package/dist/configs/vitest/scratch-bound-cleanup-programs.d.ts +0 -5
- package/dist/configs/vitest/scratch-bound-cleanup-programs.d.ts.map +0 -1
- package/dist/configs/vitest/scratch-bound-cleanup-programs.js +0 -219
- package/dist/configs/vitest/scratch-bound-cleanup-programs.js.map +0 -1
- package/dist/configs/vitest/scratch-bound-cleanup.d.ts +0 -28
- package/dist/configs/vitest/scratch-bound-cleanup.d.ts.map +0 -1
- package/dist/configs/vitest/scratch-bound-cleanup.js +0 -155
- package/dist/configs/vitest/scratch-bound-cleanup.js.map +0 -1
- package/dist/configs/vitest/scratch-bound-root-cleanup.d.ts +0 -17
- package/dist/configs/vitest/scratch-bound-root-cleanup.d.ts.map +0 -1
- package/dist/configs/vitest/scratch-bound-root-cleanup.js +0 -149
- package/dist/configs/vitest/scratch-bound-root-cleanup.js.map +0 -1
- package/dist/configs/vitest/scratch-global-setup.d.ts +0 -258
- package/dist/configs/vitest/scratch-global-setup.d.ts.map +0 -1
- package/dist/configs/vitest/scratch-global-setup.js +0 -505
- package/dist/configs/vitest/scratch-global-setup.js.map +0 -1
- package/dist/configs/vitest/scratch-leak-setup.d.ts +0 -2
- package/dist/configs/vitest/scratch-leak-setup.d.ts.map +0 -1
- package/dist/configs/vitest/scratch-leak-setup.js +0 -108
- package/dist/configs/vitest/scratch-leak-setup.js.map +0 -1
- package/dist/configs/vitest/scratch-namespace-authority.d.ts +0 -80
- package/dist/configs/vitest/scratch-namespace-authority.d.ts.map +0 -1
- package/dist/configs/vitest/scratch-namespace-authority.js +0 -291
- package/dist/configs/vitest/scratch-namespace-authority.js.map +0 -1
- package/dist/configs/vitest/scratch-owner.d.ts +0 -131
- package/dist/configs/vitest/scratch-owner.d.ts.map +0 -1
- package/dist/configs/vitest/scratch-owner.js +0 -297
- package/dist/configs/vitest/scratch-owner.js.map +0 -1
- package/dist/configs/vitest/scratch-route-profile.d.ts +0 -46
- package/dist/configs/vitest/scratch-route-profile.d.ts.map +0 -1
- package/dist/configs/vitest/scratch-route-profile.js +0 -233
- package/dist/configs/vitest/scratch-route-profile.js.map +0 -1
- package/dist/configs/vitest/scratch-run-root-compatibility.d.ts +0 -33
- package/dist/configs/vitest/scratch-run-root-compatibility.d.ts.map +0 -1
- package/dist/configs/vitest/scratch-run-root-compatibility.js +0 -137
- package/dist/configs/vitest/scratch-run-root-compatibility.js.map +0 -1
- package/dist/configs/vitest/scratch-run-root-intent.d.ts +0 -66
- package/dist/configs/vitest/scratch-run-root-intent.d.ts.map +0 -1
- package/dist/configs/vitest/scratch-run-root-intent.js +0 -183
- package/dist/configs/vitest/scratch-run-root-intent.js.map +0 -1
- package/dist/configs/vitest/scratch-setup.d.ts +0 -46
- package/dist/configs/vitest/scratch-setup.d.ts.map +0 -1
- package/dist/configs/vitest/scratch-setup.js +0 -226
- package/dist/configs/vitest/scratch-setup.js.map +0 -1
- package/dist/configs/vitest/scratch-supervision-intent.d.ts +0 -8
- package/dist/configs/vitest/scratch-supervision-intent.d.ts.map +0 -1
- package/dist/configs/vitest/scratch-supervision-intent.js +0 -125
- package/dist/configs/vitest/scratch-supervision-intent.js.map +0 -1
- package/dist/configs/vitest/scratch-supervision-protocol.d.ts +0 -12
- package/dist/configs/vitest/scratch-supervision-protocol.d.ts.map +0 -1
- package/dist/configs/vitest/scratch-supervision-protocol.js +0 -230
- package/dist/configs/vitest/scratch-supervision-protocol.js.map +0 -1
- package/dist/configs/vitest/scratch-supervision.d.ts +0 -69
- package/dist/configs/vitest/scratch-supervision.d.ts.map +0 -1
- package/dist/configs/vitest/scratch-supervision.js +0 -244
- package/dist/configs/vitest/scratch-supervision.js.map +0 -1
- package/dist/configs/vitest/scratch-sweep.d.ts +0 -66
- package/dist/configs/vitest/scratch-sweep.d.ts.map +0 -1
- package/dist/configs/vitest/scratch-sweep.js +0 -82
- package/dist/configs/vitest/scratch-sweep.js.map +0 -1
- package/dist/configs/vitest/scratch-tmpdir-trust.d.ts +0 -48
- package/dist/configs/vitest/scratch-tmpdir-trust.d.ts.map +0 -1
- package/dist/configs/vitest/scratch-tmpdir-trust.js +0 -194
- package/dist/configs/vitest/scratch-tmpdir-trust.js.map +0 -1
- package/dist/configs/vitest/scratch.d.ts +0 -19
- package/dist/configs/vitest/scratch.d.ts.map +0 -1
- package/dist/configs/vitest/scratch.js +0 -34
- package/dist/configs/vitest/scratch.js.map +0 -1
- package/dist/configs/vitest/synthesis-scratch-reclaim.d.ts +0 -86
- package/dist/configs/vitest/synthesis-scratch-reclaim.d.ts.map +0 -1
- package/dist/configs/vitest/synthesis-scratch-reclaim.js +0 -226
- package/dist/configs/vitest/synthesis-scratch-reclaim.js.map +0 -1
|
@@ -36,10 +36,18 @@ const COMMON = [
|
|
|
36
36
|
"lib/windows-process-job.ps1",
|
|
37
37
|
"lib/windows-process-job.cs",
|
|
38
38
|
"lib/kill-marks.mjs",
|
|
39
|
+
"lib/push-timing.mjs",
|
|
39
40
|
"lib/gate-failure-diagnosis.mjs",
|
|
40
41
|
"lib/worktree-dependencies.mjs",
|
|
41
42
|
"lib/lisa-cleanup-sweep.mjs",
|
|
42
43
|
"lib/lisa-cleanup-sweep-processes.mjs",
|
|
44
|
+
"lib/build-marker.mjs",
|
|
45
|
+
"lib/gate-pass-cache.mjs",
|
|
46
|
+
"lib/affected-tests.mjs",
|
|
47
|
+
"lisa-rspec-select.mjs",
|
|
48
|
+
"lib/rspec-selection.mjs",
|
|
49
|
+
"lib/push-admission.mjs",
|
|
50
|
+
"lib/push-gate-defaults.mjs",
|
|
43
51
|
"lib/history-secret-git.mjs",
|
|
44
52
|
"lib/history-secret-scanner.mjs",
|
|
45
53
|
"lib/history-secret-evidence.mjs",
|
|
@@ -52,7 +60,6 @@ const COMMON = [
|
|
|
52
60
|
"lib/automation-provenance-files.mjs",
|
|
53
61
|
"lib/automation-provenance-local.mjs",
|
|
54
62
|
"lisa-clean-git-env.sh",
|
|
55
|
-
"lisa-scratch-run.sh",
|
|
56
63
|
"check-threshold-ratchet.mjs",
|
|
57
64
|
"threshold-ratchet-families.mjs",
|
|
58
65
|
"threshold-ratchet-compare.mjs",
|
|
@@ -126,6 +133,7 @@ const PRODUCER = [
|
|
|
126
133
|
"tracker-jira",
|
|
127
134
|
"tracker-linear",
|
|
128
135
|
"tracker-wire",
|
|
136
|
+
"tracker-cancel",
|
|
129
137
|
"worker-environment",
|
|
130
138
|
"worker-inspection",
|
|
131
139
|
"worker-lifecycle",
|
|
@@ -53,7 +53,7 @@ export function hostedHookContext(file) {
|
|
|
53
53
|
);
|
|
54
54
|
const observed = currentGraph(context.graph);
|
|
55
55
|
required(
|
|
56
|
-
Object.keys(observed).length <=
|
|
56
|
+
Object.keys(observed).length <= 256 &&
|
|
57
57
|
Object.entries(context.graph).every(
|
|
58
58
|
([path, hash]) => observed[path] === hash
|
|
59
59
|
),
|
|
@@ -17,7 +17,11 @@ export {
|
|
|
17
17
|
buildDraft,
|
|
18
18
|
} from "./npm-update-leaf-contract.mjs";
|
|
19
19
|
import { sha256 } from "./github-attestation-verifier.mjs";
|
|
20
|
-
import {
|
|
20
|
+
import {
|
|
21
|
+
trackerFor,
|
|
22
|
+
trustedHumanActorIds,
|
|
23
|
+
refuseUnreleasableHold,
|
|
24
|
+
} from "./npm-update-tracker.mjs";
|
|
21
25
|
|
|
22
26
|
/** Each transition rereads holds, ownership and the actual managed claim. */
|
|
23
27
|
export async function claimLeaf(
|
|
@@ -114,6 +118,7 @@ async function inspectLeafFields(issue, draft, policy, config) {
|
|
|
114
118
|
trustedHumanActorIds: trustedHumanActorIds(config),
|
|
115
119
|
humanNeededLabel: roles.human,
|
|
116
120
|
});
|
|
121
|
+
refuseUnreleasableHold(config, hold.held);
|
|
117
122
|
required(!hold.held, "current human hold is outstanding");
|
|
118
123
|
required(
|
|
119
124
|
issue.body === draft.body && issue.title === draft.title,
|
|
@@ -21,6 +21,42 @@ const MAINTAINER = {
|
|
|
21
21
|
linear: /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/,
|
|
22
22
|
};
|
|
23
23
|
const KEY = /^[A-Z][A-Z0-9]{1,9}$/;
|
|
24
|
+
const VENDORS = new Set(["jira", "linear"]);
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Who may cancel or supersede an update (#4873). A cancel is a manual GitHub
|
|
28
|
+
* workflow run, so it is authorized by a GitHub login with write or admin on the
|
|
29
|
+
* repository. GitHub hosts keep the maintainer's own login; a Jira/Linear
|
|
30
|
+
* maintainer is a tracker id, so those hosts name a GitHub `cancelOperator`.
|
|
31
|
+
* Absent, every cancel refuses with the key to set; nothing falls back to a
|
|
32
|
+
* wider group of repository writers.
|
|
33
|
+
* @param {object} config - Committed Lisa config.
|
|
34
|
+
* @param {object} policy - The validated npmUpdater entry.
|
|
35
|
+
* @returns {string} The GitHub login whose dispatch and permission authorize a cancel.
|
|
36
|
+
*/
|
|
37
|
+
export function cancelOperatorOf(config, policy) {
|
|
38
|
+
if (!VENDORS.has(config.tracker)) return policy.maintainer;
|
|
39
|
+
if (typeof policy.cancelOperator !== "string")
|
|
40
|
+
throw operatorRefusal(
|
|
41
|
+
"npm updater cancel operator is not declared",
|
|
42
|
+
`npmUpdater.cancelOperator is not set in .lisa.config.json, so nobody is authorized to cancel or replace a ${config.tracker === "jira" ? "Jira" : "Linear"}-tracked npm update. Set it to the GitHub login of the person who may run the cancel workflow (they need write or admin on the repository). Nothing was changed.`
|
|
43
|
+
);
|
|
44
|
+
return policy.cancelOperator;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/** Only a Jira/Linear entry may name a cancel operator, and only as a GitHub login. */
|
|
48
|
+
function validateCancelOperator(value, config) {
|
|
49
|
+
if (!Object.hasOwn(value, "cancelOperator")) return;
|
|
50
|
+
required(
|
|
51
|
+
VENDORS.has(config.tracker),
|
|
52
|
+
"npmUpdater.cancelOperator applies only to Jira and Linear trackers"
|
|
53
|
+
);
|
|
54
|
+
required(
|
|
55
|
+
typeof value.cancelOperator === "string" &&
|
|
56
|
+
MAINTAINER.github.test(value.cancelOperator),
|
|
57
|
+
"npmUpdater.cancelOperator must be a GitHub login"
|
|
58
|
+
);
|
|
59
|
+
}
|
|
24
60
|
|
|
25
61
|
/**
|
|
26
62
|
* GitHub keeps its exact original check. Jira and Linear hosts still publish to
|
|
@@ -95,7 +131,9 @@ export function validatePolicy(value, config) {
|
|
|
95
131
|
"packages",
|
|
96
132
|
"lisaOwner",
|
|
97
133
|
...(Object.hasOwn(value ?? {}, "runtime") ? ["runtime"] : []),
|
|
134
|
+
...(Object.hasOwn(value ?? {}, "cancelOperator") ? ["cancelOperator"] : []),
|
|
98
135
|
]);
|
|
136
|
+
validateCancelOperator(value, config);
|
|
99
137
|
railsRuntime(value);
|
|
100
138
|
required(
|
|
101
139
|
value.version === 1 &&
|
|
@@ -12,7 +12,9 @@ import {
|
|
|
12
12
|
sha256,
|
|
13
13
|
verifyDescriptorAttestation,
|
|
14
14
|
verifyCurrentProvider,
|
|
15
|
+
verifyCurrentRun,
|
|
15
16
|
} from "./github-attestation-verifier.mjs";
|
|
17
|
+
import { vendorBacklink } from "./npm-update-tracker.mjs";
|
|
16
18
|
import { canonicalJson } from "../lisa-automation-provenance.mjs";
|
|
17
19
|
import { readJson, readBytes } from "./npm-update-process.mjs";
|
|
18
20
|
import { existsSync } from "node:fs";
|
|
@@ -26,7 +28,8 @@ export function publicationProof(
|
|
|
26
28
|
proposal,
|
|
27
29
|
policy,
|
|
28
30
|
issue,
|
|
29
|
-
commit
|
|
31
|
+
commit,
|
|
32
|
+
claim
|
|
30
33
|
) {
|
|
31
34
|
required(
|
|
32
35
|
canonicalJson(readJson(proof.descriptor, 65_536)) ===
|
|
@@ -39,6 +42,9 @@ export function publicationProof(
|
|
|
39
42
|
proof.recoveryBundle && existsSync(proof.recoveryBundle)
|
|
40
43
|
);
|
|
41
44
|
required(recovery === bundle, "partial publication recovery authority");
|
|
45
|
+
// A Jira/Linear claim (and its time) is proved by the adapter in publish
|
|
46
|
+
// authorize and passed in; GitHub keeps its own comment read (#4873).
|
|
47
|
+
required(!api.tracker || claim, "tracker claim proof is absent");
|
|
42
48
|
if (recovery) {
|
|
43
49
|
verifyRecoveryOrigin(
|
|
44
50
|
api.policy,
|
|
@@ -53,11 +59,15 @@ export function publicationProof(
|
|
|
53
59
|
commit: commit.sha,
|
|
54
60
|
maintainer: policy.maintainer,
|
|
55
61
|
recoverySha256: sha256(readBytes(proof.recovery, 65_536)),
|
|
62
|
+
...(api.tracker ? { tracker: true, claim } : {}),
|
|
56
63
|
}
|
|
57
64
|
);
|
|
58
65
|
} else {
|
|
59
66
|
verifyDescriptorAttestation(api.policy, descriptor, proof, digest);
|
|
60
|
-
|
|
67
|
+
(api.tracker ? verifyCurrentRun : verifyCurrentProvider)(
|
|
68
|
+
api.policy,
|
|
69
|
+
descriptor
|
|
70
|
+
);
|
|
61
71
|
}
|
|
62
72
|
}
|
|
63
73
|
|
|
@@ -104,6 +114,10 @@ export async function publicationBacklink(
|
|
|
104
114
|
pr
|
|
105
115
|
) {
|
|
106
116
|
await authorize();
|
|
117
|
+
// Jira/Linear: the adapter writes the managed backlink and reads it back exactly;
|
|
118
|
+
// the broker's helpers reach only GitHub (#4873).
|
|
119
|
+
if (api.tracker)
|
|
120
|
+
return vendorBacklink(api.tracker, allocation.number, pr.html_url);
|
|
107
121
|
await api.workItem(
|
|
108
122
|
cwd,
|
|
109
123
|
["backlink", "--ref", allocation.workItem, "--pr-url", pr.html_url],
|
|
@@ -173,7 +187,11 @@ export async function destinationSnapshot(api, proposal, allocation, commit) {
|
|
|
173
187
|
|
|
174
188
|
/** The declaration is complete and the relationship waits for postmerge verification. */
|
|
175
189
|
export function publicationBody(allocation) {
|
|
176
|
-
|
|
190
|
+
// Only a GitHub issue has a github.com address; a Jira/Linear key is declared by its trailer alone.
|
|
191
|
+
const relates = allocation.workItem.includes("#")
|
|
192
|
+
? `\nRelates to https://github.com/${allocation.workItem.replace("#", "/issues/")}\n`
|
|
193
|
+
: "";
|
|
194
|
+
const body = `${allocation.draft.body}\nWork-Item: ${allocation.workItem}\n${relates}`;
|
|
177
195
|
const closing = [
|
|
178
196
|
...body.matchAll(/\b(?:close[sd]?|fix(?:e[sd])?|resolve[sd]?)\s+/gi),
|
|
179
197
|
];
|
|
@@ -16,6 +16,7 @@ import {
|
|
|
16
16
|
import { runProcess } from "./npm-update-process.mjs";
|
|
17
17
|
import { descriptorFor } from "./npm-update-gate.mjs";
|
|
18
18
|
import { assertGateTransport } from "./npm-update-gate-hooks.mjs";
|
|
19
|
+
import { trackerPublishAuthority } from "./npm-update-tracker.mjs";
|
|
19
20
|
import {
|
|
20
21
|
publicationBody,
|
|
21
22
|
publicationBacklink,
|
|
@@ -185,7 +186,18 @@ export async function publishProposal({
|
|
|
185
186
|
config
|
|
186
187
|
);
|
|
187
188
|
await destinationSnapshot(api, proposal, allocation, commit.sha);
|
|
188
|
-
|
|
189
|
+
// Jira/Linear: the claim, its sole owner and assignability come from the adapter (#4873).
|
|
190
|
+
const claim = await trackerPublishAuthority(api, descriptor, policy, issue);
|
|
191
|
+
publicationProof(
|
|
192
|
+
api,
|
|
193
|
+
descriptor,
|
|
194
|
+
proof,
|
|
195
|
+
proposal,
|
|
196
|
+
policy,
|
|
197
|
+
issue,
|
|
198
|
+
commit,
|
|
199
|
+
claim
|
|
200
|
+
);
|
|
189
201
|
return issue;
|
|
190
202
|
};
|
|
191
203
|
await authorize();
|
|
@@ -24,7 +24,6 @@ import { targetField } from "./automation-provenance-contract.mjs";
|
|
|
24
24
|
import { required, validateProposal } from "./npm-update-contract.mjs";
|
|
25
25
|
import {
|
|
26
26
|
trackerFor,
|
|
27
|
-
refuseUnlessGithub,
|
|
28
27
|
verifySignedWorkItem,
|
|
29
28
|
proveTrackerProvider,
|
|
30
29
|
} from "./npm-update-tracker.mjs";
|
|
@@ -128,7 +127,7 @@ export {
|
|
|
128
127
|
} from "./npm-update-checkpoint.mjs";
|
|
129
128
|
|
|
130
129
|
/** Renewal verifies fresh authority against every immutable original identity field. */
|
|
131
|
-
function verifyRenewal({
|
|
130
|
+
async function verifyRenewal({
|
|
132
131
|
api,
|
|
133
132
|
preview,
|
|
134
133
|
paths,
|
|
@@ -138,6 +137,22 @@ function verifyRenewal({
|
|
|
138
137
|
policy,
|
|
139
138
|
}) {
|
|
140
139
|
const recovery = readJson(paths.recovery, 65_536);
|
|
140
|
+
// Jira/Linear: the adapter proves claim, sole owner and assignability; the
|
|
141
|
+
// code host proves repository, runs and destination (#4873).
|
|
142
|
+
const vendor = api.tracker
|
|
143
|
+
? {
|
|
144
|
+
tracker: true,
|
|
145
|
+
claim: await api.tracker.proveClaim(preview.descriptor),
|
|
146
|
+
}
|
|
147
|
+
: {};
|
|
148
|
+
if (api.tracker) {
|
|
149
|
+
required(
|
|
150
|
+
issue.assignees.length === 1 &&
|
|
151
|
+
issue.assignees[0].login === policy.maintainer,
|
|
152
|
+
"current recovery leaf or owner differs"
|
|
153
|
+
);
|
|
154
|
+
await api.tracker.assignable(policy.maintainer);
|
|
155
|
+
}
|
|
141
156
|
verifyRecoveryOrigin(
|
|
142
157
|
api.policy,
|
|
143
158
|
preview.descriptor,
|
|
@@ -151,6 +166,7 @@ function verifyRenewal({
|
|
|
151
166
|
commit: predictedCommit(preview.descriptor, Buffer.from(preview.message)),
|
|
152
167
|
maintainer: policy.maintainer,
|
|
153
168
|
recoverySha256: sha256(readBytes(paths.recovery, 65_536)),
|
|
169
|
+
...vendor,
|
|
154
170
|
}
|
|
155
171
|
);
|
|
156
172
|
}
|
|
@@ -181,8 +197,17 @@ export async function finalizeAuthorization({
|
|
|
181
197
|
);
|
|
182
198
|
const mode = readJson(join(output, "authorization.json")).mode;
|
|
183
199
|
if (mode === "recovery") {
|
|
184
|
-
|
|
185
|
-
|
|
200
|
+
if (config.tracker !== "github")
|
|
201
|
+
verifySignedWorkItem(config, allocation, preview);
|
|
202
|
+
await verifyRenewal({
|
|
203
|
+
api,
|
|
204
|
+
preview,
|
|
205
|
+
paths,
|
|
206
|
+
digest,
|
|
207
|
+
proposal,
|
|
208
|
+
issue,
|
|
209
|
+
policy,
|
|
210
|
+
});
|
|
186
211
|
} else {
|
|
187
212
|
required(mode === "origin", "unknown authorization role");
|
|
188
213
|
verifyDescriptorAttestation(api.policy, preview.descriptor, paths, digest);
|
|
@@ -12,6 +12,12 @@ import {
|
|
|
12
12
|
import { join } from "node:path";
|
|
13
13
|
import { writeFileSync } from "node:fs";
|
|
14
14
|
import { writeJson, withPrivateRoot } from "./npm-update-process.mjs";
|
|
15
|
+
import { cancelOperatorOf } from "./npm-update-policy.mjs";
|
|
16
|
+
import {
|
|
17
|
+
managedActor,
|
|
18
|
+
trackerOf,
|
|
19
|
+
assertManagedClosure,
|
|
20
|
+
} from "./npm-update-tracker.mjs";
|
|
15
21
|
import { sha256 } from "./github-attestation-verifier.mjs";
|
|
16
22
|
import {
|
|
17
23
|
completeCheckpoints,
|
|
@@ -123,6 +129,7 @@ function cancellationCheckpoint(issue) {
|
|
|
123
129
|
|
|
124
130
|
/** Provider operator and official signature independently authenticate the complete historical subject. */
|
|
125
131
|
async function verifyRecordedBundle(api, authority, checkpoint, record, issue) {
|
|
132
|
+
const managed = await managedActor(api);
|
|
126
133
|
const run = await api.request(
|
|
127
134
|
`repos/${record.repository}/actions/runs/${record.runId}/attempts/${record.runAttempt}`
|
|
128
135
|
);
|
|
@@ -130,7 +137,14 @@ async function verifyRecordedBundle(api, authority, checkpoint, record, issue) {
|
|
|
130
137
|
`repos/${record.repository}/collaborators/${record.maintainer}/permission`
|
|
131
138
|
);
|
|
132
139
|
assertRecordedOperator(run, permission, authority, record);
|
|
133
|
-
assertOriginTransport(
|
|
140
|
+
assertOriginTransport(
|
|
141
|
+
issue.comments,
|
|
142
|
+
checkpoint.digest,
|
|
143
|
+
authority,
|
|
144
|
+
run,
|
|
145
|
+
Date.now(),
|
|
146
|
+
managed
|
|
147
|
+
);
|
|
134
148
|
await withPrivateRoot(async root => {
|
|
135
149
|
const paths = {
|
|
136
150
|
cancellation: join(root, "cancellation.json"),
|
|
@@ -186,7 +200,8 @@ export async function recordedCancellation({
|
|
|
186
200
|
"ghExecutable",
|
|
187
201
|
"ghSha256",
|
|
188
202
|
].every(key => authority[key] === api.policy[key]) &&
|
|
189
|
-
|
|
203
|
+
cancelOperatorOf(historical, committed) ===
|
|
204
|
+
cancelOperatorOf(config, proposalPolicy(config, proposal)),
|
|
190
205
|
"recorded cancellation authority differs"
|
|
191
206
|
);
|
|
192
207
|
const replacement = validateProposal(checkpoint.payload.proposal, committed);
|
|
@@ -218,10 +233,9 @@ export async function recordedCancellation({
|
|
|
218
233
|
await api.main(proposal.parent, proposal.target);
|
|
219
234
|
await cancellationDestinationAbsent(api, record.oldProposalKey);
|
|
220
235
|
if (issue.state === "closed")
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
String(issue.closed_by.id) === api.policy.claimActorId,
|
|
236
|
+
await assertManagedClosure(
|
|
237
|
+
api,
|
|
238
|
+
issue,
|
|
225
239
|
"closure is not the authenticated managed cancellation"
|
|
226
240
|
);
|
|
227
241
|
return checkpoint;
|
|
@@ -241,7 +255,7 @@ export async function discoverSupersession(
|
|
|
241
255
|
const issues = [],
|
|
242
256
|
records = new Map();
|
|
243
257
|
for (const item of found) {
|
|
244
|
-
const issue = await api.issue(item.number);
|
|
258
|
+
const issue = await trackerOf(api).issue(item.number);
|
|
245
259
|
required(
|
|
246
260
|
!issue.pull_request && typeof issue.body === "string",
|
|
247
261
|
"foreign supersession issue"
|
|
@@ -105,7 +105,7 @@ export function launcherContext(file) {
|
|
|
105
105
|
value.graph &&
|
|
106
106
|
typeof value.graph === "object" &&
|
|
107
107
|
!Array.isArray(value.graph) &&
|
|
108
|
-
Object.keys(value.graph).length <=
|
|
108
|
+
Object.keys(value.graph).length <= 256,
|
|
109
109
|
"unbounded trusted import graph"
|
|
110
110
|
);
|
|
111
111
|
controllerGraph(value.graph, value.routes);
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
// This file is managed by Lisa and IS replaced on each `lisa` run.
|
|
2
|
+
// Do not edit directly — durable changes belong upstream in Lisa.
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* @file npm-update-tracker-cancel.mjs
|
|
6
|
+
* @description Cancellation and supersession closure for Jira and Linear work items
|
|
7
|
+
* (CodySwannGT/lisa#4873). GitHub closes an issue as `not_planned` and proves the
|
|
8
|
+
* Bot closed it through `closed_by`; Jira moves the ticket to the configured
|
|
9
|
+
* canceled status and proves the author through the issue changelog, and Linear
|
|
10
|
+
* moves the issue to the canceled workflow state and proves the actor through the
|
|
11
|
+
* issue history. Either way, a closure the automation did not make never counts.
|
|
12
|
+
* @module npm-updater
|
|
13
|
+
*/
|
|
14
|
+
import { required, operatorRefusal } from "./npm-update-invariants.mjs";
|
|
15
|
+
|
|
16
|
+
const PAGES = 20;
|
|
17
|
+
const HISTORY =
|
|
18
|
+
"query LisaNpmIssueHistory($id: String!, $after: String) { issue(id: $id) { history(first: 100, after: $after) { nodes { createdAt actor { id } toState { id type } } pageInfo { hasNextPage endCursor } } } }";
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Where a cancelled or superseded item is moved, from the same workflow keys the
|
|
22
|
+
* lifecycle reads: Jira's `jira.workflow.canceled` (default "Won't Do"), and
|
|
23
|
+
* Linear's `linear.workflow.canceled` or, when unset, the team's one state of
|
|
24
|
+
* type `canceled` (null). Never a lifecycle role, so it cannot read as ready,
|
|
25
|
+
* claimed or done.
|
|
26
|
+
* @param {object} config - Committed Lisa config.
|
|
27
|
+
* @returns {string|null} The configured name, or null for Linear's type default.
|
|
28
|
+
*/
|
|
29
|
+
export function canceledName(config) {
|
|
30
|
+
const workflow =
|
|
31
|
+
config.tracker === "jira"
|
|
32
|
+
? config.jira?.workflow
|
|
33
|
+
: (config.linear?.workflow ?? config.linear?.labels?.build);
|
|
34
|
+
const configured = workflow?.canceled;
|
|
35
|
+
if (typeof configured === "string" && configured.trim())
|
|
36
|
+
return configured.trim();
|
|
37
|
+
return config.tracker === "jira" ? "Won't Do" : null;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/** Jira writes `+0000`; every timestamp the updater compares is normalized ISO-8601. */
|
|
41
|
+
export function isoTime(value) {
|
|
42
|
+
const parsed = Date.parse(
|
|
43
|
+
String(value ?? "").replace(/([+-]\d{2})(\d{2})$/, "$1:$2")
|
|
44
|
+
);
|
|
45
|
+
return Number.isFinite(parsed) ? new Date(parsed).toISOString() : undefined;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/** A closure by anyone but the automation identity is preserved, never adopted. */
|
|
49
|
+
function foreignClosure(ref) {
|
|
50
|
+
return operatorRefusal(
|
|
51
|
+
"closure is not the authenticated managed cancellation",
|
|
52
|
+
`${ref} was closed by someone other than the npm updater's automation account, so the updater will not treat it as its own cancellation. Reopen it, or handle this update by hand.`
|
|
53
|
+
);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
/** Jira: one workflow transition into the configured canceled status. */
|
|
57
|
+
export function jiraCancel(jira, number) {
|
|
58
|
+
return jira.moveTo(number, jira.canceled);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
/** Jira: the newest status change must be into the canceled status, by the automation account. */
|
|
62
|
+
export async function jiraAssertCancelled(jira, number) {
|
|
63
|
+
const changes = [];
|
|
64
|
+
for (let page = 0; page < PAGES; page++) {
|
|
65
|
+
const reply = await jira.call(
|
|
66
|
+
`/issue/${jira.ref(number)}/changelog?startAt=${page * 100}&maxResults=100`,
|
|
67
|
+
"issue"
|
|
68
|
+
);
|
|
69
|
+
required(Array.isArray(reply?.values), "provider page is not an array");
|
|
70
|
+
changes.push(...reply.values);
|
|
71
|
+
if (reply.isLast === true || !reply.values.length) break;
|
|
72
|
+
required(page < PAGES - 1, "provider pagination exceeded bound");
|
|
73
|
+
}
|
|
74
|
+
const moves = changes
|
|
75
|
+
.filter(entry => (entry.items ?? []).some(item => item.field === "status"))
|
|
76
|
+
.sort((left, right) =>
|
|
77
|
+
String(isoTime(left.created)).localeCompare(
|
|
78
|
+
String(isoTime(right.created))
|
|
79
|
+
)
|
|
80
|
+
);
|
|
81
|
+
const last = moves.at(-1);
|
|
82
|
+
const into = last?.items.filter(item => item.field === "status").at(-1);
|
|
83
|
+
required(
|
|
84
|
+
String(into?.toString ?? "").toLowerCase() === jira.canceled.toLowerCase(),
|
|
85
|
+
"cancellation closure readback differs"
|
|
86
|
+
);
|
|
87
|
+
if (last.author?.accountId !== (await jira.myself()))
|
|
88
|
+
throw foreignClosure(jira.ref(number));
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
/** Linear: the configured canceled state, else the team's one state of type `canceled`. */
|
|
92
|
+
export async function linearCanceledState(linear) {
|
|
93
|
+
const states = (await linear.team()).states.nodes;
|
|
94
|
+
const name = linear.canceled;
|
|
95
|
+
const matches = name
|
|
96
|
+
? states.filter(state => state.name.toLowerCase() === name.toLowerCase())
|
|
97
|
+
: states.filter(state => state.type === "canceled");
|
|
98
|
+
required(
|
|
99
|
+
matches.length === 1 && matches[0].type === "canceled",
|
|
100
|
+
"configured Linear canceled state differs"
|
|
101
|
+
);
|
|
102
|
+
return matches[0];
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
/** Linear: one state update into the canceled state. */
|
|
106
|
+
export async function linearCancel(linear, number) {
|
|
107
|
+
await linear.update(number, {
|
|
108
|
+
stateId: (await linearCanceledState(linear)).id,
|
|
109
|
+
});
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
/** Linear: the newest state change must be into the canceled state, by the automation user. */
|
|
113
|
+
export async function linearAssertCancelled(linear, number) {
|
|
114
|
+
const canceled = await linearCanceledState(linear);
|
|
115
|
+
const entries = [];
|
|
116
|
+
let after = null;
|
|
117
|
+
for (let page = 0; page < PAGES; page++) {
|
|
118
|
+
const connection = (
|
|
119
|
+
await linear.graphql(HISTORY, { id: linear.ref(number), after }, "issue")
|
|
120
|
+
).issue?.history;
|
|
121
|
+
required(Array.isArray(connection?.nodes), "provider page is not an array");
|
|
122
|
+
entries.push(...connection.nodes);
|
|
123
|
+
if (!connection.pageInfo?.hasNextPage) break;
|
|
124
|
+
required(page < PAGES - 1, "provider pagination exceeded bound");
|
|
125
|
+
after = connection.pageInfo.endCursor;
|
|
126
|
+
}
|
|
127
|
+
const last = entries
|
|
128
|
+
.filter(entry => entry.toState)
|
|
129
|
+
.sort((left, right) =>
|
|
130
|
+
String(left.createdAt).localeCompare(String(right.createdAt))
|
|
131
|
+
)
|
|
132
|
+
.at(-1);
|
|
133
|
+
required(
|
|
134
|
+
last?.toState?.id === canceled.id,
|
|
135
|
+
"cancellation closure readback differs"
|
|
136
|
+
);
|
|
137
|
+
if (last.actor?.id !== (await linear.viewer()))
|
|
138
|
+
throw foreignClosure(linear.ref(number));
|
|
139
|
+
}
|