Relax boundary check for test fixtures

This commit is contained in:
Andrey Avtomonov 2026-05-12 01:34:18 +02:00
parent 02e096a8e3
commit 0153ac4945
2 changed files with 8 additions and 1 deletions

View file

@ -95,7 +95,7 @@ function scansForContextProductionLlmBoundaries(relativePath) {
}
function scansForForbiddenIdentifiers(relativePath) {
return isCodeSource(relativePath) || isRuntimeAsset(relativePath);
return (isCodeSource(relativePath) && !isTestSource(relativePath)) || isRuntimeAsset(relativePath);
}
function skipsIdentifierScan(relativePath) {

View file

@ -65,6 +65,13 @@ describe('scanFileContent', () => {
assert.equal(scanFileContent('python/ktx-sl/openspec/specs/semantic-layer/spec.md', name).length, 0);
});
it('allows product identifiers in test fixtures', () => {
const name = lowerProductName();
assert.equal(scanFileContent('packages/cli/src/setup.test.ts', `project: ${name}-dev`).length, 0);
assert.equal(scanFileContent('packages/context/src/ingest/importer.test.ts', `email: system@${name}.dev`).length, 0);
});
it('allows public package identifiers in release packaging and managed runtime source', () => {
const name = lowerProductName();