Add built-in hard reject for projects with zero uploaded files
Some checks failed
Build and Push Docker Image / build (push) Has been cancelled
Some checks failed
Build and Push Docker Image / build (push) Has been cancelled
Projects with no files are now automatically rejected before AI screening runs, regardless of whether a DOCUMENT_CHECK rule is configured. This prevents the AI from incorrectly passing projects that have no supporting documents. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -796,6 +796,19 @@ export async function executeFilteringRules(
|
||||
let hasFailed = false
|
||||
let hasFlagged = false
|
||||
|
||||
// Built-in hard check: projects with zero files always fail
|
||||
const fileCount = project.files?.length ?? 0
|
||||
if (fileCount === 0) {
|
||||
ruleResults.push({
|
||||
ruleId: '__builtin_zero_files',
|
||||
ruleName: 'Required Documents Check',
|
||||
ruleType: 'DOCUMENT_CHECK',
|
||||
passed: false,
|
||||
action: 'REJECT',
|
||||
})
|
||||
hasFailed = true
|
||||
}
|
||||
|
||||
for (const rule of nonAiRules) {
|
||||
let result: { passed: boolean; action: 'PASS' | 'REJECT' | 'FLAG' }
|
||||
if (rule.ruleType === 'FIELD_BASED') {
|
||||
|
||||
Reference in New Issue
Block a user