feat(review): add bounded review contract surface - #378
Conversation
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: trueThanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Signed-off-by: Seongho Bae <me@seonghobae.me>
Signed-off-by: Seongho Bae <me@seonghobae.me> (cherry picked from commit 870c2c3)
|
Reconciled this Draft non-destructively with protected Combined-tree local evidence:
The product behavior remains the exact-revision review surface described earlier. #402 owns the protected-main workflow correction; this Draft does not claim that correction as shipped until #402 is independently reviewed, checked, and merged. |
Signed-off-by: Seongho Bae <me@seonghobae.me> (cherry picked from commit 93fd077)
|
Corrected the transient Python boundary-matrix carry-forward at new head |
|
Exact-head package acceptance at |
|
Exact-head local browser evidence for @codex review |
|
@coderabbitai review |
|
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 277bcf377e
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Signed-off-by: Seongho Bae <me@seonghobae.me>
|
@codex review |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
Signed-off-by: Seongho Bae <me@seonghobae.me>
|
Added exact-head accessible suggestion decision controls in 0bcd4ae. Exact-head local evidence: 172 test files / 952 tests passed; typecheck and production build passed; packed review-react ESM/CommonJS/TypeScript consumer verification passed; 15 review browser tests passed across Chromium, Firefox, and WebKit; |
|
@codex review |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
Signed-off-by: Seongho Bae <me@seonghobae.me>
|
Exact-head verification for
This follow-up adds explicit cross-engine proof that suggestion summaries print only after opt-in while Accept/Reject controls remain excluded. |
|
@codex review |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
Signed-off-by: Seongho Bae <me@seonghobae.me>
|
Exact-head verification for
Each suggestion decision now uses native |
|
@codex review |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
Revalidated exact head
The PR remains Draft because the parent review gap is not yet fully integrated. @codex review |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
Scope
Refs #374. This Draft is the canonical single-writer lane for Inkspan's provider-neutral review contract and controlled presentation surface. It currently includes deterministic target/suggestion validation, revision-bound operation evidence, bounded host-supplied thread presentation metadata, a controlled accessible React adapter with suggestion accept/reject intents, deterministic thread-list keyboard traversal, fail-closed collection ingress, public typed-error normalization for untrusted host presentation/intent failures, a controlled accessible inline target marker, and a fail-closed exact-revision admission guard for suggestion mutations.
It does not claim the full #374 product slice is complete or shipped. Protected
mainremains the only shipped implementation authority.Lifecycle truth
Do not treat any PR-body SHA, workflow result, merge base, or review inventory as durable lifecycle truth. Before every source write, protected-main reconciliation, review transition, or merge decision, independently refetch the submitted head, protected
main, ancestry/mergeability, active writers, formal reviews/threads, live rulesets, and all applicable exact-head repository/central workflows. The PR API's embeddedbase.shamay be historical and is not a substitute for resolving the live protected-main tip.Current active-PR surface
The Draft exports a React-free
@contextualwisdomlab/cwl-editor/reviewpackage subpath plus optional@contextualwisdomlab/cwl-editor/review-reactpresentation. Review evidence uses Inkspan's canonical document revision and W3CTextPositionSelectorprojection instead of DOM offsets. Inputs are bounded and validated; snapshots are detached/frozen where applicable. Inkspan does not acquire host identity, authorization, persistence, tenancy, transport, durable audit, retention, collaboration admission, credential, network, or model-policy authority.CwlReviewThreadListvalidates collection shape before item inspection, rejects oversized/sparse/non-enumerable/accessor-backed slots fail-closed, validates host labels/action callbacks, supplies accessible thread/action names, and maintains one deterministic roving thread target. Arrow Up/Down/Home/End move DOM focus only and do not commit host selection. Private exceptions from validated host label/intent callbacks are normalized to the publicCwlReviewPresentationErrorcontract rather than exposing private host details.CwlReviewTargetMarkerexposes the active review target as a bounded accessible button with deterministic selected-state semantics and controlled host intent callbacks; invalid labels/callbacks fail closed through the same public presentation-error boundary rather than acquiring editor-selection authority.assertReviewSuggestionCurrentRevisionis the mutation-boundary admission guard for provider-neutral insert/delete proposals. It validates the untrusted suggestion, computes the exact current document revision through the canonical revision implementation, and fails closed with the stable redactedstale_operationcontract when the target revision differs. It returns only the detached validated suggestion and does not copy the current document body into review evidence. Hosts retain authorization, persistence, conflict policy, and durable audit authority.\n\nCwlEditorHandle.applyReviewSuggestionDecisionnow applies an admitted insertion or deletion as one normal history transaction and returns revision-bound operation evidence. Rejection preserves the document, asynchronous revision hashing is guarded against editor-state races, and stale retries fail closed without mutation.\nTDD lineage
The callback-failure work established that React/JSDOM error-report cardinality is not a product contract. The durable invariants are that the host callback executes once, externally observed failures use the stable public
CwlReviewPresentationErrorcontract, and private host exception details are not exposed.The stale-revision mutation guard was developed test-first on this existing branch: a RED contract first required suggestions targeting another document revision to be rejected before mutation, followed by the narrow implementation that computes the canonical current revision and returns
stale_operationon mismatch. Repository CI for lifecycle decisions must always be re-fetched at the exact current head rather than inherited from this lineage.The inline target marker was likewise developed test-first on this branch: a test-only parent commit required accessible target intent before the narrow presentation implementation landed. Exact-current-head repository CI is the only GREEN evidence for lifecycle decisions.
Shared control-plane evidence
Central workflow evidence is owned by the organization
.githubboundary. Known aggregate-green false-evidence classes include dependency-review jobs that skip the actual review action and scanners that analyze a synthetic merge rather than the submitted head. Existing owner paths areContextualWisdomLab/.github#810for dependency-review fail-closed behavior andContextualWisdomLab/.github#1222for exact-source scanner binding. Do not add Inkspan-local competing workflow writers or transfer predecessor/synthetic-source evidence.Pending, queued, skipped, cancelled, absent, neutral, failed, stale, predecessor, status-only, model-only, wrong-checkout, or synthetic-source-only evidence is non-passing.
Completed packed-artifact acceptance\n\nThe exact current branch verifies both
reviewandreview-reactfrom the packed npm artifact through ESM, CommonJS, and strict TypeScript consumers. The React-free core additionally enforces its bounded runtime-authority import contract. This is branch evidence only until protected integration; it does not imply registry publication.\n\n## Remaining #374 workThis PR does not close #374. Remaining product work includes:
Integration boundary
Keep this PR Draft while #118 owns stable-release publication/provenance/digest acceptance and until the branch is reconciled with live protected main through a safe, non-destructive, source-owner-aware path. Do not force-push/destructively rebase, self-approve, weaken gates, transfer predecessor evidence, fabricate release identity, or represent Draft behavior as protected-main shipped truth.