Repository navigation
功能(WK3):增加本机天气处理并统一多平台代理架构与构建 - #108
Open
patrickyanxxxxx wants to merge 42 commits into
Open
patrickyanxxxxx wants to merge 42 commits into
patrickyanxxxxx wants to merge 42 commits into
Conversation
Member
|
叹为观止,惊为天人 |
mist-whisper
added a commit
to mist-whisper/WeatherKit
that referenced
this pull request
Nov 5, 2026
VirgilClyne
added a commit
that referenced
this pull request
Nov 6, 2026
- WeatherKit2/ForecastNextHour import the named WK2 namespace; shared constructors move to WK2.Common.ForecastMinute / WK2.Common.UUID. - WeatherKit3 gains a small FlatBufferRootProcessor subclass overriding only decode: a requested AQ child that fails to decode now yields null so the response keeps Apple's original package; a genuinely missing AQ still allows backfill. Encoding and other processor behavior is inherited. - Response.dev drops direct protocol imports, raw generated-table checks and enum-table selection; MatchEnum takes the business object and the request version and picks WK2/WK3 enum tables internally. - Port the shared PR #107/#108 fixes: epsilon-tolerant boundary ceiling in #CeilByPrecision, and idempotent QWeather CO unit handling in FixPollutantsUnits (explicit mg/m3 label, or the mislabeled Apple product only via appleProduct) with regression tests. - Tests migrate static/dynamic protocol imports to the three-namespace API.
VirgilClyne
added a commit
that referenced
this pull request
Nov 6, 2026
- 拆分 WeatherKit 为 WeatherKit2/WeatherKit3 两个版本处理器,均基于 @nsnanocat/flatbuffer-root 配置通用根表编解码;WK3 仅注册 AQ 根槽, 其余产品保持原始 arena。 - WeatherKit3Processor 子类提供 decode 失败边界:已请求 AQ 读取或解码 失败时返回 null 保留原包,物理缺失允许补齐(基于包的 decodeWithReport 分类报告);checkFields 使用包的 inspectTable 做已验证字段数校验。 - 升级 @NSRingo/weatherkit 至 2.0.0(Common/WK2/WK3 命名空间)与 @nsnanocat/flatbuffer-root 至 ^1.1.0;共用构造器经 WK2.Common 引用。 - Response.dev 移除协议包直接导入、枚举表选择与原始生成表检查; MatchEnum 改为按请求版本内部选择枚举表。 - 移植 PR #107/#108 共同确认的修复:#CeilByPrecision 取整 EPSILON 容差、 FixPollutantsUnits 的 CO 单位幂等转换(appleProduct 入口)。 - WK3 与 WK2 的函数顺序、命名、参数排版对齐;两个 class 均补 JSDoc。 - 新增平台模拟回放测试(dist bundle、Surge 语义模拟)与 CO 单位回归。
VirgilClyne
added a commit
that referenced
this pull request
Nov 6, 2026
- 拆分 WeatherKit 为 WeatherKit2/WeatherKit3 两个版本处理器,均基于 @nsnanocat/flatbuffer-root 配置通用根表编解码;WK3 仅注册 AQ 根槽, 其余产品保持原始 arena。 - WeatherKit3Processor 子类提供 decode 失败边界:已请求 AQ 读取或解码 失败时返回 null 保留原包,物理缺失允许补齐(基于包的 decodeWithReport 分类报告);checkFields 使用包的 inspectTable 做已验证字段数校验。 - 升级 @NSRingo/weatherkit 至 2.0.0(Common/WK2/WK3 命名空间)与 @nsnanocat/flatbuffer-root 至 ^1.1.0;共用构造器经 WK2.Common 引用。 - Response.dev 移除协议包直接导入、枚举表选择与原始生成表检查; MatchEnum 改为按请求版本内部选择枚举表。 - 移植 PR #107/#108 共同确认的修复:#CeilByPrecision 取整 EPSILON 容差、 FixPollutantsUnits 的 CO 单位幂等转换(appleProduct 入口)。 - WK3 与 WK2 的函数顺序、命名、参数排版对齐;两个 class 均补 JSDoc。 - 新增平台模拟回放测试(dist bundle、Surge 语义模拟)与 CO 单位回归。
VirgilClyne
added a commit
that referenced
this pull request
Nov 6, 2026
- 拆分 WeatherKit 为 WeatherKit2/WeatherKit3 两个版本处理器,均基于 @nsnanocat/flatbuffer-root 配置通用根表编解码;WK3 仅注册 AQ 根槽, 其余产品保持原始 arena。 - WeatherKit3Processor 子类提供 decode 失败边界:已请求 AQ 读取或解码 失败时返回 null 保留原包,物理缺失允许补齐(基于包的 decodeWithReport 分类报告);checkFields 使用包的 inspectTable 做已验证字段数校验。 - 升级 @NSRingo/weatherkit 至 2.0.0(Common/WK2/WK3 命名空间)与 @nsnanocat/flatbuffer-root 至 ^1.1.0;共用构造器经 WK2.Common 引用。 - Response.dev 移除协议包直接导入、枚举表选择与原始生成表检查; MatchEnum 改为按请求版本内部选择枚举表。 - 移植 PR #107/#108 共同确认的修复:#CeilByPrecision 取整 EPSILON 容差、 FixPollutantsUnits 的 CO 单位幂等转换(appleProduct 入口)。 - WK3 与 WK2 的函数顺序、命名、参数排版对齐;两个 class 均补 JSDoc。 - 新增平台模拟回放测试(dist bundle、Surge 语义模拟)与 CO 单位回归。
VirgilClyne
added a commit
that referenced
this pull request
Nov 6, 2026
- 拆分 WeatherKit 为 WeatherKit2/WeatherKit3 两个版本处理器,均基于 @nsnanocat/flatbuffer-root 配置通用根表编解码;WK3 仅注册 AQ 根槽, 其余产品保持原始 arena。 - WeatherKit3Processor 子类提供 decode 失败边界:已请求 AQ 读取或解码 失败时返回 null 保留原包,物理缺失允许补齐(基于包的 decodeWithReport 分类报告);checkFields 使用包的 inspectTable 做已验证字段数校验。 - 共用构造器经 WK2.Common 引用;Response.dev 移除协议包直接导入、 枚举表选择与原始生成表检查;MatchEnum 改为按请求版本内部选择枚举表。 - 移植 PR #107/#108 共同确认的修复:#CeilByPrecision 取整 EPSILON 容差、 FixPollutantsUnits 的 CO 单位幂等转换(appleProduct 入口)。 - WK3 与 WK2 的函数顺序、命名、参数排版对齐;两个 class 均补 JSDoc。 - 新增平台模拟回放测试(dist bundle、Surge 语义模拟)与 CO 单位回归。 - dev 模块模板的 weather 规则拆分为独立的 v2/v3 条目并修正命名。
VirgilClyne
added a commit
that referenced
this pull request
Nov 7, 2026
按 PR #108 实机验证的结论:业务摘要恒为单条件分段,单元素 u8 向量与 u16 向量字节一致,可安全写入槽位 2;未知降水类型抛错 由处理器隔离。多元素向量的元素宽度仍未验证,schema 维持保留。 全量 134 项通过,dev bundle 回放 5/5 通过。
hhhoratioxu
added a commit
to hhhoratioxu/WeatherKit
that referenced
this pull request
Nov 14, 2026
Remove the nine optional cache, coalescing, request budget, cooldown, statistics, region fallback and alternate-provider controls. Keep original source settings, per-request timeouts and Apple failure fallback. Preserve unavailable Apple warnings unless enrichment changes actual data; retain opaque JSON containers and a normalized Apple fallback on overflow. Cover periodic and minute-rain edge cases and validate AQ comparison levels. Add source-native warning language preferences with Auto preserving old behavior. Normalize reserved expiry values without changing genuine times or manufacturing an event end. Preserve the original twelve defaults. Keep the PR's upstream release URLs, original display name, independent .loon.bundle.js files, package/lockfile policy and attribution. Retain all seven existing commits. Credit the referenced input-validation direction from Patrick Yan (NSRingo#108, 24c3f93) and known-container traversal from hhh2210 (NSRingo#110, f4676fe), as documented in the source. Validation: 430/430 regressions; 52 compiled Loon scenarios; 15 rewrite/jq checks; 13 declarations with all twelve original defaults preserved. Native evidence and remaining limits are documented separately.
This branch has not been deployed
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.
变更目的
在 v3.3.2(
c40e8f8a)基础上增加 iOS 27 WK3 本机处理,保留现有 WK2 请求、响应与 Hono 入口。WK3 使用独立编解码与有界写入,避免仅扩展 URL 正则后误用 WK2 字段和枚举。主要变更
src/wk3/;客户端对象适配保留在src/platform/,Egern 与其他平台不再反向依赖 Egern 专属业务目录。None),默认内置算法WAQI_InstantCast_US;今日/昨日指数来源默认ColorfulCloudsUS。只有选择Calculate才执行内置计算。latest拉取 Node 27 alpha / npm 12 后触发EALLOWREMOTE。没有新增依赖。验证
已知限制与上游审查事项
提交记录
本 PR 包含 26 个中文独立提交,来源
patrickyanxxxxx/WeatherKit-WK3:main,HEAD389f0afe85a27304be99cdcb00e6758af4f4a736。未压缩或重写本次提交历史。请保留完整的独立提交记录,采用保留提交的合并方式,不要 Squash merge,便于逐项审查与后续维护。