Skip to content

ci: isolate dropped-language-gap.test.ts as a regression canary#1169

Merged
carlos-alm merged 3 commits into
mainfrom
fix/1147-dropped-language-gap-test
May 20, 2026
Merged

ci: isolate dropped-language-gap.test.ts as a regression canary#1169
carlos-alm merged 3 commits into
mainfrom
fix/1147-dropped-language-gap-test

Conversation

@carlos-alm

Copy link
Copy Markdown
Contributor

Summary

  • Add an isolated CI step in the engine-parity job that runs only tests/integration/dropped-language-gap.test.ts with CODEGRAPH_PARITY=1, on all three OS runners.
  • The broader test job already runs this file as part of npm test, but a failure there gets buried in 500+ test names. The standalone step gives the gap-repair canary its own visible status check on every PR.

Why

Issue #1147 reported that both tests in dropped-language-gap.test.ts fail on main (commit c7e600a). I could not reproduce locally or via CI history:

Rather than close the issue purely on "I can't reproduce", this PR adds an isolated guard so any future regression of the gap-repair path (#1083) — exactly the bug shape #1147 described, "node row never re-inserted" — surfaces under its own clear name and rules out test pollution from other files in the larger suite as a cause.

Test plan

  • npx vitest run tests/integration/dropped-language-gap.test.ts --reporter=verbose passes locally with CODEGRAPH_PARITY=1 (matches the new step exactly).
  • YAML lint clean (python3 -c 'import yaml; yaml.safe_load(...)').
  • Verify the new Dropped-language gap regression guard (#1147) step shows up green on the parity matrix in this PR's CI.

Refs #1147

Add a dedicated step in the engine-parity job that runs only
`tests/integration/dropped-language-gap.test.ts`. The broader `test`
job already runs this file as part of `npm test`, but a failure there
gets buried in 500+ test names. The standalone step surfaces a clear
"Dropped-language gap regression guard" status on every PR and rules
out test pollution from neighbouring files when the canary fires.

The gap-repair path (#1083) is load-bearing for engine parity but
silently breaks if `backfillNativeDroppedFiles` ever stops writing the
file node row — exactly the shape #1147 reported.

Refs #1147
@claude

claude Bot commented May 19, 2026

Copy link
Copy Markdown

Claude finished @carlos-alm's task —— View job


Reviewing PR: CI isolation for dropped-language-gap.test.ts

Todo List:

  • Read and analyze the CI workflow changes
  • Conduct root cause analysis of the problem being solved
  • Check for configuration changes and potential rule relaxation
  • Evaluate test integrity and approach
  • Apply backlog compliance grading
  • Provide structured review feedback with rating

Root Cause Analysis

Problem Being Solved: Issue #1147 reported that dropped-language-gap.test.ts tests were failing on main, but the author couldn't reproduce the failures. Rather than ignoring the issue, this PR adds an isolated CI step to provide clear visibility for future regressions in the gap-repair path.

Why This Approach: The tests already run as part of the broader test job, but failures get buried among 500+ test names. The isolated step gives this critical regression canary its own visible status check. This is a responsible approach - creating better observability rather than masking symptoms.

Risk Assessment: Minimal risk. This is purely additive CI monitoring with no changes to test logic, timeouts, or thresholds.

Backlog Compliance

  • Zero-dep: ✓ — No new runtime dependencies, uses existing vitest infrastructure
  • Foundation-aligned: ✓ — Pure CI observability improvement, no violations
  • Problem-fit: 3 — Useful for engineering quality but doesn't directly address AI navigation/token waste
  • Breaking: No — Purely additive CI step, no API or behavior changes
  • Tier: 1

Analysis

Configuration Changes (Phase 2): ✅ CLEAR

  • No linting rules relaxed
  • No test timeouts increased
  • No build configuration modified
  • Pure additive CI step

Test Integrity (Phase 3): ✅ EXCELLENT

Code Quality (Phase 4): ✅ GOOD

  • Clean YAML syntax
  • Proper step naming with issue reference
  • Good documentation in comments explaining the rationale
  • Follows existing CI job patterns

Technical Assessment:

  • Lines 286-290: New step runs only the specific test file with verbose reporting
  • Uses same environment (CODEGRAPH_PARITY=1) as other parity tests
  • Comprehensive comment (lines 280-285) explains the business justification
  • Executes on all three OS matrices for comprehensive coverage

Strengths:

  1. Defensive engineering: Rather than dismissing an unreproducible bug report, adds monitoring
  2. Clear separation: Isolated step prevents masking failures in the broader test suite
  3. Load-bearing test: The gap-repair logic (follow-up: backfill misses newly-added dropped-language files on incrementals #1083) is critical for engine parity
  4. Good documentation: Comments explain why this specific test needs isolation

Minor Observations:

  • The step runs after the main parity tests, so it won't fail-fast if there are earlier issues
  • Could potentially be optimized by running in parallel, but the current placement is fine

Final Recommendation

  • Rating: ⭐⭐⭐⭐☆ (4/5)
  • Action: APPROVE
  • Reasoning: This is solid defensive engineering that improves observability for a critical code path without any negative impacts. The approach is thoughtful - providing visibility rather than masking symptoms, with clear documentation of the rationale.

@greptile-apps

greptile-apps Bot commented May 19, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

Adds an isolated regression canary step to the engine-parity CI matrix (Linux / macOS / Windows) that runs only tests/integration/dropped-language-gap.test.ts with CODEGRAPH_PARITY=1. This gives the gap-repair path its own named status check instead of burying a potential failure inside the 500+ test npm test run.

  • The new step is placed directly after the existing Run parity tests step, uses identical shell: bash + CODEGRAPH_PARITY: '1' conventions, and exercises the same native-addon setup already performed by earlier steps in the same job.
  • No functional production code is changed; the only risk surface is the CI YAML itself, where the change is minimal and well-scoped.

Confidence Score: 5/5

Safe to merge — only adds a read-only CI step with no production code changes.

The change is a single new step appended to an existing matrix job. It reuses the native-addon setup already done by prior steps in the same job, mirrors the exact conventions of the neighbouring parity step (shell, env var, vitest invocation), and touches nothing outside the CI workflow file.

No files require special attention.

Important Files Changed

Filename Overview
.github/workflows/ci.yml Adds one new step to the existing engine-parity matrix job that runs dropped-language-gap.test.ts in isolation with CODEGRAPH_PARITY=1; matches surrounding step conventions (shell, env, command style) and applies to all three OS runners.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[engine-parity matrix\nubuntu / macos / windows] --> B[Checkout & Setup Node.js]
    B --> C[Install dependencies]
    C --> D[Download PR-built native addon]
    D --> E[Install native addon over published binary]
    E --> F[Verify native addon is available]
    F --> G[Run parity tests\ntests/engines/ + build-parity.test.ts\nCODEGRAPH_PARITY=1]
    G --> H["NEW: Dropped-language gap regression guard #1147\ntests/integration/dropped-language-gap.test.ts\nCODEGRAPH_PARITY=1"]
    H --> I[Job complete — all three OS runners]
Loading

Reviews (3): Last reviewed commit: "Merge branch 'main' into fix/1147-droppe..." | Re-trigger Greptile

@carlos-alm carlos-alm merged commit 198cf22 into main May 20, 2026
21 checks passed
@carlos-alm carlos-alm deleted the fix/1147-dropped-language-gap-test branch May 20, 2026 02:02
@github-actions github-actions Bot locked and limited conversation to collaborators May 20, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant