Skip to content

refactor(emotion): compose Wake context and Drift from ordinary atoms - #6

Merged
kachofugetsu09 merged 5 commits into
mainfrom
codex/content-context-drift-20260823
Aug 24, 2026
Merged

refactor(emotion): compose Wake context and Drift from ordinary atoms#6
kachofugetsu09 merged 5 commits into
mainfrom
codex/content-context-drift-20260823

Conversation

@kachofugetsu09

@kachofugetsu09 kachofugetsu09 commented Aug 23, 2026

Copy link
Copy Markdown
Member

Summary

  • physically remove PROACTIVE_COMPONENTS, BACKGROUND_JOBS, DRIFT_FINISHED, ProactiveDocuments, and the old domain-effect runtime
  • use ordinary Timer + current cache + Wake context and ordinary Drift proposal + Tool result primitives
  • pull immutable accepted feedback through the ordinary proactive-feedback.history.v1 service instead of a Core proactive event
  • atomically append Emotion application history, apply the derived delta/sample, and advance the independent PF cursor
  • keep explicit-quote feedback single-counted: the immediate direct effect applies once and the later PF row becomes a zero-delta terminal receipt

History and ownership

  • PF remains the only accepted-feedback owner; Emotion stores the distinct full history of how each fact was applied or reconciled
  • legacy Emotion rows are never rewritten; matching legacy PF events gain an append-only pf_history_import:<cursor> receipt
  • emotion_events, feedback samples, Drift proposal/results remain full history
  • Emotion current state, current context, preference, and PF cursor are overwriteable singleton state
  • empty polls add no business history; no plugin-owned file log was introduced

Migration

Existing schema is validated read-only before any write. v1 to v2 DDL, cursor seed, and version advance occur in one BEGIN IMMEDIATE transaction. Legacy identity conflict or payload/hash drift rolls the entire page back without moving the cursor.

Validation

  • Python: 45 passed against Core 9da3a988a2bf62b0f550bd4f6bb98c4eeb1f56f5 and PF 531eae4e4ac4714aad5417b8257a724007728345
  • Node: 5 passed
  • Pyright: 0 errors
  • compileall, exact Plugin API v3 contract, and diff-check passed
  • real two-order CompositionRoot, Timer, candidate zero-write, reload, rollback/restart, duplicate/hash drift, legacy receipt, explicit quote, and ordinary follow-up fixtures passed
  • Terra xhigh semantic gate: APPROVE at 2bb332b7f51526763b444871510cb4cba866a45c

Recovery

Pre-change bundles were verified before each persistent change. This draft PR does not deploy or change the formal hua-home workspace.

@kachofugetsu09
kachofugetsu09 marked this pull request as ready for review August 24, 2026 09:56
@kachofugetsu09
kachofugetsu09 merged commit 9c8d94b into main Aug 24, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant