fix(c0): pref-core budget + silent-loss write paths#68
Draft
m3talux wants to merge 4 commits into
Draft
Conversation
…JECT_LIMITS.prefCore from 150 to 250 to match the\nPREFERENCES_CORE_MAX_TOKENS producer ceiling so the authored identity\ncore is never silently clipped. Add validateBudgetConsistency() that\nthrows when the consumer slot falls below the producer ceiling; called\nat the top of emitPreferencesCore so drift fails loudly. Add\ncross-module assertions in preferences.test.ts that verify the\nbudgets are aligned and that a ~250-token core is not clipped.\n\nCo-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…17: the structured-project-note catch block already called writeFailure\nbefore the fallback; update the G17 test to trigger the failure via a\nspy on appendDatedSectionWithArchive rather than a read-only directory,\nso the fallback write can succeed and the sentinel-assertion holds.\n\nG19: reorder the archive write sequence so all evicted sections are\ncommitted atomically (read->append->atomicWrite, grouped by archive\nfile, date-ascending) BEFORE the main-note atomicWrite. A crash after\narchive but before main-note commit leaves the un-trimmed main note\nplus safe duplicate archive entries rather than losing evicted content.\n\nCo-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…nAfter each writeNote call in distillFromEvents (both the non-create and\ncreate paths), add an else branch that calls recordRejection when\n!res.ok so path-not-allowed and frontmatter-validation failures surface\nin distill-rejects.md instead of being silently dropped. Add\ndistillWriteNoteReject.test.ts with two unit tests that mock writeNote\nto return ok:false and assert the reject-queue entry is present.\n\nCo-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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.
v1.0.0 Wave C C0 pre-flight. Aligns the preference-core producer/consumer token budgets and closes silent-loss write paths (log fail-open, record dropped writes to the reject queue, atomic archive append). Banked for the June 12 reassessment.