fix: emit JSON-Schema bounds in generated references; drop a stale ttl note - #19
Merged
dg-coreylweathers merged 3 commits intoSep 20, 2026
Merged
Conversation
…w ttl deepgram-docs #1218 corrected those snippets. The field-name mistake, the observed expires_in values, and the advice to read expires_in rather than trust the field name all stand; the reason given for that advice is now the behavior that causes it, which is that /v1/auth/grant ignores any field it does not recognize and still answers HTTP 200.
The generator emitted type, required, default and description, and discarded every numeric bound in the specs. A schema maximum therefore never reached a reference file, so correcting one upstream was a no-op downstream. Bounds now render in the same parenthesis as the default, and are suppressed when the description already states the same numbers in prose, so params that document their own range do not stutter.
Adds ttl_seconds range 1 to 3600 on /v1/auth/grant and speed range 0.7 to 1.5 on both /v1/speak transports. Records the change under Unreleased.
dg-coreylweathers
deleted the
fix/schema-constraints-and-stale-ttl-note
branch
September 20, 2026 14:59
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.
Two fixes, one of them a prerequisite for a docs change already in review.
1. The generator silently discarded every JSON-Schema bound
scripts/generate-skills.tsemitted type, required, default and description, and nothing else.minimumandmaximumappeared zero times in the script, so every numeric bound in the specs was dropped on the floor.This is not theoretical.
deepgram-docs#1219raises the/v1/auth/grantttl_secondsschemamaximumfrom3600to the real28800(the live API rejects28801withTTL is too long, max is 28800 seconds). Because the generator ignoredmaximum, regenerating after that lands would have been a no-op and the correct ceiling would never have reachedreferences/auth.md. That PR worked around it by also writing the ceiling into the schemadescription. The workaround should not be necessary, so this fixes the cause.Duplication rule. Bounds render in the same parenthesis as the default, and are suppressed when the description already states the same numbers in prose. Two reasons:
(default: `1`) (range: `0.7` to `1.5`). One parenthesis gives(default: `1`, range: `0.7` to `1.5`). A schema with only a default still renders exactly(default: `x`), so the thousands of bullets carrying no bound are untouched.eot_thresholdsays "Valid range: 0.5 - 1.0. Defaults to 0.7." Appending a bound there would stutter. The suppression is per-number, so a schema stating a bound the prose omits still renders it.The rule is visibly working in both directions:
SpeakV2Speedstates "Accepted values run0.5to1.5" in prose and is correctly suppressed, whileSpeakV1Speedstates no range and correctly renders one.What changed in the output:
Once
deepgram-docs#1219lands and the hourly mirror syncs, a regen turns that first line intorange: 1 to 28800on its own.Keywords handled:
minimum,maximum,exclusiveMinimum,exclusiveMaximum,minLength,maxLength,minItems,maxItems,multipleOf. Of these, onlyminimum/maximumcurrently occur in these specs.Nothing from #17 regressed. The Flux STT knobs still render their full prose descriptions with defaults and no redundant bound. JSON Pointer resolution, the
messageNamefix, the self-hosted path routing and the prune pass are all untouched. Regeneration is idempotent across two consecutive runs, and produces 8 reference files, 0 pruned.Pre-existing gap, reported not fixed:
temperature,volume,sequence_idand several other bounded properties render nowhere inreferences/agent.md. Confirmed they are absent onmaintoo, so this is a nested-schema expansion-depth gap that predates this change, not a regression. Worth its own look.2. A stale claim in
skills/browser-agent/SKILL.md"Common mistakes" item 2 said "Some snippets in the browser-agent documentation still show
ttl".deepgram-docs#1218merged and corrected those snippets, so that clause was false.Surgical fix. The mistake itself stays, because it is still easy to make and still silently wrong. Re-verified live today:
{"ttl": 300}expires_in: 30{"ttl_seconds": 300}expires_in: 300{"totally_bogus_field": 999}expires_in: 30{}expires_in: 30The advice to read
expires_inrather than trust the field name you sent also stays, and now gives the actual reason:/v1/auth/grantignores any field it does not recognize and still answers 200. It is generic unknown-field tolerance, not anythingttl-specific.Gates
validate-skills.ts: exit 0, 14 skills, 14 validnpx skills add ./ --list: Found 14 skillstsc --noEmit --strict: 4 errors, identical onmain(no@types/node), so no new errorparam — descriptionas their established formatChangelog entry added under
## [Unreleased]with a compare link.metadata.versiondeliberately untouched, sincedeepgram-skills-v1.6.0is already tagged and released.