Skip to content

upd ai docs branch#138

Merged
ColtonPayne merged 107 commits intoai-documentationfrom
main
Apr 8, 2026
Merged

upd ai docs branch#138
ColtonPayne merged 107 commits intoai-documentationfrom
main

Conversation

@ColtonPayne
Copy link
Copy Markdown
Collaborator

No description provided.

pshak02 and others added 30 commits January 15, 2026 10:46
…ings

Fixed critical bug where check_all_clause_satisfaction was passing the
same grounding twice instead of filtering by clause bounds.

Problem:
- check_node/edge_grounding_threshold_satisfaction received unfiltered
  groundings for both total and qualified parameters
- This caused incorrect threshold calculations for both 'total' and
  'available' quantifier types
- Example: 5/5 = 100% instead of correct 2/4 = 50%

Solution:
- Extract clause_bnd from clause[3]
- Call get_qualified_node/edge_groundings to filter by clause bounds
- Pass filtered groundings as qualified_groundings parameter

Changes:
- interpretation.py: Added filtering in check_all_clause_satisfaction
- interpretation_fp.py: Added same fix for consistency
- test_ground_rule_helpers.py: Added comprehensive tests demonstrating
  the bug and validating the fix for both 'available' and 'total'
  quantifier types

Tests:
- test_check_all_clause_satisfaction_available_threshold_bug138
- test_check_all_clause_satisfaction_total_threshold_bug138

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Updated test cases to work with the corrected check_all_clause_satisfaction:

1. Made FakeWorld.is_satisfied backward compatible:
   - Uses bounds_by_label for interval containment checks (new BUG-138 tests)
   - Falls back to truth_by_label for legacy tests

2. Updated existing test clauses to use proper 5-element structure:
   - Added clause_bnd and operator to match real clause structure
   - Updated: test_check_all_clause_satisfaction_calls_both_helpers_and_ands_results
   - Updated: test_check_all_clause_satisfaction_all_true_returns_true
   - Updated: test_check_all_clause_satisfaction_multiple_clauses_no_short_circuit

3. Simplified mock assertions to check call counts instead of exact arguments
   since qualified_groundings is now passed as second parameter

All 142 tests now pass.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Fix BUG-138: Correct threshold checking by filtering qualified groundings
ColtonPayne and others added 29 commits February 22, 2026 09:19
Two new test cases validate that ground node names in edge clauses are
correctly pre-populated as groundings, enabling neighbor-based edge
discovery when the exact edge pair isn't directly enumerable.

- test_partial_edge_grounding: ground node in first position
- test_partial_edge_grounding_reverse: ground node in second position

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@ColtonPayne ColtonPayne merged commit 78252b9 into ai-documentation Apr 8, 2026
3 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants