-
Notifications
You must be signed in to change notification settings - Fork 301
fix(learner): make ace-learn logs informative and user-friendly #111
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -771,13 +771,15 @@ def learn_from_transcript( | |||||||||||||||
| self, | ||||||||||||||||
| transcript_path: Path, | ||||||||||||||||
| start_line: int = 0, | ||||||||||||||||
| verbose: bool = False, | ||||||||||||||||
| ) -> bool: | ||||||||||||||||
| """ | ||||||||||||||||
| Learn from a transcript file. | ||||||||||||||||
|
|
||||||||||||||||
| Args: | ||||||||||||||||
| transcript_path: Path to Claude Code transcript JSONL | ||||||||||||||||
| start_line: Start learning from this line (for incremental learning) | ||||||||||||||||
| verbose: Print detailed progress to stdout | ||||||||||||||||
|
|
||||||||||||||||
| Returns: | ||||||||||||||||
| True if learning succeeded | ||||||||||||||||
|
|
@@ -792,8 +794,14 @@ def learn_from_transcript( | |||||||||||||||
| logger.info( | ||||||||||||||||
| f"Skipping trivial session ({actual_lines} lines, minimum {MIN_LINES})" | ||||||||||||||||
| ) | ||||||||||||||||
|
Comment on lines
794
to
796
|
||||||||||||||||
| logger.info( | |
| f"Skipping trivial session ({actual_lines} lines, minimum {MIN_LINES})" | |
| ) | |
| if not verbose: | |
| logger.info( | |
| f"Skipping trivial session ({actual_lines} lines, minimum {MIN_LINES})" | |
| ) |
Copilot
AI
Mar 20, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
New verbose behavior introduces additional stdout output (task context + feedback) but there are no existing unit tests covering verbose=True/False output differences. Consider adding tests (e.g., using pytest capsys) to assert the presence/absence of these lines so future refactors don’t regress the CLI UX.
Copilot
AI
Mar 20, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
skills_before is assigned but never used, which looks like leftover code and can trigger linting failures. Either remove it, or use it to report a per-transcript net change after _persist_skillbook_update(...) succeeds.
| # Count skills before update so we can report the delta | |
| skills_before = len(self.skillbook.skills()) |
Copilot
AI
Mar 20, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When --verbose is enabled, this prints a user-facing progress line and also logs Running Reflector... at INFO, which results in duplicate progress output (stdout + stderr). Prefer making the logger call DEBUG, or suppressing one of the two in verbose mode.
Copilot
AI
Mar 20, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same duplication issue as Reflector: in verbose mode you'll get both the print(...) progress message and logger.info("Running SkillManager..."). Consider using DEBUG for the logger message or gating one of them.
Copilot
AI
Mar 20, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR description says the "Analyzing session..." step should include the session ID and line count, but this message is currently generic. Either include {session_id} / {lines_desc} here, or update the PR description to match the actual output.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The
verboseparameter docstring says it controls printing detailed progress, but this method now prints multiple progress lines even whenverbose=False(session id, Reflector/SkillManager, strategy summary). Update the docstring to reflect thatverboseonly enables additional details, or gate the non-verbose prints behindverboseas well to match the documentation.