Skip to content

feat(lab-report): note-authoritative feedback delivery (--from-note) - #19

Merged
agiacalone merged 2 commits into
mainfrom
feat/feedback-from-note
Jun 28, 2026
Merged

feat(lab-report): note-authoritative feedback delivery (--from-note)#19
agiacalone merged 2 commits into
mainfrom
feat/feedback-from-note

Conversation

@agiacalone

Copy link
Copy Markdown
Owner

What

Adds reg-lab-report deliver --from-note <REPORT.md> — the grading-round vault note is now the authoritative source of student feedback. Each round is one note (recon-<lab>/REPORT.md) holding cohort facts, grades, and every student's feedback edited in place; deliver parses the per-student blocks and renders each repo's FEEDBACK.md verbatim, so hand-authored feedback is never re-derived from a digest cohort and clobbered.

Why

Doctrine (2026-06-28): one giant note per grading round. The existing deliver --cohort re-renders FEEDBACK.md from a template + digest cohort, which would overwrite feedback authored in the note. Inverting the source of truth fits lectern doctrine: the vault is the proprietary record; the tool is a deterministic renderer over a parseable contract (same principle as the result.json / deliverable-naming contracts).

How

  • lectern/feedback_note.py (new) — parse the note's per-student blocks into rows; self-describing N components (+ extra credit), __/ = ungraded → skipped.
  • feedback_deliverrender_feedback_md_from_note (generic N-component table); deliver(..., render=) injectable + reads total/grand/components from the row; main() adds --from-note (xor --cohort).
  • feedback_log — tolerant of note-path entries (component breakdown, per-row grand); the digest Auto/Writeup path is unchanged.

The signed feedback-branch → PR-close → signed merge-to-main flow, dry-run default, and idempotency are untouched; both paths share deliver().

Tests / docs

  • New tests/test_feedback_note.py + extended deliver tests (synthetic Batman cohort). 387 passed, 0 regressions.
  • Validated end-to-end against the real CECS 378 Su26 Lab 2 note (27 rows; graded rows ship, ungraded skipped).
  • Docs: CHANGELOG · SKILL.md · README.md · docs/design/feedback-from-note.md.

🤖 Generated with Claude Code

agiacalone and others added 2 commits June 28, 2026 10:27
Each grading round is one giant vault note (recon-<lab>/REPORT.md) holding
cohort facts, grades, and every student's feedback, edited in place as you
grade. Add `reg-lab-report deliver --from-note <REPORT.md>` (mutually exclusive
with --cohort): parse the per-student blocks and render each repo's FEEDBACK.md
straight from the note, so hand-authored feedback is delivered verbatim and is
never re-derived from a digest cohort and clobbered.

- lectern/feedback_note.py: parse the note's per-student blocks into rows
  (self-describing N components, +EC, __/— = ungraded -> skipped). The block
  grammar is a contract (docs/design/feedback-from-note.md).
- feedback_deliver: render_feedback_md_from_note (generic N-component table);
  deliver() takes an injectable render= and reads total/grand/components from
  the row; main() adds --from-note xor --cohort.
- feedback_log: tolerant of note-path entries (component breakdown, per-row
  grand); digest Auto/Writeup path unchanged.

The signed feedback-branch -> PR-close -> signed merge-to-main flow, dry-run
default, and idempotency are untouched; both paths share deliver(). Full suite
green (387 passed). Fits lectern doctrine: the vault is the proprietary record,
the tool a deterministic renderer over a parseable contract.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015cY2osrcunEXb5a8xtTy2V
CHANGELOG, SKILL.md, README.md deliver entries + a design doc
(docs/design/feedback-from-note.md) for the note-authoritative feedback path.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015cY2osrcunEXb5a8xtTy2V
@agiacalone
agiacalone merged commit db2ed70 into main Jun 28, 2026
4 checks passed
@agiacalone
agiacalone deleted the feat/feedback-from-note branch June 28, 2026 17:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant