@codyswann/lisa 7.1.4 → 8.0.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/all/copy-overwrite/scripts/check-npm-publish-landed.mjs +0 -2
- package/all/copy-overwrite/scripts/lib/push-timing.mjs +3 -6
- package/all/copy-overwrite/scripts/lisa-enforcement-fallback.sh +31 -32
- package/all/copy-overwrite/scripts/lisa-hooks/block-managed-file-edits.sh +201 -20
- package/all/copy-overwrite/scripts/npm-updater-helper-graph.json +3 -2
- package/dist/cli/admit-cmd.d.ts.map +1 -1
- package/dist/cli/admit-cmd.js +16 -10
- package/dist/cli/admit-cmd.js.map +1 -1
- package/dist/cli/apply.d.ts.map +1 -1
- package/dist/cli/apply.js +2 -2
- package/dist/cli/apply.js.map +1 -1
- package/dist/cli/check-cmd.d.ts.map +1 -1
- package/dist/cli/check-cmd.js +8 -4
- package/dist/cli/check-cmd.js.map +1 -1
- package/dist/cli/doctor-coderabbit.js +2 -2
- package/dist/cli/doctor-coderabbit.js.map +1 -1
- package/dist/cli/doctor-readiness-supply-chain-python.d.ts +5 -1
- package/dist/cli/doctor-readiness-supply-chain-python.d.ts.map +1 -1
- package/dist/cli/doctor-readiness-supply-chain-python.js +44 -10
- package/dist/cli/doctor-readiness-supply-chain-python.js.map +1 -1
- package/dist/cli/doctor-readiness.js +2 -2
- package/dist/cli/doctor-readiness.js.map +1 -1
- package/dist/cli/doctor-worker-journey.js +2 -2
- package/dist/cli/doctor-worker-journey.js.map +1 -1
- package/dist/cli/doctor.d.ts.map +1 -1
- package/dist/cli/doctor.js +7 -4
- package/dist/cli/doctor.js.map +1 -1
- package/dist/cli/file-upstream-cmd.d.ts.map +1 -1
- package/dist/cli/file-upstream-cmd.js +20 -25
- package/dist/cli/file-upstream-cmd.js.map +1 -1
- package/dist/cli/gh-cli.d.ts +2 -2
- package/dist/cli/gh-cli.d.ts.map +1 -1
- package/dist/cli/gh-cli.js +13 -6
- package/dist/cli/gh-cli.js.map +1 -1
- package/dist/cli/health-cmd.d.ts.map +1 -1
- package/dist/cli/health-cmd.js +7 -19
- package/dist/cli/health-cmd.js.map +1 -1
- package/dist/cli/lisa-test-run-jest-merge.js +5 -5
- package/dist/cli/lisa-test-run-jest-merge.js.map +1 -1
- package/dist/cli/lisa-test-run.js +8 -4
- package/dist/cli/lisa-test-run.js.map +1 -1
- package/dist/cli/pr-landing.js +2 -2
- package/dist/cli/pr-landing.js.map +1 -1
- package/dist/cli/update-check.d.ts.map +1 -1
- package/dist/cli/update-check.js +7 -4
- package/dist/cli/update-check.js.map +1 -1
- package/dist/cli/update-cmd.d.ts.map +1 -1
- package/dist/cli/update-cmd.js +7 -4
- package/dist/cli/update-cmd.js.map +1 -1
- package/dist/cli/worktree-ownership.d.ts.map +1 -1
- package/dist/cli/worktree-ownership.js +3 -3
- package/dist/cli/worktree-ownership.js.map +1 -1
- package/dist/codex/hooks-catalog.d.ts +151 -0
- package/dist/codex/hooks-catalog.d.ts.map +1 -0
- package/dist/codex/hooks-catalog.js +315 -0
- package/dist/codex/hooks-catalog.js.map +1 -0
- package/dist/codex/hooks-compatibility.d.ts +14 -0
- package/dist/codex/hooks-compatibility.d.ts.map +1 -0
- package/dist/codex/hooks-compatibility.js +196 -0
- package/dist/codex/hooks-compatibility.js.map +1 -0
- package/dist/codex/hooks-installer.d.ts +2 -49
- package/dist/codex/hooks-installer.d.ts.map +1 -1
- package/dist/codex/hooks-installer.js +5 -546
- package/dist/codex/hooks-installer.js.map +1 -1
- package/dist/codex/hooks-source-links.d.ts +11 -0
- package/dist/codex/hooks-source-links.d.ts.map +1 -0
- package/dist/codex/hooks-source-links.js +74 -0
- package/dist/codex/hooks-source-links.js.map +1 -0
- package/dist/codex/scripts/block-migration-edits.sh +2 -2
- package/dist/codex/scripts/block-suppress-directives.sh +3 -3
- package/dist/codex/scripts/format-on-edit.sh +2 -2
- package/dist/codex/scripts/lint-on-edit.sh +2 -2
- package/dist/codex/scripts/lisa-edit-gate.sh +19 -15
- package/dist/codex/scripts/rubocop-on-edit.sh +2 -2
- package/dist/codex/scripts/sg-scan-on-edit.sh +2 -2
- package/dist/configs/coverage-scope.d.ts +0 -23
- package/dist/configs/coverage-scope.d.ts.map +1 -1
- package/dist/configs/coverage-scope.js +2 -3
- package/dist/configs/coverage-scope.js.map +1 -1
- package/dist/configs/eslint/base.d.ts +2 -113
- package/dist/configs/eslint/base.d.ts.map +1 -1
- package/dist/configs/eslint/base.js +2 -165
- package/dist/configs/eslint/base.js.map +1 -1
- package/dist/configs/eslint/cdk.d.ts.map +1 -1
- package/dist/configs/eslint/cdk.js +82 -66
- package/dist/configs/eslint/cdk.js.map +1 -1
- package/dist/configs/eslint/expo-overrides.d.ts +103 -0
- package/dist/configs/eslint/expo-overrides.d.ts.map +1 -0
- package/dist/configs/eslint/expo-overrides.js +187 -0
- package/dist/configs/eslint/expo-overrides.js.map +1 -0
- package/dist/configs/eslint/expo.d.ts +2 -7
- package/dist/configs/eslint/expo.d.ts.map +1 -1
- package/dist/configs/eslint/expo.js +186 -258
- package/dist/configs/eslint/expo.js.map +1 -1
- package/dist/configs/eslint/nestjs.d.ts.map +1 -1
- package/dist/configs/eslint/nestjs.js +86 -70
- package/dist/configs/eslint/nestjs.js.map +1 -1
- package/dist/configs/eslint/process-environment-bans.d.ts +41 -0
- package/dist/configs/eslint/process-environment-bans.d.ts.map +1 -0
- package/dist/configs/eslint/process-environment-bans.js +50 -0
- package/dist/configs/eslint/process-environment-bans.js.map +1 -0
- package/dist/configs/eslint/shared-rules.d.ts +130 -0
- package/dist/configs/eslint/shared-rules.d.ts.map +1 -0
- package/dist/configs/eslint/shared-rules.js +233 -0
- package/dist/configs/eslint/shared-rules.js.map +1 -0
- package/dist/configs/eslint/typescript.d.ts.map +1 -1
- package/dist/configs/eslint/typescript.js +2 -4
- package/dist/configs/eslint/typescript.js.map +1 -1
- package/dist/configs/vitest/base.d.ts +2 -2
- package/dist/configs/vitest/base.d.ts.map +1 -1
- package/dist/configs/vitest/base.js +5 -5
- package/dist/configs/vitest/base.js.map +1 -1
- package/dist/configs/vitest/coverage-reports-directory.d.ts.map +1 -1
- package/dist/configs/vitest/coverage-reports-directory.js +3 -2
- package/dist/configs/vitest/coverage-reports-directory.js.map +1 -1
- package/dist/configs/vitest/refusal-announcement.js +2 -2
- package/dist/configs/vitest/refusal-announcement.js.map +1 -1
- package/dist/core/admission-lock.js +2 -3
- package/dist/core/admission-lock.js.map +1 -1
- package/dist/core/admission-state.d.ts.map +1 -1
- package/dist/core/admission-state.js +11 -5
- package/dist/core/admission-state.js.map +1 -1
- package/dist/core/admission.d.ts.map +1 -1
- package/dist/core/admission.js +2 -2
- package/dist/core/admission.js.map +1 -1
- package/dist/core/bootstrap-environment.d.ts.map +1 -1
- package/dist/core/bootstrap-environment.js +8 -5
- package/dist/core/bootstrap-environment.js.map +1 -1
- package/dist/core/downstream-names.d.ts.map +1 -1
- package/dist/core/downstream-names.js +48 -47
- package/dist/core/downstream-names.js.map +1 -1
- package/dist/core/effectiveness-store.d.ts.map +1 -1
- package/dist/core/effectiveness-store.js +3 -5
- package/dist/core/effectiveness-store.js.map +1 -1
- package/dist/core/gate-declaration-drift.d.ts.map +1 -1
- package/dist/core/gate-declaration-drift.js +46 -27
- package/dist/core/gate-declaration-drift.js.map +1 -1
- package/dist/core/kane-cli-process.d.ts.map +1 -1
- package/dist/core/kane-cli-process.js +46 -33
- package/dist/core/kane-cli-process.js.map +1 -1
- package/dist/core/kane-cli.d.ts.map +1 -1
- package/dist/core/kane-cli.js +3 -4
- package/dist/core/kane-cli.js.map +1 -1
- package/dist/core/lisa-agent-emit-extra.d.ts +75 -0
- package/dist/core/lisa-agent-emit-extra.d.ts.map +1 -0
- package/dist/core/lisa-agent-emit-extra.js +231 -0
- package/dist/core/lisa-agent-emit-extra.js.map +1 -0
- package/dist/core/lisa-agent-emit.d.ts +79 -0
- package/dist/core/lisa-agent-emit.d.ts.map +1 -0
- package/dist/core/lisa-agent-emit.js +224 -0
- package/dist/core/lisa-agent-emit.js.map +1 -0
- package/dist/core/lisa-deletions.d.ts +116 -0
- package/dist/core/lisa-deletions.d.ts.map +1 -0
- package/dist/core/lisa-deletions.js +316 -0
- package/dist/core/lisa-deletions.js.map +1 -0
- package/dist/core/lisa-file-results.d.ts +58 -0
- package/dist/core/lisa-file-results.d.ts.map +1 -0
- package/dist/core/lisa-file-results.js +173 -0
- package/dist/core/lisa-file-results.js.map +1 -0
- package/dist/core/lisa-maintenance.d.ts +139 -0
- package/dist/core/lisa-maintenance.d.ts.map +1 -0
- package/dist/core/lisa-maintenance.js +324 -0
- package/dist/core/lisa-maintenance.js.map +1 -0
- package/dist/core/lisa-owned-hash-ledger.d.ts +7 -5
- package/dist/core/lisa-owned-hash-ledger.d.ts.map +1 -1
- package/dist/core/lisa-owned-hash-ledger.js +44 -6036
- package/dist/core/lisa-owned-hash-ledger.js.map +1 -1
- package/dist/core/lisa-owned-hash-ledger.json +6021 -0
- package/dist/core/lisa-plugin-sync.d.ts +96 -0
- package/dist/core/lisa-plugin-sync.d.ts.map +1 -0
- package/dist/core/lisa-plugin-sync.js +216 -0
- package/dist/core/lisa-plugin-sync.js.map +1 -0
- package/dist/core/lisa-plugins.d.ts +42 -0
- package/dist/core/lisa-plugins.d.ts.map +1 -0
- package/dist/core/lisa-plugins.js +155 -0
- package/dist/core/lisa-plugins.js.map +1 -0
- package/dist/core/lisa-state.d.ts +202 -0
- package/dist/core/lisa-state.d.ts.map +1 -0
- package/dist/core/lisa-state.js +205 -0
- package/dist/core/lisa-state.js.map +1 -0
- package/dist/core/lisa-summary-stats.d.ts +74 -0
- package/dist/core/lisa-summary-stats.d.ts.map +1 -0
- package/dist/core/lisa-summary-stats.js +189 -0
- package/dist/core/lisa-summary-stats.js.map +1 -0
- package/dist/core/lisa-summary.d.ts +34 -0
- package/dist/core/lisa-summary.d.ts.map +1 -0
- package/dist/core/lisa-summary.js +144 -0
- package/dist/core/lisa-summary.js.map +1 -0
- package/dist/core/lisa-templates.d.ts +98 -0
- package/dist/core/lisa-templates.d.ts.map +1 -0
- package/dist/core/lisa-templates.js +251 -0
- package/dist/core/lisa-templates.js.map +1 -0
- package/dist/core/lisa.d.ts +14 -903
- package/dist/core/lisa.d.ts.map +1 -1
- package/dist/core/lisa.js +30 -2275
- package/dist/core/lisa.js.map +1 -1
- package/dist/core/nightly-e2e-guard-behavior-certificate.js +2 -2
- package/dist/core/plugin-command.d.ts.map +1 -1
- package/dist/core/plugin-command.js +117 -61
- package/dist/core/plugin-command.js.map +1 -1
- package/dist/core/template-ownership.d.ts.map +1 -1
- package/dist/core/template-ownership.js +0 -1
- package/dist/core/template-ownership.js.map +1 -1
- package/dist/core/upstream-attribution-body.d.ts +4 -11
- package/dist/core/upstream-attribution-body.d.ts.map +1 -1
- package/dist/core/upstream-attribution-body.js +61 -373
- package/dist/core/upstream-attribution-body.js.map +1 -1
- package/dist/core/upstream-attribution-fields.d.ts +40 -0
- package/dist/core/upstream-attribution-fields.d.ts.map +1 -0
- package/dist/core/upstream-attribution-fields.js +167 -0
- package/dist/core/upstream-attribution-fields.js.map +1 -0
- package/dist/core/upstream-attribution-files.d.ts +15 -0
- package/dist/core/upstream-attribution-files.d.ts.map +1 -0
- package/dist/core/upstream-attribution-files.js +156 -0
- package/dist/core/upstream-attribution-files.js.map +1 -0
- package/dist/core/upstream-attribution-guards.d.ts +80 -0
- package/dist/core/upstream-attribution-guards.d.ts.map +1 -0
- package/dist/core/upstream-attribution-guards.js +284 -0
- package/dist/core/upstream-attribution-guards.js.map +1 -0
- package/dist/core/upstream-evidence-manifest.d.ts +1 -1
- package/dist/core/upstream-evidence-manifest.d.ts.map +1 -1
- package/dist/core/upstream-evidence-manifest.js +67 -30420
- package/dist/core/upstream-evidence-manifest.js.map +1 -1
- package/dist/core/upstream-evidence-manifest.json +30518 -0
- package/dist/health/agentic-contract.d.ts +94 -0
- package/dist/health/agentic-contract.d.ts.map +1 -0
- package/dist/health/agentic-contract.js +2 -0
- package/dist/health/agentic-contract.js.map +1 -0
- package/dist/health/agentic-evidence.d.ts +16 -0
- package/dist/health/agentic-evidence.d.ts.map +1 -0
- package/dist/health/agentic-evidence.js +213 -0
- package/dist/health/agentic-evidence.js.map +1 -0
- package/dist/health/agentic.d.ts +11 -74
- package/dist/health/agentic.d.ts.map +1 -1
- package/dist/health/agentic.js +42 -216
- package/dist/health/agentic.js.map +1 -1
- package/dist/health/deadline.d.ts +4 -1
- package/dist/health/deadline.d.ts.map +1 -1
- package/dist/health/deadline.js +4 -3
- package/dist/health/deadline.js.map +1 -1
- package/dist/health/deterministic-inputs.d.ts.map +1 -1
- package/dist/health/deterministic-inputs.js +3 -11
- package/dist/health/deterministic-inputs.js.map +1 -1
- package/dist/health/deterministic-probes.d.ts +52 -0
- package/dist/health/deterministic-probes.d.ts.map +1 -0
- package/dist/health/deterministic-probes.js +142 -0
- package/dist/health/deterministic-probes.js.map +1 -0
- package/dist/health/deterministic.d.ts +2 -25
- package/dist/health/deterministic.d.ts.map +1 -1
- package/dist/health/deterministic.js +14 -106
- package/dist/health/deterministic.js.map +1 -1
- package/dist/health/finding-utils.d.ts +4 -3
- package/dist/health/finding-utils.d.ts.map +1 -1
- package/dist/health/finding-utils.js +4 -4
- package/dist/health/finding-utils.js.map +1 -1
- package/dist/health/governance-probes.d.ts +29 -24
- package/dist/health/governance-probes.d.ts.map +1 -1
- package/dist/health/governance-probes.js +29 -25
- package/dist/health/governance-probes.js.map +1 -1
- package/dist/health/hook-inspection.d.ts +4 -3
- package/dist/health/hook-inspection.d.ts.map +1 -1
- package/dist/health/hook-inspection.js +17 -11
- package/dist/health/hook-inspection.js.map +1 -1
- package/dist/health/plugin-inspection.d.ts +6 -4
- package/dist/health/plugin-inspection.d.ts.map +1 -1
- package/dist/health/plugin-inspection.js +10 -9
- package/dist/health/plugin-inspection.js.map +1 -1
- package/dist/health/prepare.js +24 -8
- package/dist/health/prepare.js.map +1 -1
- package/dist/health/project-probes.d.ts +14 -7
- package/dist/health/project-probes.d.ts.map +1 -1
- package/dist/health/project-probes.js +14 -9
- package/dist/health/project-probes.js.map +1 -1
- package/dist/health/ruleset-compare.d.ts +30 -0
- package/dist/health/ruleset-compare.d.ts.map +1 -0
- package/dist/health/ruleset-compare.js +143 -0
- package/dist/health/ruleset-compare.js.map +1 -0
- package/dist/health/ruleset-config-checks.d.ts +66 -0
- package/dist/health/ruleset-config-checks.d.ts.map +1 -0
- package/dist/health/ruleset-config-checks.js +190 -0
- package/dist/health/ruleset-config-checks.js.map +1 -0
- package/dist/health/ruleset-expected.d.ts +39 -0
- package/dist/health/ruleset-expected.d.ts.map +1 -0
- package/dist/health/ruleset-expected.js +181 -0
- package/dist/health/ruleset-expected.js.map +1 -0
- package/dist/health/ruleset-gh.d.ts +85 -0
- package/dist/health/ruleset-gh.d.ts.map +1 -0
- package/dist/health/ruleset-gh.js +177 -0
- package/dist/health/ruleset-gh.js.map +1 -0
- package/dist/health/ruleset-inspection.d.ts +13 -117
- package/dist/health/ruleset-inspection.d.ts.map +1 -1
- package/dist/health/ruleset-inspection.js +8 -738
- package/dist/health/ruleset-inspection.js.map +1 -1
- package/dist/health/ruleset-normalize.d.ts +32 -0
- package/dist/health/ruleset-normalize.d.ts.map +1 -0
- package/dist/health/ruleset-normalize.js +160 -0
- package/dist/health/ruleset-normalize.js.map +1 -0
- package/dist/health/template-compose.d.ts +9 -0
- package/dist/health/template-compose.d.ts.map +1 -0
- package/dist/health/template-compose.js +105 -0
- package/dist/health/template-compose.js.map +1 -0
- package/dist/health/template-inspection.d.ts +5 -52
- package/dist/health/template-inspection.d.ts.map +1 -1
- package/dist/health/template-inspection.js +13 -435
- package/dist/health/template-inspection.js.map +1 -1
- package/dist/health/template-plan.d.ts +33 -0
- package/dist/health/template-plan.d.ts.map +1 -0
- package/dist/health/template-plan.js +154 -0
- package/dist/health/template-plan.js.map +1 -0
- package/dist/health/template-shape.d.ts +19 -0
- package/dist/health/template-shape.d.ts.map +1 -0
- package/dist/health/template-shape.js +122 -0
- package/dist/health/template-shape.js.map +1 -0
- package/dist/health/workflow-excerpt.d.ts +15 -0
- package/dist/health/workflow-excerpt.d.ts.map +1 -0
- package/dist/health/workflow-excerpt.js +88 -0
- package/dist/health/workflow-excerpt.js.map +1 -0
- package/dist/health/workflow-inputs-inspection.d.ts +16 -0
- package/dist/health/workflow-inputs-inspection.d.ts.map +1 -0
- package/dist/health/workflow-inputs-inspection.js +116 -0
- package/dist/health/workflow-inputs-inspection.js.map +1 -0
- package/dist/opencode/plugin-templates/block-managed-file-edits.sh +201 -20
- package/dist/standards/capture.d.ts.map +1 -1
- package/dist/standards/capture.js +73 -25
- package/dist/standards/capture.js.map +1 -1
- package/dist/standards/contract.d.ts.map +1 -1
- package/dist/standards/contract.js +26 -9
- package/dist/standards/contract.js.map +1 -1
- package/dist/standards/git-state.d.ts.map +1 -1
- package/dist/standards/git-state.js +2 -2
- package/dist/standards/git-state.js.map +1 -1
- package/dist/standards/registry-checks.d.ts +34 -0
- package/dist/standards/registry-checks.d.ts.map +1 -0
- package/dist/standards/registry-checks.js +137 -0
- package/dist/standards/registry-checks.js.map +1 -0
- package/dist/standards/registry.d.ts +3 -13
- package/dist/standards/registry.d.ts.map +1 -1
- package/dist/standards/registry.js +105 -194
- package/dist/standards/registry.js.map +1 -1
- package/dist/standards/storage.js +8 -10
- package/dist/standards/storage.js.map +1 -1
- package/dist/strategies/deduplicate-arrays.d.ts +18 -0
- package/dist/strategies/deduplicate-arrays.d.ts.map +1 -0
- package/dist/strategies/deduplicate-arrays.js +25 -0
- package/dist/strategies/deduplicate-arrays.js.map +1 -0
- package/dist/strategies/package-lisa-detect.d.ts +10 -0
- package/dist/strategies/package-lisa-detect.d.ts.map +1 -0
- package/dist/strategies/package-lisa-detect.js +178 -0
- package/dist/strategies/package-lisa-detect.js.map +1 -0
- package/dist/strategies/package-lisa-direct-floors.d.ts +16 -0
- package/dist/strategies/package-lisa-direct-floors.d.ts.map +1 -0
- package/dist/strategies/package-lisa-direct-floors.js +37 -0
- package/dist/strategies/package-lisa-direct-floors.js.map +1 -0
- package/dist/strategies/package-lisa-host-pins.d.ts +43 -0
- package/dist/strategies/package-lisa-host-pins.d.ts.map +1 -0
- package/dist/strategies/package-lisa-host-pins.js +254 -0
- package/dist/strategies/package-lisa-host-pins.js.map +1 -0
- package/dist/strategies/package-lisa-manifest-guards.d.ts +59 -0
- package/dist/strategies/package-lisa-manifest-guards.d.ts.map +1 -0
- package/dist/strategies/package-lisa-manifest-guards.js +234 -0
- package/dist/strategies/package-lisa-manifest-guards.js.map +1 -0
- package/dist/strategies/package-lisa-pin-alignment.d.ts +34 -0
- package/dist/strategies/package-lisa-pin-alignment.d.ts.map +1 -0
- package/dist/strategies/package-lisa-pin-alignment.js +106 -0
- package/dist/strategies/package-lisa-pin-alignment.js.map +1 -0
- package/dist/strategies/package-lisa-script-notes.d.ts +19 -0
- package/dist/strategies/package-lisa-script-notes.d.ts.map +1 -0
- package/dist/strategies/package-lisa-script-notes.js +145 -0
- package/dist/strategies/package-lisa-script-notes.js.map +1 -0
- package/dist/strategies/package-lisa-template-apply.d.ts +53 -0
- package/dist/strategies/package-lisa-template-apply.d.ts.map +1 -0
- package/dist/strategies/package-lisa-template-apply.js +216 -0
- package/dist/strategies/package-lisa-template-apply.js.map +1 -0
- package/dist/strategies/package-lisa-template-merge.d.ts +42 -0
- package/dist/strategies/package-lisa-template-merge.d.ts.map +1 -0
- package/dist/strategies/package-lisa-template-merge.js +202 -0
- package/dist/strategies/package-lisa-template-merge.js.map +1 -0
- package/dist/strategies/package-lisa-types.d.ts +5 -0
- package/dist/strategies/package-lisa-types.d.ts.map +1 -1
- package/dist/strategies/package-lisa.d.ts +1 -195
- package/dist/strategies/package-lisa.d.ts.map +1 -1
- package/dist/strategies/package-lisa.js +27 -1333
- package/dist/strategies/package-lisa.js.map +1 -1
- package/dist/strategies/tagged-merge-sections.d.ts +68 -0
- package/dist/strategies/tagged-merge-sections.d.ts.map +1 -0
- package/dist/strategies/tagged-merge-sections.js +113 -0
- package/dist/strategies/tagged-merge-sections.js.map +1 -0
- package/dist/strategies/tagged-merge.d.ts +1 -90
- package/dist/strategies/tagged-merge.d.ts.map +1 -1
- package/dist/strategies/tagged-merge.js +19 -190
- package/dist/strategies/tagged-merge.js.map +1 -1
- package/dist/utils/bounded-stream.d.ts +30 -0
- package/dist/utils/bounded-stream.d.ts.map +1 -0
- package/dist/utils/bounded-stream.js +63 -0
- package/dist/utils/bounded-stream.js.map +1 -0
- package/dist/utils/fibonacci.d.ts +3 -3
- package/dist/utils/fibonacci.d.ts.map +1 -1
- package/dist/utils/fibonacci.js +48 -10
- package/dist/utils/fibonacci.js.map +1 -1
- package/dist/utils/memo.d.ts +25 -0
- package/dist/utils/memo.d.ts.map +1 -0
- package/dist/utils/memo.js +32 -0
- package/dist/utils/memo.js.map +1 -0
- package/dist/utils/postinstall-trampoline.d.ts.map +1 -1
- package/dist/utils/postinstall-trampoline.js +3 -20
- package/dist/utils/postinstall-trampoline.js.map +1 -1
- package/dist/utils/process-environment.d.ts +42 -0
- package/dist/utils/process-environment.d.ts.map +1 -0
- package/dist/utils/process-environment.js +52 -0
- package/dist/utils/process-environment.js.map +1 -0
- package/dist/utils/resolve-executable.d.ts +89 -0
- package/dist/utils/resolve-executable.d.ts.map +1 -0
- package/dist/utils/resolve-executable.js +224 -0
- package/dist/utils/resolve-executable.js.map +1 -0
- package/dist/utils/shell-command-line.d.ts +9 -0
- package/dist/utils/shell-command-line.d.ts.map +1 -0
- package/dist/utils/shell-command-line.js +43 -0
- package/dist/utils/shell-command-line.js.map +1 -0
- package/dist/utils/usage-accounting-totals.d.ts +19 -0
- package/dist/utils/usage-accounting-totals.d.ts.map +1 -0
- package/dist/utils/usage-accounting-totals.js +145 -0
- package/dist/utils/usage-accounting-totals.js.map +1 -0
- package/dist/utils/usage-accounting.d.ts +2 -14
- package/dist/utils/usage-accounting.d.ts.map +1 -1
- package/dist/utils/usage-accounting.js +2 -169
- package/dist/utils/usage-accounting.js.map +1 -1
- package/eslint-plugin-code-organization/__tests__/enforce-statement-order-react-violations.test.js +213 -0
- package/eslint-plugin-code-organization/__tests__/enforce-statement-order-valid.test.js +251 -0
- package/eslint-plugin-code-organization/__tests__/enforce-statement-order-violations.test.js +222 -0
- package/eslint-plugin-code-organization/__tests__/statement-order-tester.js +42 -0
- package/eslint-plugin-code-organization/rules/enforce-statement-order.js +6 -8
- package/expo/copy-overwrite/jest.setup.ts +11 -10
- package/expo/create-only/scripts/zap-baseline.sh +6 -18
- package/harper-fabric/create-only/scripts/zap-baseline.sh +7 -9
- package/nestjs/create-only/scripts/zap-baseline.sh +6 -7
- package/package.json +4 -4
- package/phaser/copy-overwrite/.husky/pre-push.verify +2 -0
- 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-setup-remote-env/assets/session-start.sh +18 -5
- package/plugins/lisa/hooks/block-managed-file-edits.sh +201 -20
- package/plugins/lisa/hooks/block-masked-exit-status.sh +1 -1
- package/plugins/lisa/hooks/block-no-verify.agy.sh +1 -1
- package/plugins/lisa/hooks/enforce-verification-gate.sh +1 -2
- package/plugins/lisa/hooks/ticket-sync-reminder.sh +2 -17
- package/plugins/lisa/hooks/track-plan-sessions.sh +7 -131
- package/plugins/lisa/scripts/remote-agent-aws-setup.sh +3 -1
- package/plugins/lisa/skills/lisa-setup-remote-env/assets/session-start.sh +18 -5
- package/plugins/lisa-agy/hooks/block-managed-file-edits.sh +201 -20
- package/plugins/lisa-agy/hooks/block-no-verify.agy.sh +1 -1
- package/plugins/lisa-agy/plugin.json +1 -1
- package/plugins/lisa-agy/scripts/remote-agent-aws-setup.sh +3 -1
- package/plugins/lisa-agy/skills/lisa-setup-remote-env/assets/session-start.sh +18 -5
- 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/hooks/block-managed-file-edits.sh +201 -20
- package/plugins/lisa-copilot/hooks/block-masked-exit-status.sh +1 -1
- package/plugins/lisa-copilot/hooks/enforce-verification-gate.sh +1 -2
- package/plugins/lisa-copilot/scripts/remote-agent-aws-setup.sh +3 -1
- package/plugins/lisa-copilot/skills/lisa-setup-remote-env/assets/session-start.sh +18 -5
- package/plugins/lisa-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-cursor/hooks/block-managed-file-edits.sh +201 -20
- package/plugins/lisa-cursor/hooks/block-masked-exit-status.sh +1 -1
- package/plugins/lisa-cursor/hooks/enforce-verification-gate.sh +1 -2
- package/plugins/lisa-cursor/scripts/remote-agent-aws-setup.sh +3 -1
- package/plugins/lisa-cursor/skills/lisa-setup-remote-env/assets/session-start.sh +18 -5
- package/plugins/lisa-devin/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-devin/.devin-plugin/plugin.json +1 -1
- package/plugins/lisa-devin/hooks/block-managed-file-edits.sh +201 -20
- package/plugins/lisa-devin/hooks/block-masked-exit-status.sh +1 -1
- package/plugins/lisa-devin/hooks/enforce-verification-gate.sh +1 -2
- package/plugins/lisa-devin/scripts/remote-agent-aws-setup.sh +3 -1
- package/plugins/lisa-devin/skills/lisa-setup-remote-env/assets/session-start.sh +18 -5
- package/plugins/lisa-expo/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-expo/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-expo/.codex-plugin/skills/building-native-ui/references/webgpu-three.md +19 -9
- package/plugins/lisa-expo/.codex-plugin/skills/expo-tailwind-setup/SKILL.md +15 -4
- package/plugins/lisa-expo/skills/building-native-ui/references/webgpu-three.md +19 -9
- package/plugins/lisa-expo/skills/expo-tailwind-setup/SKILL.md +15 -4
- package/plugins/lisa-expo-agy/plugin.json +1 -1
- package/plugins/lisa-expo-agy/skills/building-native-ui/references/webgpu-three.md +19 -9
- package/plugins/lisa-expo-agy/skills/expo-tailwind-setup/SKILL.md +15 -4
- package/plugins/lisa-expo-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-expo-copilot/skills/building-native-ui/references/webgpu-three.md +19 -9
- package/plugins/lisa-expo-copilot/skills/expo-tailwind-setup/SKILL.md +15 -4
- package/plugins/lisa-expo-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-expo-cursor/skills/building-native-ui/references/webgpu-three.md +19 -9
- package/plugins/lisa-expo-cursor/skills/expo-tailwind-setup/SKILL.md +15 -4
- 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-expo-devin/skills/building-native-ui/references/webgpu-three.md +19 -9
- package/plugins/lisa-expo-devin/skills/expo-tailwind-setup/SKILL.md +15 -4
- 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/hooks/block-generated-artifact-edits.sh +196 -11
- package/plugins/lisa-harper-fabric/hooks/enforce-config-extensions.sh +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-copilot/hooks/block-generated-artifact-edits.sh +196 -11
- package/plugins/lisa-harper-fabric-copilot/hooks/enforce-config-extensions.sh +1 -1
- package/plugins/lisa-harper-fabric-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-harper-fabric-cursor/hooks/block-generated-artifact-edits.sh +196 -11
- package/plugins/lisa-harper-fabric-cursor/hooks/enforce-config-extensions.sh +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-harper-fabric-devin/hooks/block-generated-artifact-edits.sh +196 -11
- package/plugins/lisa-harper-fabric-devin/hooks/enforce-config-extensions.sh +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/.codex-plugin/skills/nestjs-rules/SKILL.md +39 -26
- package/plugins/lisa-nestjs/.codex-plugin/skills/typeorm-patterns/references/observability-patterns.md +18 -58
- package/plugins/lisa-nestjs/hooks/block-migration-edits.sh +1 -1
- package/plugins/lisa-nestjs/hooks/lisa-edit-gate.sh +19 -15
- package/plugins/lisa-nestjs/skills/nestjs-rules/SKILL.md +39 -26
- package/plugins/lisa-nestjs/skills/typeorm-patterns/references/observability-patterns.md +18 -58
- package/plugins/lisa-nestjs-agy/plugin.json +1 -1
- package/plugins/lisa-nestjs-agy/skills/nestjs-rules/SKILL.md +39 -26
- package/plugins/lisa-nestjs-agy/skills/typeorm-patterns/references/observability-patterns.md +18 -58
- package/plugins/lisa-nestjs-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-nestjs-copilot/hooks/block-migration-edits.sh +1 -1
- package/plugins/lisa-nestjs-copilot/hooks/lisa-edit-gate.sh +19 -15
- package/plugins/lisa-nestjs-copilot/skills/nestjs-rules/SKILL.md +39 -26
- package/plugins/lisa-nestjs-copilot/skills/typeorm-patterns/references/observability-patterns.md +18 -58
- package/plugins/lisa-nestjs-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-nestjs-cursor/hooks/block-migration-edits.sh +1 -1
- package/plugins/lisa-nestjs-cursor/hooks/lisa-edit-gate.sh +19 -15
- package/plugins/lisa-nestjs-cursor/skills/nestjs-rules/SKILL.md +39 -26
- package/plugins/lisa-nestjs-cursor/skills/typeorm-patterns/references/observability-patterns.md +18 -58
- 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-nestjs-devin/hooks/block-migration-edits.sh +1 -1
- package/plugins/lisa-nestjs-devin/hooks/lisa-edit-gate.sh +19 -15
- package/plugins/lisa-nestjs-devin/skills/nestjs-rules/SKILL.md +39 -26
- package/plugins/lisa-nestjs-devin/skills/typeorm-patterns/references/observability-patterns.md +18 -58
- 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/hooks/lisa-edit-gate.sh +19 -15
- package/plugins/lisa-rails/hooks/rubocop-on-edit.sh +2 -2
- package/plugins/lisa-rails/hooks/sg-scan-on-edit.sh +3 -3
- package/plugins/lisa-rails-agy/plugin.json +1 -1
- package/plugins/lisa-rails-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-rails-copilot/hooks/lisa-edit-gate.sh +19 -15
- package/plugins/lisa-rails-copilot/hooks/rubocop-on-edit.sh +2 -2
- package/plugins/lisa-rails-copilot/hooks/sg-scan-on-edit.sh +3 -3
- package/plugins/lisa-rails-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-rails-cursor/hooks/lisa-edit-gate.sh +19 -15
- package/plugins/lisa-rails-cursor/hooks/rubocop-on-edit.sh +2 -2
- package/plugins/lisa-rails-cursor/hooks/sg-scan-on-edit.sh +3 -3
- 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-rails-devin/hooks/lisa-edit-gate.sh +19 -15
- package/plugins/lisa-rails-devin/hooks/rubocop-on-edit.sh +2 -2
- package/plugins/lisa-rails-devin/hooks/sg-scan-on-edit.sh +3 -3
- package/plugins/lisa-typescript/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-typescript/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-typescript/hooks/block-suppress-directives.sh +2 -2
- package/plugins/lisa-typescript/hooks/format-on-edit.sh +2 -2
- package/plugins/lisa-typescript/hooks/lint-on-edit.sh +2 -2
- package/plugins/lisa-typescript/hooks/lisa-edit-gate.sh +19 -15
- package/plugins/lisa-typescript/hooks/sg-scan-on-edit.sh +3 -3
- package/plugins/lisa-typescript-agy/plugin.json +1 -1
- package/plugins/lisa-typescript-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-typescript-copilot/hooks/block-suppress-directives.sh +2 -2
- package/plugins/lisa-typescript-copilot/hooks/format-on-edit.sh +2 -2
- package/plugins/lisa-typescript-copilot/hooks/lint-on-edit.sh +2 -2
- package/plugins/lisa-typescript-copilot/hooks/lisa-edit-gate.sh +19 -15
- package/plugins/lisa-typescript-copilot/hooks/sg-scan-on-edit.sh +3 -3
- package/plugins/lisa-typescript-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-typescript-cursor/hooks/block-suppress-directives.sh +2 -2
- package/plugins/lisa-typescript-cursor/hooks/format-on-edit.sh +2 -2
- package/plugins/lisa-typescript-cursor/hooks/lint-on-edit.sh +2 -2
- package/plugins/lisa-typescript-cursor/hooks/lisa-edit-gate.sh +19 -15
- package/plugins/lisa-typescript-cursor/hooks/sg-scan-on-edit.sh +3 -3
- 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-typescript-devin/hooks/block-suppress-directives.sh +2 -2
- package/plugins/lisa-typescript-devin/hooks/format-on-edit.sh +2 -2
- package/plugins/lisa-typescript-devin/hooks/lint-on-edit.sh +2 -2
- package/plugins/lisa-typescript-devin/hooks/lisa-edit-gate.sh +19 -15
- package/plugins/lisa-typescript-devin/hooks/sg-scan-on-edit.sh +3 -3
- 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/hooks/block-managed-file-edits.sh +201 -20
- package/plugins/src/base/hooks/block-masked-exit-status.sh +1 -1
- package/plugins/src/base/hooks/block-no-verify.agy.sh +1 -1
- package/plugins/src/base/hooks/enforce-verification-gate.sh +1 -2
- package/plugins/src/base/hooks/ticket-sync-reminder.sh +2 -17
- package/plugins/src/base/hooks/track-plan-sessions.sh +7 -131
- package/plugins/src/base/scripts/remote-agent-aws-setup.sh +3 -1
- package/plugins/src/base/skills/lisa-setup-remote-env/assets/session-start.sh +18 -5
- package/plugins/src/expo/skills/building-native-ui/references/webgpu-three.md +19 -9
- package/plugins/src/expo/skills/expo-tailwind-setup/SKILL.md +15 -4
- package/plugins/src/harper-fabric/hooks/block-generated-artifact-edits.sh +196 -11
- package/plugins/src/harper-fabric/hooks/enforce-config-extensions.sh +1 -1
- package/plugins/src/nestjs/hooks/block-migration-edits.sh +1 -1
- package/plugins/src/nestjs/hooks/lisa-edit-gate.sh +19 -15
- package/plugins/src/nestjs/skills/nestjs-rules/SKILL.md +39 -26
- package/plugins/src/nestjs/skills/typeorm-patterns/references/observability-patterns.md +18 -58
- package/plugins/src/rails/hooks/lisa-edit-gate.sh +19 -15
- package/plugins/src/rails/hooks/rubocop-on-edit.sh +2 -2
- package/plugins/src/rails/hooks/sg-scan-on-edit.sh +3 -3
- package/plugins/src/typescript/hooks/block-suppress-directives.sh +2 -2
- package/plugins/src/typescript/hooks/format-on-edit.sh +2 -2
- package/plugins/src/typescript/hooks/lint-on-edit.sh +2 -2
- package/plugins/src/typescript/hooks/lisa-edit-gate.sh +19 -15
- package/plugins/src/typescript/hooks/sg-scan-on-edit.sh +3 -3
- package/scripts/build-plugins.sh +1 -1
- package/scripts/check-derived-artifacts.mjs +2 -2
- package/scripts/check-generated-artifact-merge-coverage.mjs +45 -4
- package/scripts/check-orphan-test-processes.mjs +0 -1
- package/scripts/check-self-dependency-pin.mjs +0 -2
- package/scripts/claude-remote-setup.sh +12 -7
- package/scripts/cleanup-amplify-branches.sh +0 -1
- package/scripts/generate-export-surface.mjs +131 -61
- package/scripts/generate-lisa-owned-hash-ledger.mjs +87 -102
- package/scripts/generate-upstream-evidence-manifest.mjs +56 -49
- package/scripts/github-status-check.sh +5 -25
- package/scripts/install-claude-plugins.sh +10 -8
- package/scripts/lib/merge-generated-json.mjs +274 -0
- package/scripts/lib/upstream-manifest-staleness.mjs +38 -34
- package/scripts/lib/upstream-public-commits.mjs +35 -18
- package/scripts/lisa-commit-and-pr-local.sh +1 -1
- package/scripts/lisa-enforcement-fallback.sh +31 -32
- package/scripts/lisa-github-environments.sh +5 -1
- package/scripts/lisa-github-repo-settings.sh +5 -1
- package/scripts/lisa-github-repo-setup.sh +1 -2
- package/scripts/lisa-github-rulesets.sh +8 -8
- package/scripts/lisa-remote-env/session-start.sh +18 -5
- package/scripts/lisa-rollback-release.mjs +0 -2
- package/scripts/lisa-update-local.sh +1 -1
- package/scripts/merge-generated-artifact.mjs +18 -6
- package/scripts/raise-self-dependency-pin.mjs +0 -2
- package/scripts/run-artifact-checks.mjs +1 -1
- package/scripts/verify-packed-learnings-contract.mjs +36 -3
- package/scripts/verify-self-pin-raise.mjs +0 -2
- package/typescript/copy-contents/.husky/commit-msg +8 -2
- package/typescript/copy-contents/.husky/post-checkout +2 -0
- package/typescript/copy-contents/.husky/post-merge +2 -0
- package/typescript/copy-contents/.husky/pre-commit +10 -3
- package/typescript/copy-contents/.husky/pre-push +29 -16
- package/typescript/copy-contents/.husky/prepare-commit-msg +2 -0
- package/typescript/create-only/.husky/pre-push.local +2 -0
- package/eslint-plugin-code-organization/__tests__/enforce-statement-order.test.js +0 -643
|
@@ -0,0 +1,274 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* merge-generated-json — the pointwise three-way merge for Lisa's JSON
|
|
3
|
+
* generated artifacts (`src/core/upstream-evidence-manifest.json`,
|
|
4
|
+
* `src/core/lisa-owned-hash-ledger.json`).
|
|
5
|
+
*
|
|
6
|
+
* Same semantics as the line-based merge in `scripts/merge-generated-artifact.mjs`,
|
|
7
|
+
* which this module is dispatched from, on a parsed model instead of source
|
|
8
|
+
* lines: JSON has no trailing commas, so a line-level merge that appends an
|
|
9
|
+
* entry after the last one would emit an invalid file. Parsing first removes
|
|
10
|
+
* that hazard, and re-rendering with `formatGeneratedJson` reproduces the
|
|
11
|
+
* generators' exact bytes because both generators render through it, with
|
|
12
|
+
* keys and array elements already sorted.
|
|
13
|
+
*
|
|
14
|
+
* The accepted shape is deliberately narrow — a top-level object whose every
|
|
15
|
+
* value is a RECORD of `key -> scalar | scalar[]` — because pointwise merging
|
|
16
|
+
* is only sound for an accumulator keyed by one input. A top-level scalar (a
|
|
17
|
+
* count, a description) or a nested record is refused, so an artifact outside
|
|
18
|
+
* that shape conflicts rather than merging into something plausible and wrong.
|
|
19
|
+
*
|
|
20
|
+
* @module scripts/lib/merge-generated-json
|
|
21
|
+
*/
|
|
22
|
+
|
|
23
|
+
/** Identity standing for "this side does not have this entry". */
|
|
24
|
+
const ABSENT = "\u0000absent";
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Compare two keys the way both generators sort theirs (UTF-16 code units).
|
|
28
|
+
* @param {string} left - First key
|
|
29
|
+
* @param {string} right - Second key
|
|
30
|
+
* @returns {number} Negative, zero, or positive per the comparator contract
|
|
31
|
+
*/
|
|
32
|
+
function compareKeys(left, right) {
|
|
33
|
+
if (left === right) return 0;
|
|
34
|
+
return left < right ? -1 : 1;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* Whether a value is a plain JSON object (not an array, not null).
|
|
39
|
+
* @param {unknown} value - Candidate
|
|
40
|
+
* @returns {boolean} True for a plain object
|
|
41
|
+
*/
|
|
42
|
+
function isRecord(value) {
|
|
43
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* Whether a value is a JSON scalar.
|
|
48
|
+
* @param {unknown} value - Candidate
|
|
49
|
+
* @returns {boolean} True for a string, number, boolean, or null
|
|
50
|
+
*/
|
|
51
|
+
function isScalar(value) {
|
|
52
|
+
return (
|
|
53
|
+
value === null || ["string", "number", "boolean"].includes(typeof value)
|
|
54
|
+
);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* Whether a text looks like a JSON artifact rather than a TypeScript module.
|
|
59
|
+
* @param {string} text - Artifact contents
|
|
60
|
+
* @returns {boolean} True when the first non-space character opens an object
|
|
61
|
+
*/
|
|
62
|
+
export function isJsonArtifact(text) {
|
|
63
|
+
return text.trimStart().startsWith("{");
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* Parse a JSON artifact into named records of entries.
|
|
68
|
+
* @param {string} text - Artifact contents
|
|
69
|
+
* @returns {{ok: true, records: Map<string, Map<string, unknown>>} | {ok: false, reason: string}} Parse result
|
|
70
|
+
*/
|
|
71
|
+
export function parseJsonArtifact(text) {
|
|
72
|
+
let document;
|
|
73
|
+
try {
|
|
74
|
+
document = JSON.parse(text);
|
|
75
|
+
} catch (error) {
|
|
76
|
+
return { ok: false, reason: `not valid JSON (${error.message})` };
|
|
77
|
+
}
|
|
78
|
+
if (!isRecord(document))
|
|
79
|
+
return { ok: false, reason: "the top level is not an object" };
|
|
80
|
+
const records = new Map();
|
|
81
|
+
for (const [name, record] of Object.entries(document)) {
|
|
82
|
+
if (!isRecord(record))
|
|
83
|
+
return {
|
|
84
|
+
ok: false,
|
|
85
|
+
reason: `top-level value ${name} is not a record of entries`,
|
|
86
|
+
};
|
|
87
|
+
for (const [key, value] of Object.entries(record)) {
|
|
88
|
+
const flat =
|
|
89
|
+
isScalar(value) || (Array.isArray(value) && value.every(isScalar));
|
|
90
|
+
if (!flat)
|
|
91
|
+
return {
|
|
92
|
+
ok: false,
|
|
93
|
+
reason: `entry ${name}.${key} is nested, not a scalar or a list of scalars`,
|
|
94
|
+
};
|
|
95
|
+
}
|
|
96
|
+
records.set(name, new Map(Object.entries(record)));
|
|
97
|
+
}
|
|
98
|
+
return { ok: true, records };
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
/**
|
|
102
|
+
* A record entry whose value is a string, on one line as `JSON.stringify` puts it.
|
|
103
|
+
* The key and value are JSON string literals, so neither can contain an
|
|
104
|
+
* unescaped quote and the pattern cannot match across entries.
|
|
105
|
+
*/
|
|
106
|
+
const STRING_ENTRY_LINE = /^( +)("(?:[^"\\]|\\.)*"): ("(?:[^"\\]|\\.)*")(,?)$/u;
|
|
107
|
+
|
|
108
|
+
/**
|
|
109
|
+
* Serialize a generated artifact the one way every writer of it agrees on.
|
|
110
|
+
*
|
|
111
|
+
* Two-space `JSON.stringify` output, except that an entry whose value is a
|
|
112
|
+
* string puts the value on its own line under the key. The evidence manifest
|
|
113
|
+
* maps file paths to SHA-256 digests, and a path that names a key, token or
|
|
114
|
+
* secret next to a 64-character hex digest on one line is indistinguishable
|
|
115
|
+
* from `api_key: <credential>` to a generic secret scanner. Splitting the pair
|
|
116
|
+
* keeps the scanner pointed at real credentials without an ignore list, and it
|
|
117
|
+
* is still plain JSON, so every reader stays `JSON.parse`.
|
|
118
|
+
* @param {unknown} document - The artifact's parsed form
|
|
119
|
+
* @returns {string} JSON text, newline-terminated
|
|
120
|
+
*/
|
|
121
|
+
export function formatGeneratedJson(document) {
|
|
122
|
+
const text = JSON.stringify(document, null, 2)
|
|
123
|
+
.split("\n")
|
|
124
|
+
.map(line => line.replace(STRING_ENTRY_LINE, "$1$2:\n$1 $3$4"))
|
|
125
|
+
.join("\n");
|
|
126
|
+
return `${text}\n`;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
/**
|
|
130
|
+
* Re-emit parsed records exactly as the generators write them.
|
|
131
|
+
* @param {Map<string, Map<string, unknown>>} records - Named records, in file order
|
|
132
|
+
* @returns {string} JSON text, newline-terminated
|
|
133
|
+
*/
|
|
134
|
+
export function renderJsonArtifact(records) {
|
|
135
|
+
const document = Object.fromEntries(
|
|
136
|
+
[...records].map(([name, entries]) => [
|
|
137
|
+
name,
|
|
138
|
+
Object.fromEntries(
|
|
139
|
+
[...entries].sort(([left], [right]) => compareKeys(left, right))
|
|
140
|
+
),
|
|
141
|
+
])
|
|
142
|
+
);
|
|
143
|
+
return formatGeneratedJson(document);
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
/**
|
|
147
|
+
* Stable identity of an entry value, or its absence.
|
|
148
|
+
* @param {unknown} value - Entry value
|
|
149
|
+
* @returns {string} Comparison key
|
|
150
|
+
*/
|
|
151
|
+
const identity = value =>
|
|
152
|
+
value === undefined ? ABSENT : JSON.stringify(value);
|
|
153
|
+
|
|
154
|
+
/**
|
|
155
|
+
* Union two append-only list entries that both grew from the same base.
|
|
156
|
+
*
|
|
157
|
+
* Only sound when neither side REMOVED an element: append-only is the ledger
|
|
158
|
+
* generator's own invariant, so a side that dropped one is not an append.
|
|
159
|
+
* @param {unknown} base - Merge-base value, undefined when absent there
|
|
160
|
+
* @param {boolean} hasBase - Whether merge-base information exists at all
|
|
161
|
+
* @param {unknown} ours - Our value
|
|
162
|
+
* @param {unknown} theirs - Their value
|
|
163
|
+
* @returns {unknown[] | undefined} Sorted union, when the union is sound
|
|
164
|
+
*/
|
|
165
|
+
function unionLists(base, hasBase, ours, theirs) {
|
|
166
|
+
if (!Array.isArray(ours) || !Array.isArray(theirs)) return undefined;
|
|
167
|
+
if (hasBase && base !== undefined) {
|
|
168
|
+
if (!Array.isArray(base)) return undefined;
|
|
169
|
+
const kept = base.every(
|
|
170
|
+
item => ours.includes(item) && theirs.includes(item)
|
|
171
|
+
);
|
|
172
|
+
if (!kept) return undefined;
|
|
173
|
+
}
|
|
174
|
+
return [...new Set([...ours, ...theirs])].sort((left, right) =>
|
|
175
|
+
compareKeys(String(left), String(right))
|
|
176
|
+
);
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
/**
|
|
180
|
+
* Merge one entry three ways.
|
|
181
|
+
* @param {{hasBase: boolean, base: unknown, ours: unknown, theirs: unknown, resolveDerived: boolean}} sides - The entry on each side
|
|
182
|
+
* @returns {{kind: "value" | "derived", value: unknown} | {kind: "conflict"}} Outcome
|
|
183
|
+
*/
|
|
184
|
+
function mergeEntry({ hasBase, base, ours, theirs, resolveDerived }) {
|
|
185
|
+
if (identity(ours) === identity(theirs))
|
|
186
|
+
return { kind: "value", value: ours };
|
|
187
|
+
if (hasBase && identity(ours) === identity(base))
|
|
188
|
+
return { kind: "value", value: theirs };
|
|
189
|
+
if (hasBase && identity(theirs) === identity(base))
|
|
190
|
+
return { kind: "value", value: ours };
|
|
191
|
+
if (ours === undefined || theirs === undefined) return { kind: "conflict" };
|
|
192
|
+
const unioned = unionLists(base, hasBase, ours, theirs);
|
|
193
|
+
if (unioned !== undefined) return { kind: "value", value: unioned };
|
|
194
|
+
if (resolveDerived) return { kind: "derived", value: ours };
|
|
195
|
+
return { kind: "conflict" };
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
/**
|
|
199
|
+
* Merge one named record.
|
|
200
|
+
* @param {Map<string, unknown> | undefined} base - Merge-base entries
|
|
201
|
+
* @param {Map<string, unknown>} ours - Our entries
|
|
202
|
+
* @param {Map<string, unknown>} theirs - Their entries
|
|
203
|
+
* @param {boolean} resolveDerived - Whether a contested entry may take our side
|
|
204
|
+
* @returns {{ok: true, entries: Map<string, unknown>, resolved: string[]} | {ok: false, reason: string}} Merged record
|
|
205
|
+
*/
|
|
206
|
+
function mergeRecord(base, ours, theirs, resolveDerived) {
|
|
207
|
+
const entries = new Map();
|
|
208
|
+
const resolved = [];
|
|
209
|
+
const keys = [
|
|
210
|
+
...new Set([...(base?.keys() ?? []), ...ours.keys(), ...theirs.keys()]),
|
|
211
|
+
].sort(compareKeys);
|
|
212
|
+
for (const key of keys) {
|
|
213
|
+
const outcome = mergeEntry({
|
|
214
|
+
hasBase: base !== undefined,
|
|
215
|
+
base: base?.get(key),
|
|
216
|
+
ours: ours.get(key),
|
|
217
|
+
theirs: theirs.get(key),
|
|
218
|
+
resolveDerived,
|
|
219
|
+
});
|
|
220
|
+
if (outcome.kind === "conflict")
|
|
221
|
+
return {
|
|
222
|
+
ok: false,
|
|
223
|
+
reason: `both sides changed the entry for ${key} in incompatible ways`,
|
|
224
|
+
};
|
|
225
|
+
if (outcome.kind === "derived") resolved.push(key);
|
|
226
|
+
if (outcome.value !== undefined) entries.set(key, outcome.value);
|
|
227
|
+
}
|
|
228
|
+
return { ok: true, entries, resolved };
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
/**
|
|
232
|
+
* Merge three versions of one JSON generated artifact.
|
|
233
|
+
* @param {string} base - `%O` contents ("" when the file is new on both sides)
|
|
234
|
+
* @param {string} ours - `%A` contents
|
|
235
|
+
* @param {string} theirs - `%B` contents
|
|
236
|
+
* @param {boolean} resolveDerived - Whether a contested entry may take our side
|
|
237
|
+
* @returns {{ok: true, text: string, resolved: string[]} | {ok: false, reason: string}} Merge result
|
|
238
|
+
*/
|
|
239
|
+
export function mergeJsonArtifact(base, ours, theirs, resolveDerived) {
|
|
240
|
+
const parsedOurs = parseJsonArtifact(ours);
|
|
241
|
+
const parsedTheirs = parseJsonArtifact(theirs);
|
|
242
|
+
if (!parsedOurs.ok)
|
|
243
|
+
return { ok: false, reason: `ours: ${parsedOurs.reason}` };
|
|
244
|
+
if (!parsedTheirs.ok)
|
|
245
|
+
return { ok: false, reason: `theirs: ${parsedTheirs.reason}` };
|
|
246
|
+
const parsedBase = base === "" ? undefined : parseJsonArtifact(base);
|
|
247
|
+
if (parsedBase !== undefined && !parsedBase.ok)
|
|
248
|
+
return { ok: false, reason: `base: ${parsedBase.reason}` };
|
|
249
|
+
const shape = records => [...records.keys()].join(",");
|
|
250
|
+
if (shape(parsedOurs.records) !== shape(parsedTheirs.records))
|
|
251
|
+
return {
|
|
252
|
+
ok: false,
|
|
253
|
+
reason: "the two sides have different block structures",
|
|
254
|
+
};
|
|
255
|
+
const baseRecords =
|
|
256
|
+
parsedBase !== undefined &&
|
|
257
|
+
shape(parsedBase.records) === shape(parsedOurs.records)
|
|
258
|
+
? parsedBase.records
|
|
259
|
+
: undefined;
|
|
260
|
+
const merged = new Map();
|
|
261
|
+
const resolved = [];
|
|
262
|
+
for (const [name, ourEntries] of parsedOurs.records) {
|
|
263
|
+
const result = mergeRecord(
|
|
264
|
+
baseRecords?.get(name),
|
|
265
|
+
ourEntries,
|
|
266
|
+
parsedTheirs.records.get(name),
|
|
267
|
+
resolveDerived
|
|
268
|
+
);
|
|
269
|
+
if (!result.ok) return result;
|
|
270
|
+
resolved.push(...result.resolved);
|
|
271
|
+
merged.set(name, result.entries);
|
|
272
|
+
}
|
|
273
|
+
return { ok: true, text: renderJsonArtifact(merged), resolved };
|
|
274
|
+
}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* what moved underneath it".
|
|
4
4
|
*
|
|
5
5
|
* @remarks
|
|
6
|
-
* `src/core/upstream-evidence-manifest.
|
|
6
|
+
* `src/core/upstream-evidence-manifest.json` is derived from two things: the set
|
|
7
7
|
* of TRACKED files (`git ls-files`, so the git index), and the working-tree
|
|
8
8
|
* bytes of every tracked file under a packaged-evidence prefix. Its `--check`
|
|
9
9
|
* regenerates and compares byte-for-byte, so it can say *that* the file is out
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
*
|
|
40
40
|
* The obvious story — "the manifest hashes the ledger, so a stale manifest means
|
|
41
41
|
* a stale ledger" — is false, and was measured false while fixing #2852:
|
|
42
|
-
* `src/core/lisa-owned-hash-ledger.
|
|
42
|
+
* `src/core/lisa-owned-hash-ledger.json` lives outside every packaged-evidence
|
|
43
43
|
* prefix, so the manifest records its PATH and never its bytes. Mutating the
|
|
44
44
|
* ledger's contents leaves the manifest check passing. The two artifacts are
|
|
45
45
|
* independent in content; what couples them is a shared INPUT. Editing a
|
|
@@ -70,46 +70,50 @@ const MAX_LISTED_PATHS = 10;
|
|
|
70
70
|
*/
|
|
71
71
|
|
|
72
72
|
/**
|
|
73
|
-
*
|
|
73
|
+
* One named record of the manifest JSON, or an empty one when it is absent.
|
|
74
74
|
*
|
|
75
|
-
*
|
|
76
|
-
*
|
|
77
|
-
*
|
|
78
|
-
*
|
|
79
|
-
* @param {
|
|
80
|
-
* @param {string}
|
|
81
|
-
* @returns {string} The
|
|
75
|
+
* Read by record name rather than swept across the whole file, because the
|
|
76
|
+
* public-commit record has the same `"<key>": true` shape as the tracked-surface
|
|
77
|
+
* record: a single sweep reads 40-character SHAs as file paths and then reports
|
|
78
|
+
* thousands of phantom removals.
|
|
79
|
+
* @param {unknown} document - Parsed manifest JSON.
|
|
80
|
+
* @param {string} name - Record name.
|
|
81
|
+
* @returns {Record<string, unknown>} The record, or an empty object.
|
|
82
82
|
*/
|
|
83
|
-
|
|
84
|
-
const
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
if (close === -1) return "";
|
|
90
|
-
return source.slice(open, close);
|
|
83
|
+
function recordFor(document, name) {
|
|
84
|
+
const record =
|
|
85
|
+
typeof document === "object" && document !== null ? document[name] : null;
|
|
86
|
+
return typeof record === "object" && record !== null && !Array.isArray(record)
|
|
87
|
+
? record
|
|
88
|
+
: {};
|
|
91
89
|
}
|
|
92
90
|
|
|
93
91
|
/**
|
|
94
92
|
* The inputs a generated manifest says it was built from.
|
|
95
|
-
*
|
|
93
|
+
*
|
|
94
|
+
* Unparseable text records nothing, so every path in a fresh regeneration then
|
|
95
|
+
* reads as added — the diagnosis still names the inputs the fresh file holds.
|
|
96
|
+
* @param {string} source - Contents of `src/core/upstream-evidence-manifest.json`.
|
|
96
97
|
* @returns {ManifestInputs} Recorded evidence digests and tracked-surface paths.
|
|
97
98
|
*/
|
|
98
99
|
export function parseManifestInputs(source) {
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
const surface = new Set();
|
|
107
|
-
for (const match of blockFor(source, "UPSTREAM_SURFACE_MANIFEST").matchAll(
|
|
108
|
-
/^ {4}(?:"([^"]+)"|([A-Za-z_$][A-Za-z0-9_$]*)): true,$/gmu
|
|
109
|
-
)) {
|
|
110
|
-
surface.add(match[1] ?? match[2]);
|
|
100
|
+
let document;
|
|
101
|
+
try {
|
|
102
|
+
document = JSON.parse(source);
|
|
103
|
+
} catch {
|
|
104
|
+
document = null;
|
|
111
105
|
}
|
|
112
|
-
|
|
106
|
+
const evidence = new Map(
|
|
107
|
+
Object.entries(recordFor(document, "UPSTREAM_EVIDENCE_MANIFEST")).filter(
|
|
108
|
+
([, digest]) =>
|
|
109
|
+
typeof digest === "string" && /^[a-f0-9]{64}$/u.test(digest)
|
|
110
|
+
)
|
|
111
|
+
);
|
|
112
|
+
const surface = new Set(
|
|
113
|
+
Object.entries(recordFor(document, "UPSTREAM_SURFACE_MANIFEST"))
|
|
114
|
+
.filter(([, member]) => member === true)
|
|
115
|
+
.map(([file]) => file)
|
|
116
|
+
);
|
|
113
117
|
return { evidence, surface };
|
|
114
118
|
}
|
|
115
119
|
|
|
@@ -168,7 +172,7 @@ function listPaths(paths) {
|
|
|
168
172
|
* @returns {string} Multi-line refusal text.
|
|
169
173
|
*/
|
|
170
174
|
export function describeStaleManifest(diagnosis) {
|
|
171
|
-
const sections = ["src/core/upstream-evidence-manifest.
|
|
175
|
+
const sections = ["src/core/upstream-evidence-manifest.json is stale."];
|
|
172
176
|
|
|
173
177
|
if (diagnosis.changed.length > 0) {
|
|
174
178
|
sections.push(
|
|
@@ -215,7 +219,7 @@ export function describeStaleManifest(diagnosis) {
|
|
|
215
219
|
|
|
216
220
|
sections.push(
|
|
217
221
|
" Fix: bun run build:upstream-evidence-manifest\n" +
|
|
218
|
-
" Then: git add src/core/upstream-evidence-manifest.
|
|
222
|
+
" Then: git add src/core/upstream-evidence-manifest.json"
|
|
219
223
|
);
|
|
220
224
|
|
|
221
225
|
if (
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
*
|
|
5
5
|
* @remarks
|
|
6
6
|
* `lisa file-upstream` accepts a commit reference only when it is a key of
|
|
7
|
-
* `UPSTREAM_PUBLIC_COMMITS` in `src/core/upstream-evidence-manifest.
|
|
7
|
+
* `UPSTREAM_PUBLIC_COMMITS` in `src/core/upstream-evidence-manifest.json`. That
|
|
8
8
|
* list is an accumulator rather than a derivation: the generator seeds it from
|
|
9
9
|
* the checked-in file and extends it from git history only when asked to
|
|
10
10
|
* (`--refresh-public-commits`). For four months nothing asked, so every commit
|
|
@@ -15,41 +15,58 @@
|
|
|
15
15
|
*
|
|
16
16
|
* ## Why the reader is deliberately loose
|
|
17
17
|
*
|
|
18
|
-
* The generator carries the recorded list forward by
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
*
|
|
24
|
-
*
|
|
25
|
-
* the signal.
|
|
18
|
+
* The generator carries the recorded list forward by parsing the JSON it
|
|
19
|
+
* writes. That is the right way to WRITE the list and the wrong way to CHECK
|
|
20
|
+
* it: if the recorded file ever stops parsing — a conflict marker, a hand edit
|
|
21
|
+
* — the strict read comes back empty, and a refresh then writes only what
|
|
22
|
+
* history reaches today. Nothing fails; the list is just smaller. So the check
|
|
23
|
+
* reads the same record as text, with a pattern that has no opinion about
|
|
24
|
+
* syntax, and the two reads disagreeing is the signal.
|
|
26
25
|
*
|
|
27
26
|
* @module scripts/lib/upstream-public-commits
|
|
28
27
|
*/
|
|
29
|
-
|
|
28
|
+
/** The manifest record that holds the list. */
|
|
29
|
+
const PUBLIC_COMMITS_RECORD = "UPSTREAM_PUBLIC_COMMITS";
|
|
30
30
|
|
|
31
|
-
/** The
|
|
32
|
-
const
|
|
31
|
+
/** The generated manifest data, relative to the repository root. */
|
|
32
|
+
export const MANIFEST_PATH = "src/core/upstream-evidence-manifest.json";
|
|
33
33
|
|
|
34
|
-
/**
|
|
35
|
-
|
|
34
|
+
/**
|
|
35
|
+
* The text of one record of the manifest, read without parsing it.
|
|
36
|
+
*
|
|
37
|
+
* Sliced by record name rather than swept across the whole file, because the
|
|
38
|
+
* tracked-surface record renders `"<path>": true` in the same shape. The
|
|
39
|
+
* records hold only flat `key: value` pairs, so the record ends at the first
|
|
40
|
+
* closing brace after its own.
|
|
41
|
+
* @param {string} source - Contents of the generated manifest.
|
|
42
|
+
* @param {string} name - Record name.
|
|
43
|
+
* @returns {string} The record body, or an empty string when it is absent.
|
|
44
|
+
*/
|
|
45
|
+
function recordText(source, name) {
|
|
46
|
+
const key = source.indexOf(`"${name}"`);
|
|
47
|
+
if (key === -1) return "";
|
|
48
|
+
const open = source.indexOf("{", key);
|
|
49
|
+
if (open === -1) return "";
|
|
50
|
+
const close = source.indexOf("}", open);
|
|
51
|
+
return close === -1 ? "" : source.slice(open, close);
|
|
52
|
+
}
|
|
36
53
|
|
|
37
54
|
/** The command that extends the list from git history. */
|
|
38
55
|
export const REFRESH_PUBLIC_COMMITS_COMMAND =
|
|
39
56
|
"node scripts/generate-upstream-evidence-manifest.mjs --refresh-public-commits";
|
|
40
57
|
|
|
41
58
|
/**
|
|
42
|
-
* Every full commit SHA the generated
|
|
59
|
+
* Every full commit SHA the generated manifest lists, however it is spelled.
|
|
43
60
|
*
|
|
44
61
|
* Scoped to the public-commit block: the tracked-surface block renders
|
|
45
62
|
* `<path>: true,` in the same shape, and a file named with forty hex characters
|
|
46
63
|
* is not a commit.
|
|
47
|
-
* @param {string} source - Contents of the generated manifest
|
|
64
|
+
* @param {string} source - Contents of the generated manifest.
|
|
48
65
|
* @returns {Set<string>} Listed SHAs; empty when the block is absent.
|
|
49
66
|
*/
|
|
50
67
|
export function listedPublicCommits(source) {
|
|
51
68
|
return new Set(
|
|
52
|
-
|
|
69
|
+
recordText(source, PUBLIC_COMMITS_RECORD).match(/\b[a-f0-9]{40}\b/gu) ?? []
|
|
53
70
|
);
|
|
54
71
|
}
|
|
55
72
|
|
|
@@ -59,7 +76,7 @@ export function listedPublicCommits(source) {
|
|
|
59
76
|
* The list only ever grows — removing a commit that is no longer reachable is a
|
|
60
77
|
* decision nobody has made — so anything returned here is a commit about to be
|
|
61
78
|
* lost by accident.
|
|
62
|
-
* @param {string} recordedSource - The generated
|
|
79
|
+
* @param {string} recordedSource - The generated manifest as it is on disk.
|
|
63
80
|
* @param {Iterable<string>} kept - SHAs the new list will hold.
|
|
64
81
|
* @returns {string[]} Recorded SHAs absent from `kept`, sorted.
|
|
65
82
|
*/
|
|
@@ -94,7 +94,7 @@ fi
|
|
|
94
94
|
# { "branch": "<target branch>", "canary": true } (CodySwannGT/lisa#4604).
|
|
95
95
|
# Validated up front: the loop reads it through process substitution, whose
|
|
96
96
|
# exit status `set -e` ignores, so a bad entry would otherwise be skipped.
|
|
97
|
-
WORKSPACE_ENTRIES_JQ=
|
|
97
|
+
WORKSPACE_ENTRIES_JQ="to_entries[] | .key as \$k | (.value | if type == \"object\" then .branch else . end) as \$raw | (if (\$raw | type) == \"string\" and (\$raw | length) > 0 then \$raw else error(\"entry \\(\$k) has no valid branch (expected a non-empty string)\") end) as \$b | \"\\(\$k)\\t\\(\$b)\""
|
|
98
98
|
if ! jq -r "$WORKSPACE_ENTRIES_JQ" "$CONFIG_FILE" >/dev/null; then
|
|
99
99
|
log_error "Invalid workspace entry in $CONFIG_FILE"
|
|
100
100
|
exit 1
|
|
@@ -208,6 +208,25 @@ note_version() {
|
|
|
208
208
|
|
|
209
209
|
plugin_tree_version=""
|
|
210
210
|
|
|
211
|
+
# The EXIT trap of run_optional_freshness, running inside its subshell and
|
|
212
|
+
# reading that subshell's state. If the anchor is still set, send the private stop handshake and wait for it
|
|
213
|
+
# before closing descriptors. Remove scratch only while its captured identity
|
|
214
|
+
# and trusted parent still match, preserving replaced or unrelated resources.
|
|
215
|
+
cleanup_diagnostic() {
|
|
216
|
+
if [ -n "$anchor" ]; then
|
|
217
|
+
printf 'stop\n' >&8
|
|
218
|
+
wait "$anchor" 2>/dev/null || true
|
|
219
|
+
fi
|
|
220
|
+
exec 8>&- 9>&-
|
|
221
|
+
current_identity="$(stat -f '%d:%i:%Lp' "$scratch" 2>/dev/null)" ||
|
|
222
|
+
current_identity="$(stat -c '%d:%i:%a' "$scratch" 2>/dev/null)" || current_identity=""
|
|
223
|
+
if [ "$current_identity" = "$scratch_identity" ] &&
|
|
224
|
+
[ -d "$scratch" ] && [ ! -L "$scratch" ] && [ -O "$scratch" ] &&
|
|
225
|
+
notice_parent_chain_trusted "$notice_temp_base"; then
|
|
226
|
+
rm -rf "$scratch"
|
|
227
|
+
fi
|
|
228
|
+
}
|
|
229
|
+
|
|
211
230
|
# Node cannot supervise its own stalled startup. A directly forked Bash job owns
|
|
212
231
|
# a live group anchor and an independent builtin-read timer. No second Bash is
|
|
213
232
|
# exec'd, so its BASH_ENV and native ps startup cannot precede that timer. The
|
|
@@ -220,6 +239,7 @@ run_optional_freshness() (
|
|
|
220
239
|
# Bash 3.2 unwinds function locals before EXIT on an explicit exit inside
|
|
221
240
|
# command substitution. This function already isolates all state in a subshell.
|
|
222
241
|
scratch="" anchor="" scratch_identity="" current_identity="" helper_status=1
|
|
242
|
+
output_status=0
|
|
223
243
|
[ -n "$notice_temp_base" ] && notice_parent_chain_trusted "$notice_temp_base" || exit 1
|
|
224
244
|
scratch="$(umask 077 && mktemp -d "$notice_temp_base/lisa-freshness.XXXXXX")" || exit 1
|
|
225
245
|
case "$scratch" in "$notice_temp_base"/lisa-freshness.*) ;; *) exit 1 ;; esac
|
|
@@ -227,23 +247,6 @@ run_optional_freshness() (
|
|
|
227
247
|
scratch_identity="$(stat -f '%d:%i:%Lp' "$scratch" 2>/dev/null)" ||
|
|
228
248
|
scratch_identity="$(stat -c '%d:%i:%a' "$scratch" 2>/dev/null)" || exit 1
|
|
229
249
|
[ "${scratch_identity##*:}" = 700 ] || exit 1
|
|
230
|
-
# If the anchor is still set, send the private stop handshake and wait for it
|
|
231
|
-
# before closing descriptors. Remove scratch only while its captured identity
|
|
232
|
-
# and trusted parent still match, preserving replaced or unrelated resources.
|
|
233
|
-
cleanup_diagnostic() {
|
|
234
|
-
if [ -n "$anchor" ]; then
|
|
235
|
-
printf 'stop\n' >&8
|
|
236
|
-
wait "$anchor" 2>/dev/null || true
|
|
237
|
-
fi
|
|
238
|
-
exec 8>&- 9>&-
|
|
239
|
-
current_identity="$(stat -f '%d:%i:%Lp' "$scratch" 2>/dev/null)" ||
|
|
240
|
-
current_identity="$(stat -c '%d:%i:%a' "$scratch" 2>/dev/null)" || current_identity=""
|
|
241
|
-
if [ "$current_identity" = "$scratch_identity" ] &&
|
|
242
|
-
[ -d "$scratch" ] && [ ! -L "$scratch" ] && [ -O "$scratch" ] &&
|
|
243
|
-
notice_parent_chain_trusted "$notice_temp_base"; then
|
|
244
|
-
rm -rf "$scratch"
|
|
245
|
-
fi
|
|
246
|
-
}
|
|
247
250
|
trap cleanup_diagnostic EXIT
|
|
248
251
|
trap 'exit 1' HUP INT TERM
|
|
249
252
|
mkfifo "$scratch/start" "$scratch/done" || exit 1
|
|
@@ -267,9 +270,9 @@ run_optional_freshness() (
|
|
|
267
270
|
) &
|
|
268
271
|
# Bash 3.2 accepts integer timeouts. One second leaves headroom beneath
|
|
269
272
|
# the two-second diagnostic ceiling without delaying real enforcement.
|
|
270
|
-
if builtin read -r -t 1 -u 9
|
|
273
|
+
if builtin read -r -t 1 -u 9 helper_signal && [ "$helper_signal" = "done" ]; then
|
|
271
274
|
builtin printf "complete\n" >"$scratch/complete"
|
|
272
|
-
builtin read -r -t 1 -u 8
|
|
275
|
+
builtin read -r -t 1 -u 8 _ || true
|
|
273
276
|
fi
|
|
274
277
|
builtin kill -KILL -- -"$group"
|
|
275
278
|
) &
|
|
@@ -294,7 +297,12 @@ run_optional_freshness() (
|
|
|
294
297
|
[ -f "$scratch/complete" ] && [ -f "$scratch/status" ] || exit 1
|
|
295
298
|
read -r helper_status <"$scratch/status"
|
|
296
299
|
[ "$helper_status" = 0 ] || exit 1
|
|
297
|
-
|
|
300
|
+
output_status=0
|
|
301
|
+
cat "$scratch/output" || output_status=$?
|
|
302
|
+
# The success path cleans up in line; the EXIT trap covers every early exit.
|
|
303
|
+
trap - EXIT
|
|
304
|
+
cleanup_diagnostic
|
|
305
|
+
exit "$output_status"
|
|
298
306
|
)
|
|
299
307
|
|
|
300
308
|
# Do not promote even one partial fact. Successful exit plus a terminal protocol
|
|
@@ -352,7 +360,7 @@ resolve_vintages() {
|
|
|
352
360
|
channel_path) plugin_channel_path="$value" ;;
|
|
353
361
|
guard[0-7])
|
|
354
362
|
state_index="${key#guard}"
|
|
355
|
-
case "$value" in matching|different|unknown) host_guard_states[
|
|
363
|
+
case "$value" in matching|different|unknown) host_guard_states[state_index]="$value" ;; esac
|
|
356
364
|
;;
|
|
357
365
|
esac
|
|
358
366
|
done <<< "$result"
|
|
@@ -410,7 +418,8 @@ plugin_channel_path=""
|
|
|
410
418
|
# The bounded helper reads the runtime record for exactly lisa@lisa and this
|
|
411
419
|
# project. It reports installed version/path, never whether hooks are live.
|
|
412
420
|
|
|
413
|
-
#
|
|
421
|
+
# What the last classify_channel_skew call found, as channel_skew_line: a SKEW
|
|
422
|
+
# line, an UNDETERMINED line, or nothing when every compared channel agreed.
|
|
414
423
|
#
|
|
415
424
|
# Three answers, never two. "The channels agree" and "I could not read one of
|
|
416
425
|
# them" are DIFFERENT facts, and collapsing them is how a probe reports success
|
|
@@ -438,7 +447,6 @@ plugin_channel_path=""
|
|
|
438
447
|
#
|
|
439
448
|
# Pinned by the test named "lets a permitted command through whatever the
|
|
440
449
|
# verdict is", which asserts exit 0 on both the skew and undetermined arms.
|
|
441
|
-
channel_skew_verdict="undetermined"
|
|
442
450
|
channel_skew_line=""
|
|
443
451
|
|
|
444
452
|
# Compare the vintage of the channel this dispatcher runs against the vintage
|
|
@@ -448,9 +456,7 @@ classify_channel_skew() {
|
|
|
448
456
|
local source=""
|
|
449
457
|
local tree
|
|
450
458
|
local channel_repair=""
|
|
451
|
-
local compared=0
|
|
452
459
|
channel_skew_line=""
|
|
453
|
-
channel_skew_verdict="undetermined"
|
|
454
460
|
for tree in host plugin; do
|
|
455
461
|
if [ "$tree" = host ] && [ "$host_tree_used" -eq 1 ]; then
|
|
456
462
|
mine="$installed_version"
|
|
@@ -467,7 +473,6 @@ classify_channel_skew() {
|
|
|
467
473
|
missing version evidence does not establish either channel's age or liveness.
|
|
468
474
|
"
|
|
469
475
|
elif [ "$mine" != "$plugin_channel_version" ]; then
|
|
470
|
-
channel_skew_verdict="skew"
|
|
471
476
|
if version_older "$plugin_channel_version" "$mine"; then
|
|
472
477
|
channel_repair="update the installed plugin for this project"
|
|
473
478
|
elif version_older "$mine" "$plugin_channel_version"; then
|
|
@@ -488,14 +493,8 @@ classify_channel_skew() {
|
|
|
488
493
|
repair: $channel_repair;
|
|
489
494
|
host content differences, if any, are reported separately below.
|
|
490
495
|
"
|
|
491
|
-
compared=1
|
|
492
|
-
else
|
|
493
|
-
compared=1
|
|
494
496
|
fi
|
|
495
497
|
done
|
|
496
|
-
if [ "$compared" -eq 1 ] && [ -z "$channel_skew_line" ]; then
|
|
497
|
-
channel_skew_verdict="agree"
|
|
498
|
-
fi
|
|
499
498
|
}
|
|
500
499
|
|
|
501
500
|
# Description of the last describe_vintage call.
|
|
@@ -57,7 +57,11 @@ log_info() { echo -e "${BLUE}ℹ${NC} $1"; }
|
|
|
57
57
|
log_success() { echo -e "${GREEN}✓${NC} $1"; }
|
|
58
58
|
log_warning() { echo -e "${YELLOW}⚠${NC} $1"; }
|
|
59
59
|
log_error() { echo -e "${RED}✗${NC} $1" >&2; }
|
|
60
|
-
log_verbose() {
|
|
60
|
+
log_verbose() {
|
|
61
|
+
if [[ "$VERBOSE" == "true" ]]; then
|
|
62
|
+
echo -e " $1" || true
|
|
63
|
+
fi
|
|
64
|
+
}
|
|
61
65
|
|
|
62
66
|
show_help() {
|
|
63
67
|
sed -n '2,38p' "$0" | sed 's/^# \{0,1\}//'
|
|
@@ -53,7 +53,11 @@ log_info() { echo -e "${BLUE}ℹ${NC} $1"; }
|
|
|
53
53
|
log_success() { echo -e "${GREEN}✓${NC} $1"; }
|
|
54
54
|
log_warning() { echo -e "${YELLOW}⚠${NC} $1"; }
|
|
55
55
|
log_error() { echo -e "${RED}✗${NC} $1" >&2; }
|
|
56
|
-
log_verbose() {
|
|
56
|
+
log_verbose() {
|
|
57
|
+
if [[ "$VERBOSE" == "true" ]]; then
|
|
58
|
+
echo -e " $1" || true
|
|
59
|
+
fi
|
|
60
|
+
}
|
|
57
61
|
|
|
58
62
|
show_help() {
|
|
59
63
|
sed -n '2,38p' "$0" | sed 's/^# \{0,1\}//'
|