Coach: eigene Uebungen duerfen benannt werden, und was der Validator sonst noch durchliess
Die Custom-Uebungen des Nutzers standen im Library-Slice, den das Modell bekam, wurden vom Validator aber abgelehnt — jeder Vorschlag, der eine nannte, verbrannte die einzige Reparaturrunde. Dazu: __proto__-IDs, Gewichts- und Tempo-Obergrenzen, doppelte Uebungen und doppelte Change-IDs, routineName auf jeder Aenderung, und ein Gewicht fuer eine nie gehobene Uebung wird verworfen statt geraten.
This commit is contained in:
1 parent
ebb8e390fb
commit
a710a432be
3 files changed
+177
-30
No files matched your search
+5
-1
@@ -318,9 +318,13 @@ async function invoke(adapter, cfg, payload, jobDir, env, job, repair) {
|
||||
// Its errors join the parse failures above on the same one repair round: a model that named
|
||||
// an exercise that does not exist is told which one, and usually gets it right the second
|
||||
// time. A model that cannot be told is a failed job, not a retry loop.
|
||||
// The user's own exercises are in the library slice the model was given (flagged `custom`),
|
||||
// so they are a legitimate thing for it to name back — the validator has to agree.
|
||||
const customIds = (payload.library || []).filter(e => e && e.custom).map(e => e.id);
|
||||
const checked = job.kind === 'review'
|
||||
? validateReview(parsed.value, payload.plan)
|
||||
? validateReview(parsed.value, payload.plan, { customIds })
|
||||
: validatePlan(parsed.value, {
|
||||
customIds,
|
||||
workingWeights: payload.history?.workingWeights,
|
||||
daysPerWeek: payload.coachProfile?.daysPerWeek
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user