Repository navigation
Harden registry indexing: model type fallback and training scripts stale delete - #5456
Conversation
…ale delete Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
✅ Deploy Preview for viam-docs ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Docs review: Ready to mergeThis PR makes two fixes in CI: All required checks passing Docs health: No regressions (no The open question:
|
…list Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
8142af5
into
viamrobotics:main

Two fixes in
.github/workflows/get_modular_resources.py, the script behind theupsert-modular-resourcesjob indocs-publish. Tracked in DOCS-5032, following the framework fix.Changes
model_type_to_strlogs a warning and returns""for an unrecognizedModelType, the same handlingmodel_framework_to_strhas. Before, a new enum value stopped the job partway through ML model indexing and skipped the remaining models, all training scripts, and stale-document cleanup.trainingscriptsdelete built its filter as'last_updated: <' + time_nowwith anint, which raised aTypeErrorthat the surroundingexceptswallowed. It now usesstr(time_now)like theresourcesandmlmodelsdeletes. Registry items that were deleted or made private now drop out of the training scripts index.Effect of the first working delete
I compared the public
trainingscriptsindex with the registry's current list (ListRegistryItems, 6 public training scripts). The index holds 8 documents. The 6 live ones were re-stamped on the latest run. The other 2 arelillians/training24andlillians/training25, last updated 2026-03-05 and absent from the registry. Those 2 are what the first run after merge should delete. The "Training scripts deleted" line in the firstdocs-publishrun after merge should show them.Testing
model_type_to_strreturns the expected labels for 0 to 3 and the fallback for an unknown value.Open question
The script calls
ListRegistryItemsonce, and the response has no next-page token (the request haspage_token). The call returned 847 items in a single response, which doesn't look like a cap, but whether the server ever limits results isn't confirmed. A working delete treats anything missing from that list as deleted, so a capped response would drop real training scripts until the next run.mlmodelsandresourcesalready have this exposure. I'd like the registry or app team to confirm before or shortly after merge.🤖 Generated with Claude Code