Skip to content

🧪 Add tests for autoformalization_route_note_path in formalization.py - #7

Open
Wenbobobo wants to merge 1 commit into
mainfrom
tests/formalization-autoformalization-route-note-path-11522391504796597566
Open

🧪 Add tests for autoformalization_route_note_path in formalization.py#7
Wenbobobo wants to merge 1 commit into
mainfrom
tests/formalization-autoformalization-route-note-path-11522391504796597566

Conversation

@Wenbobobo

Copy link
Copy Markdown
Owner

🎯 What: Adding a new test file tests/test_formalization.py to cover the autoformalization_route_note_path function and its internal string formatting helper _route_note_slug.
📊 Coverage: Tests handle the standard expected happy path along with various edge cases: files lacking a Lean extension, files with unsafe symbols, and empty file scenarios resulting in a fallback "objective" path.
Result: Improved module test coverage. Changes were also locally verified to correctly catch deliberately injected failures.


PR created automatically by Jules for task 11522391504796597566 started by @Wenbobobo

@google-labs-jules

Copy link
Copy Markdown

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

Copilot AI review requested due to automatic review settings July 11, 2026 09:51

Copilot AI 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.

Pull request overview

Adds a focused pytest suite for archonlib.formalization path/slug generation used by autoformalization route notes, improving coverage around filename normalization and edge-case handling.

Changes:

  • Introduces tests/test_formalization.py to validate _route_note_slug sanitization rules (Lean suffix stripping, slash-to-hyphen mapping, invalid character handling, and "objective" fallback).
  • Adds assertions for autoformalization_route_note_path() to ensure it constructs the expected .archon/informal/<slug>-autoformalize.md path, including empty input behavior.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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.

2 participants