Lower-priority goal can invalidate an already satisfied higher-priority goal

Open
#1,915 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
48/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
java
Domain
backend

Research direction

Start by locating the scheduler's handling of goal priority and the goal satisfaction analysis entry point; the issue does not name files or tests. Reproduce the battery scenario and compare statuses immediately after scheduling with a fresh analysis. Done means lower-priority placements cannot invalidate an already satisfied higher-priority goal, and the displayed status matches fresh analysis.

Written by the indexing model from the issue text.

Description

bug
Checked for duplicates

Yes - I've already checked

Is this a regression?

No - This is a new bug

Version

v4.4.0

Describe the bug

I reproduced this behavior on a local PlanDev deployment. The scheduler satisfied a higher-priority goal, then accepted an activity from a lower-priority goal that caused the higher-priority requirement to fail.

I also observed a separate reporting issue. Immediately after scheduling, both goals showed Satisfied. Without editing the plan, I clicked Analyze Goal Satisfaction. Only then did the higher-priority goal change to Unsatisfied. The lower-priority goal remained Satisfied.

Reproduction

The following battery example illustrates the scheduling conflict:

  1. The higher-priority goal requires a specific observation to start at 10:00 with at least 40% battery charge. When the scheduler places the observation, the predicted charge at its start is 45%, so the goal is satisfied.
  2. The lower-priority procedural goal then inserts a power-consuming downlink at 09:50. The scheduler accepts the downlink.
  3. The observation is still scheduled for 10:00, but the downlink reduces the predicted charge at the start of the observation to 35%. The observation now violates its 40% minimum.
  4. Compare the goal statuses immediately after scheduling and after clicking Analyze Goal Satisfaction, without making any changes to the plan.
When checked Higher-priority observation goal Lower-priority downlink goal
Immediately after scheduling Satisfied Satisfied
After Analyze Goal Satisfaction, on the same plan Unsatisfied Satisfied

Expected behavior

Scheduling should preserve an already satisfied higher-priority goal. In this example, the scheduler should only accept a downlink placement that keeps the observation at 10:00 with at least 40% charge. If the 09:50 placement would reduce the charge to 35%, the scheduler should reject that placement. If no compatible placement exists, the lower-priority downlink goal should remain Unsatisfied.

The status shown after scheduling should also agree with a fresh analysis of the same plan. In the observed run, the higher-priority goal had already become unsatisfied by the time scheduling finished. The result should have shown that immediately. Updating the status would fix the reporting issue, but the scheduling issue would still need to be addressed.

Logs

System Info
Local PlanDev deployment. Regression status across earlier releases is unknown.
Severity

Moderate

Dominant language
Java
Stars
135
Forks
34
Avg merge
1d 5h
Merged PRs (30d)
10

Getting set up

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.

More from NASA-AMMOS/plandev

All issues in NASA-AMMOS/plandev

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.