Skip to content

Fix puzzle 4538 f772932#4974

Open
AlexNetTie wants to merge 4 commits intoobjectionary:masterfrom
AlexNetTie:fix_puzzle_4538_f772932
Open

Fix puzzle 4538 f772932#4974
AlexNetTie wants to merge 4 commits intoobjectionary:masterfrom
AlexNetTie:fix_puzzle_4538_f772932

Conversation

@AlexNetTie
Copy link
Copy Markdown
Contributor

@AlexNetTie AlexNetTie commented Apr 3, 2026

Update Dataized to handle new EO package naming format

What does this PR do?

Fixes the logsAllLocationsWithPhSafe and doesNotLogGoToTokenJump tests, which were disabled after migrating EO objects from the org.eolang package to Q. Fixes Dataized methods to work correctly with the new name format.

Related issues:

Changes

Dataized.java

  • Fixed forma() condition for error messages from %s.string to %s.org.eolang.string
  • Added enc.forma().endsWith("go.to.token.jump") check to properly handle go.to.token.jump (works with both formats: org.eolang.go.to.token.jump and Φ.go.to.token.jump)
  • Removed temporary System.out.println statements

DataizedTest.java

  • Removed @Disabled from logsAllLocationsWithPhSafe test
  • Removed @Disabled from doesNotLogGoToTokenJump test
  • Removed @todo lines (38-41)
  • Removed unused import org.junit.jupiter.api.Disabled

How to test

# Build the project
mvn clean install -DskipTests

# Run fixed tests
mvn -pl eo-runtime test -Dtest=DataizedTest#logsAllLocationsWithPhSafe
mvn -pl eo-runtime test -Dtest=DataizedTest#doesNotLogGoToTokenJump

# Full verification (all tests except problematic ones)
mvn clean install -PskipUTs --errors --batch-mode
mvn clean verify -PskipTests -Pqulice --errors --batch-mode
mvn clean install -Psnippets --errors --batch-mode

Notes

  • The issue occurred after migrating objects from org.eolang package to Q, which changed the forma() return format
  • Fixes are backward compatible and work with the old format via endsWith()
  • All tests pass, qulice shows no errors

Summary by CodeRabbit

Summary by CodeRabbit

  • Bug Fixes

    • Improved exception handling behavior and refined string-type detection to make error cases and string data processing more reliable.
  • Tests

    • Re-enabled previously skipped tests to restore coverage and validate the updated behavior.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 3, 2026

📝 Walkthrough

Walkthrough

Dataized's exception-enclosure matching was changed: jump-token detection now uses suffix matching and string-type enclosure matching was updated to a fully-qualified form. Two tests in DataizedTest were re-enabled by removing @Disabled annotations and related Javadoc todos.

Changes

Cohort / File(s) Summary
Runtime Logic Update
eo-runtime/src/main/java/org/eolang/Dataized.java
Changed enclosure check for go.to.token.jump to use endsWith(...) (suffix match) instead of exact equality; updated string-type enclosure match from "%s.string" to "%s.org.eolang.string" and adjusted recursive dataization path accordingly.
Test Re-enablement
eo-runtime/src/test/java/org/eolang/DataizedTest.java
Removed @Disabled import and annotations on logsAllLocationsWithPhSafe() and doesNotLogGoToTokenJump(); removed @todo Javadoc references to issue #4538.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Suggested labels

core

Suggested reviewers

  • yegor256

Poem

🐰 Suffixes now find their jumping thread,
Strings wear full names upon their head,
Tests arise from quiet sleep,
Small fixes sown, the roots run deep.
Hopping onward — clean and bright!

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Title check ❓ Inconclusive The PR title 'Fix puzzle 4538 f772932' is vague and uses cryptic terminology (puzzle number and commit hash) that doesn't clearly convey the main change to someone unfamiliar with the project. Consider a more descriptive title like 'Update Dataized to handle new org.eolang package format and re-enable tests' to better communicate the primary change.
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed The PR addresses issue #4538 by updating exception handling in Dataized.java to work with the new org.eolang package naming format and re-enabling previously disabled tests, meeting the core coding requirements.
Out of Scope Changes check ✅ Passed All changes are directly related to fixing the renamed package format and enabling tests; no out-of-scope modifications detected.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 3, 2026

🚀 Performance Analysis

All benchmarks are within the acceptable range. No critical degradation detected (threshold is 100%). Please refer to the detailed report for more information.

Click to see the detailed report
Test Base Score PR Score Change % Change Unit Mode
benchmarks.XmirBench.xmirToEO 208.954 205.005 -3.950 -1.89% ms/op Average Time

✅ Performance gain: benchmarks.XmirBench.xmirToEO is faster by 3.950 ms/op (1.89%)

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
eo-runtime/src/test/java/org/eolang/DataizedTest.java (1)

84-84: Remove leftover commented annotation.

Line 84 (//@Disabled) should be deleted now that the test is intentionally enabled; keeping commented test-control annotations makes intent less clear.

✂️ Suggested cleanup
-    //@Disabled
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@eo-runtime/src/test/java/org/eolang/DataizedTest.java` at line 84, Delete the
leftover commented test-control annotation `//@Disabled` in the DataizedTest
class (remove the commented line containing `@Disabled`) so the test is clearly
enabled; locate it in org.eolang.DataizedTest (class DataizedTest) and remove
that single commented annotation line to avoid confusion.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@eo-runtime/src/test/java/org/eolang/DataizedTest.java`:
- Line 84: Delete the leftover commented test-control annotation `//@Disabled`
in the DataizedTest class (remove the commented line containing `@Disabled`) so
the test is clearly enabled; locate it in org.eolang.DataizedTest (class
DataizedTest) and remove that single commented annotation line to avoid
confusion.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 9146f181-e6b9-492d-a2a4-9629ef8bb584

📥 Commits

Reviewing files that changed from the base of the PR and between 4cb0d56 and 91bc5db.

📒 Files selected for processing (2)
  • eo-runtime/src/main/java/org/eolang/Dataized.java
  • eo-runtime/src/test/java/org/eolang/DataizedTest.java

@AlexNetTie
Copy link
Copy Markdown
Contributor Author

@yegor256, please take a look at this pull request.
Three tests that are failing in the CI/CD pipeline pass on my local machine — I've double-checked:

mvn clean install -PskipUTs --errors --batch-mode
mvn clean verify -PskipTests -Pqulice --errors --batch-mode
mvn clean install -Psnippets --errors --batch-mode

The fourth test:

mvn clean install -PskipITs --errors --batch-mode

fails due to:

  1. MjPrintTest — cannot find resource (path issue, known bug)
  2. OyRemoteTestUnknownHostException: raw.githubusercontent.com (no internet connection)

As I understand, this failure would occur for any PR, not just this one.

Could there be a problem in the CI/CD pipeline?

@yegor256
Copy link
Copy Markdown
Member

yegor256 commented Apr 5, 2026

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.

QQ Prefix Causes Redundancy in Package Naming

2 participants