Skip to content

:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.

feat(warehouse_sources): add four Ruddr tables (#90072)

Tom Owers2d18c4cf01e8
diff --git a/products/warehouse_sources/backend/temporal/data_imports/sources/COVERAGE_GAPS_APPENDIX.md b/products/warehouse_sources/backend/temporal/data_imports/sources/COVERAGE_GAPS_APPENDIX.md
index f0fb6562a087..c5e1d7e5e940 100644
--- a/products/warehouse_sources/backend/temporal/data_imports/sources/COVERAGE_GAPS_APPENDIX.md
+++ b/products/warehouse_sources/backend/temporal/data_imports/sources/COVERAGE_GAPS_APPENDIX.md
@@ -7191,10 +7191,14 @@ Note: Per-version download counts are already included in the synced `versions`
## Ruddr — **thin**
-Today (5): `clients`, `members`, `project_tasks`, `projects`, `time_entries`
+Today (9): `clients`, `members`, `pipeline_activities`, `project_prepayments`, `project_tasks`, `projects`, `task_categories`, `time_entries`, `timesheet_attestations`
Diffed against: <https://docs.ruddr.io/llms.txt>
+- [x] `project-prepayments` — prepayments recorded against projects to offset future fees
+- [x] `timesheet-attestations` — statements members sign when submitting timesheets
+- [x] `task-categories` — lookup classifying project tasks
+- [x] `pipeline-activities` — sales-pipeline activity log tied to opportunities, companies, and contacts
- [ ] `invoices` — billing and revenue, entirely absent from the current 5 tables (high)
- [ ] `invoice-items` — line-item revenue tied back to projects and time entries (high)
- [ ] `allocations` — planned resource allocation to compare against logged time entries (high)
@@ -7208,7 +7212,7 @@ Diffed against: <https://docs.ruddr.io/llms.txt>
- [ ] `project-health-reports` — periodic project status history, a natural trend series (medium)
- [ ] `practices` — lookup resolving the practice/org-unit IDs on members and projects (medium)
-Note: Ruddr documents roughly 78 list endpoints; the connector exposes 5. Beyond the twelve listed, whole domains are unsynced: project budget items (service/product/other/expense, plus monthly variants), revenue recognition entries, revenue adjustments, credit notes, tax rates, cost periods, exchange rate periods, utilization target periods, contacts, companies, expense reports, holidays, skills, disciplines, job titles and member levels. Static endpoint catalog, no dynamic discovery.
+Note: Ruddr documents roughly 78 list endpoints; the connector exposes 9. Beyond those listed, whole domains are unsynced: project budget items (service/product/other/expense, plus monthly variants), revenue recognition entries, revenue adjustments, credit notes, tax rates, cost periods, exchange rate periods, utilization target periods, contacts, companies, expense reports, holidays, skills, disciplines, job titles and member levels. Static endpoint catalog, no dynamic discovery.
## RunPod — adequate
diff --git a/products/warehouse_sources/backend/temporal/data_imports/sources/ruddr/canonical_descriptions.py b/products/warehouse_sources/backend/temporal/data_imports/sources/ruddr/canonical_descriptions.py
index 779f21a5b855..91440d7f2cb1 100644
--- a/products/warehouse_sources/backend/temporal/data_imports/sources/ruddr/canonical_descriptions.py
+++ b/products/warehouse_sources/backend/temporal/data_imports/sources/ruddr/canonical_descriptions.py
@@ -84,4 +84,66 @@ CANONICAL_DESCRIPTIONS: CanonicalDescriptions = {
"createdAt": "When the time entry was created.",
},
},
+ "project_prepayments": {
+ "description": "A prepayment recorded against a project to offset future fees in Ruddr.",
+ "docs_url": "https://docs.ruddr.io/api-reference/project-prepayments/list-project-prepayments",
+ "columns": {
+ "id": "The unique ID of the prepayment.",
+ "type": "The fee category the prepayment applies to (services, expenses, products, or other_items).",
+ "date": "The date of the prepayment.",
+ "details": "A description of the prepayment.",
+ "quantity": "The quantity used to compute the fee, or null when the fee was entered directly.",
+ "rate": "The rate used to compute the fee, or null when the fee was entered directly.",
+ "fee": "The total prepaid amount available to offset future fees.",
+ "project": "The project the prepayment belongs to.",
+ "invoiceItem": "The invoice item the prepayment is billed against.",
+ "amountUsed": "The portion of the fee already consumed on issued invoices.",
+ "invoiced": "Whether the prepayment has been added to an invoice.",
+ "locked": "Whether the prepayment can no longer be modified.",
+ "createdAt": "When the prepayment was created.",
+ },
+ },
+ "timesheet_attestations": {
+ "description": "A statement a member must sign when submitting a timesheet in Ruddr.",
+ "docs_url": "https://docs.ruddr.io/api-reference/timesheet-attestations/list-timesheet-attestations",
+ "columns": {
+ "id": "The unique ID of the attestation.",
+ "name": "The attestation's name.",
+ "attestationText": "The statement the member must sign when submitting a timesheet.",
+ "isActive": "Whether the attestation is currently active.",
+ "createdAt": "When the attestation was created.",
+ },
+ },
+ "task_categories": {
+ "description": "A category used to classify project tasks in Ruddr.",
+ "docs_url": "https://docs.ruddr.io/api-reference/task-categories/list-task-categories",
+ "columns": {
+ "id": "The unique ID of the task category.",
+ "name": "The name of the task category.",
+ "type": "The category type (standard, rollup, or milestone).",
+ "icon": "The icon identifier for the category.",
+ "color": "The color identifier for the category.",
+ "isActive": "Whether the category is active.",
+ "isDefault": "Whether this is the workspace's default category.",
+ "createdAt": "When the category was created.",
+ },
+ },
+ "pipeline_activities": {
+ "description": "An activity logged against a sales pipeline opportunity, company, or contact in Ruddr.",
+ "docs_url": "https://docs.ruddr.io/api-reference/pipeline-activities/list-pipeline-activities",
+ "columns": {
+ "id": "The unique ID of the activity.",
+ "subject": "The subject line of the activity.",
+ "content": "The body text of the activity.",
+ "direction": "The activity direction (inbound or outbound).",
+ "date": "The date of the activity.",
+ "duration": "The length of the activity in minutes.",
+ "pipelineActivityType": "The type of the activity.",
+ "members": "The members associated with the activity.",
+ "contacts": "The contacts associated with the activity.",
+ "companies": "The companies associated with the activity.",
+ "opportunities": "The opportunities associated with the activity.",
+ "createdAt": "When the activity was created.",
+ },
+ },
}
diff --git a/products/warehouse_sources/backend/temporal/data_imports/sources/ruddr/settings.py b/products/warehouse_sources/backend/temporal/data_imports/sources/ruddr/settings.py
index f991f59ca592..2bc41e37995c 100644
--- a/products/warehouse_sources/backend/temporal/data_imports/sources/ruddr/settings.py
+++ b/products/warehouse_sources/backend/temporal/data_imports/sources/ruddr/settings.py
@@ -20,6 +20,10 @@ RUDDR_ENDPOINTS: dict[str, RuddrEndpointConfig] = {
"project_tasks": RuddrEndpointConfig(name="project_tasks", path="/project-tasks"),
"members": RuddrEndpointConfig(name="members", path="/members"),
"time_entries": RuddrEndpointConfig(name="time_entries", path="/time-entries"),
+ "project_prepayments": RuddrEndpointConfig(name="project_prepayments", path="/project-prepayments"),
+ "timesheet_attestations": RuddrEndpointConfig(name="timesheet_attestations", path="/timesheet-attestations"),
+ "task_categories": RuddrEndpointConfig(name="task_categories", path="/task-categories"),
+ "pipeline_activities": RuddrEndpointConfig(name="pipeline_activities", path="/pipeline-activities"),
}
ENDPOINTS = tuple(RUDDR_ENDPOINTS.keys())
diff --git a/products/warehouse_sources/backend/temporal/data_imports/sources/ruddr/tests/test_ruddr.py b/products/warehouse_sources/backend/temporal/data_imports/sources/ruddr/tests/test_ruddr.py
index c4f18800a3dd..e0be720ead27 100644
--- a/products/warehouse_sources/backend/temporal/data_imports/sources/ruddr/tests/test_ruddr.py
+++ b/products/warehouse_sources/backend/temporal/data_imports/sources/ruddr/tests/test_ruddr.py
@@ -157,8 +157,20 @@ class TestPagination:
# targets the saved cursor.
assert params[0]["startingAfter"] == "cur-99"
+ @parameterized.expand(
+ [
+ ("time_entries", "https://www.ruddr.io/api/workspace/time-entries"),
+ ("project_tasks", "https://www.ruddr.io/api/workspace/project-tasks"),
+ ("project_prepayments", "https://www.ruddr.io/api/workspace/project-prepayments"),
+ ("timesheet_attestations", "https://www.ruddr.io/api/workspace/timesheet-attestations"),
+ ("task_categories", "https://www.ruddr.io/api/workspace/task-categories"),
+ ("pipeline_activities", "https://www.ruddr.io/api/workspace/pipeline-activities"),
+ ]
+ )
@mock.patch(CLIENT_SESSION_PATCH)
- def test_request_targets_endpoint_path(self, MockSession) -> None:
+ def test_request_targets_endpoint_path(self, endpoint: str, expected_url: str, MockSession) -> None:
+ # Schema names use underscores but Ruddr's paths use hyphens; assert each declared path
+ # reaches the hyphenated URL rather than a 404.
session = MockSession.return_value
session.headers = {}
captured: list[str] = []
@@ -170,8 +182,8 @@ class TestPagination:
session.prepare_request.side_effect = _prepare
session.send.side_effect = [_response([{"id": "1"}], has_more=False)]
- _rows(ruddr_source("key", "time_entries", team_id=1, job_id="j", resumable_source_manager=_make_manager()))
- assert captured[0] == "https://www.ruddr.io/api/workspace/time-entries"
+ _rows(ruddr_source("key", endpoint, team_id=1, job_id="j", resumable_source_manager=_make_manager()))
+ assert captured[0] == expected_url
class TestErrorHandling: