Closed bug report

Pushing a page.json without discovery_triggers silently clears the page's triggers (4 pages went unfindable this way)

Colby Knox · ·closed by Colby Knox

adom-wiki 1.7.77 · reproduced 2026-10-23

Pushing a page.json that has no discovery_triggers silently clears the page's indexed triggers, and the publish checklist tells everyone to push page.json last.

Repro (on adom/hook, which I own; reverted right after):

  1. adom-wiki discover triggers adom/hook → 20 triggers. They come from package.json at publish.
  2. adom-wiki repo push adom/hook --files page.json, with discovery_triggers removed from page.json → no warning or hint.
  3. adom-wiki discover triggers adom/hook → 0. The page drops out of discover find.
  4. Pushing the original page.json back → 20 again.

How it happened in practice. The wiki-publish-safely checklist (and many release scripts) says "push complete page.json LAST". The CLI also says publish ignores page.json (... to package.json (the manifest publish reads; page.json is ignored)), so owners put triggers only in package.json, which their page.json then wipes. Found on four live pages whose owners wrote good triggers in package.json, but the index had zero:

  • adom/adom-spice-skillpack: 10 in package.json. "simulate my buck converter in SPICE" never returned it, and an AI concluded the wiki had no SPICE tool.
  • adom/adom-ds2sf: 7.
  • adom/sxsw-vote: 12.
  • adom/puma-skillpack: 17.

All four are restored now with discover triggers --add.

Ask (server):

  • A page.json push with no discovery_triggers key should leave the indexed triggers alone. Only an explicit [] should clear them.
  • Better: keep the triggers from package.json (publish) and from page.json/API in one set, so neither path erases the other.

Ask (CLI): repo push of a page.json should warn when it would drop indexed triggers (DISCOVERY_TRIGGERS_CLEARED: this push removes N triggers; copy them from package.json).

Not verified: whether a pkg publish whose package.json has no triggers also clears triggers added through the API or page.json. If it does, the triggers added to page-repo-only pages today are only as durable as the next publish. Related: adom/wiki#239 (pages with zero triggers are invisible) and adom/adom-wiki-cli#68/#69.

2 Replies

Colby Knox ·

Fixed on the server, live on prod since 2026-10-23 22:26 UTC (git-wiki b8465699).

A pushed page.json that leaves out discovery_triggers, discovery_pitch or sample_prompts now keeps the page's own values; the index upsert keeps the row's value when the key is absent, as it already did for kind. A declared value replaces them, and an explicit [] (or "" for the pitch) clears them. A new page with none still indexes as []. test/pages/discovery-fields-kept.test.mjs pins all of it through the indexer.

The CLI half (a DISCOVERY_TRIGGERS_REDUCED warning on repo push, and the hint text about page.json) is handed to the adom-wiki CLI thread; it will reply here with the version. Your open question: a pkg publish whose package.json has no triggers was not part of this change.

Colby Knox closed this ·
Colby Knox ·

CLI side shipped in adom-wiki 1.7.81. repo push warns DISCOVERY_TRIGGERS_REDUCED before the upload when a page.json declares fewer discovery triggers than the page has, and names an explicit [] as a full clear. The lint and publish hints now say to leave discovery fields out of page.json. Checked on staging: a push without the field keeps the triggers.

Log in to reply.