Classify v19 writes with admission outcomes - #768
Conversation
Self-code review
The first pass found and corrected three issues in The clean follow-up pass reviewed the complete @codex please confirm the branch has no remaining actionable correctness, contract, or documentation findings. |
|
Warning Review limit reached
Next review available in: 40 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe PR replaces legacy write receipt outcome strings with a closed ChangesAdmission outcome migration
Estimated code review effort: 4 (Complex) | ~45 minutes Possibly related issues
Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
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. Comment |
Release Preflight
If this PR is from a |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/domain/api/WriteAdmissionRuntime.ts`:
- Around line 124-135: Introduce a named constant for the intent kinds that do
not require a bounded basis coordinate, and update
resolveEvaluationCoordinateRef to check membership in that constant instead of
hardcoding 'node.add' and 'edge.add'. Preserve the existing fallback behavior
for all other intent kinds.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro
Run ID: 6b7b208a-b072-45ac-a105-1eab3ce1fe17
📒 Files selected for processing (35)
CHANGELOG.mdREADME.mddocs/migrations/v19/README.mddocs/topics/api/README.mddocs/topics/getting-started.mddocs/topics/reference.mddocs/topics/supported-outcome-settlement.mdindex.tssrc/domain/api/AdmissionOutcome.tssrc/domain/api/AdmissionOutcomeRuntime.tssrc/domain/api/ApiRuntimeContext.tssrc/domain/api/DraftTimelineRuntime.tssrc/domain/api/JoinReceipt.tssrc/domain/api/ReadReceipt.tssrc/domain/api/ReceiptOutcome.tssrc/domain/api/WriteAdmissionRuntime.tssrc/domain/api/WriteReceipt.tssrc/domain/api/WriteRuntime.tssrc/domain/services/PatchBuilder.tssrc/domain/services/admission/BoundedIntentGuardReader.tssrc/domain/services/admission/GraphCoordinateRef.tssrc/domain/services/admission/PatchBuilderCausalBasis.tssrc/domain/services/controllers/PatchController.tssrc/domain/services/strand/StrandPatchService.tssrc/domain/services/strand/createStrandCoordinator.tstest/integration/application/GitStorage.integration.test.tstest/type-check/v19-consumer.tstest/unit/domain/AdmissionOutcomeRuntime.test.tstest/unit/domain/DraftTimelineRuntime.test.tstest/unit/domain/ReceiptDiagnostics.test.tstest/unit/domain/ReceiptOutcome.test.tstest/unit/domain/WarpFacade.test.tstest/unit/domain/WriteRuntime.test.tstest/unit/domain/services/controllers/StrandController.host-interface.test.tstest/unit/scripts/v19-public-api-boundary.test.ts
📜 Review details
⏰ Context from checks skipped due to timeout. (3)
- GitHub Check: coverage-threshold
- GitHub Check: test-node (22)
- GitHub Check: preflight
🧰 Additional context used
📓 Path-based instructions (4)
**/*.{ts,tsx,js,jsx}
📄 CodeRabbit inference engine (AGENTS.md)
**/*.{ts,tsx,js,jsx}: Do not use direct imports fromsrc/infrastructure/**insrc/domain/**orsrc/ports/**; depend on a port instead.
Do not use direct Node built-ins insrc/domain/**orsrc/ports/**; use a port instead.
Files:
test/unit/domain/services/controllers/StrandController.host-interface.test.tstest/integration/application/GitStorage.integration.test.tssrc/domain/api/ApiRuntimeContext.tssrc/domain/services/strand/createStrandCoordinator.tssrc/domain/services/admission/PatchBuilderCausalBasis.tssrc/domain/api/DraftTimelineRuntime.tssrc/domain/api/ReceiptOutcome.tstest/unit/domain/AdmissionOutcomeRuntime.test.tsindex.tssrc/domain/services/admission/GraphCoordinateRef.tssrc/domain/api/AdmissionOutcome.tssrc/domain/services/controllers/PatchController.tssrc/domain/api/ReadReceipt.tstest/unit/domain/WarpFacade.test.tssrc/domain/api/AdmissionOutcomeRuntime.tssrc/domain/api/JoinReceipt.tstest/unit/domain/WriteRuntime.test.tstest/type-check/v19-consumer.tstest/unit/domain/ReceiptOutcome.test.tstest/unit/domain/ReceiptDiagnostics.test.tssrc/domain/api/WriteRuntime.tssrc/domain/api/WriteAdmissionRuntime.tstest/unit/domain/DraftTimelineRuntime.test.tssrc/domain/services/strand/StrandPatchService.tssrc/domain/services/PatchBuilder.tssrc/domain/api/WriteReceipt.tstest/unit/scripts/v19-public-api-boundary.test.tssrc/domain/services/admission/BoundedIntentGuardReader.ts
src/**/*.{ts,tsx,js,jsx}
📄 CodeRabbit inference engine (AGENTS.md)
src/**/*.{ts,tsx,js,jsx}: Do not introduceany,as any,as unknown as,unknown(outside adapters),Record<string, unknown>(outside adapters),*Likeplaceholder types,JSON.parse/JSON.stringify(outside adapters),fetch(outside adapters),process.env(outside adapters),@ts-ignore, orz.any()in core code; use validated boundary models and ports instead.
Use constructor-injected ports for external capabilities; do not rely on ambient dependencies for I/O, clocks, persistence, or entropy.
Do not createutils.ts,helpers.ts,misc.ts, orcommon.ts; name files after the actual concept they model.
Prefer one file per class, type, or object; if a file accumulates peer concepts, split it.
Keep helper corridors, fake shape trust, transitional duplication, and compile-time theater out of the codebase; runtime-honest TypeScript must reflect actual behavior.
No enum usage; prefer runtime-backed domain forms and unions.
Do not use boolean trap parameters; prefer named option objects or separate methods.
Avoid magic strings or numbers when a named constant should exist.
Keep domain bytes asUint8Array;Bufferbelongs in infrastructure adapters.
Files:
src/domain/api/ApiRuntimeContext.tssrc/domain/services/strand/createStrandCoordinator.tssrc/domain/services/admission/PatchBuilderCausalBasis.tssrc/domain/api/DraftTimelineRuntime.tssrc/domain/api/ReceiptOutcome.tssrc/domain/services/admission/GraphCoordinateRef.tssrc/domain/api/AdmissionOutcome.tssrc/domain/services/controllers/PatchController.tssrc/domain/api/ReadReceipt.tssrc/domain/api/AdmissionOutcomeRuntime.tssrc/domain/api/JoinReceipt.tssrc/domain/api/WriteRuntime.tssrc/domain/api/WriteAdmissionRuntime.tssrc/domain/services/strand/StrandPatchService.tssrc/domain/services/PatchBuilder.tssrc/domain/api/WriteReceipt.tssrc/domain/services/admission/BoundedIntentGuardReader.ts
src/domain/**/*.{ts,tsx,js,jsx}
📄 CodeRabbit inference engine (AGENTS.md)
src/domain/**/*.{ts,tsx,js,jsx}: Insrc/domain/**, do not useDate.now(),new Date(),Date(),performance.now(),Math.random(),crypto.randomUUID(),crypto.getRandomValues(),setTimeout,setInterval, rawnew Error(...)/new TypeError(...), or direct imports from Node built-ins; time, entropy, and external capabilities must enter through ports or parameters, and domain errors should extendWarpError.
Construct domain objects only in core when doing so establishes validated runtime truth; do not build infrastructure adapters, host APIs, persistence implementations, wall clocks, or entropy sources inside core.
Prefer discriminated unions and explicit result types instead of boolean-flag bags, and model expected failures as return values rather than exceptions.
src/domain/must not import host APIs or Node-specific globals; hexagonal architecture boundaries are mandatory.
Domain code must not use the wall clock directly; time must enter through a port or parameter.
Files:
src/domain/api/ApiRuntimeContext.tssrc/domain/services/strand/createStrandCoordinator.tssrc/domain/services/admission/PatchBuilderCausalBasis.tssrc/domain/api/DraftTimelineRuntime.tssrc/domain/api/ReceiptOutcome.tssrc/domain/services/admission/GraphCoordinateRef.tssrc/domain/api/AdmissionOutcome.tssrc/domain/services/controllers/PatchController.tssrc/domain/api/ReadReceipt.tssrc/domain/api/AdmissionOutcomeRuntime.tssrc/domain/api/JoinReceipt.tssrc/domain/api/WriteRuntime.tssrc/domain/api/WriteAdmissionRuntime.tssrc/domain/services/strand/StrandPatchService.tssrc/domain/services/PatchBuilder.tssrc/domain/api/WriteReceipt.tssrc/domain/services/admission/BoundedIntentGuardReader.ts
src/domain/**/!(*.test).{ts,tsx,js,jsx}
📄 CodeRabbit inference engine (AGENTS.md)
Use explicit domain concepts with validated constructors,
Object.freeze, andinstanceofdispatch; domain objects should be runtime-backed nouns, not ad hoc shape bags.
Files:
src/domain/api/ApiRuntimeContext.tssrc/domain/services/strand/createStrandCoordinator.tssrc/domain/services/admission/PatchBuilderCausalBasis.tssrc/domain/api/DraftTimelineRuntime.tssrc/domain/api/ReceiptOutcome.tssrc/domain/services/admission/GraphCoordinateRef.tssrc/domain/api/AdmissionOutcome.tssrc/domain/services/controllers/PatchController.tssrc/domain/api/ReadReceipt.tssrc/domain/api/AdmissionOutcomeRuntime.tssrc/domain/api/JoinReceipt.tssrc/domain/api/WriteRuntime.tssrc/domain/api/WriteAdmissionRuntime.tssrc/domain/services/strand/StrandPatchService.tssrc/domain/services/PatchBuilder.tssrc/domain/api/WriteReceipt.tssrc/domain/services/admission/BoundedIntentGuardReader.ts
🧠 Learnings (1)
📚 Learning: 2026-03-08T19:50:17.519Z
Learnt from: flyingrobots
Repo: git-stunts/git-warp PR: 65
File: CHANGELOG.md:88-88
Timestamp: 2026-03-08T19:50:17.519Z
Learning: Follow the Keep a Changelog convention for CHANGELOG.md. Allow duplicate subheadings across versions (e.g., '### Added', '### Fixed'). Configure markdownlint MD024 with {"siblings_only": true} to avoid cross-version false positives.
Applied to files:
CHANGELOG.md
🔇 Additional comments (37)
src/domain/api/AdmissionOutcome.ts (1)
1-95: LGTM!src/domain/api/ApiRuntimeContext.ts (1)
22-22: LGTM!src/domain/api/ReceiptOutcome.ts (1)
1-14: LGTM!src/domain/api/JoinReceipt.ts (1)
6-12: LGTM!Also applies to: 36-36
src/domain/api/WriteReceipt.ts (1)
3-25: LGTM!Also applies to: 39-42, 47-52, 60-61
index.ts (1)
29-57: LGTM!test/unit/domain/AdmissionOutcomeRuntime.test.ts (1)
1-122: LGTM!test/unit/domain/ReceiptOutcome.test.ts (1)
4-21: LGTM!Also applies to: 30-37, 96-126, 145-155
src/domain/api/AdmissionOutcomeRuntime.ts (1)
126-146: 🗄️ Data Integrity & Integration
reasonis already a closed object with onlyfamilyandcode, so the spread is harmless.> Likely an incorrect or invalid review comment.src/domain/api/ReadReceipt.ts (1)
6-12: LGTM!Also applies to: 35-35
src/domain/services/admission/GraphCoordinateRef.ts (1)
1-49: LGTM!src/domain/services/admission/PatchBuilderCausalBasis.ts (1)
1-30: LGTM!src/domain/services/PatchBuilder.ts (1)
40-40: LGTM!Also applies to: 61-62, 115-124
src/domain/services/admission/BoundedIntentGuardReader.ts (1)
7-12: LGTM!Also applies to: 60-69
src/domain/services/controllers/PatchController.ts (1)
41-41: LGTM!Also applies to: 154-157
src/domain/services/strand/StrandPatchService.ts (1)
20-20: LGTM!Also applies to: 42-50, 245-245, 254-264, 343-347
src/domain/services/strand/createStrandCoordinator.ts (1)
59-59: LGTM!test/unit/domain/services/controllers/StrandController.host-interface.test.ts (1)
30-30: LGTM!src/domain/api/WriteAdmissionRuntime.ts (3)
1-22: LGTM!Also applies to: 64-122, 137-171, 185-211
47-62: 🎯 Functional CorrectnessNo return-type change needed.
AdmissionClassifier.classify(DerivationWitness)already returnsDerivedAdmission;PluralAdmissionis produced fromPluralityWitness, not this path.> Likely an incorrect or invalid review comment.
173-207: 🎯 Functional Correctness
writerIdandparticipantIdare intentionally separate
participantIdbinds the admission toruntime.writerId;writerIdis used for patch-journal and publication refs.> Likely an incorrect or invalid review comment.src/domain/api/WriteRuntime.ts (1)
3-25: LGTM!Also applies to: 36-181, 197-252
src/domain/api/DraftTimelineRuntime.ts (1)
234-255: LGTM!docs/topics/reference.md (1)
39-82: LGTM!docs/topics/supported-outcome-settlement.md (1)
19-20: LGTM!test/integration/application/GitStorage.integration.test.ts (1)
26-26: LGTM!test/type-check/v19-consumer.ts (1)
11-32: LGTM!Also applies to: 59-60, 77-77, 88-103, 130-137
test/unit/domain/ReceiptDiagnostics.test.ts (1)
6-18: LGTM!Also applies to: 57-57, 81-84, 164-168, 178-188
test/unit/scripts/v19-public-api-boundary.test.ts (1)
9-51: LGTM!test/unit/domain/WriteRuntime.test.ts (1)
1-182: LGTM!test/unit/domain/WarpFacade.test.ts (1)
263-263: LGTM!Also applies to: 279-306, 366-377, 572-572
test/unit/domain/DraftTimelineRuntime.test.ts (1)
20-20: LGTM!Also applies to: 52-99, 114-114, 161-161, 188-197, 283-283
CHANGELOG.md (1)
14-16: LGTM!README.md (1)
90-91: LGTM!docs/migrations/v19/README.md (1)
18-18: LGTM!Also applies to: 119-137, 258-261, 284-284, 300-325
docs/topics/api/README.md (1)
332-336: LGTM!docs/topics/getting-started.md (1)
55-73: LGTM!
Release Preflight
If this PR is from a |
Summary
derived | plural | conflict | obstructionadmission unionIssue
Refs #712
Refs #765
This is the write-admission child slice of the broader v19 Runtime, Lane, and Observation public API goalpost. It does not close #712.
Semantics
derivedandpluralare admitted outcomes with different causal topologyconflictandobstructionremain operationally distinct and carry different recovery evidenceTest plan
ADR checks
Review
The branch received a clean second self-review after correcting three first-pass findings. CodeRabbit completed an assertive review; its remaining inline maintainability request is addressed in the follow-up commit.