Skip to content
Closed
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
65 changes: 65 additions & 0 deletions specification/loops/dk5xvv-shared-check-imports/loop.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
{
"name": "dk5xvv-shared-check-imports",
"goal": "Prove tracked ESLint and Desktop modules resolve in both snapshots, completion configuration receives a known classification, and genuinely missing imports still fail.",
"createdAt": "2026-12-01T10:16:36.691Z",
"updatedAt": "2026-12-01T10:36:23.288Z",
"template": "bug-fix",
"templateLineage": ["bug-fix"],
"enforceOrder": true,
"regressionCommits": 1,
"steps": [
{
"id": "spec",
"title": "Identify the failing behavior, expected behavior, and reproduction.",
"status": "complete",
"completedAt": "2026-12-01T10:18:47.764Z",
"evidence": "Saved t2m0n5 0f6472cf and h12bs4 31ba9dca receipts report pre-#629 uncertainty. Current graph resolves ESLint and Desktop paths. Completion JSON falls through as other and should report global policy changes."
},
{
"id": "coverage",
"title": "Explain why existing standardized tests missed the bug; name the scenario, fixture, lifecycle or assertion gap and reusable test change.",
"status": "complete",
"completedAt": "2026-12-01T10:18:48.904Z",
"evidence": "Extend the classify-path example to cover the completion policy and exercise the reported ESLint and Desktop path patterns in the existing import-link cases. Existing queue removal case still validates genuine broken imports."
},
{
"id": "red",
"title": "Strengthen the existing standardized test; commit it before repair, run it failing with loop record --phase red, and preserve the assertion.",
"status": "complete",
"completedAt": "2026-12-01T10:20:04.010Z",
"evidence": "4a98f1d32a. Classifies paths by workspace and repository rules received other where global was expected. Both import-link cases passed on current main."
},
{
"id": "implement",
"title": "Implement the smallest repair without weakening the regression test.",
"status": "complete",
"completedAt": "2026-12-01T10:20:05.454Z",
"evidence": "Classify the completion manifest with other repository-wide policy files so its changes report the actual breadth."
},
{
"id": "green",
"title": "Rerun the same unchanged regression test at a separate fix commit with loop record --phase green; preserve passing proof.",
"status": "complete",
"completedAt": "2026-12-01T10:36:23.288Z",
"evidence": "The unchanged focused Vitest command passed at b65f62ccd1. Its red checkpoint at 4a98f1d32a failed on other versus global for the completion manifest."
},
{
"id": "siblings",
"title": "Run harness loop siblings to record the root cause and evaluate the same pattern across committed source.",
"status": "pending"
},
{
"id": "verify",
"title": "Run relevant project checks and affected UI browser flows with fresh inspected screenshots and no unexpected browser errors; preserve diagnostics and keep pending until proof passes.",
"status": "pending"
}
],
"evaluators": [
{
"id": "check",
"title": "Run the project check script.",
"command": "bun run check --item dk5xvv",
"step": "verify"
}
]
}
6 changes: 6 additions & 0 deletions specification/loops/dk5xvv-shared-check-imports/trace.ndjson
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{"event":"loop.created","timestamp":"2026-12-01T10:16:36.691Z","name":"dk5xvv-shared-check-imports","goal":"Prove tracked ESLint and Desktop modules resolve in both snapshots, completion configuration receives a known classification, and genuinely missing imports still fail.","template":"bug-fix","templateLineage":["bug-fix"]}
{"event":"step.completed","timestamp":"2026-12-01T10:18:47.764Z","loop":"dk5xvv-shared-check-imports","step":"spec","evidence":"Saved t2m0n5 0f6472cf and h12bs4 31ba9dca receipts report pre-#629 uncertainty. Current graph resolves ESLint and Desktop paths. Completion JSON falls through as other and should report global policy changes."}
{"event":"step.completed","timestamp":"2026-12-01T10:18:48.904Z","loop":"dk5xvv-shared-check-imports","step":"coverage","evidence":"Extend the classify-path example to cover the completion policy and exercise the reported ESLint and Desktop path patterns in the existing import-link cases. Existing queue removal case still validates genuine broken imports."}
{"event":"step.completed","timestamp":"2026-12-01T10:20:04.010Z","loop":"dk5xvv-shared-check-imports","step":"red","evidence":"4a98f1d32a. Classifies paths by workspace and repository rules received other where global was expected. Both import-link cases passed on current main."}
{"event":"step.completed","timestamp":"2026-12-01T10:20:05.454Z","loop":"dk5xvv-shared-check-imports","step":"implement","evidence":"Classify the completion manifest with other repository-wide policy files so its changes report the actual breadth."}
{"event":"step.completed","timestamp":"2026-12-01T10:36:23.288Z","loop":"dk5xvv-shared-check-imports","step":"green","evidence":"The unchanged focused Vitest command passed at b65f62ccd1. Its red checkpoint at 4a98f1d32a failed on other versus global for the completion manifest."}
2 changes: 2 additions & 0 deletions src/core/development-tooling/unitsConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ export const defaultGlobalFiles = [
'eslint.config.js',
'eslint.harness-rules.js',
'harness.audit.json',
// Completion policy can override the verification command for any module.
'harness.completion.json',
'harness.groups.json',
unitsConfigFile,
'harness.verify.json',
Expand Down
2 changes: 2 additions & 0 deletions test/examples/function.classify-path.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ test('Classifies paths by workspace and repository rules', () => {
'packages/web/src/lib/format.ts',
'test/unit/classify-path.test.ts',
'packages/shared/tokens.css',
'harness.completion.json',
'README.md',
'specification/units/example.json',
'specification/bug-classes/missing-import.json',
Expand All @@ -38,6 +39,7 @@ test('Classifies paths by workspace and repository rules', () => {
'source',
'test',
'global',
'global',
'ignored',
'registry',
'registry',
Expand Down
22 changes: 22 additions & 0 deletions test/utils/import-links.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ test('a file path next to import.meta stays a file link and directory paths stay
"const signing = resolve(import.meta.dirname, '../scripts/package-mac.ts');",
"const output = join(import.meta.dirname, '../../.cache/evidence');",
"const root = resolve(import.meta.dirname, '..');",
"const packages = resolve(import.meta.dirname, '../..');",
"const repositoryRoot = fileURLToPath(new URL('.', import.meta.url));",
"const assets = join(import.meta.dirname, './assets/');",
"const entitlements = join(import.meta.dirname, 'entitlements.plist');",
"const mode = import.meta.env.MODE ?? 'development';",
Expand Down Expand Up @@ -36,4 +38,24 @@ test('bundler queries and declaration files resolve to their tracked file', () =
'src/lib/icon.svg',
'./gone?url'
]);
const configs = [
['eslint.config.js', './eslint.harness-rules.js', 'eslint.harness-rules.js'],
['eslint.harness-rules.js', './eslint.reuse-rules.js', 'eslint.reuse-rules.js'],
[
'packages/desktop/eslint.harness-rules.js',
'../../eslint.reuse-rules.js',
'eslint.reuse-rules.js'
],
[
'packages/desktop/scripts/package-mac.ts',
'./brand-assets',
'packages/desktop/scripts/brand-assets.ts'
]
];
const files = new Set(configs.map(([, , target]) => target));
const imports = configs.map(([from, specifier]) => {
const [reference] = scanImports(`import '${specifier}';`, 'ts');
return resolveImport(from, reference, { ...context, files }).path;
});
expect(imports).toEqual(configs.map(([, , target]) => target));
});
Loading