mirror of
https://github.com/zadam/trilium.git
synced 2026-09-14 11:06:04 +05:00
Porting the LLM stack to @triliumnext/core moved model_prices.json with it, but update-model-prices kept writing to the old apps/server/src/services/llm/providers/ path. That directory still exists -- it holds the Claude Agent provider -- so the write succeeded, the script printed "Wrote ..." and exited 0, and the committed table went stale with nothing to notice. The weekly workflow failed the same way but worse: its add-paths named the same dead location, and create-pull-request restricted to a path that only ever holds an untracked file sees no change, so it has quietly opened no PR since the port. Nothing was wrong with the generation itself -- a run against current upstream data reproduces the committed table byte for byte -- so this is only the wiring. The script moves beside the file it generates, which makes both of its relative paths correct without editing either, and the npm script and the workflow's paths follow it. Two guards, because the breakage was silent in both directions: - The script asserts its output already exists. It regenerates a committed file, never creates one, so a missing target means the table has moved again; that is now an error rather than a successful write into nowhere. - scripts/ gets typechecked, via a tsconfig.scripts.json referenced from core's solution file. It cannot join tsconfig.lib.json, whose rootDir is src and whose types are deliberately empty. The script's `import type` of base_provider.js would have flagged the port the day it happened, but tsx erases type imports and scripts/ sat outside every project, so the one signal that existed never ran. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| actions | ||
| ISSUE_TEMPLATE | ||
| workflows | ||
| dependabot.yml | ||
| FUNDING.yml | ||