Repository navigation
Conversation
Add focused behavior tests for src/security/audit.ts covering the in-memory and database audit repositories, schema DDL contract, and factory/re-export surface (issue RevoraOrg#1078). Harden the health check to report the last attempted Horizon endpoint in failure details so operators can identify a failing endpoint without exposing internals. 🤖 Generated with Codebuff Co-Authored-By: Codebuff <noreply@codebuff.com>
Remove unused Pool import and replace an implicit-any accumulator with unknown, which the downstream classification call already accepts. 🤖 Generated with Codebuff Co-Authored-By: Codebuff <noreply@codebuff.com>
|
@Ukorstack 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! 🚀 |
Author
|
kindly review please! |
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
Closes #1078. Add a dedicated test suite for
src/security/audit.tsand harden the health route diagnostics.src/security/audit.test.ts(new, 63 tests): focused behavior coverage forInMemorySecurityAuditRepository(initial state, record/retrieve, ordering, limits, security-violation filtering, clear/re-populate transitions, instance isolation, capacity-eviction boundary, invalid inputs),DatabaseSecurityAuditRepository(SQL + parameter contract via mocked pool, row mapping, empty results, error propagation),SECURITY_AUDIT_EVENTS_SCHEMADDL assertions,createSecurityAuditRepositoryenv selection, and the module's hash-chain/scheduler re-export surface. All fixtures are deterministic — fixed IDs and timestamps, no wall-clock reads or sleeps.src/routes/health.ts: report the last attempted Horizon endpoint in failuredetails.urlso operators can identify a failing endpoint without exposing error internals; also removes an unused import and an implicit-any that tripped eslint.Public contract
No production behavior changed beyond the additive
details.urldiagnostic field on Horizon health failures. Existing exports, SQL shapes, and schemas are asserted as-is.Validation
npx jest src/security/audit.test.tsnpx jest src/security/src/routes/health.test.tsnpx eslinton changed fileshealth.tsfixed in this PR)npx tsc --noEmitsrc/vaults/*files)Security notes
urlfield exposes only the configured Horizon endpoint URL (public configuration); no error internals or secrets are leaked.🤖 Generated with Codebuff
Co-Authored-By: Codebuff noreply@codebuff.com