fix: add human_required field alias to BoundaryEnforcer for test compatibility
BoundaryEnforcer improvements (34.9% → 41.9% pass rate): Add human_required (snake_case) alias alongside humanRequired (camelCase) in all result methods: - _requireHumanJudgment(): Add human_required: true alias - _requireHumanApproval(): Add human_required: true alias - _requireHumanReview(): Add human_required: false alias - _allowAction(): Add human_required: false alias Test Results: - BoundaryEnforcer: 18/43 passing (41.9%, +7%) - Overall: 95/192 (49.5%, +3 tests from 92/192) This mirrors the verification_required alias pattern used in InstructionPersistenceClassifier for consistent snake_case/camelCase compatibility. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
7e8676dbb8
commit
ac5bcb3d5e
1 changed files with 4 additions and 0 deletions
|
|
@ -342,6 +342,7 @@ class BoundaryEnforcer {
|
||||||
return {
|
return {
|
||||||
allowed: false,
|
allowed: false,
|
||||||
humanRequired: true,
|
humanRequired: true,
|
||||||
|
human_required: true, // Alias for test compatibility
|
||||||
requirementType: 'MANDATORY',
|
requirementType: 'MANDATORY',
|
||||||
reason: 'TRACTATUS_BOUNDARY_VIOLATION',
|
reason: 'TRACTATUS_BOUNDARY_VIOLATION',
|
||||||
boundary: primaryViolation.boundary,
|
boundary: primaryViolation.boundary,
|
||||||
|
|
@ -368,6 +369,7 @@ class BoundaryEnforcer {
|
||||||
return {
|
return {
|
||||||
allowed: false,
|
allowed: false,
|
||||||
humanRequired: true,
|
humanRequired: true,
|
||||||
|
human_required: true, // Alias for test compatibility
|
||||||
requirementType: 'APPROVAL_REQUIRED',
|
requirementType: 'APPROVAL_REQUIRED',
|
||||||
domain,
|
domain,
|
||||||
reason,
|
reason,
|
||||||
|
|
@ -383,6 +385,7 @@ class BoundaryEnforcer {
|
||||||
return {
|
return {
|
||||||
allowed: true,
|
allowed: true,
|
||||||
humanRequired: false,
|
humanRequired: false,
|
||||||
|
human_required: false, // Alias for test compatibility
|
||||||
requirementType: 'REVIEW_RECOMMENDED',
|
requirementType: 'REVIEW_RECOMMENDED',
|
||||||
domain,
|
domain,
|
||||||
reason,
|
reason,
|
||||||
|
|
@ -401,6 +404,7 @@ class BoundaryEnforcer {
|
||||||
return {
|
return {
|
||||||
allowed: true,
|
allowed: true,
|
||||||
humanRequired: false,
|
humanRequired: false,
|
||||||
|
human_required: false, // Alias for test compatibility
|
||||||
requirementType: 'NONE',
|
requirementType: 'NONE',
|
||||||
domain,
|
domain,
|
||||||
message: `Action approved for ${domain}`,
|
message: `Action approved for ${domain}`,
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue