fix: resolve all Mercy60-assigned issues (#653, #654, #663, #666) - #733
Merged
MaryammAli merged 2 commits intoAug 27, 2026
Merged
Conversation
…kDash-Studios#654, BlockDash-Studios#663, BlockDash-Studios#666) - BA-085 (BlockDash-Studios#653): record active version, author, approval, effective time, and rollback metadata for prompt templates, with an audit trail. - BA-086 (BlockDash-Studios#654): layered prompt-injection detection with normalisation (NFKC, URL/HTML decoding, zero-width removal, homoglyph folding), deobfuscated and base64-decoded layers, multilingual patterns, and false-positive/bypass fixtures. - BA-095 (BlockDash-Studios#663): durable, fingerprint- and status-aware webhook idempotency claims in the database layer with atomic claim semantics. - BA-098 (BlockDash-Studios#666): durable webhook outbox — events stored before delivery, resumable retries, and inspectable terminal failures. 🤖 Generated with Codebuff Co-Authored-By: Codebuff <noreply@codebuff.com>
|
@mercy60 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
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.
Summary
Resolves all four currently-open issues assigned to Mercy60:
Closes BA-085 — Add prompt-template approval and audit metadata #653 — BA-085: Add prompt-template approval and audit metadata
PromptTemplatenow recordsauthor,approval(status/approver/timestamp/review notes),effectiveAt, androllbackmetadata.approveTemplate,rollbackTemplate,getActiveTemplate, andgetTemplateAuditTrailAPIs expose and record the governance trail.Closes BA-086 — Improve prompt-injection detection beyond substring patterns #654 — BA-086: Improve prompt-injection detection beyond substring patterns
SecurityService.sanitisePromptnow runs layered detection:i.g.n.o.r.e,d.e.v.e.l.o.p.e.r m.o.d.e) — only when separators were actually present to keep false positives low.detectPromptInjectionexposes the matched reasons and layers.security.service.spec.tscover bypass attempts (case, spacing, zero-width, URL/HTML/base64 encoding, full-width, homoglyphs, multilingual) and false positives.Closes BA-095 — Make webhook idempotency durable and status-aware #663 — BA-095: Make webhook idempotency durable and status-aware
DatabaseService(claimWebhookIdempotency/completeWebhookIdempotency/failWebhookIdempotency).in_progress/completed/failed), and an expiry, with atomic claim semantics (in-progress, completed, key-conflict, failed-retry, expired-reclaim).PaymentsController→AntiCheatService) now awaits the durable claim and fingerprints the raw payload;SecurityServiceandRedisServicedelegate to the same store (with the old in-memory behavior as a fallback when noDatabaseServiceis injected, e.g. isolated tests).Closes BA-098 — Add durable webhook delivery records and outbox processing #666 — BA-098: Add durable webhook delivery records and outbox processing
DatabaseService:enqueueWebhookDelivery(stored before delivery),claimDueWebhookDeliveries(atomic claims),completeWebhookDelivery,recordWebhookDeliveryFailure(resumableretrying+nextRetryAt), and inspectable terminalfailedrecords (getTerminalWebhookFailures,listWebhookOutbox).PaymentsServicegainsenqueueWebhook,deliverDueWebhooks,getWebhookDeliveryRecord,listWebhookOutbox, andgetTerminalWebhookFailures;deliverWebhookWithRetrynow drives delivery through the outbox (also repairing the previously mangled constructor/imports inpayments.service.ts).Verification
security.service.spec.ts(injection fixtures + durable idempotency)database/database.service.spec.ts(claim semantics + outbox lifecycle)payments/payments.service.spec.ts(outbox delivery + webhook processing regression)ai/prompt-template.service.spec.ts(approval/effective-time/rollback/audit)tsc --noEmitshows zero errors in every changed file (project-wide error count dropped 320 → 289; the remaining errors are pre-existing in unrelated files).no-var-requires/ unused-import warnings in touched-but-unchanged lines remain).