QuizWizz operator defaults

wp-content/quizwizz-defaults.json is the site-operator overlay for QuizWizz defaults. The implementation resolves the absolute path as WP_CONTENT_DIR . '/quizwizz-defaults.json'; a missing file is a no-op (wp/wp-content/plugins/quizwizz/includes/Settings/SettingsSchema.php:139-151). This changes defaults only: it does not grant a bench patch release authority (releaseEligible: false).

Current bench state: commit ed215c5 implements this contract, and the 2026-09-01 final shell/browser gate accepted it. The read-only S10.6 close found wp-content/quizwizz-defaults.json absent, as required after temporary verification; absence means the shipped defaults remain the lower-precedence base, not that this feature is disabled. Evidence: the polish-drive defaults and residue receipt.

Document contract

  • The file is a partial JSON object. Only listed leaves overlay the shipped defaults; omitted leaves keep their lower-precedence value. Unknown keys are ignored, and a candidate whose scalar or list type does not match the allowed position is silently dropped (wp/wp-content/plugins/quizwizz/includes/Settings/SettingsSchema.php:204-240).
  • The allowed positions are every leaf in the shipped defaults plus catalog-materialized matrix.<id>.{st,def} and themes.<id>.{on,def} positions. This explicit tree is built from the matrix and theme catalogs rather than accepting arbitrary recursive keys (wp/wp-content/plugins/quizwizz/includes/Settings/SettingsSchema.php:179-198).
  • Precedence is stored leaf > file leaf > shipped leaf at every depth. The operator document first overlays shipped defaults, then the schema-aware merge recursively applies stored associative-map leaves; scalar and list-shaped stored values replace their complete default node (wp/wp-content/plugins/quizwizz/includes/Settings/SettingsSchema.php:8-111,121-135; wp/wp-content/plugins/quizwizz/includes/Settings/SettingsNormalizer.php:10-51).
  • The defaults file is never copied into the qw_exposure_settings option. Reads derive an effective projection from the stored option plus defaults, while writes persist only the sanitized settings document (wp/wp-content/plugins/quizwizz/includes/Settings/SettingsStore.php:31-45,59-100).
  • The defaults file, its path and its source document are never exported by portability. Portability serializes only the sanitized effective settings projection into the export envelope; it has no file-copy path for quizwizz-defaults.json (wp/wp-content/plugins/quizwizz/includes/Admin/Portability/PortabilityExport.php:17-29,118-141).
  • Invalid JSON, an unreadable file or a top-level value that is not a JSON object falls back to shipped defaults and writes the single QuizWizz operator defaults ignored… diagnostic at most once per request. The loader memoizes the read before parsing, so repeated defaults lookups in that request do not repeat the log line (wp/wp-content/plugins/quizwizz/includes/Settings/SettingsSchema.php:139-175).

Use QuizWizz settings tiers as the operator-facing key reference: it lists the configured setting row keys and their purposes. The defaults schema also admits the catalog positions above even though those materialized leaves are not ordinary tier rows (wp/wp-content/plugins/quizwizz/includes/Settings/SettingsSchema.php:179-198).

WRDP edit path

Treat the JSON as one complete staged file; do not hand-edit the live copy. The bench’s stage-and-install protocol requires staging under /tmp/qwfix/, then installing as www-data:www-data with mode 0644 through sudo -n install (q5vault/audits/qwizz/context.md:47-49). From the WRDP repository root:

mkdir -p /tmp/qwfix/s4
$EDITOR /tmp/qwfix/s4/quizwizz-defaults.json
sudo -n install -o www-data -g www-data -m 0644 \
  /tmp/qwfix/s4/quizwizz-defaults.json \
  wp/wp-content/quizwizz-defaults.json

Removing the file restores the missing-file no-op on the next request; use the same operator-controlled file-install boundary rather than leaving a verification file on the bench (wp/wp-content/plugins/quizwizz/includes/Settings/SettingsSchema.php:139-151).

YAML follow-up

A YAML twin for quizwizz-defaults and settings-tiers is outside this drive and remains tracked in Gitea issue #12. JSON is the implemented operator format today (wp/wp-content/plugins/quizwizz/includes/Settings/SettingsSchema.php:148-170).