From 105e6efb5313c6bb5ef239e2ef0de01df6bd9f2b Mon Sep 17 00:00:00 2001 From: HAL9000 Date: Fri, 8 May 2026 04:25:04 +0000 Subject: [PATCH 1/2] feat(resources): add CHANGELOG and CONTRIBUTORS entries for PR #10591 - Add CHANGELOG.md entry under [Unreleased] / Database resource types (PostgreSQL, SQLite) with transaction-based sandbox strategy (issues #8608, Epic #8568) - Update CONTRIBUTORS.md with HAL 9000 contribution note for database resource types implementation ISSUES CLOSED: #8608 --- CHANGELOG.md | 20 ++++++++++++++++++++ CONTRIBUTORS.md | 1 + 2 files changed, 21 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index bb4b623c0..a1cc92c7d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -212,6 +212,26 @@ The format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). failure paths. Comprehensive BDD test coverage validates the fix under concurrent execution and confirms proper cleanup behavior. +- **Database resource types (PostgreSQL, SQLite) with transaction-based sandbox strategy** (#8608): + Implemented comprehensive database resource support enabling users to interact with + PostgreSQL and SQLite backends through a unified resource interface. Introduces + `DatabaseResourceHandler` providing full CRUD operations (`read`, `write`, `delete`, + `list_children`), connection validation with automatic credential masking via + :mod:`cleveragents.shared.redaction`, and transaction-based sandbox strategy using + BEGIN/COMMIT/ROLLBACK wrappers for safe, isolated database operations. SQLite-specific + checkpoint and rollback support with SAVEPOINT semantics. Includes PostgreSQL resource + subclass with native connection management and full transaction support. BDD test + coverage in ``features/database_resources.feature`` (connection validation, CRUD workflows, + transaction/rollback behavior, error handling, credential masking verification) and + Robot Framework integration tests in ``robot/database_resources.robot``. + +- **TransactionSandbox infrastructure for database resource isolation** (#8608): + Implemented ``TransactionSandbox`` class with BEGIN/COMMIT/ROLLBACK lifecycle + management for transaction-based sandbox strategy. Wired into ``SandboxFactory`` + as the strategy resolver for database resource types. Added ``database`` resource type + registration in bootstrap builtin types and updated ``_resource_registry_data.py`` + to recognize database resource categories. + ### Fixed - **fix(repositories): derive PlanResult.success from result_success column instead of error_message** (#7501): diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index 358d21b58..e459300bd 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -36,3 +36,4 @@ Below are some of the specific details of various contributions. * HAL 9000 has contributed the error-suppression removal fix (PR #9247 / issue #9060): removed both `try...except Exception:` blocks in `register_registry_agents()` that silently suppressed errors from `actor_registry.list_actors()` and the route bridge refresh, enabling exceptions to propagate per CONTRIBUTING.md fail-fast policy. Added three Behave scenarios verifying RuntimeError, AttributeError, and TypeError propagation. * HAL 9000 has contributed the Strategize phase full context snapshot fix (issue #9056): added `_build_strategize_context_snapshot()` helper to `PlanLifecycleService`, updated `_try_record_decision()` to accept and forward a `ContextSnapshot` parameter, and added BDD test coverage verifying all four `ContextSnapshot` fields (`hot_context_hash`, `hot_context_ref`, `actor_state_ref`, `relevant_resources`) are populated during the Strategize phase. * HAL 9000 has contributed the ACMS context path matching fix (PR #10975 / issue #10972): corrects `_path_matches()` and `_matches_pattern()` to properly match absolute fragment paths against relative glob patterns by auto-prefixing with `**/` before calling `PurePath.full_match()`, preventing silent inefficacy of include/exclude filters for absolute paths in fragment metadata. +* HAL 9000 has contributed database resource types (PostgreSQL, SQLite) with transaction-based sandbox strategy: implemented ``DatabaseResourceHandler`` providing full CRUD operations (`read`, `write`, `delete`, `list_children`) and connection validation with automatic credential masking for PostgreSQL and SQLite backends. Includes ``TransactionSandbox`` infrastructure wired into ``SandboxFactory``, BDD test coverage in ``features/database_resources.feature``, and Robot Framework integration tests in ``robot/database_resources.robot`` (PR #10591 / issue #8608, Epic #8568). -- 2.52.0 From 06f6b84d2339809946b8dc033e748b4e57cd9e73 Mon Sep 17 00:00:00 2001 From: HAL9000 Date: Sat, 9 May 2026 08:32:56 +0000 Subject: [PATCH 2/2] docs(resources): correct CHANGELOG entry to accurately describe DatabaseResourceHandler Replace the factual inaccuracy claiming a PostgreSQL resource subclass with accurate description of the unified DatabaseResourceHandler design. The PR description and all code use a unified handler pattern with type-specific routing via PostgreSQL, MySQL, SQLite, and DuckDB type definitions - there is no PostgreSQLResource subclass anywhere in the codebase. This fix was requested in review #8172. --- CHANGELOG.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a1cc92c7d..2f04ebca6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -219,8 +219,7 @@ The format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). `list_children`), connection validation with automatic credential masking via :mod:`cleveragents.shared.redaction`, and transaction-based sandbox strategy using BEGIN/COMMIT/ROLLBACK wrappers for safe, isolated database operations. SQLite-specific - checkpoint and rollback support with SAVEPOINT semantics. Includes PostgreSQL resource - subclass with native connection management and full transaction support. BDD test + checkpoint and rollback support with SAVEPOINT semantics. Support for multiple backends (PostgreSQL, SQLite, MySQL, DuckDB) via unified "DatabaseResourceHandler" and type-specific routing. BDD test coverage in ``features/database_resources.feature`` (connection validation, CRUD workflows, transaction/rollback behavior, error handling, credential masking verification) and Robot Framework integration tests in ``robot/database_resources.robot``. -- 2.52.0