-
Notifications
You must be signed in to change notification settings - Fork 0
feat: add durable lifecycle and deterministic rollout selection #7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 3 commits
Commits
Show all changes
85 commits
Select commit
Hold shift + click to select a range
8c4fb25
feat: add durable memory lifecycle and archive mutations
Boulea7 3ddeacf
fix: make rollout selection deterministic
Boulea7 54d663f
fix: resolve foundation review gaps
Boulea7 4bc384b
fix: harden planned snapshot coverage and rollout ordering
Boulea7 8a7a328
feat: add Codex integration stack surfaces
Boulea7 622844e
docs: sync Codex-first hybrid integration contracts
Boulea7 e1ac20e
feat: close codex integration workflow contract gaps
Boulea7 e535117
feat: tighten codex workflow contract and release gates
Boulea7 0883967
feat: tighten workflow contract and post-work review
Boulea7 c0890e9
feat: clarify skill readiness and blocked apply contracts
Boulea7 71e5532
fix: tighten integration review contracts
Boulea7 427d05e
feat: pin hook helpers and add retrieval sidecar index
Boulea7 632c99f
feat: harden retrieval sidecar diagnostics and provenance
Boulea7 18a3d01
feat: surface retrieval health and audit diagnostics
Boulea7 bb67222
feat: add retrieval reindex and lineage reviewer warnings
Boulea7 de8b835
fix: harden issue5 memory safety and release gates
Boulea7 7d8cfcd
feat: clarify retrieval fallback contract and integration json
Boulea7 3c9ae78
fix: align retrieval sidecar stack contracts
Boulea7 292dfe8
fix: harden retrieval hook quoting and audit fallback
Boulea7 aae1e76
feat: add manual mutation reviewer contracts
Boulea7 a517417
feat: deepen manual mutation reviewer lifecycle contracts
Boulea7 c7d1bad
test: align reviewer workflow print-config contracts
Boulea7 937a90b
fix: resolve PR4 reviewer and workflow contract gaps
Boulea7 cd639fe
fix: keep rollout provenance additive
Boulea7 3706562
feat: tighten continuity startup contract
Boulea7 5f457cc
fix: narrow continuity signal conflicts and latest goals
Boulea7 91f5217
feat: gate durable sync to primary rollouts
Boulea7 db65236
feat: tighten continuity evidence and low-signal guards
Boulea7 18e4fc3
fix: reconcile continuity rollout contracts
Boulea7 27dc37e
fix: tighten continuity warning provenance
Boulea7 25b6bfd
feat: rebuild startup reviewer provenance wave
Boulea7 477ad23
fix: restore rejected audit reviewer contract
Boulea7 1ca49a0
fix: restore PR6 recovery validation gates
Boulea7 9eaba85
feat: tighten extraction trust signals
Boulea7 4568696
fix: tighten durable corrections and command signatures
Boulea7 30f1839
feat: harden directive extraction and unsafe topic recall
Boulea7 c76a19c
feat: harden directive extraction and continuity conflict hints
Boulea7 a418c97
fix: preserve directive clause parsing and reference topics
Boulea7 4b7027f
fix: refine extractor conflict and continuity semantics
Boulea7 55e65aa
docs: sync codex release-facing command examples
Boulea7 9447cd9
fix: align route truth and codex integration contracts
Boulea7 9c1b5de
test: stabilize doctor app-server contract
Boulea7 aed76c1
test: align route contract expectations
Boulea7 a227e68
test: refresh compiled contract coverage
Boulea7 4c72e4d
test: align packaged contract coverage
Boulea7 f4150c2
fix: harden release-facing contract closure
Boulea7 60f28f9
fix: tighten continuity selectors and memory contract closure
Boulea7 e293df6
fix: retry continuity recovery before newer rollouts
Boulea7 00addbd
docs: clarify integrations install AGENTS boundary
Boulea7 8b93a43
docs: add repository AGENTS guide
Boulea7 72fcd85
docs: clarify Claude and Gemini host boundaries
Boulea7 459e203
fix: harden runtime contract remediation
Boulea7 32e6860
test: refresh recovery record scope expectation
Boulea7 e179cae
test: align compiled staged-write failure contract
Boulea7 fad8b57
fix: close runtime safety seams
Boulea7 94ba1c9
fix: make init explicit and idempotent
Boulea7 cc2ea2f
fix: keep session inspection read-only
Boulea7 5ecc00b
fix: keep init independent from global config state
Boulea7 820c355
test: isolate init env overrides
Boulea7 119d0c3
test: keep vitest config coverage lint-safe
Boulea7 4e33abd
fix: keep worktree exclusions in vitest config
Boulea7 f337d90
fix: preserve vitest default excludes
Boulea7 678694f
fix: preserve same-host issue tracker refs
Boulea7 fbef294
fix: fail closed for invalid integration doctor cwd
Boulea7 62b7301
fix: keep issue tracker keys repo-aware
Boulea7 805f319
fix: close issue5 tail closeout blockers
Boulea7 a7b34ef
Merge pull request #26 from Boulea7/fix/issue5-tail-closeout-unblock-…
Boulea7 7630066
Merge pull request #25 from Boulea7/pr/issue5-19-shared-cwd-fail-closed
Boulea7 640de88
Merge pull request #24 from Boulea7/pr/issue5-18-closeout-review-debt
Boulea7 03d0b4e
Merge pull request #23 from Boulea7/pr/issue5-17-release-gate-isolati…
Boulea7 076eccb
Merge pull request #22 from Boulea7/pr/issue5-16-init-idempotency-force
Boulea7 50f6bc2
Merge pull request #21 from Boulea7/pr/issue5-15-session-readonly-clo…
Boulea7 6f11e67
Merge pull request #20 from Boulea7/pr/issue5-14-runtime-safety-closure
Boulea7 961945f
Merge pull request #19 from Boulea7/pr/issue5-13-runtime-contract-rem…
Boulea7 a1c8210
Merge pull request #18 from Boulea7/pr/issue5-12-claude-gemini-host-b…
Boulea7 e530909
Merge pull request #17 from Boulea7/pr/issue5-11-help-and-boundary-cl…
Boulea7 13f9d7f
Merge pull request #16 from Boulea7/pr/issue5-10-wave3-contract-closure
Boulea7 6764bc1
Merge pull request #15 from Boulea7/pr/issue5-09-release-contract-clo…
Boulea7 04a66ba
Merge pull request #14 from Boulea7/pr/issue5-08-route-truth-contracts
Boulea7 9d3f1dc
Merge branch 'pr/issue5-07-extractor-default-closure' into pr/issue5-…
Boulea7 ff99366
Merge branch 'pr/issue5-06-startup-reviewer-provenance-v3' into pr/is…
Boulea7 82fde42
Merge pull request #11 from Boulea7/pr/issue5-05-continuity-rollout-s…
Boulea7 31c3fbd
Merge pull request #10 from Boulea7/pr/issue5-04-manual-mutation-revi…
Boulea7 b70d256
Merge pull request #9 from Boulea7/pr/issue5-03-retrieval-sidecar
Boulea7 670a04e
Merge pull request #8 from Boulea7/pr/issue5-02-integration-foundation
Boulea7 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,109 @@ | ||
| import type { | ||
| MemoryEntry, | ||
| MemoryHistoryRecordState, | ||
| MemoryLifecycleAction, | ||
| MemoryRecordState, | ||
| MemoryRef, | ||
| MemoryScope | ||
| } from "../types.js"; | ||
|
|
||
| const allowedScopes = new Set<MemoryScope>(["global", "project", "project-local"]); | ||
| const allowedStates = new Set<MemoryRecordState>(["active", "archived"]); | ||
| const allowedHistoryStates = new Set<MemoryHistoryRecordState>(["active", "archived", "deleted"]); | ||
|
|
||
| export function buildMemoryRef( | ||
| scope: MemoryScope, | ||
| state: MemoryRecordState, | ||
| topic: string, | ||
| id: string | ||
| ): string { | ||
| return `${scope}:${state}:${topic}:${id}`; | ||
| } | ||
|
|
||
| export function parseMemoryRef(ref: string): MemoryRef | null { | ||
| const [scope, state, topic, ...idParts] = ref.split(":"); | ||
| const id = idParts.join(":"); | ||
| if ( | ||
| !scope || | ||
| !state || | ||
| !topic || | ||
| idParts.length === 0 || | ||
| id.length === 0 || | ||
| !allowedScopes.has(scope as MemoryScope) || | ||
| !allowedStates.has(state as MemoryRecordState) | ||
| ) { | ||
| return null; | ||
| } | ||
|
|
||
| return { | ||
| ref, | ||
| scope: scope as MemoryScope, | ||
| state: state as MemoryRecordState, | ||
| topic, | ||
| id | ||
| }; | ||
|
coderabbitai[bot] marked this conversation as resolved.
|
||
| } | ||
|
|
||
| export function assertValidMemoryRef(ref: string): MemoryRef { | ||
| const parsed = parseMemoryRef(ref); | ||
| if (!parsed) { | ||
| throw new Error( | ||
| `Invalid memory ref "${ref}". Expected format <scope>:<state>:<topic>:<id>.` | ||
| ); | ||
| } | ||
|
|
||
| return parsed; | ||
| } | ||
|
|
||
| export function isMemoryHistoryRecordState(value: unknown): value is MemoryHistoryRecordState { | ||
| return typeof value === "string" && allowedHistoryStates.has(value as MemoryHistoryRecordState); | ||
| } | ||
|
|
||
| function normalizeString(value: string | undefined): string { | ||
| return (value ?? "").trim(); | ||
| } | ||
|
|
||
| function normalizeStringArray(values: readonly string[]): string[] { | ||
| return values | ||
| .map((value) => value.trim()) | ||
| .filter(Boolean); | ||
| } | ||
|
|
||
| export function areEquivalentMemoryEntries(left: MemoryEntry, right: MemoryEntry): boolean { | ||
| return ( | ||
| normalizeString(left.summary) === normalizeString(right.summary) && | ||
| JSON.stringify(normalizeStringArray(left.details)) === | ||
| JSON.stringify(normalizeStringArray(right.details)) && | ||
| JSON.stringify(normalizeStringArray(left.sources)) === | ||
| JSON.stringify(normalizeStringArray(right.sources)) && | ||
| normalizeString(left.reason) === normalizeString(right.reason) | ||
| ); | ||
| } | ||
|
|
||
| export function classifyUpsertLifecycle( | ||
| existingActive: MemoryEntry | null, | ||
| existingArchived: MemoryEntry | null, | ||
| nextEntry: MemoryEntry | ||
| ): Extract<MemoryLifecycleAction, "add" | "update" | "noop"> { | ||
| if (existingActive && areEquivalentMemoryEntries(existingActive, nextEntry)) { | ||
| return "noop"; | ||
| } | ||
|
|
||
| return existingActive || existingArchived ? "update" : "add"; | ||
| } | ||
|
|
||
| export function nextHistoryStateForLifecycle( | ||
| action: MemoryLifecycleAction | ||
| ): MemoryHistoryRecordState | undefined { | ||
| switch (action) { | ||
| case "add": | ||
| case "update": | ||
| return "active"; | ||
| case "archive": | ||
| return "archived"; | ||
| case "delete": | ||
| return "deleted"; | ||
| case "noop": | ||
| return undefined; | ||
| } | ||
| } | ||
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.