musubix3 0.1.13 → 0.1.14

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.
@@ -3,13 +3,13 @@
3
3
  "owner": { "name": "nahisaho" },
4
4
  "metadata": {
5
5
  "description": "GitHub Copilot CLI specification-driven development skills",
6
- "version": "0.1.13"
6
+ "version": "0.1.14"
7
7
  },
8
8
  "plugins": [
9
9
  {
10
10
  "name": "musubix3",
11
11
  "source": ".",
12
- "version": "0.1.13",
12
+ "version": "0.1.14",
13
13
  "description": "Evidence-driven SDD without duplicating native Copilot capabilities."
14
14
  }
15
15
  ]
package/CHANGELOG.md CHANGED
@@ -1,6 +1,33 @@
1
1
  # Changelog
2
2
 
3
- ## Unreleased
3
+ ## 0.1.14 - 2026-09-11
4
+
5
+ Fix for one issue (#17) found while running musubix3@0.1.13 against a large
6
+ real-world project (500k+ files), plus a new `upgrade` command.
7
+
8
+ - `EMFILE: too many open files` crash on large projects during `init` and
9
+ `knowledge build` (#17): `files.ts#snapshot()`, all per-language loaders in
10
+ `graph.ts`, and `knowledge.ts#buildKnowledge()`'s Markdown scan now read
11
+ files through a bounded-concurrency helper (limit 256) instead of issuing
12
+ one `Promise.all(paths.map(readFile))` per project. Verified with a
13
+ synthetic 1500-file project under `ulimit -n 300`: the old code crashed
14
+ with the exact reported error; the fixed code succeeds.
15
+ - Added a new `musubix3 upgrade [--dry-run]` command that refreshes only
16
+ the bundled `.github/skills/sdd-*` files to match the installed package
17
+ version. Unlike `init --force`, it never touches `.musubix/config.json`,
18
+ `policy-baseline.json`, `constitution.md`, ADRs, feature artifacts,
19
+ evidence, or `.gitignore`. Documented as the recommended upgrade path in
20
+ README.md/README-ja.md, alongside the existing `copilot plugin update`/
21
+ `copilot plugin marketplace update` routes for the native plugin and
22
+ marketplace install methods.
23
+
24
+ Known open debt shipped with this release (unchanged since v0.1.9, see
25
+ closed Issue #1):
26
+ - `TDD_TEST_STALE` on `TEST-CLI-WORKFLOW-UX-001..005` (cosmetic fingerprint
27
+ drift; underlying tests still pass and are not stale in behavior).
28
+ - `CHANGE-0005`/`CHANGE-0006` change-record chronology gap.
29
+ - Stale `release` approval stage (expected until the next explicit release
30
+ approval is recorded).
4
31
 
5
32
  ## 0.1.13 - 2026-09-11
6
33
 
package/README-ja.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # musubix3
2
2
 
3
- **最新リリース v0.1.13 · GitHub Copilot CLI 専用 · Node.js ≥20 · TypeScript · MIT**
3
+ **最新リリース v0.1.14 · GitHub Copilot CLI 専用 · Node.js ≥20 · TypeScript · MIT**
4
4
 
5
5
  [English](README.md)
6
6
 
@@ -51,6 +51,26 @@ repositoryへ残します。
51
51
 
52
52
  ## クイックスタート
53
53
 
54
+ Skills をプロジェクトへ読み込む方法は2種類あり、プロジェクトごとに
55
+ どちらか1つだけを選んでください(両方は行わないでください)。
56
+
57
+ - **`npm install`(本節の内容、推奨)**: `musubix3` をプロジェクトの dev
58
+ dependency として追加し、`npx musubix3 init` で Skills を
59
+ `.github/skills/` へコピーし、雛形の `.musubix/` 成果物を作成します。
60
+ バージョンと更新はプロジェクトの `package.json`/lockfile で管理します
61
+ (`npm install ...@latest` + `npx musubix3 upgrade`。
62
+ [アップグレード](#アップグレード)参照)。Skills と雛形SDDファイルが
63
+ リポジトリ自体にコミットされるため、各コントリビューターやCIが個別に
64
+ プラグインをインストールしなくても同一の再現可能な環境になる点で推奨です。
65
+ - **`copilot plugin install`**(ネイティブプラグイン/マーケットプレイス
66
+ 経由): Copilot CLI 自体のプラグイン管理機能へ musubix3 を直接登録します。
67
+ プロジェクトへ npm dependency は追加されず、`.github/skills/` への
68
+ ファイルコピーも行われません。更新は `copilot plugin update musubix3`
69
+ (またはマーケットプレイス版)で行います。具体的なコマンドは
70
+ [配布・インストール](#配布インストール)を参照してください。
71
+
72
+ 以降はnpmインストール経由の手順です。
73
+
54
74
  再現可能なproject-local環境として、exact versionを導入します。
55
75
 
56
76
  ```sh
@@ -94,26 +114,86 @@ Copilot の内部設定、MCP、LSP、hooks、既存のプロジェクト指示
94
114
  **雛形はリリース可能な状態ではありません。** 実際の要求に置き換え、実装とテストを
95
115
  行い、検証コマンドを設定してから品質ゲートを実行してください。
96
116
 
117
+ ## アップグレード
118
+
119
+ `upgrade` は 0.1.14 以降で利用可能です(0.1.13 以前には
120
+ 存在しません。`npm view musubix3 versions` で確認してください)。
121
+
122
+ npm でインストールした場合(`init`/リポジトリローカル Skills):
123
+
124
+ ```sh
125
+ npm install --save-dev --save-exact musubix3@latest
126
+ npx --no-install musubix3 upgrade --dry-run
127
+ npx --no-install musubix3 upgrade
128
+ ```
129
+
130
+ `upgrade` は、インストール済みパッケージの内容と異なる同梱の
131
+ `.github/skills/sdd-*` ファイルだけを更新します。`.musubix/config.json`、
132
+ `.musubix/policy-baseline.json`、`.musubix/constitution.md`、ADR、各機能の
133
+ 成果物、エビデンス、`.gitignore` は作成・置換・削除しません。これらは
134
+ 自分でカスタマイズしたまま維持されます。冪等なコマンドで、インストール済み
135
+ パッケージのSkillファイルと比較するため、新しい `musubix3` を導入していない
136
+ 状態で再実行するとすべてのSkillファイルが `unchanged` と報告されます。
137
+ `init` と同様、まず `--dry-run` で確認してください。
138
+
139
+ より広範囲に同梱・管理対象パスを置換したい場合は引き続き `init --force`
140
+ も利用できますが(`.musubix/config.json`、`constitution.md`、雛形機能の
141
+ `requirements.md`/`design.md` を含む)、これらのファイルをカスタマイズ済みの
142
+ 場合はその内容を上書きしてしまうため、通常のバージョンアップでは
143
+ `upgrade` の使用を推奨します。
144
+
145
+ ネイティブプラグイン経由の場合:
146
+
147
+ ```sh
148
+ copilot plugin update musubix3
149
+ ```
150
+
151
+ ネイティブマーケットプレイス経由の場合:
152
+
153
+ ```sh
154
+ copilot plugin marketplace update musubix3-marketplace
155
+ copilot plugin update musubix3
156
+ ```
157
+
158
+ これらは Copilot 自体のプラグイン管理機能に委譲され、`plugin.json` や
159
+ マーケットプレイスカタログを再取得します。`.musubix/` には一切触れません
160
+ (`.musubix/` の成果物を管理するのは npm インストール経由の `upgrade` のみです)。
161
+ npm インストール経由の場合は `upgrade` の使用を推奨します。
162
+
97
163
  ## 配布・インストール
98
164
 
99
165
  同名 Skill の重複を避け、以下の読み込み方法から1つ選んでください。
100
166
 
101
167
  ### ネイティブプラグイン
102
168
 
169
+ どちらか一方だけを実行してください(両方は不要です):
170
+
171
+ ```sh
172
+ copilot plugin install ./musubix3 # ローカルクローンから(その親ディレクトリで実行)
173
+ ```
174
+
103
175
  ```sh
104
- copilot plugin install ./musubix3
105
- copilot plugin install nahisaho/musubix3
176
+ copilot plugin install nahisaho/musubix3 # 公開GitHubリポジトリから(ローカルクローン不要)
106
177
  ```
107
178
 
108
179
  リポジトリ直下の `plugin.json` が唯一のプラグイン定義元であり、
109
180
  `.github/skills/` を参照します。Git からのプラグイン導入だけでは npm エンジンの
110
181
  依存解決・ビルドは行われません。CLI は別途ビルド、または npm で導入してください。
111
182
 
112
- `npx musubix3 plugin-install` は `copilot plugin install <package-root>` を実行する
113
- だけで、Copilot 内部を編集しません。永続的なローカルパスには
114
- `npm install --save-dev --save-exact musubix3@latest` と
115
- `npx --no-install musubix3 plugin-install` を推奨します。
116
- 一時的な npx キャッシュのパスに依存しないでください。
183
+ 同じ `copilot plugin install` を実行する第三の方法として、一時的な npx
184
+ キャッシュではなく永続的なローカルパスを使いたい場合は、上記2つのコマンドの
185
+ **代わりに**(両方ではなく)次を実行します:
186
+
187
+ ```sh
188
+ npm install --save-dev --save-exact musubix3@latest
189
+ npx --no-install musubix3 plugin-install
190
+ ```
191
+
192
+ `plugin-install` は `copilot plugin install <package-root>` を実行するだけで
193
+ Copilot 内部を編集せず、[クイックスタート](#クイックスタート)のnpmインストール経由の
194
+ Skillコピールートとは無関係です(`init` は実行されず、`.github/skills/` へ
195
+ ファイルはコピーされません)。同一プロジェクトで `npx musubix3 init` と
196
+ 一緒に実行しないでください。
117
197
 
118
198
  ### ネイティブマーケットプレイス
119
199
 
@@ -245,6 +325,7 @@ npx musubix3 tdd green TEST-EXAMPLE-002 --requirement REQ-EXAMPLE-002 --command
245
325
  | コマンド | 動作 |
246
326
  |---|---|
247
327
  | `init [--dry-run] [--force] [--feature slug]` | 既存ファイル保持の配置。`install` は別名 |
328
+ | `upgrade [--dry-run]` | 同梱Skillファイルのみ更新。config・constitution・機能成果物には触れない |
248
329
  | `plugin-install` | ネイティブ Copilot インストーラーを呼び出す |
249
330
  | `requirements validate <file>` | ID・優先度・EARS 形式検査 |
250
331
  | `constitution validate [file]` | 版・原則・測定可能な規則の定義検査 |
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # musubix3
2
2
 
3
- **Latest release v0.1.13 · GitHub Copilot CLI only · Node.js ≥20 · TypeScript · MIT**
3
+ **Latest release v0.1.14 · GitHub Copilot CLI only · Node.js ≥20 · TypeScript · MIT**
4
4
 
5
5
  [日本語](README-ja.md)
6
6
 
@@ -52,6 +52,27 @@ does this repository's configured policy consider the change ready?”
52
52
 
53
53
  ## Quick start
54
54
 
55
+ There are two ways to load musubix3's skills into a project — pick exactly
56
+ one per project, never both:
57
+
58
+ - **`npm install` (this section, recommended)**: add `musubix3` as a project
59
+ dev dependency, then run `npx musubix3 init` to copy the skills into
60
+ `.github/skills/` and scaffold starter `.musubix/` artifacts. Version and
61
+ upgrades are tracked in your project's `package.json`/lockfile
62
+ (`npm install ...@latest` + `npx musubix3 upgrade`); see
63
+ [Upgrade](#upgrade). Recommended because the skills and starter SDD
64
+ artifacts are committed to the repository itself, so every contributor and
65
+ CI job gets the same reproducible setup without each of them running a
66
+ separate plugin install.
67
+ - **`copilot plugin install`** (native plugin/marketplace route): register
68
+ musubix3 directly with Copilot CLI's own plugin manager — no npm
69
+ dependency is added to the project, and no files are copied into
70
+ `.github/skills/`. Upgraded with `copilot plugin update musubix3` (or the
71
+ marketplace equivalent). See
72
+ [Distribution options](#distribution-options) for the exact commands.
73
+
74
+ The rest of this section documents the npm install route.
75
+
55
76
  For a reproducible project-local installation:
56
77
 
57
78
  ```sh
@@ -97,15 +118,65 @@ targets and paths escaping the project are refused.
97
118
  The starter is deliberately **not release-ready**: replace its example, implement
98
119
  and test it, and configure real check commands before expecting the gate to pass.
99
120
 
121
+ ## Upgrade
122
+
123
+ `upgrade` is available starting with 0.1.14 (not in 0.1.13 or earlier — check
124
+ with `npm view musubix3 versions`).
125
+
126
+ For the npm-installed route (`init`/repository-local skills):
127
+
128
+ ```sh
129
+ npm install --save-dev --save-exact musubix3@latest
130
+ npx --no-install musubix3 upgrade --dry-run
131
+ npx --no-install musubix3 upgrade
132
+ ```
133
+
134
+ `upgrade` refreshes only the bundled `.github/skills/sdd-*` files that differ
135
+ from the installed package version. It never creates, replaces, or deletes
136
+ `.musubix/config.json`, `.musubix/policy-baseline.json`,
137
+ `.musubix/constitution.md`, ADRs, feature artifacts, evidence, or
138
+ `.gitignore` — those are yours to keep customizing. It is idempotent: it
139
+ compares against the currently installed package's skill files, so running it
140
+ again without first installing a newer `musubix3` version reports every skill
141
+ file as `unchanged`. Review `--dry-run` first, same as `init`.
142
+
143
+ `init --force` remains available for replacing bundled/managed paths more
144
+ broadly (including `.musubix/config.json`, `constitution.md`, and the
145
+ starter feature's `requirements.md`/`design.md`), but it overwrites
146
+ customized content in those files, so prefer `upgrade` for routine version
147
+ bumps.
148
+
149
+ For the native plugin route:
150
+
151
+ ```sh
152
+ copilot plugin update musubix3
153
+ ```
154
+
155
+ For the native marketplace route:
156
+
157
+ ```sh
158
+ copilot plugin marketplace update musubix3-marketplace
159
+ copilot plugin update musubix3
160
+ ```
161
+
162
+ These delegate to Copilot's own plugin manager, which re-fetches
163
+ `plugin.json`/the marketplace catalog; they do not touch `.musubix/` at all
164
+ (only the npm-installed route manages `.musubix/` artifacts).
165
+
100
166
  ## Distribution options
101
167
 
102
168
  Choose one skill-loading route to avoid duplicate skill names.
103
169
 
104
170
  ### Native plugin (direct)
105
171
 
172
+ Pick exactly one of the following (not both):
173
+
174
+ ```sh
175
+ copilot plugin install ./musubix3 # local clone, from its parent directory
176
+ ```
177
+
106
178
  ```sh
107
- copilot plugin install ./musubix3 # built/local clone, from its parent
108
- copilot plugin install nahisaho/musubix3 # published GitHub repository
179
+ copilot plugin install nahisaho/musubix3 # published GitHub repository, no local clone needed
109
180
  ```
110
181
 
111
182
  `plugin.json` at the repository root is the source of truth and references
@@ -113,11 +184,20 @@ copilot plugin install nahisaho/musubix3 # published GitHub repository
113
184
  services. Git installs do not compile/install the npm engine: build the clone or
114
185
  install the npm package separately when running `npx musubix3` commands.
115
186
 
116
- From an installed npm package, `npx musubix3 plugin-install` delegates directly to
117
- `copilot plugin install <absolute-package-root>`. It does not edit Copilot
118
- internals. For a durable local plugin path, prefer
119
- `npm install --save-dev --save-exact musubix3@latest`
120
- and `npx --no-install musubix3 plugin-install` over an ephemeral npx cache.
187
+ There is a third way to run the same `copilot plugin install`, useful only if
188
+ you want a durable local path instead of an ephemeral npx cache — do this
189
+ **instead of**, not in addition to, the two commands above:
190
+
191
+ ```sh
192
+ npm install --save-dev --save-exact musubix3@latest
193
+ npx --no-install musubix3 plugin-install
194
+ ```
195
+
196
+ `plugin-install` only calls `copilot plugin install <absolute-package-root>`
197
+ for you; it does not edit Copilot internals, and it is unrelated to the
198
+ npm-installed skill-copy route in [Quick start](#quick-start) — it never runs
199
+ `init` and never copies files into `.github/skills/`. Do not run both this and
200
+ `npx musubix3 init` in the same project.
121
201
 
122
202
  ### Native marketplace
123
203
 
@@ -290,6 +370,7 @@ validation/gate or requested solver failure, **2** usage, I/O or malformed confi
290
370
  | Command | Behavior |
291
371
  |---|---|
292
372
  | `init [--dry-run] [--force] [--feature slug]` | Preserve-first skills/artifacts installation; `install` alias |
373
+ | `upgrade [--dry-run]` | Refresh bundled skill files only; never touches config, constitution, or feature artifacts |
293
374
  | `plugin-install` | Invoke native Copilot installer (no internal config edits) |
294
375
  | `requirements validate <file>` | IDs, priorities, declared/detected EARS pattern |
295
376
  | `constitution validate [file]` | Versioned principles and measurable rule definitions |
@@ -17,4 +17,10 @@ export declare function isTraceSource(path: string): boolean;
17
17
  export declare function isSkillSource(path: string): boolean;
18
18
  export declare function isArtifact(path: string): boolean;
19
19
  export declare function evidenceInputPaths(paths: string[]): string[];
20
+ export declare const FILE_READ_CONCURRENCY = 256;
21
+ /** @id CODE-BOUNDED-FILE-READ-CONCURRENCY-001
22
+ * @implements REQ-BOUNDED-FILE-READ-CONCURRENCY-001 REQ-BOUNDED-FILE-READ-CONCURRENCY-002
23
+ * @design DES-BOUNDED-FILE-READ-CONCURRENCY-001
24
+ */
25
+ export declare function mapWithConcurrency<T, R>(items: T[], limit: number, worker: (item: T, index: number) => Promise<R>): Promise<R[]>;
20
26
  export declare function snapshot(root: string, paths: string[]): Promise<Record<string, string>>;
@@ -153,8 +153,29 @@ export function evidenceInputPaths(paths) {
153
153
  && !/^\.github\/skills\//.test(path)
154
154
  && !/(?:^|\/)(?:logs?|session-logs)\//.test(path));
155
155
  }
156
+ // Fixed pool size chosen to stay comfortably under common OS file-descriptor
157
+ // limits (commonly 1024 on Linux/WSL) even on projects with large,
158
+ // unexcluded vendored source trees (ADR-0018).
159
+ export const FILE_READ_CONCURRENCY = 256;
160
+ /** @id CODE-BOUNDED-FILE-READ-CONCURRENCY-001
161
+ * @implements REQ-BOUNDED-FILE-READ-CONCURRENCY-001 REQ-BOUNDED-FILE-READ-CONCURRENCY-002
162
+ * @design DES-BOUNDED-FILE-READ-CONCURRENCY-001
163
+ */
164
+ export async function mapWithConcurrency(items, limit, worker) {
165
+ const results = new Array(items.length);
166
+ let cursor = 0;
167
+ async function run() {
168
+ while (cursor < items.length) {
169
+ const index = cursor;
170
+ cursor += 1;
171
+ results[index] = await worker(items[index], index);
172
+ }
173
+ }
174
+ await Promise.all(Array.from({ length: Math.min(limit, items.length) }, run));
175
+ return results;
176
+ }
156
177
  export async function snapshot(root, paths) {
157
- const entries = await Promise.all(paths.map(async (path) => [path, digest(await readFile(await safePath(root, path)))]));
178
+ const entries = await mapWithConcurrency(paths, FILE_READ_CONCURRENCY, async (path) => [path, digest(await readFile(await safePath(root, path)))]);
158
179
  return Object.fromEntries(entries);
159
180
  }
160
181
  //# sourceMappingURL=files.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"files.js","sourceRoot":"","sources":["../../../../packages/analysis/src/files.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC9F,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,WAAW,CAAC;AAExE,MAAM,QAAQ,GAAG,IAAI,GAAG,CAAC,CAAC,MAAM,EAAE,cAAc,EAAE,MAAM,EAAE,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,OAAO,EAAE,QAAQ,EAAE,aAAa,CAAC,CAAC,CAAC;AAChI,MAAM,6BAA6B,GAAG,IAAI,GAAG,CAAC,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC,CAAC;AAEjE,MAAM,UAAU,QAAQ,CAAC,IAAY;IACnC,OAAO,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AACnC,CAAC;AAED,MAAM,UAAU,MAAM,CAAC,IAAY,EAAE,IAAY;IAC/C,MAAM,QAAQ,GAAG,OAAO,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IACrC,MAAM,GAAG,GAAG,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,QAAQ,CAAC,CAAC;IAC9C,IAAI,GAAG,KAAK,IAAI,IAAI,GAAG,CAAC,UAAU,CAAC,KAAK,GAAG,EAAE,CAAC,IAAI,UAAU,CAAC,GAAG,CAAC;QAAE,MAAM,IAAI,KAAK,CAAC,8BAA8B,IAAI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AK,CAAC,CAAC;QACtD,CAAC;IACH,CAAC;IACD,MAAM,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,IAAI,CAAC,GAAG,CAAC,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC,EAAE,EAAE,GAAG,CAAC,CAAC,CAAC;IAC9E,OAAO,OAAO,CAAC;AACjB,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,QAAQ,CAAC,IAAY,EAAE,KAAe;IAC1D,MAAM,OAAO,GAAG,MAAM,kBAAkB,CAAC,KAAK,EAAE,qBAAqB,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE,CAAC,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,QAAQ,CAAC,MAAM,QAAQ,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC,CAAC,CAAU,CAAC,CAAC;IAC5J,OAAO,MAAM,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC;AACrC,CAAC"}
@@ -38,6 +38,10 @@ export interface CodeGraph {
38
38
  fingerprints: Record<string, string>;
39
39
  }
40
40
  export declare function graphInputs(root: string): Promise<string[]>;
41
+ /** @id CODE-BOUNDED-FILE-READ-CONCURRENCY-002
42
+ * @implements REQ-BOUNDED-FILE-READ-CONCURRENCY-002
43
+ * @design DES-BOUNDED-FILE-READ-CONCURRENCY-002
44
+ */
41
45
  export declare function indexGraph(root: string, persist?: boolean): Promise<CodeGraph>;
42
46
  export declare function loadGraph(root: string): Promise<CodeGraph>;
43
47
  export declare function graphImpact(graph: CodeGraph, query: string): {
@@ -1,10 +1,14 @@
1
1
  import ts from 'typescript';
2
2
  import { dirname, isAbsolute, posix, relative, resolve } from 'node:path';
3
3
  import { error } from '../../domain/src/index.js';
4
- import { files, isSource, isTraceSource, portable, readText, snapshot, writeJson } from './files.js';
4
+ import { FILE_READ_CONCURRENCY, files, isSource, isTraceSource, mapWithConcurrency, portable, readText, snapshot, writeJson } from './files.js';
5
5
  export async function graphInputs(root) {
6
6
  return (await files(root)).filter((p) => isTraceSource(p) || /(?:^|\/)(?:tsconfig[^/]*\.json|package\.json|go\.mod|pubspec\.yaml)$/.test(p));
7
7
  }
8
+ /** @id CODE-BOUNDED-FILE-READ-CONCURRENCY-002
9
+ * @implements REQ-BOUNDED-FILE-READ-CONCURRENCY-002
10
+ * @design DES-BOUNDED-FILE-READ-CONCURRENCY-002
11
+ */
8
12
  export async function indexGraph(root, persist = true) {
9
13
  const paths = await graphInputs(root);
10
14
  const typedSources = paths.filter(isSource);
@@ -241,73 +245,73 @@ export async function indexGraph(root, persist = true) {
241
245
  }
242
246
  visit(source);
243
247
  }
244
- const rustTexts = new Map(await Promise.all(rustSources.map(async (path) => [path, await readText(root, path)])));
248
+ const rustTexts = new Map(await mapWithConcurrency(rustSources, FILE_READ_CONCURRENCY, async (path) => [path, await readText(root, path)]));
245
249
  for (const [path, text] of rustTexts)
246
250
  indexRustSymbols(path, text, graph);
247
251
  for (const [path, text] of rustTexts)
248
252
  indexRustRelations(path, text, known, graph);
249
- const pythonTexts = new Map(await Promise.all(pythonSources.map(async (path) => [path, await readText(root, path)])));
253
+ const pythonTexts = new Map(await mapWithConcurrency(pythonSources, FILE_READ_CONCURRENCY, async (path) => [path, await readText(root, path)]));
250
254
  for (const [path, text] of pythonTexts)
251
255
  indexPythonSymbols(path, text, graph);
252
256
  for (const [path, text] of pythonTexts)
253
257
  indexPythonRelations(path, text, known, graph);
254
- const goTexts = new Map(await Promise.all(goSources.map(async (path) => [path, await readText(root, path)])));
258
+ const goTexts = new Map(await mapWithConcurrency(goSources, FILE_READ_CONCURRENCY, async (path) => [path, await readText(root, path)]));
255
259
  for (const [path, text] of goTexts)
256
260
  indexGoSymbols(path, text, graph);
257
261
  const goModule = paths.includes('go.mod') ? /^module\s+(\S+)/m.exec(await readText(root, 'go.mod'))?.[1] ?? null : null;
258
262
  for (const [path, text] of goTexts)
259
263
  indexGoRelations(path, text, known, graph, goModule);
260
- const javaTexts = new Map(await Promise.all(javaSources.map(async (path) => [path, await readText(root, path)])));
264
+ const javaTexts = new Map(await mapWithConcurrency(javaSources, FILE_READ_CONCURRENCY, async (path) => [path, await readText(root, path)]));
261
265
  const javaTypes = new Map();
262
266
  for (const [path, text] of javaTexts)
263
267
  indexJavaSymbols(path, text, graph, javaTypes);
264
268
  for (const [path, text] of javaTexts)
265
269
  indexJavaRelations(path, text, graph, javaTypes);
266
- const cppTexts = new Map(await Promise.all(cppSources.map(async (path) => [path, await readText(root, path)])));
270
+ const cppTexts = new Map(await mapWithConcurrency(cppSources, FILE_READ_CONCURRENCY, async (path) => [path, await readText(root, path)]));
267
271
  for (const [path, text] of cppTexts)
268
272
  indexCppSymbols(path, text, graph);
269
273
  for (const [path, text] of cppTexts)
270
274
  indexCppRelations(path, text, known, graph);
271
- const csharpTexts = new Map(await Promise.all(csharpSources.map(async (path) => [path, await readText(root, path)])));
275
+ const csharpTexts = new Map(await mapWithConcurrency(csharpSources, FILE_READ_CONCURRENCY, async (path) => [path, await readText(root, path)]));
272
276
  const csharpTypes = new Map();
273
277
  for (const [path, text] of csharpTexts)
274
278
  indexCsharpSymbols(path, text, graph, csharpTypes);
275
279
  for (const [path, text] of csharpTexts)
276
280
  indexCsharpRelations(path, text, graph, csharpTypes);
277
- const phpTexts = new Map(await Promise.all(phpSources.map(async (path) => [path, await readText(root, path)])));
281
+ const phpTexts = new Map(await mapWithConcurrency(phpSources, FILE_READ_CONCURRENCY, async (path) => [path, await readText(root, path)]));
278
282
  const phpTypes = new Map();
279
283
  for (const [path, text] of phpTexts)
280
284
  indexPhpSymbols(path, text, graph, phpTypes);
281
285
  for (const [path, text] of phpTexts)
282
286
  indexPhpRelations(path, text, known, graph, phpTypes);
283
- const rTexts = new Map(await Promise.all(rSources.map(async (path) => [path, await readText(root, path)])));
287
+ const rTexts = new Map(await mapWithConcurrency(rSources, FILE_READ_CONCURRENCY, async (path) => [path, await readText(root, path)]));
284
288
  for (const [path, text] of rTexts)
285
289
  indexRSymbols(path, text, graph);
286
290
  for (const [path, text] of rTexts)
287
291
  indexRRelations(path, text, known, graph);
288
- const juliaTexts = new Map(await Promise.all(juliaSources.map(async (path) => [path, await readText(root, path)])));
292
+ const juliaTexts = new Map(await mapWithConcurrency(juliaSources, FILE_READ_CONCURRENCY, async (path) => [path, await readText(root, path)]));
289
293
  const juliaModules = new Map();
290
294
  for (const [path, text] of juliaTexts)
291
295
  indexJuliaSymbols(path, text, graph, juliaModules);
292
296
  for (const [path, text] of juliaTexts)
293
297
  indexJuliaRelations(path, text, known, graph, juliaModules);
294
- const kotlinTexts = new Map(await Promise.all(kotlinSources.map(async (path) => [path, await readText(root, path)])));
298
+ const kotlinTexts = new Map(await mapWithConcurrency(kotlinSources, FILE_READ_CONCURRENCY, async (path) => [path, await readText(root, path)]));
295
299
  const kotlinDeclarations = new Map();
296
300
  for (const [path, text] of kotlinTexts)
297
301
  indexKotlinSymbols(path, text, graph, kotlinDeclarations);
298
302
  for (const [path, text] of kotlinTexts)
299
303
  indexKotlinRelations(path, text, known, graph, kotlinDeclarations);
300
- const rubyTexts = new Map(await Promise.all(rubySources.map(async (path) => [path, await readText(root, path)])));
304
+ const rubyTexts = new Map(await mapWithConcurrency(rubySources, FILE_READ_CONCURRENCY, async (path) => [path, await readText(root, path)]));
301
305
  for (const [path, text] of rubyTexts)
302
306
  indexRubySymbols(path, text, graph);
303
307
  for (const [path, text] of rubyTexts)
304
308
  indexRubyRelations(path, text, known, graph);
305
- const swiftTexts = new Map(await Promise.all(swiftSources.map(async (path) => [path, await readText(root, path)])));
309
+ const swiftTexts = new Map(await mapWithConcurrency(swiftSources, FILE_READ_CONCURRENCY, async (path) => [path, await readText(root, path)]));
306
310
  for (const [path, text] of swiftTexts)
307
311
  indexSwiftSymbols(path, text, graph);
308
312
  for (const [path, text] of swiftTexts)
309
313
  indexSwiftRelations(path, text, graph);
310
- const dartTexts = new Map(await Promise.all(dartSources.map(async (path) => [path, await readText(root, path)])));
314
+ const dartTexts = new Map(await mapWithConcurrency(dartSources, FILE_READ_CONCURRENCY, async (path) => [path, await readText(root, path)]));
311
315
  const dartPackages = new Map();
312
316
  for (const manifest of paths.filter((path) => path.endsWith('pubspec.yaml'))) {
313
317
  const name = /^\s*name\s*:\s*([A-Za-z_]\w*)\s*$/m.exec(await readText(root, manifest))?.[1];
@@ -331,35 +335,35 @@ export async function indexGraph(root, persist = true) {
331
335
  }
332
336
  indexDartRelations(path, text, known, graph, packageInfo);
333
337
  }
334
- const scalaTexts = new Map(await Promise.all(scalaSources.map(async (path) => [path, await readText(root, path)])));
338
+ const scalaTexts = new Map(await mapWithConcurrency(scalaSources, FILE_READ_CONCURRENCY, async (path) => [path, await readText(root, path)]));
335
339
  const scalaDeclarations = new Map();
336
340
  for (const [path, text] of scalaTexts)
337
341
  indexScalaSymbols(path, text, graph, scalaDeclarations);
338
342
  for (const [path, text] of scalaTexts)
339
343
  indexScalaRelations(path, text, graph, scalaDeclarations);
340
- const elixirTexts = new Map(await Promise.all(elixirSources.map(async (path) => [path, await readText(root, path)])));
344
+ const elixirTexts = new Map(await mapWithConcurrency(elixirSources, FILE_READ_CONCURRENCY, async (path) => [path, await readText(root, path)]));
341
345
  const elixirModules = new Map();
342
346
  for (const [path, text] of elixirTexts)
343
347
  indexElixirSymbols(path, text, graph, elixirModules);
344
348
  for (const [path, text] of elixirTexts)
345
349
  indexElixirRelations(path, text, known, graph, elixirModules);
346
- const haskellTexts = new Map(await Promise.all(haskellSources.map(async (path) => [path, await readText(root, path)])));
350
+ const haskellTexts = new Map(await mapWithConcurrency(haskellSources, FILE_READ_CONCURRENCY, async (path) => [path, await readText(root, path)]));
347
351
  const haskellModules = new Map();
348
352
  for (const [path, text] of haskellTexts)
349
353
  indexHaskellSymbols(path, text, graph, haskellModules);
350
354
  for (const [path, text] of haskellTexts)
351
355
  indexHaskellRelations(path, text, graph, haskellModules);
352
- const luaTexts = new Map(await Promise.all(luaSources.map(async (path) => [path, await readText(root, path)])));
356
+ const luaTexts = new Map(await mapWithConcurrency(luaSources, FILE_READ_CONCURRENCY, async (path) => [path, await readText(root, path)]));
353
357
  for (const [path, text] of luaTexts)
354
358
  indexLuaSymbols(path, text, graph);
355
359
  for (const [path, text] of luaTexts)
356
360
  indexLuaRelations(path, text, known, graph);
357
- const zigTexts = new Map(await Promise.all(zigSources.map(async (path) => [path, await readText(root, path)])));
361
+ const zigTexts = new Map(await mapWithConcurrency(zigSources, FILE_READ_CONCURRENCY, async (path) => [path, await readText(root, path)]));
358
362
  for (const [path, text] of zigTexts)
359
363
  indexZigSymbols(path, text, graph);
360
364
  for (const [path, text] of zigTexts)
361
365
  indexZigRelations(path, text, known, graph);
362
- const solidityTexts = new Map(await Promise.all(soliditySources.map(async (path) => [path, await readText(root, path)])));
366
+ const solidityTexts = new Map(await mapWithConcurrency(soliditySources, FILE_READ_CONCURRENCY, async (path) => [path, await readText(root, path)]));
363
367
  for (const [path, text] of solidityTexts)
364
368
  indexSoliditySymbols(path, text, graph);
365
369
  for (const [path, text] of solidityTexts)
@@ -368,13 +372,13 @@ export async function indexGraph(root, persist = true) {
368
372
  indexObjectiveCSymbols(path, text, graph);
369
373
  for (const [path, text] of objectiveCSources.map((path) => [path, cppTexts.get(path)]))
370
374
  indexObjectiveCRelations(path, text, graph);
371
- const fsharpTexts = new Map(await Promise.all(fsharpSources.map(async (path) => [path, await readText(root, path)])));
375
+ const fsharpTexts = new Map(await mapWithConcurrency(fsharpSources, FILE_READ_CONCURRENCY, async (path) => [path, await readText(root, path)]));
372
376
  const fsharpDeclarations = new Map();
373
377
  for (const [path, text] of fsharpTexts)
374
378
  indexFsharpSymbols(path, text, graph, fsharpDeclarations);
375
379
  for (const [path, text] of fsharpTexts)
376
380
  indexFsharpRelations(path, text, graph, fsharpDeclarations);
377
- const vbTexts = new Map(await Promise.all(vbSources.map(async (path) => [path, await readText(root, path)])));
381
+ const vbTexts = new Map(await mapWithConcurrency(vbSources, FILE_READ_CONCURRENCY, async (path) => [path, await readText(root, path)]));
378
382
  const vbDeclarations = new Map();
379
383
  for (const [path, text] of vbTexts)
380
384
  indexVbSymbols(path, text, graph, vbDeclarations);