Skip to content

Release v1.0.0.dev13 - #36

Merged
vistart merged 12 commits into
mainfrom
release/v1.0.0.dev13
May 15, 2026
Merged

vistart merged 12 commits into
mainfrom
release/v1.0.0.dev13

Conversation

@vistart

@vistart vistart commented May 15, 2026

Copy link
Copy Markdown
Contributor

Release v1.0.0.dev13

Summary

Release v1.0.0.dev13 for rhosocial-activerecord-postgres, including a critical security fix, CI improvements, and test refinements.

Changes

Security

CI/CD

  • Switch testsuite install from git to PyPI
  • Install rhosocial-activerecord from PyPI instead of git
  • Use pytest-cov instead of coverage run for xdist compatibility
  • Enable scenario-parallel mode with 2 workers in test workflow

Testing

  • Align Expression parameter names with core API
  • Add requires_functions marker, remove requires_capability, update test.yml

Refactoring

  • Add CLAUDE.md and .claude/ documentation
  • Unify PostgreSQL examples to use POSTGRES_* environment variables

Build

  • Add pytest-xdist dependency for scenario-parallel test execution

Changelog Fragment

  • 35.security.md — SECURITY: Resolved SQL injection risks in PostgreSQL backend

Test Plan

vistart and others added 11 commits May 1, 2026 15:25
* fix: resolve SQL injection risks in DDL/DML statements

- Fix partial index where_clause to accept ToSQLProtocol for parameterized queries
- Fix CREATE TYPE ENUM values to use _escape_sql_string for escaping
- Fix trigger function name to use format_identifier for proper quoting
- Fix stored procedure names (CREATE/DROP/CALL) to use format_identifier
- Fix extended statistics names to use format_identifier

Resolves: SQL injection vulnerabilities in PostgreSQL backend

* fix: resolve parameter loss bug in where_clause

The ToSQLProtocol path was collecting parameters but returning hardcoded
empty tuple, causing WHERE clause parameters to be silently dropped.

This commit fixes the return statement to include the collected parameters.

* test: add SQL injection security tests for PostgreSQL fixes

- Add tests for CREATE TYPE ENUM value escaping
- Add tests for trigger function name format_identifier
- Add tests for stored procedure names (CREATE/DROP/CALL)
- Add tests for extended statistics names
- Add tests for partial index WHERE clause ToSQLProtocol support

Resolves: Test coverage for SQL injection fixes in PostgreSQL backend

* test: fix and enhance PostgreSQL security tests

- Fix method name: format_create_type_enum_statement
- Fix method name: format_call_statement
- Add all_params initialization in format_create_index_pg_statement
- Add tests for ENUM escaping, stored procedures, and partial index WHERE clause

* chore: use git source for rhosocial-activerecord at release/v1.0.0.dev26

* test: update test assertions for quoted identifiers

* chore: add changelog fragment for PR #35
…onment variables

- Add cli/bash/ directory with per-command bash scripts:
  - info.sh, query.sh, introspect.sh, status.sh
  - named_query.sh, named_procedure.sh, named_connection.sh
- Update all example files to use POSTGRES_HOST/PORT/DATABASE/USER/PASSWORD
  instead of PG_* variables for consistency with CLI
- Each bash script covers all CLI options with self-contained test data
…ate test.yml

- pyproject.toml: add requires_functions marker, remove deprecated requires_capability
- test.yml: use git+https for testsuite at release/v1.0.0.dev13
- Replace table_name= with table= for CreateTableExpression, DropTableExpression
- Replace table= with table_name= for CreateIndexExpression (PostgreSQL-specific)
- Apply across all 20 extension integration tests and create_table_like tests
…ecution

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
coverage run does not collect data from xdist worker subprocesses.
pytest-cov with --cov flag natively supports parallel worker coverage
merging.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Change rhosocial-activerecord-testsuite installation source from
git+https://github.com/... to PyPI, pinned to version 1.0.0.dev13.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Changed installation source from git+https to PyPI, pinned to version 1.0.0.dev26.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@vistart vistart self-assigned this May 15, 2026
@codecov

codecov Bot commented May 15, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 68.72%. Comparing base (15e5823) to head (a9d9762).

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #36      +/-   ##
==========================================
+ Coverage   68.66%   68.72%   +0.06%     
==========================================
  Files         230      230              
  Lines       10049    10054       +5     
  Branches     1598     1599       +1     
==========================================
+ Hits         6900     6910      +10     
+ Misses       2628     2621       -7     
- Partials      521      523       +2     
Flag Coverage Δ
postgres-18 68.72% <100.00%> (+0.06%) ⬆️
python-3.14 68.72% <100.00%> (+0.06%) ⬆️
unittests 68.72% <100.00%> (+0.06%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@sonarqubecloud

Copy link
Copy Markdown

@vistart
vistart merged commit 4520d4a into main May 15, 2026
23 of 24 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant