hydro-dev / hydro-dev/Hydro

训练题单中章节的 ID 不能为 0 但可以为负

Open
#1,161 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
7k
Forks
476
Avg merge
15h 48m
Merged PRs (30d)
3

Description

如附件图片,训练题单中章节的 _id 如果为 0 会提示 each node should have a _id,但可以为负。示例代码:

[
  {
    "_id": -1,
    "title": "环境测试",
    "requireNids": [],
    "pids": [
      1
    ]
  }
]
Image

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No file, test, or entry point is named. Start by reproducing the validation with the supplied chapter JSON, then trace the code that reports "each node should have a _id". Done means the handling of _id values is consistent for 0 and negative numbers, with regression coverage for both cases.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Needs clarification
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.