Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
# Changelog

## 0.72.1 — 2026-10-03

### 修正

- `factory-reporter.json` の `host.profile` が `linux` の端末で、runtime errorの収集が無効になっていた
(`lattice runtime-errors diagnostics` が `collection: disabled`)。Latticeが受ける語の一覧に `linux` が無く、
設定全体を無効とみなしていた。工場のLinux workstation(rabbit)では、故障が1件も記録されていなかった。
dotagentsの契約と同じ5語(`server`・`mac`・`linux`・`wsl`・`windows-native`)を受ける。
- 変わらないこと: Windowsでは収集しない。storeの所有者と権限をPOSIXの形で確かめられないので、
書き込みを `store_unsafe` で止めている。設定の置き場(`%LOCALAPPDATA%\dotagents\factory-reporter\config.json`)も
読まない。`windows-native` の語は受けるが、記録は作られない。

## 0.72.0 — 2026-10-03

### runtime error記録: 落ちた面と例外の分類(`safe_context`)
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@quolu/lattice",
"version": "0.72.0",
"version": "0.72.1",
"description": "Schedulability compiler for multi-agent development: observe real code boundaries, refactor the conflicting seam, recompile the plan for parallel execution",
"author": {
"name": "Quo / クオ at kitepon.dev",
Expand Down
5 changes: 4 additions & 1 deletion src/runtime-errors.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@ const COMMAND_KIND = /^[a-z][a-z0-9-]*(?:\.[a-z][a-z0-9-]*)?$/;
const COMMAND_KIND_MAX = 48;
// Nodeが付けるerror code(ENOENT・ERR_MODULE_NOT_FOUND等)だけを通す。Lattice自身のcodeや任意文字列は`none`。
const CAUSE_CODE = /^(?:E[A-Z0-9]{2,15}|ERR_[A-Z0-9_]{1,60})$/;
// 工場の`factory-reporter.json`が名乗る端末の種類。dotagentsの契約(lib/factory/contract.mjs)と同じ語を
// 受ける——ここに無い語の端末は設定全体が無効とみなされ、故障を1件も記録しない。
const HOST_PROFILES = Object.freeze(['server', 'mac', 'linux', 'wsl', 'windows-native']);

const plain = (value) => typeof value === 'object' && value !== null && !Array.isArray(value);
const exact = (value, keys) => Object.keys(value).length === keys.length && keys.every((key) => Object.hasOwn(value, key));
Expand Down Expand Up @@ -83,7 +86,7 @@ function collectionEnabled(options = {}) {
return plain(config) && exact(config, ['schema_version', 'host', 'collection', 'reporting'])
&& config.schema_version === '1.0' && plain(config.host) && exact(config.host, ['id', 'profile'])
&& typeof config.host.id === 'string' && /^[a-z0-9][a-z0-9._-]{0,63}$/.test(config.host.id)
&& ['server', 'mac', 'wsl', 'windows-native'].includes(config.host.profile)
&& HOST_PROFILES.includes(config.host.profile)
&& plain(config.collection) && exact(config.collection, ['enabled']) && config.collection.enabled === true
&& canonicalReporting(config.reporting);
} catch {
Expand Down
19 changes: 19 additions & 0 deletions test/runtime-errors.test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,25 @@ test('config欠落・malformed・disabledでは収集せずstateへ一切触れ
}
});

test('工場が名乗るhost profileはすべて収集を有効にし、未知の語は無効にする', async () => {
// dotagentsの契約(lib/factory/contract.mjs)が認める語。`linux`を落とすと、その端末は故障を1件も記録しない。
for (const profile of ['server', 'mac', 'linux', 'wsl', 'windows-native']) {
const workspace = await makeWorkspace({ ...VALID_CONFIG, host: { id: 'test-host', profile } });
try {
assert.equal(runtimeCollectionEnabled(process.env, workspace.configPath), true, profile);
assert.equal(runtimeErrorsDiagnostics(workspace.options).collection, 'enabled', profile);
} finally {
await rm(workspace.root, { recursive: true, force: true });
}
}
const unknown = await makeWorkspace({ ...VALID_CONFIG, host: { id: 'test-host', profile: 'linux-native' } });
try {
assert.equal(runtimeCollectionEnabled(process.env, unknown.configPath), false);
} finally {
await rm(unknown.root, { recursive: true, force: true });
}
});

test('同一原因はfingerprint集約でcount/last_seen/sequenceと発生版が進む', async () => {
const workspace = await makeWorkspace();
try {
Expand Down