Skip to content

feat(collab): surface Zulip chat in the Collaboration bullet end-to-end - #1466

Merged
mitasovr merged 5 commits into
constructorfabric:mainfrom
mitasovr:feat/zulip-collab-chat-gold-and-e2e
Jun 24, 2026
Merged

feat(collab): surface Zulip chat in the Collaboration bullet end-to-end#1466
mitasovr merged 5 commits into
constructorfabric:mainfrom
mitasovr:feat/zulip-collab-chat-gold-and-e2e

Conversation

@mitasovr

@mitasovr mitasovr commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

Problem

Zulip chat data reached silver.class_collab_chat_activity (via union_by_tag) but stopped at silver — nothing carried it through gold → metric → API → UI, so it never appeared on the person-profile Collaboration card. Three downstream gaps, all fixed here, plus an e2e test that drives the whole path.

Changes

1. Silver class — build-order edge

class_collab_chat_activity.sql only declared -- depends_on for the m365/slack chat models, so a tag:zulip-proxy+ run never rebuilt it. Added the zulip ref. (union_by_tag already includes any tagged model whose table exists; this wires the graph edge so the connector-scoped prod run refreshes the class.)

2. Gold view — Zulip branch

20260518000000_collab-bullet-rewrite.sql: insight.collab_bullet_rows only branched on insight_m365/insight_slack. Added Branch 4b for data_source = 'insight_zulip_proxy' → single counter zulip_messages_sent (mirrors the m365 Teams branch). (Idempotent DROP+CREATE view, no migration tracking table → edited the canonical definition in place.)

3. Metric query_ref + catalog

The IC (…0012) / Team (…0005) collab bullet query_refs enumerate every FE-visible metric_key via sumIf + ARRAY JOIN. New append-only SeaORM migrations:

  • m20260624_000001_collab_zulip_chat — re-sets both query_refs with the zulip key (based on the latest m20260604_000002 distribution shape).
  • m20260624_000002_seed_zulip_collab_catalog — catalog row collab_bullet_rows.zulip_messages_sent ("Zulip Messages", source_tags ["zulip-proxy"]).

Both registered in migration/mod.rs.

E2E test

specs/collab_zulip_chat.test.yaml (+ schemas/templates, + zulip bronze placeholders in create-bronze-placeholders.sh) seeds alice/bob/carol chat (40/20/10, one Engineering team) with a duplicate uniq row, and asserts the IC bullet returns zulip_messages_sent value=40, median=20, range[10,40] (dedup holds). Adding the key raises the collab bullet 20 → 21 FE keys, so collab_emails_sent.test.yaml's size(items) is bumped 20 → 21.

Full e2e suite: 33 passed.

Scope

The secondary collab query_refs — member heatmap (…0041) and department distribution (…0045) — carry their own copies of the key list and are intentionally left for a follow-up. The IC/Team bullet that backs the person-profile Collaboration card (and this test) is fully wired.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features
    • Added Zulip chat message activity to collaboration bullet metrics, including updated distribution/quantile calculations.
    • Introduced new environment placeholders and schema/templates to ingest Zulip proxy messages and users.
  • Bug Fixes
    • Collaboration bullet metric counts and outputs now include the Zulip activity metric as expected.
  • Tests
    • Added an end-to-end Zulip collaboration metric test and updated related metric expectations.
  • Documentation
    • Expanded guidance for adding bronze placeholders and surfacing new dashboard metrics.

Zulip chat data reached `silver.class_collab_chat_activity` but stopped
there: nothing carried it through gold → metric → API → UI. Three gaps,
all fixed, plus an e2e test that drives the whole path.

1. Silver class. `class_collab_chat_activity` only declared a
   `-- depends_on` on the m365/slack chat models, so a `tag:zulip-proxy+`
   run never rebuilt it. Added the zulip ref. (`union_by_tag` already
   includes any tagged model whose table exists; this just wires the
   build-order edge so prod's connector-scoped run refreshes the class.)

2. Gold view. `insight.collab_bullet_rows` only branched on
   `insight_m365` / `insight_slack`. Added Branch 4b for
   `data_source = 'insight_zulip_proxy'`, emitting the single counter
   `zulip_messages_sent` (mirrors the m365 Teams branch).

3. Metric query_ref + catalog. The IC (…0012) / Team (…0005) collab
   bullet `query_ref`s enumerate every FE-visible `metric_key` via
   `sumIf` + `ARRAY JOIN`. New append-only migration
   `m20260624_000001_collab_zulip_chat` re-sets both with the zulip key
   (based on the latest `m20260604_000002` distribution shape);
   `m20260624_000002_seed_zulip_collab_catalog` adds the catalog row
   (`collab_bullet_rows.zulip_messages_sent`, "Zulip Messages",
   source_tags ["zulip-proxy"]). Both registered in migration/mod.rs.

E2E: new `specs/collab_zulip_chat.test.yaml` (+ schemas/templates and
zulip bronze placeholders) seeds alice/bob/carol chat (40/20/10, one
Engineering team) with a duplicate `uniq` row and asserts the IC bullet
returns `zulip_messages_sent` value=40, median=20, range[10,40] (dedup
holds). Adding the key raises the collab bullet from 20 to 21 FE keys, so
`collab_emails_sent.test.yaml`'s `size(items)` is bumped 20 -> 21.

Full e2e suite: 33 passed.

Scope: the secondary collab `query_ref`s — member heatmap (…0041) and
department distribution (…0045) — carry their own copies of the key list
and are intentionally left for a follow-up; the IC/Team bullet that backs
the person-profile Collaboration card (and this test) is fully wired.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Signed-off-by: Roman Mitasov <Roman.Mitasov@constructor.tech>
@mitasovr
mitasovr requested a review from a team as a code owner June 24, 2026 08:50
@coderabbitai

coderabbitai Bot commented Jun 24, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@mitasovr, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 35 minutes and 18 seconds. Learn how PR review limits work.

To continue reviewing without waiting, enable usage-based billing in the billing tab.

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based credits.

🚦 How do rate limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 47d4ca89-684a-45ba-92e4-d3804187e314

📥 Commits

Reviewing files that changed from the base of the PR and between df6dd94 and 7bb251f.

📒 Files selected for processing (1)
  • src/backend/services/analytics-api/src/migration/m20260624_000002_seed_zulip_collab_catalog.rs
📝 Walkthrough

Walkthrough

This PR adds zulip_messages_sent as a new collaboration metric across the analytics pipeline. It adds bronze Zulip placeholders, wires silver and gold SQL, updates analytics API metric queries and catalog seeding, registers new migrations, and expands e2e coverage and test guidance.

Changes

Zulip Collaboration Metric Pipeline

Layer / File(s) Summary
Bronze placeholders and SQL branch wiring
src/ingestion/scripts/create-bronze-placeholders.sh, src/ingestion/silver/collaboration/class_collab_chat_activity.sql, src/ingestion/scripts/migrations/20260518000000_collab-bullet-rewrite.sql
Creates the bronze_zulip_proxy database and placeholder tables, extends the silver chat model dependency list, and adds the Zulip UNION ALL branch to collab_bullet_rows.
Analytics API query migration
src/backend/services/analytics-api/src/migration/m20260624_000001_collab_zulip_chat.rs
Rewrites metrics.query_ref to include zulip_messages_sent in the wide aggregate and unpivot SQL, updates team and IC bullet queries, restores the prior shape in down(), and adds unit tests for the SQL builders.
Metric catalog seed and migration registration
src/backend/services/analytics-api/src/migration/m20260624_000002_seed_zulip_collab_catalog.rs, src/backend/services/analytics-api/src/migration/mod.rs
Seeds the Zulip metric catalog and threshold rows, makes the seed irreversible on down(), and registers both new migrations in the migrator.
E2E fixtures, assertions, and guidance
src/ingestion/tests/e2e/specs/schemas/bronze_zulip_proxy.messages.yaml, src/ingestion/tests/e2e/specs/schemas/bronze_zulip_proxy.users.yaml, src/ingestion/tests/e2e/specs/templates/zulip.yaml, src/ingestion/tests/e2e/specs/collab_zulip_chat.test.yaml, src/ingestion/tests/e2e/specs/collab_emails_sent.test.yaml, src/ingestion/tests/e2e/e2e_lib/analytics_api.py, .claude/skills/metric-e2e-test/SKILL.md, cypilot/.core/skills/connector/workflows/create.md, cypilot/.core/skills/connector/workflows/validate.md
Adds Zulip bronze schemas and templates, introduces a new Zulip collaboration e2e spec, updates the shared collaboration item count assertion, forces a fresh analytics-api rebuild, and updates metric test workflow guidance.

Sequence Diagram(s)

sequenceDiagram
    participant Airbyte
    participant bronze_zulip_proxy
    participant silver_class_collab_chat_activity
    participant insight_collab_bullet_rows
    participant analytics_api_migration
    participant metric_catalog

    Airbyte->>bronze_zulip_proxy: insert Zulip users and messages
    bronze_zulip_proxy->>silver_class_collab_chat_activity: feed zulip_proxy__collab_chat_activity
    silver_class_collab_chat_activity->>insight_collab_bullet_rows: emit zulip_messages_sent row
    analytics_api_migration->>insight_collab_bullet_rows: update metrics.query_ref SQL
    analytics_api_migration->>metric_catalog: seed catalog and threshold rows
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

Possibly related PRs

Suggested reviewers

  • cyberantonz

Poem

🐰 Hop hop, the Zulip trail is set,
From bronze to gold, no step unmet.
One more metric joins the springtime song,
Twenty-one bullet rows now march along.
The rabbit twitches, ears held high —
New chat counts shimmer through the sky.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely summarizes the main change: surfacing Zulip chat in the Collaboration bullet end-to-end.
Docstring Coverage ✅ Passed Docstring coverage is 88.24% which is sufficient. The required threshold is 80.00%.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@mitasovr
mitasovr requested a review from ktursunov June 24, 2026 08:52

@coderabbitai coderabbitai 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.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In
`@src/backend/services/analytics-api/src/migration/m20260624_000002_seed_zulip_collab_catalog.rs`:
- Line 139: Run rustfmt on the Zulip collab seed migration so the backend
lint/test pipeline can pass; the current formatting still differs around the
tracing::info! call in the seed_zulip_collab_catalog migration and the adjacent
block referenced by the formatter. Reformat the affected statements in that
migration module to match rustfmt output, especially the section around the
SEEDS.len() log and the later lines noted by the formatter.

In `@src/ingestion/scripts/migrations/20260518000000_collab-bullet-rewrite.sql`:
- Around line 198-212: The Zulip branch in the migration reads from
silver.class_collab_chat_activity without deduplication, so it can overcount
versions from ReplacingMergeTree(unique_key). Update the Branch 4b SELECT to
read the FINALized view of that table or otherwise dedupe upstream before
aggregating, and keep the existing filter on data_source = 'insight_zulip_proxy'
while preserving the metric mapping in the Zulip branch.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 8990147c-ed69-4b6c-90db-ab733c34d9ff

📥 Commits

Reviewing files that changed from the base of the PR and between 18549e3 and 2fa34c0.

📒 Files selected for processing (11)
  • src/backend/services/analytics-api/src/migration/m20260624_000001_collab_zulip_chat.rs
  • src/backend/services/analytics-api/src/migration/m20260624_000002_seed_zulip_collab_catalog.rs
  • src/backend/services/analytics-api/src/migration/mod.rs
  • src/ingestion/scripts/create-bronze-placeholders.sh
  • src/ingestion/scripts/migrations/20260518000000_collab-bullet-rewrite.sql
  • src/ingestion/silver/collaboration/class_collab_chat_activity.sql
  • src/ingestion/tests/e2e/specs/collab_emails_sent.test.yaml
  • src/ingestion/tests/e2e/specs/collab_zulip_chat.test.yaml
  • src/ingestion/tests/e2e/specs/schemas/bronze_zulip_proxy.messages.yaml
  • src/ingestion/tests/e2e/specs/schemas/bronze_zulip_proxy.users.yaml
  • src/ingestion/tests/e2e/specs/templates/zulip.yaml

Comment on lines +198 to +212
-- ─── Branch 4b: class_collab_chat_activity — Zulip ───────────────────
-- Single key (zulip_messages_sent), no ARRAY JOIN needed. Mirrors the
-- m365 Teams branch: one silver row per (person, date) where
-- data_source = 'insight_zulip_proxy' → period-summed chat messages.
SELECT
lower(z.email) AS person_id,
p.org_unit_id AS org_unit_id,
z.date AS metric_date,
'zulip_messages_sent' AS metric_key,
toFloat64(ifNull(z.total_chat_messages, 0)) AS metric_value
FROM silver.class_collab_chat_activity AS z
LEFT JOIN insight.people AS p ON lower(z.email) = p.person_id
WHERE z.data_source = 'insight_zulip_proxy'
AND z.email IS NOT NULL
AND z.email != ''

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🗄️ Data Integrity & Integration | 🟠 Major

🧩 Analysis chain

🌐 Web query:

ClickHouse ReplacingMergeTree SELECT without FINAL duplicate rows before background merges

💡 Result:

In ClickHouse, the ReplacingMergeTree engine does not automatically deduplicate rows during a standard SELECT query [1][2]. The engine is designed for eventual consistency; deduplication is a background process that occurs only when ClickHouse decides to merge data parts [1][3]. If you perform a SELECT query without the FINAL modifier, ClickHouse will return all versions of the rows currently present in the table, including duplicates that have not yet been processed by a background merge [1][2][3]. To ensure you receive only deduplicated results (i.e., only the latest version of each unique record based on the ORDER BY key), you must use one of the following approaches: 1. Use the FINAL modifier: Adding FINAL to your SELECT query forces ClickHouse to perform the deduplication logic at query time [1][2]. While this ensures correctness, it carries a performance cost because it requires extra processing during the query [1][4][5]. 2. Use a Session/Query Setting: For convenience, you can enable the final setting at the session or profile level (e.g., SETTINGS final = 1), which applies this logic to all relevant queries without needing to rewrite every SQL statement [6]. 3. Query Optimization: If using FINAL, you can improve performance by using the setting do_not_merge_across_partitions_select_final=1, which allows partitions to be processed independently [1][6][5]. Additionally, filtering on columns present in the ORDER BY or partition key can significantly reduce the amount of data processed during a FINAL query [1][6][7]. 4. Alternative Query Patterns: For performance-critical applications, some users prefer to avoid FINAL entirely by using aggregation functions like argMax in a GROUP BY clause to manually select the latest version of records [8][7]. Because background merges are unpredictable, you should never rely on the table being fully deduplicated for query correctness unless you explicitly use FINAL or handle deduplication in your query logic [1][2][4].

Citations:


🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Locate the migration and the source table definition(s)
git ls-files | rg '20260518000000_collab-bullet-rewrite\.sql|class_collab_chat_activity|class_collab|zulip|ReplacingMergeTree|unique_key|_version' -n

# Show the relevant section of the migration with line numbers
sed -n '180,235p' src/ingestion/scripts/migrations/20260518000000_collab-bullet-rewrite.sql

# Search for the silver table definition and any upstream dedup logic
rg -n --hidden --glob '!**/node_modules/**' --glob '!**/dist/**' --glob '!**/build/**' \
  'CREATE TABLE .*class_collab_chat_activity|class_collab_chat_activity|ReplacingMergeTree|FINAL|unique_key|_version|zulip_messages_sent|insight_zulip_proxy' .

Repository: constructorfabric/insight

Length of output: 50382


🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Find any table DDL or transformation around the silver.class_collab_chat_activity source
fd -a 'class_collab_chat_activity' .

Repository: constructorfabric/insight

Length of output: 248


🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Inspect relevant files and definitions with minimal output.
echo "=== migration snippet ==="
nl -ba src/ingestion/scripts/migrations/20260518000000_collab-bullet-rewrite.sql | sed -n '198,212p'

echo
echo "=== matching table definitions / references ==="
rg -n --hidden --glob '!**/node_modules/**' --glob '!**/dist/**' --glob '!**/build/**' \
  'CREATE TABLE .*class_collab_chat_activity|ENGINE = ReplacingMergeTree|class_collab_chat_activity|zulip_messages_sent|insight_zulip_proxy|unique_key|_version|FINAL' \
  src . | sed -n '1,220p'

Repository: constructorfabric/insight

Length of output: 229


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "=== migration excerpt ==="
sed -n '198,212p' src/ingestion/scripts/migrations/20260518000000_collab-bullet-rewrite.sql

echo
echo "=== silver table definition ==="
sed -n '1,220p' /home/jailuser/git/src/ingestion/silver/collaboration/class_collab_chat_activity.sql

echo
echo "=== related joins / dedup patterns ==="
rg -n --hidden --glob '!**/node_modules/**' --glob '!**/dist/**' --glob '!**/build/**' \
  'FROM silver\.class_collab_chat_activity|FINAL|ReplacingMergeTree|unique_key|zulip_messages_sent|insight_zulip_proxy' \
  src/ingestion | sed -n '1,220p'

Repository: constructorfabric/insight

Length of output: 28140


Read the Zulip branch with FINAL or dedupe upstream.
silver.class_collab_chat_activity is a ReplacingMergeTree(_version) table keyed by unique_key, so a plain SELECT can surface duplicate versions before merges and overcount zulip_messages_sent.

Proposed fix
-FROM silver.class_collab_chat_activity AS z
+FROM silver.class_collab_chat_activity AS z FINAL
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
-- ─── Branch 4b: class_collab_chat_activity — Zulip ───────────────────
-- Single key (zulip_messages_sent), no ARRAY JOIN needed. Mirrors the
-- m365 Teams branch: one silver row per (person, date) where
-- data_source = 'insight_zulip_proxy' → period-summed chat messages.
SELECT
lower(z.email) AS person_id,
p.org_unit_id AS org_unit_id,
z.date AS metric_date,
'zulip_messages_sent' AS metric_key,
toFloat64(ifNull(z.total_chat_messages, 0)) AS metric_value
FROM silver.class_collab_chat_activity AS z
LEFT JOIN insight.people AS p ON lower(z.email) = p.person_id
WHERE z.data_source = 'insight_zulip_proxy'
AND z.email IS NOT NULL
AND z.email != ''
-- ─── Branch 4b: class_collab_chat_activity — Zulip ───────────────────
-- Single key (zulip_messages_sent), no ARRAY JOIN needed. Mirrors the
-- m365 Teams branch: one silver row per (person, date) where
-- data_source = 'insight_zulip_proxy' → period-summed chat messages.
SELECT
lower(z.email) AS person_id,
p.org_unit_id AS org_unit_id,
z.date AS metric_date,
'zulip_messages_sent' AS metric_key,
toFloat64(ifNull(z.total_chat_messages, 0)) AS metric_value
FROM silver.class_collab_chat_activity AS z FINAL
LEFT JOIN insight.people AS p ON lower(z.email) = p.person_id
WHERE z.data_source = 'insight_zulip_proxy'
AND z.email IS NOT NULL
AND z.email != ''
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/ingestion/scripts/migrations/20260518000000_collab-bullet-rewrite.sql`
around lines 198 - 212, The Zulip branch in the migration reads from
silver.class_collab_chat_activity without deduplication, so it can overcount
versions from ReplacingMergeTree(unique_key). Update the Branch 4b SELECT to
read the FINALized view of that table or otherwise dedupe upstream before
aggregating, and keep the existing filter on data_source = 'insight_zulip_proxy'
while preserving the metric mapping in the Zulip branch.

Roman Mitasov and others added 2 commits June 24, 2026 12:34
…facing chain

Captures what this PR's zulip work had to discover by hand so the next
connector reaches the UI first try:

- /connector create.md §3.6c: a connector that only reaches silver does NOT
  appear in the UI — union_by_tag folds it into silver.class_<X> and nothing
  else is automatic. Documents the 4 layers to wire (silver depends_on edge,
  gold <section>_bullet_rows branch on data_source='insight_<snake>', the
  bullet query_ref sumIf+ARRAY JOIN — noting a section has several copies:
  IC/Team/member …0041/dept …0045 — and the metric_catalog row), with file
  locations and PR constructorfabric#1466 as the worked example.
- /connector validate.md: new "Dashboard metric surfacing" checklist mirroring
  the chain.
- /metric-e2e-test SKILL.md: rig gotchas that cost real time — adding a bronze
  table for a not-yet-seeded connector (placeholder heredoc + schema yaml, else
  the seeder fails on system.columns); stale cargo-target volume serving a
  binary without new SeaORM migrations (confirm via seaql_migrations, fix with
  down -v); 1045 access-denied from stale .env; querying the still-up CH/MariaDB
  after a run; and that adding a metric_key to a shared section shifts other
  tests' size(items).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Signed-off-by: Roman Mitasov <Roman.Mitasov@constructor.tech>
…issed

`build()` builds analytics-api into the `cargo-target` Docker volume. On
Docker Desktop (macOS) the mtimes cargo reads through the bind mount do not
reliably advance when sources change on the host, so cargo relinked a stale
cached object and the spawned binary silently lacked newly-added SeaORM
migrations. Symptom: a freshly-added metric/query_ref/catalog migration never
ran (absent from `seaql_migrations`), so `./e2e.sh test` failed with
NO_ZULIP / `size(items)` off-by-one and only a full `down -v` cold rebuild
(itself flaky — the volume is often "in use") worked around it.

Fix: touch the analytics-api crate sources before `cargo build`, forcing a
recompile of that crate every run (~1-2 min; it is a leaf bin, so its deps
stay cached — not a cold build). `./e2e.sh test` now picks up new migrations
with no `down -v` ritual. Confirmed: full suite 33 passed on a warm volume.

Also updates the /metric-e2e-test skill note (the stale-binary trap is now
auto-handled; `down -v` is only for a DB/disk reset).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Signed-off-by: Roman Mitasov <Roman.Mitasov@constructor.tech>

@coderabbitai coderabbitai 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.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@cypilot/.core/skills/connector/workflows/create.md`:
- Around line 450-458: The fenced diagram block in the workflow docs is
unlabeled, triggering the markdown lint rule. Update the fenced block around the
bronze_<snake> to analytics-api flow to specify a language tag on the opening
fence, and keep the rest of the content unchanged so the documentation still
renders correctly while satisfying MD040.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: ddb406a9-f1dc-412c-ba13-80cc855a7ae0

📥 Commits

Reviewing files that changed from the base of the PR and between 2fa34c0 and df6dd94.

📒 Files selected for processing (4)
  • .claude/skills/metric-e2e-test/SKILL.md
  • cypilot/.core/skills/connector/workflows/create.md
  • cypilot/.core/skills/connector/workflows/validate.md
  • src/ingestion/tests/e2e/e2e_lib/analytics_api.py
✅ Files skipped from review due to trivial changes (2)
  • cypilot/.core/skills/connector/workflows/validate.md
  • .claude/skills/metric-e2e-test/SKILL.md

Comment on lines +450 to +458
```
bronze_<snake>.<stream>
→ <snake>__<class>.sql (silver, tag silver:class_<X>) ← §3.5
→ silver.class_<X> (union_by_tag — AUTOMATIC)
→ insight.<section>_bullet_rows (gold VIEW, CH migration) ← layer A
→ metrics.query_ref (…IC/Team/member/dept) (SeaORM) ← layer B
→ metric_catalog row (label/threshold, SeaORM) ← layer C
→ analytics-api → person-profile <Section> card (UI)
```

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Add a language to the fenced code block.

Line 450 uses an unlabeled fenced block (MD040), which can break docs lint.

Suggested fix
-```
+```text
 bronze_<snake>.<stream>
   → <snake>__<class>.sql            (silver, tag silver:class_<X>)   ← §3.5
     → silver.class_<X>              (union_by_tag — AUTOMATIC)
       → insight.<section>_bullet_rows   (gold VIEW, CH migration)    ← layer A
         → metrics.query_ref (…IC/Team/member/dept)  (SeaORM)         ← layer B
           → metric_catalog row      (label/threshold, SeaORM)        ← layer C
             → analytics-api → person-profile <Section> card (UI)
</details>

<!-- suggestion_start -->

<details>
<summary>📝 Committable suggestion</summary>

> ‼️ **IMPORTANT**
> Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

```suggestion

🧰 Tools
🪛 markdownlint-cli2 (0.22.1)

[warning] 450-450: Fenced code blocks should have a language specified

(MD040, fenced-code-language)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@cypilot/.core/skills/connector/workflows/create.md` around lines 450 - 458,
The fenced diagram block in the workflow docs is unlabeled, triggering the
markdown lint rule. Update the fenced block around the bronze_<snake> to
analytics-api flow to specify a language tag on the opening fence, and keep the
rest of the content unchanged so the documentation still renders correctly while
satisfying MD040.

Source: Linters/SAST tools

cargo fmt --check flagged line-wrapping in m20260624_000002_seed_zulip_collab_catalog
(tracing::info! args + assert! chain). No logic change.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Signed-off-by: Roman Mitasov <Roman.Mitasov@constructor.tech>
unique_key: zulip-msg-bob-20260105
count: 20

- $ref: templates/zulip.yaml#/templates/carol_message

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Is carol in the same team as Alice and Bob?

@mitasovr mitasovr Jun 24, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

yes
and Carol is their manager )

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.

3 participants