You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
assignment-feedback: follow-ups from #94 reviews (fail-closed edges and tests) #95
Follow-ups from the council reviews of #94 (rounds 1–2). None of these can produce a false saved-draft; per the owner's wrap-up they were filed instead of fixed. Related: #91 (its remaining items are still open there).
P2 (raised as P1 by Terra, lowered because it fails closed)
A zero-padded numeric reference with more than 8 digits (<p>a&b</p> for a&b) is refused by _character in lighthouse_cli/assignment_feedback.py, so a good save reports unknown. Fix: strip leading zeroes before the length bound, then validate the code point; add padded decimal and hex tests.
P3
Lock in the post-decode newline check with a test: <p>a
b</p> vs "a\nb" must be rejected (only named entities reach that check).
Add test cases for outer \v, \xa0, BOM or NUL, &TAB;, <br / > and <br></br>.
Docs (docs/assignment-feedback.md, Readback 1): list "whitespace inside a tag" (<p\n>, <br\n/>) among the accepted reformatting.
CI matrix: add Python 3.14 (html.parser changed in recent security releases; the matcher was checked by hand on 3.10.17–3.14.8).
_html(text) with a raw \r doesn't round-trip through _html_text. The CLI can't reach this because read_feedback_file normalizes first, but either normalize in _html/feedback_payload or document that the caller must.
Round 1: older patch releases (3.10.17–3.13.3) can raise AssertionError on <![ x. Now caught by _html_text; this needs only a regression test on those versions, which already exists as marked-section. Listed for the record.
Plan for #95 — assignment-feedback follow-ups from #94
Verdict: actionable. Not a duplicate — #91 tracks the #90-council follow-ups (cancel docs, Ctrl-C, published-warning ordering, _send breadth); #95 tracks the #94matcher items. One overlap-free change set. I verified every behavioral claim below by running the merged code (b0eccdf) directly — expectations are proven, not inferred. Note: this run's checkout started at 14a009a (the PR #94 base), so I fast-forwarded to origin/main before analyzing.
Confirmed against current main
Case
Today
Wanted
& / & (>8 digits, zero-padded) → None in _character → readback gives unknown on a good save
reproduces
accept (P2 fix)

 vs a\nb; outer \v, \xa0, BOM, NUL; <br></br>
rejected
pin with tests
	 vs a\tb; <br / >; <p\n>/<br\n/> (whitespace inside tags)
accepted
pin with tests
_html_text(_html("a\rb")) → None (payload keeps raw \r)
reproduces
normalize or document
Gotcha found while verifying: a padded-hex case with exactly 8 digits (e.g. &) already passes — the new tests must use more than 8 digits to exercise the bug (& verified refused today).
Milestones
M1 — P2: zero-padded charrefs (lighthouse_cli/assignment_feedback.py, _character)
After digits, base = …, strip leading zeroes before the length bound: digits = digits.lstrip("0"). All-zero refs (� = NUL) collapse to "" and stay refused by the existing 0 < len(digits) check; code-point validation is unchanged and still rejects >0x10FFFF. Tests in tests/test_assignment_feedback.py: _ACCEPTED_HTML gains padded decimal ("<p>a&b</p>", "a&b") and padded hex ("<p>a&b</p>", "a&b"); _REJECTED_HTML gains the all-zero padding ("<p>he�llo</p>", "hello").
M2 — P3: pin the remaining matcher edges (tests only, no behavior change)
_REJECTED_HTML: 
 (("<p>a
b</p>", "a\nb") — locks the post-decode newline check that only named entities can reach), outer \v / \xa0 / BOM / NUL ("\x0b<p>hello</p>" etc. — none are _HTML_SPACE), <br></br> (("<p>a<br></br>b</p>", "a\nb")).
_ACCEPTED_HTML: 	 (("<p>a	b</p>", "a\tb")), <br / > (space‑slash‑space; distinct from the existing <br/ >), and breaks inside tags ("<p\n>a<br\n/>b</p\n>", "a\nb").
M3 — P3: docs (docs/assignment-feedback.md, Readback 1 row)
Add "whitespace inside a tag (<p\n>, <br\n/>)" to the allowed-reformatting list, next to "whitespace outside the paragraph".
M4 — P3: CI matrix (.github/workflows/ci.yml)
Add a python-version: "3.14" leg with pytest-args: "" (no coverage), mirroring the 3.13 leg, and extend the adjacent comment. No other changes needed: requires-python is already >=3.10, and tests/test_repo_policies.py pins gates/lockfile-installs but not the matrix. If a lockfile pin lacks 3.14 wheels, regenerate requirements-dev.txt via the documented uv pip compile flow — never a floating install (policy-tested). Operational note for the owner: the new check name tests (py3.14) may warrant adding to the protect-main ruleset (repo settings, not a file).
M5 — P3: raw \r round-trip
Recommended: text = _normalize(text) as the first line of save_draft — the single choke point that feeds feedback_payload, the POST and both readback comparisons. Normalizing in feedback_payload alone would leave _verify_saved comparing the raw text, and _html alone would desync Text vs Html; documenting-only is the fallback the issue allows. The CLI path is already normalized by read_feedback_file, so this is idempotent there. Test: save_draft with a raw-\r text POSTs the normalized Text and the readback verifies (FakeLMS pattern), or the equivalent unit pin.
No change — round-1 AssertionError item: the marked-section rejection (tests/test_assignment_feedback.py:802) already exists, and _html_text's except Exception → None covers old patch releases; "for the record" only. Will be stated in the PR description.
Execution
Branch pullfrog/95-feedback-fail-closed-followups off main; PR closing #95 (explicitly not touching #91's items). Full gate before the PR: ruff check ., mypy, lint-imports, deptry ., xenon -a B -m C -b F -e "*/ms_auth.py" lighthouse_cli, python scripts/check_secrets.py, pytest -q. Product diff is tiny: one line in _character, one in save_draft, one docs row, one CI matrix entry, ~12 test-table rows.
One judgment call to flag: M1 makes arbitrarily-long zero padding () = A) verify. That matches browser/HTML5 parsing (leading zeroes are legal), so I'd accept it; if you'd rather bound the padding length, cap the reference length instead (e.g. reject refs over 32 chars) — say so and the plan adjusts.
Activity
pullfrog commentedon Nov 8, 2026
Plan for #95 — assignment-feedback follow-ups from #94
Verdict: actionable. Not a duplicate — #91 tracks the #90-council follow-ups (cancel docs, Ctrl-C, published-warning ordering,
_sendbreadth); #95 tracks the #94 matcher items. One overlap-free change set. I verified every behavioral claim below by running the merged code (b0eccdf) directly — expectations are proven, not inferred. Note: this run's checkout started at14a009a(the PR #94 base), so I fast-forwarded toorigin/mainbefore analyzing.Confirmed against current
main&/&(>8 digits, zero-padded) →Nonein_character→ readback givesunknownon a good save
vsa\nb; outer\v,\xa0, BOM, NUL;<br></br>	vsa\tb;<br / >;<p\n>/<br\n/>(whitespace inside tags)_html_text(_html("a\rb"))→None(payload keeps raw\r)Gotcha found while verifying: a padded-hex case with exactly 8 digits (e.g.
&) already passes — the new tests must use more than 8 digits to exercise the bug (&verified refused today).Milestones
M1 — P2: zero-padded charrefs (
lighthouse_cli/assignment_feedback.py,_character)After
digits, base = …, strip leading zeroes before the length bound:digits = digits.lstrip("0"). All-zero refs (�= NUL) collapse to""and stay refused by the existing0 < len(digits)check; code-point validation is unchanged and still rejects >0x10FFFF. Tests intests/test_assignment_feedback.py:_ACCEPTED_HTMLgains padded decimal("<p>a&b</p>", "a&b")and padded hex("<p>a&b</p>", "a&b");_REJECTED_HTMLgains the all-zero padding("<p>he�llo</p>", "hello").M2 — P3: pin the remaining matcher edges (tests only, no behavior change)
_REJECTED_HTML:
(("<p>a
b</p>", "a\nb")— locks the post-decode newline check that only named entities can reach), outer\v/\xa0/ BOM / NUL ("\x0b<p>hello</p>"etc. — none are_HTML_SPACE),<br></br>(("<p>a<br></br>b</p>", "a\nb"))._ACCEPTED_HTML:	(("<p>a	b</p>", "a\tb")),<br / >(space‑slash‑space; distinct from the existing<br/ >), and breaks inside tags("<p\n>a<br\n/>b</p\n>", "a\nb").M3 — P3: docs (
docs/assignment-feedback.md, Readback 1 row)Add "whitespace inside a tag (
<p\n>,<br\n/>)" to the allowed-reformatting list, next to "whitespace outside the paragraph".M4 — P3: CI matrix (
.github/workflows/ci.yml)Add a
python-version: "3.14"leg withpytest-args: ""(no coverage), mirroring the 3.13 leg, and extend the adjacent comment. No other changes needed:requires-pythonis already>=3.10, andtests/test_repo_policies.pypins gates/lockfile-installs but not the matrix. If a lockfile pin lacks 3.14 wheels, regeneraterequirements-dev.txtvia the documenteduv pip compileflow — never a floating install (policy-tested). Operational note for the owner: the new check nametests (py3.14)may warrant adding to the protect-main ruleset (repo settings, not a file).M5 — P3: raw
\rround-tripRecommended:
text = _normalize(text)as the first line ofsave_draft— the single choke point that feedsfeedback_payload, the POST and both readback comparisons. Normalizing infeedback_payloadalone would leave_verify_savedcomparing the raw text, and_htmlalone would desyncTextvsHtml; documenting-only is the fallback the issue allows. The CLI path is already normalized byread_feedback_file, so this is idempotent there. Test:save_draftwith a raw-\rtext POSTs the normalizedTextand the readback verifies (FakeLMS pattern), or the equivalent unit pin.No change — round-1
AssertionErroritem: themarked-sectionrejection (tests/test_assignment_feedback.py:802) already exists, and_html_text'sexcept Exception → Nonecovers old patch releases; "for the record" only. Will be stated in the PR description.Execution
Branch
pullfrog/95-feedback-fail-closed-followupsoffmain; PR closing #95 (explicitly not touching #91's items). Full gate before the PR:ruff check .,mypy,lint-imports,deptry .,xenon -a B -m C -b F -e "*/ms_auth.py" lighthouse_cli,python scripts/check_secrets.py,pytest -q. Product diff is tiny: one line in_character, one insave_draft, one docs row, one CI matrix entry, ~12 test-table rows.One judgment call to flag: M1 makes arbitrarily-long zero padding (
)=A) verify. That matches browser/HTML5 parsing (leading zeroes are legal), so I'd accept it; if you'd rather bound the padding length, cap the reference length instead (e.g. reject refs over 32 chars) — say so and the plan adjusts.Task list (4/4 completed)
glm-5.3| 𝕏