Skip to content

Conversation

@hoangsonww
Copy link
Member

SUMMARY

This PR adds an attention checker question for every 10th question so we can ensure users are paying close attention to their tasks, by dynamically injecting this question on every 10th question (e.g. 10th, 20th, 30th, etc.)

TEST PLAN

  1. Sign up for an account and go to the cases page.
  2. Repeatedly answer the first 9 questions. Confirm that you're now at the 10th question.
  3. Scroll all the way to the bottom on the questions page, and verify that there is an extra attention checker question.
  4. Make sure you can submit the answers for the 10th case normally.

Pre-merge author checklist

  • I've clearly explained:
    • What problem this PR is solving.
    • How this problem was solved.
    • How reviewers can test my changes.
  • I've included tests I've run to ensure my changes work.
  • I've added unit tests for any new code, if applicable.
  • I've documented any added code.

@hoangsonww hoangsonww requested a review from Copilot June 16, 2025 20:31
@hoangsonww hoangsonww self-assigned this Jun 16, 2025
@hoangsonww hoangsonww added documentation Improvements or additions to documentation enhancement New feature or request labels Jun 16, 2025

This comment was marked as outdated.

@hoangsonww hoangsonww requested a review from Copilot June 16, 2025 20:40
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR injects an attention-check question into the answer configuration for every 10th case and cleans up the PR template.

  • Adds a private helper to detect when the next question is a 10th, 20th, etc.
  • Extends the GET /config/answer endpoint to append an attention-check entry dynamically.
  • Removes the Jira checklist item from the project’s PR template.

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
src/configration/controller/answer_config_controller.py Implements attention-check logic and updates the config endpoint
.github/PULL_REQUEST_TEMPLATE.md Removes the Jira issue link from the PR template
Comments suppressed due to low confidence (3)

src/configration/controller/answer_config_controller.py:70

  • This dynamic injection branch is marked # pragma: no cover and lacks dedicated unit tests to verify attention-check insertion; consider adding tests to cover both branches.
if _needs_attention_check(user_email, repo):  # pragma: no cover

.github/PULL_REQUEST_TEMPLATE.md:12

  • There’s an extra hyphen making this line render incorrectly; change -- [ ] to - [ ] for proper markdown.
-- [ ] I've indicated what Jira issue(s) this PR is linked to.

src/configration/controller/answer_config_controller.py:10

  • The import of jwt_validation_required is not used anywhere; consider removing it to clean up unused dependencies.
from src.user.utils.auth_utils import (

@hoangsonww hoangsonww merged commit b334876 into main Jun 16, 2025
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants