Part of #4189. Depends on #4190.
Context
src/review/fix-handoff.ts is the exact blueprint for this feature's gating logic, already verified line-for-line:
// fix-handoff.ts:11-13
export function isFixHandoffEnabled(env: { GITTENSORY_REVIEW_FIX_HANDOFF?: string | undefined }): boolean {
return /^(1|true|yes|on)$/i.test(env.GITTENSORY_REVIEW_FIX_HANDOFF ?? "");
}
// fix-handoff.ts:25-36
export function shouldEmitFixHandoff(
env: { GITTENSORY_REVIEW_FIX_HANDOFF?: string | undefined; GITTENSORY_REVIEW_REPOS?: string | undefined },
repoFullName: string,
manifestToggle: boolean | undefined,
): boolean {
void repoFullName;
if (!isFixHandoffEnabled(env)) return false;
return manifestToggle === true;
}
Two important differences for this feature, both already resolved by #4190's design: (1) fix-handoff's review.fixHandoff is a bespoke boolean with no allowlist fallback, whereas e2eTests is a full converged-feature key, so its gate should call resolveConvergedFeature/convergedFeatureActive (src/review/feature-activation.ts:46-72) rather than reimplementing shouldEmitFixHandoff's strict-=== true logic; (2) unlike safety/grounding, e2eTests needs no asymmetric floor/ceiling — a plain symmetric override.
Requirements
- New file
src/review/e2e-test-gen.ts, exporting a thin isE2eTestGenEnabledForRepo (or similarly named) function that wraps convergedFeatureActive(env, repoFullName, "e2eTests") — no reimplementation of the precedence logic, which already lives in feature-activation.ts.
- Pure, no I/O beyond what
convergedFeatureActive already does (a cached manifest load) — this file itself must stay synchronous/pure wherever possible, matching fix-handoff.ts's discipline of keeping the gate logic trivially unit-testable.
- No behavior change when the feature is off: an unconfigured repo must be byte-identical to today.
Deliverables
Expected outcome
A single, pure, well-tested gate function every later sub-issue (render, dispatch, PR command) calls instead of re-deriving the precedence — exactly the role isFixHandoffEnabled/shouldEmitFixHandoff play for fix-handoff today.
Resources / examples
src/review/fix-handoff.ts (full file — the pattern to mirror, not copy verbatim, since this feature rides the converged-feature registry instead of a bespoke boolean)
src/review/feature-activation.ts:46-72 (resolveConvergedFeature, convergedFeatureActive)
test/unit/feature-activation.test.ts (existing generic precedence tests to extend)
Effort
S — thin wrapper, no new precedence logic.
Part of #4189. Depends on #4190.
Context
src/review/fix-handoff.tsis the exact blueprint for this feature's gating logic, already verified line-for-line:Two important differences for this feature, both already resolved by #4190's design: (1) fix-handoff's
review.fixHandoffis a bespoke boolean with no allowlist fallback, wherease2eTestsis a full converged-feature key, so its gate should callresolveConvergedFeature/convergedFeatureActive(src/review/feature-activation.ts:46-72) rather than reimplementingshouldEmitFixHandoff's strict-=== truelogic; (2) unlikesafety/grounding,e2eTestsneeds no asymmetric floor/ceiling — a plain symmetric override.Requirements
src/review/e2e-test-gen.ts, exporting a thinisE2eTestGenEnabledForRepo(or similarly named) function that wrapsconvergedFeatureActive(env, repoFullName, "e2eTests")— no reimplementation of the precedence logic, which already lives infeature-activation.ts.convergedFeatureActivealready does (a cached manifest load) — this file itself must stay synchronous/pure wherever possible, matchingfix-handoff.ts's discipline of keeping the gate logic trivially unit-testable.Deliverables
src/review/e2e-test-gen.tswith the gate function, matching the precedence already established by feat(review): register e2eTests as the sixth converged-feature key #4190'sresolveConvergedFeature/convergedFeatureActive.features.e2eTests: true/false⇒ that value; unset ⇒ allowlist default.Expected outcome
A single, pure, well-tested gate function every later sub-issue (render, dispatch, PR command) calls instead of re-deriving the precedence — exactly the role
isFixHandoffEnabled/shouldEmitFixHandoffplay for fix-handoff today.Resources / examples
src/review/fix-handoff.ts(full file — the pattern to mirror, not copy verbatim, since this feature rides the converged-feature registry instead of a bespoke boolean)src/review/feature-activation.ts:46-72(resolveConvergedFeature,convergedFeatureActive)test/unit/feature-activation.test.ts(existing generic precedence tests to extend)Effort
S — thin wrapper, no new precedence logic.