Repository navigation
Add WordPress gallery plugin for free image search with attribution and AI generation - #279
Merged
Merged
Conversation
Co-authored-by: makr-code <[email protected]>
Co-authored-by: makr-code <[email protected]>
Co-authored-by: makr-code <[email protected]>
Co-authored-by: makr-code <[email protected]>
Copilot
AI
changed the title
[WIP] Add gallery function plugin for finding relevant images
Add WordPress gallery plugin for free image search with attribution and AI generation
Jan 7, 2026
Owner
|
@copilot review |
Contributor
Author
Code Review Summary ✅Completed comprehensive review of the WordPress Gallery plugin implementation. All quality checks passed. Code Quality Metrics
Architecture ReviewWell-structured with separation of concerns:
Security Implementation ✅
Best Practices ✅
Feature Completeness ✅All requirements fulfilled:
Documentation Quality ✅
Testing Status
Ready for ProductionThe plugin is production-ready with:
No issues found. Ready to merge. 🚀 |
makr-code
marked this pull request as ready for review
January 7, 2026 21:29
16 tasks done
19 of 30 tasks
Copilot AI
added a commit
that referenced
this pull request
May 19, 2026
Exception hardening (batch 4): - http_server.cpp: 4 remaining catch(...) → typed catch - query_engine.cpp: 8 remaining catch(...) → typed catch Stub #279 (🔴 Kritisch): DistributedTransactionManager::runPhase2Unlocked - RemoteDecisionFn type alias + setRemoteDecisionFn/clearRemoteDecisionFn API - runPhase2Unlocked calls injected fn for callback-less remote participants - Tests DTM-RPC-01..03 in test_transaction_distributed_2pc.cpp Stub #290 (🟠 Hoch): DistributedTrainer::allreduce_cpu - AllReduceCpuFn type alias + setAllReduceCpuFn/clearAllReduceCpuFn API - allreduce_cpu delegates to injected fn; local scale fallback retained - Tests AR-01..02 in test_stub_remediation_290_303.cpp Stub #296 (🟢 Niedrig): FeedbackStore::getSpamKeywords - SpamKeywordsProviderFn type alias + static set/clearSpamKeywordsProvider API - getSpamKeywords calls injected fn; falls back to static list on empty/throw - Tests SKWS-01..04 in test_feedback_store.cpp Stub #303 (🟡 Mittel): LLMModelStorage::listModels - listModels, getModelEdges, findSimilarModels now use RocksDBWrapper::scanPrefix - Empty-vector placeholder removed from all three scan paths STUB_INVENTORY.md: 321 entries, 277 resolved, 44 active CHANGELOG.md updated Agent-Logs-Url: https://github.com/makr-code/ThemisDB/sessions/34113055-e0a1-4af5-bf7d-7ad1f7bde5cf Co-authored-by: makr-code <[email protected]>
13 tasks done
Copilot AI
added a commit
that referenced
this pull request
May 20, 2026
#292/#300) Agent-Logs-Url: https://github.com/makr-code/ThemisDB/sessions/a7b2f94e-6419-48b2-9f9d-9ea27c505e78 Co-authored-by: makr-code <[email protected]>
8 tasks done
Copilot AI
added a commit
that referenced
this pull request
May 20, 2026
- Add RerouteSerializeFn tests (stub #252) - AstVisitorFn bridge: TensorAwareQueryOptimizer (stub #275) - ExactSimilarityFn bridge: TensorFingerprintGraph (stub #276) - [[deprecated]] attribute: ggmlCorePtrs (stub #277) - RpcPhase2Fn bridge: DistributedTransactionManager (stub #279) - AuthorizeFn bridge: RopeApiHandler RBAC (stub #280) - HttpPostFn bridge: AIPluginGenerator (stub #282) - HTToTTFn bridge: HTTrain (stub #286) - ModelPathProviderFn bridge: LoRATrainingService (stub #289) - AllReduceCpuFn bridge: DistributedTrainer (stub #290) - NlpContextFn bridge: AdaptiveShardRouter (stub #291) - StringArrayFn bridge: PropertyGraphManager (stub #292) - SchemaInspectorFn/SchemaValidatorFn: ImportApiHandler (stub #294) - Lz4CompressFn/Lz4DecompressFn: SecureTransportClient (stub #295) - SpamKeywordsProviderFn: FeedbackStore (stub #296) - MODIFY path fix: FeedbackStore validateWithPlugin (stub #297) - shared_ptr ResponseBuffer RAII: Http2Session (stub #298) - ModelPathProviderFn: ThemisHelpLoRA Config (stub #299) - IngestExternalFileFn: BackupManager (stub #300) - StatsQueryFn: RopeApiHandler (stub #307) - Update STUB_INVENTORY.md: 272->292 resolved, 44->24 active Co-authored-by: Copilot <[email protected]> Co-authored-by: makr-code <[email protected]>
This was referenced May 20, 2026
makr-code
added a commit
that referenced
this pull request
May 21, 2026
#292/#300) Agent-Logs-Url: https://github.com/makr-code/ThemisDB/sessions/a7b2f94e-6419-48b2-9f9d-9ea27c505e78 Co-authored-by: makr-code <[email protected]>
This was referenced May 25, 2026
1 of 6 tasks
Merged
37 of 53 tasks
Copilot AI
added a commit
that referenced
this pull request
Jun 30, 2026
Implement fail-closed behavior for Distributed Transaction Manager Phase-2 delivery
when remote participants are registered without a Phase-2 transport bridge.
### Changes
1. **Per-Transaction Validation in beginDistributed()**
- Added validation to fail-fast when remote participants (callback == nullptr,
endpoint != empty) are registered without a configured Phase-2 transport bridge
- Checks all three Phase-2 bridge options: config_.phase2_rpc_fn,
config_.remote_phase2_dispatch, and static getRpcPhase2Fn()
- Clear error message references stub #279 and explains the issue
- Prevents transactions from being created that would fail during commit/abort
2. **Fail-Closed Phase-2 Delivery in runPhase2Unlocked()**
- Changed from THEMIS_CRITICAL to THEMIS_ERROR when Phase-2 bridge is missing
- Implemented fail-closed behavior: set all_delivered=false and break instead of continue
- Stops attempting to deliver to remaining participants when bridge is missing
- Caller (commitDistributed/abortDistributed) handles the failure
3. **Enhanced Error Handling in commitDistributed() and abortDistributed()**
- Enhanced error_detail to clearly indicate missing Phase-2 bridge as root cause
- Improved error messages to guide users toward resolution
- Return messages now mention checking error_detail for root cause
4. **Comprehensive Security Tests**
- Added MockParticipant helper class to test file
- Test: beginDistributed throws with remote participant but no Phase-2 bridge
- Test: beginDistributed succeeds when Phase-2 bridge is configured
- Test: Local participants don't require Phase-2 bridge
- Test: Clear error message when Phase-2 bridge is missing
5. **Documentation Updates**
- Added entry to CHANGELOG.md documenting the fix
- Updated FUTURE_ENHANCEMENTS.md to mark stub #279 as completed
- Referenced stub #279 in all new comments for traceability
### Why This Matters
Previously, when remote participants without callbacks were registered but no Phase-2
bridge was configured, they would remain indefinitely in PREPARED state after Phase-1,
leaving the system in an unsafe limbo state.
The fix ensures:
- Configuration errors are caught early (fail-fast) instead of during commit/abort
- Phase-2 delivery failures are handled with clear error propagation
- Transaction WAL records the abort decision for recovery
- Operators get clear error messages to diagnose and fix configuration issues
### Testing
All changes pass existing distributed transaction tests and add 4 new security-focused
tests to verify fail-closed behavior.
Co-authored-by: Copilot <[email protected]>
31 of 46 tasks
20 tasks
20 of 37 tasks
Copilot AI
added a commit
that referenced
this pull request
Aug 25, 2026
…/transaction - MODULE_GAP_ANALYSIS_WAVE2.md: add Wave 4 module ranking table (all core modules scored by real TODO/stub hits vs scanner inflation), confirmed real gaps for server/auth/transaction, and Wave 4-A/B/C implementation plans with acceptance criteria - server/ROADMAP.md: add Wave 4-A section (data_race LLM handler, iterator_invalidation pagination, 12 missing_audit_log paths, MCP stdio stub note); close model_integrity_gap as FP — already implemented via ModelIntegrityVerifier::verifyModel at llm_api_handler.cpp:981 - auth/ROADMAP.md: add Wave 4-B section (7 missing audit events in jwt_key_rotation_manager + auth_audit_logger, OAuth retry in federated_identity_manager, mTLS cipher restriction); close sensitive_data_logging as FP — grep confirmed no plaintext in log paths - transaction/ROADMAP.md: add Wave 4-C section (stub #279 fail-closed guard for null transport, lock_manager CRITICAL triage, saga/global_txn scanner FP confirmation pending subagent) Co-authored-by: makr-code <[email protected]>
Copilot AI
added a commit
that referenced
this pull request
Aug 26, 2026
…e-2 lock release, predicate lock warning, STUB #279 governance docs Co-authored-by: makr-code <[email protected]>
Copilot AI
added a commit
that referenced
this pull request
Aug 26, 2026
…(W9-7..W9-9)
W9-7: GrpcRpcPhase1Adapter (include/transaction/grpc_rpc_adapter.h already staged,
src/transaction/grpc_rpc_adapter.cpp)
- Factory returns RpcPhase1Fn callable for setRpcPhase1Fn()
- Phase-1 PREPARE proxied via ThemisCoreService::BeginTransaction
(options["2pc_prepare"]="1", isolation=SERIALIZABLE) — bridge
architecture; replace with dedicated PrepareTransaction RPC when schema
is extended
- Respects prepare_timeout via grpc::ClientContext::set_deadline
- Returns COMMIT vote on success=true, ABORT on failure/timeout/exception
- Fail-closed stub (always votes ABORT) when THEMIS_HAS_CORE_GRPC absent
W9-8: GrpcRpcPhase2Adapter (same files)
- Factory returns RpcPhase2Fn callable for setRpcPhase2Fn()
- CommitTransaction / RollbackTransaction mapped to do_commit flag
- Exponential retry-with-backoff: 3 attempts at 100ms/200ms/400ms
- THEMIS_INFO/THEMIS_WARN logged on each attempt
- Throws std::runtime_error after all retries exhausted
- Fail-closed stub (throws) when THEMIS_HAS_CORE_GRPC absent
W9-9: DI root wiring (src/main.cpp)
- Includes grpc_rpc_adapter.h unconditionally
- Installs Phase-1 and Phase-2 adapters after DB open
- node_addresses populated from config (empty in demo path = no-op)
- Block documented with mTLS upgrade note for production
Tests (tests/transaction/test_grpc_rpc_adapter.cpp, 15 tests):
GRPC-P1-01..05 Phase-1: commit vote, abort vote, timeout, exception, unknown node
GRPC-P2-01..05 Phase-2: commit, rollback, retry-succeed-2nd, fail-3-retries, unknown node
GRPC-DTM-01..03 DTM integration: all-commit PREPARED, ABORT vote, Phase-2 delivered
GRPC-CONTENTION-01 30 serial txns without data loss
GRPC-WAL-01 Phase-2 fn called after commit (WAL-before-fan-out contract)
Registered release_critical in tests/transaction/CMakeLists.txt
Docs:
- src/transaction/ROADMAP.md: Wave 9 Block 2 section, W9-7/W9-8/W9-9 marked [x]
- src/transaction/MODULE_GAPS.md: STUB #279 transport bridges CLOSED 2026-08-26
- src/STUB_INVENTORY.md: STUB #279 row updated with W9 transport resolution
Closes STUB #279 Phase-1/Phase-2 gRPC transport bridge items.
Co-authored-by: makr-code <[email protected]>
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.
Implements WordPress plugin for finding, downloading, and embedding free stock images with automatic attribution. Supports optional AI image generation via DALL-E.
Architecture
Core Classes
class-image-api.php- Multi-provider API integration (Unsplash, Pexels, Pixabay, OpenAI)class-media-handler.php- Downloads images to WordPress media library with metadataclass-admin.php- Settings page and post editor meta box with AJAX searchclass-shortcodes.php- Gallery and search widget renderingclass-gutenberg-block.php- Block editor integrationKey Features
[themisdb_gallery search="..." provider="..."],[themisdb_image_search]Usage
Editor Integration:
themisdb_gallery_searchmedia_handle_sideload()→ Inserts with captionAttribution Format:
Security
themisdb_gallery_admin_nonce)upload_filesfor import,manage_optionsfor settings)sanitize_text_field(),esc_url(),esc_html()Configuration
Requires free API keys from providers (configurable in Settings → ThemisDB Gallery):
Package for distribution:
./package.shcreates installable ZIP.Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.