Skip to content

fix: enable continual learning trial mode by default - #261

Open
Ray0907 wants to merge 1 commit into
cursor:mainfrom
Ray0907:fix/continual-learning-trial-default
Open

fix: enable continual learning trial mode by default#261
Ray0907 wants to merge 1 commit into
cursor:mainfrom
Ray0907:fix/continual-learning-trial-default

Conversation

@Ray0907

@Ray0907 Ray0907 commented Aug 25, 2026

Copy link
Copy Markdown

Summary

  • enable the documented continual-learning trial cadence when no trial-mode env override is set
  • preserve explicit CONTINUAL_LEARNING_TRIAL_MODE and legacy env overrides
  • add a regression test that exercises the installed hook for three completed turns
  • clarify that trial mode is enabled by the plugin default, rather than by hook config

Test plan

  • bun test continual-learning/hooks/continual-learning-stop.test.ts
  • git diff --check
  • jq empty continual-learning/hooks/hooks.json continual-learning/.cursor-plugin/plugin.json

Note

Low Risk
Behavior change increases how often continual-learning may trigger for users who relied on the old implicit “trial off” default; no auth or data-handling impact.

Overview
Trial cadence now applies by default when CONTINUAL_LEARNING_TRIAL_MODE (and the legacy alias) is not set. The stop hook treats a missing env value as "true" before parseBoolean, so new installs get the faster trial thresholds (3 turns / 15 minutes) instead of silently using only the long default cadence.

Explicit env overrides are unchanged: setting the trial-mode vars to false still disables trial behavior. Docs now state that trial mode is enabled by default in the plugin, not tied to hook config wording.

A Bun integration test spawns the stop hook three times with trial env vars cleared and asserts the third completed turn emits followup_message.

Reviewed by Cursor Bugbot for commit 564b3e1. Bugbot is set up for automated code reviews on this repo. Configure here.

@cursor cursor 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.

Cursor Bugbot has reviewed your changes using high effort and found 2 potential issues.

Fix All in Cursor

Bugbot Autofix is ON, but it could not run because the branch was deleted or merged before autofix could start.

Reviewed by Cursor Bugbot for commit 564b3e1. Configure here.

): Promise<Record<string, unknown>> {
const env_hook = { ...process.env };
delete env_hook.CONTINUAL_LEARNING_TRIAL_MODE;
delete env_hook.CONTINUOUS_LEARNING_TRIAL_MODE;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fragile trial default regression test

Low Severity · Potential Edge Case

The new regression test only clears the trial-mode env keys before spawning the hook. Inherited CONTINUAL_LEARNING_MIN_TURNS or CONTINUAL_LEARNING_TRIAL_MIN_TURNS (and legacy names) can still shape cadence, so the three-turn assertion can pass without trial defaults working, or fail when trial defaults are correct.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 564b3e1. Configure here.

async function runHook(
dir_workspace: string,
path_transcript: string,
count_turn: number

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ambiguous string hook helper args

Low Severity · Bugbot Rules

runHook takes two consecutive string parameters (dir_workspace and path_transcript), so a swapped call site type-checks but would point cwd and transcript_path at the wrong paths. This violates the review rule that same-type TypeScript parameters should use a named-args object instead.

Fix in Cursor Fix in Web

Triggered by team rule: No ambiguous args at callsite in typescript

Reviewed by Cursor Bugbot for commit 564b3e1. Configure here.

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.

1 participant