Repository navigation
Conversation
WalkthroughExpanded buildBulkVotingPrompt in VotingReputationService: added a console log and broadened scoring guidance and rules for evaluating charter values and member references, duplicating those rules across both the bulk prompt and final response sections. No function signatures or control flow were changed. (≤50 words) Changes
Sequence Diagram(s)(omitted — changes are prompt content updates, not control-flow or new interactions) Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes
Suggested reviewers
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (1 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
platforms/eReputation-api/src/services/VotingReputationService.ts(1 hunks)
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2025-11-20T12:00:02.259Z
Learnt from: coodos
Repo: MetaState-Prototype-Project/prototype PR: 453
File: platforms/eReputation-api/src/controllers/WebhookController.ts:6-7
Timestamp: 2025-11-20T12:00:02.259Z
Learning: In platforms/eReputation-api/src/controllers/WebhookController.ts, the eager instantiation of VotingReputationService in the constructor (which requires OPENAI_API_KEY at startup) is intentional behavior and works as intended.
Applied to files:
platforms/eReputation-api/src/services/VotingReputationService.ts
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: build
…totype-Project/prototype into feat/change-evoting-prompt
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (2)
platforms/eReputation-api/src/services/VotingReputationService.ts (2)
389-389: Consider removing or enhancing this console log.The static log message provides no useful debugging information. Either remove it or enhance it to include contextual details (e.g., number of members, charter length).
Apply this diff to remove the log:
- console.log("Building bulk voting prompt for charter");Or enhance it with useful context:
- console.log("Building bulk voting prompt for charter"); + console.log(`Building bulk voting prompt for ${membersData.length} members`);
465-466: Fix typo in deprecated method for consistency.Line 466 contains the same typo as in the active method: "explcitly" should be "explicitly". While this method is deprecated, fixing the typo maintains consistency.
Apply this diff:
- If the charter has explicit instructions on what they consider for eVoting, DO NOT consider any other group values to make a reference. -- If someone has no references give them a score of 1, unless explcitly stated in the charter that they shall get another score. +- If someone has no references, give them a score of 1, unless explicitly stated in the charter that they shall get another score.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
platforms/eReputation-api/src/services/VotingReputationService.ts(3 hunks)
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2025-11-20T12:00:02.259Z
Learnt from: coodos
Repo: MetaState-Prototype-Project/prototype PR: 453
File: platforms/eReputation-api/src/controllers/WebhookController.ts:6-7
Timestamp: 2025-11-20T12:00:02.259Z
Learning: In platforms/eReputation-api/src/controllers/WebhookController.ts, the eager instantiation of VotingReputationService in the constructor (which requires OPENAI_API_KEY at startup) is intentional behavior and works as intended.
Applied to files:
platforms/eReputation-api/src/services/VotingReputationService.ts
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: build
| - Only consider the values mentioned in the charter for eVoting explicitly do not consider anything else, and only consider the references that are relevant to the values mentioned in the charter for eVoting. | ||
| - Focus on voting-relevant reputation factors mentioned in the charter | ||
| - Provide a ONE SENTENCE justification explaining each score | ||
| - Only consider values and ereferences which match one to one, and do not consider things where you need to make a guess or assumption, if you are not sure always err to caution. | ||
| - If the charter has explicit instructions on what they consider for eVoting, DO NOT consider any other group values to make a reference. | ||
| - If someone has no references give them a score of 1, unless explcitly stated in the charter that they shall get another score. |
There was a problem hiding this comment.
Fix typos and grammar in the prompt instructions.
Several issues in the new prompt rules:
- Line 416: Awkward phrasing "explicitly do not consider anything else"
- Line 419: Typo "ereferences" should be "references"
- Line 419: Incomplete idiom "err to caution" should be "err on the side of caution"
- Line 421: Typo "explcitly" should be "explicitly"
These errors will be passed directly to the AI and may affect instruction clarity.
Apply this diff to fix all issues:
-- Only consider the values mentioned in the charter for eVoting explicitly do not consider anything else, and only consider the references that are relevant to the values mentioned in the charter for eVoting.
+- Only consider the values mentioned in the charter for eVoting and do not consider anything else; only consider references that are relevant to the values mentioned in the charter for eVoting.
- Focus on voting-relevant reputation factors mentioned in the charter
- Provide a ONE SENTENCE justification explaining each score
-- Only consider values and ereferences which match one to one, and do not consider things where you need to make a guess or assumption, if you are not sure always err to caution.
+- Only consider values and references which match one to one, and do not consider things where you need to make a guess or assumption; if you are not sure, always err on the side of caution.
- If the charter has explicit instructions on what they consider for eVoting, DO NOT consider any other group values to make a reference.
-- If someone has no references give them a score of 1, unless explcitly stated in the charter that they shall get another score.
+- If someone has no references, give them a score of 1, unless explicitly stated in the charter that they shall get another score.🤖 Prompt for AI Agents
In platforms/eReputation-api/src/services/VotingReputationService.ts around
lines 416 to 421, fix grammar and typos in the prompt rules: reword the awkward
phrase "explicitly do not consider anything else" to "consider only the values
mentioned in the charter for eVoting and do not consider any other values,"
change "ereferences" to "references," change "err to caution" to "err on the
side of caution," and correct "explcitly" to "explicitly"; keep the meaning that
only voting-relevant charter values and matching references are used, require a
ONE SENTENCE justification per score, and state that a score of 1 applies to
subjects with no references unless the charter explicitly prescribes another
score.
Description of change
Issue Number
Type of change
How the change has been tested
Change checklist
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.