Executive summary
j5ik2o/cqrs-es-example-js is rated At risk because critical security findings are open. Its score is held back because we found no access checks on the code's endpoints or handlers and 20 of the dependencies have a known vulnerability. It scores 41 out of 100, which the At risk rating leaves unchanged. We judged it as a template or a sample, against a lower bar.
Security and Compliance, at 24, is the weakest lens and counts most in the score. The best first step is adding access checks, worth about 14 points. Updating the 20 dependencies with a known vulnerability comes next, worth about 4 points. Raising Security and Compliance to 66 would lift the score to about 55.
Twenty-one known security holes in the packages the code depends on can be used by attackers. Eighteen settings leave the servers or containers unsafe, and nine pipeline tools are referenced by a changeable name, so the build pipeline can be tampered with. Updating the vulnerable packages, correcting the unsafe settings and pinning each tool to an exact version would close these risks. Fixing the weaknesses the scanner points to would fix the four security weaknesses in the code, and setting a waiting period for automatic updates would deal with the two automatic dependency updates that take new releases at once. The two uses of packages that aren't listed need adding to the project's list of dependencies.
The product code is 7,891 lines, about €15,000 to rebuild. The check for the health of its packages couldn't finish, so that result is missing, not a clean pass.
If Security and Compliance rose from 24 to 66, the lowest score rated Strong, the score would rise from 41 to about 55.
New since the last survey: 62 findings
- Cyclomatic Complexity · stream-recovery.processStream (cyclomatic 18) packages/rmu/src/stream-recovery.ts
- Cognitive Complexity · stream-recovery.processStream (cognitive 47) packages/rmu/src/stream-recovery.ts
- Static Analysis (SAST) · REDACTED
- Dependency Vulnerabilities · REDACTED
- Dependency Vulnerabilities · REDACTED
- Dependency Vulnerabilities · REDACTED
- Dependency Vulnerabilities · REDACTED
- Dependency Vulnerabilities · REDACTED
- Dependency Vulnerabilities · REDACTED
- Dependency Vulnerabilities · REDACTED
- Dependency Vulnerabilities · REDACTED
- Dependency Vulnerabilities · REDACTED
- IaC & Container Security · REDACTED
- Code Duplication · Duplication concentrated across 4 sibling directories (5 clone groups) packages/bootstrap/src/dynamodb-stream-client.ts
- Code Duplication · Duplicated block (44 lines × 2 locations) packages/command/domain/src/group-chat/group-chat-id.ts
- Code Duplication · Duplicated block (41 lines × 6 locations) packages/command/domain/src/group-chat/group-chat-events.ts
- Code Duplication · Duplicated block (35 lines × 2 locations) packages/bootstrap/src/dynamodb-stream-client.ts
- Code Duplication · Duplicated block with local edits (32 matched lines × 2 locations) packages/query/interface-adaptor/src/graphql/resolvers.ts
- Code Duplication · Duplicated block (19 lines × 5 locations) packages/command/domain/src/group-chat/group-chat-events.ts
- Code Duplication · Duplicated block with local edits (18 matched lines × 2 locations) packages/bootstrap/src/dynamodb-lambda-rmu-handler.ts
- Code Duplication · Duplicated block (18 lines × 2 locations) packages/bootstrap/src/recover-read-model-main.ts
- Code Duplication · Duplicated block (15 lines × 2 locations) packages/bootstrap/src/dynamodb-local-rmu-main.ts
- Code Duplication · Duplicated block (15 lines × 2 locations) packages/query/interface-adaptor/src/graphql/outputs.ts
- Code Duplication · Duplicated block (14 lines × 2 locations) packages/bootstrap/src/dynamodb-lambda-rmu-handler.ts
- Code Duplication · Duplicated block (13 lines × 3 locations) packages/command/interface-adaptor-impl/src/graphql/resolvers.ts
- Code Duplication · Duplicated block (13 lines × 2 locations) packages/rmu/src/head-scanner.ts
- Code Duplication · Duplicated block (12 lines × 2 locations) packages/command/interface-adaptor-impl/src/graphql/resolvers.ts
- Code Duplication · Duplicated block (12 lines × 2 locations) packages/rmu/src/group-chat-dao.ts
- Code Duplication · Duplicated block (11 lines × 2 locations) packages/command/domain/src/group-chat/group-chat.ts
- Code Duplication · Duplicated block (11 lines × 2 locations) packages/rmu/src/dynamodb-adapter.ts
- Code Duplication · Duplicated block (10 lines × 2 locations) packages/bootstrap/src/dynamodb-stream-client.ts
- Code Duplication · Duplicated block (10 lines × 2 locations) packages/command/interface-adaptor-impl/src/repository/group-chat/group-chat-repository.ts
- Code Duplication · Duplicated block (10 lines × 3 locations) packages/command/interface-adaptor-impl/src/repository/group-chat/group-chat-serializers.ts
- Code Duplication · Duplicated block (10 lines × 2 locations) packages/rmu/src/dynamodb-adapter.ts
- Code Duplication · Duplicated block (10 lines × 2 locations) packages/rmu/src/journal-reader.ts
- Code Duplication · Duplicated block (9 lines × 3 locations) packages/query/interface-adaptor/src/graphql/resolvers.ts
- Code Duplication · Duplicated block (8 lines × 5 locations) packages/command/domain/src/group-chat/group-chat.ts
- Code Duplication · Duplicated block (7 lines × 2 locations) packages/bootstrap/src/spanner-change-stream-bridge-main.ts
- Code Duplication · Duplicated block (7 lines × 2 locations) packages/rmu/src/group-chat-dao.ts
- Code Duplication · Duplicated block (6 lines × 2 locations) packages/bootstrap/src/spanner-change-stream-bridge-main.ts
- Cyclomatic Complexity · Complex function processStream (cyclomatic 23, cognitive 57) packages/rmu/src/stream-recovery.ts
- Cyclomatic Complexity · Complex function retryWithBackoff (cyclomatic 11, cognitive 14) packages/rmu/src/retry.ts
- Cyclomatic Complexity · Complex function isTransientError (cyclomatic 11, cognitive 13) packages/rmu/src/failures.ts
- Cyclomatic Complexity · Complex function convertValue (cyclomatic 11, cognitive 10) packages/bootstrap/src/dynamodb-stream-client.ts
- Cyclomatic Complexity · Complex function convertValue (cyclomatic 11, cognitive 10) packages/rmu/src/head-scanner.ts
- Cyclomatic Complexity · Complex function parseMessage (cyclomatic 11, cognitive 9) packages/rmu/src/dead-letter-consumer.ts
- Large Files · packages/command/domain/src/group-chat/group-chat-events.ts: 638 lines of code packages/command/domain/src/group-chat/group-chat-events.ts
- Large Files · packages/command/domain/src/group-chat/group-chat.ts: 490 lines of code packages/command/domain/src/group-chat/group-chat.ts
- Large Files · packages/rmu/src/update-read-model.ts: 485 lines of code packages/rmu/src/update-read-model.ts
- Large Files · packages/rmu/src/group-chat-dao.ts: 426 lines of code packages/rmu/src/group-chat-dao.ts
- Test Coverage · No test reaches this file packages/bootstrap/src/dynamodb-stream-client.ts
- Test Coverage · No test reaches this file packages/bootstrap/src/sqs-dead-letter-main.ts
- Test Coverage · No test reaches this file packages/bootstrap/src/sqs-dead-letter-handler.ts
- Test Coverage · No test reaches this file packages/bootstrap/src/recover-read-model-main.ts
- Test Coverage · No test reaches this file packages/bootstrap/src/dead-letter-recovery-runtime.ts
- Test Coverage · No test reaches this file packages/bootstrap/src/dead-letter-notifier-factory.ts
- Test Coverage · No test reaches this file packages/bootstrap/src/dynamodb-clients.ts
- Dependency Hygiene · Unlisted import 'reflect-metadata' packages/command/interface-adaptor-impl/src/graphql/resolvers.test.ts
- Dependency Hygiene · Unlisted import 'reflect-metadata' packages/query/interface-adaptor/src/index.test.ts
- Access Controls · No authorization packages/bootstrap/src/read-api-main.ts
- Exception handling · Swallowed exception (empty catch) packages/rmu/src/update-read-model.ts
- Incompleteness & stubs · Fake-async — async method never awaits packages/command/interface-adaptor-impl/src/graphql/resolvers.ts
Fixed since the last survey: 47 findings
- Cognitive Complexity · dynamodb-local-rmu-main.streamDriver (cognitive 24) packages/bootstrap/src/dynamodb-local-rmu-main.ts
- God Classes · FileTooLong: group-chat/group-chat-events.ts packages/command/domain/src/group-chat/group-chat-events.ts
- Code Coverage · Low coverage: packages/command/domain/src/group-chat/group-chat-errors.ts packages/command/domain/src/group-chat/group-chat-errors.ts
- Test Quality · No assertions: test packages/query/interface-adaptor/src/index.test.ts
- Test Quality · Test project verifies nothing: packages/query/interface-adaptor packages/query/interface-adaptor/src/index.test.ts
- Static Analysis (SAST) · High: REDACTED REDACTED
- Static Analysis (SAST) · High: watchdog-credential-written-to-log-ts packages/bootstrap/src/dynamodb-local-rmu-main.ts
- Dependency Vulnerabilities · Critical CVE: [GHSA redacted] REDACTED
- Dependency Vulnerabilities · Critical CVE: [GHSA redacted] REDACTED
- Dependency Vulnerabilities · High CVE: [GHSA redacted] REDACTED
- Dependency Vulnerabilities · High CVE: REDACTED REDACTED
- Dependency Vulnerabilities · High CVE: REDACTED REDACTED
- Dependency Vulnerabilities · High CVE: [GHSA redacted] REDACTED
- Dependency Vulnerabilities · Medium CVE: REDACTED REDACTED
- Dependency Vulnerabilities · Medium CVE: REDACTED REDACTED
- Dependency Vulnerabilities · Medium CVE: [GHSA redacted] REDACTED
- Code Duplication · Duplicated block (51 lines × 5 locations) packages/command/domain/src/group-chat/group-chat-events.ts
- Code Duplication · Duplicated block (44 lines × 2 locations) packages/command/domain/src/group-chat/group-chat-id.ts
- Code Duplication · Duplicated block with local edits (21 matched lines × 2 locations) packages/bootstrap/src/dynamodb-local-rmu-main.ts
- Code Duplication · Duplicated block (21 lines × 4 locations) packages/command/domain/src/group-chat/group-chat-events.ts
- Code Duplication · Duplicated block with local edits (16 matched lines × 2 locations) packages/bootstrap/src/dynamodb-lambda-rmu-handler.ts
- Code Duplication · Duplicated block with local edits (15 matched lines × 2 locations) packages/command/interface-adaptor-if/src/group-chat/group-chat-repository.ts
- Code Duplication · Duplicated block (15 lines × 4 locations) packages/command/interface-adaptor-impl/src/graphql/inputs.ts
- Code Duplication · Duplicated block (15 lines × 2 locations) packages/query/interface-adaptor/src/graphql/outputs.ts
- Code Duplication · Duplicated block (14 lines × 2 locations) packages/command/interface-adaptor-impl/src/graphql/resolvers.ts
- Code Duplication · Duplicated block (13 lines × 4 locations) packages/command/domain/src/group-chat/group-chat.ts
- Code Duplication · Duplicated block (12 lines × 2 locations) packages/command/interface-adaptor-impl/src/graphql/resolvers.ts
- Code Duplication · Duplicated block (11 lines × 2 locations) packages/bootstrap/src/dynamodb-local-rmu-main.ts
- Code Duplication · Duplicated block (11 lines × 3 locations) packages/query/interface-adaptor/src/graphql/resolvers.ts
- Code Duplication · Duplicated block (7 lines × 3 locations) packages/query/interface-adaptor/src/graphql/resolvers.ts
- Code Duplication · Duplicated block (6 lines × 2 locations) packages/bootstrap/src/spanner-change-stream-bridge-main.ts
- Import Boundaries · Boundary violation [package:third-party-deep-import] packages/command/domain/src/group-chat/group-chat-id.ts
- Import Boundaries · Boundary violation [package:third-party-deep-import] packages/command/domain/src/group-chat/group-chat-name.ts
- Import Boundaries · Boundary violation [package:third-party-deep-import] packages/command/domain/src/group-chat/group-chat.ts
- Import Boundaries · Boundary violation [package:third-party-deep-import] packages/command/domain/src/group-chat/message-id.ts
- Import Boundaries · Boundary violation [package:third-party-deep-import] packages/command/domain/src/group-chat/message.ts
- Import Boundaries · Boundary violation [package:third-party-deep-import] packages/command/domain/src/user-account/user-account-id.ts
- Cyclomatic Complexity · Complex function convertTo (cyclomatic 13, cognitive 15) packages/bootstrap/src/dynamodb-local-rmu-main.ts
- Cyclomatic Complexity · Complex function dynamodbLocalRmuMain (cyclomatic 12, cognitive 11) packages/bootstrap/src/dynamodb-local-rmu-main.ts
- Cyclomatic Complexity · Complex function streamDriver (cyclomatic 11, cognitive 24) packages/bootstrap/src/dynamodb-local-rmu-main.ts
- Large Files · packages/command/domain/src/group-chat/group-chat-events.ts: 680 lines of code packages/command/domain/src/group-chat/group-chat-events.ts
- Large Files · packages/command/domain/src/group-chat/group-chat.ts: 465 lines of code packages/command/domain/src/group-chat/group-chat.ts
- Test Coverage · No test reaches this file packages/command/processor/src/group-chat/group-chat-command-processor.ts
- Test Coverage · No test reaches this file packages/query/interface-adaptor/src/graphql/resolvers.ts
- Test Coverage · No test reaches this file packages/query/interface-adaptor/src/graphql/outputs.ts
- Test Coverage · No test reaches this file packages/query/interface-adaptor/src/graphql/schema.ts
- Dead Code · Dead file (~31 LoC) packages/bootstrap/src/dynamodb-lambda-rmu-handler.ts
Rebuild cost: about €15,000 · Estimate
| Cost to rebuild | €5,100 to €26,000, for 85 to 271 hours of work, about 0.1 person-years for one engineer |
|---|---|
| Difficulty of the problem | High, judged from the kind of software and how it is built. Code that solves a harder problem, such as payments or medical bookings, costs more per line to write. |
| Quality factor | ×0.7 at a score of 41. Better code takes more work to write, so the factor is ×1.0 at a score of 70, lower below it and higher above it. |
| Size | Small: 7,891 lines of product code |
| What it is not | Not a quotation: nobody has offered to build it for that. Not a valuation: it says nothing about what the business is worth. Not a certified figure: no professional has signed it as one. |
Top priorities
Diagnosis: what the measurements show together
Architecture — module dependency graph
Architecture: which parts of the code depend on which
| uses → | 1 bootstrap | 2 bootstrap.src.read-api-main | 3 bootstrap.src.write-api-main | 4 command.domain.src.group-chat.group-chat-errors | 5 command.domain.src.group-chat.group-chat-events | 6 command.domain.src.group-chat.member | 7 command.interface-adaptor-impl.src.graphql.inputs | 8 command.interface-adaptor-impl.src.graphql.outputs | 9 command.interface-adaptor-impl.src.repository.group-chat.group-chat-repository | 10 command.processor.src.group-chat | 11 infrastructure | 12 query.interface-adaptor.src.graphql | 13 query.interface-adaptor.src.graphql.outputs | 14 rmu.src.dead-letter-consumer | 15 rmu.src.failures | 16 rmu.src.read-model-updater-input | 17 rmu.src.retry | 18 rmu.src.sequence-number | 19 rmu.src.stream-recovery | 20 bootstrap.src | 21 command.domain.src.group-chat | 22 command.interface-adaptor-impl.src.graphql | 23 command.interface-adaptor-impl.src.graphql.resolvers | 24 command.interface-adaptor-impl.src.repository.group-chat | 25 query.interface-adaptor.src.graphql.resolvers | 26 rmu.src |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 1 bootstrap | ||||||||||||||||||||||||||
| 2 bootstrap.src.read-api-main | ||||||||||||||||||||||||||
| 3 bootstrap.src.write-api-main | ||||||||||||||||||||||||||
| 4 command.domain.src.group-chat.group-chat-errors | ||||||||||||||||||||||||||
| 5 command.domain.src.group-chat.group-chat-events | ||||||||||||||||||||||||||
| 6 command.domain.src.group-chat.member | ||||||||||||||||||||||||||
| 7 command.interface-adaptor-impl.src.graphql.inputs | ||||||||||||||||||||||||||
| 8 command.interface-adaptor-impl.src.graphql.outputs | ||||||||||||||||||||||||||
| 9 command.interface-adaptor-impl.src.repository.group-chat.group-chat-repository | ||||||||||||||||||||||||||
| 10 command.processor.src.group-chat | ||||||||||||||||||||||||||
| 11 infrastructure | ||||||||||||||||||||||||||
| 12 query.interface-adaptor.src.graphql | ||||||||||||||||||||||||||
| 13 query.interface-adaptor.src.graphql.outputs | ||||||||||||||||||||||||||
| 14 rmu.src.dead-letter-consumer | ||||||||||||||||||||||||||
| 15 rmu.src.failures | ||||||||||||||||||||||||||
| 16 rmu.src.read-model-updater-input | ||||||||||||||||||||||||||
| 17 rmu.src.retry | ||||||||||||||||||||||||||
| 18 rmu.src.sequence-number | ||||||||||||||||||||||||||
| 19 rmu.src.stream-recovery | ||||||||||||||||||||||||||
| 20 bootstrap.src | 1 | |||||||||||||||||||||||||
| 21 command.domain.src.group-chat | 1 | 1 | ||||||||||||||||||||||||
| 22 command.interface-adaptor-impl.src.graphql | 1 | 1 | ||||||||||||||||||||||||
| 23 command.interface-adaptor-impl.src.graphql.resolvers | 8 | 2 | ||||||||||||||||||||||||
| 24 command.interface-adaptor-impl.src.repository.group-chat | 1 | 1 | 1 | |||||||||||||||||||||||
| 25 query.interface-adaptor.src.graphql.resolvers | 3 | |||||||||||||||||||||||||
| 26 rmu.src | 1 | 1 | 3 | 1 |
20→3 bootstrap.src uses bootstrap.src.write-api-main✕
- Connections
- 1 pair of types, where a type in bootstrap.src uses a type in bootstrap.src.write-api-main.
- The types involved
packages.bootstrap.src.write-api-main→packages.bootstrap.src.write-api-main.GroupChatEventStore
- Direction
- bootstrap.src uses bootstrap.src.write-api-main, so a change to bootstrap.src.write-api-main can break bootstrap.src, while a change to bootstrap.src can't break bootstrap.src.write-api-main.
- Position
- Below the diagonal: bootstrap.src uses a module listed above it, which is the healthy direction.
21→5 command.domain.src.group-chat uses command.domain.src.group-chat.group-chat-events✕
- Connections
- 1 pair of types, where a type in command.domain.src.group-chat uses a type in command.domain.src.group-chat.group-chat-events.
- The types involved
packages.command.domain.src.group-chat.group-chat→packages.command.domain.src.group-chat.group-chat-events.GroupChatEvent
- Direction
- command.domain.src.group-chat uses command.domain.src.group-chat.group-chat-events, so a change to command.domain.src.group-chat.group-chat-events can break command.domain.src.group-chat, while a change to command.domain.src.group-chat can't break command.domain.src.group-chat.group-chat-events.
- Position
- Below the diagonal: command.domain.src.group-chat uses a module listed above it, which is the healthy direction.
21→13 command.domain.src.group-chat uses query.interface-adaptor.src.graphql.outputs✕
- Connections
- 1 pair of types, where a type in command.domain.src.group-chat uses a type in query.interface-adaptor.src.graphql.outputs.
- The types involved
packages.command.domain.src.group-chat.group-chat→packages.query.interface-adaptor.src.graphql.outputs.GroupChat
- Direction
- command.domain.src.group-chat uses query.interface-adaptor.src.graphql.outputs, so a change to query.interface-adaptor.src.graphql.outputs can break command.domain.src.group-chat, while a change to command.domain.src.group-chat can't break query.interface-adaptor.src.graphql.outputs.
- Position
- Below the diagonal: command.domain.src.group-chat uses a module listed above it, which is the healthy direction.
22→6 command.interface-adaptor-impl.src.graphql uses command.domain.src.group-chat.member✕
- Connections
- 1 pair of types, where a type in command.interface-adaptor-impl.src.graphql uses a type in command.domain.src.group-chat.member.
- The types involved
packages.command.interface-adaptor-impl.src.graphql.resolvers→packages.command.domain.src.group-chat.member.MemberRole
- Direction
- command.interface-adaptor-impl.src.graphql uses command.domain.src.group-chat.member, so a change to command.domain.src.group-chat.member can break command.interface-adaptor-impl.src.graphql, while a change to command.interface-adaptor-impl.src.graphql can't break command.domain.src.group-chat.member.
- Position
- Below the diagonal: command.interface-adaptor-impl.src.graphql uses a module listed above it, which is the healthy direction.
22→7 command.interface-adaptor-impl.src.graphql uses command.interface-adaptor-impl.src.graphql.inputs✕
- Connections
- 1 pair of types, where a type in command.interface-adaptor-impl.src.graphql uses a type in command.interface-adaptor-impl.src.graphql.inputs.
- The types involved
packages.command.interface-adaptor-impl.src.graphql.resolvers→packages.command.interface-adaptor-impl.src.graphql.inputs.Role
- Direction
- command.interface-adaptor-impl.src.graphql uses command.interface-adaptor-impl.src.graphql.inputs, so a change to command.interface-adaptor-impl.src.graphql.inputs can break command.interface-adaptor-impl.src.graphql, while a change to command.interface-adaptor-impl.src.graphql can't break command.interface-adaptor-impl.src.graphql.inputs.
- Position
- Below the diagonal: command.interface-adaptor-impl.src.graphql uses a module listed above it, which is the healthy direction.
23→7 command.interface-adaptor-impl.src.graphql.resolvers uses command.interface-adaptor-impl.src.graphql.inputs✕
- Connections
- 8 pairs of types, where a type in command.interface-adaptor-impl.src.graphql.resolvers uses a type in command.interface-adaptor-impl.src.graphql.inputs.
- The types involved
packages.command.interface-adaptor-impl.src.graphql.resolvers.GroupChatCommandResolver→packages.command.interface-adaptor-impl.src.graphql.inputs.AddMemberInputpackages.command.interface-adaptor-impl.src.graphql.resolvers.GroupChatCommandResolver→packages.command.interface-adaptor-impl.src.graphql.inputs.CreateGroupChatInputpackages.command.interface-adaptor-impl.src.graphql.resolvers.GroupChatCommandResolver→packages.command.interface-adaptor-impl.src.graphql.inputs.DeleteGroupChatInputpackages.command.interface-adaptor-impl.src.graphql.resolvers.GroupChatCommandResolver→packages.command.interface-adaptor-impl.src.graphql.inputs.DeleteMessageInputpackages.command.interface-adaptor-impl.src.graphql.resolvers.GroupChatCommandResolver→packages.command.interface-adaptor-impl.src.graphql.inputs.EditMessageInputpackages.command.interface-adaptor-impl.src.graphql.resolvers.GroupChatCommandResolver→packages.command.interface-adaptor-impl.src.graphql.inputs.PostMessageInputpackages.command.interface-adaptor-impl.src.graphql.resolvers.GroupChatCommandResolver→packages.command.interface-adaptor-impl.src.graphql.inputs.RemoveMemberInputpackages.command.interface-adaptor-impl.src.graphql.resolvers.GroupChatCommandResolver→packages.command.interface-adaptor-impl.src.graphql.inputs.RenameGroupChatInput
- Direction
- command.interface-adaptor-impl.src.graphql.resolvers uses command.interface-adaptor-impl.src.graphql.inputs, so a change to command.interface-adaptor-impl.src.graphql.inputs can break command.interface-adaptor-impl.src.graphql.resolvers, while a change to command.interface-adaptor-impl.src.graphql.resolvers can't break command.interface-adaptor-impl.src.graphql.inputs.
- Position
- Below the diagonal: command.interface-adaptor-impl.src.graphql.resolvers uses a module listed above it, which is the healthy direction.
23→8 command.interface-adaptor-impl.src.graphql.resolvers uses command.interface-adaptor-impl.src.graphql.outputs✕
- Connections
- 2 pairs of types, where a type in command.interface-adaptor-impl.src.graphql.resolvers uses a type in command.interface-adaptor-impl.src.graphql.outputs.
- The types involved
packages.command.interface-adaptor-impl.src.graphql.resolvers.GroupChatCommandResolver→packages.command.interface-adaptor-impl.src.graphql.outputs.GroupChatOutputpackages.command.interface-adaptor-impl.src.graphql.resolvers.GroupChatCommandResolver→packages.command.interface-adaptor-impl.src.graphql.outputs.MessageOutput
- Direction
- command.interface-adaptor-impl.src.graphql.resolvers uses command.interface-adaptor-impl.src.graphql.outputs, so a change to command.interface-adaptor-impl.src.graphql.outputs can break command.interface-adaptor-impl.src.graphql.resolvers, while a change to command.interface-adaptor-impl.src.graphql.resolvers can't break command.interface-adaptor-impl.src.graphql.outputs.
- Position
- Below the diagonal: command.interface-adaptor-impl.src.graphql.resolvers uses a module listed above it, which is the healthy direction.
24→3 command.interface-adaptor-impl.src.repository.group-chat uses bootstrap.src.write-api-main✕
- Connections
- 1 pair of types, where a type in command.interface-adaptor-impl.src.repository.group-chat uses a type in bootstrap.src.write-api-main.
- The types involved
packages.command.interface-adaptor-impl.src.repository.group-chat.group-chat-repository→packages.bootstrap.src.write-api-main.GroupChatEventStore
- Direction
- command.interface-adaptor-impl.src.repository.group-chat uses bootstrap.src.write-api-main, so a change to bootstrap.src.write-api-main can break command.interface-adaptor-impl.src.repository.group-chat, while a change to command.interface-adaptor-impl.src.repository.group-chat can't break bootstrap.src.write-api-main.
- Position
- Below the diagonal: command.interface-adaptor-impl.src.repository.group-chat uses a module listed above it, which is the healthy direction.
24→5 command.interface-adaptor-impl.src.repository.group-chat uses command.domain.src.group-chat.group-chat-events✕
- Connections
- 1 pair of types, where a type in command.interface-adaptor-impl.src.repository.group-chat uses a type in command.domain.src.group-chat.group-chat-events.
- The types involved
packages.command.interface-adaptor-impl.src.repository.group-chat.group-chat-repository→packages.command.domain.src.group-chat.group-chat-events.GroupChatEvent
- Direction
- command.interface-adaptor-impl.src.repository.group-chat uses command.domain.src.group-chat.group-chat-events, so a change to command.domain.src.group-chat.group-chat-events can break command.interface-adaptor-impl.src.repository.group-chat, while a change to command.interface-adaptor-impl.src.repository.group-chat can't break command.domain.src.group-chat.group-chat-events.
- Position
- Below the diagonal: command.interface-adaptor-impl.src.repository.group-chat uses a module listed above it, which is the healthy direction.
24→13 command.interface-adaptor-impl.src.repository.group-chat uses query.interface-adaptor.src.graphql.outputs✕
- Connections
- 1 pair of types, where a type in command.interface-adaptor-impl.src.repository.group-chat uses a type in query.interface-adaptor.src.graphql.outputs.
- The types involved
packages.command.interface-adaptor-impl.src.repository.group-chat.group-chat-repository→packages.query.interface-adaptor.src.graphql.outputs.GroupChat
- Direction
- command.interface-adaptor-impl.src.repository.group-chat uses query.interface-adaptor.src.graphql.outputs, so a change to query.interface-adaptor.src.graphql.outputs can break command.interface-adaptor-impl.src.repository.group-chat, while a change to command.interface-adaptor-impl.src.repository.group-chat can't break query.interface-adaptor.src.graphql.outputs.
- Position
- Below the diagonal: command.interface-adaptor-impl.src.repository.group-chat uses a module listed above it, which is the healthy direction.
25→13 query.interface-adaptor.src.graphql.resolvers uses query.interface-adaptor.src.graphql.outputs✕
- Connections
- 3 pairs of types, where a type in query.interface-adaptor.src.graphql.resolvers uses a type in query.interface-adaptor.src.graphql.outputs.
- The types involved
packages.query.interface-adaptor.src.graphql.resolvers.GroupChatQueryResolver→packages.query.interface-adaptor.src.graphql.outputs.GroupChatpackages.query.interface-adaptor.src.graphql.resolvers.GroupChatQueryResolver→packages.query.interface-adaptor.src.graphql.outputs.Memberpackages.query.interface-adaptor.src.graphql.resolvers.GroupChatQueryResolver→packages.query.interface-adaptor.src.graphql.outputs.Message
- Direction
- query.interface-adaptor.src.graphql.resolvers uses query.interface-adaptor.src.graphql.outputs, so a change to query.interface-adaptor.src.graphql.outputs can break query.interface-adaptor.src.graphql.resolvers, while a change to query.interface-adaptor.src.graphql.resolvers can't break query.interface-adaptor.src.graphql.outputs.
- Position
- Below the diagonal: query.interface-adaptor.src.graphql.resolvers uses a module listed above it, which is the healthy direction.
26→5 rmu.src uses command.domain.src.group-chat.group-chat-events✕
- Connections
- 1 pair of types, where a type in rmu.src uses a type in command.domain.src.group-chat.group-chat-events.
- The types involved
packages.rmu.src.journal-reader→packages.command.domain.src.group-chat.group-chat-events.GroupChatEvent
- Direction
- rmu.src uses command.domain.src.group-chat.group-chat-events, so a change to command.domain.src.group-chat.group-chat-events can break rmu.src, while a change to rmu.src can't break command.domain.src.group-chat.group-chat-events.
- Position
- Below the diagonal: rmu.src uses a module listed above it, which is the healthy direction.
26→14 rmu.src uses rmu.src.dead-letter-consumer✕
- Connections
- 1 pair of types, where a type in rmu.src uses a type in rmu.src.dead-letter-consumer.
- The types involved
packages.rmu.src.dead-letter-consumer→packages.rmu.src.dead-letter-consumer.ParsedMessage
- Direction
- rmu.src uses rmu.src.dead-letter-consumer, so a change to rmu.src.dead-letter-consumer can break rmu.src, while a change to rmu.src can't break rmu.src.dead-letter-consumer.
- Position
- Below the diagonal: rmu.src uses a module listed above it, which is the healthy direction.
26→16 rmu.src uses rmu.src.read-model-updater-input✕
- Connections
- 3 pairs of types, where a type in rmu.src uses a type in rmu.src.read-model-updater-input.
- The types involved
packages.rmu.src.dynamodb-adapter→packages.rmu.src.read-model-updater-input.ReadModelInputpackages.rmu.src.read-model-updater-input→packages.rmu.src.read-model-updater-input.ReadModelInputpackages.rmu.src.update-read-model→packages.rmu.src.read-model-updater-input.ReadModelInput
- Direction
- rmu.src uses rmu.src.read-model-updater-input, so a change to rmu.src.read-model-updater-input can break rmu.src, while a change to rmu.src can't break rmu.src.read-model-updater-input.
- Position
- Below the diagonal: rmu.src uses a module listed above it, which is the healthy direction.
26→17 rmu.src uses rmu.src.retry✕
- Connections
- 1 pair of types, where a type in rmu.src uses a type in rmu.src.retry.
- The types involved
packages.rmu.src.update-read-model→packages.rmu.src.retry.RetryExhaustedError
- Direction
- rmu.src uses rmu.src.retry, so a change to rmu.src.retry can break rmu.src, while a change to rmu.src can't break rmu.src.retry.
- Position
- Below the diagonal: rmu.src uses a module listed above it, which is the healthy direction.
At a glance — Code Health
At a glance — Architecture
At a glance — Maturity
At a glance — Readiness
At a glance — Security
At a glance — Domain Modelling
At a glance — Performance
Security & Compliance — OWASP Top-10 mapping
| OWASP category | Findings | Severity |
|---|---|---|
| A03:2025 — Software Supply Chain Failures | 41 | High / Critical |
| A02:2025 — Security Misconfiguration | 28 | High / Critical |
| A05:2025 — Injection | 15 | High / Critical |
Roadmap
Top priorities: Protect endpoints by default-deny: a global authentication guard or middleware with explicit public opt-outs, or a guard on every route, plus named role/permission rules for what an authenticated caller may do; Resolve the 20 High CVE finding(s) in Dependency Vulnerabilities — start with REDACTED (20); Resolve the 18 High IaC finding(s) in IaC & Container Security — start with REDACTED (6), REDACTED (4), REDACTED (4).
| Do this | Helps | Effort | Dimension |
|---|---|---|---|
| Protect endpoints by default-deny: a global authentication guard or middleware with explicit public opt-outs, or a guard on every route, plus named role/permission rules for what an authenticated caller may do. | +14.1 pts | Medium | Access Controls |
| Resolve the 20 High CVE finding(s) in Dependency Vulnerabilities — start with REDACTED (20). | +4.5 pts | Medium | Dependency Vulnerabilities |
| Resolve the 18 High IaC finding(s) in IaC & Container Security — start with REDACTED (6), REDACTED (4), REDACTED (4). | +4.0 pts | Medium | IaC & Container Security |
| Resolve the 2 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED, REDACTED. | +2.0 pts | Low | Static Analysis (SAST) |
| Resolve the 1 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED. | +1.8 pts | Low | Static Analysis (SAST) |
| Resolve the 1 Critical CVE finding(s) in Dependency Vulnerabilities — start with REDACTED. | +1.8 pts | Low | Dependency Vulnerabilities |
| Resolve the 8 Medium IaC finding(s) in IaC & Container Security — start with REDACTED (4), REDACTED (3), REDACTED. | +1.8 pts | Low | IaC & Container Security |
| Add a SAST step to CI running what this repository's stack ships: CodeQL's javascript-typescript pack, `semgrep --config=p/typescript`, or eslint-plugin-security — so a security regression fails the build instead of landing. | +3.4 pts | Medium | Security & performance tooling |
File quality
| File | Score | Band | Worst signal |
|---|---|---|---|
| REDACTED | 0.0 | Slop | Dependency Vulnerabilities: Critical CVE: REDACTED |
| REDACTED | 1.1 | Slop | IaC & Container Security: High IaC: REDACTED |
| REDACTED | 2.3 | Mixed | Static Analysis (SAST): High: REDACTED |
| REDACTED | 2.4 | Mixed | IaC & Container Security: High IaC: REDACTED |
| REDACTED | 3.4 | Mixed | IaC & Container Security: High IaC: REDACTED |
| REDACTED | 4.4 | Mixed | IaC & Container Security: High IaC: REDACTED |
| REDACTED | 4.8 | Mixed | IaC & Container Security: High IaC: REDACTED |
| REDACTED | 5.1 | Mixed | Static Analysis (SAST): High: REDACTED |
| REDACTED | 5.1 | Mixed | IaC & Container Security: High IaC: REDACTED |
| REDACTED | 7.2 | Near-clean | Static Analysis (SAST): High: REDACTED |
| REDACTED | 7.2 | Near-clean | Static Analysis (SAST): High: REDACTED |
| REDACTED | 7.2 | Near-clean | Static Analysis (SAST): High: REDACTED |
| REDACTED | 7.2 | Near-clean | IaC & Container Security: High IaC: REDACTED |
| packages/command/domain/src/group-chat/group-chat.ts | 7.4 | Near-clean | Cyclomatic Complexity: group-chat.make (cyclomatic 22) |
| packages/rmu/src/stream-recovery.ts | 7.8 | Near-clean | Cyclomatic Complexity: stream-recovery.processStream (cyclomatic 18) |
| packages/infrastructure/src/index.test.ts | 7.8 | Near-clean | Test Quality: No assertions: test |
| packages/command/processor/src/group-chat/index.test.ts | 7.8 | Near-clean | Test Quality: No assertions: test |
| packages/command/interface-adaptor-if/src/index.test.ts | 7.8 | Near-clean | Test Quality: No assertions: test |
| packages/bootstrap/package.json | 7.8 | Near-clean | Dependency Hygiene: Deprecated: @types/winston |
| packages/command/interface-adaptor-if/package.json | 7.8 | Near-clean | Dependency Hygiene: Deprecated: @types/winston |
How the grades work
A definite problem that already costs you something and drags the score down: a missing authorisation check, a dependency with a known exploit, a build that does not reproduce. Failure here tends to cause failures elsewhere.
Likely wrong, but not failing yet. It degrades the codebase over a longer horizon and can cause failures elsewhere — not urgent this week, not something to carry for two years either.
Recorded, with no effect on how the codebase functions. Present so the survey is complete, not because it needs doing.
Something this survey could not settle from the outside, and which could be critical or serious. Either a control was required and no positive evidence of it exists in the repository — a backup job that nothing shows was ever restored from proves nothing about restores — or our own analysis could not run over that part of the tree. This is not a clean result. These are excluded from the score rather than awarded a pass, so the number on the cover neither rewards nor penalises them: if you act on this survey without resolving them, you carry that risk yourself. Each one is named under Limitations.
Methodology & how to trust this report
This survey is a deep, periodic assessment — run each sprint, monthly, or quarterly, taking the time to go wider and deeper than a quick check and surfacing in one coherent report what you'd otherwise piece together from a dozen separate tools. It scores deterministically: the same commit yields the same score, every run. All 75 evaluated dimensions are computed by tools and static analysis; no language model sets or judges any of them. Overall confidence is 0.8, the weighted average across measured dimensions.
What we checked — 75 dimensions across the health lenses
- Can you open the finding? Real findings cite a repo-relative file and line you can open at the cited line — never an absolute scratch path. Here, 230 of 239 do; the remainder are repo-wide signals — a dimension-level measurement, not a single line.
- Is there a tool behind the number? Every score below names the method that produced it: Roslyn, git or a scanner, not a narrative.
- Does re-running give the same result? Run it again on the same commit and the score — and this report, byte for byte — is identical. A report whose numbers move between runs is describing the run, not the code.
Tools & methods
| Method | Backs | Version | Evaluator |
|---|---|---|---|
| Roslyn static analysis | Complexity, cohesion, coupling, dead code, API surface, layering | 5.3.0 | ✓ deterministic |
| Native secret scanner | Hardcoded secrets / credentials | 1.0.0 | ✓ deterministic |
| Canine Code Analyzer duplication detector (in-process) | Code duplication | 1.0.0 | ✓ deterministic |
| Coverage (coverlet / dotnet-coverage) | Line & branch coverage | 10.0.400 | ✓ deterministic |
| NuGet / dotnet | Outdated, vulnerable & deprecated dependencies | 10.0.400 | ✓ deterministic |
| git / LibGit2Sharp | Churn hotspots, knowledge concentration, history | 2.43.0 · 0.31.0 | ✓ deterministic |
| gitleaks · semgrep · trivy · checkov | Secrets in history, SAST, CVEs, IaC & container, PII / GDPR | 1.86.0 · 0.69.3 · 3.2.533 | ✓ deterministic |
Run transparency — what happened this run
- D8 Code Coverage — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 8 test file(s) failed while being loaded here, so none of their cases ran (typically a native addon or generated module the package's install scripts build, which the analyzer's scripts-off install does not run). The 2 production file(s) those files import that read under half covered are unmeasured in this run, not untested, so their figures are left out of the per-file rows and the 80.9% rather than published as low coverage. You can widen what we reach: optional: commit the lcov report of a run where those test files load, and their modules are read from it.
- D12 Dependency Hygiene — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This repository's dependency manifests WERE read and their pinning discipline assessed; what went unanswered is the currency half, because registry.npmjs.org — the registry that answers it — was asked and did not reply (registry returned 429). This is OUR side and it is an ENVIRONMENT fault, not a missing collector: the collector exists and ran. An HTTP 403 here is what this scan's egress allowlist returns for a host that is not on it, so the remedy is to add registry.npmjs.org to the allowlist and re-run — not to build anything.
- D16 Bus Factor — not measured this run — This is a true statement about the repository that carries nothing for its owner to act on, so it is reported here rather than as a defect in their code. Single-maintainer repository — bus factor is not applicable (2 contributor(s) across 1064 commit(s) sampled, automation and bot accounts excluded). One of them holds 100% of the history; the other 1 hold 0% each on average, below the 5% at which there is somebody to hand the work to. That is a single maintainer with drive-by contributors, not a team whose knowledge has concentrated — so the bus factor is not applicable and there is nothing here for the owner to act on.
- D19 Documentation Quality — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. This kind did not reach the 95 % precision gate in three adjudicated runs (docs/plans/deterministic-engine/adjudication/D19-sample3-v3.md), so by the pre-registered fallback it publishes no row until a re-measurement shows it does. The candidates are counted here, not reported as findings, and the score does not include them.
- D22 Internal API Consistency — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. D22's deterministic call-shape rules are gated on C# first (docs/plans/deterministic-engine.md, P5): each other language is switched on only after its own concept suite and A/B gate pass. This says nothing about whether that surface is consistent.
- D32 Data Compliance (PII/GDPR) — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. `packages/command/domain/src/group-chat/group-chat-errors.ts`, `packages/command/domain/src/group-chat/group-chat-events.ts`, `packages/command/domain/src/group-chat/group-chat-id.ts`, `packages/command/domain/src/group-chat/group-chat-name.ts`, `packages/command/domain/src/group-chat/group-chat.ts`, … (+8 more) produced a parse error, so every rule in this engine's `gdpr.yml` was absent there. That absence is NOT a clean result: these rules detect personal data crossing a boundary into a log sink, a URL or browser storage, and a file that was never parsed cannot report any of the three. The rest of the tree analysed normally and its rows above stand; only these files are unaccounted for. You can widen what we reach: fix the syntax error (or exclude the file deliberately) and re-scan to cover it.
- D44 Platform End-of-Life — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This dimension reads a project's own statement about the platform it runs on: a TargetFramework in a .NET project file, a .nvmrc or .python-version, a capped requires-python, a Rust toolchain file or Cargo.toml rust-version, a .go-version, .java-version, .ruby-version, .tool-versions or .sdkmanrc, a go.mod go directive, a Maven or Gradle Java level or toolchain, a Gemfile's ruby directive, a mix.exs elixir requirement, a rebar.config minimum_otp_vsn, a pubspec.yaml SDK constraint, a build.sbt scalaVersion, or a framework major pinned by a dependency constraint. This repository carries none of them, so nothing about its platform was established. That is a gap in this analyzer's coverage, NOT a finding that the platform is supported — a language whose runtime is declared elsewhere (Package.swift, a REDACTED) is simply not read here yet.
- AXR1 Runtime accessibility — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Render strategy: boot via REDACTED (REDACTED). docker build failed (exit 1) — 4.209 Exit status 1 4.216 ELIFECYCLE Command failed with exit code 1. ------ REDACTED:22 -------------------- 20 | RUN pnpm install -g turbo 21 | RUN pnpm install --frozen-lockfile 22 | >>> RUN pnpm prisma:generate 23 | RUN pnpm build 24 | -------------------- ERROR: failed to solve: process "/bin/sh -c pnpm prisma:generate" did not complete successfully: exit code: 1; runtime evidence skipped.
- DM9 Scattered domain decisions — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. Arm two tells a construction that PRODUCES a measurement from one that merely passes it along, and this repository's frontend does not compute that fact. A measurement built independently in two places would not appear above.
- S1 Web-Security Posture — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. 77 JavaScript/TypeScript file(s) were read for weak hashes and ciphers, key material fixed in the source, disabled certificate validation, obsolete TLS versions, plaintext password storage and session cookies set without HttpOnly, Secure or SameSite, and none was found. The server controls this dimension also scores were not assessed, so no score is given.
- X2 Cancellation propagation — not measured this run — We could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, and JavaScript/TypeScript, Go, PHP, Dart, Kotlin, Ruby, Scala, Java, Python and Rust source only, and no C# was loaded, and no named async function in this repository's JavaScript/TypeScript, nor any Go, PHP or Dart function or Kotlin suspend function, makes a request that can be cancelled (fetch, axios, ky, ofetch, got, undici, node:http; net/http, net.Dial; amphp; Dio; Ktor, OkHttp), so there is nothing to judge, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
- X4 Structured logging — measured, with a gap in what it reached — We measured this, but not all of it. What we did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. 20 further occurrence(s) are not listed individually; the score already reflects all 60.
Limitations & what we did not check
We assess the repository exactly as committed, and only the repository. By design we do not reach outside the source tree: the live cloud account, the running CI/CD pipeline, the host's branch-protection and approval rules, the production configuration, or a restore actually exercised against a backup are all out of scope. That boundary is a feature, not a gap — a repo-relative, deterministic scan re-runs identically on any commit and every finding opens at a real file and line, where a live audit can neither be reproduced nor traced. The visible consequence is that controls which leave no in-repo evidence are reported as "not evidenced" and excluded from the score rather than awarded a number a static scan cannot justify.
Per-dimension blind spots
- D1 Cyclomatic Complexity: Cyclomatic complexity counts branches statically — it cannot tell an essential decision tree from accidental tangle, nor see complexity that lives in data or configuration (large switch-case token tables, DSL lexers/parsers, data-as-code rule tables) rather than control flow: a tokenizer's many single-character cases read as high complexity though each branch is trivial.
- D2 Cognitive Complexity: Cognitive-complexity heuristics approximate how hard code is to follow; genuine domain difficulty and well-named intent that eases reading are not captured.
- D3 God Classes: "God class" is sized by members and responsibilities visible in the type — a deliberately broad facade over a coherent subsystem can read the same as an accidental grab-bag. For front-end JS the file-length check is cohesion-aware (a single-responsibility module — one class/IIFE — earns a 3× threshold), but cohesion is approximated from top-level declarations, not true dependency structure.
- D5 Coupling: Coupling is measured between projects/assemblies — runtime coupling through DI, reflection, messaging or shared databases is invisible to a static reference graph.
- D6 Cohesion (LCOM4): LCOM4 cohesion is syntactic — it infers connectivity from which methods touch which fields/methods by name, not from real runtime behaviour or intent.
- D8 Code Coverage: Coverage is measured by building and running the test suite inside our isolated image — the target repo is never modified, and nothing on your systems runs. So coverage exists only when the suite builds and runs within the inline time budget; one that needs external services, can't build, or exceeds the budget yields no coverage (D8 then degrades to not-measured, not a low score). Line coverage also says nothing about assertion quality.
- D9 Test Distribution: The test-pyramid shape is inferred from project/folder naming and references, with a single test host bucketed per-file by its path tier and content signals — a suite that names tiers unconventionally and gives no per-file signal can still be mis-bucketed.
- D10 Test Quality: Assertion density is structural — it cannot tell a meaningful behavioural assertion from a trivial one, only that an assertion is present.
- D11 Test Reliability: Flakiness is inferred from history/markers — we run the suite once (for coverage), not the repeated runs under varied conditions that reveal nondeterminism, so a flaky test never recorded as failing is invisible here.
- D13 Secret Scanning: Secret detection is signature- and entropy-based on the current tree — a secret that does not match a known pattern, or one already rotated, will not be flagged (a clean scan is "nothing matched", not "no secrets exist").
- D15 Churn × Complexity Hotspots: Churn hotspots come from git history — a freshly imported or squashed repository has no churn signal, and recent rewrites can mask a historically risky file.
- D17 Explicit Debt: Acknowledged-debt signals (TODO/FIXME, suppressions, dead code) are textual — undocumented debt that nobody marked, and debt that lives in design rather than annotations, is invisible. Committed machine-written code (scaffolded migrations, designer/codegen output, generated stubs) is excluded — it is never the team's dead code to delete.
- D19 Documentation Quality: Documentation quality publishes two things only: a runnable or packaged unit with no example, and a multi-project root README that maps none of its parts. It does not judge clarity, and its other checks (overview, licence, boilerplate, structure, empty sections, XML-doc coverage) are withheld after adjudication: their candidates are counted in the card's gaps, not shown as rows. A false statement in a document is M4's; units are .NET projects only.
- D23 Boundary Type-Coupling: Boundary leakage is detected from type references across detected contexts — leaks that flow through primitives, serialization or shared infrastructure may not surface as a typed reference.
- D24 Comment Value: Comment value is measured as redundancy only: a comment that repeats its code's words is found, but a paraphrase in other words, a vague comment, or one the code contradicts is not, and whether a comment is valuable is not claimed. Comments in other scripts or languages, and outside C#, are not judged.
- D26 Project Cohesion: Project focus is sized from members/namespaces per project — a project that is broad by deliberate design reads the same as one that has sprawled.
- D27 Navigability: Indirection/navigability is structural — it measures hops to follow a call, not whether that indirection buys real flexibility or just ceremony.
- D28 Secrets (history): Secret-history scanning sweeps the git log for known patterns — a secret that predates the available history, or never matched a signature, is not found (clean means "nothing matched in the history we can see").
- D29 Static Analysis (SAST): SAST findings are pattern-based (semgrep) — it finds classes of bug it has rules for; logic flaws, auth/authorization gaps and issues needing runtime context are out of reach (and clean means "no rule matched").
- D30 Dependency Vulnerabilities: CVE matching depends on accurate package/version metadata and on the advisory databases — a vulnerability with no published advisory, or in code not declared as a dependency, is not seen. Coverage needs a RESOLVED graph: an unpinned requirements.txt, or a pom without a resolved build, yields partial coverage rather than a clean verdict. An ecosystem the analyzer cannot scan is reported as unmeasured, never as clean.
- D31 IaC & Container Security: IaC scanning checks Dockerfiles/Terraform/Kubernetes against best-practice rules — it cannot see the live cloud account, runtime configuration, or drift between the committed config and what is actually deployed.
- D34 Knowledge Freshness: Freshness is decayed commit RECENCY, not comprehension — code read often but rarely committed reads as orphaned, and stable code that genuinely needs no changes is penalised the same as forgotten code; bot/squash commits distort it like the bus factor.
- D35 Change Coupling: Change coupling is co-change in COMMITS — files split across separate commits, or coupled only through a shared config/build step, read as uncoupled, and a sweeping commit (rename/format) is excluded so it doesn't couple everything. It shows that files change together, not WHY: a high coupling can be a healthy cohesive pair as readily as a hidden leak.
- D43 Malicious Dependencies: Only packages some vulnerability database has already NAMED as malicious are seen — a compromise published in the last hours, or never reported at all, is invisible here, and this dimension reading 10 is not evidence that a dependency is trustworthy. There is no typosquat or dependency-confusion analysis: a package nobody has reported is simply absent from the feeds. Coverage is the dependency scan's: an ecosystem that could not be scanned is disclosed as unmeasured, never as clean.
- AX10 Code composition: Role is inferred from namespace/folder convention, not semantics — a domain concept living in a folder named "Services" reads as application, and the split is lines-of-code, not business value. The business-logic-share score is a SOFT, FLOORED signal: it contributes to the Architecture lens but is floored at the Critical gate, so an infrastructure-heavy design (a gateway, an ETL, a driver) is legitimately low without being nuked to zero.
- DM6 Domain ↔ infrastructure boundary: Infrastructure reached through a hand-rolled wrapper, a domain-named facade, reflection, or a string-keyed service locator resolves to a non-infra type and isn't seen; the body scan is symbol resolution over syntax, not full dataflow. A clean result means "no resolved infra reference in a domain body", not a proof of purity.
- P4 Deployment & Rollback: Approval/branch-protection rules live in repository settings the scan cannot see — only their in-repo evidence (config files, workflows) is checked, so a control enforced purely in the host's settings reads as "not evidenced".
- P5 DR & Backup: Backup/restore and disaster-recovery readiness is judged from in-repo evidence — a config that exists is not a tested restore, so the absence of positive evidence is reported as "not evidenced", never scored as present.
Dimensions
D1 · Cyclomatic Complexity
2 method(s) exceeded the cyclomatic complexity threshold of 15; the worst was group-chat.make at 22.
What to do
- Bring the 2 bodies over 15 down to 15 or less in Cyclomatic Complexity — start with group-chat.make (cyclomatic 22), stream-recovery.processStream (cyclomatic 18). — This score is capped by its worst body, so a finding fixed alone moves it by almost nothing — the next one down takes its place. Refactoring these 2 together lifts Cyclomatic Complexity from 9.4 to about 10.0/10, projected with the scoring formula itself and assuming each lands exactly at 15.
- Enforce Cyclomatic Complexity in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.
D2 · Cognitive Complexity
3 method(s) exceeded the cognitive complexity threshold of 15; the worst was stream-recovery.processStream at 47.
What to do
- Bring the 3 bodies over 15 down to 15 or less in Cognitive Complexity — start with stream-recovery.processStream (cognitive 47), spanner-change-stream-reader.createChangeStreamReader::readWindow (cognitive 28), group-chat.make (cognitive 21). — This score is capped by its worst body, so a finding fixed alone moves it by almost nothing — the next one down takes its place. Refactoring these 3 together lifts Cognitive Complexity from 8.6 to about 10.0/10, projected with the scoring formula itself and assuming each lands exactly at 15.
- Enforce Cognitive Complexity in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.
D3 · God Classes
1 over-large unit(s) detected — types, modules or files that carry too much.
What to do
- Resolve the 1 FunctionTooLong finding(s) in God Classes — start with group-chat.ts. — One of this dimension's main actionable groups (1 warning-level).
- Enforce God Classes in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.
D5 · Coupling
9 production modules (npm), 0 dependency cycle(s), 0 unstable depended-on module(s). Read from the build's own module declarations; 3 module(s) off the main sequence, with abstractness counted on 7 of the 9 (the rest declare no modelled class or interface, export only macros, declare types in source no model reads, or have no source directory of their own).
What to do
- Resolve the 3 Off the main sequence finding(s) in Coupling. — One of this dimension's main actionable groups (3 warning-level).
- Enforce Coupling in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.
D6 · Cohesion (LCOM4)
0 of 1 classes have LCOM4 above 3.
D8 · Code Coverage
Line coverage 80.9%. Measured from the JavaScript/TypeScript suite (jest via `pnpm install --frozen-lockfile --ignore-scripts` in packages/bootstrap/; jest via `pnpm install --frozen-lockfile --ignore-scripts` in packages/command/domain/; jest in packages/command/interface-adaptor-if/: not run; jest in packages/command/interface-adaptor-impl/: not run; jest in packages/command/processor/: not run; jest in packages/infrastructure/: not run; jest via `pnpm install --frozen-lockfile --ignore-scripts` in packages/query/interface-adaptor/; jest via `pnpm install --frozen-lockfile --ignore-scripts` in packages/rmu/).
D9 · Test Distribution
134 test methods: 134 unit, 0 integration, 0 BDD, 0 e2e. The JavaScript/TypeScript suite contributes 134 `it`/`test` case(s) across 27 test file(s) declaring at least one; its tier split is read from package names and paths only.
D10 · Test Quality
0 skipped, 5 zero-assertion, no mocking-framework packages referenced (hand-written doubles or no mocking) across 134 tests.
What to do
- Resolve the 5 No assertions finding(s) in Test Quality — start with index.test.ts (5). — One of this dimension's main actionable groups (5 warning-level).
- Resolve the 3 Test project verifies nothing finding(s) in Test Quality — start with index.test.ts (3). — One of this dimension's main actionable groups (3 warning-level).
- Enforce Test Quality in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.
D11 · Test Reliability
0 flaky across 1 measured tier(s). JavaScript/TypeScript (jest via `pnpm install --frozen-lockfile --ignore-scripts` in packages/bootstrap/ (8 tests); jest via `pnpm install --frozen-lockfile --ignore-scripts` in packages/command/domain/ (30 tests); jest via `pnpm install --frozen-lockfile --ignore-scripts` in packages/command/interface-adaptor-if/ (2 tests); jest via `pnpm install --frozen-lockfile --ignore-scripts` in packages/command/interface-adaptor-impl/ (16 tests); jest via `pnpm install --frozen-lockfile --ignore-scripts` in packages/command/processor/ (2 tests); jest via `pnpm install --frozen-lockfile --ignore-scripts` in packages/infrastructure/ (1 tests); jest via `pnpm install --frozen-lockfile --ignore-scripts` in packages/query/interface-adaptor/ (18 tests); jest via `pnpm install --frozen-lockfile --ignore-scripts` in packages/rmu/ (108 tests)): measured (0 flaky).
D13 · Secret Scanning
Secret scan ran and found no leaked secrets.
D15 · Churn × Complexity Hotspots
No churn × complexity hotspots in the window.
D17 · Explicit Debt
0 deducted task-comment markers across 7841 LoC (0.0/KLoC) → score 10.0. Task comments only: this repository's language is read without a compiler, so D17's suppression, dead-code and commented-out-code arms did not run and this score counts fewer marker kinds than a .NET repository's would.
D19 · Documentation Quality
2 of 2 documentation facets pass in full. 16 document(s) read across 9 unit(s).
D23 · Boundary Type-Coupling
No domain types leak across context boundaries (7 contexts). Contexts: bootstrap, domain, infrastructure, interface-adaptor, interface-adaptor-impl, processor, rmu.
D24 · Comment Value
0 of 83 judged comments only repeat the code they sit on (0.0 %). 5 comment(s) in another language or script were not judged.
D26 · Project Cohesion
0 of 8 build units (npm) flagged as possibly oversized/incoherent.
D27 · Navigability
27 % of calls cross a namespace and 0 % go through an interface, but 80 % of collaborators are co-located — so following a call takes several hops. Baseline: small — navigation cost is tolerated.
D28 · Secrets (history)
gitleaks scanned the full history AND the current working tree and found no secrets.
D29 · Static Analysis (SAST)
15 finding(s): 0 critical, 15 high, 0 medium, 0 low. 9 unpinned-GitHub-Actions row(s) are reported here but scored by D36 (supply-chain provenance), which measures that posture as `pinned_actions` — one pinning decision is charged once, not once per lens. semgrep hit a parse error in 13 file(s) — `packages/command/domain/src/group-chat/group-chat-errors.ts` (line 1), `packages/command/domain/src/group-chat/group-chat-events.ts` (line 35, line 36, line 37, …), `packages/command/domain/src/group-chat/group-chat-id.ts` (line 7), `packages/command/domain/src/group-chat/group-chat-name.ts` (line 3), `packages/command/domain/src/group-chat/group-chat.ts` (line 32), … (+8 more) — so no absence of findings in the named regions is evidence of anything; rows reported elsewhere in those files are real. Fix the syntax error (or exclude the file deliberately) and re-scan to cover them.
What to do
- Resolve the 2 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED, REDACTED. — One of this dimension's main actionable groups (2 issue-level).
- Resolve the 1 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).
- No action in Static Analysis (SAST) — all 9 REDACTED finding(s) are reported here at file:line but scored by D36 (supply-chain provenance), so none is charged to this dimension. — One of this dimension's main actionable groups (9 issue-level, 0 of them charged here).
D30 · Dependency Vulnerabilities
41 finding(s): 1 critical, 20 high, 15 medium, 5 low.
What to do
- Resolve the 20 High CVE finding(s) in Dependency Vulnerabilities — start with REDACTED (20). — One of this dimension's main actionable groups (20 issue-level).
- Resolve the 15 Medium CVE finding(s) in Dependency Vulnerabilities — start with REDACTED (15). — One of this dimension's main actionable groups (15 warning-level).
- Resolve the 1 Critical CVE finding(s) in Dependency Vulnerabilities — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).
D31 · IaC & Container Security
28 finding(s): 0 critical, 18 high, 8 medium, 2 low.
What to do
- Resolve the 18 High IaC finding(s) in IaC & Container Security — start with REDACTED (6), REDACTED (4), REDACTED (4). — One of this dimension's main actionable groups (18 issue-level).
- Resolve the 8 Medium IaC finding(s) in IaC & Container Security — start with REDACTED (4), REDACTED (3), REDACTED. — One of this dimension's main actionable groups (8 warning-level).
- Resolve the 2 Low IaC finding(s) in IaC & Container Security — start with REDACTED (2). — One of this dimension's main actionable groups (2 recommendation-level).
D34 · Knowledge Freshness
Every significant source file has living knowledge — recently and meaningfully worked. Counted over 33 of the 85 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.
D35 · Change Coupling
No strong hidden change-coupling between production files.
D43 · Malicious Dependencies
No dependency in any ecosystem this repository declares is published as malicious.
Frontend & cross-cutting dimensions
AX10 · Code composition
AX3 · Project dependency cycles
AX4 · Dependency direction
- `cqrs-es-example-js-command-domain` is a Domain project but references `cqrs-es-example-js-infrastructure`, a Infrastructure project. The clean-architecture rule is that dependencies point INWARD — the domain/application core must not depend on outer layers (infrastructure/web). Invert it: define the abstraction in the inner layer and implement it in the outer one. — packages/command/domain/package.json:34
What to do
- Keep dependencies pointing inward: domain/application define interfaces, infrastructure/web implement them (Dependency Inversion).
AX5 · Architecture & structure
C2 · Access Controls
- This repository serves requests — new ApolloServer() (packages/bootstrap/src/read-api-main.ts:45) — and no route guard, auth-gate middleware, global guard or imperative check that refuses a caller (401/403, an Unauthorized/Forbidden error) was found: its endpoints may be unprotected. — packages/bootstrap/src/read-api-main.ts:45
What to do
- Protect endpoints by default-deny: a global authentication guard or middleware with explicit public opt-outs, or a guard on every route, plus named role/permission rules for what an authenticated caller may do.
DM6 · Domain ↔ infrastructure boundary
DM9 · Scattered domain decisions
GD1 · Unfinished & placeholder code
IC1 · Incompleteness & stubs
- `healthCheck` is declared `async` but never awaits anything, so it runs synchronously while pretending to be asynchronous. Drop `async` or do the real async work. — packages/command/interface-adaptor-impl/src/graphql/resolvers.ts:36
What to do
- Remove the dead code that still moves this score: delete dead if(false) branches and either do the real async work or drop the async keyword from fake-async functions.
M1 · Documentation (README)
What to do
- Add a README to the 8 of 8 project(s) that lack one — worth up to 2 pts.
M2 · Architecture documentation
- No Architecture Decision Records found — no conventional ADR directory, no numbered `NNNN-title` documents in any markup this check reads, and nothing ADR-shaped by content. Design rationale recorded elsewhere (a design-notes tree, a mailing list, pull-request discussion) is not visible to this check and is not re-findable per decision, so a future maintainer cannot ask why one choice was made and get an answer.
What to do
- Record your significant design decisions. Write one short document per decision, giving its date, the situation, the decision and its consequences, and keep them together with your other design documents. A docs/adr folder with each file named by number and title is the easiest place to find them.
M3 · Folder & project structure
P1 · CI/CD gates
P10 · Library API & versioning
P2 · Observability
- `packages/bootstrap/src/dynamodb-lambda-rmu-handler.ts` reports through `console.*` at line 59 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — packages/bootstrap/src/dynamodb-lambda-rmu-handler.ts:59
- `packages/bootstrap/src/dynamodb-lambda-rmu-handler.ts` reports through `console.*` at line 78 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — packages/bootstrap/src/dynamodb-lambda-rmu-handler.ts:78
- `packages/bootstrap/src/dynamodb-lambda-rmu-handler.ts` reports through `console.*` at line 85 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — packages/bootstrap/src/dynamodb-lambda-rmu-handler.ts:85
- `packages/bootstrap/src/sqs-dead-letter-handler.ts` reports through `console.*` at line 52 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — packages/bootstrap/src/sqs-dead-letter-handler.ts:52
- `packages/bootstrap/src/sqs-dead-letter-handler.ts` reports through `console.*` at line 58 although other files in its module log through a logger. Console lines carry no level, fields or correlation and never reach the log pipeline. — packages/bootstrap/src/sqs-dead-letter-handler.ts:58
What to do
- Route service-code `console.*` output through the module's structured logger (with named fields), so delivery outcomes and failures reach the log pipeline with a level.
- Consider OpenTelemetry tracing/metrics (@opentelemetry/sdk-node) and a health-check endpoint (@godaddy/terminus or a /health route) for operability.
P3 · Security & performance tooling
- No static application security testing detected. For this repository's stack, add CodeQL's javascript-typescript pack, `semgrep --config=p/typescript`, or eslint-plugin-security as a CI step. What was searched, so you can tell an absence from a miss: the 4785 CI workflow file(s) in this repository, and the scanner and linter configuration checked in beside them. A scan that runs outside CI, one configured in your forge's web UI rather than in a committed file, or a tool whose name is none of those this check carries, is not seen — if that is your case the row is wrong, and saying so is more useful than adding a second scanner. — REDACTED:5
- `package.json` declares packages, and nothing in the repository keeps them current: no Dependabot or Renovate configuration that schedules updates, and no dependency-review gate on pull requests. A pinned dependency stays at the version it was added at until someone notices — including after an advisory is published against it. Add a `.github/dependabot.yml` with one `package-ecosystem` entry per ecosystem the tree uses (or an enabled `REDACTED`), and gate pull requests with `actions/dependency-review-action`. — package.json:39
What to do
- Add a SAST step to CI running what this repository's stack ships: CodeQL's javascript-typescript pack, `semgrep --config=p/typescript`, or eslint-plugin-security — so a security regression fails the build instead of landing.
- Enable Dependabot/Renovate or a dependency-review gate.
- Add gitleaks/trufflehog in CI to block PRs that introduce committed secrets.
P4 · Deployment & Rollback
What to do
- Add an approval/environment gate (required reviewers / protection rules) before production promotion.
P5 · DR & Backup
What to do
- Document RTO/RPO and a tested restore procedure (a backup config alone isn't disaster recovery).
- No persistence guard on critical data stores — use Docker named volumes (or your orchestrator's persistent-volume equivalent) so the data store can't be wiped by a container recreate (or, in cloud, set purge-protection / soft-delete / prevent_destroy).
P8 · Schema migrations
P9 · Domain vs controller coverage
What to do
- Raise domain coverage toward 100% — cover the remaining aggregates / value objects / domain services where the business invariants and costly bugs live.
PF3 · Async & latency hygiene
R1 · Type Safety
R10 · Code Duplication
- 5 duplicated blocks under packages/ have copies in at least two of the sibling directories bootstrap, command, query, rmu — 4 of them are reported below, and 1 is counted here but not reported individually: those copies match on shape but no longer clear R10's bar for an individually reported row — either they kept neither their own names nor their values, or what was copied is too small to stand on its own (it reports near-exact duplication only, and only of substantial extent). What this row states is the concentration, which the detector measured over all 5 and which does not depend on how exactly each block's copies still match. That concentration is one structural fact, not 5 local ones: the siblings replicate behaviour none of them owns, which is the shape of a missing shared module — a common library every sibling imports — rather than 5 separate extractions. Check first whether the siblings are deliberately standalone deliverables (scaffold templates, demo apps that must stay copy-pasteable); where they are, the duplication is the design and the per-block rows are the ones to act on. — packages/bootstrap/src/dynamodb-stream-client.ts:128
- packages/command/domain/src/group-chat/members.ts:5 · packages/command/domain/src/group-chat/messages.ts:4 — the two spans are one implementation copied and then locally edited — 456 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — packages/command/domain/src/group-chat/members.ts:5
- packages/command/domain/src/group-chat/group-chat-id.ts:7 · packages/command/domain/src/user-account/user-account-id.ts:7 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another. — packages/command/domain/src/group-chat/group-chat-id.ts:7
- packages/command/domain/src/group-chat/group-chat-events.ts:163 · packages/command/domain/src/group-chat/group-chat-events.ts:221 · packages/command/domain/src/group-chat/group-chat-events.ts:281 · packages/command/domain/src/group-chat/group-chat-events.ts:343 · +2 more site(s) not listed — all 6 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — packages/command/domain/src/group-chat/group-chat-events.ts:163
- packages/bootstrap/src/dynamodb-stream-client.ts:128 · packages/rmu/src/head-scanner.ts:58 — the 2 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another. — packages/bootstrap/src/dynamodb-stream-client.ts:128
- packages/query/interface-adaptor/src/graphql/resolvers.ts:59 · packages/query/interface-adaptor/src/graphql/resolvers.ts:119 — the two spans are one implementation copied and then locally edited — 189 tokens are still identical, in the same order in both spans, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — packages/query/interface-adaptor/src/graphql/resolvers.ts:59
- packages/command/domain/src/group-chat/group-chat-name.ts:36 · packages/command/domain/src/group-chat/member-id.ts:30 · packages/command/domain/src/group-chat/message-id.ts:39 — the 3 copies are spread across 3 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — packages/command/domain/src/group-chat/group-chat-name.ts:36
- packages/command/domain/src/group-chat/group-chat-events.ts:258 · packages/command/domain/src/group-chat/group-chat-events.ts:318 · packages/command/domain/src/group-chat/group-chat-events.ts:380 · packages/command/domain/src/group-chat/group-chat-events.ts:442 · +1 more site(s) not listed — all 5 copies are in the same file, and the SHAPE of this repetition could not be determined. It is not a run of declarations, a listing, a declaration header, a type body or a slice through a construct — and it was not measured as a run of executable statements either, so this row cannot tell you whether a function can stand where these lines are. Read the two spans before acting, because the move is opposite in the two cases. Where they are statements, the ordinary answer holds: give the shared part one home and call it from each site. Where they turn out to be declarations, a literal's entries, or the cases of an enumeration, there is no call site to call anything from, and collapsing them would delete what each copy pins — a shared base type, a generated set, or one exported constant each site refers to is the move instead, and sometimes the honest answer is that there is nothing to extract at all. Reported because the copies drift apart the first time only one of them is edited, which is true whichever of those they are. — packages/command/domain/src/group-chat/group-chat-events.ts:258
- packages/bootstrap/src/dynamodb-lambda-rmu-handler.ts:48 · packages/bootstrap/src/dynamodb-local-rmu-main.ts:63 — the two spans are one implementation copied and then locally edited — 82 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — packages/bootstrap/src/dynamodb-lambda-rmu-handler.ts:48
- packages/bootstrap/src/recover-read-model-main.ts:19 · packages/bootstrap/src/sqs-dead-letter-main.ts:26 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it. — packages/bootstrap/src/recover-read-model-main.ts:19
- packages/command/domain/src/group-chat/group-chat-events.ts:618 · packages/command/domain/src/group-chat/group-chat-events.ts:644 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — packages/command/domain/src/group-chat/group-chat-events.ts:618
- packages/command/domain/src/group-chat/group-chat.ts:189 · packages/command/domain/src/group-chat/group-chat.ts:295 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — packages/command/domain/src/group-chat/group-chat.ts:189
- packages/bootstrap/src/dynamodb-local-rmu-main.ts:43 · packages/bootstrap/src/read-api-main.ts:28 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it. — packages/bootstrap/src/dynamodb-local-rmu-main.ts:43
- packages/query/interface-adaptor/src/graphql/outputs.ts:7 · packages/query/interface-adaptor/src/graphql/outputs.ts:28 — all 2 copies are in the same file, and the CITED SPAN is a run of DECLARATIONS inside a construct — the members of a type, or the entries of an object or array literal — with no statement anywhere in it. Do not read this as an extract-a-helper row: nothing here executes, so there is no call site, and a call expression cannot stand where a member declaration or a literal's entry was. What repeats is a SHAPE, and which shape decides the move. Where the copies declare the same members, the repetition is a missing common ancestor: give it a base type, an interface both extend, a generic instantiated twice, or — where the copies are a literal's entries rather than a type's members — one shared constant each site spreads or refers to, so the set is written once. Where they declare DIFFERENT members and only the form is shared — a decorator and its options, an annotation, a registration table's keys — the form is prescribed by a framework or a schema rather than copied, and the only collapse available is to generate the declarations from that schema; where you do not own the generator, this is the cost of the framework and there is nothing to extract. Check which of the two it is before acting: these copies still drift apart the first time only one of them is edited, which is why the repetition is reported, but the sentence to act on is not the same in both cases. — packages/query/interface-adaptor/src/graphql/outputs.ts:7
- packages/bootstrap/src/dynamodb-lambda-rmu-handler.ts:26 · packages/bootstrap/src/sqs-dead-letter-handler.ts:9 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — packages/bootstrap/src/dynamodb-lambda-rmu-handler.ts:26
- packages/command/domain/src/group-chat/group-chat.ts:209 · packages/command/domain/src/group-chat/group-chat.ts:246 · packages/command/domain/src/group-chat/group-chat.ts:284 · packages/command/domain/src/group-chat/group-chat.ts:314 — all 4 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — packages/command/domain/src/group-chat/group-chat.ts:209
- packages/command/interface-adaptor-impl/src/graphql/resolvers.ts:73 · packages/command/interface-adaptor-impl/src/graphql/resolvers.ts:111 · packages/command/interface-adaptor-impl/src/graphql/resolvers.ts:160 — all 3 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — packages/command/interface-adaptor-impl/src/graphql/resolvers.ts:73
- packages/rmu/src/head-scanner.ts:29 · packages/rmu/src/journal-reader.ts:74 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — packages/rmu/src/head-scanner.ts:29
- packages/command/interface-adaptor-impl/src/graphql/resolvers.ts:43 · packages/command/interface-adaptor-impl/src/graphql/resolvers.ts:56 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — packages/command/interface-adaptor-impl/src/graphql/resolvers.ts:43
- packages/rmu/src/group-chat-dao.ts:102 · packages/rmu/src/group-chat-dao.ts:251 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. — packages/rmu/src/group-chat-dao.ts:102
- packages/command/domain/src/group-chat/group-chat.ts:230 · packages/command/domain/src/group-chat/group-chat.ts:268 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. — packages/command/domain/src/group-chat/group-chat.ts:230
- packages/rmu/src/dynamodb-adapter.ts:201 · packages/rmu/src/dynamodb-adapter.ts:213 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. — packages/rmu/src/dynamodb-adapter.ts:201
- packages/bootstrap/src/dynamodb-stream-client.ts:153 · packages/rmu/src/head-scanner.ts:83 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — packages/bootstrap/src/dynamodb-stream-client.ts:153
- packages/bootstrap/src/spanner-change-stream-bridge-main.ts:166 · packages/rmu/src/spanner-pubsub-adapter.ts:95 — the two spans are one implementation copied and then locally edited — 54 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — packages/bootstrap/src/spanner-change-stream-bridge-main.ts:166
- packages/command/interface-adaptor-impl/src/repository/group-chat/group-chat-repository.ts:52 · packages/command/interface-adaptor-impl/src/repository/group-chat/group-chat-repository.ts:63 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — packages/command/interface-adaptor-impl/src/repository/group-chat/group-chat-repository.ts:52
- packages/command/interface-adaptor-impl/src/repository/group-chat/group-chat-serializers.ts:43 · packages/rmu/src/journal-reader.ts:139 · packages/rmu/src/spanner-pubsub-adapter.ts:84 — the 3 copies are spread across 2 directories, so the shared home is a decision rather than an obvious spot: check first whether one of them already owns this behaviour, and otherwise put the extracted module somewhere all of the sites already reach rather than making one of them depend on another. There is one copy in each of 3 separate files rather than several in one place, so check first whether these are sibling modules that each declare their own version of one shape — one per entity, per provider, per language. Where they are, no single extracted module collapses them: each module still has to be written, and what recurs is the TEMPLATE. The moves that do collapse a template are to generate these modules from the set they enumerate, or to replace the repeated construction with one factory each site calls with its own values — and where the set is the point, each module pinning one distinct thing, the repetition IS the enumeration and there is nothing to delete. — packages/command/interface-adaptor-impl/src/repository/group-chat/group-chat-serializers.ts:43
- packages/rmu/src/dynamodb-adapter.ts:179 · packages/rmu/src/spanner-pubsub-adapter.ts:81 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — packages/rmu/src/dynamodb-adapter.ts:179
- packages/rmu/src/journal-reader.ts:139 · packages/rmu/src/spanner-pubsub-adapter.ts:84 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it. — packages/rmu/src/journal-reader.ts:139
- packages/query/interface-adaptor/src/graphql/resolvers.ts:15 · packages/query/interface-adaptor/src/graphql/resolvers.ts:66 · packages/query/interface-adaptor/src/graphql/resolvers.ts:126 — all 3 copies are in the same file, and the SHAPE of this repetition could not be determined. It is not a run of declarations, a listing, a declaration header, a type body or a slice through a construct — and it was not measured as a run of executable statements either, so this row cannot tell you whether a function can stand where these lines are. Read the two spans before acting, because the move is opposite in the two cases. Where they are statements, the ordinary answer holds: give the shared part one home and call it from each site. Where they turn out to be declarations, a literal's entries, or the cases of an enumeration, there is no call site to call anything from, and collapsing them would delete what each copy pins — a shared base type, a generated set, or one exported constant each site refers to is the move instead, and sometimes the honest answer is that there is nothing to extract at all. Reported because the copies drift apart the first time only one of them is edited, which is true whichever of those they are. — packages/query/interface-adaptor/src/graphql/resolvers.ts:15
- packages/command/domain/src/group-chat/group-chat.ts:141 · packages/command/domain/src/group-chat/group-chat.ts:177 · packages/command/domain/src/group-chat/group-chat.ts:201 · packages/command/domain/src/group-chat/group-chat.ts:238 · +1 more site(s) not listed — all 5 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — packages/command/domain/src/group-chat/group-chat.ts:141
- packages/bootstrap/src/spanner-change-stream-bridge-main.ts:33 · packages/bootstrap/src/spanner-setup-main.ts:15 — the 2 copies are spread across 2 files, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — packages/bootstrap/src/spanner-change-stream-bridge-main.ts:33
- packages/rmu/src/group-chat-dao.ts:286 · packages/rmu/src/group-chat-dao.ts:311 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — packages/rmu/src/group-chat-dao.ts:286
- packages/bootstrap/src/spanner-change-stream-bridge-main.ts:45 · packages/bootstrap/src/write-api-main.ts:113 — the 2 copies sit in sibling files in one directory, so check first whether one of them (or an existing module there) already owns this behaviour and the others should call it; otherwise extract it into one module in that directory and have each site call it. — packages/bootstrap/src/spanner-change-stream-bridge-main.ts:45
What to do
- Act on each finding's own remediation rather than one rule: the move depends on what recurs. Where the copies are executable blocks, give the shared part one home and call it from each site; where they are declarations, a listing, a specialisation already delegating to its base, or one shape repeated per entity, there is no call site and the move is a shared type, a generated set or a factory — sometimes there is nothing to extract.
R11 · Import Boundaries
- packages/bootstrap/src/spanner-change-stream-reader.ts:7 imports @google-cloud/spanner/build/src/partial-result-stream, reaching past a declared dependency's public entry into its build output — that path is the package's toolchain layout, not its API, and a minor version bump can relocate it with no semver signal. Import from the package's documented entry point instead. — packages/bootstrap/src/spanner-change-stream-reader.ts:7
- packages/command/domain/src/group-chat/group-chat-events.ts:1 imports packages/infrastructure/src/index.ts, a module of a workspace package of an OUTER layer, from a package of an inner one — dependencies must point inward (domain ← application ← infrastructure/adapters/web). Define the abstraction in the inner package and implement it in the outer one. — packages/command/domain/src/group-chat/group-chat-events.ts:1
- packages/command/domain/src/group-chat/group-chat-id.ts:1 imports packages/infrastructure/src/index.ts, a module of a workspace package of an OUTER layer, from a package of an inner one — dependencies must point inward (domain ← application ← infrastructure/adapters/web). Define the abstraction in the inner package and implement it in the outer one. — packages/command/domain/src/group-chat/group-chat-id.ts:1
- packages/command/domain/src/group-chat/member-id.ts:1 imports packages/infrastructure/src/index.ts, a module of a workspace package of an OUTER layer, from a package of an inner one — dependencies must point inward (domain ← application ← infrastructure/adapters/web). Define the abstraction in the inner package and implement it in the outer one. — packages/command/domain/src/group-chat/member-id.ts:1
- packages/command/domain/src/group-chat/message-id.ts:1 imports packages/infrastructure/src/index.ts, a module of a workspace package of an OUTER layer, from a package of an inner one — dependencies must point inward (domain ← application ← infrastructure/adapters/web). Define the abstraction in the inner package and implement it in the outer one. — packages/command/domain/src/group-chat/message-id.ts:1
- packages/command/domain/src/user-account/user-account-id.ts:1 imports packages/infrastructure/src/index.ts, a module of a workspace package of an OUTER layer, from a package of an inner one — dependencies must point inward (domain ← application ← infrastructure/adapters/web). Define the abstraction in the inner package and implement it in the outer one. — packages/command/domain/src/user-account/user-account-id.ts:1
What to do
- Fix the listed violations: respect the layer/slice order — import only through a slice's public index and never upward into a higher layer (5 rows); import through the target package's declared public entry rather than a deep path into its internals or a relative path into its directory (1 row).
R2 · Cyclomatic Complexity
- processStream has cyclomatic complexity 23 and cognitive complexity 57; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — packages/rmu/src/stream-recovery.ts:120
- readAllDataChangeRecords has cyclomatic complexity 15 and cognitive complexity 28; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — packages/command/interface-adaptor-impl/src/test/spanner-change-stream-lowlevel.verify.test.ts:176
- readWindow has cyclomatic complexity 14 and cognitive complexity 31; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — packages/bootstrap/src/spanner-change-stream-reader.ts:83
- retryWithBackoff has cyclomatic complexity 11 and cognitive complexity 14; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — packages/rmu/src/retry.ts:77
- isTransientError has cyclomatic complexity 11 and cognitive complexity 13; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — packages/rmu/src/failures.ts:111
- convertValue has cyclomatic complexity 11 and cognitive complexity 10; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. (×2) — packages/bootstrap/src/dynamodb-stream-client.ts:128, packages/rmu/src/head-scanner.ts:58
- parseMessage has cyclomatic complexity 11 and cognitive complexity 9; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — packages/rmu/src/dead-letter-consumer.ts:83
What to do
- Break down the listed branch-heavy functions; aim P95 cyclomatic ≤ 5.
R3 · Large Files
- packages/command/domain/src/group-chat/group-chat-events.ts has 638 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — packages/command/domain/src/group-chat/group-chat-events.ts:1
- packages/command/domain/src/group-chat/group-chat.ts has 490 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — packages/command/domain/src/group-chat/group-chat.ts:1
- packages/rmu/src/update-read-model.ts has 485 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — packages/rmu/src/update-read-model.ts:1
- packages/rmu/src/group-chat-dao.ts has 426 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — packages/rmu/src/group-chat-dao.ts:1
What to do
- Split each oversized file along the responsibilities already in it, into smaller focused modules in the same package.
R4 · Test Coverage
- No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one. (×15) — packages/bootstrap/src/dynamodb-local-rmu-main.ts:1, packages/bootstrap/src/spanner-setup-main.ts:1, packages/bootstrap/src/write-api-main.ts:1, …
What to do
- Add tests that import the unreached modules (directly or through their public entry).
R6 · Tooling
R7 · Dead Code
- Unreachable from the 17 application, 10 tooling and 29 test entry point(s) detected in this repo. Gate removals on `pnpm run build` — an undetected custom entry would make these reachable.
- no import path from any entry point (17 application, 10 tooling, 29 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make — packages/bootstrap/src/spanner-rmu-handler.ts
What to do
- Delete the dead files and unused exports — every line is maintenance cost and rebuild-estimate inflation with zero runtime value.
R8 · Dependency Hygiene
- Imported but not declared in any reachable package.json — installs work only by hoisting accident. (×2) — packages/command/interface-adaptor-impl/src/graphql/resolvers.test.ts:1, packages/query/interface-adaptor/src/index.test.ts:1
- Declared in packages/bootstrap/package.json but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it. (×2)
- Declared in packages/command/domain/package.json but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it.
- Every import is type-only — move it to devDependencies. — packages/bootstrap/src/dynamodb-lambda-rmu-handler.ts:2
What to do
- Remove unused dependencies, declare unlisted imports explicitly, and demote type-/test-only packages to devDependencies.
R9 · Circular Imports
- packages/bootstrap/src/dynamodb-local-rmu-main.ts → packages/bootstrap/src/index.ts → packages/bootstrap/src/dynamodb-local-rmu-main.ts (one verified cycle inside a mutually-dependent group of 8 files) — packages/bootstrap/src/dynamodb-local-rmu-main.ts:25
What to do
- Break each cycle by extracting the shared piece into a module both sides can import.
X1 · Async correctness
X12 · Unreachable branch
X13 · Undrained process stream
X14 · Bypassable address classification
X15 · Unvalidated length from an untrusted reader
X16 · Unfloored truncation loop
X17 · Uncapped recursion over a caller-supplied document
X18 · Disposal-pattern correctness
X19 · Unrestored process-global state
X21 · Side-effecting pattern guard
X22 · Contradicted release guard
X23 · Unguarded diagnostic materialisation
X24 · Document value interpolated into markup unescaped
X25 · Inert configuration knob
X28 · Index access outside its own emptiness guard
X29 · Per-element action decided by a fixed element
X3 · Exception handling
- An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it. — packages/rmu/src/update-read-model.ts:335
What to do
- Swallowed exception (empty catch)
X30 · Support guard that admits what it rejects
X4 · Structured logging
- `error` at line 16 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.error({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.error('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way. — packages/query/interface-adaptor/src/graphql/error-handling.ts:16
- `info` at line 37 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.info({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.info('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way. — packages/bootstrap/src/dynamodb-local-rmu-main.ts:37
- `info` at line 38 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.info({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.info('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way. — packages/bootstrap/src/dynamodb-local-rmu-main.ts:38
- `info` at line 39 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.info({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.info('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way. (×3) — packages/bootstrap/src/dynamodb-local-rmu-main.ts:39, packages/bootstrap/src/read-api-main.ts:39, packages/bootstrap/src/recover-read-model-main.ts:39
- `info` at line 40 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.info({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.info('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way. (×2) — packages/bootstrap/src/dynamodb-local-rmu-main.ts:40, packages/bootstrap/src/read-api-main.ts:40
- `info` at line 41 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.info({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.info('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way. (×2) — packages/bootstrap/src/dynamodb-local-rmu-main.ts:41, packages/bootstrap/src/read-api-main.ts:41
- `info` at line 54 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.info({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.info('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way. (×2) — packages/bootstrap/src/dynamodb-local-rmu-main.ts:54, packages/bootstrap/src/spanner-setup-main.ts:54
- `info` at line 55 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.info({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.info('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way. — packages/bootstrap/src/dynamodb-local-rmu-main.ts:55
- `info` at line 56 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.info({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.info('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way. — packages/bootstrap/src/dynamodb-local-rmu-main.ts:56
- `warn` at line 71 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.warn({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.warn('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way. — packages/bootstrap/src/dynamodb-local-rmu-main.ts:71
- `info` at line 111 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.info({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.info('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way. — packages/bootstrap/src/dynamodb-local-rmu-main.ts:111
- `error` at line 125 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.error({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.error('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way. — packages/bootstrap/src/dynamodb-local-rmu-main.ts:125
- `info` at line 168 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.info({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.info('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way. — packages/bootstrap/src/dynamodb-local-rmu-main.ts:168
- `info` at line 179 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.info({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.info('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way. — packages/bootstrap/src/dynamodb-local-rmu-main.ts:179
- `warn` at line 195 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.warn({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.warn('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way. — packages/bootstrap/src/dynamodb-local-rmu-main.ts:195
- `info` at line 26 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.info({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.info('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way. — packages/bootstrap/src/read-api-main.ts:26
- `info` at line 27 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.info({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.info('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way. — packages/bootstrap/src/read-api-main.ts:27
- `info` at line 28 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.info({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.info('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way. — packages/bootstrap/src/read-api-main.ts:28
- `info` at line 50 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.info({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.info('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way. (×2) — packages/bootstrap/src/read-api-main.ts:50, packages/bootstrap/src/spanner-change-stream-bridge-main.ts:50
- `error` at line 43 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.error({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.error('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way. — packages/bootstrap/src/recover-read-model-main.ts:43
- `info` at line 43 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.info({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.info('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way. — packages/bootstrap/src/spanner-change-stream-bridge-main.ts:43
- `info` at line 44 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.info({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.info('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way. — packages/bootstrap/src/spanner-change-stream-bridge-main.ts:44
- `info` at line 45 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.info({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.info('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way. — packages/bootstrap/src/spanner-change-stream-bridge-main.ts:45
- `info` at line 46 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.info({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.info('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way. — packages/bootstrap/src/spanner-change-stream-bridge-main.ts:46
- `info` at line 47 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.info({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.info('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way. — packages/bootstrap/src/spanner-change-stream-bridge-main.ts:47
- `info` at line 48 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.info({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.info('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way. — packages/bootstrap/src/spanner-change-stream-bridge-main.ts:48
- `info` at line 49 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.info({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.info('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way. — packages/bootstrap/src/spanner-change-stream-bridge-main.ts:49
- `info` at line 51 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.info({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.info('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way. — packages/bootstrap/src/spanner-change-stream-bridge-main.ts:51
- `warn` at line 117 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.warn({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.warn('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way. — packages/bootstrap/src/spanner-change-stream-bridge-main.ts:117
- `warn` at line 128 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.warn({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.warn('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way. — packages/bootstrap/src/spanner-change-stream-bridge-main.ts:128
- `info` at line 62 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.info({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.info('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way. — packages/bootstrap/src/spanner-setup-main.ts:62
- `info` at line 73 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.info({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.info('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way. — packages/bootstrap/src/spanner-setup-main.ts:73
- `info` at line 78 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.info({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.info('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way. — packages/bootstrap/src/spanner-setup-main.ts:78
- `info` at line 99 is handed a template literal with `${…}` substitutions as its message, so the logger receives one finished string — the values in it cannot be queried, filtered or aggregated as fields, and every occurrence reads as a different message. Pass the values beside a constant message instead: `logger.info({ orderId, status }, 'order status updated')` for pino and bunyan, `logger.info('order status updated', { orderId, status })` for winston. If these calls go through a NestJS `Logger` routed into pino, nestjs-pino forwards an object first argument as fields in the same way. — packages/bootstrap/src/spanner-setup-main.ts:99
What to do
- Interpolated log message defeats structured logging
X5 · Nullable reference types
- ~5.1 `!` null assertions per 1k TypeScript source lines — 44 assertion(s) across the 8591 source line(s) of the 75 TypeScript file(s) read, which is the only code the operator asserts anything in (a `!` in a `.js` file is not this operator and was not counted, and one in a file whose null checking is off silences nothing). Densest: packages/command/interface-adaptor-impl/src/graphql/inputs.ts (24), packages/query/interface-adaptor/src/graphql/outputs.ts (17), packages/command/interface-adaptor-impl/src/graphql/outputs.ts (3). Each one tells the compiler to trust the author about null, suppressing the very diagnostic `strictNullChecks` exists to produce.
What to do
- The findings name the configuration each number was taken from and, for the assertions, the files that hold them. Turn null checking on where it is off — `"strict": true` in the base tsconfig that the others extend switches `strictNullChecks` on with the rest of the family — and then resolve the assertions rather than adding to them. A `!` on a value the checker could show to be null is a promise the author cannot check from where they are standing, and each one is a `TypeError: Cannot read properties of null` waiting for the path that makes it true; where the value genuinely cannot be null, say something the checker can see instead (narrow it with a test, make the property required, drop the `?`).
Reference — by lens
| Lens | Score | Rating | Impact |
|---|---|---|---|
| Code Health | 65% | Adequate — gated by X4 | Capped at Fair by a Critical contributor — resolve it before relying on this lens. |
| Architecture | 66% | Adequate — gated by R11 | Capped at Fair by a Critical contributor — resolve it before relying on this lens. |
| Maturity | 76% | Exemplary | Solid. |
| Readiness | 38% | Adequate — gated by R8, P3 | Capped at Fair by a Critical contributor — resolve it before relying on this lens. |
| Security | 24% | Weak — gated by D29, D31, C2 | Capped at Fair by a Critical contributor — resolve it before relying on this lens. |
| Domain Modelling | 100% | Exemplary | Strongest area. |
| Performance | 100% | Exemplary | Solid. |
Unscored — 3 check(s) recorded observations but carry no score
- D12 Dependency Hygiene — 28 observation(s) recorded · Dependency currency not established — registry.npmjs.org did not answer
- D36 Supply-chain Provenance & Signing — 1 observation(s) recorded · The CI pipeline builds and tests but publishes no released artifact — no package publish, container push, GitHub release or deployment step. Supply-chain provenance, signing and SBOM attest RELEASED artifacts, so there is nothing to attest here. Add them to the release pipeline when this repo starts shipping artifacts (a published package, a container image, a deployed service or a tagged release). Build integrity and workflow-token hygiene are reported below: they describe what the CI runs and the token it runs with, neither of which is affected by whether the pipeline ships an artifact.
- X10 Duplicated predicate — 9 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
Not evidenced — 1 control(s) we could not find positive evidence for
- P6 Release Hygiene — not evidenced — no changelog, version stamp or semver release tag in the repo
Not included — 62 check(s) not relevant to this codebase
- AC1 Text alternatives — No web markup found — accessibility is not applicable to this repository.
- AC2 Forms & labels — No web markup found — accessibility is not applicable to this repository.
- AC3 Page structure — No web markup found — accessibility is not applicable to this repository.
- AC4 Keyboard semantics — No web markup found — accessibility is not applicable to this repository.
- AC5 ARIA correctness — No web markup found — accessibility is not applicable to this repository.
- AC6 Visual & motion safety — No web markup found — accessibility is not applicable to this repository.
- AC7 A11y enforcement — No web markup found — accessibility is not applicable to this repository.
- AX1 Captive dependencies — Not applicable: this repository's JavaScript imports no dependency-injection container and defines no container of its own — nothing that both registers and resolves bindings, and nothing that names two lifetimes — so nothing holds one lifetime's instance while handing out another's; this repository's TypeScript imports no dependency-injection container and defines no container of its own — nothing that both registers and resolves bindings, and nothing that names two lifetimes — so nothing holds one lifetime's instance while handing out another's.
- AX2 Stateful singletons — Not applicable: TypeScript/JavaScript runs each process's requests on one event loop, so no two requests write a shared object at the same instant (interleaving across an await is a different defect).
- AX6 Interface segregation — no exported interface declares behaviour
- AX7 Slice cohesion — not applicable — not a vertical-slice architecture
- AX8 Test isolation — no test/production split to check
- AX9 CQS / query purity — no CQRS query handlers detected — query purity is not applicable to this codebase
- AXB2 Runtime readiness — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
- AXR1 Runtime accessibility — docker build failed (exit 1) — 4.209 Exit status 1 4.216 ELIFECYCLE Command failed with exit code 1. ------ REDACTED:22 -------------------- 20 | RUN pnpm install -g turbo 21 | RUN pnpm install --frozen-lockfile 22 | >>> RUN pnpm prisma:generate 23 | RUN pnpm build 24 | -------------------- ERROR: failed to solve: process "/bin/sh -c pnpm prisma:generate" did not complete successfully: exit code: 1; runtime evidence skipped This is a statement about this run, not a statement about your application: nothing here says the surface is inaccessible, only that it was never rendered.
- C1 Data Protection — No personal data detected in a persisted data model — no PII-named field (email, firstName, dateOfBirth, phoneNumber, …) or stored credential on a TypeORM/MikroORM/sequelize-typescript/NestJS-Mongoose entity, a Mongoose schema, a Sequelize or Drizzle table, a Knex migration or a Prisma model — and no database or data-store client in the source either, so this repository keeps no data at rest for these controls to protect. If it does persist personal data (through a hosted backend configured outside this repository, for instance), the controls belong to wherever that data is stored.
- C3 Audit Trail — No personal data detected in a persisted data model — no PII-named field (email, firstName, dateOfBirth, phoneNumber, …) or stored credential on a TypeORM/MikroORM/sequelize-typescript/NestJS-Mongoose entity, a Mongoose schema, a Sequelize or Drizzle table, a Knex migration or a Prisma model — and no database or data-store client in the source either, so this repository keeps no sensitive data whose changes an audit trail would record. If it does (through a hosted backend configured outside this repository, for instance), the trail belongs to wherever that data is stored.
- C4 Data Retention — No personal data detected in a persisted data model — no PII-named field (email, firstName, dateOfBirth, phoneNumber, …) or stored credential on a TypeORM/MikroORM/sequelize-typescript/NestJS-Mongoose entity, a Mongoose schema, a Sequelize or Drizzle table, a Knex migration or a Prisma model — and no database or data-store client in the source either, so this repository keeps no personal data whose lifetime a retention limit would bound. If it does (through a hosted backend configured outside this repository, for instance), the limit belongs wherever that data is stored.
- C5 Data-Subject Rights — No personal data detected in a persisted data model — no PII-named field (email, firstName, dateOfBirth, phoneNumber, …) or stored credential on a TypeORM/MikroORM/sequelize-typescript/NestJS-Mongoose entity, a Mongoose schema, a Sequelize or Drizzle table, a Knex migration or a Prisma model — and no database or data-store client in the source either, so this repository keeps no personal data for a data subject to erase, export or consent over. If it does (through a hosted backend configured outside this repository, for instance), the rights are served wherever that data is stored.
- D14 License Compliance — Not scored — this repository's 459 shipped npm package(s) were resolved from its committed lockfile, but registry.npmjs.org could not be asked for the licence of 17 of them (registry returned 429), and a licence verdict over part of a dependency graph is not a licence verdict. Nothing is asserted about this repository's licensing in either direction.
- D16 Bus Factor — single-maintainer repository — bus factor is not applicable
- D18 Solution Shape — D18 scores the shape of a .NET solution; this repository has no .NET solution or project files, so the dimension does not apply.
- D20 ADR Quality — N/A — this repo declares itself a template / kata / sample / demo; a formal ADR log is deferred to a real application built from it.
- D21 Naming Consistency — N/A — too few peers to establish a naming convention (585 declarations, no unit with a dominant convention).
- D22 Internal API Consistency — API consistency is measured on C# only; the exposed TypeScript surface was not measured.
- D25 ADR Conformance — no ADRs to check
- D32 Data Compliance (PII/GDPR) — 13 file(s) were not parsed by semgrep — the PII/GDPR ruleset never ran over them
- D37 Vulnerability-disclosure Policy — No vulnerability-disclosure policy file found (SECURITY.md/.markdown/.rst/.txt at root or under .github/.forgejo/.gitea/docs, .well-known/security.txt). A coordinated-disclosure policy may live off-repo, so this is not evidenced rather than failed.
- D39 IL Efficiency — D39 measures the IL emitted by a .NET build; this repository has no .NET solution or project files, so the dimension does not apply.
- D4 Code Duplication — This repository's production source (.ts) is not read by D4's token comparison, which compares .NET source: duplication in it is measured by R10 Code Duplication, the frontend lens's card running the same clone algorithm over the JS/TS token stream. Not scored here — read the R10 card for this repository's duplication.
- D40 Network Egress Confinement — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.
- D41 Kernel & Syscall Confinement — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.
- D42 Runtime Threat Enforcement — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.
- D44 Platform End-of-Life — Platform end-of-life not assessed — this repository declares no platform this pass reads
- D7 Architectural Integrity — no checkable ADRs, and no project-reference graph for the cycle pass to read — so this dimension makes no claim about dependency cycles in either direction (where this repository's language has an import-cycle lens, cycles are reported there). Architectural integrity not assessed
- DM1 Aggregate boundaries — no aggregates detected — aggregate-boundary check not applicable
- DM10 One transaction, one aggregate — no repository writes detected — no operation to judge against the one-aggregate rule
- DM11 Constructible invalid state — no entities detected — construction-time invariants not assessable
- DM2 Strongly-typed ids — no id-bearing domain types detected — strongly-typed-id adoption not assessable
- DM3 Integration-event coupling — no integration events detected — coupling check not applicable
- DM4 Rich vs anemic model — no data-bearing entities detected — rich-vs-anemic model not assessable
- DM5 Encapsulated state — no domain entities found — DM5 grades how entities protect their state, and this repository declares none
- DM7 Repository granularity — no repository abstraction detected (e.g. uses a document session)
- ED1 Event-Driven — not scored — this repository shows none of the 3 signals this lens looks for
- ED5 Idempotency — no mutating command handlers or message consumers detected — idempotency check not applicable
- ES1 Event Sourcing — not scored — this repository shows none of the 3 signals this lens looks for
- M4 Documentation accuracy — Not applicable: the 16 current-state document(s) make no claim of a kind M4 checks. 104 claim(s) of kinds M4 does not check were not checked (path 18, command argument 45, environment variable 41); M4 checks only links and versions and artefact counts.
- P12 CI test-gate honesty — Reported, not scored — and nothing was matched here. The coverage check applies to any stack, and the automatic-re-run check to any GitHub-Actions workflow, but the checks for excluded tests, skipped tests and sleep-based synchronisation currently recognise only some ecosystems' test-runner idioms, so on a repository built with another stack the zeros below mean 'not checked', not 'clean'.
- P7 Outbound HTTP resilience — not applicable — no HTTP server, API framework or worker entry point was found in the JavaScript/TypeScript source, so there is no service whose uptime a failing dependency could take down
- PF1 Benchmark discipline — Not applicable: no benchmark suite was found. This check searched for tinybench, mitata, benchmark.js, benny or vitest `bench(...)` calls in files that import them (or `*.bench.*` files), or one of those in a package.json, and for a `*benchmark*` script that this repository's CI runs. Benchmarks are credited as a bonus, so their absence is neither scored nor deducted.
- PF2 Allocation hygiene — Not scored: this check counted allocation-aware idioms (Span, pools, stackalloc) per line, which describes what kind of code a repository is rather than whether it has an allocation problem, so it was withdrawn. Nothing here is a finding about your code.
- R5 Dependency Freshness — uses a pnpm lockfile — dependency freshness not measured here; JS/npm CVEs are scored in D30 (Dependency Vulnerabilities), which answers every ecosystem
- S1 Web-Security Posture — Not assessed: 77 JavaScript/TypeScript file(s) were read for weak hashes and ciphers, key material fixed in the source, disabled TLS certificate validation, obsolete TLS versions, passwords stored or checked as plaintext and session cookies set without HttpOnly, Secure or SameSite, and none was found. That half of the dimension is clean, but it is not scored on its own: a C# repository with the same clean reading is scored on its server controls as well, or is N/A for having no web surface, and neither can be decided here. Of the server controls, two are read where the source shows them: every session or sign-in cookie the code sets is read for HttpOnly, Secure and SameSite at the line that sets it (a raw `Set-Cookie` header, Express, Fastify, Hono, Koa, Next.js, `cookie.serialize`, express-session and cookie-session), and every Node listener for HTTPS enforcement. HSTS, security response headers and input validation are NOT assessed for JavaScript/TypeScript: each is scored as an absence, an absence is only reportable over the production HTTP server, and in this ecosystem the file that opens the port is build output or a framework launcher rather than a file in the source tree. Their absence here is not a finding about this repository.
- SC1 Supply-chain hygiene — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
- X2 Cancellation propagation — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
- X20 Mistyped argument guard — This check asks whether an argument guard reports an EMPTY value as a NULL one, which needs a language that throws a null-specific argument exception — .NET's ArgumentNullException, the JVM's NullPointerException, Dart's ArgumentError.notNull. This repository contains none of those languages: the ones it is written in have a single exception for a bad argument, so there is no pair of exceptions to confuse and nothing here for it to assess. Not a gap in the analyzer and not a finding about your code.
- X26 Unsynchronised callback handoff — Not applicable: this check looks for a collection written by a callback on one thread while the body waiting on it touches it on another, and in this repository's languages no collection is reachable from two threads at once. TypeScript/JavaScript runs every callback on the one thread that owns its objects: a callback runs only when the body waiting on it has yielded, never alongside it, and a worker thread receives a COPY of what it is sent. A SharedArrayBuffer carries raw bytes, never an Array, Map or Set, so no collection is reachable from two threads at once. Not a gap in the analyzer and not a finding about your code.
- X27 Collection changed while being enumerated — Not applicable: this check looks for a loop whose body adds to or removes from the very collection the loop is walking, invalidating the enumerator it holds, and in this repository's languages that cannot happen. JavaScript and TypeScript have no iterator that a change can invalidate: an `Array` is walked by index against its live length, and a `Map` or `Set` by the ECMAScript specification's live entry list, so a body that adds to, removes from or empties what it walks raises nothing — every loop form (`for…of`, `for…in`, `forEach`, `map`, `filter`, `reduce`, `entries()`) on every built-in collection (`Array`, `Map`, `Set`, plain objects, `URLSearchParams`, `Headers`, `FormData`) runs to completion. Such a loop can still skip an element or never end, which is a different defect and not the one this check asks about. Not a gap in the analyzer and not a finding about your code.
- X32 Type resolved by simple name across every loaded assembly — This check is about how a .NET program searches the assemblies loaded into its process for a type, and this repository contains no .NET source, so there is nothing here for it to assess. Not a gap in the analyzer and not a finding about your code.
- X6 Hand-rolled structured-format parsing — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
- X7 Silent fallback defaults — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
- X9 Subsumed condition operand — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
Appendix A — Findings (grouped)
Critical — 58 finding(s)
- REDACTED
- REDACTED
- REDACTED
- REDACTED
- REDACTED
- REDACTED
- REDACTED
- REDACTED
- REDACTED
- REDACTED
- REDACTED
- REDACTED
- REDACTED
- REDACTED
- REDACTED
- REDACTED
- REDACTED
- REDACTED
- REDACTED
- REDACTED
- REDACTED
- REDACTED
- REDACTED
- REDACTED
- REDACTED
- REDACTED
- REDACTED
- REDACTED
- REDACTED
- REDACTED
- REDACTED
- REDACTED
- REDACTED
- REDACTED
- REDACTED
- REDACTED
- REDACTED
- REDACTED
- REDACTED
- REDACTED
- REDACTED
- REDACTED
- REDACTED
- REDACTED
- REDACTED
- REDACTED
- REDACTED
- REDACTED
- REDACTED
- Unlisted import 'reflect-metadata' packages/command/interface-adaptor-impl/src/graphql/resolvers.test.ts:1
- Unlisted import 'reflect-metadata' packages/query/interface-adaptor/src/index.test.ts:1
- Dependency-rule violation: cqrs-es-example-js-command-domain (Domain) → cqrs-es-example-js-infrastructure (Infrastructure) packages/command/domain/package.json:34
- REDACTED
- REDACTED
- REDACTED
- REDACTED
- REDACTED
- Import cycle (2 files) packages/bootstrap/src/dynamodb-local-rmu-main.ts:25
Serious — 114 finding(s)
- REDACTED
- REDACTED
- REDACTED
- REDACTED
- REDACTED
- REDACTED
- REDACTED
- REDACTED
- REDACTED
- REDACTED
- REDACTED
- REDACTED
- REDACTED
- REDACTED
- REDACTED
- No test reaches this file packages/bootstrap/src/dynamodb-local-rmu-main.ts:1
- No test reaches this file packages/bootstrap/src/spanner-setup-main.ts:1
- No test reaches this file packages/bootstrap/src/write-api-main.ts:1
- No test reaches this file packages/bootstrap/src/spanner-change-stream-bridge-main.ts:1
- No test reaches this file packages/bootstrap/src/dynamodb-stream-client.ts:1
- No test reaches this file packages/bootstrap/src/sqs-dead-letter-main.ts:1
- No test reaches this file packages/bootstrap/src/dynamodb-lambda-rmu-handler.ts:1
- No test reaches this file packages/bootstrap/src/spanner-rmu-handler.ts:1
- No test reaches this file packages/bootstrap/src/sqs-dead-letter-handler.ts:1
- No test reaches this file packages/bootstrap/src/recover-read-model-main.ts:1
- No test reaches this file packages/bootstrap/src/index.ts:1
- No test reaches this file packages/bootstrap/src/dead-letter-recovery-runtime.ts:1
- No test reaches this file packages/bootstrap/src/read-api-main.ts:1
- No test reaches this file packages/bootstrap/src/dead-letter-notifier-factory.ts:1
- No test reaches this file packages/bootstrap/src/dynamodb-clients.ts:1
- REDACTED
- REDACTED
- REDACTED
- REDACTED
- REDACTED
- REDACTED
- REDACTED
- REDACTED
- No assertions: test packages/rmu/src/index.test.ts:8
- No assertions: test packages/infrastructure/src/index.test.ts:8
- No assertions: test packages/command/processor/src/group-chat/index.test.ts:8
- No assertions: test packages/command/interface-adaptor-if/src/index.test.ts:8
- No assertions: test packages/bootstrap/src/index.test.ts:8
- Boundary violation [layered:package-upward-import] packages/command/domain/src/group-chat/group-chat-events.ts:1
- Boundary violation [layered:package-upward-import] packages/command/domain/src/group-chat/group-chat-id.ts:1
- Boundary violation [layered:package-upward-import] packages/command/domain/src/group-chat/member-id.ts:1
- Boundary violation [layered:package-upward-import] packages/command/domain/src/group-chat/message-id.ts:1
- Boundary violation [layered:package-upward-import] packages/command/domain/src/user-account/user-account-id.ts:1
- Duplicated block (10 lines × 2 locations) packages/bootstrap/src/dynamodb-stream-client.ts:153
- Duplicated block (10 lines × 2 locations) packages/command/interface-adaptor-impl/src/repository/group-chat/group-chat-repository.ts:52
- Duplicated block (10 lines × 2 locations) packages/rmu/src/dynamodb-adapter.ts:179
- Duplicated block (10 lines × 2 locations) packages/rmu/src/journal-reader.ts:139
- Test project verifies nothing: packages/command/interface-adaptor-if packages/command/interface-adaptor-if/src/index.test.ts:8
- Test project verifies nothing: packages/command/processor packages/command/processor/src/group-chat/index.test.ts:8
- Test project verifies nothing: packages/infrastructure packages/infrastructure/src/index.test.ts:8
- Off the main sequence: cqrs-es-example-js-infrastructure
- Off the main sequence: cqrs-es-example-js-query-interface-adaptor
- Off the main sequence: cqrs-es-example-js-command-domain
- Duplicated block (18 lines × 2 locations) packages/bootstrap/src/recover-read-model-main.ts:19
- Duplicated block (18 lines × 2 locations) packages/command/domain/src/group-chat/group-chat-events.ts:618
- Duplicated block (15 lines × 2 locations) packages/bootstrap/src/dynamodb-local-rmu-main.ts:43
- Duplicated block (15 lines × 2 locations) packages/query/interface-adaptor/src/graphql/outputs.ts:7
- Duplicated block (12 lines × 2 locations) packages/command/interface-adaptor-impl/src/graphql/resolvers.ts:43
- Duplicated block (12 lines × 2 locations) packages/rmu/src/group-chat-dao.ts:102
- Duplicated block (11 lines × 2 locations) packages/command/domain/src/group-chat/group-chat.ts:230
- Duplicated block (11 lines × 2 locations) packages/rmu/src/dynamodb-adapter.ts:201
- Duplicated block (7 lines × 2 locations) packages/bootstrap/src/spanner-change-stream-bridge-main.ts:33
- Duplicated block (7 lines × 2 locations) packages/rmu/src/group-chat-dao.ts:286
- Complex function convertValue (cyclomatic 11, cognitive 10) packages/bootstrap/src/dynamodb-stream-client.ts:128
- Complex function convertValue (cyclomatic 11, cognitive 10) packages/rmu/src/head-scanner.ts:58
- No authorization packages/bootstrap/src/read-api-main.ts:45
- group-chat.make (cyclomatic 22) packages/command/domain/src/group-chat/group-chat.ts:111
- stream-recovery.processStream (cyclomatic 18) packages/rmu/src/stream-recovery.ts:120
- stream-recovery.processStream (cognitive 47) packages/rmu/src/stream-recovery.ts:120
- spanner-change-stream-reader.createChangeStreamReader::readWindow (cognitive 28) packages/bootstrap/src/spanner-change-stream-reader.ts:83
- group-chat.make (cognitive 21) packages/command/domain/src/group-chat/group-chat.ts:111
- FunctionTooLong: group-chat.make packages/command/domain/src/group-chat/group-chat.ts:111
- REDACTED
- Fake-async — async method never awaits packages/command/interface-adaptor-impl/src/graphql/resolvers.ts:36
- Duplication concentrated across 4 sibling directories (5 clone groups) packages/bootstrap/src/dynamodb-stream-client.ts:128
- Duplicated block with local edits (78 matched lines × 2 locations) packages/command/domain/src/group-chat/members.ts:5
- Duplicated block (44 lines × 2 locations) packages/command/domain/src/group-chat/group-chat-id.ts:7
- Duplicated block (41 lines × 6 locations) packages/command/domain/src/group-chat/group-chat-events.ts:163
- Duplicated block (35 lines × 2 locations) packages/bootstrap/src/dynamodb-stream-client.ts:128
- Duplicated block with local edits (32 matched lines × 2 locations) packages/query/interface-adaptor/src/graphql/resolvers.ts:59
- Duplicated block (29 lines × 3 locations) packages/command/domain/src/group-chat/group-chat-name.ts:36
- Duplicated block (19 lines × 5 locations) packages/command/domain/src/group-chat/group-chat-events.ts:258
- Duplicated block with local edits (18 matched lines × 2 locations) packages/bootstrap/src/dynamodb-lambda-rmu-handler.ts:48
- Duplicated block (16 lines × 2 locations) packages/command/domain/src/group-chat/group-chat.ts:189
- Duplicated block (14 lines × 2 locations) packages/bootstrap/src/dynamodb-lambda-rmu-handler.ts:26
- Duplicated block (14 lines × 4 locations) packages/command/domain/src/group-chat/group-chat.ts:209
- Duplicated block (13 lines × 3 locations) packages/command/interface-adaptor-impl/src/graphql/resolvers.ts:73
- Duplicated block (13 lines × 2 locations) packages/rmu/src/head-scanner.ts:29
- Duplicated block with local edits (10 matched lines × 2 locations) packages/bootstrap/src/spanner-change-stream-bridge-main.ts:166
- Duplicated block (10 lines × 3 locations) packages/command/interface-adaptor-impl/src/repository/group-chat/group-chat-serializers.ts:43
- Duplicated block (9 lines × 3 locations) packages/query/interface-adaptor/src/graphql/resolvers.ts:15
- Duplicated block (8 lines × 5 locations) packages/command/domain/src/group-chat/group-chat.ts:141
- Duplicated block (6 lines × 2 locations) packages/bootstrap/src/spanner-change-stream-bridge-main.ts:45
- Boundary violation [package:third-party-deep-import] packages/bootstrap/src/spanner-change-stream-reader.ts:7
- Complex function processStream (cyclomatic 23, cognitive 57) packages/rmu/src/stream-recovery.ts:120
- Complex function readAllDataChangeRecords (cyclomatic 15, cognitive 28) packages/command/interface-adaptor-impl/src/test/spanner-change-stream-lowlevel.verify.test.ts:176
- Complex function readWindow (cyclomatic 14, cognitive 31) packages/bootstrap/src/spanner-change-stream-reader.ts:83
- Complex function retryWithBackoff (cyclomatic 11, cognitive 14) packages/rmu/src/retry.ts:77
- Complex function isTransientError (cyclomatic 11, cognitive 13) packages/rmu/src/failures.ts:111
- Complex function parseMessage (cyclomatic 11, cognitive 9) packages/rmu/src/dead-letter-consumer.ts:83
- packages/command/domain/src/group-chat/group-chat-events.ts: 638 lines of code packages/command/domain/src/group-chat/group-chat-events.ts:1
- packages/command/domain/src/group-chat/group-chat.ts: 490 lines of code packages/command/domain/src/group-chat/group-chat.ts:1
- packages/rmu/src/update-read-model.ts: 485 lines of code packages/rmu/src/update-read-model.ts:1
- packages/rmu/src/group-chat-dao.ts: 426 lines of code packages/rmu/src/group-chat-dao.ts:1
- Dead file (~69 LoC) packages/bootstrap/src/spanner-rmu-handler.ts
- Unused dependency 'aws-sdk'
- Unused dependency 'moment'
- Unused dependency 'testcontainers'
- Swallowed exception (empty catch) packages/rmu/src/update-read-model.ts:335
Minor — 67 finding(s)
- Interpolated log message defeats structured logging packages/query/interface-adaptor/src/graphql/error-handling.ts:16
- Interpolated log message defeats structured logging packages/bootstrap/src/dynamodb-local-rmu-main.ts:37
- Interpolated log message defeats structured logging packages/bootstrap/src/dynamodb-local-rmu-main.ts:38
- Interpolated log message defeats structured logging packages/bootstrap/src/dynamodb-local-rmu-main.ts:39
- Interpolated log message defeats structured logging packages/bootstrap/src/dynamodb-local-rmu-main.ts:40
- Interpolated log message defeats structured logging packages/bootstrap/src/dynamodb-local-rmu-main.ts:41
- Interpolated log message defeats structured logging packages/bootstrap/src/dynamodb-local-rmu-main.ts:54
- Interpolated log message defeats structured logging packages/bootstrap/src/dynamodb-local-rmu-main.ts:55
- Interpolated log message defeats structured logging packages/bootstrap/src/dynamodb-local-rmu-main.ts:56
- Interpolated log message defeats structured logging packages/bootstrap/src/dynamodb-local-rmu-main.ts:71
- Interpolated log message defeats structured logging packages/bootstrap/src/dynamodb-local-rmu-main.ts:111
- Interpolated log message defeats structured logging packages/bootstrap/src/dynamodb-local-rmu-main.ts:125
- Interpolated log message defeats structured logging packages/bootstrap/src/dynamodb-local-rmu-main.ts:168
- Interpolated log message defeats structured logging packages/bootstrap/src/dynamodb-local-rmu-main.ts:179
- Interpolated log message defeats structured logging packages/bootstrap/src/dynamodb-local-rmu-main.ts:195
- Interpolated log message defeats structured logging packages/bootstrap/src/read-api-main.ts:26
- Interpolated log message defeats structured logging packages/bootstrap/src/read-api-main.ts:27
- Interpolated log message defeats structured logging packages/bootstrap/src/read-api-main.ts:28
- Interpolated log message defeats structured logging packages/bootstrap/src/read-api-main.ts:39
- Interpolated log message defeats structured logging packages/bootstrap/src/read-api-main.ts:40
- Interpolated log message defeats structured logging packages/bootstrap/src/read-api-main.ts:41
- Interpolated log message defeats structured logging packages/bootstrap/src/read-api-main.ts:50
- Interpolated log message defeats structured logging packages/bootstrap/src/recover-read-model-main.ts:39
- Interpolated log message defeats structured logging packages/bootstrap/src/recover-read-model-main.ts:43
- Interpolated log message defeats structured logging packages/bootstrap/src/spanner-change-stream-bridge-main.ts:43
- Duplicated predicate packages/rmu/src/dynamodb-adapter.ts:230
- Duplicated predicate packages/rmu/src/failures.ts:123
- Duplicated predicate packages/rmu/src/failures.ts:154
- Duplicated predicate packages/rmu/src/failures.ts:112
- Duplicated predicate packages/command/domain/src/group-chat/group-chat-events.ts:678
- Duplicated predicate packages/command/domain/src/group-chat/group-chat-id.ts:70
- Duplicated predicate packages/command/domain/src/group-chat/members.ts:116
- Duplicated predicate packages/command/domain/src/group-chat/group-chat-errors.ts:56
- Duplicated predicate packages/rmu/src/recovery.ts:105
- REDACTED
- REDACTED
- REDACTED
- REDACTED
- REDACTED
- Console output used as the logging channel packages/bootstrap/src/dynamodb-lambda-rmu-handler.ts:59
- Console output used as the logging channel packages/bootstrap/src/dynamodb-lambda-rmu-handler.ts:78
- Console output used as the logging channel packages/bootstrap/src/dynamodb-lambda-rmu-handler.ts:85
- Console output used as the logging channel packages/bootstrap/src/sqs-dead-letter-handler.ts:52
- Console output used as the logging channel packages/bootstrap/src/sqs-dead-letter-handler.ts:58
- REDACTED
- REDACTED
- REDACTED
- No ADRs
- No SAST REDACTED:5
- No dependency-update automation package.json:39
- Type-only dependency 'aws-lambda' in production deps packages/bootstrap/src/dynamodb-lambda-rmu-handler.ts:2
- Null assertions (`!`) reduce the strict null checking score
Appendix B — Reproduction & audit trail
| Dimension | Tool | Version | Command | Findings | Raw output |
|---|---|---|---|---|---|
| D28 · Secrets (history) | gitleaks | — | gitleaks detect --no-banner --config /opt/gitleaks-rules/canine-gitleaks.toml --report-format json --report-path /tmp/watchdog-gitleaks-a11fabd8c6e44568b4e9c5f22c32ba9a/history.json --exit-code 0 --source . | 0 | artifacts/raw/gitleaks-history.json |
| D28 · Secrets (history) | gitleaks | — | gitleaks detect --no-git --no-banner --config /opt/gitleaks-rules/canine-gitleaks.toml --report-format json --report-path /tmp/watchdog-gitleaks-a11fabd8c6e44568b4e9c5f22c32ba9a/tree.json --exit-code 0 --source . | 0 | artifacts/raw/gitleaks-tree.json |
| D29 · Static Analysis (SAST) | semgrep | — | semgrep --config /opt/semgrep-rules/security-audit.yml --config /opt/semgrep-rules/owasp-top-ten.yml --config /opt/semgrep-rules/canine-sast.yml --json --quiet --timeout 10 --timeout-threshold 3 --metrics off --exclude *.arrow --exclude *.avro --exclude *.csv --exclude *.dat --exclude *.db --exclude *.feather --exclude *.geojson --exclude *.h5 --exclude *.hdf5 --exclude *.jsonl --exclude *.log --exclude *.ndjson --exclude *.npy --exclude *.npz --exclude *.orc --exclude *.parquet --exclude *.pickle --exclude *.pkl --exclude *.psv --exclude *.sqlite --exclude *.sqlite3 --exclude *.tfrecord --exclude *.tsv --exclude *.txt . | 15 | artifacts/raw/semgrep.json |
| D30 · Dependency Vulnerabilities | trivy | — | trivy fs --scanners vuln --format json --quiet --severity CRITICAL,HIGH,MEDIUM,LOW --skip-dirs **/bin/** --skip-dirs **/obj/** . --skip-db-update | 41 | artifacts/raw/trivy-fs.json |
| D31 · IaC & Container Security | trivy | — | trivy config --format json --quiet . | 28 | artifacts/raw/trivy-config.json |
| D32 · Data Compliance (PII/GDPR) | semgrep | — | semgrep: not applicable — No personal data was found crossing a boundary the PII/GDPR ruleset checks — nothing written to a log or console sink, placed in a URL or query string, or persisted to browser storage. That is a clean result for the LEAK surface only: this ruleset detects personal data escaping, it does not inventory the personal data a repository holds, so it is not evidence that this repository has no personal-data surface. The personal-data map (Appendix C) and the C1-C5 compliance cards are what speak to that. semgrep could not parse 13 file(s) — `packages/command/domain/src/group-chat/group-chat-errors.ts`, `packages/command/domain/src/group-chat/group-chat-events.ts`, `packages/command/domain/src/group-chat/group-chat-id.ts`, `packages/command/domain/src/group-chat/group-chat-name.ts`, `packages/command/domain/src/group-chat/group-chat.ts`, … (+8 more) — so the PII/GDPR sweep did not cover the unparsed regions of them; rows reported elsewhere in those files are real. | 0 | — |
| D37 · Vulnerability-disclosure Policy | disclosure | — | disclosure: not applicable — No vulnerability-disclosure policy file found (SECURITY.md/.markdown/.rst/.txt at root or under .github/.forgejo/.gitea/docs, .well-known/security.txt). A coordinated-disclosure policy may live off-repo, so this is not evidenced rather than failed. | 0 | — |
| D40 · Network Egress Confinement | runtime-hardening | — | runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here. | 0 | — |
| D41 · Kernel & Syscall Confinement | runtime-hardening | — | runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here. | 0 | — |
| D42 · Runtime Threat Enforcement | runtime-hardening | — | runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here. | 0 | — |
| D43 · Malicious Dependencies | trivy | — | trivy fs --scanners vuln --format json --quiet --severity CRITICAL,HIGH,MEDIUM,LOW --skip-dirs **/bin/** --skip-dirs **/obj/** . --skip-db-update | 0 | artifacts/raw/trivy-fs.json |