Skip to content

Restore CSP enum basket compatibility - #334

Closed
timkpaine wants to merge 1 commit into
mainfrom
tkp/csp-enum-basket-compat
Closed

Restore CSP enum basket compatibility#334
timkpaine wants to merge 1 commit into
mainfrom
tkp/csp-enum-basket-compat

Conversation

@timkpaine

@timkpaine timkpaine commented Aug 25, 2026

Copy link
Copy Markdown
Member

csp-gateway 2.9 changed static dict-basket key detection to Python enum.Enum, which dropped keys for existing csp.Enum channel baskets. This restores support for both enum families.

Also updates GatewayTestHarness unset assertions to use Pydantic GatewayStruct field-presence semantics instead of hasattr(), including indexed list assertions.

Validation:

  • make lint
  • channel and harness tests pass
  • reproduced with a downstream application using CSP enum-keyed baskets

Signed-off-by: Tim Paine <3105306+timkpaine@users.noreply.github.com>
@github-actions

github-actions Bot commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

Test Results

853 tests  +2   843 ✅ +2   7m 3s ⏱️ -15s
  1 suites ±0    10 💤 ±0 
  1 files   ±0     0 ❌ ±0 

Results for commit 5762d20. ± Comparison against base commit 4f41f3e.

♻️ This comment has been updated with latest results.

@codecov

codecov Bot commented Aug 25, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 72.00000% with 7 lines in your changes missing coverage. Please review.
✅ Project coverage is 86.59%. Comparing base (4f41f3e) to head (5762d20).

Files with missing lines Patch % Lines
csp_gateway/testing/harness.py 40.00% 6 Missing ⚠️
csp_gateway/server/gateway/csp/channels.py 80.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #334      +/-   ##
==========================================
- Coverage   86.60%   86.59%   -0.01%     
==========================================
  Files         156      156              
  Lines       18410    18428      +18     
  Branches     1742     1744       +2     
==========================================
+ Hits        15944    15958      +14     
- Misses       2465     2468       +3     
- Partials        1        2       +1     

☔ View full report in Codecov by Harness.
📢 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.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@timkpaine

Copy link
Copy Markdown
Member Author

Superseded by #322; the compatibility changes were integrated into that branch.

@timkpaine timkpaine closed this Aug 25, 2026
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.

1 participant