Release 1.6.6: Ally template, deferral UI fix, setup display name fix#520
Merged
Release 1.6.6: Ally template, deferral UI fix, setup display name fix#520
Conversation
…reSQL support
This patch release fixes critical database path resolution issues in the
setup wizard that prevented users from persisting correctly in both SQLite
and PostgreSQL deployments.
### Changes
- **Fixed setup wizard database path bug** - Users created during setup now persist correctly
- Modified `_create_setup_users()` to accept `auth_db_path` parameter from running application
- Previously created new `EssentialConfig()` which defaulted to CWD-relative paths
- Now uses runtime's resolved database path ensuring consistency
- **Fixed central path resolution in EssentialConfig** - All database paths now use centralized path_resolution.py
- Added `default_factory` functions that call `get_data_dir()`
- Ensures correct paths across all three deployment modes:
- Managed/Docker mode: `/app/data/`
- Development mode: `<git_repo>/data/`
- Installed mode: `~/ciris/data/`
- **Fixed PostgreSQL backend support in setup wizard** - Uses `get_audit_db_full_path()`
- Setup wizard now correctly creates users in PostgreSQL when configured
- Previously only worked with SQLite deployments
- Matches the database resolution logic used by AuthenticationService
- **Fixed test suite** - Updated test signatures and fixtures
- Added `client_with_runtime` fixture for proper runtime mocking
- Updated 4 tests to match new `_create_setup_users()` signature
- All tests passing (6,675 passed, 38 skipped)
### Version
- Bumped to 1.6.5.3-stable
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Add three UI compatibility fields directly to the PendingDeferral schema: - question: Optional display text for UI (defaults to None) - context: Additional context as JSONDict (defaults to empty dict) - timeout_at: ISO format timeout string (defaults to None) Simplify API route by removing transformation code - the schema now includes these fields natively, eliminating the need for runtime transformation. This fixes deferral details not being visible in the UI by ensuring the TypeScript SDK receives the expected fields from the API. Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
The /auth/me endpoint was returning the wa-date format user_id (e.g., "wa-2025-11-24-03-40-04-427473") as the username, which was displayed in the setup wizard's welcome message. This fix fetches the actual username from the auth service. Changes: - Modified get_current_user() to inject auth_service dependency - Fetch user object via auth_service.get_user(auth.user_id) - Use user.name if available, fallback to auth.user_id if not found - Maintains type safety (mypy passes) Fixes #515 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
…folder This commit introduces the Ally agent template and consolidates all templates to a single authoritative location for improved maintainability. Changes: - Add new Ally template (personal thriving assistant) - Evidence-based ethics (Google DeepMind 2024 autonomy principles) - California SB 243 compliant crisis response - TaskSchedulerService integration for reminders and goal tracking - Comprehensive SOPs for personal assistance, decision support, and crisis handling - Consolidate templates to single location - Remove root /ciris_templates/ folder (9 files) - Keep only ciris_engine/ciris_templates/ as authoritative source - Update generate_manifest.py to use consolidated path - Update signed manifest - All 7 production templates signed with Ed25519 - Manifest includes Ally with checksum sha256:381e5e96e5a6612d0f3ff225c20101c431e832c4dbe2dd04c00302a070001f8c - Root signature: Sr4Fc4KRLFieAaFy6zkCogl62nG93bzfAtzcYpdQa+K7FmmVPHnSustmM4LQ+5ZFRq+21Ms0SwJSc+Yr6gObCg== Verification: - Path resolution works correctly with consolidated folder - All templates load and validate successfully - Manifest signing tool updated and tested 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
The PendingDeferral schema was updated with question, context, and timeout_at fields, but the service method wasn't populating them. This caused the UI to continue showing empty values. Changes: - Populate question field from reason (for UI display) - Build rich context from deferral data including: - task_description: Full task description (up to 500 chars) - Any context fields from deferral_info (user_id, etc.) - original_message if available - Calculate timeout_at as created_at + 7 days (ISO format) This completes the fix for issue #514 - deferral details now visible in UI. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
…lates Address PR review comment - update the unified manifest generator to: - Add ally template to TEMPLATES dict - Point to consolidated ciris_engine/ciris_templates path This ensures both manifest generators (tools/generate_template_manifest.py and tools/templates/generate_manifest.py) are in sync with the template consolidation. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Release 1.6.6 includes: - PR #517: Fix deferral UI fields (issue #514) - PR #518: Fix setup display name (issue #515) - PR #519: Add Ally personal assistant template + consolidate templates folder 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Convert keys() result to list before indexing since dict_keys/odict_keys view objects don't support subscripting with [0]. Fixes #521 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
# Conflicts: # BUILD_INFO.txt
Reduces log noise in production by moving debug-level messages from INFO to DEBUG level across multiple files: - graph.py: add_graph_node debug messages - memory_service.py: LocalGraphMemoryService init debug - audit_service/service.py: audit entry creation debug - action_dispatcher.py: tool audit parameter debug - wakeup_processor.py: wakeup step processing debug - setup.py: auth database path debug - audit.py routes: audit entry conversion debug - mock_llm responses: message processing debug - main.py: exit point tracking debug 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Extract helper methods to reduce cognitive complexity from 24 to ~10: - _parse_deferral_context: Parse context JSON and extract deferral info - _priority_to_string: Convert integer priority to string representation - _build_ui_context: Build UI context dictionary from deferral data - _create_pending_deferral: Create PendingDeferral from parsed data Added 19 unit tests covering all helper methods with edge cases: - JSON parsing (valid, invalid, None, missing keys) - Priority conversion (high, medium, low, edge values) - UI context building (truncation, None handling, field extraction) - PendingDeferral creation (defaults, user_id extraction, timeout calc) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Add custom validation for /v1/setup/templates endpoint to ensure: - default template (Datum) is present - ally template is present - At least 5 templates are returned - Template names match expected values 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
The custom_validation callback receives requests.Response, not parsed JSON. Fixed _validate_templates_response to call .json() on the response. Also added INFO level debug logging to setup routes _get_agent_templates() to help diagnose template loading issues in production. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Added release notes for: - PostgreSQL dialect odict_keys fix (#521, #522) - Deferral UI fields empty fix (#517) - DEBUG log level fixes (39 statements across 10 files) - Template consolidation (#519) - Wise Authority service refactoring - QA runner setup tests with template validation 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
- Remove load_env_vars() calls after config is set from dict/object - CLI args should take precedence over .env file values - Also fix setup_tests.py to keep default admin password The adapter was calling load_env_vars() after applying the config dict, which caused .env values to override CLI args. Now the precedence is: 1. Defaults (lowest) 2. .env file 3. Environment variables 4. CLI arguments (highest) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Release 1.6.6
This release includes three improvements:
Changes
PR #517 - Fix Deferral UI Fields (Issue #514)
question,context, andtimeout_atfields to PendingDeferral schemaPR #518 - Fix Setup Display Name (Issue #515)
/auth/meendpoint to fetch actual username from auth servicePR #519 - Add Ally Template + Consolidate Templates
ciris_engine/ciris_templates/)Files Changed
ciris_engine/schemas/services/authority/wise_authority.py- PendingDeferral schemaciris_engine/logic/services/governance/wise_authority/service.py- UI field populationciris_engine/logic/adapters/api/routes/auth.py- Username lookupciris_engine/logic/adapters/api/routes/wa.py- Simplified deferral endpointciris_engine/ciris_templates/ally.yaml- New templatetools/generate_template_manifest.py- Updated for consolidationtools/templates/generate_manifest.py- Updated for consolidationpre-approved-templates.json- Updated manifest with allyciris_templates/folder (consolidated)Test Plan
🤖 Generated with Claude Code