Skip to content

Fix steward review flow and submission search#744

Merged
JoaquinBN merged 5 commits into
devfrom
JoaquinBN/stop-double-accepts
Jun 8, 2026
Merged

Fix steward review flow and submission search#744
JoaquinBN merged 5 commits into
devfrom
JoaquinBN/stop-double-accepts

Conversation

@JoaquinBN

@JoaquinBN JoaquinBN commented Jun 8, 2026

Copy link
Copy Markdown
Collaborator

Prevents duplicate accept reviews by locking submission rows and rejecting stale final reviews while still allowing more-info follow-up submissions to be reviewed. Cleans up steward search parsing/help, adds URL-safe content search across submitted and converted evidence, and supports reviewed/points sorting. Extends builder project rubric use to direct accept/reject evaluation, auto-selects gate failure reject templates, and seeds those templates. Includes the current lockfile workspace-name update; verified with backend steward/project rubric tests, frontend parser/component tests, and the frontend build.

Summary by CodeRabbit

  • New Features

    • Sort steward submissions by reviewed time and points; search now matches URLs, titles, notes, and evidence with improved parsing and updated UI/help text.
    • Rubric-driven project-review flow: accept/reject payloads supported, gate-failure templates auto-fill and block acceptance when applicable; review notes include rubric summaries.
    • Seeded reject templates for common builder-project gate failures.
  • Bug Fixes

    • Prevents a second steward from accepting an already-accepted submission; original review and contribution preserved.
  • Tests

    • Added tests for steward search, review/rubric flows, gate failures, and steward permissions.

@coderabbitai

coderabbitai Bot commented Jun 8, 2026

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: d255b09c-9896-4487-9187-c416e6af6101

📥 Commits

Reviewing files that changed from the base of the PR and between 375e280 and 557ad83.

📒 Files selected for processing (2)
  • backend/contributions/tests/test_project_milestone_rubric.py
  • backend/contributions/views.py

📝 Walkthrough

Walkthrough

Backend: steward review action now runs atomically with row locking, validates submission states, conditionally persists ProjectMilestoneReview, and broadens steward submission content search/ordering. Frontend: SubmissionCard centralizes project rubric UI, enforces gate-failure automatic rejection/template application, threads rubric_review/template_id to review requests, and search parser/UI gained reviewed/points sorting and token-handling fixes.

Changes

Steward Submission Review Flow Enhancement

Layer / File(s) Summary
Review template data seeding
backend/stewards/migrations/0010_builder_project_gate_templates.py, frontend/src/lib/rubricReview.js
Migration seeds four rejection templates; RUBRIC_GATE_FAILURES entries now include templateLabel to reference those templates.
Submission filtering — normalized URLs and content matching
backend/contributions/views.py
StewardSubmissionFilterSet adds helpers to normalize URL-like search terms and broaden content matching across evidence and converted contribution fields; include/exclude content iterate comma-separated terms.
Review action atomicity and state validation
backend/contributions/views.py
StewardSubmissionViewSet.review wrapped in @transaction.atomic, uses select_for_update with evidence prefetch, enforces object permissions, and returns 400 if submission is not in pending/more_info_needed; integrates ProjectMilestoneReview create/update/delete and appends rubric metadata to SubmissionNote.
Test coverage — acceptance flow and search verification
backend/contributions/tests/*
Tests verify second steward cannot re-accept an already accepted submission, more_info_needed can transition to accepted, and steward-submissions search matches submitted/converted evidence, normalizes URLs with tracking params, and orders by points/reviewed_at.

Builder Project Rubric and Gate-Failure Enforcement

Layer / File(s) Summary
Rubric contract and serializer
backend/contributions/rubric_review.py, backend/contributions/serializers.py
Rubric normalizer gained configurable require_overall_reason and action_field; StewardSubmissionReviewSerializer accepts optional rubric_review and validates/normalizes it per effective contribution type/action.
Rubric state and tone management
frontend/src/components/SubmissionCard.svelte
Derived state for activeRubricAction, proposal/evaluation mode, and rubricTone/proposalNoticeTone drive conditional rubric UI and styling.
Gate-failure enforcement and template application
frontend/src/components/SubmissionCard.svelte
Logic auto-switches proposedAction to reject when gates present, applies/clears matching templates without overwriting manual edits, and prevents accept when gate failures remain.
Rubric UI refactoring and snippet rendering
frontend/src/components/SubmissionCard.svelte
New projectRubric() snippet consolidates rubric rendering; proposal/reject flows and buttons updated to include rubric payload emission (rubric_review).
Test coverage — rubric rendering and gate-failure workflow
frontend/src/tests/SubmissionCard.test.js
Tests verify proposal/accept UI states, reject-proposal rubric UI, direct accept evaluation, rubric payload emission on accept, and gate-rejection template selection behavior.

Search Parser and Discovery Infrastructure

Layer / File(s) Summary
Search parser token handling improvements
frontend/src/lib/searchParser.js, frontend/src/tests/searchParser.test.js
Parser merges dangling known tag tokens with the next token and treats unknown tag-like tokens as free text to preserve URLs; tests added for include:/dangling-tag/sort alias cases.
Sort field mapping and order support
frontend/src/lib/searchToParams.js, backend/contributions/views.py
searchToParams and StewardSubmissionViewSet expanded to support ordering by reviewed_at and converted_contribution__frozen_global_points (points).
Search bar and route UI updates
frontend/src/components/StewardSearchBar.svelte, frontend/src/routes/StewardSubmissions.svelte
Placeholder, autocomplete, and help tooltip updated for sort:-reviewed/points syntax; route wiring includes template_id and rubric_review in review payload when present.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~75 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 47.37% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately and concisely summarizes the main changes: preventing duplicate steward accepts and improving submission search functionality.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch JoaquinBN/stop-double-accepts

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 3

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@backend/contributions/tests/test_steward_permissions.py`:
- Around line 455-570: Move the helper _create_accepted_submission and the three
tests test_accepted_submission_search_matches_submitted_and_converted_evidence,
test_accepted_submission_search_matches_normalized_url, and
test_accepted_submissions_can_order_by_points_and_reviewed_time out of
test_steward_permissions.py into a new test module (e.g.
test_steward_submission_search.py); ensure the new file imports the same
fixtures/helpers (self.client, self.steward_user, self.regular_user,
self.contribution_type, timezone) or refactors them to use module-level
fixtures/setup used by other tests, remove the moved symbols from the original
file, and run/adjust any test setup (authentication calls like
self.client.force_authenticate) so the tests run in isolation under the new
module.

In `@backend/stewards/migrations/0010_builder_project_gate_templates.py`:
- Around line 68-74: The reverse migration remove_templates is too strict
because it filters by both label and text; change it to delete templates by
label only to match the original update_or_create lookup: in remove_templates
use ReviewTemplate.objects.filter(label=template['label']).delete() for each
entry in TEMPLATES so manually-edited texts are still removed; target the
remove_templates function and the ReviewTemplate model referenced in the
migration.

In `@frontend/src/lib/searchParser.js`:
- Around line 155-163: The dangling-tag merge currently appends the next token
whenever a bare tag like "tag:" is found, which can incorrectly swallow a
subsequent real filter (e.g., "sort:-reviewed"); update the condition in the
block that uses danglingTagMatch, KNOWN_TAGS, tokens, token and i so it only
merges when the following token is not itself a tag/filter — i.e., add a check
that tokens[i+1] does not match a tag pattern like /^[a-z-]+:/i (or is not a
known tag with a colon) before doing token = `${token}${tokens[i + 1]}` and i +=
1.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 1e657a47-ba44-493f-a0d6-0ce7d415b0b9

📥 Commits

Reviewing files that changed from the base of the PR and between b04e482 and 4988a60.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (11)
  • backend/contributions/tests/test_steward_permissions.py
  • backend/contributions/views.py
  • backend/stewards/migrations/0010_builder_project_gate_templates.py
  • frontend/src/components/StewardSearchBar.svelte
  • frontend/src/components/SubmissionCard.svelte
  • frontend/src/lib/rubricReview.js
  • frontend/src/lib/searchParser.js
  • frontend/src/lib/searchToParams.js
  • frontend/src/routes/StewardSubmissions.svelte
  • frontend/src/tests/SubmissionCard.test.js
  • frontend/src/tests/searchParser.test.js

Comment thread backend/contributions/tests/test_steward_permissions.py Outdated
Comment thread backend/stewards/migrations/0010_builder_project_gate_templates.py Outdated
Comment thread frontend/src/lib/searchParser.js

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@backend/contributions/tests/test_steward_submission_search.py`:
- Around line 141-167: The test
test_accepted_submissions_can_order_by_points_and_reviewed_time currently uses
two submissions whose points and reviewed_at correlate the same way, so both
ordering checks return the same order; change the fixtures so the submissions
have inverse correlation (e.g., create high_old with points=90 and
reviewed_at=now()-2 days, and low_new with points=20 and reviewed_at=now()-1
day), then update the two assertions to expect ordering-by-points to return
[high_old, low_new] and ordering-by-reviewed_at to return [low_new, high_old],
leaving the existing API calls and response checks intact.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: de6650f6-2f53-44ff-a299-bf915ac68691

📥 Commits

Reviewing files that changed from the base of the PR and between 4988a60 and 6ee4536.

📒 Files selected for processing (5)
  • backend/contributions/tests/test_steward_permissions.py
  • backend/contributions/tests/test_steward_submission_search.py
  • backend/stewards/migrations/0010_builder_project_gate_templates.py
  • frontend/src/lib/searchParser.js
  • frontend/src/tests/searchParser.test.js

Comment on lines +141 to +167
def test_accepted_submissions_can_order_by_points_and_reviewed_time(self):
older_low = self._create_accepted_submission(
points=20,
reviewed_at=timezone.now() - timezone.timedelta(days=2),
title='Older low points',
)
newer_high = self._create_accepted_submission(
points=90,
reviewed_at=timezone.now() - timezone.timedelta(days=1),
title='Newer high points',
)

response = self.client.get('/api/v1/steward-submissions/', {
'state': 'accepted',
'ordering': '-converted_contribution__frozen_global_points',
})
self.assertEqual(response.status_code, status.HTTP_200_OK)
result_ids = [str(item['id']) for item in response.data['results']]
self.assertEqual(result_ids[:2], [str(newer_high.id), str(older_low.id)])

response = self.client.get('/api/v1/steward-submissions/', {
'state': 'accepted',
'ordering': '-reviewed_at',
})
self.assertEqual(response.status_code, status.HTTP_200_OK)
result_ids = [str(item['id']) for item in response.data['results']]
self.assertEqual(result_ids[:2], [str(newer_high.id), str(older_low.id)])

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Consider strengthening the ordering test to verify distinct sort behavior.

Currently, newer_high has both higher points (90) and a more recent review time (now - 1 day), while older_low has both lower points (20) and an older review time (now - 2 days). This means both ordering strategies (-converted_contribution__frozen_global_points and -reviewed_at) produce the same result order: [newer_high, older_low].

To verify that each ordering field actually sorts by its respective criterion, consider creating test data where points and time are inversely correlated:

  • high_old: 90 points, reviewed 2 days ago
  • low_new: 20 points, reviewed 1 day ago

Then:

  • Ordering by points → [high_old, low_new]
  • Ordering by reviewed_at → [low_new, high_old]

The current test does verify that both ordering parameters are accepted by the API without errors, which provides basic coverage.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@backend/contributions/tests/test_steward_submission_search.py` around lines
141 - 167, The test
test_accepted_submissions_can_order_by_points_and_reviewed_time currently uses
two submissions whose points and reviewed_at correlate the same way, so both
ordering checks return the same order; change the fixtures so the submissions
have inverse correlation (e.g., create high_old with points=90 and
reviewed_at=now()-2 days, and low_new with points=20 and reviewed_at=now()-1
day), then update the two assertions to expect ordering-by-points to return
[high_old, low_new] and ordering-by-reviewed_at to return [low_new, high_old],
leaving the existing API calls and response checks intact.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 3

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@backend/contributions/models.py`:
- Around line 728-734: Update backend/CLAUDE.md to document the new
ProjectMilestoneReview rubric-flow by describing that ProjectMilestoneReview is
the canonical structured rubric record for a submitted contribution (superseding
the SubmittedContribution's proposed_* queue summary), explain how it can be
produced by the AI Review Agent or by a steward decision, and outline the flow
from builder rubric -> ProjectMilestoneReview creation -> usage by steward
submissions endpoints (include references to the ProjectMilestoneReview model
name and SubmittedContribution proposed_* fields and mention where consumers
should read the record as the source-of-truth); keep the wording concise and add
one example request/response or sequence bullet showing the transition from
proposal to ProjectMilestoneReview to final steward decision.

In `@backend/contributions/views.py`:
- Around line 1967-1991: When a final review requires a project rubric
(uses_project_rubric) but the payload omits rubric_review, remove any existing
ProjectMilestoneReview to avoid returning stale data: after computing
requires_project_rubric and reading
serializer.validated_data.get('rubric_review'), add logic so that if
requires_project_rubric is True and rubric_review is falsy you call
ProjectMilestoneReview.objects.filter(submitted_contribution=submission).delete();
keep the existing update_or_create path when rubric_review is present, and apply
the same delete-on-absent policy to the analogous block that handles the later
final-review branch.

In `@frontend/src/components/SubmissionCard.svelte`:
- Around line 748-750: Add documentation to frontend/CLAUDE.md describing the
rubric review accept/reject flow: explain that SubmissionCard, when
isProjectReview and reviewAction is 'accept' or 'reject', attaches
data.rubric_review populated by buildRubricReviewPayload(rubricState) to the
submission payload, list the involved symbols (SubmissionCard,
buildRubricReviewPayload, rubricState, rubric_review, isProjectReview,
reviewAction) and document the expected payload shape and side effects for
direct accept/reject decisions so maintainers and integrators know how rubric
reviews are submitted and processed.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 8ceb56a5-1f9e-41b0-8e0e-d75c1bdb06de

📥 Commits

Reviewing files that changed from the base of the PR and between 6ee4536 and 8b290b4.

📒 Files selected for processing (8)
  • backend/contributions/models.py
  • backend/contributions/rubric_review.py
  • backend/contributions/serializers.py
  • backend/contributions/tests/test_project_milestone_rubric.py
  • backend/contributions/views.py
  • frontend/src/components/SubmissionCard.svelte
  • frontend/src/routes/StewardSubmissions.svelte
  • frontend/src/tests/SubmissionCard.test.js

Comment on lines 728 to 734
class ProjectMilestoneReview(BaseModel):
"""
Latest structured Builder Project rubric proposal for a submitted
contribution. The existing SubmittedContribution proposed_* fields remain
the queue summary; this record is the detailed rubric source of truth.
Latest structured Builder Project rubric review for a submitted
contribution. This can come from a proposal or a final steward decision.
The existing SubmittedContribution proposed_* fields remain the queue
summary; this record is the detailed rubric source of truth.
"""

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Verify whether backend/CLAUDE.md changed in this PR and mentions ProjectMilestoneReview/rubric flow context.
git diff --name-only origin/dev...HEAD | sed -n '/^backend\/CLAUDE\.md$/p'
git diff origin/dev...HEAD -- backend/CLAUDE.md | rg -n "ProjectMilestoneReview|rubric|builder_project|steward"

Repository: genlayer-foundation/points

Length of output: 150


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== Remotes =="
git remote -v || true
echo
echo "== Branches =="
git branch -a || true
echo

echo "== Candidate base refs merge-base with HEAD =="
candidates=(origin/dev origin/main origin/master dev main master HEAD~1)
for base in "${candidates[@]}"; do
  if git rev-parse --verify "${base}" >/dev/null 2>&1; then
    if mb=$(git merge-base "${base}" HEAD 2>/dev/null); then
      echo "OK: ${base} merge-base=${mb}"
      # only check diff for backend/CLAUDE.md to keep output small
      names=$(git diff --name-only "${base}"...HEAD -- backend/CLAUDE.md || true)
      if [[ -n "${names}" ]]; then
        echo "CHANGED FILES: ${names}"
        echo
        echo "== Diff hits for rubric-flow terms in backend/CLAUDE.md =="
        git diff "${base}"...HEAD -- backend/CLAUDE.md | rg -n "ProjectMilestoneReview|rubric|builder_project|steward" || true
      else
        echo "backend/CLAUDE.md not changed vs ${base}"
      fi
      echo
    else
      echo "FAIL: ${base} no merge-base"
    fi
  else
    echo "SKIP: ${base} not present"
  fi
done

echo "== Current backend/CLAUDE.md contains terms? =="
rg -n "ProjectMilestoneReview|rubric|builder_project|steward" backend/CLAUDE.md || true

Repository: genlayer-foundation/points

Length of output: 1063


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== Term search in backend/CLAUDE.md =="
rg -n "ProjectMilestoneReview|rubric|milestone|builder_project|milestone review|steward review" backend/CLAUDE.md || true

echo
echo "== Was backend/CLAUDE.md changed in the latest commit (HEAD^..HEAD)? =="
git diff --name-only HEAD^..HEAD -- backend/CLAUDE.md || true

echo
echo "== If multi-commit, changed in last 5 commits? =="
# show changed file names for each commit (relative to its parent)
for c in $(git rev-list --max-count=5 --reverse HEAD); do
  echo "-- $c --"
  git diff --name-only "${c}^..${c}" -- backend/CLAUDE.md | sed 's/^/  /'
done

Repository: genlayer-foundation/points

Length of output: 636


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== git status =="
git status -sb || true
echo

echo "== HEAD info =="
git rev-parse HEAD || true
echo

echo "== Does HEAD^ exist? =="
if git rev-parse HEAD^ >/dev/null 2>&1; then
  echo "HEAD^ exists"
else
  echo "HEAD^ missing (shallow/single commit)"
fi
echo

echo "== Files changed in current HEAD commit (if any) =="
git show --name-only --pretty='' HEAD -- backend/CLAUDE.md || true
echo

echo "== backend/CLAUDE.md: context around line ~60-120 =="
sed -n '50,120p' backend/CLAUDE.md || true
echo

echo "== backend/CLAUDE.md: context around line ~240-310 =="
sed -n '230,310p' backend/CLAUDE.md || true
echo

echo "== Confirm term presence/absence in backend/CLAUDE.md =="
rg -n "ProjectMilestoneReview|builder_project|rubric|milestone review|milestone" backend/CLAUDE.md || true

Repository: genlayer-foundation/points

Length of output: 8295


Ensure backend/CLAUDE.md reflects the ProjectMilestoneReview rubric-flow semantics
backend/CLAUDE.md was updated in this change, but it only documents the AI Review Agent and “Steward Submissions” endpoints; it doesn’t mention ProjectMilestoneReview (or the rubric/builder-to-steward flow clarification). Update backend/CLAUDE.md to explicitly describe how ProjectMilestoneReview fits into the submitted contribution/rubric source-of-truth workflow.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@backend/contributions/models.py` around lines 728 - 734, Update
backend/CLAUDE.md to document the new ProjectMilestoneReview rubric-flow by
describing that ProjectMilestoneReview is the canonical structured rubric record
for a submitted contribution (superseding the SubmittedContribution's proposed_*
queue summary), explain how it can be produced by the AI Review Agent or by a
steward decision, and outline the flow from builder rubric ->
ProjectMilestoneReview creation -> usage by steward submissions endpoints
(include references to the ProjectMilestoneReview model name and
SubmittedContribution proposed_* fields and mention where consumers should read
the record as the source-of-truth); keep the wording concise and add one example
request/response or sequence bullet showing the transition from proposal to
ProjectMilestoneReview to final steward decision.

Source: Coding guidelines

Comment thread backend/contributions/views.py
Comment on lines +748 to +750
if (isProjectReview && (reviewAction === 'accept' || reviewAction === 'reject')) {
data.rubric_review = buildRubricReviewPayload(rubricState);
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Check if frontend/CLAUDE.md mentions rubric review submission
rg -n -C3 'rubric.*review|buildRubricReviewPayload' frontend/CLAUDE.md

Repository: genlayer-foundation/points

Length of output: 52


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== Check existence =="
ls -la frontend/CLAUDE.md || true

echo "== Search for rubric review / accept-reject flow =="
rg -n -C3 'rubric|review.*submission|buildRubricReviewPayload|accept|reject' frontend/CLAUDE.md || true

echo "== Search for SubmissionCard rubric-related mentions in docs =="
rg -n -C3 'SubmissionCard|rubricState|rubric_review' frontend/CLAUDE.md || true

Repository: genlayer-foundation/points

Length of output: 963


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== Case-insensitive search in frontend/CLAUDE.md =="
rg -n -i -C3 'rubric|rubric_review|buildRubricReviewPayload|review.*submission|accept|reject' frontend/CLAUDE.md || true

Repository: genlayer-foundation/points

Length of output: 808


🏁 Script executed:

#!/bin/bash
set -euo pipefail

rg -n -i --heading \
  'rubric|rubric_review|reviewAction|buildRubricReviewPayload|review.*submission|accept.*reject|accept|reject' \
  frontend/CLAUDE.md

Repository: genlayer-foundation/points

Length of output: 289


🏁 Script executed:

#!/bin/bash
set -euo pipefail

rg -n -i --heading \
  '(rubric|rubric[_ ]review|review[_ ]submission|submission[_ ]review|review[_ -]?action|rubric_review|buildrubricreviewpayload|approve|approval|deny|denied|decline|rejection|decision)' \
  frontend/CLAUDE.md || true

rg -n -i --heading \
  '(approve|approval|deny|decline|rejection|decision)' \
  frontend/CLAUDE.md || true

rg -n -i --heading \
  'review' \
  frontend/CLAUDE.md || true

Repository: genlayer-foundation/points

Length of output: 802


🏁 Script executed:

#!/bin/bash
set -euo pipefail

rg -n -i 'submissioncard|rubricstate|rubric[_ -]?review|buildrubricreviewpayload' frontend/CLAUDE.md || true

Repository: genlayer-foundation/points

Length of output: 52


Update frontend/CLAUDE.md for rubric review accept/reject flow

  • frontend/CLAUDE.md has no mentions of rubric, rubric_review, buildRubricReviewPayload, SubmissionCard, or other rubric review submission/decision flow terms—document the direct accept/reject behavior for rubric review submissions.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@frontend/src/components/SubmissionCard.svelte` around lines 748 - 750, Add
documentation to frontend/CLAUDE.md describing the rubric review accept/reject
flow: explain that SubmissionCard, when isProjectReview and reviewAction is
'accept' or 'reject', attaches data.rubric_review populated by
buildRubricReviewPayload(rubricState) to the submission payload, list the
involved symbols (SubmissionCard, buildRubricReviewPayload, rubricState,
rubric_review, isProjectReview, reviewAction) and document the expected payload
shape and side effects for direct accept/reject decisions so maintainers and
integrators know how rubric reviews are submitted and processed.

Source: Coding guidelines

@JoaquinBN JoaquinBN merged commit 78b85fa into dev Jun 8, 2026
1 check was pending
@JoaquinBN JoaquinBN deleted the JoaquinBN/stop-double-accepts branch June 8, 2026 01:53
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.

1 participant