Skip to content

Enforce baseline parity and add controlled tie-group variability to system prompt#882

Open
GVCUTV wants to merge 1 commit intoissue665-iterative-correctionfrom
codex/explain-scheduling-algorithm-in-repo
Open

Enforce baseline parity and add controlled tie-group variability to system prompt#882
GVCUTV wants to merge 1 commit intoissue665-iterative-correctionfrom
codex/explain-scheduling-algorithm-in-repo

Conversation

@GVCUTV
Copy link
Contributor

@GVCUTV GVCUTV commented Feb 26, 2026

Motivation

  • Align the system prompt with backend baseline intent by enforcing strict per-layer coverage ordering and deterministic reconciliation rules for scheduling output in src/main/resources/ai/system_prompt_template.txt.
  • Prevent silent coverage masking and ensure uncovered slots are reported explicitly when hard-feasible candidates are exhausted.
  • Introduce controlled, non-deterministic variability only for exact tie-groups to avoid predictable always-same doctor ordering while preserving hard constraints.

Description

  • Replaced the previous deterministic tie-breakers block with STANDARD-BASELINE PARITY (NORMATIVE) which mandates filling ON_DUTY first then ON_CALL, enforces per-shift uniqueness, forbids cross-layer duplication, and requires exact role fidelity for emitted rows.
  • Added explicit rules to recompute feasibility after each accepted assignment, to forbid reserving candidates across layers, and to preserve valid assignments while reporting uncovered (shift_id, required_role, assignment_status) keys when minima are unmet.
  • Introduced CONTROLLED TIE VARIABILITY (NORMATIVE) that retains the existing ordered tie-resolution steps but replaces always-ascending doctor_id as the deterministic final step with a run-scoped seeded rotation/shuffle for exact tie-groups while forbidding any violation of hard constraints or layer-order rules.
  • Added baseline parity examples, clarified emission statuses (e.g. PARTIAL_SUCCESS when reconciliation mismatches remain), and reinforced that SUCCESS is forbidden if layer minima are not satisfied.

Testing

  • No automated tests were run as part of this change.

Codex Task

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant