Skip to content

test(e2e): per-metric collaboration specs for the remaining m365 metrics (#1413) - #1476

Merged
ktursunov merged 6 commits into
constructorfabric:mainfrom
ktursunov:m365-e2e-collab-rest
Jun 25, 2026
Merged

test(e2e): per-metric collaboration specs for the remaining m365 metrics (#1413)#1476
ktursunov merged 6 commits into
constructorfabric:mainfrom
ktursunov:m365-e2e-collab-rest

Conversation

@ktursunov

@ktursunov ktursunov commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

Summary

Completes the per-metric E2E coverage of the m365 Collaboration bullet. The
email metrics landed in #1472; this PR adds the remaining 10 metrics, each driving
the full bronze → dbt silver → gold view → analytics-api path and asserting on
the IC bullet (…0012) over a one-team (Engineering) cohort.

stream (bronze) metrics
Teams (teams_activity) m365_teams_chats, meetings_count, teams_meetings, meeting_hours, teams_meeting_hours, meeting_free
Files (onedrive_activity + sharepoint_activity) m365_files_engaged, m365_files_shared_internal, m365_files_shared_external
multi-stream (email + onedrive + teams) m365_active_days

Each spec:

  • asserts only the target metric_key's value / median / range_* (value = the
    member, median/range = the team cohort), per the skill convention;
  • seeds a verbatim-duplicate alice row so RMT/union_by_tag dedup is exercised on
    each new silver class (class_collab_chat_activity, class_collab_meeting_activity,
    class_collab_document_activity) — the value must dedup, not double.

Also adds the teams/onedrive/sharepoint bronze schemas + $ref templates.

Testing

cd src/ingestion/tests/e2e && ./e2e.sh test
======================== 45 passed in 117.77s ========================

(10 new specs + the email/zulip specs + meta framework tests.) Goldens were
confirmed twice — once before and once after adding the dedup rows (unchanged,
proving dedup).

Scope / follow-up

Covers all 13 m365 collaboration bullet metric_keys (3 email in #1472 + these 10).
Still deferred (separate concerns, can follow up): the collab_team_cohort spec
(Team bullet …0005, multi-team) and the collab_smoke integration spec.

Summary by CodeRabbit

  • New Features
    • Expanded end-to-end coverage for collaboration metrics, including active days, meeting-free, meeting hours/counts, Teams chats, Teams meetings/hours, and internal/external file engagement & sharing.
  • Bug Fixes
    • Improved end-to-end determinism by truncating additional Zoom staging tables at session start.
    • Strengthened validation that duplicate activity rows are deduplicated and not double-counted.
  • Documentation / Chores
    • Added reusable fixture templates and JSON schemas for M365 and Zoom activity, plus expanded Zoom bronze placeholders.
    • Refined end-to-end metric test guidance and updated collaboration test documentation text.

@ktursunov
ktursunov requested a review from a team as a code owner June 24, 2026 12:40
@coderabbitai

coderabbitai Bot commented Jun 24, 2026

Copy link
Copy Markdown

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

Adds collaboration metric E2E specs, bronze schemas and reusable templates, Zoom placeholder support, and metric-e2e guidance updates.

Changes

M365 Collaboration E2E Specs

Layer / File(s) Summary
Metric E2E guidance and Zoom support
.claude/skills/metric-e2e-test/SKILL.md, src/ingestion/scripts/create-bronze-placeholders.sh, src/ingestion/tests/e2e/conftest.py
Updates metric-e2e instructions, expands Zoom bronze placeholders, and adds Zoom tables to session-start truncation.
Bronze schemas and seed templates
src/ingestion/tests/e2e/specs/schemas/bronze_m365.onedrive_activity.yaml, src/ingestion/tests/e2e/specs/schemas/bronze_m365.sharepoint_activity.yaml, src/ingestion/tests/e2e/specs/schemas/bronze_m365.teams_activity.yaml, src/ingestion/tests/e2e/specs/schemas/bronze_zoom.participants.yaml, src/ingestion/tests/e2e/specs/templates/m365_onedrive.yaml, src/ingestion/tests/e2e/specs/templates/m365_sharepoint.yaml, src/ingestion/tests/e2e/specs/templates/m365_teams.yaml, src/ingestion/tests/e2e/specs/templates/zoom.yaml
Defines bronze JSON schemas for M365 and Zoom activity tables and adds reusable per-user templates for OneDrive, SharePoint, Teams, and Zoom seed records.
Collaboration metric specs
src/ingestion/tests/e2e/specs/collab_active_days.test.yaml, src/ingestion/tests/e2e/specs/collab_files_engaged.test.yaml, src/ingestion/tests/e2e/specs/collab_files_shared_external.test.yaml, src/ingestion/tests/e2e/specs/collab_files_shared_internal.test.yaml, src/ingestion/tests/e2e/specs/collab_meeting_free.test.yaml, src/ingestion/tests/e2e/specs/collab_meeting_hours.test.yaml, src/ingestion/tests/e2e/specs/collab_meetings_count.test.yaml, src/ingestion/tests/e2e/specs/collab_teams_chats.test.yaml, src/ingestion/tests/e2e/specs/collab_teams_meeting_hours.test.yaml, src/ingestion/tests/e2e/specs/collab_teams_meetings.test.yaml
Adds E2E specs for collaboration metrics and asserts expected value, median, and range outputs for January 2026 queries.
Email collaboration spec wording
src/ingestion/tests/e2e/specs/collab_emails_read.test.yaml, src/ingestion/tests/e2e/specs/collab_emails_received.test.yaml, src/ingestion/tests/e2e/specs/collab_emails_sent.test.yaml, src/ingestion/tests/e2e/specs/collab_zulip_chat.test.yaml
Rewords the email collaboration spec descriptions and inline comments without changing the request or assertion structure.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related issues

  • Metric smoke: Collaboration metrics #1441: This PR adds E2E specs and supporting fixture/schema updates for the same collaboration metrics set covered by that issue, including m365_active_days, m365_files_engaged, meeting_hours, and teams_meetings.

Possibly related PRs

Suggested reviewers

  • mitasovr
  • cyberantonz

Poem

🐇 I nibbled schemas, neat and bright,
Then hopped through tests by soft moonlight.
Teams and Zoom now dance in line,
With deduped rows that behave just fine.

🚥 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 accurately summarizes the new per-metric E2E coverage for the remaining M365 collaboration metrics.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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.

@ktursunov ktursunov linked an issue Jun 24, 2026 that may be closed by this pull request
3 tasks
@ktursunov
ktursunov force-pushed the m365-e2e-collab-rest branch from 50c7e45 to b844ec5 Compare June 24, 2026 20:03

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

🧹 Nitpick comments (2)
src/ingestion/tests/e2e/specs/collab_meeting_hours.test.yaml (2)

104-124: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Add result.status == 'ok' checks to bob/carol cases for parity.

Only the alice case validates query status explicitly; adding the same assertion to bob/carol makes failure mode clearer and consistent.

Suggested patch
   - name: "meeting_hours — bob Teams-only (1.5)"
@@
     expect:
       - assert: "status == 200"
+      - in: collaboration
+        assert: "result.status == 'ok'"
       - in: collaboration
         find: { metric_key: meeting_hours }
         equal: { value: 1.5, median: 1.5, range_min: 0.5, range_max: 2.0 }
@@
   - name: "meeting_hours — carol Zoom-only (0.5)"
@@
     expect:
       - assert: "status == 200"
+      - in: collaboration
+        assert: "result.status == 'ok'"
       - in: collaboration
         find: { metric_key: meeting_hours }
         equal: { value: 0.5, median: 1.5, range_min: 0.5, range_max: 2.0 }
🤖 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/tests/e2e/specs/collab_meeting_hours.test.yaml` around lines
104 - 124, Add the same query-status assertion used in the alice case to the bob
and carol scenarios in collab_meeting_hours.test.yaml so all three cases
validate the result state consistently. Update the expect blocks for the bob
Zoom-only and carol Zoom-only tests to check result.status == 'ok' alongside the
existing status == 200 and metric assertions, using the same query structure and
expectation style already present in the alice case.

58-73: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Pin Zoom modality flags explicitly in-spec.

This spec currently depends on template defaults for video/screen-share gating; setting them here avoids future template drift changing meeting-hour outcomes.

Suggested patch
   bronze_zoom.participants:
     - $ref: templates/zoom.yaml#/templates/alice_zoom
       meeting_uuid: zmtg-alice-1
       participant_uuid: zp-alice-1
       join_time: "2026-01-05T10:00:00"
       leave_time: "2026-01-05T11:00:00"
+      camera: 0
+      share_application: 0
+      share_desktop: 0
+      share_whiteboard: 0
     - $ref: templates/zoom.yaml#/templates/alice_zoom   # verbatim duplicate -> must dedup, not double
       meeting_uuid: zmtg-alice-1
       participant_uuid: zp-alice-1
       join_time: "2026-01-05T10:00:00"
       leave_time: "2026-01-05T11:00:00"
+      camera: 0
+      share_application: 0
+      share_desktop: 0
+      share_whiteboard: 0
     - $ref: templates/zoom.yaml#/templates/carol_zoom
       meeting_uuid: zmtg-carol-1
       participant_uuid: zp-carol-1
       join_time: "2026-01-05T14:00:00"
       leave_time: "2026-01-05T14:30:00"
+      camera: 0
+      share_application: 0
+      share_desktop: 0
+      share_whiteboard: 0
🤖 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/tests/e2e/specs/collab_meeting_hours.test.yaml` around lines 58
- 73, The Zoom meeting-hour e2e spec currently relies on template defaults for
modality gating, which can change outcomes if the template drifts. Update the
collab_meeting_hours test entries that use alice_zoom and carol_zoom to set the
Zoom modality flags explicitly in the spec so the expected hour calculations
stay stable. Keep the existing duplicated alice entry behavior intact and make
the changes in the YAML spec itself rather than in the shared templates.
🤖 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.

Nitpick comments:
In `@src/ingestion/tests/e2e/specs/collab_meeting_hours.test.yaml`:
- Around line 104-124: Add the same query-status assertion used in the alice
case to the bob and carol scenarios in collab_meeting_hours.test.yaml so all
three cases validate the result state consistently. Update the expect blocks for
the bob Zoom-only and carol Zoom-only tests to check result.status == 'ok'
alongside the existing status == 200 and metric assertions, using the same query
structure and expectation style already present in the alice case.
- Around line 58-73: The Zoom meeting-hour e2e spec currently relies on template
defaults for modality gating, which can change outcomes if the template drifts.
Update the collab_meeting_hours test entries that use alice_zoom and carol_zoom
to set the Zoom modality flags explicitly in the spec so the expected hour
calculations stay stable. Keep the existing duplicated alice entry behavior
intact and make the changes in the YAML spec itself rather than in the shared
templates.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: b081df6d-6981-4972-b718-01e143bdfb0f

📥 Commits

Reviewing files that changed from the base of the PR and between 50c7e4560269e394e97370b78fc72a910c42cac3 and b844ec5ddaff7f4402b33e921493205b9deb240e.

📒 Files selected for processing (25)
  • .claude/skills/metric-e2e-test/SKILL.md
  • src/ingestion/scripts/create-bronze-placeholders.sh
  • src/ingestion/tests/e2e/conftest.py
  • src/ingestion/tests/e2e/specs/collab_active_days.test.yaml
  • src/ingestion/tests/e2e/specs/collab_emails_read.test.yaml
  • src/ingestion/tests/e2e/specs/collab_emails_received.test.yaml
  • src/ingestion/tests/e2e/specs/collab_emails_sent.test.yaml
  • src/ingestion/tests/e2e/specs/collab_files_engaged.test.yaml
  • src/ingestion/tests/e2e/specs/collab_files_shared_external.test.yaml
  • src/ingestion/tests/e2e/specs/collab_files_shared_internal.test.yaml
  • src/ingestion/tests/e2e/specs/collab_meeting_free.test.yaml
  • src/ingestion/tests/e2e/specs/collab_meeting_hours.test.yaml
  • src/ingestion/tests/e2e/specs/collab_meetings_count.test.yaml
  • src/ingestion/tests/e2e/specs/collab_teams_chats.test.yaml
  • src/ingestion/tests/e2e/specs/collab_teams_meeting_hours.test.yaml
  • src/ingestion/tests/e2e/specs/collab_teams_meetings.test.yaml
  • src/ingestion/tests/e2e/specs/collab_zulip_chat.test.yaml
  • src/ingestion/tests/e2e/specs/schemas/bronze_m365.onedrive_activity.yaml
  • src/ingestion/tests/e2e/specs/schemas/bronze_m365.sharepoint_activity.yaml
  • src/ingestion/tests/e2e/specs/schemas/bronze_m365.teams_activity.yaml
  • src/ingestion/tests/e2e/specs/schemas/bronze_zoom.participants.yaml
  • src/ingestion/tests/e2e/specs/templates/m365_onedrive.yaml
  • src/ingestion/tests/e2e/specs/templates/m365_sharepoint.yaml
  • src/ingestion/tests/e2e/specs/templates/m365_teams.yaml
  • src/ingestion/tests/e2e/specs/templates/zoom.yaml
✅ Files skipped from review due to trivial changes (6)
  • src/ingestion/tests/e2e/specs/schemas/bronze_zoom.participants.yaml
  • src/ingestion/tests/e2e/specs/collab_zulip_chat.test.yaml
  • src/ingestion/tests/e2e/specs/templates/m365_sharepoint.yaml
  • src/ingestion/tests/e2e/specs/templates/m365_onedrive.yaml
  • src/ingestion/tests/e2e/specs/collab_emails_received.test.yaml
  • src/ingestion/tests/e2e/specs/collab_emails_sent.test.yaml
🚧 Files skipped from review as they are similar to previous changes (11)
  • src/ingestion/tests/e2e/specs/schemas/bronze_m365.teams_activity.yaml
  • src/ingestion/tests/e2e/specs/schemas/bronze_m365.onedrive_activity.yaml
  • src/ingestion/tests/e2e/specs/templates/zoom.yaml
  • src/ingestion/tests/e2e/specs/collab_meetings_count.test.yaml
  • src/ingestion/tests/e2e/specs/collab_teams_chats.test.yaml
  • src/ingestion/tests/e2e/specs/templates/m365_teams.yaml
  • src/ingestion/tests/e2e/specs/collab_meeting_free.test.yaml
  • src/ingestion/tests/e2e/specs/schemas/bronze_m365.sharepoint_activity.yaml
  • src/ingestion/tests/e2e/specs/collab_files_shared_external.test.yaml
  • src/ingestion/tests/e2e/conftest.py
  • src/ingestion/scripts/create-bronze-placeholders.sh

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

🧹 Nitpick comments (1)
src/ingestion/tests/e2e/specs/collab_teams_meetings.test.yaml (1)

68-83: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Keep this spec single-metric (teams_meetings) to match the file contract.

This case asserts meetings_count, which breaks the “one metric_key per file” convention documented in the same PR. Consider moving this assertion to collab_meetings_count.test.yaml (or a separate comparison spec) and keeping this file focused on teams_meetings.

🤖 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/tests/e2e/specs/collab_teams_meetings.test.yaml` around lines
68 - 83, The new scenario in the `teams_meetings` spec is asserting
`meetings_count`, which violates the single-metric contract for this file. Move
the `meetings_count` assertion out of `collab_teams_meetings.test.yaml` into
`collab_meetings_count.test.yaml` or another comparison spec, and keep this file
limited to `teams_meetings` cases only. Use the existing test case name and
`metric_key` fields to relocate the check without changing the intended
coverage.
🤖 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.

Nitpick comments:
In `@src/ingestion/tests/e2e/specs/collab_teams_meetings.test.yaml`:
- Around line 68-83: The new scenario in the `teams_meetings` spec is asserting
`meetings_count`, which violates the single-metric contract for this file. Move
the `meetings_count` assertion out of `collab_teams_meetings.test.yaml` into
`collab_meetings_count.test.yaml` or another comparison spec, and keep this file
limited to `teams_meetings` cases only. Use the existing test case name and
`metric_key` fields to relocate the check without changing the intended
coverage.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 13bdfdfc-b398-4350-87e1-aaa4395150c1

📥 Commits

Reviewing files that changed from the base of the PR and between b844ec5ddaff7f4402b33e921493205b9deb240e and 239a4481f2b60927590f286197f9b43e5b85c4bd.

📒 Files selected for processing (15)
  • .claude/skills/metric-e2e-test/SKILL.md
  • src/ingestion/tests/e2e/specs/collab_active_days.test.yaml
  • src/ingestion/tests/e2e/specs/collab_emails_read.test.yaml
  • src/ingestion/tests/e2e/specs/collab_emails_received.test.yaml
  • src/ingestion/tests/e2e/specs/collab_emails_sent.test.yaml
  • src/ingestion/tests/e2e/specs/collab_files_engaged.test.yaml
  • src/ingestion/tests/e2e/specs/collab_files_shared_external.test.yaml
  • src/ingestion/tests/e2e/specs/collab_files_shared_internal.test.yaml
  • src/ingestion/tests/e2e/specs/collab_meeting_free.test.yaml
  • src/ingestion/tests/e2e/specs/collab_meeting_hours.test.yaml
  • src/ingestion/tests/e2e/specs/collab_meetings_count.test.yaml
  • src/ingestion/tests/e2e/specs/collab_teams_chats.test.yaml
  • src/ingestion/tests/e2e/specs/collab_teams_meeting_hours.test.yaml
  • src/ingestion/tests/e2e/specs/collab_teams_meetings.test.yaml
  • src/ingestion/tests/e2e/specs/collab_zulip_chat.test.yaml
✅ Files skipped from review due to trivial changes (4)
  • src/ingestion/tests/e2e/specs/collab_emails_received.test.yaml
  • src/ingestion/tests/e2e/specs/collab_zulip_chat.test.yaml
  • src/ingestion/tests/e2e/specs/collab_emails_read.test.yaml
  • src/ingestion/tests/e2e/specs/collab_emails_sent.test.yaml
🚧 Files skipped from review as they are similar to previous changes (3)
  • src/ingestion/tests/e2e/specs/collab_meeting_hours.test.yaml
  • src/ingestion/tests/e2e/specs/collab_teams_meeting_hours.test.yaml
  • src/ingestion/tests/e2e/specs/collab_meeting_free.test.yaml


# SAME fixture: meetings_count INCLUDES the Zoom meeting → alice = 4 Teams + 1 Zoom = 5
# team {5,2,1} → median 2, range [1,5]. Proves the Zoom row landed.
- name: teams_meetings — Zoom counts in cross-source meetings_count (value 5)

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.

technically you can check both cases in one request

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.

Deliberate additional check

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.

But it might be too much for this metric

Konstantin Tursunov added 6 commits June 25, 2026 15:38
…ics (constructorfabric#1413)

Completes per-metric bronze->silver->gold->API coverage for the m365
collaboration bullet, picking up the 10 metrics deferred from the email batch
(constructorfabric#1472):

- Teams (bronze_m365.teams_activity): m365_teams_chats, meetings_count,
  teams_meetings, meeting_hours, teams_meeting_hours, meeting_free.
- Files (bronze_m365.onedrive_activity + sharepoint_activity): m365_files_engaged,
  m365_files_shared_internal, m365_files_shared_external.
- Multi-stream (email + onedrive + teams): m365_active_days.

Each spec asserts ONLY its target metric_key's value/median/range on the IC
bullet (...0012) over a one-team (Engineering) cohort, and seeds a verbatim-
duplicate alice row so RMT/union_by_tag dedup is exercised on each new silver
class (class_collab_chat/meeting/document_activity) — the value must not double.

Adds the teams/onedrive/sharepoint bronze schemas + $ref templates. All
collaboration specs pass (45 in the full e2e suite).

Signed-off-by: Konstantin Tursunov <Konstantin.Tursunov@constructor.tech>
…rig infra

Expand collab_meeting_hours into a data-source matrix proving meeting_hours
aggregates across BOTH feeders of class_collab_meeting_activity:
  - alice: Teams + Zoom  -> 2.0  (cross-source sum)
  - bob:   Teams only    -> 1.5
  - carol: Zoom only     -> 0.5
cohort median 1.5, range [0.5, 2.0]; dedup teeth on both sources. (Zulip is
chat-only and does NOT feed meeting_hours.)

Stand up Zoom in the e2e rig (no prior Zoom support):
- create-bronze-placeholders.sh: complete the drifted bronze_zoom.participants
  placeholder (4 -> 13 columns the meeting models read) and add bronze_zoom.meetings
  (read by zoom__meeting_sessions; may stay empty — the participant->session join
  then falls back to meeting_uuid). The users/identity chain is not on the meeting
  path, so it is not needed.
- schemas/bronze_zoom.participants.yaml + templates/zoom.yaml.
- conftest.py: add zoom__collab_meeting_activity + zoom__meeting_sessions to the
  session-start truncate list. They are incremental/append, so on a warm rig they
  would otherwise accumulate duplicate unique_keys (failing their dbt `unique`
  test) and leak rows into class_collab_meeting_activity (skewing meeting_free).

Full e2e suite green (45).

Signed-off-by: Konstantin Tursunov <Konstantin.Tursunov@constructor.tech>
Replace the engineering term "cohort" with the product vocabulary across the
collaboration metric specs and the metric-e2e-test skill:
  - department = the org_unit_id grouping (gold = BambooHR department string)
  - team       = the product's label for that group's distribution
                 (team_median / team_min / team_max; the …0005 "Team bullet")

Also clarify the IC-bullet median/range spans department members WITH DATA in
the window (so a narrow window shrinks it below the full team), and restructure
the active_days description into metric -> bronze->silver->gold path -> cases.

Comment/description-only: no change to seeds, cases, or assertions.

Signed-off-by: Konstantin Tursunov <Konstantin.Tursunov@constructor.tech>
…→gold → cases)

Apply one consistent shape to every collaboration metric spec description:
  - Metric: <key> — IC Bullet Collaboration (…0012) + one-line definition
  - Path (bronze → silver → gold): the per-metric lineage, e.g.
      bronze_m365.email_activity → m365__collab_email_activity → class_collab_email_activity
    converging on insight.collab_bullet_rows
  - Team (department org_unit_id) roster + the case(s) it pins

10 single-case specs get the full shape; the 3 email date-window matrices and
meeting_hours keep their richer bodies and just gain the explicit Path section.
Lineage/definitions verified against 20260518000000_collab-bullet-rewrite.sql.

Description-only: bronze seeds and case assertions are byte-identical to HEAD,
so test behavior is unchanged.

Signed-off-by: Konstantin Tursunov <Konstantin.Tursunov@constructor.tech>
…or m365 collab

Add cross-data-variant cases to the single-case collab specs and reshape every
collab spec description to a human-readable bronze→silver→gold formula.

Coverage (rig-verified):
- files engaged / shared_internal / shared_external: per-product cases
  (OneDrive-only, SharePoint-only; external also proves a real in-team zero member)
- meetings_count: seed Zoom and prove Teams+Zoom additivity (previously Teams-only,
  never exercising the cross-source sum the metric describes)
- teams_meetings / teams_meeting_hours: seed a Zoom row and prove it is EXCLUDED
  from the m365-only slice, with a contrast assertion on the cross-source sibling
  (meetings_count / meeting_hours) confirming the row really landed
- teams_chats: per-field cases (private-DM-only, team-channel-only)

Descriptions: replace the dbt model/column lineage with a plain-language
bronze→silver→gold formula plus a brief Team/Cases line; drop the verbose
date-window "Test design" prose from the email specs.

Skill: document the description convention (metric + bronze→silver→gold formula +
Team/Cases) in metric-e2e-test/SKILL.md and reference it from the scaffolding steps.

Signed-off-by: Konstantin Tursunov <Konstantin.Tursunov@constructor.tech>
…eeting_hours

Per review (mitasovr): the seeded-Zoom exclusion check didn't earn its place.
teams_meetings / teams_meeting_hours are defined as sumIf(... data_source =
insight_m365), so their value is unchanged whether the seeded Zoom row landed or
silently failed — the check only had teeth via a meetings_count / meeting_hours
contrast assertion, which just re-tests metrics that already have their own specs
(and broke the one-metric-per-file convention). Cross-source additivity stays
covered in collab_meetings_count / collab_meeting_hours.

Revert both specs to clean single-metric form (no Zoom seeding, no contrast case).

Signed-off-by: Konstantin Tursunov <Konstantin.Tursunov@constructor.tech>
@ktursunov
ktursunov force-pushed the m365-e2e-collab-rest branch from d7d4b52 to 998ca85 Compare June 25, 2026 12:43
@ktursunov
ktursunov merged commit 68aa261 into constructorfabric:main Jun 25, 2026
18 checks passed
@ktursunov
ktursunov deleted the m365-e2e-collab-rest branch June 25, 2026 14:45
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.

Metric smoke: Collaboration metrics

2 participants