Skip to content

checks: add actionable assertion messages to advanced OOP checks - #164

Merged
abhiksark merged 11 commits into
abhiksark:devfrom
mercael91:fix/issue-107
Nov 4, 2026
Merged

abhiksark merged 11 commits into
abhiksark:devfrom
mercael91:fix/issue-107

Conversation

@mercael91

@mercael91 mercael91 commented Oct 17, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Add actionable messages to all eight bare assertions in checks/oop_advanced/oop_advanced1.py through oop_advanced6.py, completing #107. Predicates, helper statements, execution order, and success output are preserved.

The maintainer follow-up removes temporary got, area, count, and text bindings so checks do not replace learner variables in the shared namespace. A focused regression fails on the previous area overwrite and passes with the original predicate restored. Changed files include the required location comments.

Closes #107.

Validation

Reviewed head: 2b954abd8ab4a62c13f00744cb5c631b1983007f. Local platform: Linux, Python 3.13.13.

  • python -m pytest -q: 216 passed on the PR branch.
  • Applied the PR to current dev at f5a7779349d692938d1b5e53e5af0ef7e6fe9b0f; python -m pytest -q: 243 passed.
  • python -m pythonlings --root tests/fixtures/passing_curriculum verify: passed.
  • All six scoped reference solutions passed; representative wrong answers were rejected with expected-value messages.
  • AST comparison confirms unchanged predicates, helper statements, execution order, and success output.
  • Regression test tests/unit/test_check_namespaces.py: failed on the original helper assignment (area changed from 0 to 19), passed after the fix.
  • Changed Python files have location comments, fit 80 columns, and parse with Python 3.9 syntax; hosted CI covers supported runtimes.
  • PIP_CONFIG_FILE=/dev/null PIP_INDEX_URL=https://pypi.org/simple PIP_EXTRA_INDEX_URL= PIP_DEFAULT_TIMEOUT=15 PIP_RETRIES=0 python -m build --outdir /tmp/pythonlings-pr-loop.dfKE0X/pr-164-dist: source and wheel built.
  • /tmp/pythonlings-pr-loop.dfKE0X/wheel-venv/bin/python -m pip install --no-deps --force-reinstall /tmp/pythonlings-pr-loop.dfKE0X/pr-164-dist/pythonlings-0.4.4-py3-none-any.whl: installed into a temporary environment.
  • Installed-wheel smoke outside the checkout: workspace initialization and all six affected reference solutions passed.
  • git diff --check: passed.

Hosted CI must pass at this head before squash merge into dev.

All eight hosted CI jobs passed at the reviewed head.

Signed-off-by: mercael <mercael91@gmail.com>
Signed-off-by: mercael <mercael91@gmail.com>
Signed-off-by: mercael <mercael91@gmail.com>
@coderabbitai

coderabbitai Bot commented Oct 17, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 8e93dc17-a707-4487-b9bb-3158ea951b1b

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@mercael91 mercael91 changed the title Fix #107 checks: add actionable assertion messages to advanced OOP checks Oct 17, 2026
Keep the original assertions and helper statements while adding messages.
Avoid temporary bindings that overwrite learner variables in the shared
namespace. Add a regression for the learner-owned area variable and the
required file-location comments. Refs abhiksark#107.

@abhiksark abhiksark left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Reviewed all eight messages against #107. The follow-up restores the original predicates and helper statements, preserves learner globals, and adds a regression that rejects the original area overwrite. All six reference/wrong-answer cases, branch tests (216), current-dev integration tests (243), fixture/build/installed-wheel checks, and all eight hosted CI jobs passed.

@abhiksark
abhiksark merged commit 2be5221 into abhiksark:dev Nov 4, 2026
9 checks passed
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