nrml
GraphsByteDance

Order Rule Dependencies

Repair order validation, respect rule prerequisites, and reconnect a graph after deletion.

The scenario

Repair a checkout rule graph, evaluate prerequisites, and reconnect dependencies when rules are removed. This original practice follows a ByteDance community report that explicitly describes using a personal AI coding tool.

A failure to reason about

Removing the middle rule from a chain should preserve the surviving prerequisite. A rejected order can still conceal incorrect skipped-rule counts.

Illustrative context for the topic. The exercise’s full requirements arrive in the workspace.

Questions to bring to your review

  • When is a rule ready to run?
  • Must every prerequisite pass?
  • Which edges survive a deletion?
  • Does a reused ID inherit old state?

Skills you will practice

  • DAG invariants
  • Dependency evaluation
  • Graph contraction
  • Boundary testing
  • AI code review

Read the existing code, reproduce the reported behavior, review proposed changes, and verify your final implementation. You can use AI assistance while staying responsible for the result.

Prepare with a worked example

See how nrml evaluates an attempt, including the limits of automated evidence.