Skip to content

test(rich): consolidate #669 permanent regression ownership - #703

Merged
jnhu76 merged 1 commit into
masterfrom
test/669-phase-g-consolidation
Oct 5, 2026
Merged

jnhu76 merged 1 commit into
masterfrom
test/669-phase-g-consolidation

Conversation

@jnhu76

@jnhu76 jnhu76 commented Oct 5, 2026

Copy link
Copy Markdown
Owner

TEST_ONLY = YES

PRODUCTION_CODE_CHANGED = NO — 8 *.test.* files, +159/−231. No production behavior change; every surviving invariant keeps a deterministic owner-layer regression.

RECENT_PRS_AUDITED = #687, #690, #691, #692, #693, #694, #696, #700, #702

What changed

Change Rationale (owner stays intact)
DELETE QuestionRenderer string-in-rich-slot test RichTextAnswerInput R1 owns the fail-closed mechanism; the wrapper forwards value verbatim (QuestionRenderer.tsx:69-77)
DELETE saveAnswerReceiptsD2 UQ probe constraint existence owned by the 0044 migration test (raw SQL, /exam_answer_save_receipts_pk/); duplicate-through-adapter behavior is the premise and outcome of the C1 serialization case
MOVE hostile-LaTeX live-DOM audit → MathRenderer.evidence actual component seam; selector widened to the file's 16-tag active-content set (Reviewer C suggestion applied)
TABLE-DRIVE D5.1 publish-trust rejects {corrupt, unsupported_version} × {question, option} slots; every cell now asserts ValidationError class AND message (old R3/R5 asserted message only — stronger)
PARAMETERIZE D-F01 wire rejections 3 families × per-row zero-durable-write witness (was: shared witness)
PARAMETERIZE authoring cross-writer seams 2 writer shapes (prompt/option) × representative family; family enumeration owned by contracts leaf tests over the same schema object
FOLD preflight-fired assertion into grammar-bomb test semantics-preserving merge

Explicitly KEPT despite apparent duplication (load-bearing)

  • C15 typed input-rule E2E — the real-event layer. The reality probe enters at view.someProp("handleTextInput"), downstream of the entire browser event chain (keydown → SyncPendingSelectionOnKeydown's domObserver.flush — the fix(rich-ui): sync pending DOM selection before keydown input (#701) #702 fix has NO jsdom witness — → DOMObserver dispatch). Reviewer B proposed deletion; Reviewer C adjudicated the keep: "the deletion would have been a load-bearing loss."
  • Replay-receipt layering: engine semantics / DB constraints / API concurrency prove distinct mechanisms (fix(rich): phase-D2 compact append-only replay receipts #691).
  • Formula chain: policy matrix / dialog arming / confirm-time clamp / open-context / reality / MathLive E2E — four distinct mechanisms.
  • Canonical closure seeded property + fixed examples (different falsification power), T−1/T+1 boundary pair, D4-G frozen-mode counterexample, counterexample+inverse-control pairs.

TESTS_DELETED = 4 tests (2 standalone + 1 describe of 2, migrated not deleted)
TESTS_CONSOLIDATED = 10 tests → 5 table rows (D5.1 4→2, D-F01 wire 2→3 rows, cross-writer 2→2 rows, preflight 2→1)
TESTS_RETAINED_DESPITE_APPARENT_DUPLICATION = 8 groups (see ledger §KEEP)

LOAD_BEARING_INVARIANTS = 40 invariant groups adjudicated in the ownership ledger; all retain ≥1 deterministic owner-layer regression; historical P0/P1 defects #676 / D-F01 / #701 CE-1 each retain clearly identifiable named regressions.

E2E_BEFORE = 13 · E2E_AFTER = 13 (NET_NEW_E2E = 0)
TEST_LOC_BEFORE = 14683 · TEST_LOC_AFTER = 14610 (NET_TEST_LOC = −73)
RUNTIME_BEFORE / AFTER = focused suites marginally reduced (engine 1.96s→1.90s, contracts 1.10s→1.0s); no noisy performance claims.

Evidence (all first-hand on this branch)

  • contracts 447 ✓ · engine 760 ✓ · domain 92 ✓ · db 715 ✓ · api 2807 ✓ (full suite; one unrelated load-timing flake passed isolated and did not recur) · web 2346 ✓ · rich E2E 2/2 shards ✓ before AND after · pnpm verify PASS

REVIEWER_B = independent test-architecture audit (KEEP/DELETE/CONSOLIDATE/UNCERTAIN per group; verdict MIXED — suite already substantially owner-layer-correct)
REVIEWER_C = independent cleanup-diff review; verdict NO_LOAD_BEARING_LOSS; 2×P3 + 2×INFO (all bounded, none blocking; one P3 addressed by the selector widening above)

Ownership ledger: /tmp/exam-669-phase-g-test-ledger.md (session artifact)

Closes nothing — parent #669 adjudication continues after merge per the Phase-G protocol. Human merge gate applies.

Phase-G test-architecture consolidation (#669): one invariant keeps one
strong owner-layer proof; cross-layer or cross-boundary proofs survive
only where a distinct mechanism requires them.

- delete QuestionRenderer string-in-rich-slot test: RichTextAnswerInput
  R1 owns the fail-closed mechanism; the wrapper forwards value verbatim
- delete saveAnswerReceiptsD2 UQ probe: constraint existence owned by
  the 0044 migration test (raw SQL); duplicate-through-adapter behavior
  is the premise and outcome of the C1 serialization case
- move hostile-LaTeX live-DOM audit from ContentRenderer.security to
  MathRenderer.evidence (its actual component seam), widened to the
  file's 16-tag active-content selector set
- table-drive D5.1 publish-trust rejects ({corrupt,unsupported} x
  {question,option} slots) — every cell now asserts ValidationError
  class AND message
- parameterize D-F01 wire rejections (3 families, per-row zero-write
  witness) and the authoring cross-writer seams (2 writer shapes)
- fold the preflight-fired message assertion into the grammar-bomb test

Explicitly kept despite apparent duplication (load-bearing): C15 typed
input-rule E2E (the real-event layer — the reality probe enters below
the browser event chain that #702 fixed), replay receipt layers
(engine semantics / DB constraints / API concurrency), formula chain
mechanisms (policy/arming/clamp/reality/E2E), canonical closure
property + example pair.

TEST_ONLY. 8 files, +158/-231. contracts 447 / engine 760 / web 2346 /
api 2807 / domain 92 / db 715 green; rich E2E 2/2 shards green;
pnpm verify PASS.
@coderabbitai

coderabbitai Bot commented Oct 5, 2026

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: c7eb2a34-a3d8-4ce6-8b55-e9a1aa21667c
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@jnhu76 jnhu76 left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Final focused review for #669 Phase G test consolidation @ 128f8ac5.

VERDICT: MERGE / READY_FOR_HUMAN_MERGE = YES.

Independent checks:

  • PR is test-only: 8 *.test.* files; no production code changed.
  • Deleted QuestionRenderer corrupt-string case is redundant: RichTextAnswerInput.readTrust.test.tsx still directly owns R1 (unexplained string in Rich slot -> fail-closed integrity state).
  • Deleted D2 API UQ probe is redundant at that layer: migration suite 0044-answer-save-receipts.test.ts still directly proves exam_answer_save_receipts_pk exists and rejects a duplicate replay key; engine/API receipt semantics remain separately owned.
  • D5.1 and D-F01 changes consolidate/table-drive existing semantic states without collapsing distinct authority classes.
  • Hostile-LaTeX live-DOM evidence moved to the actual MathRenderer seam and strengthened with the wider active-content selector audit.
  • No E2E removed; browser-only C15/#702-style event evidence remains intact.
  • Exact-head CI run 37279387388: all 10 GitHub Actions jobs successful; CodeRabbit commit status success.

No new blocker found. After human merge, perform the planned §38 checkpoint (verify master contains 128f8ac5, run the targeted Rich suites / pnpm verify as planned), then #669 may be closed if no production drift is present.

@jnhu76
jnhu76 merged commit 70a2c13 into master Oct 5, 2026
11 checks passed
@jnhu76
jnhu76 deleted the test/669-phase-g-consolidation branch October 5, 2026 10:47
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