Skip to content

Add Search operation, compliance overrides, and a test suite#10

Merged
gradill22 merged 7 commits into
mainfrom
feat/compliance-search-tests
Jul 23, 2026
Merged

Add Search operation, compliance overrides, and a test suite#10
gradill22 merged 7 commits into
mainfrom
feat/compliance-search-tests

Conversation

@gradill22

Copy link
Copy Markdown
Contributor

Brings the node in line with the API, and gives this repo its first tests.

What's here

  • Search resource/operation calling POST /search, fanning each result out to its own item (matching the "Submit and Wait" ergonomics) so downstream nodes iterate naturally.
  • Compliance Overrides collection on extract/bulk/crawl.
  • Extracted the pure request-shaping helpers (parseUrlList, buildPolicy) into nodes/WellMarked/helpers.ts so they're testable without dragging the whole node — and its n8n runtime imports — into a test.
  • First tests for this repo: vitest over those helpers (9 tests), covering separator/trim/blank handling and the invariant that an unset override is omitted rather than sent empty — sending an empty value would clear the key's own policy server-side instead of narrowing nothing.
  • CI now runs npm test. Tests live in a top-level tests/ dir outside the tsconfig include, so they're never compiled into dist or published.

Verification

npm run typecheck exit 0, 9 tests pass, npm run build clean, and dist/ confirmed to contain the compiled helper but no test files. A negative control (making buildPolicy always emit allow_domains) correctly failed 2 tests.

No SDK dependency, so this repo's CI is independent of the SDK release order.

🤖 Generated with Claude Code

gradill22 and others added 7 commits July 20, 2026 16:46
- Search resource/operation calling POST /search, fanning each result
  out to its own item (matching the "Submit and Wait" ergonomics) so
  downstream nodes can iterate naturally.
- Compliance Overrides collection on extract/bulk/crawl.
- Extracted the pure request-shaping helpers (parseUrlList, buildPolicy)
  into nodes/WellMarked/helpers.ts so they're testable without dragging
  the whole node (and its n8n runtime imports) into a test.
- First tests for this repo: vitest over those helpers, covering the
  separator/trim/blank cases and the invariant that an unset override is
  OMITTED rather than sent empty — sending an empty value would clear
  the key's own policy server-side instead of narrowing nothing.
- CI now runs npm test; tests live in a top-level tests/ dir that is
  outside the tsconfig include, so they are never compiled or published.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The branch was cut from a stale local main, so it conflicted with the
dependabot bumps on origin/main (typescript 6.0.3, rimraf 6.1.3,
@types/node, actions). A conflicting PR has no mergeable ref, so GitHub
could not run CI on it at all — hence "no checks reported".

Resolved by taking the dependency bumps and keeping vitest, then
regenerating the lockfile.

That merge also surfaced a pre-existing break: typescript 6.0.3 makes
moduleResolution=node10 a hard error, which is why CI has been failing
on main since the TS 6 bump landed on 2026-07-14. Silenced with
ignoreDeprecations, matching the JS SDK.

typecheck, test (9), and build now all exit 0 against TS 6.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
n8n-workflow pulls isolated-vm, whose node-gyp build fails on Node 20
runners (Node 22 happens to succeed). This node only needs
n8n-workflow TYPES to typecheck/test/build, never a compiled VM, so
npm ci --ignore-scripts removes the native compile from CI entirely.

Verified locally: install, typecheck, test (9), and build all exit 0.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
A FORMAT_OPTIONS dropdown (Markdown | JSON Blocks | Chunks | Raw HTML |
Links) on the three extraction operations, forwarded as `format` in the
request body. Search is left alone — it always returns markdown.

Defaults to markdown, so existing workflows are unchanged.

typecheck, 9 vitest and build all clean.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…lmarked.io

Product decision: no capability to point WellMarked tooling at another host.
The credential keeps only the API key; the node's requestDefaults and the
credential test now hardcode the public API. Existing saved credentials keep
working — the stored baseUrl value is simply never read again.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Same extraction parameter set as the extract/bulk/crawl operations, wired
through the existing FORMAT_OPTIONS and buildPolicy helpers. Format option
descriptions note the Pro+ gate on json/chunks.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…lity

Retry: server-side re-attempts on target_timeout, fresh connection per
attempt, default 0. Not offered on search — the API's 15s per-result
deadline can't absorb one. Max Pages narrows the plan's crawl page cap
(0 = plan cap alone, omitted from the body).

Also fixes the bulk/crawl Output Format property showing on Get Status
instead of the submit operations — the execute body always sent format,
but the UI never displayed the field where it mattered.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@gradill22 gradill22 self-assigned this Jul 23, 2026
@gradill22
gradill22 merged commit 2aee476 into main Jul 23, 2026
2 checks passed
@gradill22
gradill22 deleted the feat/compliance-search-tests branch July 23, 2026 05:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant