Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add rules/tecton-ai/tecton-mcp/tecton-unit-testinggit clone --depth 1 https://github.com/tecton-ai/tecton-mcpWhat it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00013 | $0.05426 |
| Opus 5 | $0.00006 | $0.02713 |
| Sonnet 5 | $0.00003 | $0.01085 |
| Haiku 4.5 | $0.00001 | $0.00543 |
Grade A, and why
tecton-unit-testing scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 559 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Rules to follow when you create Tecton FeatureView unit tests
CRITICAL: Before adding a new unit test, make sure that tecton plan works. This ensures the Feature View definitions are at least valid.
Feature retrieval methods such as get_features_in_range and
run_transformation use validated Tecton Objects during retrieval by
default. Validation requires access to the Tecton API and a Compute Cluster
which are often unavailable in Unit Testing environments.
To use these methods using mock inputs **without validation** in Unit Tests, set the validation mode to `skip` using:
```
conf.set("TECTON_SKIP_OBJECT_VALIDATION", "True")
```
In your unit test for a given FeatureView, always fetch a reference to the FeatureView using the TestRepo test fixture. Never try to import it directly from the module. Sample code that shows how to use repo_fixture.get_feature_view to retrieve the unit under test:
### tests/transaction_amount_is_high.py ###
from tecton import TestRepo
import pandas
# Testing the 'transaction_amount_is_high' feature which depends on request data ('amount') as input
def test_transaction_amount_is_high(repo_fixture: TestRepo):
transaction_amount_is_high = repo_fixture.get_feature_view("transaction_amount_is_high")
transaction_request = pandas.DataFrame({"amount": [124, 10001, 34235436234]})
# Use a MockContext to mock any secrets or resources
mock_context = MockContext(secrets={"my_secret": "my_secret_value"})
actual = transaction_amount_is_high.run_transformation(
input_data={
"transaction_request": transaction_request,
"context": mock_context,
},
).to_pandas()
expected = pandas.DataFrame({"transaction_amount_is_high": [0, 1, 1]})
pandas.testing.assert_frame_equal(actual, expected)
Overview
Tecton supports unit testing for feature definitions to ensure the correctness
of feature definitions. Unit tests can be defined in feature repositories in
file paths matching the pattern **/tests/*.py.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 3d ago First seen · 559 lines · 13 tokens per session scan A 548a2bbf8c78
tecton-unit-testing is a cursor rule published in the GitHub repository tecton-ai/tecton-mcp (3 stars, last pushed 1y ago), licensed MIT. It adds 13 tokens to every session and 5,426 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other cursor rules, from other repositories
python_tests
We use the unit tests to cover internal behavior that can work without the web / backend counterpart. We aim for 95%+ unit test coverage of our Python code in lib/streamlit.
unit-tests-tdd
TDD required for behavior changes; ≥80% package coverage on touched packages; unit-test conventions.
commit-checks
Run gofmt, go vet, and unit tests before committing Go files.
unit-testing
Python integration and unit testing — pytest patterns, test classes, workflow test tips.
testing
Testing conventions and Playwright patterns.
unit-testing-standards
Cursor rule "unit-testing-standards" from adobecom/da-express-milo, covering unit testing standards, testing philosophy, testing framework stack, test structure patterns and 1. standard test file organization.