(d: &Directive, id_base: &str, n: usize)
| 139 | } |
| 140 | |
| 141 | fn lift_ac(d: &Directive, id_base: &str, n: usize) -> Result<AcceptanceCriterion> { |
| 142 | // Child ids are namespaced under the intent's stable id base (its ULID for |
| 143 | // intents created via `atomic intent new`) so they are globally unique and |
| 144 | // do not inherit the human key's `::`/`-` separators. |
| 145 | let local = |
| 146 | d.id.clone() |
| 147 | .unwrap_or_else(|| format!("{}-ac-{n}", slug(id_base))); |
| 148 | Ok(AcceptanceCriterion { |
| 149 | type_: NodeType::AcceptanceCriterion.as_str().to_string(), |
| 150 | id: as_urn("ac", &local), |
| 151 | text: d.body.clone(), |
| 152 | ac_status: d.attr("status").unwrap_or("open").to_string(), |
| 153 | verified_by: d.attr("verifiedBy").map(str::to_string), |
| 154 | evidence: d.attr("evidence").map(str::to_string), |
| 155 | }) |
| 156 | } |
| 157 | |
| 158 | fn lift_task(d: &Directive, id_base: &str, n: usize) -> Task { |
| 159 | let local = |
no test coverage detected