Conversation
Breaks the transitions -> invariants -> transitions cycle that running the invariants inside commit() would otherwise create. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
startReview and nextAction computed the same freshness, veto, and final evidence rules independently. One function now answers both. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
… message Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…ing notes Final-review follow-ups for Phase 1: the readiness JSDoc no longer claims the guard and projection cannot disagree, the guard-ordering test is named for what it proves, and the derived-kind and evidenceRefusal preconditions are written down where they are now enforced at write time. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Phase 1 of the runtime refactor plan (
.agents/plans/13-runtime-refactor/README.md). Stacked on #88; retarget tomainonce that merges.Four behavior-preserving commits plus one documentation follow-up:
transitions.tsintosrc/domain/session-queries.ts, breaking the import cycle the next commits would otherwise create.reviewReadinessfunction insrc/domain/review-readiness.ts.startReview(the guard) andnextAction(the status projection) now derive the freshness, veto, and final-evidence decision from it. Note: the plan's literal code for this function dropped the digest the projection used to pin its evidence check; an existing test caught it and the implementation restores the pinning (applicable.findLast(broad).sourceDigest). The whole-branch review verified equivalence on every named case.evidenceStatusclassifier insrc/domain/validation.ts;unsatisfiedEvidenceandevidenceRefusalnow read from the same decision, so the boolean and the message cannot diverge. Message templates and precedence are unchanged.commit()andrecordValidation(): the whole-document invariants now run at write time. Previously a transition that produced an invariant-violating document wrote a file that could not be read back. No existing guard was removed, so all user-facing messages are unchanged. This introduces two runtime-safe import cycles throughvalidation.ts→session-invariants.ts(all cross-module uses are inside function bodies); they can be removed later by movingisValidationEligibleintosession-queries.ts.No prompt text, guidance, Zod schema, tool name, tool response field, or Session v5 shape changes. No existing test was edited; 10 tests were added.
Test plan
bun run check: 1230 pass, 1 skip, 0 fail across 81 filesDeferred follow-ups (not blocking)
evidence-unsatisfiedresult and thereviewKind: "feature"path intests/review-readiness.test.tsreadonlyonReviewReadiness.applicable(plan amendment)evidenceStatus;satisfieson all four literals intests/evidence-status.test.tsbiome.json$schemapins 2.5.11 while the CLI is 2.5.13🤖 Generated with Claude Code