gentle-pi 4.7.0 → 4.8.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 +55 -44
- package/assets/agents/gentle-ai-explore.md +3 -3
- package/assets/agents/gentle-ai-verify.md +20 -6
- package/assets/agents/gentle-ai-worker.md +6 -6
- package/assets/agents/jd-judge-a.md +1 -3
- package/assets/agents/jd-judge-b.md +1 -3
- package/assets/agents/review-readability.md +1 -5
- package/assets/agents/review-reliability.md +1 -5
- package/assets/agents/review-resilience.md +1 -5
- package/assets/agents/review-risk.md +1 -5
- package/assets/design-canvas/canvas-api.js +45 -0
- package/assets/design-canvas/canvas-boards.js +456 -0
- package/assets/design-canvas/canvas-boot.js +217 -0
- package/assets/design-canvas/canvas-checks.js +491 -0
- package/assets/design-canvas/canvas-comments.js +315 -0
- package/assets/design-canvas/canvas-compare.js +159 -0
- package/assets/design-canvas/canvas-events.js +75 -0
- package/assets/design-canvas/canvas-export.js +393 -0
- package/assets/design-canvas/canvas-focus.js +203 -0
- package/assets/design-canvas/canvas-handoffs.js +150 -0
- package/assets/design-canvas/canvas-i18n-es.js +392 -0
- package/assets/design-canvas/canvas-i18n.js +108 -0
- package/assets/design-canvas/canvas-layout.js +526 -0
- package/assets/design-canvas/canvas-menu.js +213 -0
- package/assets/design-canvas/canvas-messages.js +86 -0
- package/assets/design-canvas/canvas-minimap.js +163 -0
- package/assets/design-canvas/canvas-parts.js +401 -0
- package/assets/design-canvas/canvas-popover.js +234 -0
- package/assets/design-canvas/canvas-rail.js +348 -0
- package/assets/design-canvas/canvas-sizes.js +524 -0
- package/assets/design-canvas/canvas-store.js +164 -0
- package/assets/design-canvas/canvas-tokens.js +674 -0
- package/assets/design-canvas/canvas-ui.js +24 -0
- package/assets/design-canvas/canvas-view.js +184 -0
- package/assets/design-canvas/canvas.css +746 -15
- package/assets/design-canvas/canvas.js +2 -1506
- package/assets/design-canvas/index.html +117 -36
- package/assets/design-canvas/inspector.js +546 -16
- package/assets/install-wizard/wizard.js +5 -1
- package/assets/migrations/agent-body-history.json +24 -0
- package/assets/orchestrator-delegation-reference.md +8 -14
- package/assets/orchestrator-delegation.md +4 -4
- package/assets/orchestrator-full-delegation-card.md +4 -5
- package/assets/orchestrator-full-delegation.md +8 -8
- package/assets/orchestrator-memory.md +2 -2
- package/assets/orchestrator-prompts.md +1 -1
- package/assets/orchestrator-quota-recovery.md +5 -0
- package/assets/orchestrator-skills.md +13 -12
- package/assets/orchestrator-tracking.md +10 -14
- package/assets/orchestrator-verification.md +10 -8
- package/assets/orchestrator-writer.md +4 -4
- package/assets/orchestrator.md +18 -22
- package/bin/gentle-shell.mjs +128 -9
- package/contracts/review-provider-contract-mirror/provider-contract.lock.json +8 -9
- package/contracts/review-provider-contract-mirror/{v1.4.0 → v1.5.0}/bundle/manifest.json +3 -3
- package/contracts/review-provider-contract-mirror/{v1.4.0 → v1.5.0}/bundle/orchestration/pi.md +1 -0
- package/contracts/review-provider-contract-mirror/{v1.4.0 → v1.5.0}/bundle/routing/pi.md +6 -6
- package/contracts/review-provider-contract-mirror/{v1.4.0 → v1.5.0}/generated/provider-capabilities.baseline.json +3 -3
- package/contracts/review-provider-contract-mirror/{v1.4.0 → v1.5.0}/generated/provider-roles.baseline.json +1 -1
- package/docs/assets/brand/sponsor-banner.svg +60 -0
- package/docs/bundled-install.md +14 -6
- package/docs/delegated-verification.md +18 -2
- package/docs/desktop-rpc.md +1253 -0
- package/docs/gentle-agents-activity.md +26 -0
- package/docs/gentle-shell.md +39 -16
- package/docs/install-wizard.md +30 -21
- package/docs/odd-preparation-continuity.md +24 -0
- package/docs/permission-modes.md +9 -1
- package/docs/prompt-budget.md +12 -0
- package/docs/rdd-odd-friction-triage-2026-11-07.md +57 -0
- package/docs/readme-reference.md +76 -24
- package/docs/review-coordinator.md +29 -9
- package/docs/review-delivery-preflight.md +22 -0
- package/docs/work-continuity.md +11 -1
- package/extensions/ask-user-question.ts +2 -2
- package/extensions/child-context.ts +21 -7
- package/extensions/gentle-agents.ts +234 -33
- package/extensions/gentle-ai.ts +576 -135
- package/extensions/gentle-design.ts +69 -3
- package/extensions/gentle-desktop-rpc.ts +143 -0
- package/extensions/gentle-guide.ts +3 -0
- package/extensions/gentle-shell.ts +105 -52
- package/extensions/gentle-todo.ts +48 -25
- package/extensions/skill-registry.ts +248 -223
- package/lib/agent-assets.ts +30 -6
- package/lib/agent-tool-overlay.ts +117 -0
- package/lib/agents-config.ts +47 -6
- package/lib/agents-message-delivery.ts +17 -0
- package/lib/agents-messaging.ts +8 -2
- package/lib/agents-protocol.ts +15 -0
- package/lib/agents-report-cap.ts +115 -0
- package/lib/agents-runner.ts +91 -6
- package/lib/agents-session-transport.ts +17 -1
- package/lib/background-jobs-tools.ts +9 -4
- package/lib/bounded-writer-admission.ts +184 -31
- package/lib/child-context-files.ts +21 -6
- package/lib/codemode-renderer.ts +1 -0
- package/lib/delivery-conflict-markers.ts +349 -0
- package/lib/design-canvas-assets.ts +36 -0
- package/lib/design-canvas-server.ts +241 -23
- package/lib/design-comments.ts +94 -4
- package/lib/design-handoffs.ts +2 -1
- package/lib/design-layout.ts +125 -0
- package/lib/design-parts.ts +281 -0
- package/lib/design-system-tokens.ts +111 -0
- package/lib/desktop-agents-service.ts +294 -0
- package/lib/desktop-design-service.ts +233 -0
- package/lib/desktop-jobs-service.ts +263 -0
- package/lib/desktop-rpc-agents.ts +294 -0
- package/lib/desktop-rpc-config.ts +731 -0
- package/lib/desktop-rpc-design.ts +138 -0
- package/lib/desktop-rpc-jobs.ts +181 -0
- package/lib/desktop-rpc-permissions.ts +177 -0
- package/lib/desktop-rpc-profiles.ts +196 -0
- package/lib/desktop-rpc-usage.ts +229 -0
- package/lib/desktop-rpc.ts +225 -0
- package/lib/desktop-usage-service.ts +310 -0
- package/lib/destructive-command-guard.ts +188 -13
- package/lib/gentle-ai-renderer.ts +13 -1
- package/lib/gentle-design.ts +201 -14
- package/lib/gentle-shell-bundled.ts +100 -9
- package/lib/hidden-tools.ts +35 -0
- package/lib/inprocess-reviewer.ts +96 -12
- package/lib/model-fallback-policy.ts +9 -0
- package/lib/model-routing-authority.ts +9 -0
- package/lib/nan-provider.ts +42 -28
- package/lib/native-review-cli.ts +79 -4
- package/lib/orchestrator-discovery.ts +39 -2
- package/lib/reply-language-anchor.ts +27 -2
- package/lib/request-context-placement.ts +53 -0
- package/lib/review-candidate-view.ts +11 -1
- package/lib/review-continuation-registry.ts +17 -0
- package/lib/review-coordinator.ts +252 -8
- package/lib/review-delivery-preflight.ts +85 -0
- package/lib/review-host-relay.ts +5 -1
- package/lib/review-integration-v2.ts +56 -3
- package/lib/reviewer-stream.ts +87 -0
- package/lib/shell-prompt.ts +16 -3
- package/lib/shell-usage.ts +10 -0
- package/lib/vim-editor-adapter.ts +9 -2
- package/lib/writer-batch-admission.ts +55 -0
- package/lib/yolo-session-policy.ts +6 -1
- package/package.json +2 -2
- package/prompts/skill-creation.md +1 -10
- package/runtime/design-canvas-assets.mjs +37 -0
- package/runtime/gentle-shell-bundled.mjs +100 -9
- package/runtime/native-review-cli.mjs +79 -4
- package/runtime/review-integration-v2.mjs +56 -3
- package/scripts/bootstrap.cmd +2 -2
- package/scripts/bootstrap.sh +41 -4
- package/scripts/build-full-delegation-card.mjs +4 -0
- package/scripts/build-runtime-modules.mjs +1 -0
- package/scripts/gentle-ai-installer.mjs +10 -10
- package/scripts/gentle-ai-proxy.mjs +1 -1
- package/scripts/installer-downloads.mjs +34 -8
- package/scripts/installer-preflight.mjs +28 -17
- package/scripts/installer-probes.mjs +25 -5
- package/scripts/installer-server.mjs +38 -9
- package/scripts/installer-windows.mjs +2 -2
- package/scripts/pi-update.mjs +166 -27
- package/scripts/prepare-verifier.mjs +107 -0
- package/scripts/update-agent-body-history.mjs +55 -8
- package/scripts/verify-package-files.mjs +40 -19
- package/skills/branch-pr/SKILL.md +16 -16
- package/skills/comment-writer/SKILL.md +1 -1
- package/skills/design/SKILL.md +6 -6
- package/skills/gentle-ai/SKILL.md +5 -5
- package/skills/judgment-day/SKILL.md +2 -2
- package/skills/judgment-day/references/prompts-and-formats.md +1 -1
- package/skills/rdd-defect-workflow/SKILL.md +6 -6
- package/skills/skill-improver/SKILL.md +2 -2
- package/skills/skill-registry/SKILL.md +11 -13
- package/skills/tui-design/SKILL.md +1 -1
- package/skills/work-unit-commits/SKILL.md +5 -5
- package/tests/agent-prompt-diet-contract.test.ts +101 -0
- package/tests/agent-tool-overlay-acceptance.test.ts +158 -0
- package/tests/agent-tool-overlay.test.ts +89 -0
- package/tests/agents-config.test.ts +10 -1
- package/tests/agents-message-delivery.test.ts +36 -0
- package/tests/agents-queries.test.ts +144 -4
- package/tests/agents-report-cap.test.ts +126 -0
- package/tests/agents-runner.test.ts +37 -1
- package/tests/agents-session-transport.test.ts +34 -0
- package/tests/always-on-prompt-verdicts-contract.test.ts +188 -0
- package/tests/append-system-prompt-route.test.ts +10 -2
- package/tests/approved-text-leftovers-contract.test.ts +136 -0
- package/tests/artifact-language.test.ts +1 -1
- package/tests/ask-user-question.test.ts +2 -1
- package/tests/audit-leftovers-contract.test.ts +51 -0
- package/tests/bounded-stop-contract.test.ts +9 -1
- package/tests/branch-pr-skill.test.ts +10 -1
- package/tests/bundled-install.test.ts +1 -1
- package/tests/child-context-files.test.ts +64 -8
- package/tests/child-skills-catalog.test.ts +56 -0
- package/tests/codemode-rendering.test.ts +4 -1
- package/tests/delegate-for-reason-contract.test.ts +30 -8
- package/tests/delivery-conflict-markers.test.ts +348 -0
- package/tests/design-canvas-all-sizes.test.ts +631 -0
- package/tests/design-canvas-allowlist.test.ts +32 -0
- package/tests/design-canvas-assets.test.ts +11 -878
- package/tests/design-canvas-boards.test.ts +77 -0
- package/tests/design-canvas-checks.test.ts +655 -0
- package/tests/design-canvas-compare.test.ts +79 -0
- package/tests/design-canvas-events.test.ts +59 -0
- package/tests/design-canvas-export.test.ts +1168 -0
- package/tests/design-canvas-focus.test.ts +113 -0
- package/tests/design-canvas-handoffs.test.ts +59 -0
- package/tests/design-canvas-i18n-review.test.ts +513 -0
- package/tests/design-canvas-i18n-views.test.ts +259 -0
- package/tests/design-canvas-i18n.test.ts +526 -0
- package/tests/design-canvas-inspector.test.ts +937 -0
- package/tests/design-canvas-layout.test.ts +1222 -0
- package/tests/design-canvas-minimap.test.ts +413 -0
- package/tests/design-canvas-modules.test.ts +90 -0
- package/tests/design-canvas-parts.test.ts +721 -0
- package/tests/design-canvas-rail.test.ts +799 -0
- package/tests/design-canvas-server.test.ts +855 -17
- package/tests/design-canvas-sizes.test.ts +548 -0
- package/tests/design-canvas-store.test.ts +180 -0
- package/tests/design-canvas-tokens.test.ts +965 -0
- package/tests/design-canvas-view.test.ts +299 -0
- package/tests/design-comments.test.ts +201 -1
- package/tests/design-handoffs.test.ts +20 -0
- package/tests/design-layout.test.ts +100 -0
- package/tests/design-parts.test.ts +260 -0
- package/tests/design-system-tokens.test.ts +215 -0
- package/tests/desktop-rpc-agents.test.ts +893 -0
- package/tests/desktop-rpc-config.test.ts +1452 -0
- package/tests/desktop-rpc-design.test.ts +662 -0
- package/tests/desktop-rpc-jobs.test.ts +796 -0
- package/tests/desktop-rpc-permissions.test.ts +311 -0
- package/tests/desktop-rpc-profiles.test.ts +140 -0
- package/tests/desktop-rpc-safety.test.ts +119 -0
- package/tests/desktop-rpc-usage.test.ts +697 -0
- package/tests/desktop-rpc.test.ts +252 -0
- package/tests/devbinary/pi-host-relay.devtest.ts +149 -80
- package/tests/devbinary/review-session-consent.devtest.ts +84 -0
- package/tests/engram-safety.test.ts +111 -0
- package/tests/fixtures/devbinary/status-v9-escalated-non-blocking.captured.json +92 -0
- package/tests/fixtures/devbinary/status-v9-escalated-non-blocking.provenance.md +3 -0
- package/tests/fixtures/primary-session-prompt/gentleman.golden.md +20 -29
- package/tests/fixtures/refusal-identity.probe.mjs +139 -0
- package/tests/full-delegation-closure.test.ts +29 -0
- package/tests/gentle-agents.test.ts +329 -4
- package/tests/gentle-ai-binary.test.ts +1 -1
- package/tests/gentle-ai-child-guards.test.ts +1 -0
- package/tests/gentle-ai-installer.test.ts +52 -51
- package/tests/gentle-ai-renderer.test.ts +36 -2
- package/tests/gentle-ai.test.ts +121 -6
- package/tests/gentle-design.test.ts +365 -1
- package/tests/gentle-shell-bundled.test.ts +91 -5
- package/tests/gentle-shell-launcher.test.ts +1 -1
- package/tests/gentle-shell.test.ts +118 -87
- package/tests/gentle-todo.test.ts +32 -9
- package/tests/hidden-tools.test.ts +188 -0
- package/tests/independent-recovery-delivery.test.ts +19 -5
- package/tests/inprocess-reviewer.test.ts +73 -0
- package/tests/install-wizard.test.ts +27 -1
- package/tests/installer-downloads.test.ts +30 -1
- package/tests/installer-posix-bootstrap.test.ts +114 -13
- package/tests/installer-preflight.test.ts +49 -1
- package/tests/installer-probes.test.ts +146 -0
- package/tests/installer-server.test.ts +203 -4
- package/tests/installer-windows-bootstrap.test.ts +19 -1
- package/tests/judgment-day-severity-admission.test.ts +46 -0
- package/tests/lazy-module-contradictions-contract.test.ts +158 -0
- package/tests/maintainer/desktop-rpc.maintest.ts +632 -0
- package/tests/maintainer/pi-update-source.maintest.ts +48 -18
- package/tests/model-fallback-policy.test.ts +26 -7
- package/tests/nan-provider-runtime.test.ts +17 -3
- package/tests/nan-provider.test.ts +111 -56
- package/tests/native-review-capability-contract.test.ts +11 -1
- package/tests/native-review-cli-nonblocking-findings.test.ts +165 -0
- package/tests/native-review-parity.test.ts +24 -5
- package/tests/native-review-refusal-identity.test.ts +25 -0
- package/tests/no-self-pause-contract.test.ts +11 -3
- package/tests/odd-integration.test.ts +11 -3
- package/tests/odd-routing-contract.test.ts +80 -28
- package/tests/orchestrator-budget.test.ts +30 -5
- package/tests/orchestrator-consultation-sdk.test.ts +32 -6
- package/tests/orchestrator-delegation-mode.test.ts +2 -1
- package/tests/orchestrator-discovery.test.ts +28 -0
- package/tests/orchestrator-prompt-budget.test.ts +11 -2
- package/tests/orchestrator-prompt-diet-contract.test.ts +221 -0
- package/tests/orchestrator-rdd-ownership.test.ts +2 -1
- package/tests/orchestrator-work-search.test.ts +4 -2
- package/tests/package-files.test.ts +25 -1
- package/tests/package-manifest.test.ts +11 -10
- package/tests/parallel-reason-contract.test.ts +6 -3
- package/tests/permission-allowlist.test.ts +200 -30
- package/tests/persona-neutral-voseo.test.ts +4 -4
- package/tests/persona-reply-language.test.ts +1 -1
- package/tests/persona-single-channel.test.ts +13 -5
- package/tests/pi-update-launcher.test.ts +17 -7
- package/tests/pi-update-source.test.ts +113 -6
- package/tests/pi-update.test.ts +294 -19
- package/tests/pnpm-workspace-policy.test.ts +47 -0
- package/tests/primary-context-files.test.ts +233 -0
- package/tests/primary-context-three-files.test.ts +174 -0
- package/tests/provider-defect-handoff.test.ts +9 -2
- package/tests/rdd-aware-verification-contract.test.ts +1 -1
- package/tests/rdd-status-line.test.ts +94 -1
- package/tests/reply-language-anchor-placement.test.ts +184 -0
- package/tests/reply-language-anchor.test.ts +17 -1
- package/tests/request-context-append-only.test.ts +218 -0
- package/tests/request-context-placement.test.ts +148 -0
- package/tests/review-agent-end-preflight.test.ts +79 -1
- package/tests/review-candidate-view.test.ts +65 -0
- package/tests/review-continuation-registry.test.ts +31 -0
- package/tests/review-contract-prompt.test.ts +1 -1
- package/tests/review-controller.test.ts +2 -1
- package/tests/review-coordinator-correction-gate.test.ts +105 -0
- package/tests/review-coordinator-findings.test.ts +206 -0
- package/tests/review-coordinator-nonblocking-scope.test.ts +169 -0
- package/tests/review-coordinator.test.ts +271 -4
- package/tests/review-delivery-preflight.test.ts +462 -0
- package/tests/review-due-compaction.test.ts +31 -0
- package/tests/review-due-public-boundary.test.ts +26 -0
- package/tests/review-integration-nonblocking-findings.test.ts +108 -0
- package/tests/review-json-arguments.test.ts +41 -2
- package/tests/review-ledger-contract.test.ts +19 -40
- package/tests/review-loadout-rdd-off-sdk.test.ts +30 -1
- package/tests/review-one-call-findings.test.ts +131 -0
- package/tests/review-one-call-followups.test.ts +308 -0
- package/tests/review-one-call-reviewer-requests.test.ts +207 -0
- package/tests/review-one-call.test.ts +452 -0
- package/tests/review-relay-transport-agent.test.ts +28 -1
- package/tests/review-reviewer-evidence.test.ts +41 -1
- package/tests/review-risk-assessment.test.ts +52 -5
- package/tests/review-run-statement-guidance-independent.test.ts +54 -0
- package/tests/review-session-standing-permission-controller.test.ts +32 -2
- package/tests/review-tool-prose-budget.test.ts +1 -0
- package/tests/reviewer-stream.test.ts +149 -0
- package/tests/session-profile-extension.test.ts +2 -2
- package/tests/shell-prompt.test.ts +17 -0
- package/tests/shell-usage.test.ts +59 -10
- package/tests/skill-contradictions-contract.test.ts +122 -0
- package/tests/skill-registry-watcher.test.ts +216 -2
- package/tests/skill-registry.test.ts +929 -306
- package/tests/support/design-canvas-dom.ts +369 -0
- package/tests/support/review-coordinator-runtime.ts +212 -17
- package/tests/task-size-routing-contract.test.ts +42 -11
- package/tests/test-strength-contract.test.ts +2 -1
- package/tests/todo-request-append-only.test.ts +214 -0
- package/tests/tool-batching-contract.test.ts +3 -1
- package/tests/update-agent-body-history.test.ts +138 -0
- package/tests/verification-tiers-contract.test.ts +229 -0
- package/tests/verifier-preparation.test.ts +229 -0
- package/tests/verify-agent-contract.test.ts +20 -2
- package/tests/verify-first-launch-contract.test.ts +87 -11
- package/tests/vim-editor-adapter.test.ts +2 -2
- package/tests/work-continuity-contract.test.ts +54 -11
- package/tests/writer-admission-messages.test.ts +232 -0
- package/tests/writer-batch-admission.test.ts +66 -0
- package/tests/writer-edit-surface-scope.test.ts +52 -20
- package/tests/writer-feature-document-admission.test.ts +184 -0
- package/tests/yolo-mode.test.ts +39 -0
- package/skills/_shared/review-ledger-contract.md +0 -106
- /package/contracts/review-provider-contract-mirror/{v1.4.0 → v1.5.0}/bundle/README.md +0 -0
- /package/contracts/review-provider-contract-mirror/{v1.4.0 → v1.5.0}/bundle/schemas/lens.schema.json +0 -0
- /package/contracts/review-provider-contract-mirror/{v1.4.0 → v1.5.0}/bundle/schemas/refuter.schema.json +0 -0
- /package/contracts/review-provider-contract-mirror/{v1.4.0 → v1.5.0}/bundle/schemas/targeted-validator.schema.json +0 -0
- /package/contracts/review-provider-contract-mirror/{v1.4.0 → v1.5.0}/bundle/vectors/lens.json +0 -0
- /package/contracts/review-provider-contract-mirror/{v1.4.0 → v1.5.0}/bundle/vectors/refuter.json +0 -0
- /package/contracts/review-provider-contract-mirror/{v1.4.0 → v1.5.0}/bundle/vectors/targeted-validator.json +0 -0
|
@@ -7,11 +7,17 @@ import { __testing } from "../extensions/gentle-ai.ts";
|
|
|
7
7
|
|
|
8
8
|
const { confirmCommand, evaluateGuardedCommand, loadRuntimeGuardrailsConfig, saveGuardedCommandAllowAlways } = __testing as {
|
|
9
9
|
confirmCommand: (command: string, ctx: unknown, events: unknown, herdrLifecycle: unknown, yoloActive?: boolean, autoGate?: unknown, superActive?: boolean) => Promise<{ block: true; reason: string } | undefined>;
|
|
10
|
-
evaluateGuardedCommand: (command: string, config: { autonomousMode: boolean; guardedCommands: Record<string, string> }) => { action: string; dataLoss?: boolean; key?: string };
|
|
11
|
-
loadRuntimeGuardrailsConfig: (cwd: string, options?: { gentlePiConfigHome?: string }) => { autonomousMode: boolean; guardedCommands: Record<string, string> };
|
|
12
|
-
saveGuardedCommandAllowAlways: (key: string, options?: { gentlePiConfigHome?: string }) => boolean;
|
|
10
|
+
evaluateGuardedCommand: (command: string, config: { autonomousMode: boolean; guardedCommands: Record<string, string>; guardedCommandVariants?: Record<string, string> }) => { action: string; dataLoss?: boolean; key?: string };
|
|
11
|
+
loadRuntimeGuardrailsConfig: (cwd: string, options?: { gentlePiConfigHome?: string }) => { autonomousMode: boolean; guardedCommands: Record<string, string>; guardedCommandVariants?: Record<string, string> };
|
|
12
|
+
saveGuardedCommandAllowAlways: (key: string, options?: { gentlePiConfigHome?: string }, variant?: string) => boolean;
|
|
13
13
|
};
|
|
14
14
|
|
|
15
|
+
interface StoredConfig {
|
|
16
|
+
autonomousMode?: boolean;
|
|
17
|
+
guardedCommands?: Record<string, string>;
|
|
18
|
+
guardedCommandVariants?: Record<string, string>;
|
|
19
|
+
}
|
|
20
|
+
|
|
15
21
|
interface Harness {
|
|
16
22
|
home: string;
|
|
17
23
|
pendingSelection: string | undefined;
|
|
@@ -74,6 +80,10 @@ function makeHarness(): Harness {
|
|
|
74
80
|
return harness;
|
|
75
81
|
}
|
|
76
82
|
|
|
83
|
+
function readStoredConfig(home: string): StoredConfig {
|
|
84
|
+
return JSON.parse(readFileSync(join(home, "runtime-guardrails.json"), "utf8")) as StoredConfig;
|
|
85
|
+
}
|
|
86
|
+
|
|
77
87
|
test("normal-mode confirmation dialog offers once, session and always scopes", async () => {
|
|
78
88
|
const harness = makeHarness();
|
|
79
89
|
harness.setConfigHome();
|
|
@@ -88,29 +98,171 @@ test("normal-mode confirmation dialog offers once, session and always scopes", a
|
|
|
88
98
|
} finally { harness.restoreConfigHome(); rmSync(harness.home, { recursive: true, force: true }); }
|
|
89
99
|
});
|
|
90
100
|
|
|
91
|
-
test("
|
|
101
|
+
test("a session push approval covers different remote, branch and refspec operands", async () => {
|
|
92
102
|
const harness = makeHarness();
|
|
93
103
|
harness.setConfigHome();
|
|
94
104
|
try {
|
|
95
|
-
const manager = { id: "
|
|
96
|
-
harness.selectWith("Allow
|
|
97
|
-
assert.equal(await harness.run("git push origin main", manager), undefined);
|
|
105
|
+
const manager = { id: "s1" };
|
|
106
|
+
harness.selectWith("Allow for this session");
|
|
98
107
|
assert.equal(await harness.run("git push origin main", manager), undefined);
|
|
99
|
-
assert.equal(harness.selectCalls.length,
|
|
108
|
+
assert.equal(harness.selectCalls.length, 1);
|
|
109
|
+
for (const command of ["git push origin feature-branch", "git push upstream main:release", "git push origin HEAD"]) {
|
|
110
|
+
assert.equal(await harness.run(command, manager), undefined, command);
|
|
111
|
+
}
|
|
112
|
+
assert.equal(harness.selectCalls.length, 1, "varying push operands never reopen the dialog");
|
|
113
|
+
harness.selectWith("Deny");
|
|
114
|
+
assert.ok((await harness.run("git push origin feature-branch", { id: "s2" }))?.block);
|
|
115
|
+
assert.equal(harness.selectCalls.length, 2, "a different session never inherits the grant");
|
|
116
|
+
} finally { harness.restoreConfigHome(); rmSync(harness.home, { recursive: true, force: true }); }
|
|
117
|
+
});
|
|
100
118
|
|
|
101
|
-
|
|
119
|
+
test("a git -C push shares the plain variant across operands in one session", async () => {
|
|
120
|
+
const harness = makeHarness();
|
|
121
|
+
harness.setConfigHome();
|
|
122
|
+
try {
|
|
123
|
+
const original = "git -C /home/ricardo/Trabajo/IAI/gentle-companion push origin feat/upstream-v0.4.2-01-integration:refs/heads/feat/upstream-v0.4.2-01-integration";
|
|
124
|
+
const changed = "git -C /home/ricardo/Trabajo/IAI/gentle-companion push origin feat/upstream-v0.4.2-02-next:refs/heads/feat/upstream-v0.4.2-02-next";
|
|
125
|
+
const otherDirectory = "git -C /tmp/other-repo push origin main:release";
|
|
126
|
+
const manager = { id: "wc1" };
|
|
102
127
|
harness.selectWith("Allow for this session");
|
|
103
|
-
assert.equal(await harness.run(
|
|
104
|
-
assert.equal(await harness.run(
|
|
128
|
+
assert.equal(await harness.run(original, manager), undefined);
|
|
129
|
+
assert.equal(await harness.run(changed, manager), undefined, "a changed branch and refspec share the -C plain variant");
|
|
130
|
+
assert.equal(await harness.run(otherDirectory, manager), undefined, "the -C directory is not part of the identity");
|
|
131
|
+
assert.equal(harness.selectCalls.length, 1);
|
|
132
|
+
harness.selectWith("Deny");
|
|
133
|
+
assert.ok((await harness.run(changed, { id: "wc2" }))?.block);
|
|
134
|
+
assert.equal(harness.selectCalls.length, 2, "another session does not inherit the grant");
|
|
135
|
+
} finally { harness.restoreConfigHome(); rmSync(harness.home, { recursive: true, force: true }); }
|
|
136
|
+
});
|
|
137
|
+
|
|
138
|
+
test("a git -C plain Always persists and reloads in a new session", async () => {
|
|
139
|
+
const harness = makeHarness();
|
|
140
|
+
harness.setConfigHome();
|
|
141
|
+
try {
|
|
142
|
+
const original = "git -C /home/ricardo/Trabajo/IAI/gentle-companion push origin feat/upstream-v0.4.2-01-integration:refs/heads/feat/upstream-v0.4.2-01-integration";
|
|
143
|
+
const changed = "git -C /home/ricardo/Trabajo/IAI/gentle-companion push origin feat/upstream-v0.4.2-02-next:refs/heads/feat/upstream-v0.4.2-02-next";
|
|
144
|
+
harness.selectWith("Always allow git push");
|
|
145
|
+
assert.equal(await harness.run(original, { id: "wp1" }), undefined);
|
|
146
|
+
assert.deepEqual(readStoredConfig(harness.home).guardedCommandVariants, { "gitPush:plain": "allow" });
|
|
147
|
+
assert.equal(loadRuntimeGuardrailsConfig(harness.home).guardedCommandVariants?.["gitPush:plain"], "allow");
|
|
148
|
+
const next = { id: "wp2" };
|
|
149
|
+
assert.equal(await harness.run(changed, next), undefined);
|
|
150
|
+
harness.selectWith("Deny");
|
|
151
|
+
assert.ok((await harness.run("git -C /home/ricardo/Trabajo/IAI/gentle-companion push --delete origin old", next))?.block);
|
|
152
|
+
assert.ok((await harness.run("git -C /home/ricardo/Trabajo/IAI/gentle-companion push --mirror origin", next))?.block);
|
|
105
153
|
assert.equal(harness.selectCalls.length, 3);
|
|
106
|
-
|
|
154
|
+
} finally { harness.restoreConfigHome(); rmSync(harness.home, { recursive: true, force: true }); }
|
|
155
|
+
});
|
|
156
|
+
|
|
157
|
+
test("session push grants are isolated by delete, mirror and force variants", async () => {
|
|
158
|
+
const harness = makeHarness();
|
|
159
|
+
harness.setConfigHome();
|
|
160
|
+
try {
|
|
161
|
+
const manager = { id: "v1" };
|
|
107
162
|
harness.selectWith("Allow for this session");
|
|
108
|
-
assert.equal(await harness.run("git push origin
|
|
163
|
+
assert.equal(await harness.run("git push origin main", manager), undefined);
|
|
164
|
+
harness.selectWith("Allow for this session");
|
|
165
|
+
assert.equal(await harness.run("git push --delete origin old", manager), undefined);
|
|
166
|
+
assert.equal(await harness.run("git push origin next", manager), undefined, "plain stays covered by its own grant");
|
|
167
|
+
assert.equal(await harness.run("git push -d origin older", manager), undefined, "-d shares the delete variant");
|
|
168
|
+
assert.equal(harness.selectCalls.length, 2);
|
|
169
|
+
harness.selectWith("Allow for this session");
|
|
170
|
+
assert.equal(await harness.run("git push --mirror origin", manager), undefined);
|
|
171
|
+
assert.equal(harness.selectCalls.length, 3);
|
|
172
|
+
harness.selectWith("Deny");
|
|
173
|
+
assert.equal(await harness.run("git push origin main", manager), undefined, "plain is still granted");
|
|
174
|
+
assert.ok((await harness.run("git push origin +main", manager))?.block, "a force refspec does not inherit plain");
|
|
109
175
|
assert.equal(harness.selectCalls.length, 4);
|
|
110
|
-
//
|
|
176
|
+
// Reverse direction: delete never grants plain.
|
|
177
|
+
const reverse = { id: "v2" };
|
|
178
|
+
harness.selectWith("Allow for this session");
|
|
179
|
+
assert.equal(await harness.run("git push --delete origin gone", reverse), undefined);
|
|
180
|
+
harness.selectWith("Allow for this session");
|
|
181
|
+
assert.equal(await harness.run("git push origin main", reverse), undefined);
|
|
182
|
+
assert.equal(harness.selectCalls.length, 6);
|
|
183
|
+
} finally { harness.restoreConfigHome(); rmSync(harness.home, { recursive: true, force: true }); }
|
|
184
|
+
});
|
|
185
|
+
|
|
186
|
+
test("always allow persists a plain push variant and reloads in a new session", async () => {
|
|
187
|
+
const harness = makeHarness();
|
|
188
|
+
harness.setConfigHome();
|
|
189
|
+
try {
|
|
190
|
+
harness.selectWith("Always allow git push");
|
|
191
|
+
assert.equal(await harness.run("git push origin main", { id: "p1" }), undefined);
|
|
192
|
+
const saved = readStoredConfig(harness.home);
|
|
193
|
+
assert.equal(saved.guardedCommandVariants?.["gitPush:plain"], "allow");
|
|
194
|
+
assert.equal(saved.guardedCommands?.gitPush, undefined, "a variant decision never writes the broad key");
|
|
195
|
+
const reloaded = loadRuntimeGuardrailsConfig(harness.home);
|
|
196
|
+
assert.equal(evaluateGuardedCommand("git push origin any-branch", reloaded).action, "allow");
|
|
197
|
+
assert.equal(evaluateGuardedCommand("git push --delete origin gone", reloaded).action, "confirm");
|
|
198
|
+
assert.equal(evaluateGuardedCommand("git push --mirror origin", reloaded).action, "confirm");
|
|
199
|
+
// New session after the persistent decision: same variant runs, others ask.
|
|
200
|
+
const next = { id: "p2" };
|
|
201
|
+
assert.equal(await harness.run("git push origin feature-x", next), undefined);
|
|
202
|
+
assert.equal(harness.selectCalls.length, 1);
|
|
203
|
+
harness.selectWith("Deny");
|
|
204
|
+
assert.ok((await harness.run("git push --delete origin old", next))?.block);
|
|
205
|
+
assert.ok((await harness.run("git push --mirror origin", next))?.block);
|
|
206
|
+
assert.equal(harness.selectCalls.length, 3);
|
|
207
|
+
// A compound command does not inherit the persistent plain grant and offers no Always.
|
|
208
|
+
assert.ok((await harness.run("git push origin main && echo ok", next))?.block);
|
|
209
|
+
assert.deepEqual(harness.selectCalls[3].choices, ["Allow once", "Allow for this session", "Deny"]);
|
|
210
|
+
} finally { harness.restoreConfigHome(); rmSync(harness.home, { recursive: true, force: true }); }
|
|
211
|
+
});
|
|
212
|
+
|
|
213
|
+
test("always allow --delete persists only the delete variant", async () => {
|
|
214
|
+
const harness = makeHarness();
|
|
215
|
+
harness.setConfigHome();
|
|
216
|
+
try {
|
|
217
|
+
harness.selectWith("Always allow git push --delete");
|
|
218
|
+
assert.equal(await harness.run("git push --delete origin old", { id: "d1" }), undefined);
|
|
219
|
+
const saved = readStoredConfig(harness.home);
|
|
220
|
+
assert.equal(saved.guardedCommandVariants?.["gitPush:--delete"], "allow");
|
|
221
|
+
assert.equal(saved.guardedCommandVariants?.["gitPush:plain"], undefined);
|
|
222
|
+
const next = { id: "d2" };
|
|
223
|
+
assert.equal(await harness.run("git push -d origin older", next), undefined);
|
|
224
|
+
assert.equal(harness.selectCalls.length, 1);
|
|
225
|
+
harness.selectWith("Deny");
|
|
226
|
+
assert.ok((await harness.run("git push origin main", next))?.block);
|
|
227
|
+
assert.ok((await harness.run("git push --mirror origin", next))?.block);
|
|
228
|
+
assert.equal(harness.selectCalls.length, 3);
|
|
229
|
+
} finally { harness.restoreConfigHome(); rmSync(harness.home, { recursive: true, force: true }); }
|
|
230
|
+
});
|
|
231
|
+
|
|
232
|
+
test("force variants stay hard-blocked and plain grants never cover a force refspec", async () => {
|
|
233
|
+
const harness = makeHarness();
|
|
234
|
+
harness.setConfigHome();
|
|
235
|
+
try {
|
|
236
|
+
const manager = { id: "f1" };
|
|
237
|
+
for (const command of ["git push -f origin main", "git push --force origin main", "git push --force-with-lease origin main", "git push -uf origin main", "git -C /tmp/repo push -f origin main"]) {
|
|
238
|
+
const result = await harness.run(command, manager);
|
|
239
|
+
assert.ok(result?.block, command);
|
|
240
|
+
assert.match(result.reason, /blocked a destructive/);
|
|
241
|
+
}
|
|
242
|
+
assert.equal(harness.selectCalls.length, 0, "hard denies never open a dialog");
|
|
243
|
+
harness.selectWith("Allow for this session");
|
|
244
|
+
assert.equal(await harness.run("git push origin main", manager), undefined);
|
|
245
|
+
harness.selectWith("Deny");
|
|
246
|
+
assert.ok((await harness.run("git push origin +main", manager))?.block, "force refspec is its own variant");
|
|
247
|
+
assert.equal(harness.selectCalls.length, 2);
|
|
248
|
+
assert.ok((await harness.run("git push -f origin main", manager))?.block);
|
|
249
|
+
assert.equal(harness.selectCalls.length, 2, "plain or force-refspec approval never enables -f");
|
|
250
|
+
} finally { harness.restoreConfigHome(); rmSync(harness.home, { recursive: true, force: true }); }
|
|
251
|
+
});
|
|
252
|
+
|
|
253
|
+
test("compounds never inherit a simple push grant", async () => {
|
|
254
|
+
const harness = makeHarness();
|
|
255
|
+
harness.setConfigHome();
|
|
256
|
+
try {
|
|
257
|
+
const manager = { id: "c1" };
|
|
111
258
|
harness.selectWith("Allow for this session");
|
|
112
|
-
assert.equal(await harness.run("git push origin main
|
|
113
|
-
assert.
|
|
259
|
+
assert.equal(await harness.run("git push origin main && echo ok", manager), undefined);
|
|
260
|
+
assert.deepEqual(harness.selectCalls[0].choices, ["Allow once", "Allow for this session", "Deny"], "a compound push offers no Always scope");
|
|
261
|
+
assert.equal(await harness.run("git push origin main && echo ok", manager), undefined);
|
|
262
|
+
assert.equal(harness.selectCalls.length, 1, "the exact compound may be remembered");
|
|
263
|
+
harness.selectWith("Deny");
|
|
264
|
+
assert.ok((await harness.run("git push origin main", manager))?.block, "the compound grant never covers a lone push");
|
|
265
|
+
assert.equal(harness.selectCalls.length, 2);
|
|
114
266
|
} finally { harness.restoreConfigHome(); rmSync(harness.home, { recursive: true, force: true }); }
|
|
115
267
|
});
|
|
116
268
|
|
|
@@ -139,32 +291,48 @@ test("data-loss commands never offer an always-allow scope", async () => {
|
|
|
139
291
|
const { choices } = harness.selectCalls[0];
|
|
140
292
|
assert.ok(choices.includes("Allow for this session"));
|
|
141
293
|
assert.ok(!choices.some(choice => choice.startsWith("Always allow")));
|
|
142
|
-
// The exact approved command asks no more this session.
|
|
143
294
|
assert.equal(await harness.run("rm -rf data", manager), undefined);
|
|
144
295
|
assert.equal(harness.selectCalls.length, 1);
|
|
145
296
|
} finally { harness.restoreConfigHome(); rmSync(harness.home, { recursive: true, force: true }); }
|
|
146
297
|
});
|
|
147
298
|
|
|
148
|
-
test("always allow
|
|
299
|
+
test("always allow for a non-push guard keeps its broad persisted key", async () => {
|
|
149
300
|
const harness = makeHarness();
|
|
150
301
|
harness.setConfigHome();
|
|
151
302
|
try {
|
|
152
|
-
|
|
153
|
-
harness.
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
assert.
|
|
157
|
-
|
|
158
|
-
assert.equal(saved.guardedCommands.gitPush, "allow");
|
|
159
|
-
// The persisted allow short-circuits evaluation in normal mode.
|
|
160
|
-
const evaluation = evaluateGuardedCommand("git push origin main", loadRuntimeGuardrailsConfig(harness.home));
|
|
161
|
-
assert.equal(evaluation.action, "allow");
|
|
162
|
-
// A brand-new session with the same command runs without any dialog.
|
|
163
|
-
assert.equal(await harness.run("git push origin main", { id: "m8" }), undefined);
|
|
303
|
+
harness.selectWith("Always allow npm publish");
|
|
304
|
+
assert.equal(await harness.run("npm publish --tag beta", { id: "n1" }), undefined);
|
|
305
|
+
const saved = readStoredConfig(harness.home);
|
|
306
|
+
assert.equal(saved.guardedCommands?.npmPublish, "allow");
|
|
307
|
+
assert.equal(saved.guardedCommandVariants, undefined);
|
|
308
|
+
assert.equal(await harness.run("npm publish", { id: "n2" }), undefined);
|
|
164
309
|
assert.equal(harness.selectCalls.length, 1);
|
|
165
310
|
} finally { harness.restoreConfigHome(); rmSync(harness.home, { recursive: true, force: true }); }
|
|
166
311
|
});
|
|
167
312
|
|
|
313
|
+
test("invalid variant config entries are ignored", () => {
|
|
314
|
+
const home = mkdtempSync(join(tmpdir(), "permission-allowlist-invalid-"));
|
|
315
|
+
try {
|
|
316
|
+
writeFileSync(join(home, "runtime-guardrails.json"), JSON.stringify({
|
|
317
|
+
autonomousMode: false,
|
|
318
|
+
guardedCommands: {},
|
|
319
|
+
guardedCommandVariants: {
|
|
320
|
+
"gitPush:plain": "yes",
|
|
321
|
+
"gitPush:--tags": "allow",
|
|
322
|
+
"gitPush:--delete": "allow",
|
|
323
|
+
"gitPush:--mirror": "block",
|
|
324
|
+
"gitPush:--force": "confirm",
|
|
325
|
+
},
|
|
326
|
+
}));
|
|
327
|
+
const config = loadRuntimeGuardrailsConfig(home, { gentlePiConfigHome: home });
|
|
328
|
+
assert.deepEqual(config.guardedCommandVariants, { "gitPush:--delete": "allow" }, "only allow entries are honored");
|
|
329
|
+
assert.equal(evaluateGuardedCommand("git push origin main", config).action, "confirm");
|
|
330
|
+
assert.equal(evaluateGuardedCommand("git push --delete origin old", config).action, "allow");
|
|
331
|
+
assert.equal(evaluateGuardedCommand("git push --mirror origin", config).action, "confirm");
|
|
332
|
+
assert.equal(evaluateGuardedCommand("git push origin +main", config).action, "confirm");
|
|
333
|
+
} finally { rmSync(home, { recursive: true, force: true }); }
|
|
334
|
+
});
|
|
335
|
+
|
|
168
336
|
test("saveGuardedCommandAllowAlways refuses to rewrite a malformed config", () => {
|
|
169
337
|
const home = mkdtempSync(join(tmpdir(), "permission-allowlist-malformed-"));
|
|
170
338
|
try {
|
|
@@ -197,6 +365,8 @@ test("normal mode keeps confirm default and honors explicit allow from user conf
|
|
|
197
365
|
assert.equal(evaluateGuardedCommand("git rebase main", config).action, "confirm");
|
|
198
366
|
const allowConfig = { autonomousMode: false, guardedCommands: { gitPush: "allow" } };
|
|
199
367
|
assert.equal(evaluateGuardedCommand("git push origin main", allowConfig).action, "allow");
|
|
368
|
+
assert.equal(evaluateGuardedCommand("git push --delete origin old", allowConfig).action, "allow", "an existing broad allow keeps its historical meaning");
|
|
369
|
+
assert.equal(evaluateGuardedCommand("git push --mirror origin", allowConfig).action, "allow");
|
|
200
370
|
const confirmConfig = { autonomousMode: false, guardedCommands: { gitPush: "confirm" } };
|
|
201
371
|
assert.equal(evaluateGuardedCommand("git push origin main", confirmConfig).action, "confirm");
|
|
202
372
|
});
|
|
@@ -106,14 +106,14 @@ test("neutral and gentleman modes produce different language-boundary text", ()
|
|
|
106
106
|
// Neutral must not include a positive instruction to use Rioplatense
|
|
107
107
|
assert.doesNotMatch(
|
|
108
108
|
neutralPrompt,
|
|
109
|
-
/
|
|
109
|
+
/answer in natural Rioplatense/i,
|
|
110
110
|
"neutral prompt must not contain positive 'natural Rioplatense' language instruction",
|
|
111
111
|
);
|
|
112
112
|
|
|
113
|
-
// Gentleman must contain the Rioplatense instruction
|
|
113
|
+
// Gentleman must contain the Rioplatense instruction (P14 PD-57: once, in the persona bullet)
|
|
114
114
|
assert.match(
|
|
115
115
|
gentlemanPrompt,
|
|
116
|
-
/
|
|
117
|
-
"gentleman prompt must contain
|
|
116
|
+
/When the user writes Spanish, answer in natural Rioplatense Spanish with voseo\./,
|
|
117
|
+
"gentleman prompt must contain the natural Rioplatense persona instruction",
|
|
118
118
|
);
|
|
119
119
|
});
|
|
@@ -56,6 +56,6 @@ test("[neutral] the voseo prohibition covers regular and irregular forms, not on
|
|
|
56
56
|
test("[gentleman] Spanish replies keep Rioplatense voseo and get no neutral-only rule", () => {
|
|
57
57
|
const prompt = __testing.buildGentlePrompt("gentleman");
|
|
58
58
|
assert.match(prompt, /When the user writes Spanish, answer in natural Rioplatense Spanish with voseo\./);
|
|
59
|
-
assert.
|
|
59
|
+
assert.ok(!prompt.includes("Language: natural Rioplatense"), "P14 PD-57: the persona bullet states the register once, with no second Language line");
|
|
60
60
|
assert.doesNotMatch(prompt, /never vos forms/, "gentleman prompt must not inherit the neutral voseo prohibition");
|
|
61
61
|
});
|
|
@@ -388,12 +388,19 @@ test("Table B rule: LB5 exceptions kept verbatim in orchestrator (unique)", () =
|
|
|
388
388
|
}
|
|
389
389
|
});
|
|
390
390
|
|
|
391
|
-
|
|
391
|
+
// cost-speed-painpoints S5 (T4): the one-line Identity Contract pointer was later dropped as a duplicate: the
|
|
392
|
+
// Language Boundary intro carries the same pointer to the identity/harness section in both workflow modes.
|
|
393
|
+
test("orchestrator.md no longer restates the Identity Contract pointer; the Language Boundary intro carries it in both modes", () => {
|
|
392
394
|
const raw = readOrchestratorMdRaw();
|
|
393
|
-
assert.ok(
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
395
|
+
assert.ok(!raw.includes(POST_ORCH_IDENTITY.trim()), "the duplicate Identity Contract pointer section must stay removed");
|
|
396
|
+
const pointer = "defined once in the identity/harness section above (its `Current persona mode:` line)";
|
|
397
|
+
for (const mode of ["organic", "full-delegation"] as const) {
|
|
398
|
+
for (const persona of ["gentleman", "neutral"] as const) {
|
|
399
|
+
const prompt = __testing.buildGentlePrompt(persona, undefined, undefined, undefined, undefined, mode);
|
|
400
|
+
assert.ok(prompt.includes(pointer), `[${mode}/${persona}] the identity/harness pointer must survive`);
|
|
401
|
+
assert.ok(prompt.includes("Identity contract:"), `[${mode}/${persona}] the wrapper identity contract must stay`);
|
|
402
|
+
}
|
|
403
|
+
}
|
|
397
404
|
});
|
|
398
405
|
|
|
399
406
|
test("orchestrator.md Language Boundary LB1 collapses to the one-line pointer; LB2-LB5 remain verbatim (post-change)", () => {
|
|
@@ -543,6 +550,7 @@ test("byte delta: wrapper Identity contract block grows by the measured delta (p
|
|
|
543
550
|
assert.equal(post - pre, WRAPPER_IDENTITY_DELTA_BYTES, "wrapper Identity block delta must be +379 B");
|
|
544
551
|
});
|
|
545
552
|
|
|
553
|
+
// Historical migration arithmetic over the frozen fixtures above; the section itself left orchestrator.md in S5 (T4).
|
|
546
554
|
test("byte delta: orchestrator.md Identity Contract shrinks to the measured pointer size (149 B, ±1 B of design's 148 B estimate)", () => {
|
|
547
555
|
const pre = Buffer.byteLength(PRE_ORCH_IDENTITY);
|
|
548
556
|
const post = Buffer.byteLength(POST_ORCH_IDENTITY);
|
|
@@ -51,6 +51,8 @@ function launch(args: string[], scenario = 'owned', piVersion = '1.2.0') {
|
|
|
51
51
|
run: async (cmd, args, options) => {
|
|
52
52
|
if(args.includes('list') || args.includes('ls')) return {code:0,stdout:${JSON.stringify(listing)}};
|
|
53
53
|
if(args.includes('--version')) return {code:0,stdout:'11.1.1'};
|
|
54
|
+
if(args.includes('view')) { const version = '${scenario === 'unstable' ? '1.3.0-rc.1' : '1.2.0'}'; return {code:0,stdout:args.includes('--json') ? JSON.stringify({name:'${PI}',version}) : version}; }
|
|
55
|
+
if(args.includes('config')) return {code:0,stdout:''};
|
|
54
56
|
console.log('MUTATION ' + JSON.stringify(args)); if (${source}) console.log('CWD ' + options.cwd); return {code:0};
|
|
55
57
|
}
|
|
56
58
|
};
|
|
@@ -61,11 +63,12 @@ function launch(args: string[], scenario = 'owned', piVersion = '1.2.0') {
|
|
|
61
63
|
for (const scenario of ['owned','adjacent','separate']) test(`public linked-store update succeeds for ${scenario}`, () => {
|
|
62
64
|
const result = launch(['update'], scenario);
|
|
63
65
|
assert.equal(result.status, 0, result.stderr);
|
|
64
|
-
assert.match(result.stdout, scenario === 'adjacent' ? /MUTATION \["add","-g","gentle-pi@4\.1\.0","--allow-build=gentle-pi"
|
|
66
|
+
assert.match(result.stdout, scenario === 'adjacent' ? /MUTATION \["add","-g","gentle-pi@4\.1\.0","--allow-build=gentle-pi",/ : /MUTATION \["add","-g","@earendil-works\/pi-coding-agent@1\.2\.0",/);
|
|
67
|
+
assert.match(result.stdout, /--config\.minimum-release-age-exclude=@earendil-works\/pi-coding-agent/);
|
|
65
68
|
assert.doesNotMatch(result.stdout, /FORWARD/);
|
|
66
|
-
// The fake manager changes nothing,
|
|
69
|
+
// The fake manager changes nothing, and the selected version matches latest.
|
|
67
70
|
assert.match(result.stdout, /the selected Pi is still 1\.2\.0\./);
|
|
68
|
-
assert.
|
|
71
|
+
assert.doesNotMatch(result.stdout, /minimumReleaseAge/);
|
|
69
72
|
assert.equal(result.stderr, '');
|
|
70
73
|
});
|
|
71
74
|
|
|
@@ -73,13 +76,13 @@ for (const all of [false, true]) test(`public source-linked update uses the chec
|
|
|
73
76
|
const result = launch(all ? ['update', '--all'] : ['update'], 'source');
|
|
74
77
|
assert.equal(result.status, 0, result.stderr);
|
|
75
78
|
assert.equal(result.stderr, '');
|
|
76
|
-
assert.match(result.stdout, /MUTATION \["
|
|
79
|
+
assert.match(result.stdout, /MUTATION \["install","@earendil-works\/pi-coding-agent@1\.2\.0","--no-save","--ignore-scripts","--global=false","--prefix","\/store\/shell-peer\/node_modules\/gentle-pi","--workspaces=false","--no-audit","--no-fund"\]/);
|
|
77
80
|
assert.match(result.stdout, /CWD \/store\/shell-peer\/node_modules\/gentle-pi/);
|
|
78
81
|
assert.doesNotMatch(result.stdout, /"-g"|@latest/);
|
|
79
82
|
assert.equal(result.stdout.includes('FORWARD ["update","--extensions"]'), all);
|
|
80
83
|
});
|
|
81
84
|
|
|
82
|
-
test('source-linked --latest
|
|
85
|
+
test('source-linked --latest remains an alias for the ordinary latest update', () => {
|
|
83
86
|
const normal = launch(['update'], 'source');
|
|
84
87
|
const latest = launch(['update', '--latest'], 'source');
|
|
85
88
|
assert.equal(latest.status, 0, latest.stderr);
|
|
@@ -90,7 +93,7 @@ test('source-linked --latest preserves the ordinary local, range-respecting plan
|
|
|
90
93
|
test('public all updates only its owner and then forwards extension updates', () => {
|
|
91
94
|
const result = launch(['update', '--all']);
|
|
92
95
|
assert.equal(result.status, 0, result.stderr);
|
|
93
|
-
assert.match(result.stdout, /MUTATION .*add.*@earendil-works\/pi-coding-agent@
|
|
96
|
+
assert.match(result.stdout, /MUTATION .*add.*@earendil-works\/pi-coding-agent@1\.2\.0/);
|
|
94
97
|
assert.match(result.stdout, /FORWARD \["update","--extensions"\]/);
|
|
95
98
|
assert.equal(result.stderr, '');
|
|
96
99
|
});
|
|
@@ -111,11 +114,18 @@ for (const scenario of ['ambiguous', 'malformed', 'npm-link', 'npm-file', 'share
|
|
|
111
114
|
assert.doesNotMatch(result.stdout + result.stderr, /MUTATION/);
|
|
112
115
|
});
|
|
113
116
|
|
|
117
|
+
test('public update rejects a prerelease latest tag before mutation', () => {
|
|
118
|
+
const result = launch(['update'], 'unstable');
|
|
119
|
+
assert.equal(result.status, 1);
|
|
120
|
+
assert.equal(result.stdout, '');
|
|
121
|
+
assert.equal(result.stderr, 'gentle-shell update: the latest published Pi version "1.3.0-rc.1" was rejected. No installation changed.\n');
|
|
122
|
+
});
|
|
123
|
+
|
|
114
124
|
// `update` is how an old Pi gets replaced, so the minimum-version gate must not block it.
|
|
115
125
|
test('public update replaces a Pi older than the required minimum', () => {
|
|
116
126
|
const result = launch(['update'], 'owned', '1.1.0');
|
|
117
127
|
assert.equal(result.status, 0, result.stderr);
|
|
118
|
-
assert.match(result.stdout, /MUTATION \["add","-g","@earendil-works\/pi-coding-agent@
|
|
128
|
+
assert.match(result.stdout, /MUTATION \["add","-g","@earendil-works\/pi-coding-agent@1\.2\.0",/);
|
|
119
129
|
assert.doesNotMatch(result.stdout + result.stderr, /older than the required minimum/);
|
|
120
130
|
assert.equal(result.stderr, '');
|
|
121
131
|
});
|
|
@@ -8,7 +8,7 @@ import { updateSelectedPi } from '../scripts/pi-update.mjs';
|
|
|
8
8
|
const PI = '@earendil-works/pi-coding-agent';
|
|
9
9
|
const CLI = 'dist/bundle/cli.js';
|
|
10
10
|
|
|
11
|
-
async function fixture(t: any, options: {manager?: string, locks?: string[], workspace?: boolean, range?: string, mismatch?: boolean, managerVersion?: string, fail?: boolean, unreadable?: boolean, unlink?: boolean, installedSource?: boolean, configOnly?: boolean, multipleProjects?: boolean} = {}) {
|
|
11
|
+
async function fixture(t: any, options: {manager?: string, locks?: string[], workspace?: boolean, range?: string, mismatch?: boolean, managerVersion?: string, fail?: boolean, unreadable?: boolean, unlink?: boolean, installedSource?: boolean, configOnly?: boolean, multipleProjects?: boolean, latest?: string, excludeOutput?: string, piDependencies?: Record<string, unknown>, manifestView?: {code: number, stdout: string}, siblingDependencies?: Record<string, Record<string, unknown>>} = {}) {
|
|
12
12
|
const temp = await fs.realpath(await fs.mkdtemp(join(tmpdir(), 'pi-source-')));
|
|
13
13
|
t.after(() => fs.rm(temp, {recursive: true, force: true}));
|
|
14
14
|
const root = join(temp, 'checkout');
|
|
@@ -48,11 +48,17 @@ async function fixture(t: any, options: {manager?: string, locks?: string[], wor
|
|
|
48
48
|
if (args.includes('list')) return {code: 0, stdout: JSON.stringify([{path: join(temp, 'pnpm'), dependencies: {}}])};
|
|
49
49
|
if (args.includes('ls')) return {code: 0, stdout: JSON.stringify({path: join(temp, 'global'), dependencies: {'gentle-pi': {path: link, resolved: 'file:../../checkout'}}})};
|
|
50
50
|
if (args.includes('--version')) return {code: 0, stdout: `${options.managerVersion ?? '11.1.1'}\n`};
|
|
51
|
-
|
|
51
|
+
// `view <Pi>@<version> --json` reads the selected version's published manifest.
|
|
52
|
+
const spec = args[args.indexOf('view') + 1] ?? '', at = spec.lastIndexOf('@');
|
|
53
|
+
// A Pi-scope sibling resolves only from siblingDependencies; any other lookup fails.
|
|
54
|
+
if (args.includes('view') && args.includes('--json') && spec.slice(0, at) !== PI) return options.siblingDependencies?.[spec] ? {code: 0, stdout: JSON.stringify({name: spec.slice(0, at), version: spec.slice(at + 1), dependencies: options.siblingDependencies[spec]})} : {code: 1, stdout: ''};
|
|
55
|
+
if (args.includes('view') && args.includes('--json')) return options.manifestView ?? {code: 0, stdout: JSON.stringify({name: PI, version: options.latest ?? '1.1.0', bin: {pi: CLI}, dependencies: options.piDependencies ?? {}})};
|
|
56
|
+
if (args.includes('view')) return {code: 0, stdout: `${options.latest ?? '1.1.0'}\n`};
|
|
57
|
+
if (args.includes('config')) return {code:0, stdout:args.includes('minimumReleaseAgeExclude') ? options.excludeOutput ?? '["existing-fixture"]\n' : options.workspace ? '["packages/*"]\n' : ''};
|
|
52
58
|
updates.push({command, args, cwd, ...(env ? {env} : {})});
|
|
53
59
|
if (options.fail) return {code: 1, stdout: '', stderrTail: 'npm error fixture install failed'};
|
|
54
60
|
if (options.unreadable) await fs.rm(join(peer, 'package.json'));
|
|
55
|
-
else await fs.writeFile(join(peer, 'package.json'), JSON.stringify({name: PI, version: '1.1.0', bin: {pi: CLI}}));
|
|
61
|
+
else await fs.writeFile(join(peer, 'package.json'), JSON.stringify({name: PI, version: options.latest ?? '1.1.0', bin: {pi: CLI}}));
|
|
56
62
|
if (options.unlink) await fs.unlink(link);
|
|
57
63
|
return {code: 0, stdout: ''};
|
|
58
64
|
},
|
|
@@ -70,7 +76,7 @@ for (const manager of ['pnpm', 'npm']) test(`source-linked Shell updates only it
|
|
|
70
76
|
const f = await fixture(t, {manager});
|
|
71
77
|
assert.equal(await updateSelectedPi(f.input), 0);
|
|
72
78
|
const flags = manager === 'pnpm' ? ['--dir', f.root, '--lockfile-dir', f.root, '--recursive=false', '--ignore-pnpmfile'] : ['--prefix', f.root, '--workspaces=false', '--no-audit', '--no-fund'];
|
|
73
|
-
assert.deepEqual(f.updates, [{command: `/fake/${manager}`, args: ['update', PI
|
|
79
|
+
assert.deepEqual(f.updates, [{command: `/fake/${manager}`, args: [manager === 'pnpm' ? 'update' : 'install', `${PI}@1.1.0`, '--no-save', '--ignore-scripts', '--global=false', ...flags, ...(manager === 'pnpm' ? ['--pm-on-fail=ignore', '--config.minimum-release-age-exclude=existing-fixture', `--config.minimum-release-age-exclude=${PI}`] : [])], cwd: f.root, ...(manager === 'pnpm' ? {env:{COREPACK_ENABLE_PROJECT_SPEC:'0',COREPACK_ENABLE_NETWORK:'0'}} : {})}]);
|
|
74
80
|
assert.deepEqual(f.output, [`${manager} updated ${PI} in ${f.root}; the selected Pi is now 1.1.0 (was 1.0.0).`]);
|
|
75
81
|
assert.equal(await fs.realpath(f.link), f.root);
|
|
76
82
|
assert.equal(await fs.readFile(join(f.root, 'package.json'), 'utf8'), f.manifest);
|
|
@@ -78,15 +84,116 @@ for (const manager of ['pnpm', 'npm']) test(`source-linked Shell updates only it
|
|
|
78
84
|
assert.ok(f.calls.filter(c => c.args.includes('list') || c.args.includes('ls') || c.args.includes('--version')).every(c => c.cwd === f.input.cwd));
|
|
79
85
|
});
|
|
80
86
|
|
|
87
|
+
for (const manager of ['pnpm', 'npm']) test(`source ${manager} resolves the latest stable tag before updating, without changing its manifest`, async t => {
|
|
88
|
+
const f = await fixture(t, {manager, range:'^1.0.0', latest:'2.0.0'});
|
|
89
|
+
assert.equal(await updateSelectedPi(f.input), 0);
|
|
90
|
+
const views = f.calls.filter(call => call.args.includes('view') && !call.args.includes('--json'));
|
|
91
|
+
assert.equal(views.length, 1);
|
|
92
|
+
assert.ok(views[0].args.includes(`${PI}@latest`));
|
|
93
|
+
assert.ok(f.calls.indexOf(views[0]) < f.calls.findIndex(call => call.args === f.updates[0].args));
|
|
94
|
+
assert.equal((await f.snapshot()).manifest, f.before.manifest);
|
|
95
|
+
assert.equal(await fs.realpath(f.link), f.root);
|
|
96
|
+
});
|
|
97
|
+
|
|
98
|
+
test('source pnpm retains existing package-specific release-age exclusions while exempting Pi', async t => {
|
|
99
|
+
const f = await fixture(t, {configOnly:true});
|
|
100
|
+
assert.equal(await updateSelectedPi(f.input), 0);
|
|
101
|
+
const exclusions = f.calls.filter(call => call.args.includes('config') && call.args.includes('minimumReleaseAgeExclude'));
|
|
102
|
+
assert.equal(exclusions.length, 1);
|
|
103
|
+
const args = f.updates[0].args;
|
|
104
|
+
assert.ok(args.includes('--config.minimum-release-age-exclude=existing-fixture'));
|
|
105
|
+
assert.ok(args.includes(`--config.minimum-release-age-exclude=${PI}`));
|
|
106
|
+
assert.ok(!args.some(arg => /^--(?:config\.)?minimum-release-age=/.test(arg)));
|
|
107
|
+
assert.equal((await f.snapshot()).pnpmConfig, f.before.pnpmConfig);
|
|
108
|
+
});
|
|
109
|
+
|
|
110
|
+
const DEPENDENCIES = {'@earendil-works/pi-ai':'2.0.0', '@earendil-works/pi-tui':'2.0.0', '@earendil-works/pi-ranged':'^2.0.0',
|
|
111
|
+
'@earendil-works/pi-next':'2.1.0-rc.1', undici:'7.0.0', chalk:'^5.0.0'};
|
|
112
|
+
|
|
113
|
+
// Pi 1.5.2's pi-ai pins pi-schema and pi-telemetry, which Pi itself does not list.
|
|
114
|
+
const SIBLINGS = {'@earendil-works/pi-ai@2.0.0':{'@earendil-works/pi-schema':'2.0.0', '@earendil-works/pi-telemetry':'2.0.0', openai:'7.19.0'},
|
|
115
|
+
'@earendil-works/pi-tui@2.0.0':{'@earendil-works/pi-ai':'2.0.0', marked:'18.0.11'}, '@earendil-works/pi-schema@2.0.0':{}, '@earendil-works/pi-telemetry@2.0.0':{'@earendil-works/pi-ranged':'^2.0.0'}};
|
|
116
|
+
|
|
117
|
+
test('source pnpm also exempts only the Pi-scope packages the selected Pi pins exactly, transitively', async t => {
|
|
118
|
+
const f = await fixture(t, {configOnly:true, latest:'2.0.0', piDependencies:DEPENDENCIES, siblingDependencies:SIBLINGS});
|
|
119
|
+
assert.equal(await updateSelectedPi(f.input), 0);
|
|
120
|
+
const manifests = f.calls.filter(call => call.args.includes('view') && call.args.includes('--json'));
|
|
121
|
+
assert.deepEqual(manifests, [PI, '@earendil-works/pi-ai', '@earendil-works/pi-tui', '@earendil-works/pi-schema', '@earendil-works/pi-telemetry'].map(name => ({command:'/fake/pnpm', args:['view', `${name}@2.0.0`, '--json', '--dir', f.root, '--pm-on-fail=ignore'], cwd:f.root, env:{COREPACK_ENABLE_PROJECT_SPEC:'0',COREPACK_ENABLE_NETWORK:'0'}})));
|
|
122
|
+
assert.ok(f.calls.indexOf(manifests[manifests.length - 1]) < f.calls.findIndex(call => call.args === f.updates[0].args));
|
|
123
|
+
assert.deepEqual(f.updates[0].args.filter(arg => arg.startsWith('--config.minimum-release-age-exclude=')), ['existing-fixture', PI, ...['pi-ai', 'pi-tui', 'pi-schema', 'pi-telemetry'].map(name => `@earendil-works/${name}@2.0.0`)].map(entry => `--config.minimum-release-age-exclude=${entry}`));
|
|
124
|
+
assert.ok(f.updates[0].args.includes('--no-save'));
|
|
125
|
+
assert.ok(!f.updates[0].args.some(arg => /minimum-release-age-strict|minimumReleaseAgeStrict/i.test(arg)));
|
|
126
|
+
const after = await f.snapshot();
|
|
127
|
+
assert.equal(after.manifest, f.before.manifest);
|
|
128
|
+
assert.equal(after.pnpmConfig, f.before.pnpmConfig);
|
|
129
|
+
});
|
|
130
|
+
|
|
131
|
+
for (const [name, manifestView] of Object.entries({'a failed lookup': {code:1, stdout:''}, 'unparsable output': {code:0, stdout:'not json'},
|
|
132
|
+
'another package': {code:0, stdout:JSON.stringify({name:'other', version:'2.0.0'})}, 'list-shaped dependencies': {code:0, stdout:JSON.stringify({name:PI, version:'2.0.0', dependencies:['@earendil-works/pi-ai']})}})) test(`source pnpm refuses without mutation when the selected Pi manifest has ${name}`, async t => {
|
|
133
|
+
const f = await fixture(t, {configOnly:true, latest:'2.0.0', manifestView});
|
|
134
|
+
await assert.rejects(updateSelectedPi(f.input), {message:'gentle-shell update: the published dependencies of Pi 2.0.0 could not be verified. No installation changed.'});
|
|
135
|
+
assert.deepEqual(f.updates, []);
|
|
136
|
+
assert.deepEqual(f.output, []);
|
|
137
|
+
assert.deepEqual(await f.snapshot(), f.before);
|
|
138
|
+
});
|
|
139
|
+
|
|
140
|
+
test('source pnpm merges siblings into the checkout\'s versioned exclusions and keeps the rest verbatim', async t => {
|
|
141
|
+
const existing = [`${PI}@1.0.0`, '@earendil-works/chord@1.0.0', '@earendil-works/pi-ai@1.0.0', '@earendil-works/pi-telemetry@1.0.0', 'existing-fixture'];
|
|
142
|
+
const f = await fixture(t, {configOnly:true, latest:'2.0.0', piDependencies:DEPENDENCIES, siblingDependencies:SIBLINGS, excludeOutput:JSON.stringify(existing)});
|
|
143
|
+
assert.equal(await updateSelectedPi(f.input), 0);
|
|
144
|
+
assert.deepEqual(f.updates[0].args.filter(arg => arg.startsWith('--config.minimum-release-age-exclude=')).map(arg => arg.slice(arg.indexOf('=') + 1)),
|
|
145
|
+
[PI, '@earendil-works/chord@1.0.0', '@earendil-works/pi-ai@1.0.0 || 2.0.0', '@earendil-works/pi-telemetry@1.0.0 || 2.0.0', 'existing-fixture', '@earendil-works/pi-tui@2.0.0', '@earendil-works/pi-schema@2.0.0']);
|
|
146
|
+
assert.equal((await f.snapshot()).pnpmConfig, f.before.pnpmConfig);
|
|
147
|
+
});
|
|
148
|
+
|
|
149
|
+
test('source pnpm refuses without mutation when a transitively pinned sibling cannot be read', async t => {
|
|
150
|
+
const {'@earendil-works/pi-telemetry@2.0.0': _missing, ...siblings} = SIBLINGS;
|
|
151
|
+
const f = await fixture(t, {configOnly:true, latest:'2.0.0', piDependencies:DEPENDENCIES, siblingDependencies:siblings});
|
|
152
|
+
await assert.rejects(updateSelectedPi(f.input), {message:'gentle-shell update: the published dependencies of @earendil-works/pi-telemetry@2.0.0 could not be verified. No installation changed.'});
|
|
153
|
+
assert.deepEqual(f.updates, []);
|
|
154
|
+
assert.deepEqual(f.output, []);
|
|
155
|
+
assert.deepEqual(await f.snapshot(), f.before);
|
|
156
|
+
});
|
|
157
|
+
|
|
158
|
+
test('source npm keeps its update unchanged and never reads the Pi manifest', async t => {
|
|
159
|
+
const f = await fixture(t, {manager:'npm', latest:'2.0.0', piDependencies:DEPENDENCIES});
|
|
160
|
+
assert.equal(await updateSelectedPi(f.input), 0);
|
|
161
|
+
assert.deepEqual(f.calls.filter(call => call.args.includes('--json') && call.args.includes('view')), []);
|
|
162
|
+
assert.ok(!f.updates[0].args.some(arg => arg.includes('minimum-release-age')));
|
|
163
|
+
});
|
|
164
|
+
|
|
165
|
+
test('source pnpm safely handles an empty release-age exclusion list', async t => {
|
|
166
|
+
const f = await fixture(t, {excludeOutput:''});
|
|
167
|
+
assert.equal(await updateSelectedPi(f.input), 0);
|
|
168
|
+
assert.equal(f.updates[0].args.filter(arg => arg === `--config.minimum-release-age-exclude=${PI}`).length, 2);
|
|
169
|
+
assert.equal((await f.snapshot()).manifest, f.before.manifest);
|
|
170
|
+
});
|
|
171
|
+
|
|
172
|
+
test('source pnpm refuses malformed exclusions before any mutation', async t => {
|
|
173
|
+
const f = await fixture(t, {excludeOutput:'["ok", 1]'});
|
|
174
|
+
await assert.rejects(updateSelectedPi(f.input), /pnpm release-age exclusions could not be verified/);
|
|
175
|
+
assert.deepEqual(f.updates, []);
|
|
176
|
+
assert.deepEqual(f.output, []);
|
|
177
|
+
assert.deepEqual(await f.snapshot(), f.before);
|
|
178
|
+
});
|
|
179
|
+
|
|
180
|
+
for (const manager of ['pnpm', 'npm']) test(`source ${manager} rejects a prerelease latest tag without mutation`, async t => {
|
|
181
|
+
const f = await fixture(t, {manager, latest:'2.0.0-rc.1'});
|
|
182
|
+
await assert.rejects(updateSelectedPi(f.input), /latest published Pi.*rejected/);
|
|
183
|
+
assert.deepEqual(f.updates, []);
|
|
184
|
+
assert.deepEqual(f.output, []);
|
|
185
|
+
assert.deepEqual(await f.snapshot(), f.before);
|
|
186
|
+
});
|
|
187
|
+
|
|
81
188
|
test('newer pnpm uses its current version without downloading the older project pin', async t => {
|
|
82
189
|
const f = await fixture(t, {managerVersion:'11.5.0', configOnly:true});
|
|
83
190
|
assert.equal(await updateSelectedPi(f.input), 0);
|
|
84
191
|
assert.equal(f.updates.length, 1);
|
|
85
192
|
assert.deepEqual(f.output, [`pnpm updated ${PI} in ${f.root}; the selected Pi is now 1.1.0 (was 1.0.0).`]);
|
|
86
193
|
const projectCalls = f.calls.filter(call => call.args.includes('config') || call.args.includes('--recursive') || call.args[0] === 'update');
|
|
87
|
-
assert.equal(projectCalls.length,
|
|
194
|
+
assert.equal(projectCalls.length, 4);
|
|
88
195
|
assert.ok(projectCalls.every(call => call.args.includes('--pm-on-fail=ignore')));
|
|
89
|
-
assert.ok(f.calls.filter(call => call.args.includes('--version') || projectCalls.includes(call)).every(call => call.env?.COREPACK_ENABLE_PROJECT_SPEC === '0' && call.env?.COREPACK_ENABLE_NETWORK === '0'));
|
|
196
|
+
assert.ok(f.calls.filter(call => call.args.includes('--version') || call.args.includes('view') || projectCalls.includes(call)).every(call => call.env?.COREPACK_ENABLE_PROJECT_SPEC === '0' && call.env?.COREPACK_ENABLE_NETWORK === '0'));
|
|
90
197
|
const after = await f.snapshot();
|
|
91
198
|
assert.equal(after.manifest, f.before.manifest);
|
|
92
199
|
assert.equal(after.pnpmConfig, f.before.pnpmConfig);
|