You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Part of #4189. Depends on #4190. Feeds into #4191 (the prompt builder consumes these instructions directly).
Context
CodeRabbit's own test-generation config isn't a framework dropdown — it's free-text path_instructions attached to glob patterns in .coderabbit.yaml (e.g. "use vitest for **/*.ts," "use React Testing Library for component dirs"), which CodeRabbit says "become part of CodeRabbit's context for future test generation." Maintainers here have the same need: test-coverage expectations vary per repo and per path (e.g. "always test the payment-failure retry path, not just the happy path" for a checkout module), and that guidance needs to be config-as-code, not something re-typed into every @gittensory generate-tests invocation.
This is additive to #4190's plain features.e2eTests: true/false toggle — a boolean can't hold free-text instructions, so this issue adds a richer config surface alongside it, following the exact same global-default → per-repo-override precedence already established for every other .gittensory.yml block (src/selfhost/private-config.ts).
Requirements
Add a review.e2eTestGeneration config block: a repo-wide free-text instructions string, plus an optional pathInstructions: [{ path: string, instructions: string }] list for glob-scoped rules — mirroring the shape (not necessarily the exact key names) of CodeRabbit's path_instructions.
Global default in config/examples/global.gittensory.yml, per-repo override in config/examples/repo-override.gittensory.yml, public schema documented in .gittensory.yml.example — same three-file pattern feat(review): register e2eTests as the sixth converged-feature key #4190 already establishes for features:.
Array-vs-object merge semantics must follow the existing convention: array fields (pathInstructions) REPLACE the global default wholesale when a per-repo file sets them, never concatenate (see the existing wantedPaths precedent in config/examples/repo-override.gittensory.yml).
Parse and validate path-instruction globs the same way other path-glob config is validated elsewhere in the codebase (reuse existing glob-matching utilities — do not add a second glob engine).
Feed the resolved instructions (repo-wide + any path-instructions matching the PR's changed files) into feat(review): LLM core to turn a PR diff into Playwright E2E test source #4191's prompt builder as a distinct, clearly-labeled prompt section, analogous to how buildTestEvidencePromptSection already isolates test-related context.
Unit tests: repo-wide instructions apply to every generation; path-scoped instructions apply only when the PR touches a matching path; a per-repo file with no pathInstructions set inherits the global default's list (not an empty one) per the standard deep-merge rule; a per-repo file that DOES set pathInstructions replaces the global list wholesale.
Expected outcome
A maintainer can steer what "good test coverage" means for their repo (or a specific area of it) once, in config, and every future generation — whether auto-triggered or explicitly commanded — respects it, the same way CodeRabbit's path_instructions work today.
Part of #4189. Depends on #4190. Feeds into #4191 (the prompt builder consumes these instructions directly).
Context
CodeRabbit's own test-generation config isn't a framework dropdown — it's free-text
path_instructionsattached to glob patterns in.coderabbit.yaml(e.g. "use vitest for**/*.ts," "use React Testing Library for component dirs"), which CodeRabbit says "become part of CodeRabbit's context for future test generation." Maintainers here have the same need: test-coverage expectations vary per repo and per path (e.g. "always test the payment-failure retry path, not just the happy path" for a checkout module), and that guidance needs to be config-as-code, not something re-typed into every@gittensory generate-testsinvocation.This is additive to #4190's plain
features.e2eTests: true/falsetoggle — a boolean can't hold free-text instructions, so this issue adds a richer config surface alongside it, following the exact same global-default → per-repo-override precedence already established for every other.gittensory.ymlblock (src/selfhost/private-config.ts).Requirements
review.e2eTestGenerationconfig block: a repo-wide free-textinstructionsstring, plus an optionalpathInstructions: [{ path: string, instructions: string }]list for glob-scoped rules — mirroring the shape (not necessarily the exact key names) of CodeRabbit'spath_instructions.config/examples/global.gittensory.yml, per-repo override inconfig/examples/repo-override.gittensory.yml, public schema documented in.gittensory.yml.example— same three-file pattern feat(review): register e2eTests as the sixth converged-feature key #4190 already establishes forfeatures:.pathInstructions) REPLACE the global default wholesale when a per-repo file sets them, never concatenate (see the existingwantedPathsprecedent inconfig/examples/repo-override.gittensory.yml).buildTestEvidencePromptSectionalready isolates test-related context.Deliverables
review.e2eTestGeneration.instructions+pathInstructionsparsed from.gittensory.ymlwith the standard global/per-repo precedence.pathInstructionsset inherits the global default's list (not an empty one) per the standard deep-merge rule; a per-repo file that DOES setpathInstructionsreplaces the global list wholesale.Expected outcome
A maintainer can steer what "good test coverage" means for their repo (or a specific area of it) once, in config, and every future generation — whether auto-triggered or explicitly commanded — respects it, the same way CodeRabbit's
path_instructionswork today.Resources / examples
path_instructions: https://docs.coderabbit.ai/configuration/path-instructionsconfig/examples/global.gittensory.yml,config/examples/repo-override.gittensory.yml,.gittensory.yml.example(the three-file pattern to extend)src/services/ai-review.ts:823(buildTestEvidencePromptSection— the pattern for isolating a labeled context section in the prompt)Effort
M — config parsing follows established patterns; the prompt-integration and glob-matching-reuse parts need care.