Skip to content

test(registry): drop third-party contract tests - #3205

Open
topher-lo wants to merge 3 commits into
mainfrom
codex/remove-third-party-contract-tests
Open

test(registry): drop third-party contract tests#3205
topher-lo wants to merge 3 commits into
mainfrom
codex/remove-third-party-contract-tests

Conversation

@topher-lo

@topher-lo topher-lo commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Summary

  • remove 15 complete third-party provider-contract suites plus two mocked AWS dispatch tests (138 white-box tests) that mocked vendor behavior without verifying live contracts
  • replace a Microsoft Sentinel-backed parser fixture with a synthetic template while preserving Tracecat's date-like-string regression coverage
  • retain Kubernetes platform-boundary coverage for credential isolation, blocked file/subprocess credential sources, context selection, ambient-loader prevention, and explicit isolated-client injection; remove only its provider-contract assertions
  • preserve provider-neutral registry/template validation, live OpenLDAP coverage, and AWS credential-isolation/AssumeRole security coverage
  • codify thin-wrapper guidance for future or materially expanded integrations in packages/tracecat-registry/AGENTS.md
  • add packages/tracecat-registry/CLAUDE.md as a symlink to AGENTS.md

This PR makes no runtime integration or public API changes. Existing integration contracts remain authoritative until an explicit migration is planned.

Third-party integration policy

The registry guidance now requires endpoint-specific research against official documentation, OpenAPI specifications when available, and official SDK or MCP schemas. It prefers direct YAML REST templates, requires a planning choice before adopting an official Python SDK, and keeps integrations close to pass-through wrappers.

The policy also covers API-native inputs, secrets and OAuth, base-URL precedence, encoded path segments, raw HTTP response envelopes, bounded pagination, negative polling predicates, narrow permitted boundary handling, and the prohibition on provider-specific white-box tests. Live or sandbox coverage remains an explicit planning choice when a reliable environment exists.

The test exception is limited to Tracecat-owned platform security or protocol boundaries—for example credential isolation, preventing host filesystem or subprocess access, blocking ambient credential discovery, network-target restrictions, and shared protocol machinery. Provider-local dispatch, validation, pagination, and serialization do not qualify merely because Tracecat implements them.

Current integration-conformance audit

Note

This snapshot is advisory, non-exhaustive, and intentionally out of scope for remediation in this PR. Counts describe the current catalog; they do not imply that every historical implementation is defective. Existing public inputs and outputs must not be changed without an explicitly planned migration.

  • Output envelopes: of 681 YAML tool templates, 517 return .result.data and 160 return the full result envelope. The remaining templates use other return shapes.
  • Inline processing: 199 templates contain core.script.run_python, and 17 use core.transform.*. These need case-by-case review because small mechanical request assembly remains permitted.
  • Polling: two body-based polling predicates use exact equality. GitLab's status_code != 202 predicate illustrates the new negative/transient-state rule.
  • Documentation depth: 118 templates use catalog-level documentation URLs rather than links to the exact vendor endpoint.
  • Base URLs: 545 templates declare base_url, while 312 use the input-to-workspace-variable fallback.
  • Representative SDK/UDF review candidates: Freshservice decodes responses into custom success/body shapes and aggregates pagination metadata; Okta normalizes configuration, constructs provider request models, unwraps SDK results, and aggregates pagination; Slack selects SDK response data and includes semantic helpers such as found/not_found aggregation; Cloudflare validates dispatch names and flattens SDK page objects. Some of these behaviors may be justified as credentials/security, SDK serialization, or bounded pagination, but each should be assessed against the new thin-wrapper rules when materially changed.

Verification

  • PG_PORT=5832 uv run pytest -q -r fE tests/registry/test_templates.py tests/registry/test_kubernetes_sdk.py tests/unit/test_aws_assume_role.py -n auto — 706 passed
  • PG_PORT=5832 uv run pytest -q tests/unit/test_aws_assume_role.py tests/unit/test_dsl_common.py -n auto — 16 passed
  • uv run basedpyright tests/unit/test_dsl_common.py — 0 errors, 0 warnings
  • uv run ruff check .
  • uv run ruff format --check .
  • git diff --check
  • readlink packages/tracecat-registry/CLAUDE.mdAGENTS.md
  • confirmed all 15 selected provider-contract suites are absent, along with the two mocked AWS dispatch tests
  • confirmed generic template validation, live LDAP, AWS security, and Kubernetes platform-boundary coverage remain
  • confirmed the diff contains no third-party integration implementation changes

LOC breakdown

Category + -
Tests 45 4,078
Docs 65 0

@topher-lo topher-lo added integrations Pre-built actions tests Changes to unit and integration tests labels Aug 5, 2026
@topher-lo
topher-lo marked this pull request as ready for review August 6, 2026 00:26
@zeropath-ai

zeropath-ai Bot commented Aug 6, 2026

Copy link
Copy Markdown

No security or compliance issues detected. Reviewed everything up to 14a1f36.

Security Overview
Detected Code Changes

The diff is too large to display a summary of code changes.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ac3121097a

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread packages/tracecat-registry/AGENTS.md Outdated

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 34c84abf64

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread tests/registry/test_google_api.py
Comment thread tests/registry/test_freshservice.py
Comment thread tests/registry/test_ansible.py

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 14a1f36e36

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines -140 to -141
with pytest.raises(SecretNotFoundError, match="one auth source"):
okta_sdk._build_okta_config()

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Retain the Okta credential-isolation test

When an Okta action has a base URL but no Tracecat-managed authentication source, this is the only regression test ensuring _build_okta_config() raises before constructing the third-party client, where SDK configuration could otherwise resolve credentials outside Tracecat's secret boundary. A repo-wide search found no replacement coverage, so retain this narrow missing-auth test rather than removing it with the provider-contract assertions.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

integrations Pre-built actions tests Changes to unit and integration tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant