dsh-origin-rvc-check 0.2.0 → 0.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md ADDED
@@ -0,0 +1,37 @@
1
+ # Changelog
2
+
3
+ ## 0.2.2
4
+
5
+ - Rework the README first screen. The H1 now names what the plugin checks rather
6
+ than repeating the package name, and a question-and-answer table and a standards
7
+ table come before the boundary paragraph.
8
+
9
+ The substance is unchanged and the boundary paragraph is verbatim: in a
10
+ compliance tool that paragraph is what stops a wrong "pass" being read as
11
+ approval, so it moved rather than shrank. What changed is the order - a reader
12
+ or an extractor previously met eleven badges, an install command and a
13
+ disclaimer before learning what the plugin does. The Q&A rows are derived from
14
+ each plugin's own rules and the standards table from the rule pack's
15
+ `document`/`number` fields, so no answer and no standard is hand-typed.
16
+
17
+ All five languages were restructured together; `check:readmes` holds them to the
18
+ same section count, install command and configuration keys.
19
+
20
+ ## 0.2.1
21
+
22
+ - Ship `CHANGELOG.md` and `SECURITY.md` inside the package. `files` is an
23
+ allowlist and neither was on it, so no release note had ever reached anyone
24
+ who installed this package, and npm had no changelog section to show.
25
+ ## 0.2.0
26
+
27
+ - Release infrastructure brought to the family standard: `verify:self-contained`,
28
+ `check:lockfile`, `check:readmes` and `check:citations` gates, a `prepublishOnly` that
29
+ re-runs the whole chain, SECURITY.md, dependabot, and the OpenSSF Scorecard workflow.
30
+ - `check:citations` enforces the rule this pack's own header states: every `excerpt`
31
+ must be a verbatim quotation, findable in `rules/evidence/`. Rules that are not
32
+ traceable yet are listed in `rules/citations-baseline.json`, and that file can only
33
+ shrink - anything new has to be sourced before it can land.
34
+ - The README install command now names the published package instead of a local tarball.
35
+ - Five-language READMEs hold the same section count and the same configuration keys.
36
+ - Rule pack: 7 rules across OR-001..OR-007.
37
+ - Licensed Apache-2.0.
package/README-es.md CHANGED
@@ -1,4 +1,25 @@
1
- # dsh-origin-rvc-check
1
+ # dsh-origin-rvc-check — Verificación del contenido de valor regional de un registro de determinación de origen
2
+
3
+ `dsh-origin-rvc-check` lee un registro de determinación de origen (原产地判定台账) —la cabecera del acuerdo más una fila por material— y comprueba la aritmética de ese mismo registro: que se declaren el acuerdo y el producto, que el contenido de valor regional sea igual a (FOB − valor de los materiales no originarios) ÷ FOB × 100, que el RVC alcance el umbral que usted configura, que cada material indique su origen, que el criterio de origen proceda del vocabulario de su acuerdo, que los números de material no se repitan y que no quede ningún marcador de plantilla sin sustituir en la descripción.
4
+
5
+ ## Qué responde
6
+
7
+ | Usted pregunta | Qué responde |
8
+ |---|---|
9
+ | La columna «区域价值成分» dice `70.00`, pero el «净价值» de la fila es `220` y el FOB de la cabecera es `400`. ¿Se detecta? | Sí. `OR-002` recalcula la fórmula de deducción (FOB − valor de los materiales no originarios) ÷ FOB × 100 a partir de la columna «净价值» y del FOB, con una tolerancia de 0,5 puntos, y señala la fila cuando el RVC declarado no coincide. Solo hace la aritmética y supone el método de deducción: un registro calculado por el método de acumulación se señala aunque su convención sea la correcta, así que cambie `expression` o desactive la regla. Si el RVC, el «净价值» o el FOB no se pueden leer como número, la regla se informa en `skipped` en lugar de pasar en silencio. |
10
+ | No hay ningún umbral configurado y todas las filas pasaron. ¿Se comprobó el RVC? | No. `OR-003` trae `threshold: 0`, que significa sin configurar, así que la regla aparece en `skipped` en lugar de pasar en silencio. Ponga `threshold` en el valor de su acuerdo (por ejemplo `40`) y señalará cada fila cuyo RVC quede por debajo. Un hallazgo solo significa «por debajo del umbral que usted fijó», no que las mercancías no sean originarias: el origen también puede obtenerse por criterios de totalmente obtenido o de cambio de clasificación arancelaria, y el RVC es solo uno de los caminos. |
11
+ | Una fila de material deja «原产国» en blanco. | `OR-004` señala toda fila en la que la columna «原产国» (origen) existe pero está vacía. Solo comprueba que la celda esté rellenada, no si el origen declarado es cierto ni si afecta a la condición de originario; cuando el material no trae ninguna columna de origen, la regla informa de que no se aplica en lugar de pasar en silencio. |
12
+ | La columna «原产地标准» contiene un valor que no está en mi lista. | `OR-005` compara cada valor con la lista `values` del paquete. Esa lista viene vacía —los nombres y abreviaturas de los criterios cambian con cada acuerdo y el plugin no codifica ninguno— y entonces la regla se informa en `skipped`; rellene `values` con los criterios de su acuerdo (完全获得, CTC, RVC, 特定加工工序 …) y se señalará todo valor que no figure en ella. Solo comprueba que el valor esté en la lista, no que las mercancías cumplan ese criterio. |
13
+ | El mismo «料件序号» aparece en dos filas. | `OR-006` señala un «料件序号» (itemNo) repetido, comparando los valores sin tener en cuenta los espacios. Una repetición cuenta dos veces el valor de los materiales no originarios y por tanto corrompe el RVC: es el tipo de defecto que lleva directamente a una conclusión equivocada. Informa de la repetición y no decide cuál de las dos filas está mal. |
14
+ | La columna «品名» de una fila todavía dice `【待填】`. | `OR-007` señala toda fila cuyo «品名» (descripción) contenga alguno de los `terms` del paquete: 【, 】, `{{`, `}}`, XXX, xxx, 待填, 待补充, TBD, todo, 示例. Un registro copiado de una plantilla parece haber inventariado materiales reales, y el RVC acaba calculado sobre una lista de materiales que no existe. Solo busca los términos listados, así que un marcador que nadie incluyó pasa; `terms` se ajusta a su propia plantilla. |
15
+
16
+ ## Normas que sigue
17
+
18
+ Este paquete de reglas no cita ninguna norma pública: la verificación no obtuvo el texto literal de las reglas de origen de ningún acuerdo de libre comercio, de modo que el `basis` de cada regla lo dice, todas son `derived-from-principle` y ninguna supera `warn` o `info`. En lo que sí se apoyan las comprobaciones es en la aritmética del propio registro y en el umbral de RVC y el vocabulario de criterios que usted configure para el acuerdo aplicable.
19
+
20
+ | Documento | Número | Reglas que lo citan |
21
+ |---|---|---|
22
+ | 各自由贸易协定原产地规则(协定文本,本次未取得) | 现行协定版本本次未核实 | OR-001, OR-002, OR-003, OR-004, OR-005, OR-006, OR-007 |
2
23
 
3
24
  **Boundary:** this plugin checks an **原产地判定台账** for arithmetic — that the agreement and product are
4
25
  declared, that regional value content equals (FOB − non-originating value) ÷ FOB × 100, that RVC meets the
package/README-hi.md CHANGED
@@ -1,4 +1,25 @@
1
- # dsh-origin-rvc-check
1
+ # dsh-origin-rvc-check — उद्गम-निर्धारण रजिस्टर के क्षेत्रीय मूल्य-अंश की जाँच
2
+
3
+ `dsh-origin-rvc-check` एक उद्गम-निर्धारण रजिस्टर (原产地判定台账) पढ़ता है — समझौते का हेडर और प्रत्येक सामग्री की एक पंक्ति — और उसी रजिस्टर के अपने अंकगणित की जाँच करता है: कि समझौता और उत्पाद घोषित हैं, कि क्षेत्रीय मूल्य-अंश (FOB − गैर-उद्गम सामग्री मूल्य) ÷ FOB × 100 के बराबर है, कि RVC आपकी निर्धारित सीमा तक पहुँचता है, कि प्रत्येक सामग्री अपना उद्गम बताती है, कि उद्गम मानदंड आपके समझौते की शब्दावली से आता है, कि सामग्री क्रमांक दोहराए नहीं गए हैं, और कि विवरण में कोई अप्रतिस्थापित प्लेसहोल्डर शेष नहीं है।
4
+
5
+ ## यह किन सवालों का जवाब देता है
6
+
7
+ | आपका सवाल | इसका जवाब |
8
+ |---|---|
9
+ | «区域价值成分» कॉलम में `70.00` लिखा है, पर उस पंक्ति का «净价值» `220` है और हेडर का FOB `400` — क्या यह पकड़ में आता है? | हाँ। `OR-002` «净价值» कॉलम और FOB से कटौती-सूत्र (FOB − गैर-उद्गम सामग्री मूल्य) ÷ FOB × 100 दोबारा जोड़ता है, 0.5 अंक की सहनशीलता के साथ, और घोषित RVC मेल न खाने पर वह पंक्ति दर्ज करता है। यह केवल अंकगणित करता है और कटौती पद्धति मान लेता है: जोड़ाई पद्धति से भरा रजिस्टर भी दर्ज होगा, चाहे उसकी अपनी परिपाटी सही हो — इसलिए `expression` बदलें या नियम बंद करें। RVC, «净价值» या FOB में से कोई संख्या के रूप में न पढ़ा जाए तो यह नियम चुपचाप पास होने के बजाय `skipped` में बताता है। |
10
+ | कहीं कोई सीमा तय नहीं है और सारी पंक्तियाँ पास हो गईं। क्या RVC की जाँच हुई ही? | नहीं। `OR-003` में `threshold: 0` है, यानी अनिर्धारित, इसलिए यह नियम चुपचाप पास होने के बजाय `skipped` में आता है। `threshold` को अपने समझौते का मान दें (जैसे `40`) तो उससे नीचे रहने वाली हर पंक्ति दर्ज होगी। कोई प्रविष्टि केवल यह बताती है कि मान «आपकी तय सीमा से नीचे» है, यह नहीं कि माल उद्गम-योग्य नहीं है — उद्गम पूर्णतः-प्राप्त या सीमा-वर्गीकरण-परिवर्तन मानदंडों से भी मिल सकता है, और RVC उनमें से केवल एक रास्ता है। |
11
+ | एक सामग्री पंक्ति में «原产国» खाली छोड़ दिया गया है। | `OR-004` हर उस पंक्ति को दर्ज करता है जिसमें «原产国» (उद्गम) कॉलम मौजूद है पर खाली है। यह केवल देखता है कि कोष्ठ भरा है; घोषित उद्गम सच है या नहीं, या उससे उद्गम-स्थिति प्रभावित होती है या नहीं, यह नहीं आँकता; जब रजिस्टर में उद्गम का कोई कॉलम ही न हो, तो यह नियम चुपचाप पास होने के बजाय बताता है कि वह लागू नहीं होता। |
12
+ | «原产地标准» कॉलम में ऐसा मान है जो मेरी सूची में नहीं है। | `OR-005` हर मान की तुलना पैक की `values` सूची से करता है। वह सूची खाली आती है — मानदंडों के नाम और संक्षेप हर समझौते में बदलते हैं और यह प्लगइन कोई भी नहीं लिखता — और तब यह नियम `skipped` में बताता है; `values` में अपने समझौते के मानदंड भरें (完全获得, CTC, RVC, 特定加工工序 …) तो सूची से बाहर का हर मान दर्ज होगा। यह केवल देखता है कि मान सूची में है, यह नहीं कि माल उस मानदंड को पूरा करता है। |
13
+ | एक ही «料件序号» दो पंक्तियों में आया है। | `OR-006` दोहराया गया «料件序号» (itemNo) दर्ज करता है और तुलना करते समय खाली स्थान छोड़ देता है। दोहराव से गैर-उद्गम सामग्री मूल्य दो बार जुड़ता है और इसलिए RVC गलत हो जाता है — यह उस तरह की खोट है जो सीधे गलत निष्कर्ष तक ले जाती है। यह दोहराव दर्ज करता है; दोनों में से कौन-सी पंक्ति गलत है, यह नहीं तय करता। |
14
+ | एक पंक्ति के «品名» कॉलम में अब भी `【待填】` लिखा है। | `OR-007` हर उस पंक्ति को दर्ज करता है जिसके «品名» (विवरण) में पैक के `terms` में से कोई प्लेसहोल्डर है: 【, 】, `{{`, `}}`, XXX, xxx, 待填, 待补充, TBD, todo, 示例. टेम्पलेट से उतारा रजिस्टर ऐसा लगता है मानो असली सामग्री की गिनती हो चुकी हो, और RVC ऐसी सामग्री-सूची पर बन जाता है जो है ही नहीं। यह केवल सूचीबद्ध शब्द खोजता है, इसलिए जो प्लेसहोल्डर किसी ने नहीं जोड़ा वह छूट जाता है; `terms` अपने टेम्पलेट के अनुसार बदला जा सकता है। |
15
+
16
+ ## यह किन मानकों पर आधारित है
17
+
18
+ यह नियम-पैक किसी सार्वजनिक मानक का उद्धरण नहीं देता: सत्यापन को किसी भी मुक्त व्यापार समझौते के उद्गम-नियमों का शब्दशः पाठ नहीं मिला, इसलिए हर नियम का `basis` यही बताता है, सभी `derived-from-principle` हैं और कोई भी `warn` या `info` से ऊपर नहीं जाता। जाँचें जिन पर टिकती हैं वे हैं रजिस्टर का अपना अंकगणित, और लागू समझौते के लिए आपके द्वारा निर्धारित RVC सीमा तथा मानदंड-शब्दावली।
19
+
20
+ | दस्तावेज़ | संख्यांक | इन्हें उद्धृत करने वाले नियम |
21
+ |---|---|---|
22
+ | 各自由贸易协定原产地规则(协定文本,本次未取得) | 现行协定版本本次未核实 | OR-001, OR-002, OR-003, OR-004, OR-005, OR-006, OR-007 |
2
23
 
3
24
  **Boundary:** this plugin checks an **原产地判定台账** for arithmetic — that the agreement and product are
4
25
  declared, that regional value content equals (FOB − non-originating value) ÷ FOB × 100, that RVC meets the
package/README-pt.md CHANGED
@@ -1,4 +1,25 @@
1
- # dsh-origin-rvc-check
1
+ # dsh-origin-rvc-check — Verificação do conteúdo de valor regional de um registo de determinação de origem
2
+
3
+ `dsh-origin-rvc-check` lê um registo de determinação de origem (原产地判定台账) —o cabeçalho do acordo mais uma linha por material— e verifica a aritmética desse próprio registo: que o acordo e o produto sejam declarados, que o conteúdo de valor regional seja igual a (FOB − valor dos materiais não originários) ÷ FOB × 100, que o RVC atinja o limiar que configura, que cada material indique a sua origem, que o critério de origem venha do vocabulário do seu acordo, que os números de material não se repitam e que não reste nenhum marcador de modelo por substituir na descrição.
4
+
5
+ ## O que ele responde
6
+
7
+ | Você pergunta | O que ele responde |
8
+ |---|---|
9
+ | A coluna «区域价值成分» diz `70.00`, mas o «净价值» da linha é `220` e o FOB do cabeçalho é `400`. Isso é detetado? | Sim. O `OR-002` recalcula a fórmula de dedução (FOB − valor dos materiais não originários) ÷ FOB × 100 a partir da coluna «净价值» e do FOB, com uma tolerância de 0,5 pontos, e assinala a linha quando o RVC declarado não coincide. Faz apenas a aritmética e assume o método de dedução: um registo calculado pelo método de acumulação é assinalado embora a sua convenção esteja correta, pelo que deve alterar `expression` ou desativar a regra. Se o RVC, o «净价值» ou o FOB não forem legíveis como número, a regra reporta-se em `skipped` em vez de passar em silêncio. |
10
+ | Não há nenhum limiar configurado e todas as linhas passaram. O RVC chegou a ser verificado? | Não. O `OR-003` traz `threshold: 0`, que significa não configurado, por isso a regra aparece em `skipped` em vez de passar em silêncio. Defina `threshold` com o valor do seu acordo (por exemplo `40`) e passará a assinalar cada linha cujo RVC fique abaixo dele. Uma ocorrência significa apenas «abaixo do limiar que definiu», não que as mercadorias não sejam originárias: a origem também pode ser obtida por critérios de totalmente obtido ou de mudança de classificação pautal, e o RVC é apenas um dos caminhos. |
11
+ | Uma linha de material deixa «原产国» em branco. | O `OR-004` assinala cada linha em que a coluna «原产国» (origem) existe mas está vazia. Verifica apenas que a célula está preenchida, não se a origem declarada é verdadeira nem se afeta o estatuto de originário; quando o material não tem qualquer coluna de origem, a regra reporta que não se aplica em vez de passar em silêncio. |
12
+ | A coluna «原产地标准» tem um valor que não está na minha lista. | O `OR-005` compara cada valor com a lista `values` do pacote. Essa lista vem vazia —os nomes e abreviaturas dos critérios mudam com cada acordo e o plugin não codifica nenhum— e a regra reporta-se então em `skipped`; preencha `values` com os critérios do seu acordo (完全获得, CTC, RVC, 特定加工工序 …) e qualquer valor fora dela passa a ser assinalado. Verifica apenas se o valor consta da lista, não se as mercadorias cumprem esse critério. |
13
+ | O mesmo «料件序号» aparece em duas linhas. | O `OR-006` assinala um «料件序号» (itemNo) repetido, comparando os valores sem considerar espaços. Uma repetição conta duas vezes o valor dos materiais não originários e, por isso, corrompe o RVC — é o tipo de defeito que conduz diretamente a uma conclusão errada. Reporta a repetição e não decide qual das duas linhas está mal. |
14
+ | A coluna «品名» de uma linha ainda diz `【待填】`. | O `OR-007` assinala qualquer linha cujo «品名» (descrição) contenha um dos `terms` do pacote: 【, 】, `{{`, `}}`, XXX, xxx, 待填, 待补充, TBD, todo, 示例. Um registo copiado de um modelo parece ter inventariado materiais reais, e o RVC acaba calculado sobre uma lista de materiais que não existe. Só procura os termos listados, pelo que um marcador que ninguém incluiu passa; `terms` ajusta-se ao seu próprio modelo. |
15
+
16
+ ## Normas que segue
17
+
18
+ Este pacote de regras não cita nenhuma norma pública: a verificação não obteve o texto literal das regras de origem de nenhum acordo de comércio livre, pelo que o `basis` de cada regra o diz, todas são `derived-from-principle` e nenhuma passa de `warn` ou `info`. Aquilo em que as verificações se apoiam é na aritmética do próprio registo e no limiar de RVC e no vocabulário de critérios que configurar para o acordo aplicável.
19
+
20
+ | Documento | Número | Regras que o citam |
21
+ |---|---|---|
22
+ | 各自由贸易协定原产地规则(协定文本,本次未取得) | 现行协定版本本次未核实 | OR-001, OR-002, OR-003, OR-004, OR-005, OR-006, OR-007 |
2
23
 
3
24
  **Boundary:** this plugin checks an **原产地判定台账** for arithmetic — that the agreement and product are
4
25
  declared, that regional value content equals (FOB − non-originating value) ÷ FOB × 100, that RVC meets the
package/README-zh.md CHANGED
@@ -1,4 +1,25 @@
1
- # dsh-origin-rvc-check
1
+ # dsh-origin-rvc-check — 原产地区域价值成分核对
2
+
3
+ `dsh-origin-rvc-check` 读取一份原产地判定台账——表头写明协定与产品,每种料件一行——核对这份台账自身的算术:协定与产品是否声明、区域价值成分是否等于 (FOB − 非原产材料价值) ÷ FOB × 100、RVC 是否达到你配置的门槛、每条料件是否填写原产国、原产地标准是否出自你所适用协定的口径、料件序号是否唯一、品名栏是否残留未替换的占位符。
4
+
5
+ ## 它回答什么问题
6
+
7
+ | 你会问 | 它怎么答 |
8
+ |---|---|
9
+ | 「区域价值成分」栏填的是 `70.00`,但该行「净价值」是 `220`、表头 FOB 是 `400`,这种情况查得出来吗? | 查得出来。`OR-002` 拿「净价值」栏与 FOB 按扣减法 (FOB − 非原产材料价值) ÷ FOB × 100 重算,容差 0.5 个百分点,填报值与之不符即逐行报出。它只做算术,而且按扣减法核对:台账若按累加法填写,即使口径本身正确也会被报出差异,此时请改 `expression` 或停用本条。RVC、净价值、FOB 有一项读不成数值时,本条报告「无法执行」,不会静默通过。 |
10
+ | 台账里没有任何地方设置门槛,结果每行都通过了——它到底核对了 RVC 没有? | 没有。`OR-003` 的 `threshold` 出厂为 `0`,表示未配置,本条会报在 `skipped` 里,而不是静默通过。把它改成你所适用协定的门槛(例如 `40`),低于该值的行才会被报出。命中只表示「低于你配置的门槛」,**不表示**该货物不具备原产资格——原产资格还可以由完全获得、税则归类改变等标准取得,RVC 只是其中一条路径。 |
11
+ | 有一行料件的「原产国」栏是空的。 | `OR-004` 会报出「原产国」栏存在但为空的每一行。它只核对这一栏是否填写,不判断申报的原产国是否真实、是否会影响原产资格;台账里根本没有原产国这一栏时,本条报告「不适用」,而不是静默通过。 |
12
+ | 「原产地标准」栏填了一个不在我清单里的值。 | `OR-005` 拿它和规则库的 `values` 逐个比对。`values` 出厂为空——原产地标准的名称与缩写随协定变化,本插件不硬编码——此时本条报告「无法执行」;把 `values` 填成你所适用协定的口径(完全获得、CTC、RVC、特定加工工序等)后,不在册的值即被报出。它只核对所填值是否在册,不判断该批货物是否满足该标准。 |
13
+ | 同一个「料件序号」出现在两行上。 | `OR-006` 会报出重复的「料件序号」,比较时忽略空白字符。序号重复会让非原产材料价值被重复计入合计,进而使 RVC 算错——这是会直接导致错误结论的那类缺陷。它只报出重复;两行中哪一行填错了,它不判断。 |
14
+ | 有一行的「品名」栏还写着 `【待填】`。 | `OR-007` 会报出品名中含规则库 `terms` 所列占位符的行——【、】、`{{`、`}}`、XXX、xxx、待填、待补充、TBD、todo、示例。照抄模板的台账看上去像已经盘点了实际料件,而 RVC 会算在一份并不存在的料件清单上。它只找列出的这些词,清单之外的占位符会漏过;`terms` 可按本机构模板调整。 |
15
+
16
+ ## 依据的标准
17
+
18
+ 本规则库不引用任何公开标准:核查未取得任何自由贸易协定原产地规则的逐字条文,因此每条规则的 `basis` 都如实写明这一点,`kind` 一律为 derived-from-principle、严重度封顶 `warn` 或 `info`。它依据的是台账自身的算术自洽,以及你按适用协定配置的 RVC 门槛与原产地标准口径。
19
+
20
+ | 文件 | 文号 | 引用它的规则 |
21
+ |---|---|---|
22
+ | 各自由贸易协定原产地规则(协定文本,本次未取得) | 现行协定版本本次未核实 | OR-001, OR-002, OR-003, OR-004, OR-005, OR-006, OR-007 |
2
23
 
3
24
  **Boundary:** this plugin checks an **原产地判定台账** for arithmetic — that the agreement and product are
4
25
  declared, that regional value content equals (FOB − non-originating value) ÷ FOB × 100, that RVC meets the
package/README.md CHANGED
@@ -1,4 +1,25 @@
1
- # dsh-origin-rvc-check
1
+ # dsh-origin-rvc-check — Regional value content check for an origin determination register
2
+
3
+ `dsh-origin-rvc-check` reads one origin determination register (原产地判定台账) — the agreement header plus one row per material — and checks that register's own arithmetic: that the agreement and product are declared, that regional value content equals (FOB − non-originating value) ÷ FOB × 100, that RVC meets the threshold you configure, that every material states its origin, that the origin criterion comes from your agreement's vocabulary, that material numbers are unique, and that no unreplaced placeholder survives in the description.
4
+
5
+ ## What it answers
6
+
7
+ | You ask | What it answers |
8
+ |---|---|
9
+ | The 区域价值成分 column says `70.00`, but the row's 净价值 is `220` and the header's FOB is `400`. Is that caught? | Yes. `OR-002` recomputes the build-down formula (FOB − non-originating value) ÷ FOB × 100 from the 净价值 column and FOB, with a 0.5-point tolerance, and reports the row when the declared RVC differs. It does only the arithmetic, and it assumes the build-down method: a register filled in by the build-up method is reported although its own convention is right, so change `expression` or disable the rule. If the RVC, the 净价值 or the FOB cannot be read as a number, the rule reports itself in `skipped` instead of passing silently. |
10
+ | No threshold is set anywhere, and every row passed. Did it check the RVC at all? | No. `OR-003` ships with `threshold: 0`, which means unconfigured, so the rule reports itself in `skipped` rather than passing silently. Set `threshold` to your agreement's figure (for example `40`) and it reports each row whose RVC falls below it. A finding means only “below the threshold you set” — not that the goods are not originating, because origin can also be earned through wholly-obtained or tariff-classification-change criteria; RVC is only one path. |
11
+ | One material row leaves 原产国 blank. | `OR-004` reports every row whose 原产国 (origin) column is present but empty. It checks only that the cell is filled, not whether the declared origin is true or whether it affects origin status; when the material carries no origin column at all, the rule reports that it does not apply instead of passing silently. |
12
+ | The 原产地标准 column holds a value that is not in my list. | `OR-005` compares each value with the pack's `values` list. That list ships empty — criterion names and abbreviations differ per agreement, so the plugin hard-codes none — and the rule then reports itself in `skipped`; fill `values` with your agreement's criteria (完全获得, CTC, RVC, 特定加工工序 …) and any value not on it is reported. It checks only that the value is on the list, not that the goods satisfy that criterion. |
13
+ | The same 料件序号 appears on two rows. | `OR-006` reports a repeated 料件序号 (itemNo), comparing the values with whitespace ignored. A duplicate double-counts the non-originating material value and therefore corrupts the RVC — this is the kind of defect that leads straight to a wrong conclusion. It reports the repetition; which of the two rows is wrong is not something it decides. |
14
+ | The 品名 column still reads `【待填】` for one material. | `OR-007` reports a row whose 品名 (description) contains any of the pack's `terms` — 【, 】, `{{`, `}}`, XXX, xxx, 待填, 待补充, TBD, todo, 示例. A register copied from a template looks as if the materials had been counted, and the RVC then rests on a list of materials that does not exist. Only the listed terms are looked for, so a placeholder nobody listed passes; `terms` follows your own template. |
15
+
16
+ ## Standards it follows
17
+
18
+ This rule pack cites no public standard: the verification pass obtained no verbatim text from any free trade agreement's rules of origin, so every rule's `basis` says so, each is `derived-from-principle` and none rises above `warn` or `info`. What the checks rest on instead is the register's own arithmetic, plus the RVC threshold and the criterion vocabulary you configure for the agreement that applies.
19
+
20
+ | Document | Number | Cited by rules |
21
+ |---|---|---|
22
+ | 各自由贸易协定原产地规则(协定文本,本次未取得) | 现行协定版本本次未核实 | OR-001, OR-002, OR-003, OR-004, OR-005, OR-006, OR-007 |
2
23
 
3
24
  **Boundary:** this plugin checks an **原产地判定台账** for arithmetic — that the agreement and product are
4
25
  declared, that regional value content equals (FOB − non-originating value) ÷ FOB × 100, that RVC meets the
package/SECURITY.md ADDED
@@ -0,0 +1,39 @@
1
+ # Security Policy
2
+
3
+ ## Reporting a vulnerability
4
+
5
+ Please report security vulnerabilities **privately** through GitHub's private
6
+ vulnerability reporting:
7
+
8
+ **Security → Report a vulnerability** at
9
+ https://github.com/PerryLink/dsh-origin-rvc-check/security/advisories/new
10
+
11
+ Do **not** open a public issue for security findings.
12
+
13
+ Before reporting, **sanitize everything you paste**: remove tokens, API keys,
14
+ credentials, authorization headers, session contents, and personal data. Logs
15
+ without secrets only.
16
+
17
+ ## Scope note
18
+
19
+ This plugin is an offline checker. It reads the material you hand it and
20
+ compares it against a versioned rule pack; it makes no network calls and no
21
+ model calls, and it stores nothing.
22
+
23
+ ## What to include
24
+
25
+ - affected package version (and DeepSeek Harness runtime version)
26
+ - a minimal reproduction
27
+ - your impact assessment
28
+
29
+ ## Response expectations
30
+
31
+ - acknowledgement within **7 days**
32
+ - status updates at least every **14 days** until resolution
33
+ - coordinated disclosure: the fix and advisory are prepared first; the finding
34
+ is disclosed publicly after the fix ships
35
+
36
+ ## Credits and disclosure
37
+
38
+ - reporters are credited in the advisory and CHANGELOG unless they ask to stay anonymous
39
+ - advisories follow GitHub's advisory workflow and are published together with the fix
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-origin-rvc-check",
3
- "version": "0.2.0",
3
+ "version": "0.2.2",
4
4
  "description": "原产地区域价值成分核对(按 RVC 定义式与门槛核对原产地判定自洽,仅提示差异,不作出定性结论)",
5
5
  "type": "module",
6
6
  "main": "lib/index.mjs",
@@ -23,7 +23,9 @@
23
23
  "README-hi.md",
24
24
  "locale/*.json",
25
25
  "icon.svg",
26
- "rules"
26
+ "rules",
27
+ "CHANGELOG.md",
28
+ "SECURITY.md"
27
29
  ],
28
30
  "scripts": {
29
31
  "build": "tsdown",
@@ -32,7 +34,7 @@
32
34
  "verify:self-contained": "node scripts/verify-self-contained.mjs",
33
35
  "check:lockfile": "node scripts/check-lockfile-drift.mjs",
34
36
  "check:readmes": "node scripts/check-readme-sync.mjs",
35
- "prepublishOnly": "pnpm run typecheck && pnpm test && pnpm run build && pnpm run verify:self-contained && pnpm run check:readmes && pnpm run check:citations",
37
+ "prepublishOnly": "pnpm run typecheck && pnpm test && pnpm run build && pnpm run verify:self-contained && pnpm run check:lockfile && pnpm run check:readmes && pnpm run check:citations",
36
38
  "prepare": "tsdown",
37
39
  "check:citations": "node scripts/check-citations.mjs"
38
40
  },