Skip to content

fix(e2e): #111 — decouple 'privates Repo' assertion from Top-6 ranking#112

Merged
GmanFooFoo merged 1 commit into
mainfrom
fix/111-e2e-privates-repo-drift
Jul 5, 2026
Merged

fix(e2e): #111 — decouple 'privates Repo' assertion from Top-6 ranking#112
GmanFooFoo merged 1 commit into
mainfrom
fix/111-e2e-privates-repo-drift

Conversation

@GmanFooFoo

@GmanFooFoo GmanFooFoo commented Jul 5, 2026

Copy link
Copy Markdown
Member

Fixes #111.

Problem

TC-CNT-071 and TC-CNT-084 asserted the anonymized "privates Repo" label appears in the visible page (Top-6 table / main), assuming a withheld-private repo ranks into the visible set. As the estate grew, the top withheld-private repo (126 tests) now ranks 8th — behind oakwoodgolfclub-website (129) — and folds into the Top-N rollup, so the label no longer renders visibly. Both tests have been red on main since 2026-07-03, and Playwright E2E is a required check → it blocked every website PR (incl. the ClearPath rename #110).

Fix

Lift the positive assertion from the ranking-dependent rendered page to the ranking-independent invariant it actually means — the withholding transform ran and produced anonymized rows in the served data:

expect(scope.per_repo.some((r) => r.repo === "privates Repo")).toBe(true);

The hard privacy guarantee is unchanged: TC-CNT-084's canary loop still asserts no raw private repo name (omnopsis-backend, snakeoil-check, …) ever renders on the page.

Verification

Full test-management spec 12/12 green under CI settings (CI=1, retries=2). ESLint clean.

Follow-up (optional, not in this PR)

A product-side alternative would surface the anonymized count in the rollup (e.g. "… und N weitere, davon M privat") so the label stays visible regardless of ranking — an estate-display decision for a later pass.

🤖 Generated with Claude Code

https://claude.ai/code/session_013Sxyx5TvFWqVXYMfZoLztw

Summary by CodeRabbit

  • Tests
    • Improved end-to-end coverage for the test management page by making privacy-related checks independent of ranking or rollup behavior.
    • Validation now confirms anonymized private repository data is present in the underlying scope, reducing false failures when those rows are not shown in the visible table.

TC-CNT-071 and TC-CNT-084 asserted the anonymized "privates Repo" label appears
in the visible page (Top-6 table / main), which assumed a withheld-private repo
ranks into the visible set. As the estate grew, the top withheld-private repo
(126 tests) now ranks 8th — behind oakwoodgolfclub-website (129) — and folds into
the Top-N rollup, so the literal label no longer renders visibly. Both tests have
been red on main since 2026-07-03 (a required check → blocked every website PR).

Fix: lift the positive assertion from the ranking-dependent rendered page to the
ranking-independent invariant it actually means — that the withholding transform
ran and produced anonymized rows in the served data
(`scope.per_repo.some(r => r.repo === "privates Repo")`). The hard privacy
guarantee is unchanged: TC-CNT-084's canary loop still asserts no raw private
repo name ever renders on the page.

Verified: full test-management spec 12/12 green under CI settings (CI=1, retries=2).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013Sxyx5TvFWqVXYMfZoLztw
@vercel

vercel Bot commented Jul 5, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
neckarshore-website Ready Ready Preview, Comment Jul 5, 2026 1:45pm

Request Review

@coderabbitai

coderabbitai Bot commented Jul 5, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

Two e2e test cases (TC-CNT-071, TC-CNT-084) in test-management-page.spec.ts are updated to verify the withheld-private "privates Repo" row by loading and inspecting scope.per_repo data rather than checking rendered table text, avoiding dependence on Top-N ranking/rollup visibility.

Changes

Ranking-independent privacy assertions

Layer / File(s) Summary
Scope-based assertion updates
tests/e2e/test-management-page.spec.ts
TC-CNT-071 and TC-CNT-084 now call loadScope() and assert scope.per_repo contains a "privates Repo" anonymized entry instead of checking rendered table/page text.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Linked Issues check ⚠️ Warning The PR addresses TC-CNT-071 and TC-CNT-084, but the linked issue also calls out TC-CNT-085 and this change does not touch it. Also update or verify TC-CNT-085 so the full failure set in #111 is resolved.
✅ Passed checks (4 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 describes the main change: making the 'privates Repo' assertion independent of Top-6 ranking.
Out of Scope Changes check ✅ Passed The only change is a targeted adjustment to the test-management E2E spec, which matches the linked issue scope.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/111-e2e-privates-repo-drift

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

@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)
tests/e2e/test-management-page.spec.ts (1)

256-261: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Minor: reuse a stored scope variable for consistency with TC-CNT-071.

Line 261 calls loadScope() inline instead of assigning it to a variable the way TC-CNT-071 does at Line 130. Functionally fine (cheap synchronous file read), just a small style inconsistency between the two updated tests.

♻️ Optional consistency tweak
-    expect(loadScope().per_repo.some((r) => r.repo === "privates Repo")).toBe(true);
+    const scope = loadScope();
+    expect(scope.per_repo.some((r) => r.repo === "privates Repo")).toBe(true);
🤖 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 `@tests/e2e/test-management-page.spec.ts` around lines 256 - 261, The test in
loadScope currently calls the helper inline, but TC-CNT-071 uses a stored scope
variable for consistency. Update the relevant assertion in
test-management-page.spec.ts to assign the result of loadScope() to a local
scope variable first, then use that variable in the per_repo check so the style
matches the other updated test.
🤖 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 `@tests/e2e/test-management-page.spec.ts`:
- Around line 256-261: The test in loadScope currently calls the helper inline,
but TC-CNT-071 uses a stored scope variable for consistency. Update the relevant
assertion in test-management-page.spec.ts to assign the result of loadScope() to
a local scope variable first, then use that variable in the per_repo check so
the style matches the other updated test.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 364af06d-12a9-4fe5-ab91-69ba63ae0fbc

📥 Commits

Reviewing files that changed from the base of the PR and between 26fa725 and bdd9acc.

📒 Files selected for processing (1)
  • tests/e2e/test-management-page.spec.ts

@GmanFooFoo GmanFooFoo merged commit 9e81581 into main Jul 5, 2026
10 checks passed
@GmanFooFoo GmanFooFoo deleted the fix/111-e2e-privates-repo-drift branch July 5, 2026 13:59
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.

E2E red on main: TC-CNT-071/084/085 — top withheld-private repo fell out of Top-6 (estate data drift)

1 participant