Commit eb5b810
Collection-mode review fixes: auto entries moderated, withdrawable, oracle-free
pr-review findings:
- Auto-collected submissions were NEVER moderated ('no text content' —
false: the gallery card renders the map's name/description, which the
scorer deliberately covers). auto_finalize now returns flipped ids and
both callers enqueue moderation post-commit; renaming a live-referenced
map re-schedules scoring, since the card text is live.
- Live-referenced (map_is_clone=false) auto entries flip BOTH ways:
regressing below the submitted tier withdraws the entry — the author
never filled a consent form, and /api/submissions has no draft_status
filter, so one-way stranded a map its author pulled back to scratch.
Clone-backed submissions stay one-way. Docstring corrected (it claimed
a filter that only exists on documents/list).
- /api/submissions/flag refuses internal-portal rows: flagging them
spammed the staff queue and leaked an existence oracle for staff-only
galleries.
- 'excluded from ALL public reads' claims scoped honestly to LISTINGS
(any map's metadata was always fetchable by sequential public_id).
- get_document_list uses SUBMITTED_DRAFT_STATUSES instead of restating
it; migration index renamed to the autogenerate convention; stray
empty backend/uv.lock deleted; auto_finalize takes the same row lock
as finalize.
- New tests: auto entries surface publicly (the auto_public/internal
distinction had no positive assertion), map_is_clone stays false,
takedown never demotes the live map, create-with-metadata flips at
creation with moderation scheduled, rename re-scores, withdrawal
round-trip, textarea cap at both bounds, internal flag-oracle.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>1 parent 1cd5ae8 commit eb5b810
6 files changed
Lines changed: 244 additions & 37 deletions
File tree
- backend
- app
- alembic/versions
- submissions
- tests
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
85 | 85 | | |
86 | 86 | | |
87 | 87 | | |
88 | | - | |
| 88 | + | |
89 | 89 | | |
90 | 90 | | |
91 | 91 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
69 | 69 | | |
70 | 70 | | |
71 | 71 | | |
72 | | - | |
73 | 72 | | |
74 | 73 | | |
75 | 74 | | |
| |||
97 | 96 | | |
98 | 97 | | |
99 | 98 | | |
100 | | - | |
| 99 | + | |
101 | 100 | | |
102 | 101 | | |
103 | 102 | | |
| |||
584 | 583 | | |
585 | 584 | | |
586 | 585 | | |
587 | | - | |
588 | | - | |
| 586 | + | |
| 587 | + | |
| 588 | + | |
589 | 589 | | |
590 | | - | |
| 590 | + | |
| 591 | + | |
| 592 | + | |
| 593 | + | |
591 | 594 | | |
592 | 595 | | |
593 | 596 | | |
| |||
1464 | 1467 | | |
1465 | 1468 | | |
1466 | 1469 | | |
1467 | | - | |
| 1470 | + | |
| 1471 | + | |
| 1472 | + | |
| 1473 | + | |
1468 | 1474 | | |
1469 | 1475 | | |
1470 | 1476 | | |
| |||
1476 | 1482 | | |
1477 | 1483 | | |
1478 | 1484 | | |
1479 | | - | |
1480 | | - | |
1481 | | - | |
1482 | | - | |
| 1485 | + | |
1483 | 1486 | | |
1484 | 1487 | | |
1485 | 1488 | | |
| |||
1758 | 1761 | | |
1759 | 1762 | | |
1760 | 1763 | | |
| 1764 | + | |
1761 | 1765 | | |
1762 | 1766 | | |
1763 | 1767 | | |
| |||
1776 | 1780 | | |
1777 | 1781 | | |
1778 | 1782 | | |
1779 | | - | |
1780 | | - | |
| 1783 | + | |
| 1784 | + | |
| 1785 | + | |
1781 | 1786 | | |
1782 | 1787 | | |
| 1788 | + | |
| 1789 | + | |
| 1790 | + | |
| 1791 | + | |
| 1792 | + | |
| 1793 | + | |
| 1794 | + | |
| 1795 | + | |
| 1796 | + | |
| 1797 | + | |
| 1798 | + | |
| 1799 | + | |
| 1800 | + | |
| 1801 | + | |
| 1802 | + | |
| 1803 | + | |
1783 | 1804 | | |
| 1805 | + | |
| 1806 | + | |
| 1807 | + | |
| 1808 | + | |
1784 | 1809 | | |
1785 | 1810 | | |
1786 | 1811 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
99 | 99 | | |
100 | 100 | | |
101 | 101 | | |
102 | | - | |
103 | | - | |
104 | | - | |
| 102 | + | |
| 103 | + | |
105 | 104 | | |
106 | 105 | | |
107 | | - | |
108 | | - | |
109 | | - | |
110 | | - | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
111 | 119 | | |
112 | | - | |
113 | | - | |
114 | | - | |
115 | | - | |
116 | | - | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
117 | 124 | | |
118 | 125 | | |
119 | 126 | | |
120 | 127 | | |
121 | 128 | | |
122 | | - | |
123 | 129 | | |
124 | 130 | | |
125 | 131 | | |
| 132 | + | |
126 | 133 | | |
127 | | - | |
128 | | - | |
129 | | - | |
130 | | - | |
131 | | - | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
132 | 150 | | |
133 | 151 | | |
134 | 152 | | |
| |||
541 | 559 | | |
542 | 560 | | |
543 | 561 | | |
544 | | - | |
545 | | - | |
| 562 | + | |
| 563 | + | |
| 564 | + | |
546 | 565 | | |
547 | 566 | | |
548 | 567 | | |
549 | 568 | | |
550 | 569 | | |
551 | 570 | | |
552 | 571 | | |
| 572 | + | |
| 573 | + | |
| 574 | + | |
| 575 | + | |
| 576 | + | |
553 | 577 | | |
554 | 578 | | |
555 | 579 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
120 | 120 | | |
121 | 121 | | |
122 | 122 | | |
123 | | - | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
124 | 127 | | |
125 | 128 | | |
126 | 129 | | |
| |||
0 commit comments