Skip to content

feat(diagnostics): add strict writing diagnostic contract - #249

Draft
seonghobae wants to merge 21 commits into
design/llm-writing-diagnosticsfrom
feat/writing-diagnostics-contract
Draft

feat(diagnostics): add strict writing diagnostic contract#249
seonghobae wants to merge 21 commits into
design/llm-writing-diagnosticsfrom
feat/writing-diagnostics-contract

Conversation

@seonghobae

@seonghobae seonghobae commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Scope

Stacked implementation lane for Task 1 of PR #248's committed writing-diagnostics plan. The PR remains Draft and targets design/llm-writing-diagnostics so the governing ADR/design is an explicit parent dependency.

Test-first lineage

The implementation followed an observable RED -> GREEN sequence:

  1. test-only head 9f3c6dc219048363ad1699b693f415d32495ffe4 defined the strict contract before production code;
  2. workflow run 31553859019 failed because the production module did not exist;
  3. the validator implementation made the contract suite green;
  4. writingDiagnosticsExports.test.ts then failed because root and framework-independent exports were absent in run 31554191623;
  5. root and src/writing-diagnostics exports were added and passed;
  6. exact focused coverage exposed hostile-input branches; boundary tests and removal of logically unreachable branches produced 465/465 statements, 21/21 functions, and 114/114 branches;
  7. the whole-repository coverage run exposed a pre-existing ADR-index quality-contract regression, which was repaired without weakening the gate;
  8. PR docs(adr): define revision-bound host-owned writing diagnostics #248 later added ADR 0028 and the v1 contract errata to resolve strict invalidation and semantic-neutral accessibility; this branch was non-destructively reconciled with exact parent e580aec1961673b49f98e2a62debfb6ce4e48df6 through merge commit 322c838d23de9ba574bcc549ad1e72cd2dafe2fe.

Included behavior

  • provider-neutral CwlWritingDiagnostic and provenance contracts;
  • finite advisory | important | critical presentation priority;
  • frozen default resource ceilings and optional stricter caller ceilings;
  • stable redacted error classes for contract, limit, revision, projection, selector, conflict, and lifecycle failures;
  • exact own enumerable data-property validation;
  • rejection of accessors, inherited fields, symbol fields, extra fields, sparse or structurally hostile arrays, proxies, and duplicate diagnostic IDs;
  • exact lowercase SHA-256 revision and strong ETag validation;
  • exact inkspan-prosemirror-text version 1 projection validation;
  • finite, non-negative, safe-integral W3C text-position selectors;
  • bounded host strings, replacement text, provenance, and confidence;
  • deep detachment and freezing of every accepted object;
  • identical root and React-free source-level exports;
  • inherited ADR 0028/errata authority prohibiting category-derived semantic ARIA and requiring full invalidation after every document change.

Authority boundary

This lane performs no semantic language judgment. It does not infer spelling, grammar, tone, clarity, pragmatics, technical quality, or actionability. It contains no keyword/regex/phrase-list fallback, no model/provider/network/database/credential access, no stale-text repair, no editor decoration, no document mutation, and no send gate.

Exact current-head evidence

  • exact base: design/llm-writing-diagnostics@e580aec1961673b49f98e2a62debfb6ce4e48df6;
  • exact head: 322c838d23de9ba574bcc549ad1e72cd2dafe2fe;
  • ancestry compare: ahead 20, behind 0, merge base exactly the current design head;
  • focused Writing Diagnostics Contract TDD run 31589881613: success on this exact head;
  • no canonical repository CI/Security/Semgrep run is claimed for this merge head yet;
  • predecessor-head checks, status and reviews do not transfer.

Remaining gates

The PR therefore remains Draft despite the focused current-head run succeeding.

@coderabbitai

coderabbitai Bot commented Aug 12, 2026

Copy link
Copy Markdown

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: c0428404-8ad9-4ff0-a610-8bfff54d6366

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

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.

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