Repository navigation
types: adopt exact schema candidates - #86
Merged
Merged
Conversation
Narrow Dynamic schemas to the exact types reported by analyze weak-types --schema-evidence, after reviewing each candidate. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019bPdukx61niAgnGLUK1Ddu
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.
Requested by Jon · project thread
按
analyze weak-types --schema-evidence的 exact 候选逐个人工审查后,把 1 个定义的 schema 从 Dynamic 收紧成精确类型,unresolved 弱类型从 100 降到 99。只改 schema,不改代码;用仓库钉住的 calcit 0.31.0 和干净安装的依赖验证通过。中文
改了什么
app.comp.container/style-body:: 'Dynamic:: 'Map 'Tag 'String没有采纳的候选
*states:空 cursor 推出List :never,不采纳。app.style/link:异构 map(Tag 和 String 混合),候选误报成String,不采纳。style-body的候选也是误报的String,按实际值写成Map Tag String。验证
用 calcit 0.31.0(与
deps.cirru一致)和caps --ci新装的依赖,在改动前后各跑一遍并对比:calcit calcit.cirru edit format之后没有额外改动--check-only(CI 用到的各个 entry)通过;--check-only --all-defs在 main 上本来就有失败的定义(与本改动无关),改动前后失败列表一致。fix --workflow strict --verify通过,0 条诊断js编译通过analyze weak-types的 unresolved:100 → 99English
After reviewing each exact candidate from
analyze weak-types --schema-evidenceby hand, narrows the schema of 1 definition from Dynamic to a precise type. Unresolved weak types go from 100 to 99. Schema-only change, no code changes.Changes
See the table above.
Candidates not adopted
*states: the empty cursor yieldsList :never; skipped.app.style/link: heterogeneous map (Tag and String values), mis-reported asString; skipped.style-bodyhit the sameStringmis-report and is declaredMap Tag Stringfrom its actual value.Verification
With calcit 0.31.0 (as pinned in
deps.cirru) and dependencies freshly installed bycaps --ci, before and after the change:calcit calcit.cirru edit formatproduces no further diff--check-onlypasses for every entry used in CI;--check-only --all-defsalready fails on main for unrelated definitions; the failing set is identical before and after this change.fix --workflow strict --verifypasses with 0 diagnosticsjsbuild passanalyze weak-typesunresolved: 100 → 99Generated by Claude Code