| index 9312b4a..aff9a19 100644 | ||
| --- a/Makefile | ||
| +++ b/Makefile | ||
| @@ -32,6 +32,13 @@ ARM_CC ?= aarch64-linux-gnu-gcc | ||
| 32 | 32 | WIN_CC ?= x86_64-w64-mingw32-gcc |
| 33 | 33 | |
| 34 | 34 | SRC_C := $(wildcard src/*.c) |
| 35 | +# Every header is a prerequisite too. Without them a one-line edit to | |
| 36 | +# src/ws.h (a version bump, a provider id, a buffer size) left `make` | |
| 37 | +# reporting "Nothing to be done" and the *previous* binary in place - the | |
| 38 | +# build says success and the artefact is stale, which is the failure mode | |
| 39 | +# this project keeps paying for. vendor/ headers are included because the | |
| 40 | +# TLS and JSON sources are compiled straight from that tree. | |
| 41 | +HDR := $(wildcard src/*.h) $(wildcard vendor/*.h) $(wildcard vendor/bearssl/*.h) | |
| 35 | 42 | VENDOR_C := $(wildcard vendor/*.c) $(wildcard vendor/bearssl/*.c) |
| 36 | 43 | UI_SRC := src/ui.html |
| 37 | 44 | UI_HDR := src/ui_html.h |
| @@ -53,32 +60,32 @@ ui: $(UI_HDR) | ||
| 53 | 60 | |
| 54 | 61 | native: $(BIN) |
| 55 | 62 | |
| 56 | -$(BIN): $(SRC_C) $(UI_HDR) $(VENDOR_C) | |
| 63 | +$(BIN): $(SRC_C) $(HDR) $(UI_HDR) $(VENDOR_C) | |
| 57 | 64 | @echo "==> native build ($(CC))" |
| 58 | 65 | $(CC) $(CFLAGS) -o $(BIN) $(SRC_C) $(VENDOR_C) |
| 59 | 66 | |
| 60 | 67 | musl: $(BIN).musl |
| 61 | -$(BIN).musl: $(SRC_C) $(UI_HDR) $(VENDOR_C) | |
| 68 | +$(BIN).musl: $(SRC_C) $(HDR) $(UI_HDR) $(VENDOR_C) | |
| 62 | 69 | @echo "==> static musl build ($(MUSL_CC))" |
| 63 | 70 | $(MUSL_CC) $(CFLAGS) -static -fno-strict-aliasing -o $@ $(SRC_C) $(VENDOR_C) |
| 64 | 71 | |
| 65 | 72 | arm64: $(BIN).arm64 |
| 66 | -$(BIN).arm64: $(SRC_C) $(UI_HDR) $(VENDOR_C) | |
| 73 | +$(BIN).arm64: $(SRC_C) $(HDR) $(UI_HDR) $(VENDOR_C) | |
| 67 | 74 | @echo "==> static arm64 build ($(ARM_CC))" |
| 68 | 75 | $(ARM_CC) $(CFLAGS) -static -fno-strict-aliasing -o $@ $(SRC_C) $(VENDOR_C) |
| 69 | 76 | |
| 70 | 77 | win64: $(EXE) |
| 71 | -$(EXE): $(SRC_C) $(UI_HDR) $(VENDOR_C) | |
| 78 | +$(EXE): $(SRC_C) $(HDR) $(UI_HDR) $(VENDOR_C) | |
| 72 | 79 | @echo "==> MinGW-w64 build ($(WIN_CC))" |
| 73 | 80 | $(WIN_CC) $(CFLAGS) -static -D_WIN32_WINNT=0x0601 -fno-strict-aliasing \ |
| 74 | 81 | -o $@ $(SRC_C) $(VENDOR_C) $(WIN_LIBS) |
| 75 | 82 | |
| 76 | -macos: $(SRC_C) $(UI_HDR) $(VENDOR_C) | |
| 83 | +macos: $(SRC_C) $(HDR) $(UI_HDR) $(VENDOR_C) | |
| 77 | 84 | @echo "==> Apple clang build" |
| 78 | 85 | $(CC) $(CFLAGS) -fno-strict-aliasing -o $(BIN) $(SRC_C) $(VENDOR_C) |
| 79 | 86 | |
| 80 | 87 | asan: $(BIN)-asan |
| 81 | -$(BIN)-asan: $(SRC_C) $(UI_HDR) $(VENDOR_C) | |
| 88 | +$(BIN)-asan: $(SRC_C) $(HDR) $(UI_HDR) $(VENDOR_C) | |
| 82 | 89 | @echo "==> ASan + UBSan + FORTIFY build" |
| 83 | 90 | $(CC) -O1 -g $(STD) $(WARN) $(INCLUDES) -D_FORTIFY_SOURCE=2 \ |
| 84 | 91 | -fsanitize=address,undefined -fno-omit-frame-pointer \ |
| index e169b42..786c1d9 100644 | ||
| --- a/plugin.json | ||
| +++ b/plugin.json | ||
| @@ -11,7 +11,7 @@ | ||
| 11 | 11 | "menus": false, |
| 12 | 12 | "verified": "mock", |
| 13 | 13 | "category": "network", |
| 14 | - "version": "1.0.2", | |
| 14 | + "version": "1.0.3", | |
| 15 | 15 | "license": "MIT", |
| 16 | 16 | "capabilities": [ |
| 17 | 17 | "outbound_https_search_api", |
| index 8301ad0..14ac690 100644 | ||
| --- a/src/ws.h | ||
| +++ b/src/ws.h | ||
| @@ -32,7 +32,7 @@ | ||
| 32 | 32 | |
| 33 | 33 | #define WS_SLUG "websearch" |
| 34 | 34 | #define WS_ID "plugin_websearch" |
| 35 | -#define WS_VER "1.0.2" | |
| 35 | +#define WS_VER "1.0.3" | |
| 36 | 36 | #define WS_NAME "websearch" |
| 37 | 37 | #define WS_DESC "Web search MCP" |
| 38 | 38 |
| index f114706..7bda96b 100755 | ||
| --- a/tests/run.sh | ||
| +++ b/tests/run.sh | ||
| @@ -399,6 +399,16 @@ else fail "require_node_auth() is not called"; fi | ||
| 399 | 399 | if python3 tools/gen_ui.py --check >/dev/null 2>&1; then |
| 400 | 400 | pass "src/ui_html.h matches src/ui.html" |
| 401 | 401 | else fail "src/ui_html.h is stale (run make ui)"; fi |
| 402 | +# A one-line header edit must force a rebuild. `make` used to treat only | |
| 403 | +# src/*.c and the generated UI header as prerequisites, so a version bump in | |
| 404 | +# src/ws.h left "Nothing to be done" and the previous binary in place - the | |
| 405 | +# build reported success with a stale artefact (the failure this project | |
| 406 | +# keeps paying for). Pin the rule, not the belief. | |
| 407 | +if grep -q '^HDR ' Makefile && grep -q '\$(HDR)' Makefile; then | |
| 408 | + pass "Makefile makes every header a rebuild prerequisite" | |
| 409 | +else | |
| 410 | + fail "Makefile does not depend on src/*.h - a header edit would not rebuild" | |
| 411 | +fi | |
| 402 | 412 | |
| 403 | 413 | # --------------------------------------------------------------- summary |
| 404 | 414 | printf '\n%s== summary ==%s\n' "$C_B" "$C_0" |
| 405 | 415 |
| index 9312b4a..aff9a19 100644 | index 9312b4a..aff9a19 100644 | ||
| --- a/Makefile | --- a/Makefile | ||
| +++ b/Makefile | +++ b/Makefile | ||
| @@ -32,6 +32,13 @@ ARM_CC ?= aarch64-linux-gnu-gcc | @@ -32,6 +32,13 @@ ARM_CC ?= aarch64-linux-gnu-gcc | ||
| 32 | WIN_CC ?= x86_64-w64-mingw32-gcc | 32 | WIN_CC ?= x86_64-w64-mingw32-gcc |
| 33 | 33 | ||
| 34 | SRC_C := $(wildcard src/*.c) | 34 | SRC_C := $(wildcard src/*.c) |
| 35 | +# Every header is a prerequisite too. Without them a one-line edit to | ||
| 36 | +# src/ws.h (a version bump, a provider id, a buffer size) left `make` | ||
| 37 | +# reporting "Nothing to be done" and the *previous* binary in place - the | ||
| 38 | +# build says success and the artefact is stale, which is the failure mode | ||
| 39 | +# this project keeps paying for. vendor/ headers are included because the | ||
| 40 | +# TLS and JSON sources are compiled straight from that tree. | ||
| 41 | +HDR := $(wildcard src/*.h) $(wildcard vendor/*.h) $(wildcard vendor/bearssl/*.h) | ||
| 35 | VENDOR_C := $(wildcard vendor/*.c) $(wildcard vendor/bearssl/*.c) | 42 | VENDOR_C := $(wildcard vendor/*.c) $(wildcard vendor/bearssl/*.c) |
| 36 | UI_SRC := src/ui.html | 43 | UI_SRC := src/ui.html |
| 37 | UI_HDR := src/ui_html.h | 44 | UI_HDR := src/ui_html.h |
| @@ -53,32 +60,32 @@ ui: $(UI_HDR) | @@ -53,32 +60,32 @@ ui: $(UI_HDR) | ||
| 53 | 60 | ||
| 54 | native: $(BIN) | 61 | native: $(BIN) |
| 55 | 62 | ||
| 56 | -$(BIN): $(SRC_C) $(UI_HDR) $(VENDOR_C) | 63 | +$(BIN): $(SRC_C) $(HDR) $(UI_HDR) $(VENDOR_C) |
| 57 | @echo "==> native build ($(CC))" | 64 | @echo "==> native build ($(CC))" |
| 58 | $(CC) $(CFLAGS) -o $(BIN) $(SRC_C) $(VENDOR_C) | 65 | $(CC) $(CFLAGS) -o $(BIN) $(SRC_C) $(VENDOR_C) |
| 59 | 66 | ||
| 60 | musl: $(BIN).musl | 67 | musl: $(BIN).musl |
| 61 | -$(BIN).musl: $(SRC_C) $(UI_HDR) $(VENDOR_C) | 68 | +$(BIN).musl: $(SRC_C) $(HDR) $(UI_HDR) $(VENDOR_C) |
| 62 | @echo "==> static musl build ($(MUSL_CC))" | 69 | @echo "==> static musl build ($(MUSL_CC))" |
| 63 | $(MUSL_CC) $(CFLAGS) -static -fno-strict-aliasing -o $@ $(SRC_C) $(VENDOR_C) | 70 | $(MUSL_CC) $(CFLAGS) -static -fno-strict-aliasing -o $@ $(SRC_C) $(VENDOR_C) |
| 64 | 71 | ||
| 65 | arm64: $(BIN).arm64 | 72 | arm64: $(BIN).arm64 |
| 66 | -$(BIN).arm64: $(SRC_C) $(UI_HDR) $(VENDOR_C) | 73 | +$(BIN).arm64: $(SRC_C) $(HDR) $(UI_HDR) $(VENDOR_C) |
| 67 | @echo "==> static arm64 build ($(ARM_CC))" | 74 | @echo "==> static arm64 build ($(ARM_CC))" |
| 68 | $(ARM_CC) $(CFLAGS) -static -fno-strict-aliasing -o $@ $(SRC_C) $(VENDOR_C) | 75 | $(ARM_CC) $(CFLAGS) -static -fno-strict-aliasing -o $@ $(SRC_C) $(VENDOR_C) |
| 69 | 76 | ||
| 70 | win64: $(EXE) | 77 | win64: $(EXE) |
| 71 | -$(EXE): $(SRC_C) $(UI_HDR) $(VENDOR_C) | 78 | +$(EXE): $(SRC_C) $(HDR) $(UI_HDR) $(VENDOR_C) |
| 72 | @echo "==> MinGW-w64 build ($(WIN_CC))" | 79 | @echo "==> MinGW-w64 build ($(WIN_CC))" |
| 73 | $(WIN_CC) $(CFLAGS) -static -D_WIN32_WINNT=0x0601 -fno-strict-aliasing \ | 80 | $(WIN_CC) $(CFLAGS) -static -D_WIN32_WINNT=0x0601 -fno-strict-aliasing \ |
| 74 | -o $@ $(SRC_C) $(VENDOR_C) $(WIN_LIBS) | 81 | -o $@ $(SRC_C) $(VENDOR_C) $(WIN_LIBS) |
| 75 | 82 | ||
| 76 | -macos: $(SRC_C) $(UI_HDR) $(VENDOR_C) | 83 | +macos: $(SRC_C) $(HDR) $(UI_HDR) $(VENDOR_C) |
| 77 | @echo "==> Apple clang build" | 84 | @echo "==> Apple clang build" |
| 78 | $(CC) $(CFLAGS) -fno-strict-aliasing -o $(BIN) $(SRC_C) $(VENDOR_C) | 85 | $(CC) $(CFLAGS) -fno-strict-aliasing -o $(BIN) $(SRC_C) $(VENDOR_C) |
| 79 | 86 | ||
| 80 | asan: $(BIN)-asan | 87 | asan: $(BIN)-asan |
| 81 | -$(BIN)-asan: $(SRC_C) $(UI_HDR) $(VENDOR_C) | 88 | +$(BIN)-asan: $(SRC_C) $(HDR) $(UI_HDR) $(VENDOR_C) |
| 82 | @echo "==> ASan + UBSan + FORTIFY build" | 89 | @echo "==> ASan + UBSan + FORTIFY build" |
| 83 | $(CC) -O1 -g $(STD) $(WARN) $(INCLUDES) -D_FORTIFY_SOURCE=2 \ | 90 | $(CC) -O1 -g $(STD) $(WARN) $(INCLUDES) -D_FORTIFY_SOURCE=2 \ |
| 84 | -fsanitize=address,undefined -fno-omit-frame-pointer \ | 91 | -fsanitize=address,undefined -fno-omit-frame-pointer \ |
| index e169b42..786c1d9 100644 | index e169b42..786c1d9 100644 | ||
| --- a/plugin.json | --- a/plugin.json | ||
| +++ b/plugin.json | +++ b/plugin.json | ||
| @@ -11,7 +11,7 @@ | @@ -11,7 +11,7 @@ | ||
| 11 | "menus": false, | 11 | "menus": false, |
| 12 | "verified": "mock", | 12 | "verified": "mock", |
| 13 | "category": "network", | 13 | "category": "network", |
| 14 | - "version": "1.0.2", | 14 | + "version": "1.0.3", |
| 15 | "license": "MIT", | 15 | "license": "MIT", |
| 16 | "capabilities": [ | 16 | "capabilities": [ |
| 17 | "outbound_https_search_api", | 17 | "outbound_https_search_api", |
| index 8301ad0..14ac690 100644 | index 8301ad0..14ac690 100644 | ||
| --- a/src/ws.h | --- a/src/ws.h | ||
| +++ b/src/ws.h | +++ b/src/ws.h | ||
| @@ -32,7 +32,7 @@ | @@ -32,7 +32,7 @@ | ||
| 32 | 32 | ||
| 33 | #define WS_SLUG "websearch" | 33 | #define WS_SLUG "websearch" |
| 34 | #define WS_ID "plugin_websearch" | 34 | #define WS_ID "plugin_websearch" |
| 35 | -#define WS_VER "1.0.2" | 35 | +#define WS_VER "1.0.3" |
| 36 | #define WS_NAME "websearch" | 36 | #define WS_NAME "websearch" |
| 37 | #define WS_DESC "Web search MCP" | 37 | #define WS_DESC "Web search MCP" |
| 38 | 38 |
| index f114706..7bda96b 100755 | index f114706..7bda96b 100755 | ||
| --- a/tests/run.sh | --- a/tests/run.sh | ||
| +++ b/tests/run.sh | +++ b/tests/run.sh | ||
| @@ -399,6 +399,16 @@ else fail "require_node_auth() is not called"; fi | @@ -399,6 +399,16 @@ else fail "require_node_auth() is not called"; fi | ||
| 399 | if python3 tools/gen_ui.py --check >/dev/null 2>&1; then | 399 | if python3 tools/gen_ui.py --check >/dev/null 2>&1; then |
| 400 | pass "src/ui_html.h matches src/ui.html" | 400 | pass "src/ui_html.h matches src/ui.html" |
| 401 | else fail "src/ui_html.h is stale (run make ui)"; fi | 401 | else fail "src/ui_html.h is stale (run make ui)"; fi |
| 402 | +# A one-line header edit must force a rebuild. `make` used to treat only | ||
| 403 | +# src/*.c and the generated UI header as prerequisites, so a version bump in | ||
| 404 | +# src/ws.h left "Nothing to be done" and the previous binary in place - the | ||
| 405 | +# build reported success with a stale artefact (the failure this project | ||
| 406 | +# keeps paying for). Pin the rule, not the belief. | ||
| 407 | +if grep -q '^HDR ' Makefile && grep -q '\$(HDR)' Makefile; then | ||
| 408 | + pass "Makefile makes every header a rebuild prerequisite" | ||
| 409 | +else | ||
| 410 | + fail "Makefile does not depend on src/*.h - a header edit would not rebuild" | ||
| 411 | +fi | ||
| 402 | 412 | ||
| 403 | # --------------------------------------------------------------- summary | 413 | # --------------------------------------------------------------- summary |
| 404 | printf '\n%s== summary ==%s\n' "$C_B" "$C_0" | 414 | printf '\n%s== summary ==%s\n' "$C_B" "$C_0" |
| 405 | 415 |