From 1f206ee459663ee7fa61f2cd8fefcf303d94a0b1 Mon Sep 17 00:00:00 2001 From: nearlyforget Date: Wed, 11 Feb 2026 02:22:47 +0000 Subject: [PATCH 1/7] chore: add pre-commit configuration and CI --- .github/workflows/pre-commit.yml | 16 +++++++++++++++ .pre-commit-config.yaml | 34 ++++++++++++++++++++++++++++++++ 2 files changed, 50 insertions(+) create mode 100644 .github/workflows/pre-commit.yml create mode 100644 .pre-commit-config.yaml diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml new file mode 100644 index 0000000..77a0916 --- /dev/null +++ b/.github/workflows/pre-commit.yml @@ -0,0 +1,16 @@ +name: pre-commit + +on: + pull_request: + push: + branches: [main] + +jobs: + pre-commit: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 + with: + python-version: "3.12" + - uses: pre-commit/action@v3.0.1 diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000..6c5c1b1 --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,34 @@ +exclude: '^(\.github/|\.vscode/|node_modules/).*|CODE_OF_CONDUCT\.md|CHANGELOG\.md' + +repos: + - repo: https://github.com/pre-commit/pre-commit-hooks + rev: v6.0.0 + hooks: + - id: trailing-whitespace + - id: end-of-file-fixer + - id: check-yaml + args: [--unsafe] + - id: check-json + - id: check-added-large-files + - id: check-shebang-scripts-are-executable + - id: check-executables-have-shebangs + - repo: https://github.com/astral-sh/ruff-pre-commit + rev: v0.14.13 + hooks: + - id: ruff + args: [--fix, --exit-non-zero-on-fix] + - id: ruff-format + - repo: https://github.com/pre-commit/mirrors-prettier + rev: v4.0.0-alpha.8 + hooks: + - id: prettier + files: \.(json|md|yaml|yml)$ + - repo: https://github.com/koalaman/shellcheck-precommit + rev: v0.10.0 + hooks: + - id: shellcheck + args: ["-e", "SC1091", "-e", "SC2086"] + - repo: https://github.com/codespell-project/codespell + rev: v2.4.1 + hooks: + - id: codespell From 23939a742895d41acf3e1fed87d2bc18c07d3406 Mon Sep 17 00:00:00 2001 From: nearlyforget Date: Wed, 11 Feb 2026 02:23:35 +0000 Subject: [PATCH 2/7] style: apply pre-commit fixes --- .../b801eec0ff555c12f33f42153e8ab71443ed6fcb.json | 1 + 1 file changed, 1 insertion(+) create mode 100644 node_modules/.cache/prettier/.prettier-caches/b801eec0ff555c12f33f42153e8ab71443ed6fcb.json diff --git a/node_modules/.cache/prettier/.prettier-caches/b801eec0ff555c12f33f42153e8ab71443ed6fcb.json b/node_modules/.cache/prettier/.prettier-caches/b801eec0ff555c12f33f42153e8ab71443ed6fcb.json new file mode 100644 index 0000000..01a86e0 --- /dev/null +++ b/node_modules/.cache/prettier/.prettier-caches/b801eec0ff555c12f33f42153e8ab71443ed6fcb.json @@ -0,0 +1 @@ +{"c0968edc39f7fcc703af9647b0049e77b8c17567":{"files":{"README.md":["cMKurCU3dYTw+gP2IQEsa+PmQiQ=",true],"test_data/flower_shop/conformance_input.json":["Tiqut5cfOvutE+/NqR6xQ9kDm0k=",true],".pre-commit-config.yaml":["n5V1upFLbMqNyZeGPzHpSzOxHZI=",true],".cspell.json":["E2KgeZikqEW+snR8lkdyhk+ulxw=",true]},"modified":1770776563261}} \ No newline at end of file From 55f7b3a2e5d93d3a04f393bd819ae13f27df1499 Mon Sep 17 00:00:00 2001 From: nearlyforget Date: Wed, 11 Feb 2026 02:47:32 +0000 Subject: [PATCH 3/7] chore: remove accidental node_modules tracking --- .../b801eec0ff555c12f33f42153e8ab71443ed6fcb.json | 1 - 1 file changed, 1 deletion(-) delete mode 100644 node_modules/.cache/prettier/.prettier-caches/b801eec0ff555c12f33f42153e8ab71443ed6fcb.json diff --git a/node_modules/.cache/prettier/.prettier-caches/b801eec0ff555c12f33f42153e8ab71443ed6fcb.json b/node_modules/.cache/prettier/.prettier-caches/b801eec0ff555c12f33f42153e8ab71443ed6fcb.json deleted file mode 100644 index 01a86e0..0000000 --- a/node_modules/.cache/prettier/.prettier-caches/b801eec0ff555c12f33f42153e8ab71443ed6fcb.json +++ /dev/null @@ -1 +0,0 @@ -{"c0968edc39f7fcc703af9647b0049e77b8c17567":{"files":{"README.md":["cMKurCU3dYTw+gP2IQEsa+PmQiQ=",true],"test_data/flower_shop/conformance_input.json":["Tiqut5cfOvutE+/NqR6xQ9kDm0k=",true],".pre-commit-config.yaml":["n5V1upFLbMqNyZeGPzHpSzOxHZI=",true],".cspell.json":["E2KgeZikqEW+snR8lkdyhk+ulxw=",true]},"modified":1770776563261}} \ No newline at end of file From 92142c0042c831f3bbad1f6b98bd8dcda05d12ab Mon Sep 17 00:00:00 2001 From: nearlyforget Date: Wed, 11 Feb 2026 03:30:22 +0000 Subject: [PATCH 4/7] chore: add 'spellcheck' to custom dictionary --- .cspell/custom-words.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.cspell/custom-words.txt b/.cspell/custom-words.txt index 16af9a4..2d9e222 100644 --- a/.cspell/custom-words.txt +++ b/.cspell/custom-words.txt @@ -74,6 +74,8 @@ renderable repudiable schemas sdjwt +shellcheck +codespell shopify superfences vulnz From 5ff84771e6ed872841574416b129fdb3f9088466 Mon Sep 17 00:00:00 2001 From: nearlyforget Date: Wed, 11 Feb 2026 05:11:23 +0000 Subject: [PATCH 5/7] chore: add license headers to config files --- .github/workflows/pre-commit.yml | 14 ++++++++++++++ .pre-commit-config.yaml | 14 ++++++++++++++ 2 files changed, 28 insertions(+) diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml index 77a0916..68bdb05 100644 --- a/.github/workflows/pre-commit.yml +++ b/.github/workflows/pre-commit.yml @@ -1,3 +1,17 @@ +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + name: pre-commit on: diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 6c5c1b1..d653dcf 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,3 +1,17 @@ +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + exclude: '^(\.github/|\.vscode/|node_modules/).*|CODE_OF_CONDUCT\.md|CHANGELOG\.md' repos: From dd27d3762eb96e6ed68823d894b71d4ab4f799df Mon Sep 17 00:00:00 2001 From: nearlyforget Date: Tue, 17 Feb 2026 21:24:35 +0000 Subject: [PATCH 6/7] chore: fix pre-commit issues --- .cspell.json | 6 +++--- LICENSE | 2 +- .../b801eec0ff555c12f33f42153e8ab71443ed6fcb.json | 1 + test_data/flower_shop/discounts.csv | 2 +- test_data/flower_shop/products.csv | 2 +- 5 files changed, 7 insertions(+), 6 deletions(-) create mode 100644 node_modules/.cache/prettier/.prettier-caches/b801eec0ff555c12f33f42153e8ab71443ed6fcb.json diff --git a/.cspell.json b/.cspell.json index 63d71da..dc09c20 100644 --- a/.cspell.json +++ b/.cspell.json @@ -15,9 +15,9 @@ ], "dictionaryDefinitions": [ { - "name": "custom-words", - "path": ".cspell/custom-words.txt", - "addWords": true + "name": "custom-words", + "path": ".cspell/custom-words.txt", + "addWords": true } ], "dictionaries": [ diff --git a/LICENSE b/LICENSE index 7a4a3ea..d645695 100644 --- a/LICENSE +++ b/LICENSE @@ -199,4 +199,4 @@ distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and - limitations under the License. \ No newline at end of file + limitations under the License. diff --git a/node_modules/.cache/prettier/.prettier-caches/b801eec0ff555c12f33f42153e8ab71443ed6fcb.json b/node_modules/.cache/prettier/.prettier-caches/b801eec0ff555c12f33f42153e8ab71443ed6fcb.json new file mode 100644 index 0000000..f477e3f --- /dev/null +++ b/node_modules/.cache/prettier/.prettier-caches/b801eec0ff555c12f33f42153e8ab71443ed6fcb.json @@ -0,0 +1 @@ +{"c0968edc39f7fcc703af9647b0049e77b8c17567":{"files":{"README.md":["cMKurCU3dYTw+gP2IQEsa+PmQiQ=",true],"test_data/flower_shop/conformance_input.json":["Tiqut5cfOvutE+/NqR6xQ9kDm0k=",true],".pre-commit-config.yaml":["ZGvFTXK176Z4a9VcR8MU5IJOEcc=",true],".cspell.json":["E2KgeZikqEW+snR8lkdyhk+ulxw=",true],"SECURITY.md":["J52i8VInV3D4WipivUwPs2q1B+0=",true],"shopping-agent-test.json":["ZdY9j1TAmLkvrSCM3/Z5Ahhg6eg=",true]},"modified":1771363425973}} \ No newline at end of file diff --git a/test_data/flower_shop/discounts.csv b/test_data/flower_shop/discounts.csv index cf8bedd..9d613df 100644 --- a/test_data/flower_shop/discounts.csv +++ b/test_data/flower_shop/discounts.csv @@ -1,4 +1,4 @@ code,type,value,description 10OFF,percentage,10,10% Off WELCOME20,percentage,20,20% Off -FIXED500,fixed_amount,500,$5.00 Off \ No newline at end of file +FIXED500,fixed_amount,500,$5.00 Off diff --git a/test_data/flower_shop/products.csv b/test_data/flower_shop/products.csv index dcf6a4a..5182012 100644 --- a/test_data/flower_shop/products.csv +++ b/test_data/flower_shop/products.csv @@ -4,4 +4,4 @@ pot_ceramic,Ceramic Pot,1500,https://example.com/pot.jpg bouquet_sunflowers,Sunflower Bundle,2500,https://example.com/sunflowers.jpg bouquet_tulips,Spring Tulips,3000,https://example.com/tulips.jpg orchid_white,White Orchid,4500,https://example.com/orchid.jpg -gardenias,Gardenias,2000,https://example.com/gardenias.jpg \ No newline at end of file +gardenias,Gardenias,2000,https://example.com/gardenias.jpg From d21631636163294a70abc48de550e557cda72512 Mon Sep 17 00:00:00 2001 From: nearlyforget Date: Tue, 17 Feb 2026 21:29:58 +0000 Subject: [PATCH 7/7] chore: ensure node_modules are ignored and removed from index --- .gitignore | 1 + .../b801eec0ff555c12f33f42153e8ab71443ed6fcb.json | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) delete mode 100644 node_modules/.cache/prettier/.prettier-caches/b801eec0ff555c12f33f42153e8ab71443ed6fcb.json diff --git a/.gitignore b/.gitignore index e10ddfd..1ebcbb4 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ .ruff_cache uv.lock .venv +node_modules/ diff --git a/node_modules/.cache/prettier/.prettier-caches/b801eec0ff555c12f33f42153e8ab71443ed6fcb.json b/node_modules/.cache/prettier/.prettier-caches/b801eec0ff555c12f33f42153e8ab71443ed6fcb.json deleted file mode 100644 index f477e3f..0000000 --- a/node_modules/.cache/prettier/.prettier-caches/b801eec0ff555c12f33f42153e8ab71443ed6fcb.json +++ /dev/null @@ -1 +0,0 @@ -{"c0968edc39f7fcc703af9647b0049e77b8c17567":{"files":{"README.md":["cMKurCU3dYTw+gP2IQEsa+PmQiQ=",true],"test_data/flower_shop/conformance_input.json":["Tiqut5cfOvutE+/NqR6xQ9kDm0k=",true],".pre-commit-config.yaml":["ZGvFTXK176Z4a9VcR8MU5IJOEcc=",true],".cspell.json":["E2KgeZikqEW+snR8lkdyhk+ulxw=",true],"SECURITY.md":["J52i8VInV3D4WipivUwPs2q1B+0=",true],"shopping-agent-test.json":["ZdY9j1TAmLkvrSCM3/Z5Ahhg6eg=",true]},"modified":1771363425973}} \ No newline at end of file