Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions LICENSE_POLICY.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@ MIT, ISC, 0BSD, BSD-2-Clause, BSD-3-Clause, and Apache-2.0 dependencies are norm

## Audited dependency snapshot

Audit date: 2026-09-18. Exact inputs and expected counts are recorded in [`licenses/audit.json`](licenses/audit.json).
Audit date: 2026-10-14. Exact inputs and expected counts are recorded in [`licenses/audit.json`](licenses/audit.json).

| Scope | Result |
| --- | --- |
| Linux/Windows/macOS Go release closure | 37 external modules: MIT, BSD-3-Clause, and Apache-2.0 only |
| Full Go module graph | 60 external modules; one reviewed MPL-2.0 module is used by build/test paths and is verified absent from both release closures |
| Linux/Windows/macOS Go release closure | 62 external modules: MIT, BSD-3-Clause, and Apache-2.0 only |
| Full Go module graph | 100 external modules; one reviewed MPL-2.0 module is used by build/test paths and is verified absent from all four release closures |
| Embedded production UI graph | 106 package records: MIT, BSD-3-Clause, and 0BSD only |
| Full frontend build/test graph | 198 package records: production licenses plus Apache-2.0, ISC, and one CC-BY-4.0 build-data package |
| GitHub Actions and release CLI | `checkout`, `setup-go`, `action-setup`, `setup-node`, `upload-artifact`, and GitHub CLI are MIT-licensed |
Expand All @@ -32,7 +32,11 @@ The MPL-2.0 module is `github.com/hashicorp/golang-lru/v2@v2.0.7`. It is reached

The CC-BY-4.0 component is `caniuse-lite@1.0.30001810`, used as browser-compatibility build data. It is absent from the production package set and is not shipped as a runtime package. Its attribution remains available through the pinned source package and lockfile.

No third-party GPL, AGPL, LGPL, SSPL, Business Source License, Commons Clause, PolyForm, non-commercial, or no-derivatives dependency was found in the audited graphs.
The 2026-10-14 review covers all 40 newly introduced Go modules and the updated `github.com/bits-and-blooms/bitset@v1.24.2`, including modules outside the release closure. The selected module licenses in the full graph are Apache-2.0, BSD-2-Clause, BSD-3-Clause, ISC, MIT, and the existing build-only MPL-2.0 exception; the release closure uses only Apache-2.0, BSD-3-Clause, and MIT. Roaring retains an additional Go BSD-3-Clause notice, and the pinned Bleve source retains Apache-licensed Lucene, OpenSearch/Elasticsearch, and historical Cockroach attributions.

The build-only `github.com/blevesearch/stempel@v0.2.0` includes Polish dictionary data offered under multiple licenses; this audit selects its stated Apache-2.0 option. Bleve also contains a Wikipedia-derived CC-BY-SA benchmark fixture in `search/facet/benchmark_data.txt`, read only by test code and absent from every release target's selected source and embedded files. The build-only `go.etcd.io/gofail@v0.2.0` has a CoreOS NOTICE, retained in its pinned source distribution. These source-only materials must retain their own attribution and license terms if redistributed.

No dependency requiring GPL, AGPL, LGPL, SSPL, Business Source License, Commons Clause, PolyForm, non-commercial, or no-derivatives terms was found in the audited release closure.

## Release obligations

Expand Down
15 changes: 13 additions & 2 deletions README-zh_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ Prods 是供制造商与经销商自托管的技术产品目录与 RFQ(询价

指南描述 2026-09-17 查看时的工作目录(`VERSION`:`v0.6.8`)。源代码、测试与发布 workflow 展示已实现的机制;本次核查未验证运行中的生产部署、客户负载或可用性目标。Release workflow 发布构建产物,不部署运行中的站点。历史需求与 ADR 保持内部文档属性;指南提供源代码链接与说明,不重新公开内部内容。

架构与工程案例指南保留 2026-09-17、`v0.6.8` 的核查范围。本 README 的数值搜索概览与对应运维章节描述 2026-10-14 核查的 `v0.7.0` 后端变更;这不代表历史指南已重新全面核查,也不构成生产部署证据。

## 已实现范围

| 领域 | 代码仓库中的实现 |
Expand Down Expand Up @@ -125,12 +127,21 @@ data_dir=data
backup_dir=backups
trusted_proxies=127.0.0.1/32
asset_gc_grace_days=7
spec_search_backend=bleve
```

对应环境变数包含 `PRODS_LISTEN`、`PRODS_BASE_URL`、`PRODS_DATA_DIR`、`PRODS_BACKUP_DIR`、`PRODS_CONFIG`、`PRODS_TRUSTED_PROXIES`。

面向公网服务时,请由受信任的反向代理终止 HTTPS,明确配置正式 HTTPS Base URL,只接受已知 proxy IP/CIDR 提供的 forwarded client 信息。不要用通用文件服务器公开 data、backup、secret 或 generated-history 目录。

## 数值规格搜索(后端)

`v0.7.0` 新增受控数值 profile、规范化/采用命令与 `POST /api/search/specs`。每个 Product + Spec 明确选择一份共享 Raw 来源;来源语言记录 provenance,翻译仍是展示内容。搜索使用已激活公开 `PublicView` 中采用的数值事实及冻结 profile,所有条件以 AND 组合,只纳入 `MATCH`。缺失、过期、有条件或不兼容的事实为 `UNKNOWN`,不纳入结果。精确判定后才计数、分页;待发布修改不取代当前公开版本。

候选后端默认为 `bleve`;可用 `--spec-search-backend`、`PRODS_SPEC_SEARCH_BACKEND` 或 `prods.ini` 的 `[prods] spec_search_backend` 选择 `sqlite`,优先序为 CLI > ENV > INI > 默认值。Bleve 私有派生文件位于 `<data_dir>/generated/search/specs`;SQLite 仍是正式数据来源。候选不可用或不符时,改用已准入公开事实完整精确扫描。Adapter 初次打开失败时,必须修正原因并重启;内部诊断/重建方法没有 Admin/Public endpoint。

数值 profile 编辑器、采用/来源选择控件与 Public 数值筛选 UI 延后提供。现有文本搜索仍独立运行。配置、migration 及带 Admin 认证/Public API 示例见[运维:数值规格搜索](docs/zh-CN/operations.md#数值规格搜索后端)。内置合成样本不会自动配置数值 profile 或填入已采用数值事实。

## 发布与 RFQ 行为

Prods 将 Domain Truth、Website 配置、Public Copy 与产生后的公开 representation 分开管理。
Expand Down Expand Up @@ -224,7 +235,7 @@ CGO_ENABLED=0 go build -trimpath -o prods ./cmd/prods
创建含嵌入版本、对应 sample data、源代码 metadata、许可文件与 checksum 的 Linux amd64、Windows amd64、macOS Intel 与 macOS Apple Silicon release:

```sh
./scripts/build-release.sh v0.6.8
./scripts/build-release.sh v0.7.0
```

输出位于 `dist/<version>/`。根目录 [`VERSION`](VERSION) 是唯一版本来源;script 会拒绝不同参数,GitHub Actions 也会拒绝不同 tag。同一版本会写入每个 binary、sample payload、`BUILD_INFO.txt`、产物目录与 GitHub Release tag。Cross-build 只能证明可编译;Windows 必须在 Windows 实际运行后才能宣称通过 runtime 验证,两个 macOS 产物在 native macOS 验收前均明确列为未测试。
Expand All @@ -241,6 +252,6 @@ Release script 要求 tracked working tree干净,并将版本与 source revisi

Prods Community 采用 [GNU Affero General Public License v3.0 only](LICENSE),SPDX 标识为 `AGPL-3.0-only`。通过网络使用修改版 Community 程序的用户,有权获取对应源代码。

当前 release closure 的第三方组件仅使用 MIT、BSD、Apache-2.0、ISC/0BSD 或 public-domain 类型许可,未发现 GPL、AGPL、LGPL、SSPL、BSL、Commons Clause、PolyForm、非商用或禁止衍生许可。完整范围、build-only 例外、未来闭源商业发行条件与自动检查方式请见 [LICENSE_POLICY.md](LICENSE_POLICY.md);保留声明与许可文字请见 [THIRD_PARTY_NOTICES.md](THIRD_PARTY_NOTICES.md)。
已审计 Go release closure 采用 MIT、BSD-3-Clause 与 Apache-2.0;production UI 采用 MIT、BSD-3-Clause 与 0BSD。完整 build/test graph 另有经过审查的例外及 source-only fixture,包含 MPL-2.0、CC-BY-4.0 与 CC-BY-SA 素材;不能将这些条款概括为已交付 runtime code 的许可。所选许可、精确范围、source-only 义务、未来闭源商业发行条件及自动检查方式见 [LICENSE_POLICY.md](LICENSE_POLICY.md);保留的 runtime 声明与许可文字见 [THIRD_PARTY_NOTICES.md](THIRD_PARTY_NOTICES.md)。

第三方许可不会自动阻止未来另行许可的 proprietary edition;主要条件是 Prods 本身所有贡献都必须具有可重新许可的权利。在正式 Contributor License Agreement、接受 CLA 的法律实体及记录流程创建前,不应合并实质外部贡献。Product data、图片、datasheet、RFQ、backup 与其他客户内容不会因使用 Prods 而自动改采 AGPL。
15 changes: 13 additions & 2 deletions README-zh_TW.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ Prods 是供製造商與經銷商自架的技術產品型錄與 RFQ(詢價請

指南描述 2026-09-17 檢視的工作目錄(`VERSION`:`v0.6.8`)。原始碼、測試與發布 workflow 呈現已實作機制;本次查核未驗證運行中的正式部署、客戶負載或可用性目標。Release workflow 發布成品,不部署運行中的站點。歷史需求與 ADR 保持內部文件身分;指南提供原始碼連結與說明,不重新公開內部內容。

架構與工程案例指南保留 2026-09-17、`v0.6.8` 的查核範圍。本 README 的數值搜尋概覽與對應維運章節描述 2026-10-14 查核的 `v0.7.0` 後端變更;這不代表歷史指南已重新全面查核,也不構成正式部署證據。

## 已實作範圍

| 領域 | 儲存庫中的實作 |
Expand Down Expand Up @@ -125,12 +127,21 @@ data_dir=data
backup_dir=backups
trusted_proxies=127.0.0.1/32
asset_gc_grace_days=7
spec_search_backend=bleve
```

對應環境變數包含 `PRODS_LISTEN`、`PRODS_BASE_URL`、`PRODS_DATA_DIR`、`PRODS_BACKUP_DIR`、`PRODS_CONFIG`、`PRODS_TRUSTED_PROXIES`。

對外服務時,請由受信任的反向代理終止 HTTPS,明確設定正式 HTTPS Base URL,只接受已知 proxy IP/CIDR 提供的 forwarded client 資訊。不要用通用檔案伺服器公開 data、backup、secret 或 generated-history 目錄。

## 數值規格搜尋(後端)

`v0.7.0` 新增受控數值 profile、正規化/採用命令與 `POST /api/search/specs`。每個 Product + Spec 明確選擇一份共用 Raw 來源;來源語系記錄 provenance,翻譯仍是展示內容。搜尋使用已啟用公開 `PublicView` 中採用的數值事實及凍結 profile,所有條件以 AND 結合,只納入 `MATCH`。缺失、過期、有條件或不相容的事實為 `UNKNOWN`,不納入結果。精確判定後才計數、分頁;待發布修改不取代目前公開版本。

候選後端預設為 `bleve`;可用 `--spec-search-backend`、`PRODS_SPEC_SEARCH_BACKEND` 或 `prods.ini` 的 `[prods] spec_search_backend` 選擇 `sqlite`,優先序為 CLI > ENV > INI > 預設值。Bleve 私有衍生檔位於 `<data_dir>/generated/search/specs`;SQLite 仍是正式資料來源。候選不可用或不符時,改以已准入公開事實完整精確掃描。Adapter 初次開啟失敗時,必須修正原因並重啟;內部診斷/重建方法沒有 Admin/Public endpoint。

數值 profile 編輯器、採用/來源選擇控制與 Public 數值篩選 UI 延後提供。既有文字搜尋仍獨立運作。設定、migration 及具 Admin 認證/Public API 範例見[維運:數值規格搜尋](docs/zh-TW/operations.md#數值規格搜尋後端)。內建合成樣本不會自動設定數值 profile 或填入已採用數值事實。

## 發布與 RFQ 行為

Prods 將 Domain Truth、Website 設定、Public Copy 與產生後的公開 representation 分開管理。
Expand Down Expand Up @@ -249,7 +260,7 @@ CGO_ENABLED=0 go build -trimpath -o prods ./cmd/prods
建立含內嵌版本、對應 sample data、原始碼 metadata、授權文件與 checksum 的 Linux amd64、Windows amd64、macOS Intel 與 macOS Apple Silicon release:

```sh
./scripts/build-release.sh v0.6.8
./scripts/build-release.sh v0.7.0
```

輸出位於 `dist/<version>/`。根目錄 [`VERSION`](VERSION) 是唯一版本來源;script 會拒絕不同參數,GitHub Actions 也會拒絕不同 tag。同一版本會寫入每個 binary、sample payload、`BUILD_INFO.txt`、產物目錄與 GitHub Release tag。Cross-build 只能證明可編譯;Windows 必須在 Windows 實際執行後才能宣稱通過 runtime 驗證,兩個 macOS 產物在 native macOS 驗收前均明確列為未測試。
Expand All @@ -266,6 +277,6 @@ Release script 要求 tracked working tree 乾淨,並將版本與 source revis

Prods Community 採 [GNU Affero General Public License v3.0 only](LICENSE),SPDX 識別為 `AGPL-3.0-only`。透過網路使用修改版 Community 程式的使用者,有權取得對應原始碼。

目前 release closure 的第三方元件僅使用 MIT、BSD、Apache-2.0、ISC/0BSD 或 public-domain 類型授權,未發現 GPL、AGPL、LGPL、SSPL、BSL、Commons Clause、PolyForm、非商用或禁止衍生授權。完整範圍、build-only 例外、未來封閉商用條件與自動檢查方式請見 [LICENSE_POLICY.md](LICENSE_POLICY.md);保留聲明與授權文字請見 [THIRD_PARTY_NOTICES.md](THIRD_PARTY_NOTICES.md)。
已稽核 Go release closure 採 MIT、BSD-3-Clause 與 Apache-2.0;production UI 採 MIT、BSD-3-Clause 與 0BSD。完整 build/test graph 另有經審查的例外及 source-only fixture,包含 MPL-2.0、CC-BY-4.0 與 CC-BY-SA 素材;不能將這些條款概括為已交付 runtime code 的授權。選用授權、精確範圍、source-only 義務、未來封閉商用條件及自動檢查方式見 [LICENSE_POLICY.md](LICENSE_POLICY.md);保留的 runtime 聲明與授權文字見 [THIRD_PARTY_NOTICES.md](THIRD_PARTY_NOTICES.md)。

第三方授權不會自動阻止未來另行授權的 proprietary edition;主要條件是 Prods 本身所有貢獻都必須具有可重新授權的權利。在正式 Contributor License Agreement、接受 CLA 的法律實體及紀錄流程建立前,不應合併實質外部貢獻。Product data、圖片、datasheet、RFQ、backup 與其他客戶內容不會因使用 Prods 而自動改採 AGPL。
15 changes: 13 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ One Go process serves the public website, embedded Admin application and lifecyc

These guides describe the working tree reviewed on 2026-09-17 (`VERSION`: `v0.6.8`). Source, tests and release workflows demonstrate implemented mechanisms; this review did not verify a live production deployment, customer workload or availability target. Release workflows publish artifacts, not a running site. Historical requirements and ADRs remain internal; the guides provide source-linked explanations without republishing them.

Architecture and case-study guides retain their 2026-09-17 `v0.6.8` review scope. The numeric-search overview here and the corresponding Operations section describe the `v0.7.0` backend changes reviewed on 2026-10-14; they do not renew the historical guides or establish production deployment evidence.

## Implemented scope

| Area | Implementation in this repository |
Expand Down Expand Up @@ -125,12 +127,21 @@ data_dir=data
backup_dir=backups
trusted_proxies=127.0.0.1/32
asset_gc_grace_days=7
spec_search_backend=bleve
```

Equivalent environment variables include `PRODS_LISTEN`, `PRODS_BASE_URL`, `PRODS_DATA_DIR`, `PRODS_BACKUP_DIR`, `PRODS_CONFIG`, and `PRODS_TRUSTED_PROXIES`.

For an Internet-facing deployment, terminate HTTPS at a trusted reverse proxy, set the canonical HTTPS Base URL explicitly, and accept forwarded client information only from known proxy IPs or CIDRs. Never expose data, backup, secret, or generated-history directories through a generic file server.

## Numeric specification search (backend)

`v0.7.0` adds controlled numeric profiles, normalization/adoption commands and `POST /api/search/specs`. A Product + Spec has one explicitly selected shared Raw source; its source locale records provenance, while translations remain display content. Search reads adopted numeric facts and their frozen profiles from the active published `PublicView`, combines predicates with AND, and includes only `MATCH`. Missing, stale, conditional or incompatible facts remain `UNKNOWN` and are excluded. Counts and pagination follow exact evaluation; pending edits do not replace the active public revision.

The default candidate backend is `bleve`; `sqlite` is selectable through `--spec-search-backend`, `PRODS_SPEC_SEARCH_BACKEND`, or `[prods] spec_search_backend` in `prods.ini`, using CLI > ENV > INI > default precedence. Bleve's private derived files live at `<data_dir>/generated/search/specs`; SQLite remains authoritative. Unavailable or mismatched candidates fall back to a complete exact scan of admitted public facts. An adapter that failed its initial open requires fixing the cause and restarting; internal diagnostic/rebuild methods have no Admin/Public endpoint.

The numeric-profile editor, adoption/source-selection controls and numeric Public filter UI are deferred. Existing text search remains separate. See [Operations: numeric specification search](docs/en/operations.md#numeric-specification-search-backend) for configuration, migration and authenticated Admin/Public API examples. The bundled synthetic sample does not configure numeric profiles or populate adopted numeric facts automatically.

## Publishing and RFQ behavior

Prods keeps Domain Truth, Website configuration, Public Copy, and generated public representations separate.
Expand Down Expand Up @@ -249,7 +260,7 @@ The frontend build writes embedded assets under `internal/webapp/static/`; commi
Build a complete Linux amd64, Windows amd64, macOS Intel, and macOS Apple Silicon release with an embedded version, matching sample data, source metadata, notices, and checksums:

```sh
./scripts/build-release.sh v0.6.8
./scripts/build-release.sh v0.7.0
```

Output is written to `dist/<version>/`. Root [`VERSION`](VERSION) is the release source of truth; the script rejects any different argument, and GitHub Actions rejects a different tag. The same version is embedded in every binary, written into the sample payload and `BUILD_INFO.txt`, and used for the artifact directory and GitHub Release tag. Cross-builds prove compilation only. Windows must be tested on Windows before claiming Windows runtime verification; both macOS artifacts remain explicitly untested until native macOS acceptance is recorded.
Expand All @@ -266,6 +277,6 @@ The release script requires a clean tracked working tree and records the version

Prods Community is licensed under the [GNU Affero General Public License v3.0 only](LICENSE), identified as `AGPL-3.0-only`. Network users are entitled to the corresponding source for the running version under that license.

The current release closure contains only third-party components under MIT, BSD, Apache-2.0, ISC/0BSD, or public-domain terms. The audited graphs contain no third-party GPL, AGPL, LGPL, SSPL, BSL, Commons Clause, PolyForm, non-commercial, or no-derivatives dependency. See [LICENSE_POLICY.md](LICENSE_POLICY.md) for the full scope, build-only exceptions, future closed-source conditions, and automated gate; retained notices and license texts are in [THIRD_PARTY_NOTICES.md](THIRD_PARTY_NOTICES.md).
The audited Go release closure uses MIT, BSD-3-Clause and Apache-2.0 terms; the production UI uses MIT, BSD-3-Clause and 0BSD. The full build/test graphs have separately reviewed exceptions and source-only fixtures, including MPL-2.0, CC-BY-4.0 and CC-BY-SA material; those terms are not a blanket description of shipped runtime code. See [LICENSE_POLICY.md](LICENSE_POLICY.md) for the selected license options, exact scope, source-only obligations, future closed-source conditions and automated gate; retained runtime notices and license texts are in [THIRD_PARTY_NOTICES.md](THIRD_PARTY_NOTICES.md).

Permissive third-party licenses do not prevent a future separately licensed proprietary edition. The central condition is ownership of Prods contributions: before merging material external contributions, the project needs a Contributor License Agreement that explicitly grants the accepting legal entity the rights required to relicense those contributions in open-source and proprietary products. A commit sign-off or DCO alone is not a substitute. Product data, images, datasheets, RFQs, backups, and other customer content are not automatically relicensed as Prods source code.
Loading
Loading