Repository navigation
fix: close source release legal provenance gaps - #3565
Conversation
English — independent review recordVerdictGO on exact head This is the final result of two independent lanes requested for this PR. Both lanes formed their own provisional judgment before the findings were reconciled. Findings were fixed on the author branch and both lanes rechecked the final exact head. Deep-code-reviewThree decision-changing findings were found and fixed:
Final deep recheck: all three are resolved; no residual decision-changing finding. Simplify auditTwo removable paths/tests were found and deleted:
Final simplify recheck: the committed normalized snapshot is the one input authority; the generated TypeScript files are deterministic derivatives. The new workflow-order test protects a stable preinstall/postinstall contract rather than mirroring implementation. No residual simplify finding. Entropy accounting: 47,435 of this PR's 48,115 added lines are the normalized snapshot. That is a large data surface, but it replaces an implicit rolling network authority and makes exact source bytes reproducible. The PR also deletes the unreviewable Copilot SVG/notice, the direct-input bypass, and low-value removal tests. Removing the snapshot or consuming it directly at runtime would be a disproportionate cross-package redesign for this legal-only change. Exact source candidate and gates
Rejected candidates included removing the workflow-order test, collapsing the install-free header audit into the complete source gate, deleting the generated TypeScript representations, and treating current-main 中文 — 独立审查记录结论Exact head 这是按要求执行的两条独立审查线最终结果。两线先各自形成 provisional judgment,再汇总;发现的问题均在作者分支修复,两线随后重新核查最终 exact head。 Deep-code-review发现并修复了三项会改变决策的问题:
最终 deep 复核:三项均已解决,无剩余会改变决策的 finding。 Simplify audit发现并删除了两条可移除路径/测试:
最终 simplify 复核:committed normalized snapshot 是唯一输入 authority,两个生成 TypeScript 文件均为确定性派生物。新增 workflow-order test 保护稳定的安装前/安装后契约,不是实现镜像。无剩余 simplify finding。 熵核算:本 PR 48,115 行新增中,47,435 行是规范化快照。数据面确实很大,但它取代了隐式滚动网络 authority,使源码字节可复现;同时 PR 删除了无法完成权利审查的 Copilot SVG/notice、direct-input 旁路和低价值删除测试。删除快照或让运行时直接消费它,都将变成超出本法律闭环 PR 的跨包重构。 Exact source candidate 与门禁
已排除的候选包括:删除 workflow-order test、把 install-free header audit 合并进完整 source gate、删除生成 TypeScript 表示、把当前 main 的 |
Astro-Han
left a comment
There was a problem hiding this comment.
Reviewed at exact head 9b5140d442bed8d4e7815500d4ae82e49f6e5a5b. Hosted checks are terminal green on this exact head: test, package, audit.
Coverage: the behaviour change in scripts/sync-model-metadata.mjs, alignment of the legal texts against what the repository actually ships, and the Copilot mark replacement. Not covered: the 47,435-line vendored snapshot was not read line by line — it was checked only as verbatim captured data.
No P0–P3 findings.
1. Snapshot replaces the rolling input, and it fails closed
The default path now reads the in-repo snapshot scripts/model-metadata/models-dev-api.snapshot.json (formatVersion 1, original sourceUrl preserved). fetch(SOURCE_URL) appears only under the --refresh branch, so the default run makes no network call — which is the point for a reproducible source release. --check compares against the generated artifacts. Missing or malformed fields make buildProjection throw rather than silently falling back to stale values.
2. Legal texts match what is shipped
- LICENSE — the three added redistribution declarations (node-pty, ai-sdk 5.0.27, the astryx patch) match the actual files under
patches/, including versions and paths. - NOTICE — product line moves from
Maka/The Maka AuthorstoApache Maka (incubating)/The Apache Software Foundation. - DISCLAIMER-WIP — still present, correctly. The only change is dropping the now-resolved known issue
* NOTICE has not yet been reworked into ASF form.; the ICLA/software-grant item stays. The disclaimer is not withdrawn, it just loses one item that this PR closes. cordis.patch.yml— the mixed-origin attribution matches the corresponding LICENSE section.
3. Copilot mark: name kept, mark no longer redistributed
Only the vendored github-copilot.svg asset and its provenance comment are removed; ProviderBrandMark for github-copilot falls back to GenericProviderMark with the reason stated inline (Primer Octicons' MIT grant does not cover GitHub logos). The visible GitHub Copilot name and its copy remain across the OAuth service, the IPC main module, the locale copy, and the settings display/flow modules. That is the right shape: stop redistributing the mark, keep the service identifiable.
Approving. No P0–P2, and the exact head is terminal green. Merging is for a human committer.
Dismissing our own approval at the author's request so a second independent line can run before this counts as a gate. No new finding prompted this — the earlier review stands on its own terms; it simply had one line of coverage, and the legal-alignment axis deserves a second, including the actual source-release artifact bytes that the first pass did not check.
Astro-Han
left a comment
There was a problem hiding this comment.
Second independent review at exact head 9b5140d442bed8d4e7815500d4ae82e49f6e5a5b, run at the author's request after our first approval — which we have since dismissed so it would not act as a gate while this ran.
This line reaches NO-GO: one [P1] and one [P2]. The source-release legal closure itself is clean, and is now verified far more strongly than in the first pass.
Correction to our earlier review
Our first review described the snapshot as verbatim captured data. That is wrong, and the file says so itself: origin.kind is generated-output-migration with commit: 729839ed…, and it stores a normalized projection, not an API response body. There is no stored response body, ETag, or upstream hash, so "unmodified capture of the upstream API" is not a claim anyone can verify from this file.
What can be proved strictly, and was: loading the two generated TypeScript outputs at base 729839ed and comparing all four export groups — metadata, providerOverrides, providerFacts, pricing — gives exact equality with the snapshot. So it faithfully migrates the previously published data; the historical upstream bytes are simply not recoverable. LICENSE is honest about this limitation, so it is not a finding on its own — but review text calling it a raw capture should be corrected, and this comment corrects ours.
[P1] --refresh accepts a structurally valid but incomplete upstream response, and --check then passes
Using today's live API response as a base and setting anthropic.models to {} while keeping every provider and the rest of the shape intact: the production refresh path exits 0, the written snapshot contains zero Anthropic models, and a subsequent --check also exits 0. Separately, changing one model's modalities to an unknown enum value (picture/words) also exits 0, silently producing vision: false with empty input/output.
The existing guards are real but sit on the wrong axis: a missing whole provider, or a required number arriving as a string, does throw before the write. What gets through is the partial subset / empty set, and the unknown value in a closed enum — exactly the shapes a rolling upstream produces when it partially degrades.
Since the whole point of this change is to make the snapshot the authority for reproducible releases, an upstream blip can now be frozen into the repository and pass its own verification.
Suggested fix: have --refresh compute a destructive delta against the existing snapshot and refuse by default on provider/model/pricing deletions and empty providers, requiring an explicit flag for a reviewed removal; reject unknown modality values outright.
[P2] --refresh is not transactional
It writes the snapshot first (scripts/sync-model-metadata.mjs:254), then formats and writes the two generated outputs (:166, :172). Given a perfectly valid response but a non-existent output parent directory, the command fails with ENOENT after the new snapshot is already on disk, leaving the repository holding a snapshot whose generated outputs were never produced.
Suggested fix: produce all three artifacts in memory or in same-directory temp files, publish only when all succeed, and replace the snapshot last. A write-failure test should assert the old snapshot is byte-identical afterwards.
Source-release legal closure: verified green
This is what the first pass did not do, and it holds up:
- The source artifact was generated from the exact head; its SHA-512 matches the PR description character for character, and
verifypasses. - Unpacked: 2875 files, 153 subdirectories, 0 special files.
- Header/provenance run against the unpacked tree: 2744 covered plus 131 reviewed exclusions, all green.
- All 24 provider SVGs had their SHA-256 recomputed and each matches the in-archive inventory.
- Every path declared in LICENSE exists, and each third-party-source exclusion maps to either the root LICENSE or the provider inventory. No reverse-empty declaration was found — nothing declared that isn't in the archive.
Full reproduction steps, hashes, and acceptance conditions for the two findings are available on request.
Astro-Han
left a comment
There was a problem hiding this comment.
Second independent line, incremental re-review at exact head eea04b0768d558801fc81da8e3876942ca1ff744.
Closed since the last head: the publish transaction is now atomic ([P2] resolved), and an unknown modality on a selected provider is correctly rejected while an unrelated new provider is correctly ignored. A controlled fault injected at rename call 4 — after metadata install and pricing backup — restored metadata, pricing and snapshot byte-for-byte, leaving no tmp/bak debris. Targeted tests 5/5 green; exact-head audit / test / package all completed/success.
Still open: [P1] the completeness guard only rejects an exactly-empty provider.
scripts/sync-model-metadata.mjs:189-195 validates:
if (
!provider.models ||
typeof provider.models !== 'object' ||
Array.isArray(provider.models) ||
Object.keys(provider.models).length === 0
) {
throw new Error(`models.dev provider ${sourceId} has no non-empty models object`);
}A truncated or partially-failed upstream response is not empty — it is short. Reproduced against this head:
- removing 1 of 2 Anthropic models from the fetched catalog while leaving the provider non-empty: refresh succeeds and publishes the deletion;
- removing the surviving model's
cost: refresh succeeds and silently drops its pricing row.
Both cases produce mutually self-consistent metadata + pricing + snapshot, so --check cannot detect them either — the three artifacts agree with each other precisely because they were all derived from the same truncated input. There is no comparison against the previously-published set anywhere in the script (no expected-model floor, no shrink guard, no diff-vs-previous), so a partial upstream response is indistinguishable from a genuine upstream removal.
Impact: a transient upstream degradation during a routine metadata refresh can quietly delete models or pricing from the shipped catalog, and the atomicity work added here makes that deletion land cleanly rather than fail.
Minimal direction: keep the emptiness check, and add a regression floor against the currently-committed outputs — e.g. fail closed when a selected provider's model set shrinks, or when a model that previously had cost no longer does, unless an explicit opt-in flag acknowledges the removal. That keeps intentional upstream deletions expressible while making silent truncation non-publishable.
Nothing else new at this head. Not a blocking request — flagging so the completeness axis is settled alongside the transaction axis before this lands.
Generated-by: Codex
Generated-by: Codex
jackwener
left a comment
There was a problem hiding this comment.
Kabi publisher review at exact head c658f3c15fcfc80fa0b16eb9467de471ee953d52.
Publisher execution: kabi-sol-review-orchestrator, representing WAWQAQ under Raft authorization f380cfac for Maka review actions. Hosted audit, test, and package are all completed/success on this exact head. Verdict: one P2; please keep this head unapproved until it is fixed. Two P3s are non-blocking.
[P2] Capability loss bypasses the advertised fail-closed refresh contract
scripts/sync-model-metadata.mjs:288-324 only records deleted object keys and deleted array members. Once recursion reaches a primitive, line 312 returns without comparing it. Therefore a routine upstream change such as:
reasoning: true -> false, ortool_call: true -> false(projected asfunctionCalling: true -> false)
publishes successfully without --accept-upstream-removals.
This is not an arbitrary scalar edit. README.md:247 explicitly promises that a refresh fails closed when a committed capability disappears, and these booleans are production authorities: packages/core/src/provider-registry.ts:689-706 filters model catalogs by functionCalling, while packages/core/src/model-metadata.ts:334-344 derives thinking controls from reasoning. A false transition can therefore remove a model from a tool-capable catalog or remove its thinking controls without the required explicit acknowledgment.
The current nested-shrink test only deletes a modality array member and a pricing key, so it cannot catch this primitive branch.
Minimal clean fix: treat true -> false under /metadata/<provider>/<model>/capabilities/<name> as a removal, while continuing to allow ordinary scalar corrections such as names and prices. Add production-helper regressions for both reasoning and functionCalling; the existing acceptance flag remains the explicit path for a reviewed capability withdrawal.
[P3] Multi-file publish is exception-safe, not crash/concurrency-atomic
scripts/sync-model-metadata.mjs:331-387 stages every file and rolls back caught exceptions, which correctly closes the prior failure path. But installation still consists of sequential renames at lines 353-362. SIGKILL between renames, or two concurrent refreshes, can leave snapshot/metadata/pricing from different generations because rollback only runs in catch and there is no inter-process lock. The current test (scripts/sync-model-metadata.test.mjs:366-419) covers a staging failure before installation, not process death or concurrent commits. This is recoverable maintainer-script state and remains P3; document the recovery, or add a same-directory lock if stronger serialization is desired.
[P3] Chinese contribution docs omit the new safety contract
README.zh-CN.md:244 documents refresh versus offline sync but omits both fail-closed shrinkage behavior and --accept-upstream-removals, while README.md:247 contains them. The CLI error is explicit, so this is documentation asymmetry rather than a behavioral blocker.
The source-candidate provenance/legal changes and the single committed-snapshot authority otherwise hold. No merge action taken.
Fixes #3608 Generated-by: Codex
jackwener
left a comment
There was a problem hiding this comment.
Kabi publisher approval at exact head 3c2ace9b30b3d8ab6577319b4c582c327605ad91.
Execution: kabi-sol-review-orchestrator, representing WAWQAQ under Raft authorization f380cfac for Maka review actions.
The prior capability-loss P2 is closed. collectProjectionRemovals() now recognizes only true -> false transitions at /metadata/<provider>/<model>/capabilities/<field> as acknowledged removals: both reasoning and function-calling capability withdrawals fail closed without --accept-upstream-removals, the explicit flag accepts them, and ordinary scalar corrections such as names and prices remain allowed. Regression coverage exercises both production-helper paths. The Chinese README now carries the same fail-closed and explicit-bypass contract.
Focused sync-model-metadata tests pass 8/8 locally. Hosted test, audit, and package are all completed/success on this exact head. PR is OPEN, non-draft, and MERGEABLE. No live P0-P2 finding remains.
No merge action taken; merging remains for a human committer.
English
What
Close the four source-only legal/provenance gaps found by auditing the real ASF source candidate at
6ada6b54665a03dadc699c147d18b8d469168ebe.GitHub Copilotname and copy.LICENSE,NOTICE, andDISCLAIMER-WIPdescribe the source archive's actual bytes and patch/adapted-source obligations. The NOTICE product line is nowApache Maka (incubating).cordis.patch.yml.Baseline and scope
9b5140d442bed8d4e7815500d4ae82e49f6e5a5b729839ed8ada3e5498b0ad27e64fb42dfd283ae7Exact-head source candidate
apache-maka-0.1.11-incubating-src.tar.gzc8739cef16d53c6d036078048dc830ba172d3e30c44fe1ae41af474d268f35802e4754a27dc3e806042178cc3b80c7fff8a19a299d68ec83d78903b7f56f9dbdVerification and independent review
check:asf-source: 59/59 tests pass.AI use
Generative tooling made a substantive contribution. Codex performed the source-candidate audit, implementation, tests, independent review orchestration, and documentation; the human contributor of record owns the final review and submission.
中文
内容
修复在真实 ASF 源码候选包(
6ada6b54665a03dadc699c147d18b8d469168ebe)审计中发现的四组 source-only 法律与来源闭环缺口。GitHub Copilot名称和说明文字。LICENSE、NOTICE、DISCLAIMER-WIP与源码包实际字节及 patch/adapted source 义务一致;NOTICE 产品行现为Apache Maka (incubating)。cordis.patch.yml的混合来源归因。基线与边界
9b5140d442bed8d4e7815500d4ae82e49f6e5a5b729839ed8ada3e5498b0ad27e64fb42dfd283ae7Exact-head 源码候选
apache-maka-0.1.11-incubating-src.tar.gzc8739cef16d53c6d036078048dc830ba172d3e30c44fe1ae41af474d268f35802e4754a27dc3e806042178cc3b80c7fff8a19a299d68ec83d78903b7f56f9dbd验证与独立审查
check:asf-source:59/59 通过。AI 使用
生成式工具做出了实质贡献。Codex 执行源码候选审计、实现、测试、独立审查编排和文档;记录中的人类贡献者负责最终审阅与提交责任。