@joshuafolkken/kit 1.1005.0 → 1.1035.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/.claude/settings.json +1 -5
- package/.claude/skills/dependency-update/SKILL.md +6 -3
- package/.claude/skills/epic-commands/SKILL.md +46 -17
- package/.claude/skills/workflow-commands/SKILL.md +8 -23
- package/.claude/skills/workflow-commands/backlogrun-child.md +4 -2
- package/.claude/skills/workflow-commands/backlogrun.md +3 -12
- package/.claude/skills/workflow-commands/fullrun-steps.md +4 -3
- package/.claude/skills/workflow-commands/fullrun.md +1 -1
- package/.claude/skills/workflow-commands/halfrun.md +2 -1
- package/.claude/skills/workflow-commands/into-target.md +1 -1
- package/.claude/skills/workflow-commands/observation-filing.md +42 -43
- package/.claude/skills/workflow-commands/prerequisite.md +1 -1
- package/.codex/hooks.json +1 -5
- package/.github/workflows/sonar-qube.yml +1 -1
- package/AGENTS.md +4 -25
- package/CLAUDE.md +24 -38
- package/GEMINI.md +4 -24
- package/README.md +22 -58
- package/dist/CLAUDE.md +24 -38
- package/dist/hooks/batch-guard.js +4 -4
- package/dist/hooks/{chunk-WMIR5SNX.js → chunk-D67KVGGY.js} +3 -3
- package/dist/hooks/{chunk-EZLHXKJ6.js → chunk-EIFCAJRB.js} +70 -27
- package/dist/hooks/{chunk-KPZN42RT.js → chunk-GJT4BNVE.js} +3 -3
- package/dist/hooks/{chunk-PAXMLGSS.js → chunk-GLBDBJOK.js} +44 -24
- package/dist/hooks/{chunk-GBJUERYK.js → chunk-HOYJU5RM.js} +1 -1
- package/dist/hooks/{chunk-6PSTVOLH.js → chunk-HU66PWWL.js} +33 -57
- package/dist/hooks/{chunk-A2H5I2VD.js → chunk-KG6PZD72.js} +2 -2
- package/dist/hooks/{chunk-AWTFKKFW.js → chunk-XPLP27WA.js} +3 -8
- package/dist/hooks/{chunk-4GDR2YTV.js → chunk-Y27M6A7X.js} +4 -4
- package/dist/hooks/{chunk-56LGMJJV.js → chunk-ZXNE6NY3.js} +2 -2
- package/dist/hooks/codex-hook-adapter.js +10 -10
- package/dist/hooks/duplicate-read-guard.js +5 -5
- package/dist/hooks/format-edited.js +2 -2
- package/dist/hooks/investigation-guard.js +5 -5
- package/dist/hooks/pretool-guard.js +9 -9
- package/dist/hooks/stop-guard.js +11 -15
- package/dist/josh.js +38 -19
- package/dist/version/index.js +93 -41
- package/eslint/base.js +2 -11
- package/package.json +32 -6
- package/prompts/coding-standards.md +15 -290
- package/prompts/collaboration-workflow/cross-repo-epic.md +2 -51
- package/prompts/collaboration-workflow/epic-audit.md +2 -53
- package/prompts/collaboration-workflow/epic-bundle.md +2 -106
- package/prompts/collaboration-workflow/issue-template.md +4 -4
- package/prompts/collaboration-workflow/operating-rules.md +18 -75
- package/prompts/collaboration-workflow/principles.md +74 -0
- package/prompts/collaboration-workflow/residency.md +54 -14
- package/prompts/collaboration-workflow/rule-delivery.md +1 -11
- package/prompts/collaboration-workflow/upstream-interrupt.md +1 -1
- package/prompts/collaboration-workflow.md +22 -28
- package/scripts/adopt/adopt-logic.ts +2 -2
- package/scripts/adopt/adopt-toolkits.ts +1 -1
- package/scripts/adopt/adopt.ts +2 -2
- package/scripts/agent/agent-event.ts +2 -9
- package/scripts/agent/agent-exit-record.ts +2 -9
- package/scripts/backlog/backlog-budget-cli.ts +2 -6
- package/scripts/backlog/backlog-drive-cli.ts +20 -10
- package/scripts/backlog/backlog-drive.ts +50 -16
- package/scripts/backlog/backlog-offer-cli.ts +6 -5
- package/scripts/backlog/backlog-plan.ts +1 -1
- package/scripts/build/build-bin.ts +2 -1
- package/scripts/build/build-config-merge.ts +2 -1
- package/scripts/build/build-hooks.ts +24 -4
- package/scripts/build/build-managed-marker.ts +2 -1
- package/scripts/build/build-self-sync-guard.ts +2 -1
- package/scripts/build/build-version.ts +2 -1
- package/scripts/cases/cases-logic.ts +2 -6
- package/scripts/ci/pr-classification.ts +13 -11
- package/scripts/cost-runtime/cost-transcript.ts +4 -11
- package/scripts/doctor/doctor-consumer.ts +5 -12
- package/scripts/doctor/doctor-ports.ts +2 -2
- package/scripts/document/document-byte-budget.ts +8 -16
- package/scripts/document/document-section.ts +2 -6
- package/scripts/document/entry-read-budget.ts +1 -1
- package/scripts/{git/git-epic-add-body.ts → epic/epic-add-body.ts} +23 -23
- package/scripts/{git/git-epic-add-plan.ts → epic/epic-add-plan.ts} +23 -26
- package/scripts/{git/git-epic-add.ts → epic/epic-add.ts} +17 -17
- package/scripts/epic/epic-audit-cli.ts +4 -4
- package/scripts/epic/epic-audit-orphans.ts +2 -2
- package/scripts/epic/epic-audit-rationale.ts +1 -1
- package/scripts/epic/epic-audit.ts +1 -1
- package/scripts/{git/git-epic-body.ts → epic/epic-body.ts} +6 -6
- package/scripts/epic/epic-bundle-cli.ts +1 -1
- package/scripts/epic/epic-bundle.ts +2 -2
- package/scripts/epic/epic-candidate-confirm.ts +2 -1
- package/scripts/{git/git-epic-chains.ts → epic/epic-chains.ts} +4 -4
- package/{scripts-ai → scripts/epic}/epic-check.ts +5 -4
- package/{scripts-ai → scripts/epic}/epic-cli.ts +4 -4
- package/scripts/{git/git-epic-close-comment.ts → epic/epic-close-comment.ts} +9 -9
- package/scripts/{git/git-epic-close.ts → epic/epic-close.ts} +23 -19
- package/scripts/epic/epic-cross-repo.ts +21 -38
- package/scripts/{git/git-epic-decision.ts → epic/epic-decision.ts} +12 -14
- package/scripts/epic/epic-fetch.ts +3 -3
- package/scripts/epic/epic-graph.ts +3 -3
- package/scripts/epic/epic-index.ts +2 -2
- package/scripts/epic/epic-issue.ts +1 -1
- package/scripts/epic/epic-next.ts +3 -3
- package/scripts/{git/git-epic-parse.ts → epic/epic-parse.ts} +3 -3
- package/scripts/{git/git-epic-promote.ts → epic/epic-promote.ts} +10 -10
- package/scripts/{git/git-epic-read.ts → epic/epic-read.ts} +9 -9
- package/scripts/{git/git-epic-reconcile.ts → epic/epic-reconcile.ts} +18 -20
- package/scripts/{git/git-epic-reference.ts → epic/epic-reference.ts} +4 -23
- package/scripts/epic/epic-relation-recheck.ts +4 -3
- package/scripts/{git/git-epic-relations.ts → epic/epic-relations.ts} +5 -5
- package/scripts/{git/git-epic-remove-plan.ts → epic/epic-remove-plan.ts} +17 -19
- package/scripts/{git/git-epic-remove.ts → epic/epic-remove.ts} +13 -13
- package/scripts/{git/git-epic-run.ts → epic/epic-run.ts} +27 -27
- package/scripts/{git/git-epic-sections.ts → epic/epic-sections.ts} +6 -6
- package/scripts/{git/git-epic-shape.ts → epic/epic-shape.ts} +7 -7
- package/scripts/{git/git-epic-validate.ts → epic/epic-validate.ts} +13 -13
- package/{scripts-ai → scripts/epic}/epic.ts +17 -16
- package/scripts/gh/fix-gh-packages.ts +2 -1
- package/scripts/gh/gh-spawn.ts +12 -10
- package/scripts/git/constants.ts +1 -1
- package/scripts/git/git-branch.ts +10 -1
- package/scripts/git/git-command.ts +1 -1
- package/scripts/git/git-error.ts +2 -5
- package/{scripts-ai → scripts/git}/git-followup-finish.ts +7 -7
- package/scripts/git/git-followup-flush.ts +74 -48
- package/scripts/git/git-followup-issue-close.ts +2 -2
- package/scripts/git/git-followup-label.ts +1 -1
- package/scripts/git/git-followup-pending.ts +1 -1
- package/{scripts-ai → scripts/git}/git-followup-workflow.ts +23 -11
- package/scripts/git/git-gh-exec.ts +85 -26
- package/scripts/git/git-gh-issue-read.ts +2 -2
- package/scripts/git/git-gh-issue-rest.ts +2 -2
- package/scripts/git/git-gh-issue-write.ts +6 -6
- package/scripts/git/git-gh-pr-read.ts +0 -21
- package/scripts/git/git-gh-pr.ts +2 -23
- package/scripts/git/git-pr-followup-wrapup.ts +2 -6
- package/scripts/git/git-preflight.ts +3 -6
- package/scripts/git/git-staging.ts +21 -9
- package/{scripts-ai → scripts/git}/git-workflow.ts +11 -11
- package/scripts/git/github-issue-url.ts +1 -1
- package/scripts/git/issue-labels.ts +1 -1
- package/scripts/git/issue-reference.ts +19 -0
- package/scripts/git/main-merge.ts +2 -1
- package/scripts/git/main-sync.ts +3 -2
- package/scripts/git/schemas.ts +1 -1
- package/scripts/git/stash-pop-args.ts +7 -13
- package/scripts/git/stash-pop-cli.ts +2 -1
- package/{scripts-ai → scripts/git}/telegram-test-logic.ts +2 -2
- package/{scripts-ai → scripts/git}/telegram-test.ts +7 -7
- package/scripts/hooks/format-rewrite-notice.ts +2 -8
- package/scripts/init/init-ai-copy.ts +23 -14
- package/scripts/init/init.ts +8 -4
- package/scripts/init/start-steps.ts +2 -1
- package/scripts/init/start.ts +2 -1
- package/scripts/issue/issue-comment-cli.ts +2 -1
- package/scripts/issue/issue-file-cli.ts +2 -1
- package/scripts/issue/issue-fold-cli.ts +9 -16
- package/scripts/issue/issue-scout-cli.ts +8 -13
- package/scripts/issue/measure-rerun-cli.ts +7 -6
- package/scripts/josh/josh-commands-ai.ts +2 -2
- package/scripts/josh/josh-commands-backlog.ts +1 -1
- package/scripts/josh/josh-commands-development.ts +1 -1
- package/scripts/josh/josh-commands-workflow.ts +4 -4
- package/scripts/lane/lane-cli.ts +2 -1
- package/scripts/lane/lane-open.ts +3 -2
- package/scripts/lane/lane-registry.ts +3 -6
- package/scripts/lib/cli-flags.ts +20 -2
- package/scripts/lib/error-message.ts +9 -0
- package/scripts/lib/read-file.ts +26 -2
- package/scripts/observations/observation-ledger-home.ts +98 -26
- package/scripts/observations/observation-ledger-migrate.ts +26 -21
- package/scripts/observations/observation-ledger-prepare.ts +10 -20
- package/scripts/observations/observation-ledger.ts +58 -25
- package/scripts/observations/observations-flush-cli.ts +6 -23
- package/scripts/observations/observations-flush-landing.ts +2 -1
- package/scripts/observations/observations-flush.ts +29 -20
- package/scripts/package/package-scout-cli.ts +8 -16
- package/scripts/ports/port-command.ts +2 -1
- package/scripts/propagate/propagate-publish.ts +6 -7
- package/scripts/propagate/propagate-steps.ts +2 -1
- package/scripts/propagate/propagate.ts +3 -2
- package/scripts/refactor/import-graph.ts +2 -6
- package/scripts/registry-migration/migrate.ts +3 -2
- package/scripts/registry-migration/user-npmrc.ts +2 -2
- package/scripts/release/release-cli.ts +2 -1
- package/scripts/repo/repo-setting.ts +10 -8
- package/scripts/review/review-finding-ledger.ts +3 -3
- package/scripts/review/review-findings-cli.ts +4 -11
- package/scripts/review/review-record-cli.ts +14 -11
- package/scripts/review/review-record.ts +6 -16
- package/scripts/rules/decision-oracle.ts +2 -2
- package/scripts/rules/rule-body-guard.ts +2 -2
- package/scripts/rules/rule-value-cache.ts +99 -0
- package/scripts/rules/rule-value-cli.ts +10 -9
- package/scripts/rules/rule-value.ts +1 -1
- package/scripts/run/run-carry-args.ts +2 -6
- package/scripts/run/run-carry-cli.ts +5 -7
- package/scripts/run/run-cut-args.ts +7 -13
- package/scripts/run/run-ending-cli.ts +4 -7
- package/scripts/run/run-event-stream.ts +2 -5
- package/scripts/run/run-liveness-cli.ts +4 -7
- package/scripts/run/run-progress-args.ts +2 -6
- package/scripts/run/run-progress-cli.ts +2 -1
- package/scripts/run/run-tail-cli.ts +3 -3
- package/scripts/run/run-tidy-stashes.ts +7 -14
- package/scripts/run/run-wake-cli.ts +2 -6
- package/scripts/run/run-wake-driver.ts +15 -2
- package/scripts/run/run-wake-session.ts +14 -4
- package/scripts/safe-chain/project-config.ts +3 -6
- package/scripts/security/security-audit-provision.ts +6 -7
- package/scripts/sonar/sonar-hotspots-cli.ts +2 -1
- package/scripts/sync/directory-copy-guard.ts +2 -1
- package/scripts/sync/sync-ai-files.ts +3 -3
- package/scripts/sync/template-source-logic.ts +3 -4
- package/scripts/test/e2e-retry-check.ts +3 -6
- package/scripts/ui/ui-routes-cli.ts +3 -6
- package/scripts/version/bump-version.ts +2 -1
- package/scripts/version/version-remote.ts +18 -27
- package/scripts/version/version-targets.ts +3 -3
- package/.claude/skills/workflow-commands/rule-residency.md +0 -267
- package/evals/scenarios/consult-not-execute.json +0 -20
- package/evals/scenarios/no-implicit-workflow.json +0 -26
- package/evals/scenarios/overrides-both-locations.json +0 -29
- package/evals/scenarios/upstream-interrupt.json +0 -23
- package/evals/scenarios/workflow-skill-loaded.json +0 -16
- package/prompts/agent-lint-protocol.json +0 -79
- package/prompts/agent-rules.md +0 -63
- package/prompts/collaboration-workflow/consultation-vs-execution.md +0 -8
- package/prompts/collaboration-workflow/distributed-docs.md +0 -7
- package/prompts/collaboration-workflow/durable-rules.md +0 -24
- package/prompts/collaboration-workflow/latest-first.md +0 -14
- package/prompts/collaboration-workflow/no-clones.md +0 -11
- package/prompts/collaboration-workflow/simplicity-first.md +0 -9
- package/prompts/collaboration-workflow/single-source-rules.md +0 -13
- package/scripts/build/shim-shell.ts +0 -25
- package/scripts/claude/skill-meta.ts +0 -37
- package/scripts/document/document-scan.ts +0 -108
- package/scripts/document/generate-catalog.ts +0 -69
- package/scripts/document/retired-phrases.ts +0 -143
- package/scripts/document/review-agent-type.ts +0 -46
- package/scripts/document/single-source.ts +0 -73
- package/scripts/git/git-fixture-workspace.ts +0 -88
- package/scripts/hooks/format-edited-file-fixtures.ts +0 -109
- package/scripts/hooks/prompt-hooks.ts +0 -38
- package/scripts/init/hook-command-bootstrap.ts +0 -83
- package/scripts/issue/issue-logic.ts +0 -50
- package/scripts/josh/__snapshots__/josh-command-map.test.ts.snap +0 -1227
- package/scripts/josh/josh-script-reader.ts +0 -11
- package/scripts/package/production-dependency-graph.ts +0 -68
- package/scripts/retrospective/retrospective-cli.ts +0 -97
- package/scripts/retrospective/retrospective.ts +0 -127
- package/scripts/rules/delivered-rules-harness.ts +0 -72
- package/scripts/rules/top-level-scripts-guard.ts +0 -47
- package/scripts/run/run-carry-flush.ts +0 -58
- package/scripts/run/run-transcript.golden.txt +0 -57
- package/scripts/run/run-wake-work.ts +0 -108
- package/scripts/sync/dependabot-pin-logic.ts +0 -135
- package/scripts/test/classify-isolation.ts +0 -149
- package/scripts/test/http-fault-injection.ts +0 -79
- package/scripts/test/josh-harness-environment.ts +0 -260
- package/scripts/test/josh-harness.ts +0 -96
- package/scripts/test/pilot-files.ts +0 -452
- package/scripts/test/pilot-measure.ts +0 -78
- package/scripts/test/test-network-guard.ts +0 -453
- package/scripts/test/test-repository-guard.ts +0 -317
- package/scripts/test/test-state-guard.ts +0 -85
- package/scripts/test/test-stdout-guard.ts +0 -54
- package/scripts/test/test-telegram-guard.ts +0 -90
- package/scripts/test/unit-guard-environment.ts +0 -12
- package/scripts/test/unit-projects.ts +0 -139
- package/scripts/test/vitest-include-globs.ts +0 -12
- package/scripts/time-runtime/time-batch-guard-fixtures.ts +0 -66
- package/scripts-ai/completion-gate.ts +0 -13
- package/scripts-ai/environment-loader.ts +0 -9
- /package/{scripts-ai → scripts/epic}/epic-cli-argv.ts +0 -0
- /package/{scripts-ai → scripts/epic}/epic-cli-remove.ts +0 -0
- /package/{scripts-ai → scripts/git}/followup-issue-number.ts +0 -0
|
@@ -1,139 +0,0 @@
|
|
|
1
|
-
import { agent_session_environment } from '#scripts/josh/agent-session-environment'
|
|
2
|
-
import { PILOT_FILES } from './pilot-files'
|
|
3
|
-
import { VITEST_INCLUDE_GLOBS } from './vitest-include-globs'
|
|
4
|
-
|
|
5
|
-
// The unit suite runs as two Vitest projects so the isolation-safe files can skip per-file worker
|
|
6
|
-
// isolation, which re-evaluates every shared module once per file (joshuafolkken/kit#2170). Measured
|
|
7
|
-
// back to back on the pilot set, isolate:false ran it in 27.5s against 64.7s isolated — a 57% cut,
|
|
8
|
-
// because module evaluation is about half of a run's wall clock.
|
|
9
|
-
//
|
|
10
|
-
// **The two projects partition the suite exactly.** `pure` runs the classifier's isolation-free set;
|
|
11
|
-
// `isolated` runs everything else the main globs match, excluding the pilot files so no file lands in
|
|
12
|
-
// both. Their union is every included file bar the packed-consumer smoke test, and nothing runs
|
|
13
|
-
// twice — which is what keeps the gate's green condition identical to the single-project suite it
|
|
14
|
-
// replaces. `classify-isolation.ts` lists a file as pure only when it mutates no state a sibling in
|
|
15
|
-
// the same worker could observe, so isolate:false changes how the pure files run, never whether they
|
|
16
|
-
// pass.
|
|
17
|
-
|
|
18
|
-
const TEST_TIMEOUT_MS = 10_000
|
|
19
|
-
|
|
20
|
-
// Smoke test packs and installs the real tarball — too slow (~60 s setup) for the unit gate. Run
|
|
21
|
-
// before release with: pnpm vitest run --config vitest.harness.config.ts
|
|
22
|
-
const MAIN_EXCLUDE: ReadonlyArray<string> = ['scripts/build/packed-consumer.test.ts']
|
|
23
|
-
|
|
24
|
-
// **`JOSH_LANE_CHILD` is blanked so the unit suite never inherits the lane it happens to run in**
|
|
25
|
-
// (joshuafolkken/kit#2310). The gate runs inside a dispatched lane child, whose mark and lane cwd would
|
|
26
|
-
// otherwise make every world-consulting rule guard (`pre-gate-cut`, `implementation-cut`, `lane-park`)
|
|
27
|
-
// read a delivery fixture as a real lane-child call and fire on it. A suite that wants to test
|
|
28
|
-
// lane-child behavior sets the mark itself in its own `beforeEach`, exactly as it always has; blank is
|
|
29
|
-
// the "no dispatch mark" a person's session carries, which `marked_issue` reads as absent.
|
|
30
|
-
//
|
|
31
|
-
// **The proxy spellings are blanked for the same reason** (joshuafolkken/kit#2436): a package-manager
|
|
32
|
-
// wrapper writes its loopback proxy and CA into everything `pnpm` spawns, so a suite asserting what a
|
|
33
|
-
// `gh` spawn receives would pass in CI and fail on a machine with the wrapper. A suite about proxies
|
|
34
|
-
// declares the one it is testing in its own `beforeEach`.
|
|
35
|
-
//
|
|
36
|
-
// **The detached ship supervisor's marks are blanked too** (joshuafolkken/kit#2456): the pre-push unit
|
|
37
|
-
// run inherits `JOSH_SHIP_SUPERVISED` and `JOSH_AGENT_PROVIDER` from the supervisor that pushes, so a
|
|
38
|
-
// ship fixture would take the supervised stop path — and try to relaunch a real lane child — only there.
|
|
39
|
-
const PROXY_ENV: Record<string, string> = Object.fromEntries(
|
|
40
|
-
[...agent_session_environment.PROXY_KEYS, agent_session_environment.PROXY_CERTIFICATE_KEY].map(
|
|
41
|
-
(key) => [key, ''],
|
|
42
|
-
),
|
|
43
|
-
)
|
|
44
|
-
|
|
45
|
-
const ENV: Record<string, string> = {
|
|
46
|
-
...PROXY_ENV,
|
|
47
|
-
CLAUDE_CODE_SESSION_ID: 'vitest-session',
|
|
48
|
-
CODEX_THREAD_ID: '',
|
|
49
|
-
JOSH_AGENT_PROVIDER: '',
|
|
50
|
-
JOSH_LANE_CHILD: '',
|
|
51
|
-
JOSH_SHIP_SUPERVISED: '',
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
const PURE_PROJECT = 'pure'
|
|
55
|
-
const ISOLATED_PROJECT = 'isolated'
|
|
56
|
-
|
|
57
|
-
// The state guard runs on the pure project alone. isolate:false is what lets one file see the git
|
|
58
|
-
// branch, working tree or GIT_* variables a sibling left changed, so that is the only run where a leak
|
|
59
|
-
// is a correctness problem rather than a latent one — and the isolated project keeps exactly the guards
|
|
60
|
-
// the single-project suite had. The network guard is armed once at the root instead, since it arms
|
|
61
|
-
// `PATH` before any worker of either project forks.
|
|
62
|
-
const STATE_GUARD: ReadonlyArray<string> = ['./scripts/test/test-state-guard.ts']
|
|
63
|
-
|
|
64
|
-
// Runs in every worker of both projects, before each test, and silences the real streams for the test
|
|
65
|
-
// body so a fixture's direct `process.stdout` write cannot leak into `pnpm josh test:unit`'s output
|
|
66
|
-
// (joshuafolkken/kit#2296). `setupFiles` rather than `globalSetup` because it must run inside the
|
|
67
|
-
// worker where the test's writes happen, not once in the main process.
|
|
68
|
-
const STDOUT_GUARD: ReadonlyArray<string> = ['./scripts/test/test-stdout-guard.ts']
|
|
69
|
-
|
|
70
|
-
// Runs in every worker for the same reason: it wraps that worker's own `fetch`, refusing a real
|
|
71
|
-
// Telegram send and recording which test tried (joshuafolkken/kit#2494).
|
|
72
|
-
const TELEGRAM_GUARD: ReadonlyArray<string> = ['./scripts/test/test-telegram-guard.ts']
|
|
73
|
-
|
|
74
|
-
interface UnitProjectTest {
|
|
75
|
-
name: string
|
|
76
|
-
env: Record<string, string>
|
|
77
|
-
include: ReadonlyArray<string>
|
|
78
|
-
exclude: ReadonlyArray<string>
|
|
79
|
-
isolate: boolean
|
|
80
|
-
testTimeout: number
|
|
81
|
-
globalSetup: ReadonlyArray<string>
|
|
82
|
-
setupFiles: ReadonlyArray<string>
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
interface UnitProject {
|
|
86
|
-
test: UnitProjectTest
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
interface UnitProjectSpec {
|
|
90
|
-
name: string
|
|
91
|
-
include: ReadonlyArray<string>
|
|
92
|
-
isolate: boolean
|
|
93
|
-
exclude?: ReadonlyArray<string>
|
|
94
|
-
globalSetup?: ReadonlyArray<string>
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
function unit_project(spec: UnitProjectSpec): UnitProject {
|
|
98
|
-
return {
|
|
99
|
-
test: {
|
|
100
|
-
name: spec.name,
|
|
101
|
-
env: ENV,
|
|
102
|
-
include: [...spec.include],
|
|
103
|
-
exclude: [...(spec.exclude ?? [])],
|
|
104
|
-
isolate: spec.isolate,
|
|
105
|
-
testTimeout: TEST_TIMEOUT_MS,
|
|
106
|
-
globalSetup: [...(spec.globalSetup ?? [])],
|
|
107
|
-
setupFiles: [...STDOUT_GUARD, ...TELEGRAM_GUARD],
|
|
108
|
-
},
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
const UNIT_PROJECTS: ReadonlyArray<UnitProject> = [
|
|
113
|
-
unit_project({
|
|
114
|
-
name: PURE_PROJECT,
|
|
115
|
-
include: PILOT_FILES,
|
|
116
|
-
isolate: false,
|
|
117
|
-
globalSetup: STATE_GUARD,
|
|
118
|
-
}),
|
|
119
|
-
unit_project({
|
|
120
|
-
name: ISOLATED_PROJECT,
|
|
121
|
-
include: VITEST_INCLUDE_GLOBS,
|
|
122
|
-
isolate: true,
|
|
123
|
-
exclude: [...MAIN_EXCLUDE, ...PILOT_FILES],
|
|
124
|
-
}),
|
|
125
|
-
]
|
|
126
|
-
|
|
127
|
-
const unit_projects = {
|
|
128
|
-
ENV,
|
|
129
|
-
ISOLATED_PROJECT,
|
|
130
|
-
MAIN_EXCLUDE,
|
|
131
|
-
PURE_PROJECT,
|
|
132
|
-
STATE_GUARD,
|
|
133
|
-
STDOUT_GUARD,
|
|
134
|
-
TELEGRAM_GUARD,
|
|
135
|
-
UNIT_PROJECTS,
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
export type { UnitProject, UnitProjectTest }
|
|
139
|
-
export { unit_projects }
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
const VITEST_INCLUDE_GLOBS: ReadonlyArray<string> = [
|
|
2
|
-
'*.test.ts',
|
|
3
|
-
'scripts/**/*.test.ts',
|
|
4
|
-
'scripts-ai/**/*.test.ts',
|
|
5
|
-
'env/**/*.test.ts',
|
|
6
|
-
'eslint/**/*.test.ts',
|
|
7
|
-
'ports/**/*.test.ts',
|
|
8
|
-
'prettier/**/*.test.ts',
|
|
9
|
-
'templates/**/*.test.ts',
|
|
10
|
-
]
|
|
11
|
-
|
|
12
|
-
export { VITEST_INCLUDE_GLOBS }
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
import type { GuardedCall } from './time-batch-guard'
|
|
2
|
-
|
|
3
|
-
// The calls, labels and transcript builder the batch-guard suite is written from, lifted out of
|
|
4
|
-
// `time-batch-guard.test.ts` so the suite stays under its line limit as kit#2311 adds the read-fold
|
|
5
|
-
// cases (joshuafolkken/kit#2311). Fixtures rather than tests, so they carry no `describe`; the one
|
|
6
|
-
// test file that reads them imports the names it already used.
|
|
7
|
-
|
|
8
|
-
const NEVER_REFUSED = 0
|
|
9
|
-
const FRESH_PATH = 'scripts/fresh.ts'
|
|
10
|
-
// A path-shaped word that appears only inside quotes (joshuafolkken/kit#1611).
|
|
11
|
-
const QUOTED_PATTERN = 'scripts/time'
|
|
12
|
-
const FRESH_CALL: GuardedCall = { name: 'Read', input: { file_path: FRESH_PATH } }
|
|
13
|
-
// The two calls both predicate tables name, and their labels, so neither the fixture nor the wording is
|
|
14
|
-
// written twice.
|
|
15
|
-
const EDIT_LABEL = 'an edit'
|
|
16
|
-
const SED_LABEL = 'an in-place sed'
|
|
17
|
-
const FILE_READ_LABEL = 'a file read'
|
|
18
|
-
const EDIT_TOOL = 'Edit'
|
|
19
|
-
// Named the way this harness names it. Neither spelling of the delegation tool is in the bundleable
|
|
20
|
-
// set, so the case reads the same under `Task`.
|
|
21
|
-
const DELEGATION_TOOL = 'Agent'
|
|
22
|
-
const WRITE_TOOL = 'Write'
|
|
23
|
-
const WRITE_LABEL = 'a whole-file write'
|
|
24
|
-
const EDIT_CALL: GuardedCall = { name: EDIT_TOOL, input: { file_path: FRESH_PATH } }
|
|
25
|
-
const IN_PLACE_SED_CALL: GuardedCall = {
|
|
26
|
-
name: 'Bash',
|
|
27
|
-
input: { command: `sed -i '' s/a/b/ ${FRESH_PATH}` },
|
|
28
|
-
}
|
|
29
|
-
const SHELL_READ_CALL: GuardedCall = { name: 'Bash', input: { command: `cat ${FRESH_PATH}` } }
|
|
30
|
-
const JOSH_CALL: GuardedCall = { name: 'Bash', input: { command: 'pnpm josh gate' } }
|
|
31
|
-
const CHAINED_SED_CALL: GuardedCall = {
|
|
32
|
-
name: 'Bash',
|
|
33
|
-
input: { command: `cat notes.md && sed -i '' s/a/b/ ${FRESH_PATH}` },
|
|
34
|
-
}
|
|
35
|
-
const REDIRECTION_CALL: GuardedCall = {
|
|
36
|
-
name: 'Bash',
|
|
37
|
-
input: { command: "jq '.x' a.json > b.json" },
|
|
38
|
-
}
|
|
39
|
-
const WRITE_CALL: GuardedCall = { name: WRITE_TOOL, input: { file_path: FRESH_PATH } }
|
|
40
|
-
|
|
41
|
-
// The turns of one run, joined the way Claude Code writes them: one line per content block.
|
|
42
|
-
function transcript(...groups: Array<Array<string>>): string {
|
|
43
|
-
return groups.flat().join('\n')
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
export {
|
|
47
|
-
CHAINED_SED_CALL,
|
|
48
|
-
DELEGATION_TOOL,
|
|
49
|
-
EDIT_CALL,
|
|
50
|
-
EDIT_LABEL,
|
|
51
|
-
EDIT_TOOL,
|
|
52
|
-
FILE_READ_LABEL,
|
|
53
|
-
FRESH_CALL,
|
|
54
|
-
FRESH_PATH,
|
|
55
|
-
IN_PLACE_SED_CALL,
|
|
56
|
-
JOSH_CALL,
|
|
57
|
-
NEVER_REFUSED,
|
|
58
|
-
QUOTED_PATTERN,
|
|
59
|
-
REDIRECTION_CALL,
|
|
60
|
-
SED_LABEL,
|
|
61
|
-
SHELL_READ_CALL,
|
|
62
|
-
WRITE_CALL,
|
|
63
|
-
WRITE_LABEL,
|
|
64
|
-
WRITE_TOOL,
|
|
65
|
-
transcript,
|
|
66
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
const GATE_LINT = 'pnpm run lint'
|
|
2
|
-
const GATE_CHECK_CI = 'pnpm josh check:svelte:ci'
|
|
3
|
-
const GATE_CSPELL = 'pnpm josh cspell:dot'
|
|
4
|
-
const GATE_TEST_UNIT = 'pnpm josh test:unit'
|
|
5
|
-
|
|
6
|
-
const COMPLETION_GATE_STEPS: ReadonlyArray<string> = [
|
|
7
|
-
GATE_LINT,
|
|
8
|
-
GATE_CHECK_CI,
|
|
9
|
-
GATE_CSPELL,
|
|
10
|
-
GATE_TEST_UNIT,
|
|
11
|
-
]
|
|
12
|
-
|
|
13
|
-
export { COMPLETION_GATE_STEPS, GATE_LINT, GATE_CHECK_CI, GATE_CSPELL, GATE_TEST_UNIT }
|
|
File without changes
|
|
File without changes
|
|
File without changes
|