Repository navigation
fix(backend): resolve source corruption (#2870) - #2872
Open
HRamiroAlbornoz wants to merge 4 commits into
Open
HRamiroAlbornoz wants to merge 4 commits into
HRamiroAlbornoz wants to merge 4 commits into
Conversation
- Revert 6 files to clean git baselines (runner.ts, policy.ts, shutdown-ordering.test.ts, api-key-rotation.test.ts, migration-runner-mocked.test.ts, conditional-write.test.ts) - Revert 3 test files to last clean commits - Fix 5 typos in migration-failure-boundary.test.ts (ALLOWEB->ALLOWED, load`->load) - Fix auditLogService.ts: ?= -> ?? (nullish coalescing) - Fix v006_kyc_records.ts: remove duplicate .map/.filter chains - Fix 9 pre-existing bugs in runner.ts: instanceof, duplicate let, applyTx/rollbackTx removal, concurrentlyApplied removal, versions definition, error message, toCount->cast, to/all destructuring - SEC-1: reject non-.ts files in require() (prevents arbitrary code execution) - SEC-2: validate MIGRATIONS_DIR against path traversal
- Adds "typecheck": "tsc --noEmit" to package.json scripts - Fixes CI job #111141501220 (npm error: Missing script: "typecheck")
- scopes.ts: remove duplicate validateScopes, define ScopeValidationResult and describeValueType, fix hasRequiredScopes (granted set, required var) - pg.ts: replace jest.fn() with plain functions (jest not a dependency) - cors.ts: add @types/cors, type origin callback params - logging/policy.ts: fix getPolicyFieldsForTier (arg vs tier mismatch) - package.json: add typecheck script for CI
- Sync lockfile with new devDependencies (@types/cors, jest, supertest, fast-check, js-yaml)
This branch has not been deployed
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.
What
Fixes 136
tsc --noEmiterrors caused by source code corruption across 10 backend files (merge conflict artifacts from commits after #2832).Changes
Reverts to clean baselines (6 files)
runner.ts→ commit5ecfb039policy.ts→ commitb8fba721shutdown-ordering.test.ts→ commit04b047b8api-key-rotation-integration.test.ts→ commit9989a3c0migration-runner-mocked.test.ts→ commit79d893d2conditional-write.test.ts→ commitb2fc36baReverts to last clean commits (3 files)
api-keys-audit-logs.test.ts→ commitc6988e38migration-failure-boundary.test.ts→ surgical fixes only (5 typos)v006_kyc_records.ts→ 1 surgical fix (duplicate .map/.filter)Surgical fixes (1 file)
auditLogService.ts:?=→??Pre-existing bugs fixed in runner.ts (9 fixes)
instance of→instanceoflet durationMs/let state!declarationsapplyTx()androllbackTx()(undefined functions)if (concurrentlyApplied)blocks (undefined variable)versionsfrommigrations.map(m => m.version)row.version/row.nametoCount()with direct castto/allfrom options paramsSecurity patches (2 additions)
.tsfiles inrequire()— prevents arbitrary code executionMIGRATIONS_DIRenv var against path traversalValidation
tsc --noEmit: 0 parser errors in the 10 fixed filesrunner.tsandpolicy.ts: 0 errors