Skip to content

feat(review): resolver gate for e2eTests — src/review/e2e-test-gen.ts #4192

Description

@JSONbored

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

  • src/review/e2e-test-gen.ts with the gate function, matching the precedence already established by feat(review): register e2eTests as the sixth converged-feature key #4190's resolveConvergedFeature/convergedFeatureActive.
  • Unit tests: env kill-switch off ⇒ always false regardless of manifest; per-repo 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/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.

Metadata

Metadata

Assignees

Labels

maintainer-onlyOwner-only work — yields no Gittensor points.orbGittensory Orb related - maintainer self-hosting analytics.roadmapOn the Wave-2 agent-layer roadmap board (project 9)

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions