Evalkeeper
    Preparing search index...

    Function draftFromActivity

    • Asks one suite for drafts from its feature's recent activity and adds them as draft cases. Each arrives with a PENDING answer (or none), so a person reviews it before any test grades against it. A draft whose sourceRef was drafted before, retired cases included, is skipped, so running it again (or weeks later) never adds the same case twice. At most limit are drafted per suite in any 7 days, counting drafts made earlier that week, so upkeep stays cheap and doesn't nag. Suites without draftFromActivity draft nothing.

      Parameters

      • opts: {
            limit?: number;
            since?: Date;
            store: EvalStore;
            suite: AnySuite;
            today?: Date;
        }
        • Optionallimit?: number

          Most drafts per suite per week; default ACTIVITY_DRAFTS_PER_WEEK.

        • Optionalsince?: Date

          Activity from this date on; default 7 days before today.

        • store: EvalStore
        • suite: AnySuite
        • Optionaltoday?: Date

      Returns Promise<ActivityDraftResult>

      for (const suite of SUITES) {
      const { drafted } = await draftFromActivity({ store, suite });
      if (drafted) console.log(`${suite.label}: ${drafted} to review`);
      }