feat(context): ship the adaptive-context lifecycle on by default#746
Merged
Conversation
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
There was a problem hiding this comment.
Sorry @macanderson, you have reached your weekly rate limit of 500000 diff characters.
Please try again later or upgrade to continue using Sourcery
`context.lifecycle.enabled` now defaults to `true`. The whole lifecycle — decomposed recall, frame identity, recall telemetry, selection reasons, the typed learning loop, the ledger and its review surface — is what a workspace gets without configuring anything. WHY THIS IS SAFE TO DEFAULT ON The behavior-compatibility suite asserts every spec §8 guarantee on BOTH the typed path and the opted-out one, from the same assertions: tombstone suppression across re-learning on every surface, the per-session creation cap, never clobbering a hand-edited file, deterministic candidate identity, and failure isolation. The migration deliberately kept the lexical loop reachable rather than deleting it, so "behavior-compatible" stays a checkable claim instead of a promise. Turning the default on is the point of having built that evidence — a lifecycle nobody runs cannot be evaluated. THE FLIP IS TWO CHANGES, NOT ONE `LifecycleSettings::default()` alone would have shipped nothing. The reader asked `.and_then(|s| s.context).is_some_and(|c| c.lifecycle.enabled)`, so a workspace with no `settings.json` — the common case, and every new user — answered `false` regardless of the struct's default, because the `context` block was absent rather than present-and-false. An absent block now means "the defaults", which is what it always should have meant. There are tests for the no-settings-file case and the empty-block case specifically, because that is the gap that would have shipped this as a no-op. WHAT STILL FAILS CLOSED An unreadable or malformed settings file stays OFF. That file may be the one in which someone turned the lifecycle off, and silently overriding an opt-out we failed to parse is worse than leaving a default unapplied. An explicit `"enabled": false` is honored, and restores the previous behavior wholesale. The test fixtures that used to get the lexical loop by writing nothing now opt out explicitly, because "write nothing and get the old path" is no longer true. That is a change to what the fixtures say, not to what they assert. `DriverConfig::lifecycle_enabled` still defaults `false`: a programmatically built config should opt in deliberately rather than inherit a product default it never read. The CLI passes the real setting. `make gate` green: exit 0, 3805 tests, check-file-size OK.
macanderson
force-pushed
the
feat/lifecycle-on-by-default
branch
from
July 26, 2026 23:36
fda3cac to
f591ebe
Compare
macanderson
enabled auto-merge (squash)
July 26, 2026 23:42
7 tasks
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.
context.lifecycle.enablednow defaults totrue. The whole lifecycle — decomposed recall, frame identity, recall telemetry, selection reasons, the typed learning loop, the ledger and its review surface — is what a workspace gets without configuring anything.Why this is safe to default on
The behavior-compatibility suite asserts every spec §8 guarantee on both the typed path and the opted-out one, from the same assertions: tombstone suppression across re-learning on every surface, the per-session creation cap, never clobbering a hand-edited file, deterministic candidate identity, and failure isolation.
Phase 3 deliberately kept the lexical loop reachable rather than deleting it, so "behavior-compatible" stays a checkable claim rather than a promise. Defaulting on is the point of having built that evidence — a lifecycle nobody runs cannot be evaluated.
The flip is two changes, not one
This is the part worth reviewing closely. Flipping
LifecycleSettings::default()alone would have shipped nothing.The reader asked:
A workspace with no
settings.json— the common case, and every new user — answeredfalseregardless of the struct's default, because thecontextblock was absent rather than present-and-false. An absent block now means "the defaults", which is what it always should have meant.There are tests for the no-settings-file case and the empty-block case specifically, because that is exactly the gap that would have shipped this as a silent no-op.
What still fails closed
An unreadable or malformed settings file stays OFF. That file may be the one in which someone turned the lifecycle off, and silently overriding an opt-out we failed to parse is worse than leaving a default unapplied. An explicit
"enabled": falseis honored and restores the previous behavior wholesale.Notes for the reviewer
DriverConfig::lifecycle_enabledstill defaultsfalseon purpose: a programmatically built config should opt in deliberately rather than inherit a product default it never read. The CLI passes the real setting.learning.modeandgovernance.moderemain inert — they have no consumers outside settings tests.lifecycle.enabledis the only real switch.Gate
make gategreen: exit 0, 3805 tests,check-file-size: OK — 475 Rust files, none over 1500 lines except 25 grandfathered (none grew).