Potential Bug in ActivityExpression
ActivityExpression has an override for matches that translates a SchedulingActivityDirective into an ActivityInstance before calling another override. As part of that, it sets the interval of the instance to Interval.between(act.startOffset(), act.getEndTime()). This may cause issues if the Directive was anchored to another activity, as the interval it generates will be wrong.
This ticket is to investigate if there is a bug here and, if there is, to fix it.
This is indeed a bug and has already been fixed by @jmdelfa in his upcoming PR about anchors for scheduling, we've verified that with some tests. Mentioning #663 for reference. We'll close this when the PR is merged.
Assigned @jmdelfa as he fixes this in his PR.