Fix correction session Leistung matching instructions#286
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Mode: AUDIT
This PR updates the default correction-session contract/prompt templates (both embedded and markdown resources) to remove the requirement that users provide a Leistung chatRef before evaluation, and adds a regression test to ensure the exported instructions reflect the new matching guidance.
Changes:
- Updated matching-rule wording in the default contract and prompt templates to infer/match Leistung
chatRefwithout asking the user upfront. - Kept embedded templates (
default-pack.ts) and markdown resources (rule-packs/default/*.md) aligned. - Added a Jest regression test asserting the exported artifacts contain the new instructions and no longer contain the old “user must provide chatRef” requirements.
Tight-Leash Protocol Checklist (evidence-based)
Target Plan.md checkbox IDs worked on: NOT PROVIDED in PR metadata/changes (traceability not verifiable from the diff)
Commands executed (in this review environment):
- None (not run here)
Verification matrix (Plan.md §6 checkboxes in scope):
| Checkbox ID | Status | Evidence | Remediation (if GAP) |
|---|---|---|---|
| N/A (no checkbox IDs referenced) | NOT VERIFIED | PR metadata/diff contains no Plan.md checkbox reference | Add at least one relevant Plan.md §6 checkbox ID to the PR title/description for traceability |
What I verified vs what I did not verify
- VERIFIED: The updated instruction strings are present in (a) embedded templates and (b) markdown resources, and the new test asserts against the exported artifacts.
- NOT VERIFIED: Test execution/results (PR description states tests were not run).
Ledger rows updated: N/A
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| modules/exams/rule-packs/default/contract.template.md | Updates “Matching Rule” wording for Leistung chatRef identification and ambiguity handling. |
| modules/exams/rule-packs/default/prompt.template.md | Updates prompt workflow/matching instructions and personal-identifier guidance. |
| modules/exams/src/rule-packs/default-pack.ts | Keeps embedded default templates in sync with the markdown templates. |
| modules/exams/tests/export-correction-session.use-case.test.ts | Adds a regression test ensuring exported artifacts include the new matching instructions and exclude obsolete requirements. |
| - keep each Leistung isolated; do not mix data between Leistungen | ||
| - use only Leistung `chatRef` values from the contract's `Chat References` list as external references for submitted Leistungen | ||
| - do not use names, candidate IDs, student IDs, or other personal identifiers | ||
| - do not use names, candidate IDs, student IDs, or other personal identifiers in structured outputs |
| - keep each Leistung isolated; do not mix data between Leistungen | ||
| - use only Leistung \`chatRef\` values from the contract's \`Chat References\` list as external references for submitted Leistungen | ||
| - do not use names, candidate IDs, student IDs, or other personal identifiers | ||
| - do not use names, candidate IDs, student IDs, or other personal identifiers in structured outputs |
Comment on lines
518
to
524
| export function renderCorrectionSessionChatRefs(chatRefs: string[]): string { | ||
| if (chatRefs.length === 0) { | ||
| return '_No chat references available._'; | ||
| } | ||
|
|
||
| return chatRefs.map((chatRef) => `- ${chatRef}`).join('\n'); | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
DONE
NOT DONE
CHECKS
READY FOR NEXT STEP
NOT DONE - run the targeted export-correction-session test before merge.