fix(docs): regenerate bank-template-schema.json and guard drift#1065
Merged
nicoloboschi merged 1 commit intovectorize-io:mainfrom Apr 15, 2026
Merged
Conversation
hindsight-docs/static/bank-template-schema.json is hand-edited. Nothing regenerates it and nothing checks it. Three PRs have changed BankTemplateManifest since it was last touched: vectorize-io#902 flipped entity_labels from list[str] to list[dict[str, Any]], vectorize-io#1044 added ten BankTemplateConfig fields, vectorize-io#1048 added three MentalModelTrigger fields. None of the bundled templates use the new fields, so Ajv in check-templates.mjs still passes. A template that uses the dict-shaped label format fails with 'should be string' on every label. Regenerate from BankTemplateManifest.model_json_schema() and hook the generator into verify-generated-files alongside generate-openapi and generate-clients.
3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
hindsight-docs/static/bank-template-schema.json is hand-edited. Nothing regenerates it and nothing checks it. Three PRs have changed
BankTemplateManifestsince it was last touched:BankTemplateConfig.entity_labelsfromlist[str]tolist[dict[str, Any]]BankTemplateConfigfields (retain_default_strategy,retain_strategies,retain_chunk_batch_size,mcp_enabled_tools, fourconsolidation_*fields,max_observations_per_scope,reflect_source_facts_max_tokens,llm_gemini_safety_settings)MentalModelTriggerfields (include_chunks,recall_max_tokens,recall_chunks_max_tokens)None of the bundled templates exercise any of these fields, so
check-templates.mjskept passing. A template that uses the dict-shaped label format fails Ajv withshould be stringon every label.This PR regenerates the schema from
BankTemplateManifest.model_json_schema()and hooks the generator into the existingverify-generated-filesCI job alongsidegenerate-openapiandgenerate-clients, so the same drift guard you already rely on for those catches future schema changes.Test plan
./scripts/generate-bank-template-schema.shruns cleanly and is idempotent on re-run./scripts/hooks/lint.sh— all lints pass (new Python file + ruff + ty)node hindsight-docs/scripts/check-templates.mjs— all 3 bundled templates still validate against the regenerated schemaentity_labels: list[dict](dict-shaped) now validates against the regenerated schema but is rejected by the stale schema on main withshould be string— confirms the drift was reachableverify-generated-filesjob passes the newRun generate-bank-template-schemastep