fix: enforce current physique range in funnel

This commit is contained in:
jjbrunton committed 2026-08-10 18:35:22 +01:00
1 parent d8d635e1ee
commit 1515b3e291
12 files changed
+92 -13

No files matched your search

+13 -1
View File
@@ -372,7 +372,18 @@ Use every applicable tag; tags may overlap. Set safety to "nsfw" when nudity, ex
const startedAt = Date.now();
const genderPrompt = `First, identify the gender of the person in this image. Respond with EXACTLY one of these on the first line: GENDER:male, GENDER:female, GENDER:other, or GENDER:unknown
On the second line, assess only the directly visible physique. Output exactly PHYSIQUE_SCORE:<number> using an integer from 1 to 10, or PHYSIQUE_SCORE:UNKNOWN when the torso and enough of the body are not visible for a grounded assessment. Do not infer physique from a face, a close crop, clothing that obscures body shape, or off-frame anatomy. This is not a medical diagnosis: 1 means a visibly very large-bodied physique, 5 means a broadly average physique, and 10 means an exceptionally lean, toned, model-like physique. Ignore facial attractiveness, photography quality, pose, and setting.
On the second line, assess only the directly visible physique. Output exactly PHYSIQUE_SCORE:<number> using an integer from 1 to 10, or PHYSIQUE_SCORE:UNKNOWN when the torso and enough of the body are not visible for a grounded assessment. Do not infer physique from a face, a close crop, clothing that obscures body shape, or off-frame anatomy. This is not a medical diagnosis. Apply this strict comparative scale:
- 1 = exceptionally large-bodied
- 2 = very large-bodied
- 3 = clearly large-bodied with substantial visible softness
- 4 = somewhat large-bodied or noticeably soft
- 5 = broadly average, with neither notable leanness nor notable size
- 6 = somewhat leaner or more defined than average
- 7 = clearly lean, proportionate, or toned
- 8 = distinctly athletic or model-like
- 9 = exceptional visible conditioning and proportions
- 10 = extraordinarily rare, elite model or competition-level physique
Use the full scale and be highly critical. Scores 8-10 must be rare. Do not use 6 as a safe default: if the evidence does not clearly exceed average, score 5 or below. Judge each image against the anchors, not against other images in the batch. Ignore facial attractiveness, nudity, breast size, photography quality, pose, and setting.
Then provide your analysis:
@@ -400,6 +411,7 @@ ${this.config.openrouter.imageAnalysisPrompt}`;
},
],
max_tokens: 600,
temperature: 0,
});
} catch (error) {
this.recordError('analyzeImage', model, startedAt, error);
+6 -1
View File
@@ -292,7 +292,12 @@ export class CandidateQueueRepository {
...row.prepared,
physiqueTargeting: { ...targeting },
};
result.retained += retain.run(JSON.stringify(refreshed), now, row.postId).changes;
result.retained += 1;
const previous = row.prepared.physiqueTargeting;
const snapshotMatches = previous?.enabled === targeting.enabled
&& previous.minScore === targeting.minScore
&& previous.maxScore === targeting.maxScore;
if (!snapshotMatches) retain.run(JSON.stringify(refreshed), now, row.postId);
}
return result;
})();
+2 -1
View File
@@ -643,8 +643,9 @@ async function runConcurrentAccountRuntimes(app: AppContainer): Promise<void> {
continue;
}
const target = candidateFunnelTarget();
if (target > 0) candidateQueueRepo.promoteDueRetries(target);
candidateQueueRepo.recoverExpiredLeases();
candidateQueueRepo.reconcilePhysiqueTargeting(config.reddit.physiqueTargeting);
if (target > 0) candidateQueueRepo.promoteDueRetries(target);
app.recipientDeduplicator.recoverStaleReservations(Date.now() - 10 * 60_000);
const recipients = await availableRecipients();
const recipient = recipients[0];
+1
View File
@@ -112,6 +112,7 @@ export function createOutreachRouter(ctx: WebContext): Router {
};
const response = {
generatedAt: Date.now(),
physiqueTargeting: { ...ctx.runtimeConfig.reddit.physiqueTargeting },
activeCount: ACTIVE_STATUSES.reduce((total, status) => total + stats.byStatus[status], 0),
stages,
outcomes: { sent: stats.byStatus.sent, rejected: stats.byStatus.rejected },