Skip to content

hydrojudge: fix checker message#1185

Merged
undefined-moe merged 4 commits into
masterfrom
checker-message
Jun 23, 2026
Merged

hydrojudge: fix checker message#1185
undefined-moe merged 4 commits into
masterfrom
checker-message

Conversation

@pandadtdyy

@pandadtdyy pandadtdyy commented Jun 22, 2026

Copy link
Copy Markdown
Member

Summary by CodeRabbit

  • Bug Fixes
    • Improved multi-pass judge output by updating pass indicator formatting and ensuring case messages initialize correctly.
    • Refined how checker results are displayed, including consistent handling of acceptance messages in multi-pass mode.
    • Enhanced runtime error messaging for “full” details, with clearer standardization and correct pass suffix application where applicable.

@coderabbitai

coderabbitai Bot commented Jun 22, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: d8c03f5e-c12c-4c40-98d8-0e1f44ced3c8

📥 Commits

Reviewing files that changed from the base of the PR and between e2b4a9f and 2d8a107.

📒 Files selected for processing (1)
  • packages/hydrojudge/src/judge/default.ts
🚧 Files skipped from review as they are similar to previous changes (1)
  • packages/hydrojudge/src/judge/default.ts

Walkthrough

In judgeCase within packages/hydrojudge/src/judge/default.ts, the runQueued trace label changes its multi-pass format from [pass=...] to {pass=...}. The per-case message variable is now initialized as an empty string rather than a prefilled multi-pass prefix. The checker call result is now directly destructured into status, score, message, and nextPass. In the accepted-checker path, a [Pass N] suffix is appended to string messages. In the runtime-error full-detail non-signal path, the message is restructured to a { message, params } template where the return code text may include a [Pass N] suffix, followed by an additional multi-pass string suffix step.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'hydrojudge: fix checker message' directly addresses the main change of refactoring checker message handling in the judgeCase function.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

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

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch checker-message

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

packages/hydrojudge/src/judge/default.ts

ESLint skipped: missing config or dependency (missing-dependency). The ESLint configuration references a package that is not available in the sandbox.


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.

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

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@packages/hydrojudge/src/checkers.ts`:
- Around line 264-268: The if statement checking for code === 9 needs proper
block formatting to satisfy the linter. Add an opening brace after the if
condition and wrap the return statement inside braces, ensuring the object
literal is properly contained within the if block body rather than appearing
inline with the return keyword. This will resolve the "Expected { after 'if'
condition" compilation error and allow the checker to compile cleanly.

In `@packages/hydrojudge/src/judge/default.ts`:
- Around line 66-69: The multi-pass prefix logic in the runtime error handling
for STATUS.STATUS_RUNTIME_ERROR only applies when message is a string, but skips
the case when message is an object (for non-signalled errors). Modify the
conditional check that appends the pass prefix to handle both cases: when
message is a string, prepend the prefix directly, and when message is an object
with a message property, prepend the prefix to the message property within the
object. Ensure the mp.i check still guards the overall logic but apply the
prefix appropriately based on the message type.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: d7802ea1-c805-47ed-bf13-238947e42410

📥 Commits

Reviewing files that changed from the base of the PR and between bf8c838 and 75b6414.

📒 Files selected for processing (2)
  • packages/hydrojudge/src/checkers.ts
  • packages/hydrojudge/src/judge/default.ts

Comment thread packages/hydrojudge/src/checkers.ts Outdated
Comment thread packages/hydrojudge/src/judge/default.ts Outdated
@undefined-moe undefined-moe merged commit 98538ca into master Jun 23, 2026
7 checks passed
@undefined-moe undefined-moe deleted the checker-message branch June 23, 2026 05:56
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