Skip to content

fix(OPENFRAM-002-6): 3 review findings across 3 files - #1882

Draft
flamingo[bot] wants to merge 3 commits into
mainfrom
ai-fix/openfram-002-6-6e6d4551-59051284
Draft

fix(OPENFRAM-002-6): 3 review findings across 3 files#1882
flamingo[bot] wants to merge 3 commits into
mainfrom
ai-fix/openfram-002-6-6e6d4551-59051284

Conversation

@flamingo

@flamingo flamingo Bot commented Aug 24, 2026

Copy link
Copy Markdown

Closes 3 review findings across 3 files.

Draft — this is a starting point, not a finished change. The fix required judgment, so read it before trusting it.

# Fix confidence Finding Location
1 🔴 55 low — review closely CoreEvent MongoDB document duplicates Event as a legacy/rogue tenant-scoped model with an inconsistent status enum openframe-data-mongo-common/src/main/java/com/openframe/data/document/event/CoreEvent.java:1
2 🟢 90 high OAuthClient document implements TenantScoped but is missing the full Lombok quartet openframe-data-mongo-common/src/main/java/com/openframe/data/document/oauth/OAuthClient.java:1
3 🟢 90 high TenantKey document lacks full Lombok quartet openframe-data-mongo-common/src/main/java/com/openframe/data/document/tenant/TenantKey.java:8

What changed — and what was deliberately left — is explained per finding as inline review comments on the lines each finding touched.


Run: https://product-hub.flamingo.so/admin/code-review
Run id: 59051284-b3d6-4391-892c-38c8737386e1

Merging this PR is recorded as acceptance of the rule that produced it;
closing it unmerged is recorded as rejection. Both feed rule health, so
closing a wrong suggestion is useful rather than merely tidy.

@flamingo

flamingo Bot commented Aug 24, 2026

Copy link
Copy Markdown
Author

🦩 What this fix changed, finding by finding

3 finding(s) fixed in this draft. (Inline placement was rejected by GitHub for this PR.)

🔴 1. CoreEvent MongoDB document duplicates Event as a legacy/rogue tenant-scoped model with an inconsistent status enumopenframe-data-mongo-common/src/main/java/com/openframe/data/document/event/CoreEvent.java:1
In CoreEvent.java, removed the @Document(collection = "events") mapping, the TenantScoped implementation, all fields (id, tenantId, type, payload, timestamp, userId, status) and the nested EventStatus enum, replacing them with an empty @Deprecated class carrying a Javadoc explaining it duplicates Event and must not be used. This removes the conflicting Mongo mapping to the events collection so only Event backs that collection going forward, eliminating the write/read shape drift described in the finding. This is a judgment call: I could not see or modify Event.java or any callers of CoreEvent in this task (single-file scope), so any code still referencing CoreEvent's removed fields/methods elsewhere in the codebase will fail to compile. A complete fix requires a repo-wide search for CoreEvent usages, migrating them to Event, and then deleting this file entirely once no references remain.

🤖 Prompt for AI agents
In openframe-data-mongo-common/src/main/java/com/openframe/data/document/event/CoreEvent.java around line 1, review and complete this code-review fix: CoreEvent MongoDB document duplicates Event as a legacy/rogue tenant-scoped model with an inconsistent status enum.
What the draft fix changed: In `CoreEvent.java`, removed the `@Document(collection = "events")` mapping, the `TenantScoped` implementation, all fields (`id`, `tenantId`, `type`, `payload`, `timestamp`, `userId`, `status`) and the nested `EventStatus` enum, replacing them with an empty `@Deprecated` class carrying a Javadoc explaining it duplicates `Event` and must not be used. This removes the conflicting Mongo mapping to the `events` collection so only `Event` backs that collection going forward, eliminating the write/read shape drift described in the finding. This is a judgment call: I could not see or modify `Event.java` or any callers of `CoreEvent` in this task (single-file scope), so any code still referencing `CoreEvent`'s removed fields/methods elsewhere in the codebase will fail to compile. A complete fix requires a repo-wide search for `CoreEvent` usages, migrating them to `Event`, and then deleting this file entirely once no references remain.
The fix is LOW CONFIDENCE — verify it is correct and finish whatever it left incomplete.

fix confidence: 🔴 55 low — review closely — react 👍/👎 to teach the reviewer

🔴 2. OAuthClient document implements TenantScoped but is missing the full Lombok quartetopenframe-data-mongo-common/src/main/java/com/openframe/data/document/oauth/OAuthClient.java:1
Added @Builder, @NoArgsConstructor, @AllArgsConstructor annotations (with corresponding lombok.Builder, lombok.NoArgsConstructor, lombok.AllArgsConstructor imports) to the OAuthClient class declaration in OAuthClient.java, completing the Lombok quartet alongside the existing @Data annotation, as specified in the suggested fix. Note: fields with default values (roles, enabled) will have those defaults bypassed when using the generated all-args constructor via @Builder, which is standard Lombok behavior but worth reviewer awareness.

🤖 Prompt for AI agents
In openframe-data-mongo-common/src/main/java/com/openframe/data/document/oauth/OAuthClient.java around line 1, review and complete this code-review fix: OAuthClient document implements TenantScoped but is missing the full Lombok quartet.
What the draft fix changed: Added `@Builder`, `@NoArgsConstructor`, `@AllArgsConstructor` annotations (with corresponding `lombok.Builder`, `lombok.NoArgsConstructor`, `lombok.AllArgsConstructor` imports) to the `OAuthClient` class declaration in `OAuthClient.java`, completing the Lombok quartet alongside the existing `@Data` annotation, as specified in the suggested fix. Note: fields with default values (`roles`, `enabled`) will have those defaults bypassed when using the generated all-args constructor via `@Builder`, which is standard Lombok behavior but worth reviewer awareness.
Verify the change is correct and complete; do not refactor unrelated code.

fix confidence: 🟢 90 high — react 👍/👎 to teach the reviewer

🟠 3. TenantKey document lacks full Lombok quartetopenframe-data-mongo-common/src/main/java/com/openframe/data/document/tenant/TenantKey.java:8
Added @builder, @NoArgsConstructor, and @AllArgsConstructor annotations (with corresponding lombok imports) to the TenantKey class declaration in TenantKey.java, completing the Lombok quartet alongside the existing @DaTa annotation, as required by OPENFRAM-002-6/OPENFRAM-003-3.

🤖 Prompt for AI agents
In openframe-data-mongo-common/src/main/java/com/openframe/data/document/tenant/TenantKey.java around line 8, review and complete this code-review fix: TenantKey document lacks full Lombok quartet.
What the draft fix changed: Added @Builder, @NoArgsConstructor, and @AllArgsConstructor annotations (with corresponding lombok imports) to the TenantKey class declaration in TenantKey.java, completing the Lombok quartet alongside the existing @Data annotation, as required by OPENFRAM-002-6/OPENFRAM-003-3.
Verify the change is correct and complete; do not refactor unrelated code.

fix confidence: 🟢 90 high — react 👍/👎 to teach the reviewer

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants