koala73/worldmonitor · error

Read-back still contains legacy tutorial probe filters:\n

Error message

Read-back still contains legacy tutorial probe filters:\n  ${leftoverLegacy.join('\n  ')}

What it means

After PUT, runApply checks that none of LEGACY_TUTORIAL_PROBE_FILTERS remain in the read-back filters. If legacy tutorial probe filters are still present, the script throws — the migration to the new Convex probe filter set was incomplete and legacy noise filters would keep hiding events.

Solutions

  1. Update the script to the latest version so LEGACY_TUTORIAL_PROBE_FILTERS removal is included in the PUT payload.
  2. Manually remove the legacy lines from filters:error_messages in the Sentry UI, then re-run the sync.
  3. Verify the PUT uses a full replacement value (not an append) of merged filters.

Example fix

// before
const mergedText = [...existing, ...appended].join('\n');  // legacy lines preserved
// after
const mergedText = [...existing, ...appended].filter(l => !LEGACY_TUTORIAL_PROBE_FILTERS.includes(l)).join('\n');
Defensive patterns

Strategy: validation

Validate before calling

const leftovers = LEGACY_TUTORIAL_PROBE_FILTERS.filter(l => readBackSet.has(l));
if (leftovers.length) { console.error('Manually remove from Sentry UI:', leftovers); process.exit(1); }

Prevention

When it happens

Trigger: The read-back filters:error_messages still contains one or more known legacy tutorial probe filter lines that the merge was supposed to remove, meaning the removal from the PUT payload didn't take effect on the server.

Common situations: Sentry merging rather than replacing option values, stale legacy filters re-added by another automation, or a PUT payload that preserved legacy lines because the script version predates the legacy list.

Understand the failure class

Background: "Invalid state transition" errors: "status must be X, actually Y", "already rejected/charging/uninstalled", "cannot ... while running" — what they mean when a library rejects your call — this error's family across 31 libraries.

Related errors


AI-assisted analysis of koala73/worldmonitor@e586b8b4b8 (2026-09-22). Data as JSON: /api/errors/867bae2bd7be8718. Report an issue: GitHub.

Appendix: source

Thrown at scripts/sync-sentry-convex-probe-filters.mjs:468

    (line) => !readBackSet.has(line),
  );
  if (missingAfter.length > 0 || missingProtected.length > 0) {
    throw new Error(
      'Read-back after PUT did not confirm expected filters.\n'
        + (missingAfter.length
          ? `  missing generated: ${missingAfter.slice(0, 5).join(' | ')}\n`
          : '')
        + (missingProtected.length
          ? `  missing protected: ${missingProtected.join(' | ')}\n`
          : ''),
    );
  }

  const leftoverLegacy = LEGACY_TUTORIAL_PROBE_FILTERS.filter((line) =>
    readBackSet.has(line),
  );
  if (leftoverLegacy.length > 0) {
    throw new Error(
      'Read-back still contains legacy tutorial probe filters:\n  '
        + leftoverLegacy.join('\n  '),
    );
  }

  console.log(
    `apply: PASS — read-back has ${patterns.length} internal pattern(s) and `
      + 'both protected non-probe lines; legacy tutorial patterns removed.',
  );
}

/**
 * Return `absPath` relative to the repo root when possible.
 *
 * @param {string} absPath
 * @returns {string}
 */
function relativeToRepo(absPath) {

View on GitHub (pinned to e586b8b4b8)