Commit Graph
1077 Commits
Author SHA1 Message Date
KaifAhmad1 d5e2637fbd Release v0.3.0-alpha for testing
- Decision tracking system with comprehensive lifecycle management
- Advanced KG algorithms and vector store features
- Enhanced context module with unified AgentContext
- Production-ready architecture with validation
- Fixed test suite issues for release readiness
- 113+ tests passing across core modules
v0.3.0-alpha
2026-02-20 00:11:24 +05:30
Mohd Kaif 0fa68be018 Update Discord badge in README.md 2026-02-18 17:47:46 +05:30
Mohd Kaif 5e1bdf08f9 Update Discord badge with new styling 2026-02-18 17:42:16 +05:30
Mohd Kaif 8eda00304d Merge pull request #331 from Hawksight-AI/docs
Update Discord invite links across docs and community files
2026-02-18 17:17:12 +05:30
KaifAhmad1 8aa2ee3dc8 Merge main into docs and resolve README Discord badge conflict 2026-02-18 16:36:23 +05:30
KaifAhmad1 3f211dfb23 Update Discord invite links across docs and community files 2026-02-18 16:32:12 +05:30
Mohd Kaif 23da9c2fb8 Change Discord link to new invite
Updated Discord invite link in README.md.
2026-02-18 15:59:21 +05:30
Mohd Kaif 53a14fa897 Merge pull request #330 from Hawksight-AI/context
Context
2026-02-18 15:18:03 +05:30
KaifAhmad1 d69d4f5b67 Remove PR notes markdown 2026-02-18 14:55:52 +05:30
KaifAhmad1 43eb4535d8 Add concise PR update notes for latest context fixes 2026-02-18 14:47:54 +05:30
KaifAhmad1 a60791d815 Expand e2e tests with realistic cross-system data sources 2026-02-18 14:44:33 +05:30
KaifAhmad1 c31df5c4d7 Add end-to-end context graph feature test suite 2026-02-18 14:43:07 +05:30
Mohd Kaif c6ace4c6c1 Merge pull request #329 from Hawksight-AI/context
Context Graph Reliability Hardening: Policy Applicability + Cross-System Capture
2026-02-18 13:15:27 +05:30
KaifAhmad1 a785247b98 Sanitize cross-system capture errors in returned payload 2026-02-18 12:54:59 +05:30
KaifAhmad1 8bd4df74e1 Apply entity scoping in ContextGraph policy fallback 2026-02-18 12:50:08 +05:30
KaifAhmad1 f9f19f343e Handle FalkorDB policy rows in applicability parsing 2026-02-18 12:37:32 +05:30
KaifAhmad1 89d60301ce Replace cross-system input placeholder with backend capture path 2026-02-18 11:56:22 +05:30
KaifAhmad1 0a63128cbd Harden policy applicability retrieval and entity scoping 2026-02-18 11:55:30 +05:30
Mohd Kaif ab2df6d4ee Merge pull request #328 from Hawksight-AI/context
Context Graph Decision Trace Hardening + Schema Compatibility
2026-02-18 11:09:18 +05:30
KaifAhmad1 41530da25f Strengthen decision trace test assertions 2026-02-18 00:50:25 +05:30
KaifAhmad1 17b0a24257 Log legacy policy constraint drop failures 2026-02-18 00:48:12 +05:30
KaifAhmad1 a98f21e5d3 Log immutable trace lookup failures before fallback 2026-02-18 00:46:13 +05:30
KaifAhmad1 bcb9a65a20 Improve non-persistent decision trace audit logging 2026-02-18 00:44:14 +05:30
KaifAhmad1 3872ea75e1 Make policy application version-aware and deterministic 2026-02-18 00:42:05 +05:30
KaifAhmad1 20b5f7c0ab Fix execute_query wrapper handling in context queries 2026-02-18 00:37:50 +05:30
KaifAhmad1 2cee7d84fa Strengthen schema verification for trace and policy constraints 2026-02-18 00:29:53 +05:30
KaifAhmad1 1a5e34dee8 Harden decision trace capture compatibility paths 2026-02-18 00:27:32 +05:30
KaifAhmad1 ad7d9266c1 Remove temporary PR description file 2026-02-18 00:23:41 +05:30
KaifAhmad1 99aae252cf Update PR description with decision_methods enhancement block 2026-02-18 00:22:37 +05:30
KaifAhmad1 c2a627a998 Refine PR description with decision_methods enhancement summary 2026-02-18 00:21:00 +05:30
KaifAhmad1 ff957be6a8 Enhance context decision tracing and schema compatibility 2026-02-18 00:07:36 +05:30
Mohd Kaif 471542087d Merge pull request #327 from Hawksight-AI/context
Fix Context Graph Features - Resolve Method Conflicts and Integration Issues
2026-02-17 15:13:43 +05:30
KaifAhmad1 59ae0bdf44 Fix documentation snippets: Add missing imports and correct parameter names
- Add 'from datetime import datetime' import in e-commerce examples
- Change 'max_results=5' to 'limit=5' for find_precedents_by_scenario calls
- Fix docs/reference/context.md e-commerce example
- Fix semantica/context/context_usage.md e-commerce example
- Ensure documentation examples are self-contained and copy-paste ready
- Match actual API parameter names for correct behavior
- All 62 tests still passing successfully
2026-02-17 14:35:17 +05:30
KaifAhmad1 49c60387c5 Fix timestamp normalization: Prevent float timestamps from breaking Decision serialization
- Add _normalize_timestamp helper to handle various timestamp formats
- Support datetime, int/float (epoch), str (ISO with optional Z), None/invalid
- Update get_causal_chain to use timestamp normalization
- Update find_precedents to use timestamp normalization
- Update add_decision to normalize timestamps before storage
- Prevent float timestamps from breaking Decision.to_dict() and .isoformat()
- Ensure consistent datetime objects in all Decision instances
- All 62 tests still passing successfully
2026-02-17 14:29:47 +05:30
KaifAhmad1 e3ec5b151a Fix precedent search callers: Update methods to use correct find_precedents_by_scenario
- Fix ContextGraph.find_similar_decisions to call find_precedents_by_scenario instead of find_precedents
- Fix AgentContext.find_precedents to call find_precedents_by_scenario instead of find_precedents
- Update method calls to use correct scenario-based precedent search API
- Prevent TypeError from mismatched method signatures (ID-based vs scenario-based)
- Ensure backward compatibility and proper delegation to hybrid search functionality
- All 62 tests still passing successfully
2026-02-17 14:22:21 +05:30
KaifAhmad1 ca3cd1ded5 Fix empty decision_id handling: Ensure consistent UUID generation for boundary cases
- Fix add_decision to handle both None and empty string decision_id values
- Change from 'decision.decision_id is not None' to 'decision.decision_id'
- Ensures empty string decision_id also triggers UUID generation like None
- Prevents nodes with empty string keys in the graph
- Aligns ContextGraph behavior with Decision model's __post_init__ method
- Ensures compliance with PR Rule 3: Robust Error Handling and Edge Case Management
- All 62 tests still passing successfully
2026-02-17 14:10:32 +05:30
KaifAhmad1 e37a54999f Fix reliability issue: Add robust edge case handling for node_type.lower() calls
- Add null/None checks before calling node_type.lower() in add_causal_relationship
- Add type validation before calling node_type.lower() in get_causal_chain
- Add type validation before calling node_type.lower() in find_precedents
- Fix _add_internal_node to handle missing/invalid node_type attributes
- Prevent AttributeError crashes when node_type is None or non-string
- Ensure compliance with PR Rule 3: Robust Error Handling and Edge Case Management
- All 62 tests still passing successfully
2026-02-17 14:03:45 +05:30
KaifAhmad1 33c90d8277 Fix Context Graph features - resolve method conflicts and integration issues
- Fix method name conflicts: add_decision -> add_decision_simple, find_precedents -> find_precedents_by_scenario
- Fix Decision ID handling: align tests with Decision model UUID generation behavior
- Fix AgentContext integration: proper handling of context_graph backend in get_causal_chain
- Fix Policy engine: remove invalid auto_generate_id parameter from deserialization
- Fix node type consistency: handle lowercase 'decision' type across all methods
- Fix timestamp handling: proper conversion for string and datetime objects
- Update documentation: correct method names and Decision model usage in examples
- All 62 Context Graph tests passing successfully
- Production ready with comprehensive verification
2026-02-17 13:43:08 +05:30
Mohd Kaif f704d6ce91 Merge pull request #326 from Hawksight-AI/utils
Fix PolicyException Naming Conflicts in Decision Models
2026-02-16 23:54:36 +05:30
KaifAhmad1 dcb4f77efc Fix PolicyException naming and auto-ID masking bugs
Bug Fixes:
1. PolicyException naming conflicts:
   - Replace Exception with PolicyException in DecisionRecorder.record_exception()
   - Update _store_exception_node type annotation to PolicyException
   - Fix test imports in test_decision_recorder.py
   - Resolves runtime TypeError from conflicting Exception class name

2. Auto-ID masking missing IDs:
   - Add auto_generate_id parameter to all model __post_init__ methods
   - Update dict-to-model helpers to require IDs (data['decision_id'] vs data.get())
   - Set auto_generate_id=False for deserialization to prevent silent UUID generation
   - Makes missing IDs visible as KeyError instead of masked with auto-generated UUIDs

Files Changed:
- semantica/context/decision_recorder.py: PolicyException usage fixes
- semantica/context/decision_models.py: Auto-ID control parameter
- semantica/context/decision_query.py: Strict ID requirements
- semantica/context/policy_engine.py: Strict ID requirements
- semantica/context/causal_analyzer.py: Strict ID requirements
- tests/context/test_decision_recorder.py: Import fixes

Impact:
- Resolves PolicyException runtime failures
- Prevents silent data corruption from missing IDs
- Maintains backward compatibility for new object creation
- Improves data integrity for deserialization operations
2026-02-16 23:32:58 +05:30
KaifAhmad1 28dc1ed4e9 Fix PolicyException naming conflicts in decision models
- Replace conflicting Exception class name with PolicyException in decision_models.py
- Update all test imports to use PolicyException instead of Exception
- Fix auto ID generation to handle empty strings, not just None
- Resolves import errors in decision tracking test suites
- Maintains backward compatibility while fixing naming conflicts

Fixes: PolicyException naming conflicts preventing test execution
Tests: All decision model tests now pass (19/19)
2026-02-16 23:14:57 +05:30
Mohd Kaif 94448e1e5d Merge pull request #325 from Hawksight-AI/context
Enhanced Context Module with User-Friendly Documentation & Features
2026-02-16 19:40:16 +05:30
KaifAhmad1 692247c559 Fix broken structural similarity: Correct parameter and return value handling
- Fixed limit=5 to top_k=5 to match find_similar_nodes() signature
- Fixed tuple handling: similar_nodes returns List[Tuple[str, float]] not dicts
- Fixed node.get() to proper tuple unpacking for similarity scores
- Updated logging to use structured logging (logger.exception)
- Restores structural similarity functionality for precedent ranking
- Fixes find_precedents() to use proper structural similarity calculations
2026-02-16 19:18:35 +05:30
KaifAhmad1 2801cd7438 Fix config keys inconsistency: Update all references to new key names
- Fixed get_context_insights() to use new config keys (decision_tracking, kg_algorithms, vector_store_features)
- Fixed enhance_agent_context_with_decisions() to use new config key (decision_tracking)
- Ensures feature flags work correctly across all code paths
- Prevents decision enhancements from being skipped when enabled
- Fixes misreporting of feature enablement in insights
- Maintains consistency between config initialization and usage
2026-02-16 19:11:20 +05:30
KaifAhmad1 e88781472b Fix decision graph addition bugs: Correct method calls and parameter passing
- Fixed get_node() to find_node() - method didn't exist
- Fixed properties={} to **properties parameter unpacking
- Fixed add_node() calls to use keyword arguments instead of properties dict
- Fixed add_edge() calls to use keyword arguments instead of properties dict
- Ensures decision entities, categories, and edges are properly created
- Prevents silent failures in graph enrichment for recorded decisions
- Restores full decision graph functionality for record_decision()
2026-02-16 19:04:55 +05:30
KaifAhmad1 fd21ec8c77 Fix wrong neighbors keyword bug: Correct max_depth to hops parameter
- Fixed _find_indirect_decision_influence() to use correct get_neighbors() parameter
- Changed max_depth= to hops= to match method signature
- Fixes analyze_decision_influence(..., include_indirect=True) functionality
- Prevents TypeError that was silently caught and degraded functionality
- Restores indirect decision influence analysis capability
- Ensures reliable decision influence analysis with indirect connections
2026-02-16 18:57:30 +05:30
KaifAhmad1 fcf0c684bd Fix method overriding bug: Rename conflicting _calculate_content_similarity method
- Renamed decision-specific method to _calculate_decision_content_similarity
- Preserves node-based _calculate_content_similarity for find_similar_nodes()
- Updates method call to use renamed method
- Fixes core node-similarity functionality that was broken
- Ensures both node similarity and decision similarity work correctly
- Prevents find_similar_nodes() from calling wrong method signature
- Maintains backward compatibility for all similarity features
2026-02-16 18:45:51 +05:30
KaifAhmad1 3589f3b807 Add comprehensive input validation to record_decision method
- Added validation for all required fields (category, scenario, reasoning, outcome)
- Added confidence range validation (0.0 to 1.0)
- Added type checking for all parameters
- Added length limits to prevent data corruption
- Added entity list validation with individual item checks
- Added metadata dictionary validation
- Added kwargs validation for additional fields
- Added input sanitization (trimming, type conversion)
- Ensures compliance with security-first input validation requirements
- Prevents malicious/corrupted data from affecting graph operations and analytics
2026-02-16 18:42:10 +05:30
KaifAhmad1 8e83d11479 Fix logging security issues: Replace raw exception exposure with structured logging
- Fixed agent_context.py: Use logger.exception() instead of raw exception in logs
- Fixed context_graph.py: Use logger.exception() for secure structured logging
- Fixed policy_engine.py: Replaced 10 instances of raw exception logging with structured logging
- Fixed decision_recorder.py: Replaced 8 instances of raw exception logging with structured logging
- Ensures compliance with secure logging practices (Rule 5: Generic Secure Logging Practices)
- Maintains detailed exception information in internal logs while protecting user-facing outputs
- Prevents potential sensitive data leakage through log messages
2026-02-16 18:39:03 +05:30
KaifAhmad1 79d554767d Fix security issues: Remove raw exception exposure in error messages
- Fixed trace_decision_causality() to return generic error message
- Fixed analyze_graph_with_kg() to return generic error message
- Fixed get_node_centrality() to return generic error message
- Maintains detailed logging internally while protecting user-facing outputs
- Ensures compliance with secure error handling requirements
2026-02-16 18:35:53 +05:30